bitwrench 2.0.14 → 2.0.16
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 +57 -21
- package/dist/bitwrench-bccl.cjs.js +3746 -0
- package/dist/bitwrench-bccl.cjs.min.js +40 -0
- package/dist/bitwrench-bccl.esm.js +3741 -0
- package/dist/bitwrench-bccl.esm.min.js +40 -0
- package/dist/bitwrench-bccl.umd.js +3752 -0
- package/dist/bitwrench-bccl.umd.min.js +40 -0
- package/dist/bitwrench-code-edit.cjs.js +99 -49
- package/dist/bitwrench-code-edit.cjs.min.js +23 -0
- package/dist/bitwrench-code-edit.es5.js +79 -16
- package/dist/bitwrench-code-edit.es5.min.js +9 -2
- package/dist/bitwrench-code-edit.esm.js +99 -49
- package/dist/bitwrench-code-edit.esm.min.js +9 -2
- package/dist/bitwrench-code-edit.umd.js +99 -49
- package/dist/bitwrench-code-edit.umd.min.js +9 -2
- package/dist/bitwrench-lean.cjs.js +4923 -3248
- package/dist/bitwrench-lean.cjs.min.js +35 -6
- package/dist/bitwrench-lean.es5.js +6325 -4580
- package/dist/bitwrench-lean.es5.min.js +32 -3
- package/dist/bitwrench-lean.esm.js +4923 -3248
- package/dist/bitwrench-lean.esm.min.js +35 -6
- package/dist/bitwrench-lean.umd.js +4923 -3248
- package/dist/bitwrench-lean.umd.min.js +35 -6
- package/dist/bitwrench.cjs.js +5082 -3667
- package/dist/bitwrench.cjs.min.js +38 -8
- package/dist/bitwrench.css +2289 -6034
- package/dist/bitwrench.es5.js +6862 -5346
- package/dist/bitwrench.es5.min.js +34 -5
- package/dist/bitwrench.esm.js +5082 -3667
- package/dist/bitwrench.esm.min.js +38 -8
- package/dist/bitwrench.min.css +1 -0
- package/dist/bitwrench.umd.js +5082 -3667
- package/dist/bitwrench.umd.min.js +38 -8
- package/dist/builds.json +184 -74
- package/dist/bwserve.cjs.js +646 -0
- package/dist/bwserve.esm.js +638 -0
- package/dist/sri.json +36 -26
- package/package.json +23 -6
- package/readme.html +71 -32
- package/src/bitwrench-bccl-entry.js +72 -0
- package/src/{bitwrench-components-v2.js → bitwrench-bccl.js} +396 -647
- package/src/bitwrench-code-edit.js +98 -48
- package/src/bitwrench-color-utils.js +24 -18
- package/src/bitwrench-components-stub.js +4 -1
- package/src/bitwrench-file-ops.js +180 -0
- package/src/bitwrench-lean.js +2 -2
- package/src/bitwrench-styles.js +1287 -4029
- package/src/bitwrench-utils.js +458 -0
- package/src/bitwrench.js +2070 -1292
- package/src/bwserve/client.js +182 -0
- package/src/bwserve/index.js +352 -0
- package/src/bwserve/shell.js +103 -0
- package/src/cli/index.js +36 -15
- package/src/cli/layout-default.js +18 -18
- package/src/cli/serve.js +325 -0
- package/src/generate-css.js +73 -53
- package/src/version.js +3 -3
- package/src/bitwrench-component-base.js +0 -736
- package/src/bitwrench-components-inline.js +0 -374
- package/src/bitwrench-components.js +0 -610
- /package/bin/{bitwrench.js → bwcli.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
2
|
-
"use strict";const e={version:"2.0.
|
|
1
|
+
/*! bitwrench v2.0.16 | BSD-2-Clause | https://deftio.github.com/bitwrench/pages */
|
|
2
|
+
"use strict";const e={version:"2.0.16",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-12T08:05:52.043Z"};
|
|
3
3
|
/**
|
|
4
4
|
* Bitwrench Color Utilities
|
|
5
5
|
*
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* bw.colorParse, bw.colorRgbToHsl, etc.
|
|
9
9
|
*
|
|
10
10
|
* @module bitwrench-color-utils
|
|
11
|
-
* @license BSD-2-Clause
|
|
12
|
-
|
|
11
|
+
* @license BSD-2-Clause
|
|
12
|
+
* @copy Manu Chatterjee @deftio
|
|
13
|
+
*/function t(e){return("0"+e.toString(16)).slice(-2)}function r(e,t,r){return Math.max(t,Math.min(r,e))}function o(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"],a=0;a<e.length&&a<o.length;a++)o[a]=e[a];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(),_=c[2].split(",").map(function(e){return parseFloat(e)});if("rgb"===d)r[0]=_[0]||0,r[1]=_[1]||0,r[2]=_[2]||0,r[3]=void 0!==_[3]?255*_[3]:t,r[4]="rgb";else if("hsl"===d){return n(_[0]||0,_[1]||0,_[2]||0,void 0!==_[3]?255*_[3]:t)}}}return r}function a(e,t,r,o,a){void 0===o&&(o=255),void 0===a&&(a=!0),Array.isArray(e)&&(t=e[1],r=e[2],o=void 0!==e[3]?e[3]:255,e=e[0]),e/=255,t/=255,r/=255;var n,i,s=Math.max(e,t,r),l=Math.min(e,t,r),c=(s+l)/2;if(s===l)n=i=0;else{var d=s-l;switch(i=c>.5?d/(2-s-l):d/(s+l),s){case e:n=((t-r)/d+(t<r?6:0))/6;break;case t:n=((r-e)/d+2)/6;break;case r:n=((e-t)/d+4)/6}}return n*=360,i*=100,c*=100,a&&(n=Math.round(n),i=Math.round(i),c=Math.round(c),o=Math.round(o)),[n,i,c,o,"hsl"]}function n(e,t,r,o,a){void 0===o&&(o=255),void 0===a&&(a=!0),Array.isArray(e)&&(t=e[1],r=e[2],o=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 _=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},b=d<.5?d*(1+c):d+c-d*c,p=2*d-b;n=255*_(p,b,l+1/3),i=255*_(p,b,l),s=255*_(p,b,l-1/3)}return a&&(n=Math.round(n),i=Math.round(i),s=Math.round(s),o=Math.round(o)),[n,i,s,o,"rgb"]}function i(e){var t=o(e),r=a(t[0],t[1],t[2],255,!1);return[r[0],r[1],r[2]]}function s(e){var r=n(e[0],e[1],e[2],255,!0);return"#"+t(r[0])+t(r[1])+t(r[2])}function l(e,t){var o=i(e);return o[2]=r(o[2]+t,0,100),s(o)}function c(e,r,a){var n=o(e),i=o(r),s=Math.round(n[0]+(i[0]-n[0])*a),l=Math.round(n[1]+(i[1]-n[1])*a),c=Math.round(n[2]+(i[2]-n[2])*a);return"#"+t(s)+t(l)+t(c)}function d(e){var t=o(e),r=[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*r[0]+.7152*r[1]+.0722*r[2]}function _(e){return d(e)>.179?"#000":"#fff"}function b(e,t,r){if(void 0===r&&(r=.2),0===r)return e;var o=i(e),a=i(t)[0]-o[0];return a>180&&(a-=360),a<-180&&(a+=360),s([(o[0]+a*r+360)%360,o[1],o[2]])}function p(e){var t=o(e);return{base:e,hover:l(e,-10),active:l(e,-15),light:c(e,"#ffffff",.85),darkText:l(e,-40),border:c(e,"#ffffff",.6),focus:"rgba("+t[0]+","+t[1]+","+t[2]+",0.25)",textOn:_(e)}}function u(e){var t,o,a=i(e),n=a[0],l=a[1],c=a[2];return c>50?(t=r(100-c-10,8,40),o=r(.85*l,0,100)):(t=r(100-c+10,60,92),o=r(1.1*l,0,100)),s([n,o,t])}function m(e){var t=d(e.primary);return e.secondary&&(t=(t+d(e.secondary))/2),e.tertiary&&(t=(2*t+d(e.tertiary))/3),t>.179}function f(e){var t={};t.primary=u(e.primary),t.secondary=u(e.secondary),t.tertiary=e.tertiary?u(e.tertiary):t.primary;var r=i(e.primary),o=r[0];m(e)?(t.light=s([o,Math.min(r[1],15),15]),t.dark=s([o,5,88])):(t.light=s([o,Math.min(r[1],10),96]),t.dark=s([o,10,18]));for(var a=void 0!==e.harmonize?e.harmonize:.2,n={success:"#198754",danger:"#dc3545",warning:"#f0ad4e",info:"#17a2b8"},l=["success","danger","warning","info"],c=0;c<l.length;c++){var d=l[c],_=b(e[d]||n[d],e.primary,a);t[d]=u(_)}return t.harmonize=0,t}function w(e){var t=void 0!==e.harmonize?e.harmonize:.2,r=e.primary,o=i(r)[0],a=b(e.success||"#198754",r,t),n=b(e.danger||"#dc3545",r,t),l=b(e.warning||"#f0ad4e",r,t),c=b(e.info||"#17a2b8",r,t),d=e.light||s([o,8,97]),_=e.dark||s([o,10,13]),u=e.background||s([o,6,98]),m=e.surface||s([o,8,96]);return{primary:p(e.primary),secondary:p(e.secondary),tertiary:p(e.tertiary),success:p(a),danger:p(n),warning:p(l),info:p(c),light:p(d),dark:p(_),background:u,surface:m}}
|
|
13
14
|
/**
|
|
14
15
|
* Bitwrench v2 Default Styles
|
|
15
16
|
*
|
|
@@ -32,7 +33,21 @@
|
|
|
32
33
|
* @module bitwrench-styles
|
|
33
34
|
* @license BSD-2-Clause
|
|
34
35
|
* @author M A Chatterjee <deftio [at] deftio [dot] com>
|
|
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
|
+
*/var h="0.25rem",g="0.5rem",v="0.75rem",y="1rem",x="1.5rem",k="2rem",C={compact:{btn:h+" "+v,card:v+" "+y,alert:g+" "+y,cell:g+" "+v,input:h+" "+v},normal:{btn:g+" "+y,card:x+" "+x,alert:v+" "+x,cell:v+" "+y,input:g+" "+v},spacious:{btn:v+" "+x,card:k+" "+k,alert:y+" "+x,cell:y+" "+x,input:v+" "+y}},A={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"}},j={tight:1.125,normal:1.2,relaxed:1.25,dramatic:1.333};function S(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 $={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)"}},O={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)"}},z={primary:"#006666",secondary:"#6c757d",tertiary:"#006666",success:"#198754",danger:"#dc3545",warning:"#b38600",info:"#0891b2",light:"#f8f9fa",dark:"#212529"};function T(e,t){return e?t.includes(",")?t.split(",").map(function(t){return"."+e+" "+t.trim()}).join(", "):"."+e+" "+t:t}function L(e,t,r){return Object.assign({},function(e,t){var r={},o=t.background||"#f5f5f5",a={color:t.dark.base,"background-color":o};return r[T(e,"body")]=a,e&&(r["."+e]=a),r}(e,t),function(e,t,r){var o=r.motion,a={};return a[T(e,"a")]={color:t.primary.base,"text-decoration":"none",transition:"color "+o.fast+" "+o.easing},a[T(e,"a:hover")]={color:t.primary.hover,"text-decoration":"underline"},a}(e,t,r),function(e,t,r){var o={},a=r.spacing,n=r.radius;return o[T(e,".bw_btn")]={padding:a.btn,"border-radius":n.btn},o[T(e,".bw_btn:focus-visible")]={outline:"2px solid currentColor","outline-offset":"2px","box-shadow":"0 0 0 3px "+t.primary.focus},o[T(e,".bw_btn_lg")]={padding:"0.625rem 1.5rem","font-size":"1rem","border-radius":"50rem"===n.btn?"50rem":parseInt(n.btn)+2+"px"},o[T(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,n=r.radius;return o[T(e,".bw_alert")]={padding:a.alert,"border-radius":n.alert},o}(e,0,r),function(e,t,r){var o={},a=r.spacing,n=r.radius,i=r.elevation,s=r.motion;return o[T(e,".bw_card")]={"background-color":t.surface||"#fff",border:"1px solid "+t.light.border,"border-radius":n.card,"box-shadow":i.sm,transition:"box-shadow "+s.normal+" "+s.easing+", transform "+s.normal+" "+s.easing},o[T(e,".bw_card:hover")]={"box-shadow":i.md},o[T(e,".bw_card_hoverable:hover")]={"box-shadow":i.lg},o[T(e,".bw_card_body")]={padding:a.card},o[T(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[T(e,".bw_card_footer")]={"background-color":t.light.light,"border-top":"1px solid "+t.light.border,color:t.secondary.base},o[T(e,".bw_card_title")]={color:t.dark.base},o[T(e,".bw_card_subtitle")]={color:t.secondary.base},o}(e,t,r),function(e,t,r){var o={},a=r.spacing,n=r.radius;return o[T(e,".bw_form_control")]={padding:a.input,"border-radius":n.input,color:t.dark.base,"background-color":t.surface||"#fff","border-color":t.light.border},o[T(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},o[T(e,".bw_form_control::placeholder")]={color:t.secondary.base},o[T(e,".bw_form_label")]={color:t.dark.base},o[T(e,".bw_form_text")]={color:t.secondary.base},o[T(e,".bw_form_check_input:checked")]={"background-color":t.primary.base,"border-color":t.primary.base},o[T(e,".bw_form_check_input:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},o[T(e,".bw_form_control.bw_is_valid")]={"border-color":t.success.base},o[T(e,".bw_form_control.bw_is_valid:focus")]={"border-color":t.success.base,"box-shadow":"0 0 0 0.2rem "+t.success.focus},o[T(e,".bw_form_control.bw_is_invalid")]={"border-color":t.danger.base},o[T(e,".bw_form_control.bw_is_invalid:focus")]={"border-color":t.danger.base,"box-shadow":"0 0 0 0.2rem "+t.danger.focus},o[T(e,".bw_form_select")]={padding:a.input,"border-radius":n.input,color:t.dark.base,"background-color":t.surface||"#fff","border-color":t.light.border},o[T(e,".bw_form_select:focus")]={"border-color":t.primary.border,"box-shadow":"0 0 0 0.25rem "+t.primary.focus},o}(e,t,r),function(e,t){var r={};return r[T(e,".bw_navbar")]={"background-color":t.light.light,"border-bottom-color":t.light.border},r[T(e,".bw_navbar_brand")]={color:t.dark.base},r[T(e,".bw_navbar_nav .bw_nav_link")]={color:t.secondary.base},r[T(e,".bw_navbar_nav .bw_nav_link:hover")]={color:t.dark.base},r[T(e,".bw_navbar_nav .bw_nav_link.active")]={color:t.primary.base,"background-color":t.primary.focus},r[T(e,".bw_navbar_dark")]={"background-color":t.dark.base,"border-bottom-color":t.dark.hover},r[T(e,".bw_navbar_dark .bw_navbar_brand")]={color:t.light.base},r[T(e,".bw_navbar_dark .bw_nav_link")]={color:"rgba(255,255,255,.65)"},r[T(e,".bw_navbar_dark .bw_nav_link:hover")]={color:"#fff"},r[T(e,".bw_navbar_dark .bw_nav_link.active")]={color:"#fff","font-weight":"600"},r[T(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[T(e,".bw_table")]={color:t.dark.base,"border-color":t.light.border},o[T(e,".bw_table > :not(caption) > * > *")]={padding:a.cell,"border-bottom-color":t.light.border},o[T(e,".bw_table > thead > tr > *")]={color:t.secondary.base,"border-bottom-color":t.light.border,"background-color":t.light.light},o[T(e,".bw_table_striped > tbody > tr:nth-of-type(odd) > *")]={"background-color":"rgba(0, 0, 0, 0.05)"},o[T(e,".bw_table_hover > tbody > tr:hover > *")]={"background-color":t.primary.focus},o[T(e,".bw_table_bordered")]={"border-color":t.light.border},o[T(e,".bw_table caption")]={color:t.secondary.base},o}(e,t,r),function(e,t){var r={};return r[T(e,".bw_nav_tabs")]={"border-bottom-color":t.light.border},r[T(e,".bw_nav_link")]={color:t.secondary.base},r[T(e,".bw_nav_tabs .bw_nav_link:hover")]={color:t.dark.base,"border-bottom-color":t.light.border},r[T(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[T(e,".bw_list_group_item")]={padding:a.cell,color:t.dark.base,"background-color":t.surface||"#fff","border-color":t.light.border},o[T(e,"a.bw_list_group_item:hover")]={"background-color":t.light.light,color:t.dark.hover},o[T(e,".bw_list_group_item.active")]={color:t.primary.textOn,"background-color":t.primary.base,"border-color":t.primary.base},o[T(e,".bw_list_group_item.disabled")]={color:t.secondary.base,"background-color":t.surface||"#fff"},o}(e,t,r),function(e,t){var r={};return r[T(e,".bw_page_link")]={color:t.primary.base,"background-color":t.surface||"#fff","border-color":t.light.border},r[T(e,".bw_page_link:hover")]={color:t.primary.hover,"background-color":t.light.light,"border-color":t.light.border},r[T(e,".bw_page_link:focus")]={outline:"2px solid "+t.primary.base,"outline-offset":"-2px"},r[T(e,".bw_page_item.bw_active .bw_page_link")]={color:t.primary.textOn,"background-color":t.primary.base,"border-color":t.primary.base},r[T(e,".bw_page_item.bw_disabled .bw_page_link")]={color:t.secondary.base,"background-color":t.surface||"#fff","border-color":t.light.border},r}(e,t),function(e,t){var r={};return r[T(e,".bw_progress")]={"background-color":t.light.light,"box-shadow":"inset 0 1px 2px rgba(0,0,0,.1)"},r[T(e,".bw_progress_bar")]={color:"#fff","background-color":t.primary.base,"box-shadow":"inset 0 -1px 0 rgba(0,0,0,.15)"},r}(e,t),function(e,t){var r={};return r[T(e,".bw_breadcrumb_item + .bw_breadcrumb_item::before")]={color:t.secondary.base},r[T(e,".bw_breadcrumb_item.active")]={color:t.secondary.base},r[T(e,".bw_breadcrumb_item a:hover")]={color:t.primary.hover,"text-decoration":"underline"},r}(e,t),function(e,t){var r={};return r[T(e,".bw_close")]={color:t.dark.base,opacity:"0.5"},r[T(e,".bw_close:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},r}(e,t),function(e,t){var r={};return r[T(e,".bw_section_subtitle")]={color:t.secondary.base},r[T(e,".bw_feature_description")]={color:t.secondary.base},r[T(e,".bw_cta_description")]={color:t.secondary.base},r}(e,t),function(e,t){var r={};return r[T(e,".bw_accordion_item")]={"background-color":t.surface||"#fff","border-color":t.light.border},r[T(e,".bw_accordion_button")]={color:t.dark.base},r[T(e,".bw_accordion_button:not(.bw_collapsed)")]={color:t.primary.darkText,"background-color":t.primary.light},r[T(e,".bw_accordion_button:hover")]={"background-color":t.light.light},r[T(e,".bw_accordion_button:not(.bw_collapsed):hover")]={"background-color":t.primary.hover},r[T(e,".bw_accordion_button:focus-visible")]={"box-shadow":"0 0 0 0.2rem "+t.primary.focus},r[T(e,".bw_accordion_body")]={"border-top":"1px solid "+t.light.border},r}(e,t),function(e,t){var r={};return r[T(e,".bw_carousel")]={"background-color":t.light.light},r[T(e,".bw_carousel_indicator.active")]={"background-color":t.primary.base},r[T(e,".bw_carousel_control")]={"background-color":"rgba(0,0,0,0.4)",color:"#fff"},r[T(e,".bw_carousel_control:hover")]={"background-color":"rgba(0,0,0,0.6)"},r[T(e,".bw_carousel_caption")]={background:"linear-gradient(transparent, rgba(0,0,0,0.6))",color:"#fff"},r}(e,t),function(e,t,r){var o={};return o[T(e,".bw_modal_content")]={"background-color":t.surface||"#fff","border-color":t.light.border,"box-shadow":r.elevation.lg},o[T(e,".bw_modal_header")]={"border-bottom-color":t.light.border},o[T(e,".bw_modal_footer")]={"border-top-color":t.light.border},o[T(e,".bw_modal_title")]={color:t.dark.base},o}(e,t,r),function(e,t,r){var o={};return o[T(e,".bw_toast")]={"background-color":t.surface||"#fff","border-color":"rgba(0,0,0,0.1)","box-shadow":r.elevation.lg},o[T(e,".bw_toast_header")]={"border-bottom-color":"rgba(0,0,0,0.05)"},o}(e,t,r),function(e,t,r){var o={};return o[T(e,".bw_dropdown_menu")]={"background-color":t.surface||"#fff","border-color":t.light.border,"box-shadow":r.elevation.md},o[T(e,".bw_dropdown_item")]={color:t.dark.base},o[T(e,".bw_dropdown_item:hover")]={color:t.dark.hover,"background-color":t.light.light},o[T(e,".bw_dropdown_item.disabled")]={color:t.secondary.base},o[T(e,".bw_dropdown_divider")]={"border-top-color":t.light.border},o}(e,t,r),function(e,t){var r={};return r[T(e,".bw_form_switch .bw_switch_input")]={"background-color":t.secondary.base,"border-color":t.secondary.base},r[T(e,".bw_form_switch .bw_switch_input:checked")]={"background-color":t.primary.base,"border-color":t.primary.base},r[T(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[T(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 r[T(e,".bw_stat_change_up")]={color:t.success.base},r[T(e,".bw_stat_change_down")]={color:t.danger.base},r}(e,t),function(e,t){var r={};return r[T(e,".bw_timeline::before")]={"background-color":t.light.border},r[T(e,".bw_timeline_date")]={color:t.secondary.base},r}(e,t),function(e,t){var r={};return r[T(e,".bw_step_indicator")]={"background-color":t.light.light,border:"2px solid "+t.light.border,color:t.secondary.base},r[T(e,".bw_step + .bw_step::before")]={"background-color":t.light.border},r[T(e,".bw_step_active .bw_step_indicator")]={"background-color":t.primary.base,color:t.primary.textOn},r[T(e,".bw_step_active .bw_step_label")]={color:t.dark.base,"font-weight":"600"},r[T(e,".bw_step_completed .bw_step_indicator")]={"background-color":t.primary.base,color:t.primary.textOn},r[T(e,".bw_step_completed .bw_step_label")]={color:t.primary.base},r[T(e,".bw_step_completed + .bw_step::before")]={"background-color":t.primary.base},r}(e,t),function(e,t){var r={};return r[T(e,".bw_chip_input")]={"border-color":t.light.border},r[T(e,".bw_chip_input:focus-within")]={"border-color":t.primary.base,"box-shadow":"0 0 0 0.2rem "+t.primary.focus},r[T(e,".bw_chip")]={"background-color":t.light.light,color:t.dark.base},r[T(e,".bw_chip_remove:hover")]={color:t.danger.base,"background-color":t.danger.light},r}(e,t),function(e,t){var r={};return r[T(e,".bw_file_upload")]={"border-color":t.light.border,"background-color":t.light.light},r[T(e,".bw_file_upload:hover")]={"border-color":t.primary.base,"background-color":t.primary.light},r[T(e,".bw_file_upload:focus")]={outline:"2px solid "+t.primary.base,"outline-offset":"2px"},r[T(e,".bw_file_upload.bw_file_upload_active")]={"border-color":t.primary.base,"background-color":t.primary.light,"border-style":"solid"},r}(e,t),function(e,t){var r={};return r[T(e,".bw_range")]={"background-color":t.light.border},r[T(e,".bw_range::-webkit-slider-thumb")]={"background-color":t.primary.base,"border-color":"#fff","box-shadow":"0 1px 3px rgba(0,0,0,0.2)",transition:"background-color 0.15s ease-out, transform 0.15s ease-out"},r[T(e,".bw_range::-moz-range-thumb")]={"background-color":t.primary.base,"border-color":"#fff","box-shadow":"0 1px 3px rgba(0,0,0,0.2)"},r}(e,t),function(e,t){var r={};return r[T(e,".bw_search_clear:hover")]={color:t.dark.base},r}(e,t),function(e,t){var r={};return r[T(e,".bw_code_copy_btn_copied")]={background:t.success.base,color:t.success.textOn,"border-color":t.success.base},r[T(e,".bw_copy_btn:hover")]={background:"rgba(255,255,255,0.2)",color:"#fff"},r}(e,t),function(e,t,r){var o={},a=r.radius;return o[T(e,".bw_nav_pills .bw_nav_link")]={"border-radius":a.btn},o}(e,0,r),function(e,t){var r={};return Object.keys(t).forEach(function(o){if("object"==typeof t[o]){var a=t[o];r[T(e,".bw_"+o)]={"background-color":a.base,color:a.textOn,"border-color":a.base},r[T(e,".bw_"+o+":hover")]={"background-color":a.hover,"border-color":a.active},r[T(e,".bw_"+o+":active")]={"background-color":a.active},r[T(e,".bw_"+o+":focus-visible")]={"box-shadow":"0 0 0 3px "+a.focus,outline:"none"},r[T(e,".bw_alert.bw_"+o)]={"background-color":a.light,color:a.darkText,"border-color":a.border},r[T(e,".bw_toast.bw_"+o)]={"background-color":"inherit",color:"inherit","border-left":"4px solid "+a.base},r[T(e,".bw_stat_card.bw_"+o)]={"background-color":"inherit",color:"inherit","border-left-color":a.base},r[T(e,".bw_card.bw_"+o)]={"background-color":"inherit",color:"inherit","border-left":"4px solid "+a.base},r[T(e,".bw_timeline_marker.bw_"+o)]={"box-shadow":"0 0 0 2px "+a.base},r[T(e,".bw_spinner_border.bw_"+o+",\n"+T(e,".bw_spinner_grow.bw_"+o))]={"background-color":"transparent",color:a.base,"border-color":"currentColor"},r[T(e,".bw_btn_outline.bw_"+o)]={"background-color":"transparent",color:a.base,"border-color":a.base},r[T(e,".bw_btn_outline.bw_"+o+":hover")]={"background-color":a.base,color:a.textOn},r[T(e,".bw_hero.bw_"+o)]={background:"linear-gradient(135deg, "+a.base+" 0%, "+a.hover+" 100%)",color:a.textOn},r[T(e,".bw_progress_bar.bw_"+o)]={color:"#fff"}}}),r[T(e,".bw_text_muted")]={color:t.secondary.base},r}(e,t))}var E={base:{"*":{"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"}},typography:{"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"},".bw_display_4":{"font-size":"calc(1.475rem + 2.7vw)","font-weight":"300","line-height":"1.2"},".bw_lead":{"font-size":"1.25rem","font-weight":"300"},".bw_h5":{"font-size":"1.25rem"},".bw_h6":{"font-size":"1rem"}},grid:{".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":"0.75rem","padding-left":"0.75rem","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-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%"}},buttons:{".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","font-size":"0.875rem","font-family":"inherit",gap:"0.5rem"},".bw_btn:hover":{"text-decoration":"none",transform:"translateY(-1px)"},".bw_btn:active":{transform:"translateY(0)"},".bw_btn:focus-visible":{outline:"2px solid currentColor","outline-offset":"2px"},".bw_btn:disabled":{opacity:"0.5",cursor:"not-allowed","pointer-events":"none"},".bw_btn_block":{display:"block",width:"100%"}},cards:{".bw_card":{position:"relative",display:"flex","flex-direction":"column","min-width":"0",height:"100%","word-wrap":"break-word","background-clip":"border-box","margin-bottom":"1.5rem",overflow:"hidden"},".bw_card_body":{flex:"1 1 auto"},".bw_card_body > *:last-child":{"margin-bottom":"0"},".bw_card_title":{"margin-bottom":"0.5rem","font-size":"1.125rem","font-weight":"600","line-height":"1.3"},".bw_card_text":{"margin-bottom":"0","font-size":"0.9375rem","line-height":"1.6"},".bw_card_header":{"margin-bottom":"0","font-weight":"600","font-size":"0.875rem"},".bw_card_footer":{"font-size":"0.875rem"},".bw_card_hoverable":{transition:"all 0.3s ease-out"},".bw_card_hoverable:hover":{transform:"translateY(-4px)"},".bw_card_img_top":{width:"100%"},".bw_card_img_bottom":{width:"100%"},".bw_card_img_left":{width:"40%","object-fit":"cover"},".bw_card_img_right":{width:"40%","object-fit":"cover"},".bw_card_subtitle, .card-subtitle":{"margin-top":"-0.25rem","margin-bottom":"0.5rem","font-size":"0.875rem"}},forms:{".bw_form_control":{display:"block",width:"100%","font-size":"0.9375rem","font-weight":"400","line-height":"1.5","background-clip":"padding-box",appearance:"none",border:"1px solid transparent","font-family":"inherit"},".bw_form_control:focus":{outline:"2px solid currentColor","outline-offset":"-1px"},".bw_form_control::placeholder":{opacity:"1"},".bw_form_label":{display:"block","margin-bottom":"0.375rem","font-size":"0.875rem","font-weight":"600"},".bw_form_group":{"margin-bottom":"1.25rem"},".bw_form_text":{"margin-top":"0.25rem","font-size":"0.8125rem"},"select.bw_form_control":{"padding-right":"2.25rem","background-image":"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e\")","background-repeat":"no-repeat","background-position":"right 0.75rem center","background-size":"16px 12px"},"textarea.bw_form_control":{"min-height":"5rem",resize:"vertical"},".bw_valid_feedback":{display:"block","font-size":"0.875rem","margin-top":"0.25rem"},".bw_invalid_feedback":{display:"block","font-size":"0.875rem","margin-top":"0.25rem"}},formChecks:{".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"}},navigation:{".bw_navbar":{position:"relative",display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"space-between",padding:"0.5rem 1.5rem"},".bw_navbar > .bw_container, .bw_navbar > .container":{display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"space-between"},".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"},".bw_navbar_nav":{display:"flex","flex-direction":"row","padding-left":"0","margin-bottom":"0","list-style":"none",gap:"0.25rem"},".bw_navbar_nav .bw_nav_link":{display:"block","text-decoration":"none","font-size":"0.875rem","font-weight":"500"}},tables:{".bw_table":{width:"100%","margin-bottom":"1.5rem","vertical-align":"top","border-collapse":"collapse","font-size":"0.9375rem","line-height":"1.5"},".bw_table > :not(caption) > * > *":{"background-color":"transparent","border-bottom-width":"1px","border-bottom-style":"solid"},".bw_table > tbody":{"vertical-align":"inherit"},".bw_table > thead":{"vertical-align":"bottom"},".bw_table > thead > tr > *":{"font-size":"0.8125rem","font-weight":"600","text-transform":"uppercase","letter-spacing":"0.04em","border-bottom-width":"2px"},".bw_table caption":{"font-size":"0.875rem","caption-side":"bottom"},".bw_table_bordered > :not(caption) > * > *":{"border-width":"1px","border-style":"solid"},".bw_table_responsive":{"overflow-x":"auto","-webkit-overflow-scrolling":"touch"}},alerts:{".bw_alert":{position:"relative","margin-bottom":"1rem",border:"1px solid transparent","font-size":"0.9375rem","line-height":"1.6"},".bw_alert_heading, .alert-heading":{color:"inherit"},".bw_alert_link, .alert-link":{"font-weight":"700"},".bw_alert_dismissible":{"padding-right":"3rem"},".bw_alert_dismissible .btn-close":{position:"absolute",top:"0",right:"0","z-index":"2",padding:"1.25rem 1rem"}},badges:{".bw_badge":{display:"inline-block","font-size":"0.875rem","font-weight":"600","line-height":"1.3","text-align":"center","white-space":"nowrap","vertical-align":"baseline",padding:"0.35rem 0.65rem","border-radius":"0.25rem"},".bw_badge:empty":{display:"none"},".bw_badge_sm":{"font-size":"0.75rem",padding:"0.25rem 0.5rem"},".bw_badge_lg":{"font-size":"1rem",padding:"0.5rem 0.875rem"},".bw_badge_pill":{"border-radius":"50rem"},".btn .badge":{position:"relative",top:"-1px"}},progress:{".bw_progress":{display:"flex",height:"1.25rem",overflow:"hidden","font-size":".875rem"},".bw_progress_bar":{display:"flex","flex-direction":"column","justify-content":"center",overflow:"hidden","text-align":"center","white-space":"nowrap","font-weight":"600"},".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"},".bw_progress_bar_animated":{animation:"progress-bar-stripes 1s linear infinite"},"@keyframes progress-bar-stripes":{"0%":{"background-position-x":"1rem"}}},tabs:{".bw_nav":{display:"flex","flex-wrap":"wrap","padding-left":"0","margin-bottom":"0","list-style":"none",gap:"0"},".bw_nav_item":{display:"block"},".bw_nav_tabs .bw_nav_item":{"margin-bottom":"-2px"},".bw_nav_link":{display:"block","font-size":"0.875rem","font-weight":"500","text-decoration":"none",cursor:"pointer",border:"none",background:"transparent","font-family":"inherit"},".bw_nav_tabs .bw_nav_link":{border:"none","border-bottom":"2px solid transparent","border-radius":"0","background-color":"transparent"},".bw_nav_vertical":{"flex-direction":"column"},".bw_tab_content":{padding:"1.25rem 0"},".bw_tab_pane":{display:"none"},".bw_tab_pane.active":{display:"block"},".bw_nav_scrollable":{"flex-wrap":"nowrap","overflow-x":"auto","-webkit-overflow-scrolling":"touch","scrollbar-width":"none"},".bw_nav_scrollable::-webkit-scrollbar":{display:"none"},".bw_nav_scrollable .bw_nav_link":{"white-space":"nowrap"}},listGroups:{".bw_list_group":{display:"flex","flex-direction":"column","padding-left":"0","margin-bottom":"0"},".bw_list_group_item":{position:"relative",display:"block","text-decoration":"none","font-size":"0.9375rem"},".bw_list_group_item:first-child":{"border-top-left-radius":"inherit","border-top-right-radius":"inherit"},".bw_list_group_item:last-child":{"border-bottom-right-radius":"inherit","border-bottom-left-radius":"inherit"},".bw_list_group_item + .bw_list_group_item":{"border-top-width":"0"},".bw_list_group_item.disabled":{"pointer-events":"none"},"a.bw_list_group_item":{cursor:"pointer"},"a.bw_list_group_item:focus-visible, .bw_list_group_item:focus-visible":{"z-index":"2",outline:"2px solid currentColor","outline-offset":"-2px"},".bw_list_group_flush":{"border-radius":"0"},".bw_list_group_flush > .bw_list_group_item":{"border-width":"0 0 1px","border-radius":"0"},".bw_list_group_flush > .bw_list_group_item:last-child":{"border-bottom-width":"0"}},pagination:{".bw_pagination":{display:"flex","padding-left":"0","list-style":"none","margin-bottom":"0"},".bw_page_item":{display:"list-item","list-style":"none"},".bw_page_link":{position:"relative",display:"block",padding:"0.375rem 0.75rem","margin-left":"-1px","line-height":"1.25","text-decoration":"none"},".bw_page_item:first-child .bw_page_link":{"margin-left":"0","border-top-left-radius":"0.375rem","border-bottom-left-radius":"0.375rem"},".bw_page_item:last-child .bw_page_link":{"border-top-right-radius":"0.375rem","border-bottom-right-radius":"0.375rem"},".bw_page_link:focus-visible":{"z-index":"3",outline:"2px solid currentColor","outline-offset":"-2px"}},breadcrumb:{".bw_breadcrumb":{display:"flex","flex-wrap":"wrap",padding:"0 0","margin-bottom":"1rem","list-style":"none"},".bw_breadcrumb_item":{display:"flex"},".bw_breadcrumb_item + .bw_breadcrumb_item":{"padding-left":"0.5rem"},".bw_breadcrumb_item + .bw_breadcrumb_item::before":{float:"left","padding-right":"0.5rem",content:'"/"'},".bw_breadcrumb_item a":{"text-decoration":"none"},".bw_breadcrumb_item.active":{"font-weight":"500"}},hero:{".bw_hero":{position:"relative",overflow:"hidden"},".bw_hero_overlay":{position:"absolute",top:"0",left:"0",right:"0",bottom:"0","z-index":"1"},".bw_hero_content":{position:"relative","z-index":"2"},".bw_hero_title":{"font-weight":"300","letter-spacing":"-0.05rem",color:"inherit"},".bw_hero_subtitle":{color:"inherit"},".bw_hero_actions":{display:"flex",gap:"1rem","justify-content":"center","flex-wrap":"wrap"}},features:{".bw_feature":{padding:"1rem"},".bw_feature_icon":{display:"inline-block","margin-bottom":"1rem"},".bw_feature_title":{"margin-bottom":"0.5rem"},".bw_feature_grid":{width:"100%"},".bw_g_4":{"--bw_gutter_x":"1.5rem","--bw_gutter_y":"1.5rem"}},sections:{".bw_section":{position:"relative"},".bw_section_header":{"margin-bottom":"3rem"},".bw_section_title":{"margin-bottom":"1rem","font-weight":"300","font-size":"calc(1.325rem + .9vw)"}},cta:{".bw_cta":{position:"relative"},".bw_cta_content":{"max-width":"48rem",margin:"0 auto"},".bw_cta_title":{"font-weight":"300"},".bw_cta_actions":{display:"flex",gap:"1rem","justify-content":"center","flex-wrap":"wrap"}},spinner:{".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"},".bw_spinner_border_sm":{width:"1rem",height:"1rem","border-width":"0.2em"},".bw_spinner_border_lg":{width:"3rem",height:"3rem","border-width":"0.3em"},".bw_spinner_border_md":{},".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"},".bw_spinner_grow_sm":{width:"1rem",height:"1rem"},".bw_spinner_grow_lg":{width:"3rem",height:"3rem"},".bw_spinner_grow_md":{},"@keyframes bw_spinner_border":{"100%":{transform:"rotate(360deg)"}},"@keyframes bw_spinner_grow":{"0%":{transform:"scale(0)"},"50%":{opacity:"1",transform:"none"}},".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"}},closeButton:{".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"},".bw_close:hover":{opacity:"0.75"}},stacks:{".bw_vstack":{display:"flex","flex-direction":"column"},".bw_hstack":{display:"flex","flex-direction":"row","align-items":"center"},".bw_gap_0":{gap:"0"},".bw_gap_1":{gap:"0.25rem"},".bw_gap_2":{gap:"0.5rem"},".bw_gap_3":{gap:"1rem"},".bw_gap_4":{gap:"1.5rem"},".bw_gap_5":{gap:"3rem"}},offsets:{".bw_offset_1":{"margin-left":"8.333333%"},".bw_offset_2":{"margin-left":"16.666667%"},".bw_offset_3":{"margin-left":"25%"},".bw_offset_4":{"margin-left":"33.333333%"},".bw_offset_5":{"margin-left":"41.666667%"},".bw_offset_6":{"margin-left":"50%"},".bw_offset_7":{"margin-left":"58.333333%"},".bw_offset_8":{"margin-left":"66.666667%"},".bw_offset_9":{"margin-left":"75%"},".bw_offset_10":{"margin-left":"83.333333%"},".bw_offset_11":{"margin-left":"91.666667%"}},codeDemo:{".bw_code_demo":{"margin-bottom":"2rem"},".bw_code_pre":{margin:"0",border:"none","overflow-x":"auto","max-width":"100%"},".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"},".bw_code_copy_btn":{position:"absolute",top:"0.5rem",right:"0.5rem",padding:"0.25rem 0.625rem","font-size":"0.6875rem",cursor:"pointer","font-family":"inherit"},".bw_copy_btn":{position:"absolute",top:"0.5rem",right:"0.5rem",padding:"0.25rem 0.625rem","font-size":"0.6875rem",cursor:"pointer","font-family":"inherit"}},buttonGroup:{".bw_btn_group, .bw_btn_group_vertical":{position:"relative",display:"inline-flex","vertical-align":"middle"},".bw_btn_group > .bw_btn, .bw_btn_group_vertical > .bw_btn":{position:"relative",flex:"1 1 auto","border-radius":"0","margin-left":"-1px"},".bw_btn_group > .bw_btn:first-child":{"margin-left":"0"},".bw_btn_group > .bw_btn:last-child":{},".bw_btn_group_lg > .bw_btn":{padding:"0.625rem 1.5rem","font-size":"1rem"},".bw_btn_group_sm > .bw_btn":{padding:"0.25rem 0.75rem","font-size":"0.8125rem"},".bw_btn_group_vertical":{"flex-direction":"column","align-items":"flex-start","justify-content":"center"},".bw_btn_group_vertical > .bw_btn":{width:"100%","margin-left":"0","margin-top":"-1px"},".bw_btn_group_vertical > .bw_btn:first-child":{"margin-top":"0"},".bw_btn_group_vertical > .bw_btn:last-child":{}},accordion:{".bw_accordion":{overflow:"hidden"},".bw_accordion_item":{border:"1px solid transparent"},".bw_accordion_item + .bw_accordion_item":{"border-top":"0"},".bw_accordion_header":{margin:"0"},".bw_accordion_button":{position:"relative",display:"flex","align-items":"center",width:"100%","font-size":"1rem","font-weight":"500","text-align":"left","background-color":"transparent",border:"0","overflow-anchor":"none",cursor:"pointer","font-family":"inherit"},".bw_accordion_button::after":{"flex-shrink":"0",width:"1.25rem",height:"1.25rem","margin-left":"auto",content:'""',"background-image":"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e\")","background-repeat":"no-repeat","background-size":"1.25rem"},".bw_accordion_button:not(.bw_collapsed)::after":{transform:"rotate(-180deg)"},".bw_accordion_collapse":{"max-height":"0",overflow:"hidden"},".bw_accordion_collapse.bw_collapse_show":{"max-height":"none"},".bw_accordion_item:first-child":{"border-top-left-radius":"8px","border-top-right-radius":"8px"},".bw_accordion_item:last-child":{"border-bottom-left-radius":"8px","border-bottom-right-radius":"8px"}},carousel:{".bw_carousel":{position:"relative",overflow:"hidden"},".bw_carousel_track":{display:"flex",height:"100%"},".bw_carousel_slide":{"min-width":"100%","flex-shrink":"0",overflow:"hidden",position:"relative",display:"flex","align-items":"center","justify-content":"center"},".bw_carousel_slide img":{width:"100%",height:"100%","object-fit":"cover"},".bw_carousel_caption":{position:"absolute",bottom:"0",left:"0",right:"0",padding:"0.75rem 1rem","font-size":"0.875rem"},".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"},".bw_carousel_control img":{width:"20px",height:"20px","pointer-events":"none"},".bw_carousel_control_prev":{left:"10px"},".bw_carousel_control_next":{right:"10px"},".bw_carousel_indicators":{position:"absolute",bottom:"12px",left:"50%",transform:"translateX(-50%)",display:"flex",gap:"6px","z-index":"2"},".bw_carousel_indicator":{width:"10px",height:"10px","border-radius":"50%",border:"2px solid transparent",padding:"0",cursor:"pointer"},".bw_carousel_indicator:hover":{opacity:"0.8"}},modal:{".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"},".bw_modal.bw_modal_show":{opacity:"1",visibility:"visible","pointer-events":"auto"},".bw_modal_dialog":{position:"relative",width:"calc(100% - 1rem)","max-width":"500px",margin:"1.75rem auto","pointer-events":"none"},".bw_modal.bw_modal_show .bw_modal_dialog":{transform:"translateY(0)"},".bw_modal_sm":{"max-width":"300px"},".bw_modal_lg":{"max-width":"800px"},".bw_modal_xl":{"max-width":"1140px"},".bw_modal_content":{position:"relative",display:"flex","flex-direction":"column","pointer-events":"auto","background-clip":"padding-box",border:"1px solid transparent",outline:"0"},".bw_modal_header":{display:"flex","align-items":"center","justify-content":"space-between"},".bw_modal_title":{margin:"0","font-size":"1.25rem","font-weight":"600","line-height":"1.3"},".bw_modal_body":{position:"relative",flex:"1 1 auto"},".bw_modal_footer":{display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"flex-end",gap:"0.5rem"}},toast:{".bw_toast_container":{position:"fixed","z-index":"1080","pointer-events":"none",display:"flex","flex-direction":"column",gap:"0.5rem",padding:"1rem"},".bw_toast_container.bw_toast_top_right":{top:"0",right:"0"},".bw_toast_container.bw_toast_top_left":{top:"0",left:"0"},".bw_toast_container.bw_toast_bottom_right":{bottom:"0",right:"0"},".bw_toast_container.bw_toast_bottom_left":{bottom:"0",left:"0"},".bw_toast_container.bw_toast_top_center":{top:"0",left:"50%",transform:"translateX(-50%)"},".bw_toast_container.bw_toast_bottom_center":{bottom:"0",left:"50%",transform:"translateX(-50%)"},".bw_toast":{"pointer-events":"auto",width:"350px","max-width":"calc(100vw - 2rem)","background-clip":"padding-box",opacity:"0"},".bw_toast.bw_toast_show":{opacity:"1",transform:"translateY(0)"},".bw_toast.bw_toast_hiding":{opacity:"0"},".bw_toast_header":{display:"flex","align-items":"center","justify-content":"space-between","font-size":"0.875rem"},".bw_toast_body":{"font-size":"0.9375rem"}},dropdown:{".bw_dropdown":{position:"relative",display:"inline-block"},".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"},".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",opacity:"0",visibility:"hidden","pointer-events":"none"},".bw_dropdown_menu.bw_dropdown_show":{opacity:"1",visibility:"visible","pointer-events":"auto"},".bw_dropdown_menu_end":{left:"auto",right:"0"},".bw_dropdown_item":{display:"block",width:"100%",clear:"both","font-weight":"400","text-align":"inherit","text-decoration":"none","white-space":"nowrap","background-color":"transparent",border:"0","font-size":"0.9375rem"},".bw_dropdown_item:focus-visible":{outline:"2px solid currentColor","outline-offset":"-2px"},".bw_dropdown_divider":{height:"0",margin:"0.5rem 0",overflow:"hidden",opacity:"1"}},formSwitch:{".bw_form_switch":{"padding-left":"2.5em"},".bw_form_switch .bw_switch_input":{width:"2em",height:"1.125em","margin-left":"-2.5em","border-radius":"2em",appearance:"none","background-image":"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(255,255,255,1)'/%3e%3c/svg%3e\")","background-position":"left center","background-repeat":"no-repeat","background-size":"contain",cursor:"pointer"},".bw_form_switch .bw_switch_input:checked":{"background-position":"right center"},".bw_form_switch .bw_switch_input:disabled":{opacity:"0.5",cursor:"not-allowed"}},skeleton:{".bw_skeleton":{"background-size":"400% 100%",animation:"bw_skeleton_shimmer 1.4s ease infinite"},".bw_skeleton_text":{height:"1em","margin-bottom":"0.5rem"},".bw_skeleton_circle":{"border-radius":"50%"},".bw_skeleton_rect":{},".bw_skeleton_group":{display:"flex","flex-direction":"column"},"@keyframes bw_skeleton_shimmer":{"0%":{"background-position":"100% 50%"},"100%":{"background-position":"0 50%"}}},avatar:{".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"},".bw_avatar_sm":{width:"2rem",height:"2rem","font-size":"0.75rem"},".bw_avatar_md":{width:"3rem",height:"3rem","font-size":"1rem"},".bw_avatar_lg":{width:"4rem",height:"4rem","font-size":"1.25rem"},".bw_avatar_xl":{width:"5rem",height:"5rem","font-size":"1.5rem"}},statCard:{".bw_stat_card":{"border-left":"4px solid transparent"},".bw_stat_card:hover":{transform:"translateY(-1px)"},".bw_stat_icon":{"font-size":"1.5rem","margin-bottom":"0.5rem"},".bw_stat_value":{"font-size":"2rem","font-weight":"700","line-height":"1.2"},".bw_stat_label":{"font-size":"0.875rem","margin-top":"0.25rem"},".bw_stat_change":{"font-size":"0.875rem","font-weight":"500","margin-top":"0.5rem"}},tooltip:{".bw_tooltip_wrapper":{position:"relative",display:"inline-block"},".bw_tooltip":{position:"absolute","z-index":"999","font-size":"0.875rem","white-space":"nowrap","max-width":"min(300px, calc(100vw - 1rem))","pointer-events":"none",opacity:"0",visibility:"hidden"},".bw_tooltip.bw_tooltip_show":{opacity:"1",visibility:"visible"},".bw_tooltip_top":{bottom:"100%",left:"50%",transform:"translateX(-50%) translateY(-4px)","margin-bottom":"4px"},".bw_tooltip_top.bw_tooltip_show":{transform:"translateX(-50%) translateY(0)"},".bw_tooltip_bottom":{top:"100%",left:"50%",transform:"translateX(-50%) translateY(4px)","margin-top":"4px"},".bw_tooltip_bottom.bw_tooltip_show":{transform:"translateX(-50%) translateY(0)"},".bw_tooltip_left":{right:"100%",top:"50%",transform:"translateY(-50%) translateX(-4px)","margin-right":"4px"},".bw_tooltip_left.bw_tooltip_show":{transform:"translateY(-50%) translateX(0)"},".bw_tooltip_right":{left:"100%",top:"50%",transform:"translateY(-50%) translateX(4px)","margin-left":"4px"},".bw_tooltip_right.bw_tooltip_show":{transform:"translateY(-50%) translateX(0)"}},popover:{".bw_popover_wrapper":{position:"relative",display:"inline-block"},".bw_popover_trigger":{cursor:"pointer"},".bw_popover":{position:"absolute","z-index":"1000","min-width":"200px","max-width":"min(320px, calc(100vw - 2rem))","pointer-events":"none",opacity:"0",visibility:"hidden"},".bw_popover.bw_popover_show":{opacity:"1",visibility:"visible","pointer-events":"auto"},".bw_popover_header":{"font-weight":"600","font-size":"0.9375rem"},".bw_popover_body":{"font-size":"0.875rem","line-height":"1.5"},".bw_popover_top":{bottom:"100%",left:"50%",transform:"translateX(-50%) translateY(-8px)","margin-bottom":"8px"},".bw_popover_top.bw_popover_show":{transform:"translateX(-50%) translateY(0)"},".bw_popover_bottom":{top:"100%",left:"50%",transform:"translateX(-50%) translateY(8px)","margin-top":"8px"},".bw_popover_bottom.bw_popover_show":{transform:"translateX(-50%) translateY(0)"},".bw_popover_left":{right:"100%",top:"50%",transform:"translateY(-50%) translateX(-8px)","margin-right":"8px"},".bw_popover_left.bw_popover_show":{transform:"translateY(-50%) translateX(0)"},".bw_popover_right":{left:"100%",top:"50%",transform:"translateY(-50%) translateX(8px)","margin-left":"8px"},".bw_popover_right.bw_popover_show":{transform:"translateY(-50%) translateX(0)"}},searchInput:{".bw_search_input":{position:"relative",display:"flex","align-items":"center"},".bw_search_input .bw_search_field":{"padding-right":"2.5rem"},".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%"}},range:{".bw_range_wrapper":{"margin-bottom":"1rem"},".bw_range_label":{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"0.5rem","font-size":"0.875rem","font-weight":"500"},".bw_range_value":{"font-weight":"600"},".bw_range":{width:"100%",height:"0.5rem",padding:"0",appearance:"none",border:"none","border-radius":"0.25rem",cursor:"pointer",outline:"none"},".bw_range:focus":{outline:"none"},".bw_range::-webkit-slider-thumb":{appearance:"none",width:"1.25rem",height:"1.25rem","border-radius":"50%","border-width":"2px","border-style":"solid",cursor:"pointer"},".bw_range::-moz-range-thumb":{width:"1.25rem",height:"1.25rem","border-radius":"50%","border-width":"2px","border-style":"solid",cursor:"pointer"},".bw_range::-webkit-slider-thumb:hover":{transform:"scale(1.15)"},".bw_range:disabled":{opacity:"0.5",cursor:"not-allowed"}},mediaObject:{".bw_media":{display:"flex","align-items":"flex-start",gap:"1rem"},".bw_media_reverse":{"flex-direction":"row-reverse"},".bw_media_img":{"border-radius":"50%","object-fit":"cover","flex-shrink":"0"},".bw_media_body":{flex:"1","min-width":"0"},".bw_media_title":{margin:"0 0 0.25rem 0","font-size":"1rem","font-weight":"600","line-height":"1.3"}},fileUpload:{".bw_file_upload":{display:"flex","flex-direction":"column","align-items":"center","justify-content":"center",border:"2px dashed transparent",cursor:"pointer","text-align":"center",position:"relative"},".bw_file_upload_icon":{"font-size":"2rem","margin-bottom":"0.5rem"},".bw_file_upload_text":{"font-size":"0.875rem"},".bw_file_upload_input":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:"0"}},timeline:{".bw_timeline":{position:"relative","padding-left":"2rem"},".bw_timeline::before":{content:'""',position:"absolute",left:"0.5rem",top:"0",bottom:"0",width:"2px"},".bw_timeline_item":{position:"relative","padding-bottom":"1.5rem"},".bw_timeline_item:last-child":{"padding-bottom":"0"},".bw_timeline_marker":{position:"absolute",left:"-1.75rem",top:"0.25rem",width:"0.75rem",height:"0.75rem","border-radius":"50%"},".bw_timeline_content":{"padding-left":"0.5rem"},".bw_timeline_date":{"font-size":"0.75rem","margin-bottom":"0.25rem","font-weight":"500"},".bw_timeline_title":{"font-size":"1rem","font-weight":"600",margin:"0 0 0.25rem 0","line-height":"1.3"},".bw_timeline_text":{"font-size":"0.875rem",margin:"0","line-height":"1.5"}},stepper:{".bw_stepper":{display:"flex",gap:"0","counter-reset":"step"},".bw_step":{flex:"1",display:"flex","flex-direction":"column","align-items":"center","text-align":"center",position:"relative"},".bw_step + .bw_step::before":{content:'""',position:"absolute",top:"1rem",left:"-50%",right:"50%",height:"2px"},".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"},".bw_step_body":{"margin-top":"0.5rem"},".bw_step_label":{"font-size":"0.875rem","font-weight":"500"},".bw_step_description":{"font-size":"0.75rem","margin-top":"0.125rem"}},chipInput:{".bw_chip_input":{display:"flex","flex-wrap":"wrap","align-items":"center",gap:"0.375rem",padding:"0.375rem 0.5rem","min-height":"2.5rem",cursor:"text"},".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"},".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%"},".bw_chip_field":{flex:"1","min-width":"80px",border:"none",outline:"none","font-size":"0.875rem",padding:"0.125rem 0",background:"transparent"}},barChart:{".bw_bar_chart_container":{padding:"1rem",border:"1px solid transparent"},".bw_bar_chart":{display:"flex","align-items":"flex-end",gap:"6px",padding:"0 0.5rem"},".bw_bar_group":{flex:"1",display:"flex","flex-direction":"column","align-items":"center",height:"100%","justify-content":"flex-end"},".bw_bar":{width:"100%","border-radius":"3px 3px 0 0","min-height":"4px"},".bw_bar:hover":{opacity:"0.85"},".bw_bar_value":{"font-size":"0.65rem","font-weight":"600","margin-bottom":"2px","text-align":"center"},".bw_bar_label":{"font-size":"0.7rem","margin-top":"4px","text-align":"center"},".bw_bar_chart_title":{"font-size":"1.1rem","font-weight":"600",margin:"0 0 0.75rem 0"}},responsive:{"@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"},".bw_modal_dialog":{margin:"0.5rem auto"},".bw_modal_lg":{"max-width":"calc(100% - 1rem)"},".bw_modal_xl":{"max-width":"calc(100% - 1rem)"},".bw_navbar":{padding:"0.5rem 0.75rem"},".bw_navbar_brand":{"margin-right":"0.5rem","font-size":"1rem"},".bw_navbar_nav":{"flex-wrap":"wrap"},".bw_tooltip":{"white-space":"normal"},".bw_table":{display:"block","overflow-x":"auto","-webkit-overflow-scrolling":"touch"},".bw_col, .bw_col_1, .bw_col_2, .bw_col_3, .bw_col_4, .bw_col_5, .bw_col_6, .bw_col_7, .bw_col_8, .bw_col_9, .bw_col_10, .bw_col_11, .bw_col_12":{flex:"0 0 100%","max-width":"100%"},".bw_container":{"padding-right":"0.5rem","padding-left":"0.5rem"},".bw_container_fluid":{"padding-right":"0.5rem","padding-left":"0.5rem"}}}};function M(){var e={},t={0:"0",1:".25rem",2:".5rem",3:"1rem",4:"1.5rem",5:"3rem"};for(var r in t){var o=t[r];e[".bw_m_"+r]={margin:o+" !important"},e[".bw_mt_"+r]={"margin-top":o+" !important"},e[".bw_mb_"+r]={"margin-bottom":o+" !important"},e[".bw_ms_"+r]={"margin-left":o+" !important"},e[".bw_me_"+r]={"margin-right":o+" !important"},e[".bw_p_"+r]={padding:o+" !important"},e[".bw_pt_"+r+", .pt-"+r]={"padding-top":o+" !important"},e[".bw_pb_"+r+", .pb-"+r]={"padding-bottom":o+" !important"},e[".bw_ps_"+r+", .ps-"+r]={"padding-left":o+" !important"},e[".bw_pe_"+r+", .pe-"+r]={"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 a={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around"};for(var n in a)e[".bw_justify_content_"+n+", .justify-content-"+n]={"justify-content":a[n]};var i={start:"flex-start",end:"flex-end",center:"center"};for(var s in i)e[".bw_align_items_"+s+", .align-items-"+s]={"align-items":i[s]};return e[".bw_border"]={border:"1px solid transparent !important"},e[".bw_border_0"]={border:"0 !important"},e[".bw_border_top_0, .border-top-0"]={"border-top":"0 !important"},e[".bw_border_end_0, .border-end-0"]={"border-right":"0 !important"},e[".bw_border_bottom_0, .border-bottom-0"]={"border-bottom":"0 !important"},e[".bw_border_start_0, .border-start-0"]={"border-left":"0 !important"},e[".bw_rounded"]={"border-radius":".375rem !important"},e[".bw_rounded_0"]={"border-radius":"0 !important"},e[".bw_rounded_1, .rounded-1"]={"border-radius":".25rem !important"},e[".bw_rounded_2, .rounded-2"]={"border-radius":".375rem !important"},e[".bw_rounded_3, .rounded-3"]={"border-radius":".5rem !important"},e[".bw_rounded_circle"]={"border-radius":"50% !important"},e[".bw_rounded_pill, .rounded-pill"]={"border-radius":"50rem !important"},e[".bw_shadow"]={"box-shadow":"0 .5rem 1rem rgba(0,0,0,.15) !important"},e[".bw_shadow_sm"]={"box-shadow":"0 .125rem .25rem rgba(0,0,0,.075) !important"},e[".bw_shadow_lg"]={"box-shadow":"0 1rem 3rem rgba(0,0,0,.175) !important"},e[".bw_shadow_none, .shadow-none"]={"box-shadow":"none !important"},["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_top_0, .top-0"]={top:"0 !important"},e[".bw_top_50, .top-50"]={top:"50% !important"},e[".bw_top_100, .top-100"]={top:"100% !important"},e[".bw_bottom_0, .bottom-0"]={bottom:"0 !important"},e[".bw_bottom_50, .bottom-50"]={bottom:"50% !important"},e[".bw_bottom_100, .bottom-100"]={bottom:"100% !important"},e[".bw_start_0, .start-0"]={left:"0 !important"},e[".bw_start_50, .start-50"]={left:"50% !important"},e[".bw_start_100, .start-100"]={left:"100% !important"},e[".bw_end_0, .end-0"]={right:"0 !important"},e[".bw_end_50, .end-50"]={right:"50% !important"},e[".bw_end_100, .end-100"]={right:"100% !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[".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[".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[".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[".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[".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"},e}function N(){return function(){for(var e={},t=Object.keys(E),r=0;r<t.length;r++)Object.assign(e,E[t[r]]);return Object.assign(e,M()),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"}},e}()}
|
|
37
|
+
/**
|
|
38
|
+
* Bitwrench v2 Utility Functions
|
|
39
|
+
*
|
|
40
|
+
* Pure utility functions with no DOM dependencies. These work identically
|
|
41
|
+
* in Node.js and browsers: type detection, math, array ops, text generation,
|
|
42
|
+
* timing helpers.
|
|
43
|
+
*
|
|
44
|
+
* Extracted from bitwrench.js to keep the core focused on DOM/TACO/state.
|
|
45
|
+
*
|
|
46
|
+
* @module bitwrench-utils
|
|
47
|
+
* @license BSD-2-Clause
|
|
48
|
+
* @author M A Chatterjee <deftio [at] deftio [dot] com>
|
|
49
|
+
*/
|
|
50
|
+
function I(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}function B(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}function D(e,t,r){return Math.max(t,Math.min(r,e))}function P(e){return"array"!==I(e)?[]:e.filter((e,t,r)=>r.indexOf(e)===t)}
|
|
36
51
|
/**
|
|
37
52
|
* Bitwrench v2 Components
|
|
38
53
|
*
|
|
@@ -47,10 +62,11 @@
|
|
|
47
62
|
* Handle classes (CardHandle, TableHandle, NavbarHandle, TabsHandle)
|
|
48
63
|
* provide imperative DOM manipulation for rendered components.
|
|
49
64
|
*
|
|
50
|
-
* @module bitwrench-
|
|
65
|
+
* @module bitwrench-bccl
|
|
51
66
|
* @license BSD-2-Clause
|
|
52
67
|
* @author M A Chatterjee <deftio [at] deftio [dot] com>
|
|
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")})}}}}});
|
|
68
|
+
*/
|
|
69
|
+
function F(e){return e?0===e.indexOf("outline")?"bw_btn_outline bw_"+e.replace(/^outline[_-]/,""):"bw_"+e:""}function R(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:_=!1,className:b="",style:p,headerClass:u="",bodyClass:m="",footerClass:f=""}=e,w=["bw_card",F(l),d&&{none:"",sm:"bw_shadow_sm",md:"bw_shadow",lg:"bw_shadow_lg"}[d]||"",c?"":"bw_border_0",_?"bw_card_hoverable":"",b].filter(Boolean).join(" ").trim(),h=[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 ${m}`.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:w,style:p},c:h,o:{type:"card",state:e.state||{}}}:{t:"div",a:{class:w,style:p},c:{t:"div",a:{class:"bw_row bw_g_0"},c:h},o:{type:"card",state:e.state||{}}}}function H(e={}){"string"==typeof e&&(e={text: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",F(r),o&&`bw_btn_${o}`,s].filter(Boolean).join(" "),disabled:a,onclick:n,style:l},c:t,o:{type:"button"}}}function q(e={}){const{fluid:t=!1,children:r,className:o=""}=e;return{t:"div",a:{class:`bw_container${t?"-fluid":""} ${o}`.trim()},c:r}}function U(e={}){const{children:t,className:r="",gap:o}=e;return{t:"div",a:{class:`bw_row ${o?`bw_g_${o}`:""} ${r}`.trim()},c:t}}function W(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}}function X(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}}))}}function Y(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)}}}}function G(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",tabindex:t===o?"0":"-1","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"),e.setAttribute("tabindex","-1")}),o.forEach(e=>e.classList.remove("active")),e.target.classList.add("active"),e.target.setAttribute("aria-selected","true"),e.target.setAttribute("tabindex","0");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},mounted:function(e){var t=e.querySelector('[role="tablist"]');t&&t.addEventListener("keydown",function(e){for(var r=t.querySelectorAll('[role="tab"]'),o=-1,a=0;a<r.length;a++)if(r[a]===e.target){o=a;break}if(-1!==o){var n=-1;"ArrowLeft"===e.key||"ArrowUp"===e.key?(e.preventDefault(),n=o>0?o-1:r.length-1):"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),n=o<r.length-1?o+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())}})}}}}function J(e={}){"string"==typeof e&&(e={content:e});const{content:t,variant:r="info",dismissible:o=!1,className:a=""}=e;return{t:"div",a:{class:`bw_alert ${F(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)}}function V(e={}){"string"==typeof e&&(e={text:e});const{text:t,variant:r="primary",size:o,pill:a=!1,className:n=""}=e,i="sm"===o?" bw_badge_sm":"lg"===o?" bw_badge_lg":"";return{t:"span",a:{class:`bw_badge ${F(r)}${i} ${a?"bw_badge_pill":""} ${n}`.trim()},c:t}}function K(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",F(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}%`}}}function Z(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}})}}function Q(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}}))}}}function ee(e={}){const{children:t,onsubmit:r,className:o=""}=e;return{t:"form",a:{class:o,onsubmit:r||(e=>e.preventDefault())},c:t}}function te(e={}){var{label:t,input:r,help:o,id:a,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:a,class:"bw_form_label"},c:s?[t,{t:"span",a:{class:"bw_text_danger bw_ms_1"},c:"*"}]:t},l,i&&n&&{t:"div",a:{class:"valid"===n?"bw_valid_feedback":"bw_invalid_feedback"},c:i},o&&{t:"small",a:{class:"bw_form_text bw_text_muted"},c:o}].filter(Boolean)}}function re(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,..._}=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,..._}}}function oe(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}}function ae(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}))}}function ne(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)}}function ie(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}}function se(e={}){const{variant:t="primary",size:r="md",type:o="border"}=e;return{t:"div",a:{class:`bw_spinner_${o} bw_spinner_${o}-${r} ${F(t)}`,role:"status"},c:{t:"span",a:{class:"bw_visually_hidden"},c:"Loading..."}}}function le(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,_={sm:"bw_py_3",md:"bw_py_4",lg:"bw_py_5",xl:"bw_py_6"};return{t:"section",a:{class:`bw_hero ${F(a)} ${_[n]||_.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)}}function ce(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)}}))}}}function de(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)}}}}function _e(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)}}}function be(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}];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:function(e){navigator.clipboard.writeText(o).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: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}}]}});return{t:"div",a:{class:"bw_code_demo"},c:[t&&{t:"h3",c:t},r&&{t:"p",a:{class:"bw_text_muted bw_mb_3"},c:r},G({tabs:i})].filter(Boolean)}}function pe(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}}}function ue(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)}}function me(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}}function fe(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"),n=a.querySelector(".bw_accordion_collapse"),i=n.classList.contains("bw_collapse_show");if(!r)for(var s=o.querySelectorAll(".bw_accordion_item"),l=0;l<s.length;l++)if(s[l]!==a){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 _=function(e){"max-height"===e.propertyName&&n.classList.contains("bw_collapse_show")&&(n.style.maxHeight="none"),n.removeEventListener("transitionend",_)};n.addEventListener("transitionend",_)}}},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}}}}function we(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=""}}}}function he(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 ${F(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)}}}}function ge(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 ${F(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)}}}}function ve(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)}}function ye(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}}function xe(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} ${F(n)} ${i}`.trim()},c:o||""}}function ke(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}}),_=[{t:"div",a:{class:"bw_carousel_track",style:"transform: translateX(-"+100*s+"%)"},c:d}];return r&&t.length>1&&(_.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"}}}),_.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&&_.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:_,o:{type:"carousel",state:{activeIndex:s,autoPlay:a,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))}),a){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)}}}}function Ce(e={}){"string"==typeof e&&(e={label:e});var{value:t=0,label:r,change:o,format:a,prefix:n,suffix:i,icon:s,variant:l,className:c="",style:d}=e;var _=["bw_stat_card",F(l),c].filter(Boolean).join(" ").trim(),b=[];return s&&b.push({t:"div",a:{class:"bw_stat_icon"},c:s}),b.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,a)}),r&&b.push({t:"div",a:{class:"bw_stat_label"},c:r}),null!=o&&b.push({t:"div",a:{class:"bw_stat_change "+(o>=0?"bw_stat_change_up":"bw_stat_change_down")},c:(o>=0?"↑ +":"↓ ")+o+"%"}),{t:"div",a:{class:_,style:d},c:b,o:{type:"stat-card"}}}function Ae(e={}){var{content:t,text:r="",placement:o="top",className:a=""}=e;return{t:"span",a:{class:("bw_tooltip_wrapper "+a).trim()},c:[t,{t:"span",a:{class:"bw_tooltip bw_tooltip_"+o,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")})}}}}function je(e={}){var{trigger:t,title:r,content:o,placement:a="top",className:n=""}=e,i=[r&&{t:"div",a:{class:"bw_popover_header"},c:r},o&&{t:"div",a:{class:"bw_popover_body"},c:o}].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_"+a},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)}}}}function Se(e={}){"string"==typeof e&&(e={placeholder:e});var{placeholder:t="Search...",value:r,onSearch:o,onInput:a,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&&o&&(e.preventDefault(),o(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"),a&&a(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(),a&&a(""),o&&o("")}},c:"×"}],o:{type:"search-input"}}}function $e(e={}){var{min:t=0,max:r=100,step:o=1,value:a=50,label:n,showValue:i=!1,id:s,name:l,disabled:c=!1,className:d="",..._}=e,b=[];if(n||i){var p=[];n&&p.push({t:"span",c:n}),i&&p.push({t:"span",a:{class:"bw_range_value"},c:""+a}),b.push({t:"div",a:{class:"bw_range_label"},c:p})}var u=_.oninput;return i&&(_.oninput=function(e){var t=e.target.closest(".bw_range_wrapper").querySelector(".bw_range_value");t&&(t.textContent=e.target.value),u&&u(e)}),b.push({t:"input",a:{type:"range",class:"bw_range",min:t,max:r,step:o,value:a,id:s,name:l,disabled:c,..._}}),{t:"div",a:{class:("bw_range_wrapper "+d).trim()},c:b,o:{type:"range"}}}function Oe(e={}){var{src:t,alt:r="",title:o,content:a,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:[o&&{t:"h5",a:{class:"bw_media_title"},c:o},a].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"}}}function ze(e={}){var{accept:t,multiple:r=!1,onFiles:o,text:a="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":a},c:[{t:"div",a:{class:"bw_file_upload_icon"},c:"📁"},{t:"div",a:{class:"bw_file_upload_text"},c:a},{t:"input",a:{type:"file",class:"bw_file_upload_input",accept:t,multiple:r,id:n,onchange:function(e){o&&e.target.files.length&&o(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"),o&&t.dataTransfer.files.length&&o(t.dataTransfer.files)})}}}}function Te(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 "+F(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"}}}function Le(e={}){var{steps:t=[],currentStep:r=0,className:o=""}=e;return{t:"div",a:{class:("bw_stepper "+o).trim(),role:"list"},c:t.map(function(e,t){var o=t<r?"completed":t===r?"active":"pending";return{t:"div",a:{class:"bw_step bw_step_"+o,role:"listitem","aria-current":"active"===o?"step":void 0},c:[{t:"div",a:{class:"bw_step_indicator"},c:"completed"===o?"✓":""+(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"}}}function Ee(e={}){var{chips:t=[],placeholder:r="Add...",onAdd:o,onRemove:a,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),a&&a(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),a&&a(t)},n.appendChild(i),r.insertBefore(n,e.target),e.target.value="",o&&o(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),a&&a(c)}}}}}],o:{type:"chip-input"}}}Object.assign({},E,{root:{":root":{"--bw_font_sans_serif":'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"--bw_font_monospace":'"SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", "Courier New", monospace',"--bw_body_font_family":"var(--bw_font_sans_serif)","--bw_body_font_size":"1rem","--bw_body_font_weight":"400","--bw_body_line_height":"1.5"}},reset:E.base,enhancedCards:E.cards,tableResponsive:{".bw_table_responsive":{"overflow-x":"auto","-webkit-overflow-scrolling":"touch"}},utilities:M()});var Me={card:{make:R},button:{make:H},container:{make:q},row:{make:U},col:{make:W},nav:{make:X},navbar:{make:Y},tabs:{make:G},alert:{make:J},badge:{make:V},progress:{make:K},listGroup:{make:Z},breadcrumb:{make:Q},form:{make:ee},formGroup:{make:te},input:{make:re},textarea:{make:oe},select:{make:ae},checkbox:{make:ne},stack:{make:ie},spinner:{make:se},hero:{make:le},featureGrid:{make:ce},cta:{make:de},section:{make:_e},codeDemo:{make:be},pagination:{make:pe},radio:{make:ue},buttonGroup:{make:me},accordion:{make:fe},modal:{make:we},toast:{make:he},dropdown:{make:ge},switch:{make:ve},skeleton:{make:ye},avatar:{make:xe},carousel:{make:ke},statCard:{make:Ce},tooltip:{make:Ae},popover:{make:je},searchInput:{make:Se},range:{make:$e},mediaObject:{make:Oe},fileUpload:{make:ze},timeline:{make:Te},stepper:{make:Le},chipInput:{make:Ee}};function Ne(e,t){var r=Me[e];if(!r)throw new Error('bw.make: unknown component type "'+e+'". Available: '+Object.keys(Me).join(", "));return r.make(t||{})}var Ie=Object.freeze({__proto__:null,BCCL:Me,make:Ne,makeAccordion:fe,makeAlert:J,makeAvatar:xe,makeBadge:V,makeBreadcrumb:Q,makeButton:H,makeButtonGroup:me,makeCTA:de,makeCard:R,makeCarousel:ke,makeCheckbox:ne,makeChipInput:Ee,makeCodeDemo:be,makeCol:W,makeContainer:q,makeDropdown:ge,makeFeatureGrid:ce,makeFileUpload:ze,makeForm:ee,makeFormGroup:te,makeHero:le,makeInput:re,makeListGroup:Z,makeMediaObject:Oe,makeModal:we,makeNav:X,makeNavbar:Y,makePagination:pe,makePopover:je,makeProgress:K,makeRadio:ue,makeRange:$e,makeRow:U,makeSearchInput:Se,makeSection:_e,makeSelect:ae,makeSkeleton:ye,makeSpinner:se,makeStack:ie,makeStatCard:Ce,makeStepper:Le,makeSwitch:ve,makeTabs:G,makeTextarea:oe,makeTimeline:Te,makeToast:he,makeTooltip:Ae,variantClass:F});
|
|
54
70
|
/**
|
|
55
71
|
* Bitwrench v2 Core
|
|
56
72
|
* Zero-dependency UI library using JavaScript objects
|
|
@@ -58,5 +74,19 @@
|
|
|
58
74
|
*
|
|
59
75
|
* @license BSD-2-Clause
|
|
60
76
|
* @author M A Chatterjee <deftio [at] deftio [dot] com>
|
|
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),module.exports=q;
|
|
77
|
+
*/const Be={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}}};function De(e){this._bwComponent=!0,this._bwId=Be.uuid("comp"),this.taco=e,this.element=null,this.mounted=!1;var t=e.o||{};if(this._state={},t.state)for(var r in t.state)Object.prototype.hasOwnProperty.call(t.state,r)&&(this._state[r]=t.state[r]);if(this._actions={},t.actions)for(var o in t.actions)Object.prototype.hasOwnProperty.call(t.actions,o)&&(this._actions[o]=t.actions[o]);if(this._methods={},t.methods){var a=this;for(var n in t.methods)Object.prototype.hasOwnProperty.call(t.methods,n)&&(this._methods[n]=t.methods[n],function(e,t){a[e]=function(){var e=[a].concat(Array.prototype.slice.call(arguments));return t.apply(null,e)}}(n,t.methods[n]))}this._userTag=null,this._hooks={willMount:t.willMount||null,mounted:t.mounted||null,willUpdate:t.willUpdate||null,onUpdate:t.onUpdate||null,unmount:t.unmount||null,willDestroy:t.willDestroy||null},this._bindings=[],this._dirtyKeys={},this._scheduled=!1,this._subs=[],this._eventListeners=[],this._registeredActions=[],this._prevValues={},this._compile=!!t.compile,this._bw_refs={},this._refCounter=0}Be.isNodeJS=function(){return"ignore"!==Be.__monkey_patch_is_nodejs__.get()?Be.__monkey_patch_is_nodejs__.get():"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node},Be._isNode=Be.isNodeJS(),Object.defineProperty(Be,"_isBrowser",{get:function(){return"undefined"!=typeof document&&"undefined"!=typeof window},configurable:!0}),Be._fsCache=void 0,Be._getFs=function(){if(void 0!==Be._fsCache)return Promise.resolve(Be._fsCache);if(!Be.isNodeJS())return Be._fsCache=null,Promise.resolve(null);if("function"==typeof require)try{return Be._fsCache=require("fs"),Promise.resolve(Be._fsCache)}catch(e){}try{return new Function("m","return import(m)")("fs").then(function(e){return Be._fsCache=e.default||e,Be._fsCache}).catch(function(){return Be._fsCache=null,null})}catch(e){return Be._fsCache=null,Promise.resolve(null)}},Be.typeOf=I,Be.to=Be.typeOf,Be.uuid=function(e){var t=e?"bw_"+e+"_":"bw_";if(Be._isBrowser&&crypto&&crypto.randomUUID)return t+crypto.randomUUID().replace(/-/g,"");return`${t}${Date.now().toString(36)}_${(++Be._idCounter).toString(36)}_${Math.random().toString(36).substring(2,11)}`},Be._el=function(e){if("string"!=typeof e)return e||null;if(!e)return null;if(!Be._isBrowser)return null;var t=Be._nodeMap[e];if(t){if(null!==t.parentNode)return t;delete Be._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&&(Be._nodeMap[e]=r),r},Be._registerNode=function(e,t){if(e){t&&(Be._nodeMap[t]=e);var r=e.getAttribute?e.getAttribute("id"):null;r&&(Be._nodeMap[r]=e)}},Be._deregisterNode=function(e,t){t&&delete Be._nodeMap[t];var r=e&&e.getAttribute?e.getAttribute("id"):null;r&&delete Be._nodeMap[r]},Be.escapeHTML=function(e){if("string"!=typeof e)return"";const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return e.replace(/[&<>"'/]/g,e=>t[e])},Be.raw=function(e){return{__bw_raw:!0,v:String(e)}},Be.html=function(e,t={}){if(null==e)return"";if(e&&!0===e._bwComponent){var r=Object.assign({},t);return!r.state&&e._state&&(r.state=e._state),Be.html(e.taco,r)}if(Array.isArray(e))return e.map(e=>Be.html(e,t)).join("");if(e&&e.__bw_raw)return e.v;if(e&&e._bwWhen&&t.state){var o=e.expr.replace(/^\$\{|\}$/g,""),a=(t.compile?Be._resolveTemplate("${"+o+"}",t.state,!0):Be._evaluatePath(t.state,o))?e.branches[0]:e.branches[1]||null;return a?Be.html(a,t):""}if(e&&e._bwEach&&t.state){var n=e.expr.replace(/^\$\{|\}$/g,""),i=Be._evaluatePath(t.state,n);return Array.isArray(i)?i.map(function(r,o){return Be.html(e.factory(r,o),t)}).join(""):""}if("object"!=typeof e||!e.t){var s=t.raw?String(e):Be.escapeHTML(String(e));return t.state&&"string"==typeof s&&s.indexOf("${")>=0&&(s=Be._resolveTemplate(s,t.state,!!t.compile)),s}const{t:l,a:c={},c:d,o:_={}}=e,b=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(l.toLowerCase());let p="";for(const[e,r]of Object.entries(c))if(null!=r&&!1!==r&&!e.startsWith("on"))if("style"===e&&"object"==typeof r){const e=Object.entries(r).filter(([,e])=>null!=e).map(([e,t])=>`${e}:${t}`).join(";");e&&(p+=` style="${Be.escapeHTML(e)}"`)}else if("class"===e){const e=Array.isArray(r)?r.filter(Boolean).join(" "):String(r);e&&(p+=` class="${Be.escapeHTML(e)}"`)}else if(!0===r)p+=` ${e}`;else{let o=String(r);t.state&&o.indexOf("${")>=0&&(o=Be._resolveTemplate(o,t.state,!!t.compile)),p+=` ${e}="${Be.escapeHTML(o)}"`}if((_.mounted||_.unmount)&&!c.class?.includes("bw_id_")){const e=_.bw_id||Be.uuid();p=p.replace(/class="([^"]*)"/,(t,r)=>`class="${r} bw_id_${e}"`.trim()),p.includes("class=")||(p+=` class="bw_id_${e}"`)}if(b)return`<${l}${p} />`;let u=null!=d?Be.html(d,t):"";return t.state&&"string"==typeof u&&u.indexOf("${")>=0&&(u=Be._resolveTemplate(u,t.state,!!t.compile)),`<${l}${p}>${u}</${l}>`},Be.createDOM=function(e,t={}){if(!Be._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(e&&!0===e._bwComponent)return Be.createDOM(e.taco,t);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=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){if(!0===e._bwComponent)return void e.mount(l);var r=Be.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(!0===i._bwComponent)i.mount(l);else if("object"==typeof i&&i.t){var c=Be.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 _ in l._bw_refs||(l._bw_refs={}),c._bw_refs)Object.prototype.hasOwnProperty.call(c._bw_refs,_)&&(l._bw_refs[_]=c._bw_refs[_])}else l.textContent=String(i);if(n.id&&Be._registerNode(l,null),s.mounted||s.unmount||s.render||s.state){const e=n["data-bw_id"]||Be.uuid();l.setAttribute("data-bw_id",e),Be._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&&Be._unmountCallbacks.set(e,()=>{s.unmount(l,l._bw_state||{})})}else n["data-bw_id"]&&Be._registerNode(l,n["data-bw_id"]);return l},Be.DOM=function(e,t,r={}){if(!Be._isBrowser)throw new Error("bw.DOM requires a DOM environment (document/window). Use bw.html() instead.");const o=Be._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,Be.cleanup(o),void 0!==a&&(o._bw_state=a),n&&(o._bw_render=n),i&&(o.setAttribute("data-bw_id",i),Be._registerNode(o,i)),s&&(o._bw_subs=s),o.innerHTML="",null!=t&&(!0===t._bwComponent?t.mount(o):t.element instanceof Element?o.appendChild(t.element):Array.isArray(t)?t.forEach(e=>{null!=e&&(!0===e._bwComponent?e.mount(o):e.element instanceof Element?o.appendChild(e.element):o.appendChild(Be.createDOM(e,r)))}):o.appendChild(Be.createDOM(t,r))),o},Be.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},Be.renderComponent=function(e,t={}){const r=Be.createDOM(e,t),o={element:r,taco:e,_props:{...e.a},_state:e.o?.state||{},_children:{},get props(){return this._compiledProps||(this._compiledProps=Be.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=Be.createDOM(r,t);return this.element.replaceWith(o),this.element=o,this.taco=r,this},render(){const e=Be.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()}),Be.cleanup(this.element),this.element.remove(),this._children={},this._props={},this._state={},this._compiledProps=null}};return r._bwHandle=o,o},Be.cleanup=function(e){if(!Be._isBrowser||!e)return;e.querySelectorAll("[data-bw_id]").forEach(e=>{const t=e.getAttribute("data-bw_id"),r=Be._unmountCallbacks.get(t);r&&(r(),Be._unmountCallbacks.delete(t)),Be._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=Be._unmountCallbacks.get(t);r&&(r(),Be._unmountCallbacks.delete(t)),Be._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,e._bwComponentHandle&&(e._bwComponentHandle.mounted=!1,e._bwComponentHandle.element=null,delete e._bwComponentHandle)}},Be.update=function(e){var t=Be._el(e);return t&&t._bw_render&&(t._bw_render(t,t._bw_state||{}),Be.emit(t,"statechange",t._bw_state)),t||null},Be.patch=function(e,t,r){var o=Be._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(Be.createDOM(e))})):"object"==typeof t&&null!==t&&t.t?(o.innerHTML="",o.appendChild(Be.createDOM(t))):o.textContent=String(t),o):null},Be.patchAll=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=Be.patch(r,e[r]));return t},Be.emit=function(e,t,r){var o=Be._el(e);o&&o.dispatchEvent(new CustomEvent("bw:"+t,{bubbles:!0,detail:r||{}}))},Be.on=function(e,t,r){var o=Be._el(e);return o&&o.addEventListener("bw:"+t,function(e){r(e.detail,e)}),o||null},Be.pub=function(e,t){var r=Be._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},Be.sub=function(e,t,r){var o=++Be._subIdCounter;Be._topics[e]||(Be._topics[e]=[]),Be._topics[e].push({handler:t,id:o});var a=function(){var t=Be._topics[e];t&&(Be._topics[e]=t.filter(function(e){return e.id!==o}),0===Be._topics[e].length&&delete Be._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},Be.unsub=function(e,t){var r=Be._topics[e];if(!r)return 0;var o=r.length;Be._topics[e]=r.filter(function(e){return e.handler!==t});var a=o-Be._topics[e].length;return 0===Be._topics[e].length&&delete Be._topics[e],a},Be._fnRegistry={},Be._fnIDCounter=0,Be.funcRegister=function(e,t){if("function"!=typeof e)return"";var r="string"==typeof t&&t.length>0?t:"bw_fn_"+Be._fnIDCounter++;return Be._fnRegistry[r]=e,r},Be.funcGetById=function(e,t){return(e=String(e))in Be._fnRegistry?Be._fnRegistry[e]:"function"==typeof t?t:function(){console.warn('bw.funcGetById: unregistered fn "'+e+'"')}},Be.funcGetDispatchStr=function(e,t){return"bw.funcGetById('"+e+"')("+(t=null!=t?String(t):"")+")"},Be.funcUnregister=function(e){return e in Be._fnRegistry&&(delete Be._fnRegistry[e],!0)},Be.funcGetRegistry=function(){var e={};for(var t in Be._fnRegistry)Object.prototype.hasOwnProperty.call(Be._fnRegistry,t)&&(e[t]=Be._fnRegistry[t]);return e},Be._parseBindings=function(e){for(var t,r=[],o=/\$\{([^}]+)\}/g;null!==(t=o.exec(e));)r.push({start:t.index,end:t.index+t[0].length,expr:t[1].trim()});return r},Be._evaluatePath=function(e,t){for(var r=t.split("."),o=e,a=0;a<r.length;a++){if(null==o)return"";o=o[r[a]]}return null==o?"":o},Be._compiledExprs={},Be._resolveTemplate=function(e,t,r){if("string"!=typeof e||e.indexOf("${")<0)return e;var o=Be._parseBindings(e);if(0===o.length)return e;for(var a="",n=0,i=0;i<o.length;i++){var s,l=o[i];if(a+=e.slice(n,l.start),r){if(!Be._compiledExprs[l.expr])try{Be._compiledExprs[l.expr]=new Function("state","with(state){return ("+l.expr+");}")}catch(e){Be._compiledExprs[l.expr]=function(){return""}}try{s=Be._compiledExprs[l.expr](t)}catch(e){s=""}}else s=Be._evaluatePath(t,l.expr);a+=null==s?"":String(s),n=l.end}return a+=e.slice(n)},Be._extractDeps=function(e,t){for(var r=[],o=0;o<t.length;o++){var a=t[o];(new RegExp("(?:^|[^\\w$.])"+a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"(?:[^\\w$]|$)").test(e)||e===a||0===e.indexOf(a+"."))&&r.push(a)}return r},Be._dirtyComponents=[],Be._flushScheduled=!1,Be._scheduleFlush=function(){Be._flushScheduled||(Be._flushScheduled=!0,"undefined"!=typeof Promise?Promise.resolve().then(Be._doFlush):setTimeout(Be._doFlush,0))},Be._doFlush=function(){Be._flushScheduled=!1;var e=Be._dirtyComponents.slice();Be._dirtyComponents=[];for(var t={},r=0;r<e.length;r++){var o=e[r];t[o._bwId]||(t[o._bwId]=!0,o._flush())}},Be.flush=function(){Be._doFlush()},De.prototype.get=function(e){return Be._evaluatePath(this._state,e)},De.prototype.set=function(e,t,r){for(var o=e.split("."),a=this._state,n=0;n<o.length-1;n++)null!=a[o[n]]&&"object"==typeof a[o[n]]||(a[o[n]]={}),a=a[o[n]];a[o[o.length-1]]=t,this._dirtyKeys[o[0]]=!0,this.mounted&&(r&&r.sync?this._flush():this._scheduleDirty())},De.prototype.getState=function(){var e={};for(var t in this._state)Object.prototype.hasOwnProperty.call(this._state,t)&&(e[t]=this._state[t]);return e},De.prototype.setState=function(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._state[r]=e[r],this._dirtyKeys[r]=!0);this.mounted&&(t&&t.sync?this._flush():this._scheduleDirty())},De.prototype.push=function(e,t){var r=this.get(e),o=Array.isArray(r)?r.slice():[];o.push(t),this.set(e,o)},De.prototype.splice=function(e,t,r){var o=this.get(e),a=Array.isArray(o)?o.slice():[],n=[t,r].concat(Array.prototype.slice.call(arguments,3));Array.prototype.splice.apply(a,n),this.set(e,a)},De.prototype._scheduleDirty=function(){this._scheduled||(this._scheduled=!0,Be._dirtyComponents.push(this),Be._scheduleFlush())},De.prototype._compileBindings=function(){this._bindings=[],this._refCounter=0;var e=Object.keys(this._state),t=this;!function r(o,a){if(null==o||"object"!=typeof o||!o.t)return o;if("string"==typeof o.c&&o.c.indexOf("${")>=0){for(var n="bw_ref_"+t._refCounter++,i=Be._parseBindings(o.c),s=[],l=0;l<i.length;l++)s=s.concat(Be._extractDeps(i[l].expr,e));t._bindings.push({expr:o.c,type:"content",refId:n,deps:s,template:o.c}),o.a||(o.a={}),o.a["data-bw_ref"]=n}if(o.a)for(var c in o.a)if(Object.prototype.hasOwnProperty.call(o.a,c)&&"data-bw_ref"!==c){var d=o.a[c];if("string"==typeof d&&d.indexOf("${")>=0){for(var _="bw_ref_"+t._refCounter++,b=Be._parseBindings(d),p=[],u=0;u<b.length;u++)p=p.concat(Be._extractDeps(b[u].expr,e));t._bindings.push({expr:d,type:"attribute",attrName:c,refId:_,deps:p,template:d}),o.a||(o.a={}),o.a["data-bw_ref"]=o.a["data-bw_ref"]||_,o.a["data-bw_ref"]!==_&&(o.a["data-bw_ref_"+c]=_)}}if(Array.isArray(o.c))for(var m=0;m<o.c.length;m++){if(o.c[m]&&"object"==typeof o.c[m]&&o.c[m].t&&r(o.c[m],a.concat(m)),o.c[m]&&o.c[m]._bwWhen){var f="bw_ref_"+t._refCounter++,w=Be._extractDeps(o.c[m].expr.replace(/^\$\{|\}$/g,""),e);t._bindings.push({expr:o.c[m].expr,type:"structural",subtype:"when",refId:f,deps:w,branches:o.c[m].branches,index:m,parentPath:a}),o.c[m]._refId=f}if(o.c[m]&&o.c[m]._bwEach){var h="bw_ref_"+t._refCounter++,g=Be._extractDeps(o.c[m].expr.replace(/^\$\{|\}$/g,""),e);t._bindings.push({expr:o.c[m].expr,type:"structural",subtype:"each",refId:h,deps:g,factory:o.c[m].factory,index:m,parentPath:a}),o.c[m]._refId=h}}else o.c&&"object"==typeof o.c&&o.c.t&&r(o.c,a.concat(0));return o}(this.taco,[])},De.prototype._collectRefs=function(){if(this._bw_refs={},this.element){for(var e=this.element.querySelectorAll("[data-bw_ref]"),t=0;t<e.length;t++)this._bw_refs[e[t].getAttribute("data-bw_ref")]=e[t];var r=this.element.getAttribute&&this.element.getAttribute("data-bw_ref");r&&(this._bw_refs[r]=this.element)}},De.prototype.mount=function(e){this._hooks.willMount&&this._hooks.willMount(this),this._originalTaco||(this._originalTaco=this.taco),this.taco=this._deepCloneTaco(this._originalTaco),this._compileBindings(),this._prepareTaco(this.taco);var t=this;for(var r in this._actions)if(Object.prototype.hasOwnProperty.call(this._actions,r)){var o=this._bwId+"_"+r;(function(e){Be.funcRegister(function(r){t._actions[e](t,r)},o)})(r),this._registeredActions.push(o)}this._wireActions(this.taco);var a=this._tacoForDOM(this.taco);this.element=Be.createDOM(a),this.element._bwComponentHandle=this,this.element.setAttribute("data-bw_comp_id",this._bwId),this._userTag&&this.element.classList.add(this._userTag),e.appendChild(this.element),this._collectRefs(),this._resolveAndApplyAll(),this.mounted=!0,this._hooks.mounted&&(2===this._hooks.mounted.length?this._hooks.mounted(this.element,this.getState()):this._hooks.mounted(this))},De.prototype._prepareTaco=function(e){if(e&&"object"==typeof e)if(Array.isArray(e.c))for(var t=e.c.length-1;t>=0;t--){var r=e.c[t];if(r&&r._bwWhen){var o,a=r.expr.replace(/^\$\{|\}$/g,"");if(this._compile)try{o=new Function("state","with(state){return ("+a+");}")(this._state)}catch(e){o=!1}else o=Be._evaluatePath(this._state,a);var n=o?r.branches[0]:r.branches[1]||null;e.c[t]=n?{t:"span",a:{"data-bw_when":r._refId,style:"display:contents"},c:n}:{t:"span",a:{"data-bw_when":r._refId,style:"display:contents"},c:""}}if(r&&r._bwEach){var i=r.expr.replace(/^\$\{|\}$/g,""),s=Be._evaluatePath(this._state,i),l=[];if(Array.isArray(s))for(var c=0;c<s.length;c++)l.push(r.factory(s[c],c));e.c[t]={t:"span",a:{"data-bw_each":r._refId,style:"display:contents"},c:l}}e.c[t]&&"object"==typeof e.c[t]&&e.c[t].t&&this._prepareTaco(e.c[t])}else e.c&&"object"==typeof e.c&&e.c.t&&this._prepareTaco(e.c)},De.prototype._wireActions=function(e){if(e&&"object"==typeof e&&e.t){if(e.a)for(var t in e.a)if(Object.prototype.hasOwnProperty.call(e.a,t)&&t.startsWith("on")&&"string"==typeof e.a[t]){var r=e.a[t];if(r in this._actions)(function(r){e.a[t]=function(e){Be.funcGetById(r)(e)}})(this._bwId+"_"+r)}if(Array.isArray(e.c))for(var o=0;o<e.c.length;o++)this._wireActions(e.c[o]);else e.c&&"object"==typeof e.c&&e.c.t&&this._wireActions(e.c)}},De.prototype._deepCloneTaco=function(e){if(null==e)return e;if(e._bwWhen)return{_bwWhen:!0,expr:e.expr,branches:[this._deepCloneTaco(e.branches[0]),e.branches[1]?this._deepCloneTaco(e.branches[1]):null],_refId:e._refId};if(e._bwEach)return{_bwEach:!0,expr:e.expr,factory:e.factory,_refId:e._refId};if("object"!=typeof e||!e.t)return e;var t={t:e.t};if(e.a)for(var r in t.a={},e.a)Object.prototype.hasOwnProperty.call(e.a,r)&&(t.a[r]=e.a[r]);return null!=e.c&&(Array.isArray(e.c)?t.c=e.c.map(function(e){return this._deepCloneTaco(e)}.bind(this)):"object"==typeof e.c?t.c=this._deepCloneTaco(e.c):t.c=e.c),e.o&&(t.o=e.o),t},De.prototype._tacoForDOM=function(e){if(!e||"object"!=typeof e||!e.t)return e;var t={t:e.t};return e.a&&(t.a=e.a),null!=e.c&&(Array.isArray(e.c)?t.c=e.c.map(function(e){return this._tacoForDOM(e)}.bind(this)):"object"==typeof e.c&&e.c.t?t.c=this._tacoForDOM(e.c):t.c=e.c),t},De.prototype.unmount=function(){if(this.mounted){this._hooks.unmount&&this._hooks.unmount(this);for(var e=0;e<this._eventListeners.length;e++){var t=this._eventListeners[e];this.element&&this.element.removeEventListener(t.event,t.handler)}this._eventListeners=[];for(var r=0;r<this._subs.length;r++)this._subs[r]();this._subs=[],this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.mounted=!1}},De.prototype.destroy=function(){this._hooks.willDestroy&&this._hooks.willDestroy(this),this.unmount();for(var e=0;e<this._registeredActions.length;e++)Be.funcUnregister(this._registeredActions[e]);this._registeredActions=[],this._state={},this._bindings=[],this._bw_refs={},this._prevValues={},this._dirtyKeys={},this.element&&(delete this.element._bwComponentHandle,this.element=null)},De.prototype._flush=function(){this._scheduled=!1;var e=Object.keys(this._dirtyKeys);if(this._dirtyKeys={},0!==e.length&&this.mounted){this._hooks.willUpdate&&this._hooks.willUpdate(this,e);for(var t=!1,r=0;r<this._bindings.length;r++){var o=this._bindings[r];if("structural"===o.type){for(var a=0;a<o.deps.length;a++)if(e.indexOf(o.deps[a])>=0){t=!0;break}if(t)break}}if(t)this._render();else{var n=this._resolveBindings(e);this._applyPatches(n)}this._hooks.onUpdate&&this._hooks.onUpdate(this,e)}},De.prototype._resolveBindings=function(e){for(var t=[],r=0;r<this._bindings.length;r++){var o=this._bindings[r];if("structural"!==o.type){for(var a=!1,n=0;n<o.deps.length;n++)if(e.indexOf(o.deps[n])>=0){a=!0;break}if(a){var i=Be._resolveTemplate(o.template,this._state,this._compile),s=o.refId+"_"+(o.attrName||"content");this._prevValues[s]!==i&&(this._prevValues[s]=i,t.push({refId:o.refId,type:o.type,attrName:o.attrName,value:i}))}}}return t},De.prototype._applyPatches=function(e){for(var t=0;t<e.length;t++){var r=e[t],o=this._bw_refs[r.refId];o&&("content"===r.type?o.textContent=r.value:"attribute"===r.type&&("class"===r.attrName?o.className=r.value:o.setAttribute(r.attrName,r.value)))}},De.prototype._resolveAndApplyAll=function(){for(var e=[],t=0;t<this._bindings.length;t++){var r=this._bindings[t];if("structural"!==r.type){var o=Be._resolveTemplate(r.template,this._state,this._compile),a=r.refId+"_"+(r.attrName||"content");this._prevValues[a]=o,e.push({refId:r.refId,type:r.type,attrName:r.attrName,value:o})}}this._applyPatches(e)},De.prototype._render=function(){if(this.element&&this.element.parentNode){var e=this.element.parentNode,t=this.element.nextSibling;e.removeChild(this.element),this.taco=this._deepCloneTaco(this._originalTaco||this.taco),this._compileBindings(),this._prepareTaco(this.taco),this._wireActions(this.taco);var r=this._tacoForDOM(this.taco);this.element=Be.createDOM(r),this.element._bwComponentHandle=this,this.element.setAttribute("data-bw_comp_id",this._bwId),t?e.insertBefore(this.element,t):e.appendChild(this.element),this._collectRefs(),this._resolveAndApplyAll()}},De.prototype.on=function(e,t){this.element&&this.element.addEventListener(e,t),this._eventListeners.push({event:e,handler:t})},De.prototype.off=function(e,t){this.element&&this.element.removeEventListener(e,t),this._eventListeners=this._eventListeners.filter(function(r){return!(r.event===e&&r.handler===t)})},De.prototype.sub=function(e,t){var r=Be.sub(e,t);return this._subs.push(r),r},De.prototype.action=function(e){var t=this._actions[e];if(t){var r=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(null,r)}console.warn('ComponentHandle.action: unknown action "'+e+'"')},De.prototype.select=function(e){return this.element?this.element.querySelector(e):null},De.prototype.selectAll=function(e){return this.element?Array.prototype.slice.call(this.element.querySelectorAll(e)):[]},De.prototype.userTag=function(e){return this._userTag=e,this.element&&this.element.classList.add(e),this},Be._ComponentHandle=De,Be.when=function(e,t,r){return{_bwWhen:!0,expr:e,branches:[t,r||null]}},Be.each=function(e,t){return{_bwEach:!0,expr:e,factory:t}},Be.component=function(e){return new De(e)},Be.message=function(e,t,r){var o=Be.$('[data-bw_comp_id="'+e+'"]')[0];if(o||(o=Be.$("."+e)[0]),!o||!o._bwComponentHandle)return!1;var a=o._bwComponentHandle;return"function"!=typeof a[t]?(console.warn('bw.message: unknown action "'+t+'" on component '+e),!1):(a[t](r),!0)},Be._clientFunctions={},Be._allowExec=!1,Be._builtinClientFunctions={scrollTo:function(e){var t=Be._el(e);t&&(t.scrollTop=t.scrollHeight)},focus:function(e){var t=Be._el(e);t&&"function"==typeof t.focus&&t.focus()},download:function(e,t,r){if("undefined"!=typeof document){var o=new Blob([t],{type:r||"text/plain"}),a=document.createElement("a");a.href=URL.createObjectURL(o),a.download=e,a.click(),URL.revokeObjectURL(a.href)}},clipboard:function(e){"undefined"!=typeof navigator&&navigator.clipboard&&navigator.clipboard.writeText(e)},redirect:function(e){"undefined"!=typeof window&&(window.location.href=e)},log:function(){console.log.apply(console,arguments)}},Be.clientParse=function(e){if("r"!==(e=(e||"").trim()).charAt(0))return JSON.parse(e);for(var t=[],r=0,o=(e=e.slice(1)).length;r<o;){var a=e[r];if("'"===a){for(t.push('"'),r++;r<o;){var n=e[r];if("\\"===n&&r+1<o){var i=e[r+1];"'"===i?t.push("'"):(t.push("\\"),t.push(i)),r+=2}else if('"'===n)t.push('\\"'),r++;else{if("'"===n)break;t.push(n),r++}}t.push('"'),r++}else if('"'===a)for(t.push(a),r++;r<o;){var s=e[r];if("\\"===s&&r+1<o)t.push(s),t.push(e[r+1]),r+=2;else if(t.push(s),r++,'"'===s)break}else if(","===a){for(var l=r+1;l<o&&(" "===e[l]||"\t"===e[l]||"\n"===e[l]||"\r"===e[l]);)l++;l<o&&("}"===e[l]||"]"===e[l])||t.push(a),r++}else t.push(a),r++}return JSON.parse(t.join(""))},Be.clientApply=function(e){if(!e||!e.type)return!1;var t=e.type,r=e.target;if("replace"===t){var o=Be._el(r);return!!o&&(Be.DOM(o,e.node),!0)}if("patch"===t)return null!==Be.patch(r,e.content,e.attr);if("append"===t){var a=Be._el(r);if(!a)return!1;var n=Be.createDOM(e.node);return a.appendChild(n),!0}if("remove"===t){var i=Be._el(r);return!!i&&("function"==typeof Be.cleanup&&Be.cleanup(i),i.remove(),!0)}if("batch"===t){if(!Array.isArray(e.ops))return!1;var s=!0;return e.ops.forEach(function(e){Be.clientApply(e)||(s=!1)}),s}if("message"===t)return Be.message(e.target,e.action,e.data);if("register"===t){if(!e.name||!e.body)return!1;try{return Be._clientFunctions[e.name]=new Function("return "+e.body)(),!0}catch(t){return console.error("[bw] register error:",e.name,t),!1}}else if("call"===t){if(!e.name)return!1;var l=Be._clientFunctions[e.name]||Be._builtinClientFunctions[e.name];if("function"!=typeof l)return!1;try{var c=Array.isArray(e.args)?e.args:[];return l.apply(null,c),!0}catch(t){return console.error("[bw] call error:",e.name,t),!1}}else if("exec"===t){if(!Be._allowExec)return console.warn("[bw] exec rejected: allowExec is not enabled"),!1;if(!e.code)return!1;try{return new Function(e.code)(),!0}catch(e){return console.error("[bw] exec error:",e),!1}}return!1},Be.clientConnect=function(e,t){var r=(t=t||{}).transport||"sse",o=t.actionUrl||e.replace(/\/events\//,"/action/"),a=!1!==t.reconnect,n=t.onStatus||function(){},i=t.onMessage||null,s={};Be._allowExec=!!t.allowExec;var l={status:"connecting",_es:null,_pollTimer:null};function c(e){l.status=e,n(e)}function d(e){try{var t="string"==typeof e?Be.clientParse(e):e;i&&i(t),s.message&&s.message(t),Be.clientApply(t)}catch(e){s.error&&s.error(e)}}if("sse"===r&&"undefined"!=typeof EventSource){c("connecting");var _=new EventSource(e);l._es=_,_.onopen=function(){c("connected"),s.open&&s.open()},_.onmessage=function(e){d(e.data)},_.onerror=function(){"connected"===l.status&&c("disconnected"),s.error&&s.error(new Error("SSE connection error")),a||_.close()}}else if("poll"===r){var b=t.interval||2e3;c("connected"),l._pollTimer=setInterval(function(){fetch(e).then(function(e){return e.json()}).then(function(e){Array.isArray(e)?e.forEach(d):e&&e.type&&d(e)}).catch(function(e){s.error&&s.error(e)})},b)}return l.sendAction=function(e,t){var r=JSON.stringify({type:"action",action:e,data:t||{}});fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:r}).catch(function(e){s.error&&s.error(e)})},l.on=function(e,t){return s[e]=t,l},l.close=function(){l._es&&(l._es.close(),l._es=null),l._pollTimer&&(clearInterval(l._pollTimer),l._pollTimer=null),c("disconnected"),s.close&&s.close()},l},Be.inspect=function(e){var t,r=e;if(e&&!0===e._bwComponent)r=e.element,t=e;else{if("string"==typeof e&&(r=Be.$(e)[0]),!r)return console.warn("bw.inspect: element not found"),null;t=r._bwComponentHandle}if(!t)return console.log("bw.inspect: no ComponentHandle on this element"),console.log(" Tag:",r.tagName),console.log(" Classes:",r.className),console.log(" _bw_state:",r._bw_state||"(none)"),null;var o=t._bindings.reduce(function(e,t){return e.concat(t.deps||[])},[]).filter(function(e,t,r){return r.indexOf(e)===t});return console.group("Component: "+t._bwId),console.log("State:",t._state),console.log("Bindings:",t._bindings.length,"(deps:",o,")"),console.log("Methods:",Object.keys(t._methods)),console.log("Actions:",Object.keys(t._actions)),console.log("User tag:",t._userTag||"(none)"),console.log("Mounted:",t.mounted),console.log("Element:",t.element),console.groupEnd(),t},Be.compile=function(e){var t=[];return function e(r){if(r&&"object"==typeof r){if("string"==typeof r.c&&r.c.indexOf("${")>=0)for(var o=Be._parseBindings(r.c),a=0;a<o.length;a++)try{t.push({expr:o[a].expr,fn:new Function("state","with(state){return ("+o[a].expr+");}")})}catch(e){t.push({expr:o[a].expr,fn:function(){return""}})}if(r.a)for(var n in r.a)if(Object.prototype.hasOwnProperty.call(r.a,n)){var i=r.a[n];if("string"==typeof i&&i.indexOf("${")>=0)for(var s=Be._parseBindings(i),l=0;l<s.length;l++)try{t.push({expr:s[l].expr,fn:new Function("state","with(state){return ("+s[l].expr+");}")})}catch(e){t.push({expr:s[l].expr,fn:function(){return""}})}}if(Array.isArray(r.c))for(var c=0;c<r.c.length;c++)e(r.c[c]);else r.c&&"object"==typeof r.c&&r.c.t&&e(r.c)}}(e),function(r){var o=new De(e);if(o._compile=!0,o._precompiledBindings=t,r)for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o._state[a]=r[a]);return o}},Be.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=>Be.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=Be.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()},Be.injectCSS=function(e,t={}){if(!Be._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:Be.css(e,t);return o&&a.textContent?a.textContent+="\n"+n:a.textContent=n,a},Be.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},Be.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"}},Be.responsive=function(e,t){var r={sm:"576px",md:"768px",lg:"992px",xl:"1200px"},o=[];return Object.keys(t).forEach(function(a){var n={};"base"===a?(n[e]=t[a],o.push(Be.css(n))):r[a]&&(n[e]=t[a],o.push("@media (min-width: "+r[a]+") {\n"+Be.css(n)+"\n}"))}),o.join("\n")},Be.mapScale=B,Be.clip=D,Be._isBrowser&&(Be.$=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)):[]:[]},Be.$.one=function(e){return Be.$(e)[0]||null}),Be.loadDefaultStyles=function(e={}){const{minify:t=!0,palette:r}=e;if(Be._isBrowser){var o=Be.css(N());Be.injectCSS(o,{id:"bw_structural",append:!1,minify:t})}var a=Object.assign({},z,r||{});return Be.generateTheme("",Object.assign({},a,{inject:!0}))},Be.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({},z,t);t.tertiary||(r.tertiary=r.primary);var o=w(r),a=function(e){var t=e&&e.spacing||"normal",r=e&&e.radius||"md",o=e&&e.fontSize||1,a=e&&e.typeRatio||"normal",n="string"==typeof a?j[a]||j.normal:a,i=e&&e.elevation||"md",s=e&&e.motion||"standard";return{spacing:"string"==typeof t?C[t]||C.normal:t,radius:"string"==typeof r?A[r]||A.md:r,fontSize:o,typeScale:S(16,n),elevation:"string"==typeof i?$[i]||$.md:i,motion:"string"==typeof s?O[s]||O.standard:s}}(r),n=L(e,o,a),i=Be.css(n),s=w(f(r)),l=function(e,t,r){var o=L("",t,r),a=e?"."+e+".bw_theme_alt":".bw_theme_alt",n={};for(var i in o)if(o.hasOwnProperty(i))if("@"===i.charAt(0)){var s=o[i],l={};for(var c in s)s.hasOwnProperty(c)&&(l[a+" "+c]=s[c]);n[i]=l}else{for(var d=i.split(","),_=[],b=0;b<d.length;b++){var p=d[b].trim();"body"===p||p.indexOf("body"),_.push(a+" "+p)}n[_.join(", ")]=o[i]}return n[a+" body, :root"+a+" body"]={color:t.dark.base,"background-color":t.light.base},n}
|
|
78
|
+
/**
|
|
79
|
+
* Bitwrench v2 File I/O Functions
|
|
80
|
+
*
|
|
81
|
+
* Save/load files in both Node.js and browser environments.
|
|
82
|
+
* Node uses fs module, browser uses Blob/XHR/FileReader.
|
|
83
|
+
*
|
|
84
|
+
* Called via bindFileOps(bw) which attaches all functions to the bw namespace.
|
|
85
|
+
* This preserves the same public API (bw.saveClientFile, bw.loadClientFile, etc.)
|
|
86
|
+
* while keeping the implementation in a separate module.
|
|
87
|
+
*
|
|
88
|
+
* @module bitwrench-file-ops
|
|
89
|
+
* @license BSD-2-Clause
|
|
90
|
+
* @author M A Chatterjee <deftio [at] deftio [dot] com>
|
|
91
|
+
*/(e,s,a),c=Be.css(l),d=m(r);if(!1!==t.inject&&Be._isBrowser){var _=e?e.replace(/-/g,"_"):"",b=_?"bw_theme_"+_:"bw_theme_default",p=_?"bw_theme_"+_+"_alt":"bw_theme_default_alt";Be.injectCSS(i,{id:b,append:!1}),Be.injectCSS(c,{id:p,append:!1}),Be._activeThemeStyleIds=[b,p]}e||(Be.u.bgTeal={background:o.primary.base,color:o.primary.textOn},Be.u.textTeal={color:o.primary.base},Be.u.bgWhite={background:"#ffffff"},Be.u.textWhite={color:"#ffffff"});var u={css:i,palette:o,name:e,isLightPrimary:d,alternate:{css:c,palette:s}};return Be._activeTheme=u,Be._activeThemeMode="primary",u},Be.applyTheme=function(e){if(!Be._isBrowser)return e||"primary";var t,r=document.documentElement,o=!Be._activeTheme||Be._activeTheme.isLightPrimary;return(t="primary"!==e&&("alternate"===e||("light"===e?!o:"dark"===e&&o)))?r.classList.add("bw_theme_alt"):r.classList.remove("bw_theme_alt"),Be._activeThemeMode=t?"alternate":"primary",Be._activeThemeMode},Be.toggleTheme=function(){var e=Be._activeThemeMode||"primary";return Be.applyTheme("primary"===e?"alternate":"primary")},Be.clearTheme=function(){Be._activeThemeStyleIds&&Be._isBrowser&&(Be._activeThemeStyleIds.forEach(function(e){var t=document.getElementById(e);t&&t.remove()}),Be._activeThemeStyleIds=null),Be._activeTheme=null,Be._activeThemeMode="primary"},Be.hexToHsl=i,Be.hslToHex=s,Be.adjustLightness=l,Be.mixColor=c,Be.relativeLuminance=d,Be.textOnColor=_,Be.deriveShades=p,Be.derivePalette=w,Be.harmonize=b,Be.deriveAlternateSeed=u,Be.deriveAlternateConfig=f,Be.isLightPalette=m,Be.SPACING_PRESETS=C,Be.RADIUS_PRESETS=A,Be.TYPE_RATIO_PRESETS=j,Be.ELEVATION_PRESETS=$,Be.MOTION_PRESETS=O,Be.generateTypeScale=S,Be.DEFAULT_PALETTE_CONFIG=z,Be.THEME_PRESETS={teal:{primary:"#006666",secondary:"#6c757d",tertiary:"#006666"},ocean:{primary:"#0077b6",secondary:"#90e0ef",tertiary:"#00b4d8"},sunset:{primary:"#e76f51",secondary:"#264653",tertiary:"#e9c46a"},forest:{primary:"#2d6a4f",secondary:"#95d5b2",tertiary:"#52b788"},slate:{primary:"#343a40",secondary:"#adb5bd",tertiary:"#6c757d"},rose:{primary:"#e11d48",secondary:"#fda4af",tertiary:"#fb7185"},indigo:{primary:"#4f46e5",secondary:"#a5b4fc",tertiary:"#818cf8"},amber:{primary:"#d97706",secondary:"#fbbf24",tertiary:"#f59e0b"},emerald:{primary:"#059669",secondary:"#6ee7b7",tertiary:"#34d399"},nord:{primary:"#5e81ac",secondary:"#88c0d0",tertiary:"#81a1c1"},coral:{primary:"#ef6461",secondary:"#4a7c7e",tertiary:"#e8a87c"},midnight:{primary:"#1e3a5f",secondary:"#7c8db5",tertiary:"#3d5a80"}},Be.choice=function(e,t,r){const o=e in t?t[e]:r;return"function"===I(o)?o(e):o},Be.arrayUniq=P,Be.arrayBinA=function(e,t){return"array"!==I(e)||"array"!==I(t)?[]:P(e.filter(e=>-1!==t.indexOf(e)))},Be.arrayBNotInA=function(e,t){return"array"!==I(e)||"array"!==I(t)?[]:P(t.filter(t=>e.indexOf(t)<0))},Be.colorInterp=function(e,t,r,a,n){return function(e,t,r,o,a,n){let i=Array.isArray(o)?o:["#000","#fff"];if(i=0===i.length?["#000","#fff"]:i,1===i.length)return i[0];i=i.map(e=>n(e));const s=B(e,t,r,0,i.length-1,{clip:!0,expScale:a}),l=D(Math.floor(s),0,i.length-2),c=s-l,d=e=>B(c,0,1,i[l][e],i[l+1][e],{clip:!0});return[d(0),d(1),d(2),d(3),"rgb"]}(e,t,r,a,n,o)},Be.colorHslToRgb=n,Be.colorRgbToHsl=a,Be.colorParse=o,Be.setCookie=function(e,t,r,o={}){if(!Be._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},Be.getCookie=function(e,t){if(!Be._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},Be.getURLParam=function(e,t){if(!Be._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}},Be.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},Be.multiArray=function(e,t){t="number"==typeof t?[t]:t;const r=o=>{if(o>=t.length)return"function"===I(e)?e():e;const a=[];for(let e=0;e<t[o];e++)a[e]=r(o+1);return a};return r(0)},Be.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},Be.setIntervalX=function(e,t,r){let o=0;const a=setInterval(function(){e(o),++o>=r&&clearInterval(a)},t);return a},Be.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},function(e){e.saveClientFile=function(t,r){if(e.isNodeJS())e._getFs().then(function(e){e?e.writeFile(t,r,function(e){e&&console.error("Error saving file:",e)}):console.error("bw.saveClientFile: fs module not available")});else{var o=new Blob([r],{type:"application/octet-stream"}),a=window.URL.createObjectURL(o),n=e.createDOM({t:"a",a:{href:a,download:t,style:"display: none"}});document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(a),document.body.removeChild(n)}},e.saveClientJSON=function(t,r){e.saveClientFile(t,JSON.stringify(r,null,2))},e.loadClientFile=function(t,r,o){var a={parser:"raw"};o&&o.parser&&(a.parser=o.parser);var n="JSON"===a.parser?JSON.parse:function(e){return e};if(e.isNodeJS())e._getFs().then(function(e){e?e.readFile(t,"utf8",function(e,t){if(e)r(null,e);else try{r(n(t),null)}catch(e){r(null,e)}}):r(null,new Error("fs module not available"))});else{var i=new XMLHttpRequest;i.open("GET",t,!0),i.onreadystatechange=function(){if(4===i.readyState)if(i.status>=200&&i.status<300)try{r(n(i.responseText),null)}catch(e){r(null,e)}else r(null,new Error("HTTP "+i.status+": "+t))},i.send(null)}return"BW_OK"},e.loadClientJSON=function(t,r){return e.loadClientFile(t,r,{parser:"JSON"})},e.loadLocalFile=function(t,r){var o={parser:"raw",accept:""};r&&(r.parser&&(o.parser=r.parser),r.accept&&(o.accept=r.accept));var a="JSON"===o.parser?JSON.parse:function(e){return e};if(e.isNodeJS())t(null,"",new Error("bw.loadLocalFile is browser-only. Use bw.loadClientFile() in Node."));else{var n=e.createDOM({t:"input",a:{type:"file",accept:o.accept,style:"display: none"}});n.addEventListener("change",function(){var e=n.files[0];if(e){var r=new FileReader;r.onload=function(r){try{t(a(r.target.result),e.name,null)}catch(r){t(null,e.name,r)}},r.onerror=function(){t(null,e.name,r.error)},r.readAsText(e),n.remove()}else t(null,"",new Error("No file selected"))}),document.body.appendChild(n),n.click()}},e.loadLocalJSON=function(t){e.loadLocalFile(t,{parser:"JSON",accept:".json"})}}(Be),Be.copyToClipboard=function(e){return navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e):new Promise((t,r)=>{const o=Be.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)}})},Be.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 _=r||(t.length>0?Object.keys(t[0]).map(e=>({key:e,label:e})):[]);let b=l||null,p=c,u=[...t];b&&u.sort((e,t)=>{const r=e[b],o=t[b];if("number"==typeof r&&"number"==typeof o)return"asc"===p?r-o:o-r;const a=String(r||"").toLowerCase(),n=String(o||"").toLowerCase();return"asc"===p?a.localeCompare(n):n.localeCompare(a)});return{t:"table",a:{class:d},c:[{t:"thead",c:{t:"tr",c:_.map(e=>({t:"th",a:i?{style:{cursor:"pointer",userSelect:"none"},onclick:()=>{return t=e.key,void(i&&(b===t?p="asc"===p?"desc":"asc":(b=t,p="asc"),s&&s(t,p)));var t}}:{},c:[e.label,i&&b===e.key&&{t:"span",a:{style:{marginLeft:"5px"}},c:"asc"===p?"▲":"▼"}].filter(Boolean)}))}},{t:"tbody",c:u.map(e=>({t:"tr",c:_.map(t=>({t:"td",c:t.render?t.render(e[t.key],e):String(e[t.key]||"")}))}))}]}},Be.makeTableFromArray=function(e){const{data:t=[],headerRow:r=!0,columns:o,...a}=e;if(!Array.isArray(t)||0===t.length)return Be.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 Be.makeTable({data:s,columns:l,...a})},Be.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 _=t.map(function(e){return Number(e[o])||0}),b=Math.max.apply(null,_),p=t.map(function(e,t){const o=_[t],a=b>0?o/b*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}}),u=[];return a&&u.push({t:"h3",a:{class:"bw_bar_chart_title"},c:a}),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}},Be.makeDataTable=function(e){const{title:t,data:r,columns:o,className:a="",striped:n=!0,hover:i=!0,responsive:s=!0,...l}=e,c=Be.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}},Be._componentRegistry=new Map,Be.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||Be.uuid();let n;try{n=Be.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=Be.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),Be._componentRegistry.delete(a),this._mounted=!1,this.object_handle_in_dom=null,this.status_code="destroyed",this):this}};return Be._componentRegistry.set(a,i),r.o?.mounted&&r.o.mounted(n,i),i},Be.getComponent=function(e){return Be._componentRegistry.get(e)||null},Be.getAllComponents=function(){return new Map(Be._componentRegistry)},Object.entries(Ie).forEach(([e,t])=>{e.startsWith("make")&&(Be[e]=t)}),Be.make=Ne,Be.BCCL=Me,Be.variantClass=F,Object.entries(Ie).forEach(([e,t])=>{if(e.startsWith("make")){const r="create"+e.substring(4);Be[r]=function(e){const r=t(e);return Be.renderComponent(r)}}}),Be._isBrowser&&"undefined"!=typeof window&&(window.bw=Be),module.exports=Be;
|
|
62
92
|
//# sourceMappingURL=bitwrench.cjs.min.js.map
|