bitwrench 2.0.18 → 2.0.19

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.
Files changed (58) hide show
  1. package/README.md +86 -81
  2. package/dist/bitwrench-bccl.cjs.js +221 -48
  3. package/dist/bitwrench-bccl.cjs.min.js +3 -3
  4. package/dist/bitwrench-bccl.esm.js +221 -48
  5. package/dist/bitwrench-bccl.esm.min.js +3 -3
  6. package/dist/bitwrench-bccl.umd.js +221 -48
  7. package/dist/bitwrench-bccl.umd.min.js +3 -3
  8. package/dist/bitwrench-code-edit.cjs.js +7 -9
  9. package/dist/bitwrench-code-edit.cjs.min.js +5 -7
  10. package/dist/bitwrench-code-edit.es5.js +6 -8
  11. package/dist/bitwrench-code-edit.es5.min.js +5 -7
  12. package/dist/bitwrench-code-edit.esm.js +7 -9
  13. package/dist/bitwrench-code-edit.esm.min.js +5 -7
  14. package/dist/bitwrench-code-edit.umd.js +7 -9
  15. package/dist/bitwrench-code-edit.umd.min.js +5 -7
  16. package/dist/bitwrench-debug.js +268 -0
  17. package/dist/bitwrench-debug.min.js +3 -0
  18. package/dist/bitwrench-lean.cjs.js +250 -1574
  19. package/dist/bitwrench-lean.cjs.min.js +6 -6
  20. package/dist/bitwrench-lean.es5.js +344 -1661
  21. package/dist/bitwrench-lean.es5.min.js +4 -4
  22. package/dist/bitwrench-lean.esm.js +250 -1574
  23. package/dist/bitwrench-lean.esm.min.js +6 -6
  24. package/dist/bitwrench-lean.umd.js +250 -1574
  25. package/dist/bitwrench-lean.umd.min.js +6 -6
  26. package/dist/bitwrench-util-css.cjs.js +1 -1
  27. package/dist/bitwrench-util-css.cjs.min.js +1 -1
  28. package/dist/bitwrench-util-css.es5.js +1 -1
  29. package/dist/bitwrench-util-css.es5.min.js +1 -1
  30. package/dist/bitwrench-util-css.esm.js +1 -1
  31. package/dist/bitwrench-util-css.esm.min.js +1 -1
  32. package/dist/bitwrench-util-css.umd.js +1 -1
  33. package/dist/bitwrench-util-css.umd.min.js +1 -1
  34. package/dist/bitwrench.cjs.js +510 -1660
  35. package/dist/bitwrench.cjs.min.js +7 -7
  36. package/dist/bitwrench.css +80 -33
  37. package/dist/bitwrench.es5.js +569 -1694
  38. package/dist/bitwrench.es5.min.js +5 -5
  39. package/dist/bitwrench.esm.js +510 -1660
  40. package/dist/bitwrench.esm.min.js +7 -7
  41. package/dist/bitwrench.min.css +1 -1
  42. package/dist/bitwrench.umd.js +510 -1660
  43. package/dist/bitwrench.umd.min.js +7 -7
  44. package/dist/builds.json +133 -111
  45. package/dist/bwserve.cjs.js +2 -2
  46. package/dist/bwserve.esm.js +2 -2
  47. package/dist/sri.json +46 -44
  48. package/package.json +5 -3
  49. package/readme.html +86 -75
  50. package/src/bitwrench-bccl-entry.js +3 -4
  51. package/src/bitwrench-bccl.js +217 -43
  52. package/src/bitwrench-code-edit.js +6 -8
  53. package/src/bitwrench-debug.js +245 -0
  54. package/src/bitwrench-styles.js +35 -8
  55. package/src/bitwrench.js +212 -1563
  56. package/src/cli/attach.js +53 -21
  57. package/src/cli/serve.js +179 -3
  58. package/src/version.js +3 -3
@@ -1,4 +1,4 @@
1
- /*! bitwrench-bccl v2.0.18 | BSD-2-Clause | https://deftio.github.com/bitwrench/pages */
1
+ /*! bitwrench-bccl v2.0.19 | BSD-2-Clause | https://deftio.github.com/bitwrench/pages */
2
2
  /**
3
3
  * Bitwrench v2 Components
4
4
  *
@@ -17,7 +17,7 @@
17
17
  * @license BSD-2-Clause
18
18
  * @author M A Chatterjee <deftio [at] deftio [dot] com>
19
19
  */
20
- function e(e){return e?0===e.indexOf("outline")?"bw_btn_outline bw_"+e.replace(/^outline[_-]/,""):"bw_"+e:""}function t(t={}){const{title:a,subtitle:s,content:n,footer:c,header:o,image:i,imagePosition:r="top",variant:l,bordered:d=!0,shadow:_,hoverable:b=!1,className:u="",style:m,headerClass:p="",bodyClass:w="",footerClass:v=""}=t,f=["bw_card",e(l),_&&{none:"",sm:"bw_shadow_sm",md:"bw_shadow",lg:"bw_shadow_lg"}[_]||"",d?"":"bw_border_0",b?"bw_card_hoverable":"",u].filter(Boolean).join(" ").trim(),h=[o&&{t:"div",a:{class:`bw_card_header ${p}`.trim()},c:o},i&&("top"===r||"left"===r)&&{t:"img",a:{class:`bw_card_img_${r}`,src:i.src,alt:i.alt||""}},{t:"div",a:{class:`bw_card_body ${w}`.trim()},c:[a&&{t:"h5",a:{class:"bw_card_title"},c:a},s&&{t:"h6",a:{class:"bw_card_subtitle bw_mb_2 bw_text_muted"},c:s},n&&(Array.isArray(n)?n:[n])].flat().filter(Boolean)},i&&("bottom"===r||"right"===r)&&{t:"img",a:{class:`bw_card_img_${r}`,src:i.src,alt:i.alt||""}},c&&{t:"div",a:{class:`bw_card_footer ${v}`.trim()},c:c}].filter(Boolean);return!i||"left"!==r&&"right"!==r?{t:"div",a:{class:f,style:m},c:h,o:{type:"card",state:t.state||{}}}:{t:"div",a:{class:f,style:m},c:{t:"div",a:{class:"bw_row bw_g_0"},c:h},o:{type:"card",state:t.state||{}}}}function a(t={}){"string"==typeof t&&(t={text:t});const{text:a,variant:s="primary",size:n,disabled:c=!1,onclick:o,type:i="button",className:r="",style:l}=t;return{t:"button",a:{type:i,class:["bw_btn",e(s),n&&`bw_btn_${n}`,r].filter(Boolean).join(" "),disabled:c,onclick:o,style:l},c:a,o:{type:"button"}}}function s(e={}){const{fluid:t=!1,children:a,className:s=""}=e;return{t:"div",a:{class:`bw_container${t?"-fluid":""} ${s}`.trim()},c:a}}function n(e={}){const{children:t,className:a="",gap:s}=e;return{t:"div",a:{class:`bw_row ${s?`bw_g_${s}`:""} ${a}`.trim()},c:t}}function c(e={}){const{size:t,offset:a,push:s,pull:n,content:c,children:o,className:i=""}=e,r=[];return"object"==typeof t?Object.entries(t).forEach(([e,t])=>{"xs"===e?r.push(`bw_col_${t}`):r.push(`bw_col_${e}_${t}`)}):t?r.push(`bw_col_${t}`):r.push("bw_col"),a&&r.push(`bw_offset_${a}`),s&&r.push(`bw_push_${s}`),n&&r.push(`bw_pull_${n}`),{t:"div",a:{class:`${r.join(" ")} ${i}`.trim()},c:c||o}}function o(e={}){const{items:t=[],pills:a=!1,vertical:s=!1,className:n=""}=e;return{t:"ul",a:{class:`bw_nav ${a?"bw_nav_pills":"bw_nav_tabs"} ${s?"bw_nav_vertical":""} ${n}`.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 i(e={}){const{brand:t,brandHref:a="#",items:s=[],dark:n=!0,className:c=""}=e;return{t:"nav",a:{class:`bw_navbar ${n?"bw_navbar_dark":"bw_navbar_light"} ${c}`.trim()},c:{t:"div",a:{class:"bw_container"},c:[t&&{t:"a",a:{href:a,class:"bw_navbar_brand"},c:t},s.length>0&&{t:"div",a:{class:"bw_navbar_nav"},c:s.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:s.findIndex(e=>e.active)}}}}function r(e={}){const{tabs:t=[],activeIndex:a=0}=e;let s=a;return t.forEach((e,t)=>{e.active&&(s=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===s?"active":""),type:"button",role:"tab",tabindex:t===s?"0":"-1","aria-selected":t===s?"true":"false","data-tab-index":t,onclick:e=>{const t=e.target.closest(".bw_tabs"),a=t.querySelectorAll(".bw_nav_link"),s=t.querySelectorAll(".bw_tab_pane");a.forEach(e=>{e.classList.remove("active"),e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")}),s.forEach(e=>e.classList.remove("active")),e.target.classList.add("active"),e.target.setAttribute("aria-selected","true"),e.target.setAttribute("tabindex","0");s[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===s?"active":""),role:"tabpanel"},c:e.content}))}],o:{type:"tabs",state:{activeIndex:s},mounted:function(e){var t=e.querySelector('[role="tablist"]');t&&t.addEventListener("keydown",function(e){for(var a=t.querySelectorAll('[role="tab"]'),s=-1,n=0;n<a.length;n++)if(a[n]===e.target){s=n;break}if(-1!==s){var c=-1;"ArrowLeft"===e.key||"ArrowUp"===e.key?(e.preventDefault(),c=s>0?s-1:a.length-1):"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),c=s<a.length-1?s+1:0):"Home"===e.key?(e.preventDefault(),c=0):"End"===e.key&&(e.preventDefault(),c=a.length-1),c>=0&&(a[c].focus(),a[c].click())}})}}}}function l(t={}){"string"==typeof t&&(t={content:t});const{content:a,variant:s="info",dismissible:n=!1,className:c=""}=t;return{t:"div",a:{class:`bw_alert ${e(s)} ${n?"bw_alert_dismissible":""} ${c}`.trim(),role:"alert"},c:[a,n&&{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 d(t={}){"string"==typeof t&&(t={text:t});const{text:a,variant:s="primary",size:n,pill:c=!1,className:o=""}=t,i="sm"===n?" bw_badge_sm":"lg"===n?" bw_badge_lg":"";return{t:"span",a:{class:`bw_badge ${e(s)}${i} ${c?"bw_badge_pill":""} ${o}`.trim()},c:a}}function _(t={}){const{value:a=0,max:s=100,variant:n="primary",striped:c=!1,animated:o=!1,label:i,height:r}=t,l=Math.round(a/s*100);return{t:"div",a:{class:"bw_progress",style:r?{height:`${r}px`}:void 0},c:{t:"div",a:{class:["bw_progress_bar",e(n),c&&"bw_progress_bar_striped",o&&"bw_progress_bar_animated"].filter(Boolean).join(" "),role:"progressbar",style:{width:`${l}%`},"aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":s},c:i||`${l}%`}}}function b(e={}){const{items:t=[],flush:a=!1,interactive:s=!1}=e;return{t:"div",a:{class:("bw_list_group "+(a?"bw_list_group_flush":"")).trim()},c:t.map(e=>{const t="object"==typeof e,a=t?e.text:e,n=!!t&&e.active,c=!!t&&e.disabled,o=t?e.href:null,i=t?e.onclick:null;return s||o||i?{t:"a",a:{class:["bw_list_group_item",n&&"active",c&&"disabled"].filter(Boolean).join(" "),href:o||"#",onclick:i||(e=>{o||e.preventDefault()}),style:c?"pointer-events: none; opacity: 0.65;":""},c:a}:{t:"div",a:{class:["bw_list_group_item",n&&"active",c&&"disabled"].filter(Boolean).join(" ")},c:a}})}}function u(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 m(e={}){const{children:t,onsubmit:a,className:s=""}=e;return{t:"form",a:{class:s,onsubmit:a||(e=>e.preventDefault())},c:t}}function p(e={}){var{label:t,input:a,help:s,id:n,validation:c,feedback:o,required:i}=e,r=a;if(c&&a&&a.a){r={t:a.t,a:Object.assign({},a.a),c:a.c,o:a.o};var l="valid"===c?"bw_is_valid":"invalid"===c?"bw_is_invalid":"";l&&(r.a.class=((r.a.class||"")+" "+l).trim())}return{t:"div",a:{class:"bw_form_group"},c:[t&&{t:"label",a:{for:n,class:"bw_form_label"},c:i?[t,{t:"span",a:{class:"bw_text_danger bw_ms_1"},c:"*"}]:t},r,o&&c&&{t:"div",a:{class:"valid"===c?"bw_valid_feedback":"bw_invalid_feedback"},c:o},s&&{t:"small",a:{class:"bw_form_text bw_text_muted"},c:s}].filter(Boolean)}}function w(e={}){const{type:t="text",placeholder:a,value:s,id:n,name:c,disabled:o=!1,readonly:i=!1,required:r=!1,className:l="",style:d,..._}=e;return{t:"input",a:{type:t,class:`bw_form_control ${l}`.trim(),placeholder:a,value:s,id:n,name:c,style:d,disabled:o,readonly:i,required:r,..._}}}function v(e={}){const{placeholder:t,value:a,rows:s=3,id:n,name:c,disabled:o=!1,readonly:i=!1,required:r=!1,className:l="",...d}=e;return{t:"textarea",a:{class:`bw_form_control ${l}`.trim(),placeholder:t,rows:s,id:n,name:c,disabled:o,readonly:i,required:r,...d},c:a}}function f(e={}){const{options:t=[],value:a,id:s,name:n,disabled:c=!1,required:o=!1,className:i="",...r}=e;return{t:"select",a:{class:`bw_form_control ${i}`.trim(),id:s,name:n,disabled:c,required:o,...r},c:t.map(e=>({t:"option",a:{value:e.value,selected:e.value===a},c:e.text||e.value}))}}function h(e={}){const{label:t,checked:a=!1,id:s,name:n,disabled:c=!1,value:o,className:i="",...r}=e;return{t:"div",a:{class:`bw_form_check ${i}`.trim()},c:[{t:"input",a:{type:"checkbox",class:"bw_form_check_input",checked:a,id:s,name:n,disabled:c,value:o,...r}},t&&{t:"label",a:{class:"bw_form_check_label",for:s},c:t}].filter(Boolean)}}function g(e={}){const{children:t,direction:a="vertical",gap:s=3,className:n=""}=e;return{t:"div",a:{class:`bw_${"vertical"===a?"vstack":"hstack"} bw_gap_${s} ${n}`.trim()},c:t}}function k(t={}){const{variant:a="primary",size:s="md",type:n="border"}=t;return{t:"div",a:{class:`bw_spinner_${n} bw_spinner_${n}-${s} ${e(a)}`,role:"status"},c:{t:"span",a:{class:"bw_visually_hidden"},c:"Loading..."}}}function y(t={}){const{title:a,subtitle:s,content:n,variant:c="primary",size:o="lg",centered:i=!0,overlay:r=!1,backgroundImage:l,actions:d,className:_=""}=t,b={sm:"bw_py_3",md:"bw_py_4",lg:"bw_py_5",xl:"bw_py_6"};return{t:"section",a:{class:`bw_hero ${e(c)} ${b[o]||b.lg} ${i?"bw_text_center":""} ${_}`.trim(),style:l?`background-image: url('${l}'); background-size: cover; background-position: center;`:void 0},c:[r&&{t:"div",a:{class:"bw_hero_overlay"}},{t:"div",a:{class:"bw_container"},c:{t:"div",a:{class:"bw_hero_content"},c:[a&&{t:"h1",a:{class:"bw_hero_title bw_display_4 bw_mb_3"},c:a},s&&{t:"p",a:{class:"bw_hero_subtitle bw_lead bw_mb_4"},c:s},n,d&&{t:"div",a:{class:"bw_hero_actions bw_mt_4"},c:d}].filter(Boolean)}}].filter(Boolean)}}function x(e={}){const{features:t=[],columns:a=3,centered:s=!0,iconSize:n="3rem",className:c=""}=e,o="bw_col_md_"+12/a;return{t:"div",a:{class:`bw_feature_grid ${c}`.trim()},c:{t:"div",a:{class:"bw_row bw_g_4"},c:t.map(e=>({t:"div",a:{class:o},c:{t:"div",a:{class:"bw_feature "+(s?"bw_text_center":"")},c:[e.icon&&{t:"div",a:{class:"bw_feature_icon bw_mb_3 bw_text_primary",style:`font-size: ${n};`},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 $(e={}){const{title:t,description:a,actions:s,variant:n="light",centered:c=!0,className:o=""}=e;return{t:"section",a:{class:`bw_cta bw_bg_${n} bw_py_5 ${o}`.trim()},c:{t:"div",a:{class:"bw_container"},c:{t:"div",a:{class:"bw_cta_content "+(c?"bw_text_center":"")},c:[t&&{t:"h2",a:{class:"bw_cta_title bw_mb_3"},c:t},a&&{t:"p",a:{class:"bw_cta_description bw_lead bw_mb_4"},c:a},s&&{t:"div",a:{class:"bw_cta_actions"},c:s}].filter(Boolean)}}}}function L(e={}){const{title:t,subtitle:a,content:s,variant:n="default",spacing:c="md",className:o=""}=e,i={sm:"bw_py_3",md:"bw_py_4",lg:"bw_py_5",xl:"bw_py_6"};return{t:"section",a:{class:`bw_section ${i[c]||i.md} ${"default"!==n?`bw_bg_${n}`:""} ${o}`.trim()},c:{t:"div",a:{class:"bw_container"},c:[(t||a)&&{t:"div",a:{class:"bw_section_header bw_text_center bw_mb_5"},c:[t&&{t:"h2",a:{class:"bw_section_title"},c:t},a&&{t:"p",a:{class:"bw_section_subtitle bw_text_muted"},c:a}].filter(Boolean)},s].filter(Boolean)}}}function N(e={}){const{title:t,description:a,code:s,result:n,language:c="javascript"}=e;Math.random().toString(36).substr(2,9);const o=[{label:"Result",active:!0,content:n}];s&&o.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(s).then(function(){var t=e.target,a=t.textContent;t.textContent="Copied!",t.classList.add("bw_code_copy_btn_copied"),setTimeout(function(){t.textContent=a,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:s,lang:"javascript"===c?"js":c,readOnly:!0,height:"auto"}):{t:"pre",a:{class:"bw_code_pre"},c:{t:"code",a:{class:`bw_code_block language-${c}`},c:s}}]}});return{t:"div",a:{class:"bw_code_demo"},c:[t&&{t:"h3",c:t},a&&{t:"p",a:{class:"bw_text_muted bw_mb_3"},c:a},r({tabs:o})].filter(Boolean)}}function C(e={}){const{pages:t=1,currentPage:a=1,onPageChange:s,size:n,className:c=""}=e;function o(e){return function(n){n.preventDefault(),e<1||e>t||e===a||s&&s(e)}}const i=[];i.push({t:"li",a:{class:("bw_page_item "+(a<=1?"bw_disabled":"")).trim()},c:{t:"button",a:{class:"bw_page_link",type:"button",onclick:o(a-1),"aria-label":"Previous",disabled:a<=1||void 0},c:"‹"}});for(var r=1;r<=t;r++)(function(e){i.push({t:"li",a:{class:("bw_page_item "+(e===a?"bw_active":"")).trim()},c:{t:"button",a:{class:"bw_page_link",type:"button",onclick:o(e),"aria-current":e===a?"page":void 0},c:""+e}})})(r);return i.push({t:"li",a:{class:("bw_page_item "+(a>=t?"bw_disabled":"")).trim()},c:{t:"button",a:{class:"bw_page_link",type:"button",onclick:o(a+1),"aria-label":"Next",disabled:a>=t||void 0},c:"›"}}),{t:"nav",a:{"aria-label":"Pagination"},c:{t:"ul",a:{class:`bw_pagination ${n?"bw_pagination_"+n:""} ${c}`.trim()},c:i}}}function A(e={}){const{label:t,name:a,value:s,checked:n=!1,id:c,disabled:o=!1,className:i="",...r}=e;return{t:"div",a:{class:`bw_form_check ${i}`.trim()},c:[{t:"input",a:{type:"radio",class:"bw_form_check_input",name:a,value:s,checked:n,id:c,disabled:o,...r}},t&&{t:"label",a:{class:"bw_form_check_label",for:c},c:t}].filter(Boolean)}}function B(e={}){const{children:t,size:a,vertical:s=!1,className:n=""}=e;return{t:"div",a:{class:`${s?"bw_btn_group_vertical":"bw_btn_group"} ${a?"bw_btn_group_"+a:""} ${n}`.trim(),role:"group"},c:t}}function S(e={}){const{items:t=[],multiOpen:a=!1,className:s=""}=e;return{t:"div",a:{class:`bw_accordion ${s}`.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"),s=t.closest(".bw_accordion"),n=t.closest(".bw_accordion_item"),c=n.querySelector(".bw_accordion_collapse"),o=c.classList.contains("bw_collapse_show");if(!a)for(var i=s.querySelectorAll(".bw_accordion_item"),r=0;r<i.length;r++)if(i[r]!==n){var l=i[r].querySelector(".bw_accordion_collapse"),d=i[r].querySelector(".bw_accordion_button");l.classList.contains("bw_collapse_show")&&(l.style.maxHeight=l.scrollHeight+"px",l.offsetHeight,l.style.maxHeight="0px",l.classList.remove("bw_collapse_show"),d.classList.add("bw_collapsed"),d.setAttribute("aria-expanded","false"))}if(o)c.style.maxHeight=c.scrollHeight+"px",c.offsetHeight,c.style.maxHeight="0px",c.classList.remove("bw_collapse_show"),t.classList.add("bw_collapsed"),t.setAttribute("aria-expanded","false");else{c.classList.add("bw_collapse_show"),c.style.maxHeight="0px",c.offsetHeight,c.style.maxHeight=c.scrollHeight+"px",t.classList.remove("bw_collapsed"),t.setAttribute("aria-expanded","true");var _=function(e){"max-height"===e.propertyName&&c.classList.contains("bw_collapse_show")&&(c.style.maxHeight="none"),c.removeEventListener("transitionend",_)};c.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:a}}}}function E(e={}){const{title:t,content:a,footer:s,size:n,closeButton:c=!0,onClose:o,className:i=""}=e;function r(e){var t=e.closest(".bw_modal");t&&(t.classList.remove("bw_modal_show"),document.body.style.overflow=""),o&&o()}return{t:"div",a:{class:`bw_modal ${i}`.trim()},c:{t:"div",a:{class:("bw_modal_dialog "+(n?"bw_modal_"+n:"")).trim()},c:{t:"div",a:{class:"bw_modal_content"},c:[(t||c)&&{t:"div",a:{class:"bw_modal_header"},c:[t&&{t:"h5",a:{class:"bw_modal_title"},c:t},c&&{t:"button",a:{type:"button",class:"bw_close","aria-label":"Close",onclick:function(e){r(e.target)}},c:"×"}].filter(Boolean)},a&&{t:"div",a:{class:"bw_modal_body"},c:a},s&&{t:"div",a:{class:"bw_modal_footer"},c:s}].filter(Boolean)}},o:{type:"modal",mounted:function(e){e.addEventListener("click",function(t){t.target===e&&r(e)});var t=function(t){"Escape"===t.key&&e.classList.contains("bw_modal_show")&&r(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 I(t={}){const{title:a,content:s,variant:n="info",autoDismiss:c=!0,delay:o=5e3,position:i="top-right",className:r=""}=t;return{t:"div",a:{class:`bw_toast ${e(n)} ${r}`.trim(),role:"alert","data-position":i},c:[a&&{t:"div",a:{class:"bw_toast_header"},c:[{t:"strong",c:a},{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:"×"}]},s&&{t:"div",a:{class:"bw_toast_body"},c:s}].filter(Boolean),o:{type:"toast",mounted:function(e){requestAnimationFrame(function(){e.classList.add("bw_toast_show")}),c&&setTimeout(function(){e.classList.add("bw_toast_hiding"),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},300)},o)}}}}function q(t={}){const{trigger:a,items:s=[],align:n="start",variant:c="primary",className:o=""}=t;var i;return i="string"==typeof a||void 0===a?{t:"button",a:{class:`bw_btn ${e(c)} bw_dropdown_toggle`,type:"button",onclick:function(e){e.target.closest(".bw_dropdown").querySelector(".bw_dropdown_menu").classList.toggle("bw_dropdown_show")}},c:a||"Dropdown"}:a,{t:"div",a:{class:`bw_dropdown ${o}`.trim()},c:[i,{t:"div",a:{class:("bw_dropdown_menu "+("end"===n?"bw_dropdown_menu_end":"")).trim()},c:s.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 a=e.querySelector(".bw_dropdown_menu");a&&a.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 H(e={}){const{label:t,checked:a=!1,id:s,name:n,disabled:c=!1,className:o="",...i}=e;return{t:"div",a:{class:`bw_form_check bw_form_switch ${o}`.trim()},c:[{t:"input",a:{type:"checkbox",class:"bw_form_check_input bw_switch_input",role:"switch",checked:a,id:s,name:n,disabled:c,...i}},t&&{t:"label",a:{class:"bw_form_check_label",for:s},c:t}].filter(Boolean)}}function j(e={}){const{variant:t="text",width:a,height:s,count:n=1,className:c=""}=e;if("circle"===t){var o=a||s||"3rem";return{t:"div",a:{class:`bw_skeleton bw_skeleton_circle ${c}`.trim(),style:{width:o,height:o}}}}if("rect"===t)return{t:"div",a:{class:`bw_skeleton bw_skeleton_rect ${c}`.trim(),style:{width:a||"100%",height:s||"120px"}}};if(1===n)return{t:"div",a:{class:`bw_skeleton bw_skeleton_text ${c}`.trim(),style:{width:a||"100%",height:s||"1em"}}};for(var i=[],r=0;r<n;r++)i.push({t:"div",a:{class:"bw_skeleton bw_skeleton_text",style:{width:r===n-1?"75%":a||"100%",height:s||"1em"}}});return{t:"div",a:{class:`bw_skeleton_group ${c}`.trim()},c:i}}function D(t={}){const{src:a,alt:s="",initials:n,size:c="md",variant:o="primary",className:i=""}=t;return a?{t:"img",a:{class:`bw_avatar bw_avatar_${c} ${i}`.trim(),src:a,alt:s}}:{t:"div",a:{class:`bw_avatar bw_avatar_${c} ${e(o)} ${i}`.trim()},c:n||""}}function T(e={}){const{items:t=[],showControls:a=!0,showIndicators:s=!0,autoPlay:n=!1,interval:c=5e3,height:o="300px",startIndex:i=0,className:r=""}=e;function l(e,t){var a=e.querySelectorAll(".bw_carousel_slide").length;t<0&&(t=a-1),t>=a&&(t=0),e.setAttribute("data-carousel-index",t),e.querySelector(".bw_carousel_track").style.transform="translateX(-"+100*t+"%)";for(var s=e.querySelectorAll(".bw_carousel_indicator"),n=0;n<s.length;n++)n===t?s[n].classList.add("active"):s[n].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*i+"%)"},c:d}];return a&&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"),a=parseInt(t.getAttribute("data-carousel-index")||"0");l(t,a-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"),a=parseInt(t.getAttribute("data-carousel-index")||"0");l(t,a+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"}}})),s&&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===i?" active":""),type:"button","aria-label":"Go to slide "+(t+1),"data-slide-index":t,onclick:function(e){l(e.target.closest(".bw_carousel"),parseInt(e.target.getAttribute("data-slide-index")))}}}})}),{t:"div",a:{class:("bw_carousel "+r).trim(),style:"height: "+o,tabindex:"0","aria-roledescription":"carousel","data-carousel-index":i},c:_,o:{type:"carousel",state:{activeIndex:i,autoPlay:n,interval:c},mounted:function(e){if(e.addEventListener("keydown",function(t){var a=parseInt(e.getAttribute("data-carousel-index")||"0");"ArrowLeft"===t.key?(t.preventDefault(),l(e,a-1)):"ArrowRight"===t.key&&(t.preventDefault(),l(e,a+1))}),n){var t=setInterval(function(){var t=parseInt(e.getAttribute("data-carousel-index")||"0");l(e,t+1)},c);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");l(e,t+1)},c)})}},unmount:function(e){e._bw_carouselInterval&&clearInterval(e._bw_carouselInterval)}}}}function z(t={}){"string"==typeof t&&(t={label:t});var{value:a=0,label:s,change:n,format:c,prefix:o,suffix:i,icon:r,variant:l,className:d="",style:_}=t;var b=["bw_stat_card",e(l),d].filter(Boolean).join(" ").trim(),u=[];return r&&u.push({t:"div",a:{class:"bw_stat_icon"},c:r}),u.push({t:"div",a:{class:"bw_stat_value"},c:function(e,t){if(o||i)return(o||"")+e+(i||"");switch(t){case"currency":return"$"+Number(e).toLocaleString();case"percent":return e+"%";case"number":return Number(e).toLocaleString();default:return""+e}}(a,c)}),s&&u.push({t:"div",a:{class:"bw_stat_label"},c:s}),null!=n&&u.push({t:"div",a:{class:"bw_stat_change "+(n>=0?"bw_stat_change_up":"bw_stat_change_down")},c:(n>=0?"↑ +":"↓ ")+n+"%"}),{t:"div",a:{class:b,style:_},c:u,o:{type:"stat-card"}}}function O(e={}){var{content:t,text:a="",placement:s="top",className:n=""}=e;return{t:"span",a:{class:("bw_tooltip_wrapper "+n).trim()},c:[t,{t:"span",a:{class:"bw_tooltip bw_tooltip_"+s,role:"tooltip"},c:a}],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 P(e={}){var{trigger:t,title:a,content:s,placement:n="top",className:c=""}=e,o=[a&&{t:"div",a:{class:"bw_popover_header"},c:a},s&&{t:"div",a:{class:"bw_popover_body"},c:s}].filter(Boolean);return{t:"span",a:{class:("bw_popover_wrapper "+c).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_"+n},c:o}],o:{type:"popover",mounted:function(e){var t=function(t){if(!e.contains(t.target)){var a=e.querySelector(".bw_popover");a&&a.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 G(e={}){"string"==typeof e&&(e={placeholder:e});var{placeholder:t="Search...",value:a,onSearch:s,onInput:n,id:c,name:o,className:i=""}=e;return{t:"div",a:{class:("bw_search_input "+i).trim()},c:[{t:"input",a:{type:"search",class:"bw_form_control bw_search_field",placeholder:t,value:a,id:c,name:o,onkeydown:function(e){"Enter"===e.key&&s&&(e.preventDefault(),s(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"),n&&n(e.target.value)}}},{t:"button",a:{type:"button",class:"bw_search_clear","aria-label":"Clear search",style:a?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(),n&&n(""),s&&s("")}},c:"×"}],o:{type:"search-input"}}}function R(e={}){var{min:t=0,max:a=100,step:s=1,value:n=50,label:c,showValue:o=!1,id:i,name:r,disabled:l=!1,className:d="",..._}=e,b=[];if(c||o){var u=[];c&&u.push({t:"span",c:c}),o&&u.push({t:"span",a:{class:"bw_range_value"},c:""+n}),b.push({t:"div",a:{class:"bw_range_label"},c:u})}var m=_.oninput;return o&&(_.oninput=function(e){var t=e.target.closest(".bw_range_wrapper").querySelector(".bw_range_value");t&&(t.textContent=e.target.value),m&&m(e)}),b.push({t:"input",a:{type:"range",class:"bw_range",min:t,max:a,step:s,value:n,id:i,name:r,disabled:l,..._}}),{t:"div",a:{class:("bw_range_wrapper "+d).trim()},c:b,o:{type:"range"}}}function F(e={}){var{src:t,alt:a="",title:s,content:n,reverse:c=!1,imageSize:o="3rem",className:i=""}=e,r=t?{t:"img",a:{class:"bw_media_img",src:t,alt:a,style:"width:"+o+";height:"+o}}:null,l={t:"div",a:{class:"bw_media_body"},c:[s&&{t:"h5",a:{class:"bw_media_title"},c:s},n].filter(Boolean)};return{t:"div",a:{class:("bw_media "+(c?"bw_media_reverse ":"")+i).trim()},c:c?[l,r].filter(Boolean):[r,l].filter(Boolean),o:{type:"media-object"}}}function M(e={}){var{accept:t,multiple:a=!1,onFiles:s,text:n="Drop files here or click to browse",id:c,className:o=""}=e;return{t:"div",a:{class:("bw_file_upload "+o).trim(),tabindex:"0",role:"button","aria-label":n},c:[{t:"div",a:{class:"bw_file_upload_icon"},c:"📁"},{t:"div",a:{class:"bw_file_upload_text"},c:n},{t:"input",a:{type:"file",class:"bw_file_upload_input",accept:t,multiple:a,id:c,onchange:function(e){s&&e.target.files.length&&s(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"),s&&t.dataTransfer.files.length&&s(t.dataTransfer.files)})}}}}function U(t={}){var{items:a=[],className:s=""}=t;return{t:"div",a:{class:("bw_timeline "+s).trim()},c:a.map(function(t){return{t:"div",a:{class:"bw_timeline_item"},c:[{t:"div",a:{class:"bw_timeline_marker "+e(t.variant||"primary")}},{t:"div",a:{class:"bw_timeline_content"},c:[t.date&&{t:"div",a:{class:"bw_timeline_date"},c:t.date},t.title&&{t:"h5",a:{class:"bw_timeline_title"},c:t.title},t.content&&("string"==typeof t.content?{t:"p",a:{class:"bw_timeline_text"},c:t.content}:t.content)].filter(Boolean)}]}}),o:{type:"timeline"}}}function X(e={}){var{steps:t=[],currentStep:a=0,className:s=""}=e;return{t:"div",a:{class:("bw_stepper "+s).trim(),role:"list"},c:t.map(function(e,t){var s=t<a?"completed":t===a?"active":"pending";return{t:"div",a:{class:"bw_step bw_step_"+s,role:"listitem","aria-current":"active"===s?"step":void 0},c:[{t:"div",a:{class:"bw_step_indicator"},c:"completed"===s?"✓":""+(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 V(e={}){var{chips:t=[],placeholder:a="Add...",onAdd:s,onRemove:n,className:c=""}=e;return{t:"div",a:{class:("bw_chip_input "+c).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"),a=t.getAttribute("data-chip-value");t.parentNode.removeChild(t),n&&n(a)}},c:"×"}]}}),{t:"input",a:{type:"text",class:"bw_chip_field",placeholder:a,onkeydown:function(e){if("Enter"===e.key&&e.target.value.trim()){e.preventDefault();var t=e.target.value.trim(),a=e.target.closest(".bw_chip_input"),c=document.createElement("span");c.className="bw_chip",c.setAttribute("data-chip-value",t),c.innerHTML="",c.textContent=t;var o=document.createElement("button");o.type="button",o.className="bw_chip_remove",o.setAttribute("aria-label","Remove "+t),o.textContent="×",o.onclick=function(){c.parentNode.removeChild(c),n&&n(t)},c.appendChild(o),a.insertBefore(c,e.target),e.target.value="",s&&s(t)}if("Backspace"===e.key&&!e.target.value){var i=(a=e.target.closest(".bw_chip_input")).querySelectorAll(".bw_chip");if(i.length){var r=i[i.length-1],l=r.getAttribute("data-chip-value");r.parentNode.removeChild(r),n&&n(l)}}}}}],o:{type:"chip-input"}}}var J={card:{make:t},button:{make:a},container:{make:s},row:{make:n},col:{make:c},nav:{make:o},navbar:{make:i},tabs:{make:r},alert:{make:l},badge:{make:d},progress:{make:_},listGroup:{make:b},breadcrumb:{make:u},form:{make:m},formGroup:{make:p},input:{make:w},textarea:{make:v},select:{make:f},checkbox:{make:h},stack:{make:g},spinner:{make:k},hero:{make:y},featureGrid:{make:x},cta:{make:$},section:{make:L},codeDemo:{make:N},pagination:{make:C},radio:{make:A},buttonGroup:{make:B},accordion:{make:S},modal:{make:E},toast:{make:I},dropdown:{make:q},switch:{make:H},skeleton:{make:j},avatar:{make:D},carousel:{make:T},statCard:{make:z},tooltip:{make:O},popover:{make:P},searchInput:{make:G},range:{make:R},mediaObject:{make:F},fileUpload:{make:M},timeline:{make:U},stepper:{make:X},chipInput:{make:V}};function K(e,t){var a=J[e];if(!a)throw new Error('bw.make: unknown component type "'+e+'". Available: '+Object.keys(J).join(", "));var s=a.make(t||{});return s&&"object"==typeof s&&(s._bwFactory={type:e,props:t||{}}),s}var Q=Object.freeze({__proto__:null,BCCL:J,make:K,makeAccordion:S,makeAlert:l,makeAvatar:D,makeBadge:d,makeBreadcrumb:u,makeButton:a,makeButtonGroup:B,makeCTA:$,makeCard:t,makeCarousel:T,makeCheckbox:h,makeChipInput:V,makeCodeDemo:N,makeCol:c,makeContainer:s,makeDropdown:q,makeFeatureGrid:x,makeFileUpload:M,makeForm:m,makeFormGroup:p,makeHero:y,makeInput:w,makeListGroup:b,makeMediaObject:F,makeModal:E,makeNav:o,makeNavbar:i,makePagination:C,makePopover:P,makeProgress:_,makeRadio:A,makeRange:R,makeRow:n,makeSearchInput:G,makeSection:L,makeSelect:f,makeSkeleton:j,makeSpinner:k,makeStack:g,makeStatCard:z,makeStepper:X,makeSwitch:H,makeTabs:r,makeTextarea:v,makeTimeline:U,makeToast:I,makeTooltip:O,variantClass:e});
20
+ function e(e){return e?0===e.indexOf("outline")?"bw_btn_outline bw_"+e.replace(/^outline[_-]/,""):"bw_"+e:""}function t(t={}){const{title:a,subtitle:n,content:o,footer:c,header:s,image:r,imagePosition:i="top",variant:l,bordered:_=!0,shadow:d,hoverable:b=!1,className:u="",style:w,headerClass:p="",bodyClass:m="",footerClass:v=""}=t,f=["bw_card",e(l),d&&{none:"",sm:"bw_shadow_sm",md:"bw_shadow",lg:"bw_shadow_lg"}[d]||"",_?"":"bw_border_0",b?"bw_card_hoverable":"",u].filter(Boolean).join(" ").trim(),h=[s&&{t:"div",a:{class:`bw_card_header ${p}`.trim()},c:s},r&&("top"===i||"left"===i)&&{t:"img",a:{class:`bw_card_img_${i}`,src:r.src,alt:r.alt||""}},{t:"div",a:{class:`bw_card_body ${m}`.trim()},c:[a&&{t:"h5",a:{class:"bw_card_title"},c:a},n&&{t:"h6",a:{class:"bw_card_subtitle bw_mb_2 bw_text_muted"},c:n},o&&(Array.isArray(o)?o:[o])].flat().filter(Boolean)},r&&("bottom"===i||"right"===i)&&{t:"img",a:{class:`bw_card_img_${i}`,src:r.src,alt:r.alt||""}},c&&{t:"div",a:{class:`bw_card_footer ${v}`.trim()},c:c}].filter(Boolean);return!r||"left"!==i&&"right"!==i?{t:"div",a:{class:f,style:w},c:h,o:{type:"card",state:t.state||{},slots:{title:".bw_card_title",content:".bw_card_body",footer:".bw_card_footer"}}}:{t:"div",a:{class:f,style:w},c:{t:"div",a:{class:"bw_row bw_g_0"},c:h},o:{type:"card",state:t.state||{},slots:{title:".bw_card_title",content:".bw_card_body",footer:".bw_card_footer"}}}}function a(t={}){"string"==typeof t&&(t={text:t});const{text:a,variant:n="primary",size:o,disabled:c=!1,onclick:s,type:r="button",className:i="",style:l}=t;return{t:"button",a:{type:r,class:["bw_btn",e(n),o&&`bw_btn_${o}`,i].filter(Boolean).join(" "),disabled:c,onclick:s,style:l},c:a,o:{type:"button"}}}function n(e={}){const{fluid:t=!1,children:a,className:n=""}=e;return{t:"div",a:{class:`bw_container${t?"-fluid":""} ${n}`.trim()},c:a}}function o(e={}){const{children:t,className:a="",gap:n}=e;return{t:"div",a:{class:`bw_row ${n?`bw_g_${n}`:""} ${a}`.trim()},c:t}}function c(e={}){const{size:t,offset:a,push:n,pull:o,content:c,children:s,className:r=""}=e,i=[];return"object"==typeof t?Object.entries(t).forEach(([e,t])=>{"xs"===e?i.push(`bw_col_${t}`):i.push(`bw_col_${e}_${t}`)}):t?i.push(`bw_col_${t}`):i.push("bw_col"),a&&i.push(`bw_offset_${a}`),n&&i.push(`bw_push_${n}`),o&&i.push(`bw_pull_${o}`),{t:"div",a:{class:`${i.join(" ")} ${r}`.trim()},c:c||s}}function s(e={}){const{items:t=[],pills:a=!1,vertical:n=!1,className:o=""}=e;return{t:"ul",a:{class:`bw_nav ${a?"bw_nav_pills":"bw_nav_tabs"} ${n?"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}}))}}function r(e={}){const{brand:t,brandHref:a="#",items:n=[],dark:o=!0,className:c=""}=e;return{t:"nav",a:{class:`bw_navbar ${o?"bw_navbar_dark":"bw_navbar_light"} ${c}`.trim()},c:{t:"div",a:{class:"bw_container"},c:[t&&{t:"a",a:{href:a,class:"bw_navbar_brand"},c:t},n.length>0&&{t:"div",a:{class:"bw_navbar_nav"},c:n.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:n.findIndex(e=>e.active)}}}}function i(e={}){const{tabs:t=[],activeIndex:a=0}=e;let n=a;function o(e,t){var a=e.querySelectorAll(".bw_nav_link"),n=e.querySelectorAll(".bw_tab_pane");t<0||t>=a.length||(a.forEach(function(e){e.classList.remove("active"),e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")}),n.forEach(function(e){e.classList.remove("active")}),a[t].classList.add("active"),a[t].setAttribute("aria-selected","true"),a[t].setAttribute("tabindex","0"),n[t].classList.add("active"),e._bw_state&&(e._bw_state.activeIndex=t))}return t.forEach((e,t)=>{e.active&&(n=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===n?"active":""),type:"button",role:"tab",tabindex:t===n?"0":"-1","aria-selected":t===n?"true":"false",onclick:e=>{o(e.target.closest(".bw_tabs"),t)}},c:e.label}}))},{t:"div",a:{class:"bw_tab_content"},c:t.map((e,t)=>({t:"div",a:{class:"bw_tab_pane "+(t===n?"active":""),role:"tabpanel"},c:e.content}))}],o:{type:"tabs",state:{activeIndex:n},handle:{setActiveTab:o,getActiveTab:function(e){return e._bw_state&&e._bw_state.activeIndex||0}},mounted:function(e){var t=e.querySelector('[role="tablist"]');t&&t.addEventListener("keydown",function(e){for(var a=t.querySelectorAll('[role="tab"]'),n=-1,o=0;o<a.length;o++)if(a[o]===e.target){n=o;break}if(-1!==n){var c=-1;"ArrowLeft"===e.key||"ArrowUp"===e.key?(e.preventDefault(),c=n>0?n-1:a.length-1):"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),c=n<a.length-1?n+1:0):"Home"===e.key?(e.preventDefault(),c=0):"End"===e.key&&(e.preventDefault(),c=a.length-1),c>=0&&(a[c].focus(),a[c].click())}})}}}}function l(t={}){"string"==typeof t&&(t={content:t});const{content:a,variant:n="info",dismissible:o=!1,className:c=""}=t;return{t:"div",a:{class:`bw_alert ${e(n)} ${o?"bw_alert_dismissible":""} ${c}`.trim(),role:"alert"},c:[a,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),o:{type:"alert",handle:{dismiss:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)}}}}}function _(t={}){"string"==typeof t&&(t={text:t});const{text:a,variant:n="primary",size:o,pill:c=!1,className:s=""}=t,r="sm"===o?" bw_badge_sm":"lg"===o?" bw_badge_lg":"";return{t:"span",a:{class:`bw_badge ${e(n)}${r} ${c?"bw_badge_pill":""} ${s}`.trim()},c:a}}function d(t={}){const{value:a=0,max:n=100,variant:o="primary",striped:c=!1,animated:s=!1,label:r,height:i}=t,l=Math.round(a/n*100);return{t:"div",a:{class:"bw_progress",style:i?{height:`${i}px`}:void 0},c:{t:"div",a:{class:["bw_progress_bar",e(o),c&&"bw_progress_bar_striped",s&&"bw_progress_bar_animated"].filter(Boolean).join(" "),role:"progressbar",style:{width:`${l}%`},"aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":n},c:r||`${l}%`},o:{type:"progress",handle:{setValue:function(e,t){var a=e.querySelector(".bw_progress_bar");if(a){var n=parseInt(a.getAttribute("aria-valuemax"))||100,o=Math.round(t/n*100);a.style.width=o+"%",a.setAttribute("aria-valuenow",t),a.textContent=o+"%"}},getValue:function(e){var t=e.querySelector(".bw_progress_bar");return t&&parseInt(t.getAttribute("aria-valuenow"))||0}}}}}function b(e={}){const{items:t=[],flush:a=!1,interactive:n=!1}=e;return{t:"div",a:{class:("bw_list_group "+(a?"bw_list_group_flush":"")).trim()},c:t.map(e=>{const t="object"==typeof e,a=t?e.text:e,o=!!t&&e.active,c=!!t&&e.disabled,s=t?e.href:null,r=t?e.onclick:null;return n||s||r?{t:"a",a:{class:["bw_list_group_item",o&&"active",c&&"disabled"].filter(Boolean).join(" "),href:s||"#",onclick:r||(e=>{s||e.preventDefault()}),style:c?"pointer-events: none; opacity: 0.65;":""},c:a}:{t:"div",a:{class:["bw_list_group_item",o&&"active",c&&"disabled"].filter(Boolean).join(" ")},c:a}})}}function u(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 w(e={}){const{children:t,onsubmit:a,className:n=""}=e;return{t:"form",a:{class:n,onsubmit:a||(e=>e.preventDefault())},c:t}}function p(e={}){var{label:t,input:a,help:n,id:o,validation:c,feedback:s,required:r}=e,i=a;if(c&&a&&a.a){i={t:a.t,a:Object.assign({},a.a),c:a.c,o:a.o};var l="valid"===c?"bw_is_valid":"invalid"===c?"bw_is_invalid":"";l&&(i.a.class=((i.a.class||"")+" "+l).trim())}return{t:"div",a:{class:"bw_form_group"},c:[t&&{t:"label",a:{for:o,class:"bw_form_label"},c:r?[t,{t:"span",a:{class:"bw_text_danger bw_ms_1"},c:"*"}]:t},i,s&&c&&{t:"div",a:{class:"valid"===c?"bw_valid_feedback":"bw_invalid_feedback"},c:s},n&&{t:"small",a:{class:"bw_form_text bw_text_muted"},c:n}].filter(Boolean)}}function m(e={}){const{type:t="text",placeholder:a,value:n,id:o,name:c,disabled:s=!1,readonly:r=!1,required:i=!1,className:l="",style:_,...d}=e;return{t:"input",a:{type:t,class:`bw_form_control ${l}`.trim(),placeholder:a,value:n,id:o,name:c,style:_,disabled:s,readonly:r,required:i,...d}}}function v(e={}){const{placeholder:t,value:a,rows:n=3,id:o,name:c,disabled:s=!1,readonly:r=!1,required:i=!1,className:l="",..._}=e;return{t:"textarea",a:{class:`bw_form_control ${l}`.trim(),placeholder:t,rows:n,id:o,name:c,disabled:s,readonly:r,required:i,..._},c:a}}function f(e={}){const{options:t=[],value:a,id:n,name:o,disabled:c=!1,required:s=!1,className:r="",...i}=e;return{t:"select",a:{class:`bw_form_control ${r}`.trim(),id:n,name:o,disabled:c,required:s,...i},c:t.map(e=>({t:"option",a:{value:e.value,selected:e.value===a},c:e.text||e.value}))}}function h(e={}){const{label:t,checked:a=!1,id:n,name:o,disabled:c=!1,value:s,className:r="",...i}=e;return{t:"div",a:{class:`bw_form_check ${r}`.trim()},c:[{t:"input",a:{type:"checkbox",class:"bw_form_check_input",checked:a,id:n,name:o,disabled:c,value:s,...i}},t&&{t:"label",a:{class:"bw_form_check_label",for:n},c:t}].filter(Boolean)}}function g(e={}){const{children:t,direction:a="vertical",gap:n=3,className:o=""}=e;return{t:"div",a:{class:`bw_${"vertical"===a?"vstack":"hstack"} bw_gap_${n} ${o}`.trim()},c:t}}function y(t={}){const{variant:a="primary",size:n="md",type:o="border"}=t;return{t:"div",a:{class:`bw_spinner_${o} bw_spinner_${o}-${n} ${e(a)}`,role:"status"},c:{t:"span",a:{class:"bw_visually_hidden"},c:"Loading..."}}}function k(t={}){const{title:a,subtitle:n,content:o,variant:c="primary",size:s="lg",centered:r=!0,overlay:i=!1,backgroundImage:l,actions:_,className:d=""}=t,b={sm:"bw_py_3",md:"bw_py_4",lg:"bw_py_5",xl:"bw_py_6"};return{t:"section",a:{class:`bw_hero ${e(c)} ${b[s]||b.lg} ${r?"bw_text_center":""} ${d}`.trim(),style:l?`background-image: url('${l}'); background-size: cover; background-position: center;`:void 0},c:[i&&{t:"div",a:{class:"bw_hero_overlay"}},{t:"div",a:{class:"bw_container"},c:{t:"div",a:{class:"bw_hero_content"},c:[a&&{t:"h1",a:{class:"bw_hero_title bw_display_4 bw_mb_3"},c:a},n&&{t:"p",a:{class:"bw_hero_subtitle bw_lead bw_mb_4"},c:n},o,_&&{t:"div",a:{class:"bw_hero_actions bw_mt_4"},c:_}].filter(Boolean)}}].filter(Boolean)}}function x(e={}){const{features:t=[],columns:a=3,centered:n=!0,iconSize:o="3rem",className:c=""}=e,s="bw_col_md_"+12/a;return{t:"div",a:{class:`bw_feature_grid ${c}`.trim()},c:{t:"div",a:{class:"bw_row bw_g_4"},c:t.map(e=>({t:"div",a:{class:s},c:{t:"div",a:{class:"bw_feature "+(n?"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)}}))}}}function $(e={}){const{title:t,description:a,actions:n,variant:o="light",centered:c=!0,className:s=""}=e;return{t:"section",a:{class:`bw_cta bw_bg_${o} bw_py_5 ${s}`.trim()},c:{t:"div",a:{class:"bw_container"},c:{t:"div",a:{class:"bw_cta_content "+(c?"bw_text_center":"")},c:[t&&{t:"h2",a:{class:"bw_cta_title bw_mb_3"},c:t},a&&{t:"p",a:{class:"bw_cta_description bw_lead bw_mb_4"},c:a},n&&{t:"div",a:{class:"bw_cta_actions"},c:n}].filter(Boolean)}}}}function L(e={}){const{title:t,subtitle:a,content:n,variant:o="default",spacing:c="md",className:s=""}=e,r={sm:"bw_py_3",md:"bw_py_4",lg:"bw_py_5",xl:"bw_py_6"};return{t:"section",a:{class:`bw_section ${r[c]||r.md} ${"default"!==o?`bw_bg_${o}`:""} ${s}`.trim()},c:{t:"div",a:{class:"bw_container"},c:[(t||a)&&{t:"div",a:{class:"bw_section_header bw_text_center bw_mb_5"},c:[t&&{t:"h2",a:{class:"bw_section_title"},c:t},a&&{t:"p",a:{class:"bw_section_subtitle bw_text_muted"},c:a}].filter(Boolean)},n].filter(Boolean)}}}function N(e={}){const{title:t,description:a,code:n,result:o,language:c="javascript"}=e;Math.random().toString(36).substr(2,9);const s=[{label:"Result",active:!0,content:o}];n&&s.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(n).then(function(){var t=e.target,a=t.textContent;t.textContent="Copied!",t.classList.add("bw_code_copy_btn_copied"),setTimeout(function(){t.textContent=a,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:n,lang:"javascript"===c?"js":c,readOnly:!0,height:"auto"}):{t:"pre",a:{class:"bw_code_pre"},c:{t:"code",a:{class:`bw_code_block language-${c}`},c:n}}]}});return{t:"div",a:{class:"bw_code_demo"},c:[t&&{t:"h3",c:t},a&&{t:"p",a:{class:"bw_text_muted bw_mb_3"},c:a},i({tabs:s})].filter(Boolean)}}function C(e={}){const{pages:t=1,currentPage:a=1,onPageChange:n,size:o,className:c=""}=e;function s(e){return function(o){o.preventDefault(),e<1||e>t||e===a||n&&n(e)}}const r=[];r.push({t:"li",a:{class:("bw_page_item "+(a<=1?"bw_disabled":"")).trim()},c:{t:"button",a:{class:"bw_page_link",type:"button",onclick:s(a-1),"aria-label":"Previous",disabled:a<=1||void 0},c:"‹"}});for(var i=1;i<=t;i++)(function(e){r.push({t:"li",a:{class:("bw_page_item "+(e===a?"bw_active":"")).trim()},c:{t:"button",a:{class:"bw_page_link",type:"button",onclick:s(e),"aria-current":e===a?"page":void 0},c:""+e}})})(i);return r.push({t:"li",a:{class:("bw_page_item "+(a>=t?"bw_disabled":"")).trim()},c:{t:"button",a:{class:"bw_page_link",type:"button",onclick:s(a+1),"aria-label":"Next",disabled:a>=t||void 0},c:"›"}}),{t:"nav",a:{"aria-label":"Pagination"},c:{t:"ul",a:{class:`bw_pagination ${o?"bw_pagination_"+o:""} ${c}`.trim()},c:r},o:{type:"pagination",state:{currentPage:a,pages:t},handle:{setPage:function(e,a){if(!(a<1||a>t)){for(var o=e.querySelectorAll(".bw_page_item"),c=0;c<o.length;c++)o[c].classList.remove("bw_active");o[a]&&o[a].classList.add("bw_active"),e._bw_state&&(e._bw_state.currentPage=a),n&&n(a)}},getPage:function(e){return e._bw_state&&e._bw_state.currentPage||1}}}}}function S(e={}){const{label:t,name:a,value:n,checked:o=!1,id:c,disabled:s=!1,className:r="",...i}=e;return{t:"div",a:{class:`bw_form_check ${r}`.trim()},c:[{t:"input",a:{type:"radio",class:"bw_form_check_input",name:a,value:n,checked:o,id:c,disabled:s,...i}},t&&{t:"label",a:{class:"bw_form_check_label",for:c},c:t}].filter(Boolean)}}function A(e={}){const{children:t,size:a,vertical:n=!1,className:o=""}=e;return{t:"div",a:{class:`${n?"bw_btn_group_vertical":"bw_btn_group"} ${a?"bw_btn_group_"+a:""} ${o}`.trim(),role:"group"},c:t}}function I(e={}){const{items:t=[],multiOpen:a=!1,className:n=""}=e;return{t:"div",a:{class:`bw_accordion ${n}`.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",onclick:function(e){var t=e.target.closest(".bw_accordion_button"),n=t.closest(".bw_accordion"),o=t.closest(".bw_accordion_item"),c=o.querySelector(".bw_accordion_collapse"),s=c.classList.contains("bw_collapse_show");if(!a)for(var r=n.querySelectorAll(".bw_accordion_item"),i=0;i<r.length;i++)if(r[i]!==o){var l=r[i].querySelector(".bw_accordion_collapse"),_=r[i].querySelector(".bw_accordion_button");l.classList.contains("bw_collapse_show")&&(l.style.maxHeight=l.scrollHeight+"px",l.offsetHeight,l.style.maxHeight="0px",l.classList.remove("bw_collapse_show"),_.classList.add("bw_collapsed"),_.setAttribute("aria-expanded","false"))}if(s)c.style.maxHeight=c.scrollHeight+"px",c.offsetHeight,c.style.maxHeight="0px",c.classList.remove("bw_collapse_show"),t.classList.add("bw_collapsed"),t.setAttribute("aria-expanded","false");else{c.classList.add("bw_collapse_show"),c.style.maxHeight="0px",c.offsetHeight,c.style.maxHeight=c.scrollHeight+"px",t.classList.remove("bw_collapsed"),t.setAttribute("aria-expanded","true");var d=function(e){"max-height"===e.propertyName&&c.classList.contains("bw_collapse_show")&&(c.style.maxHeight="none"),c.removeEventListener("transitionend",d)};c.addEventListener("transitionend",d)}}},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:a},handle:{toggle:function(e,t){var a=e.querySelectorAll(".bw_accordion_item");if(!(t<0||t>=a.length)){var n=a[t].querySelector(".bw_accordion_button");n&&n.click()}},openAll:function(e){for(var t=e.querySelectorAll(".bw_accordion_item"),a=0;a<t.length;a++){var n=t[a].querySelector(".bw_accordion_collapse"),o=t[a].querySelector(".bw_accordion_button");n.classList.contains("bw_collapse_show")||(n.classList.add("bw_collapse_show"),n.style.maxHeight="none",o.classList.remove("bw_collapsed"),o.setAttribute("aria-expanded","true"))}},closeAll:function(e){for(var t=e.querySelectorAll(".bw_accordion_item"),a=0;a<t.length;a++){var n=t[a].querySelector(".bw_accordion_collapse"),o=t[a].querySelector(".bw_accordion_button");n.classList.contains("bw_collapse_show")&&(n.style.maxHeight=n.scrollHeight+"px",n.offsetHeight,n.style.maxHeight="0px",n.classList.remove("bw_collapse_show"),o.classList.add("bw_collapsed"),o.setAttribute("aria-expanded","false"))}}}}}}function q(e={}){const{title:t,content:a,footer:n,size:o,closeButton:c=!0,onClose:s,className:r=""}=e;function i(e){var t=e.closest(".bw_modal");t&&(t.classList.remove("bw_modal_show"),document.body.style.overflow=""),s&&s()}return{t:"div",a:{class:`bw_modal ${r}`.trim()},c:{t:"div",a:{class:("bw_modal_dialog "+(o?"bw_modal_"+o:"")).trim()},c:{t:"div",a:{class:"bw_modal_content"},c:[(t||c)&&{t:"div",a:{class:"bw_modal_header"},c:[t&&{t:"h5",a:{class:"bw_modal_title"},c:t},c&&{t:"button",a:{type:"button",class:"bw_close","aria-label":"Close",onclick:function(e){i(e.target)}},c:"×"}].filter(Boolean)},a&&{t:"div",a:{class:"bw_modal_body"},c:a},n&&{t:"div",a:{class:"bw_modal_footer"},c:n}].filter(Boolean)}},o:{type:"modal",handle:{open:function(e){e.classList.add("bw_modal_show"),e.style.display="flex",document.body.style.overflow="hidden"},close:function(e){i(e)}},mounted:function(e){e.addEventListener("click",function(t){t.target===e&&i(e)});var t=function(t){"Escape"===t.key&&e.classList.contains("bw_modal_show")&&i(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 B(t={}){const{title:a,content:n,variant:o="info",autoDismiss:c=!0,delay:s=5e3,position:r="top-right",className:i=""}=t;return{t:"div",a:{class:`bw_toast ${e(o)} bw_toast_${r.replace(/-/g,"_")} ${i}`.trim(),role:"alert"},c:[a&&{t:"div",a:{class:"bw_toast_header"},c:[{t:"strong",c:a},{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:"×"}]},n&&{t:"div",a:{class:"bw_toast_body"},c:n}].filter(Boolean),o:{type:"toast",handle:{dismiss:function(e){e.classList.add("bw_toast_hiding"),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},300)}},mounted:function(e){requestAnimationFrame(function(){e.classList.add("bw_toast_show")}),c&&setTimeout(function(){e.classList.add("bw_toast_hiding"),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},300)},s)}}}}function E(t={}){const{trigger:a,items:n=[],align:o="start",variant:c="primary",className:s=""}=t;var r;return r="string"==typeof a||void 0===a?{t:"button",a:{class:`bw_btn ${e(c)} bw_dropdown_toggle`,type:"button",onclick:function(e){e.target.closest(".bw_dropdown").querySelector(".bw_dropdown_menu").classList.toggle("bw_dropdown_show")}},c:a||"Dropdown"}:a,{t:"div",a:{class:`bw_dropdown ${s}`.trim()},c:[r,{t:"div",a:{class:("bw_dropdown_menu "+("end"===o?"bw_dropdown_menu_end":"")).trim()},c:n.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 a=e.querySelector(".bw_dropdown_menu");a&&a.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 H(e={}){const{label:t,checked:a=!1,id:n,name:o,disabled:c=!1,className:s="",...r}=e;return{t:"div",a:{class:`bw_form_check bw_form_switch ${s}`.trim()},c:[{t:"input",a:{type:"checkbox",class:"bw_form_check_input bw_switch_input",role:"switch",checked:a,id:n,name:o,disabled:c,...r}},t&&{t:"label",a:{class:"bw_form_check_label",for:n},c:t}].filter(Boolean)}}function T(e={}){const{variant:t="text",width:a,height:n,count:o=1,className:c=""}=e;if("circle"===t){var s=a||n||"3rem";return{t:"div",a:{class:`bw_skeleton bw_skeleton_circle ${c}`.trim(),style:{width:s,height:s}}}}if("rect"===t)return{t:"div",a:{class:`bw_skeleton bw_skeleton_rect ${c}`.trim(),style:{width:a||"100%",height:n||"120px"}}};if(1===o)return{t:"div",a:{class:`bw_skeleton bw_skeleton_text ${c}`.trim(),style:{width:a||"100%",height:n||"1em"}}};for(var r=[],i=0;i<o;i++)r.push({t:"div",a:{class:"bw_skeleton bw_skeleton_text",style:{width:i===o-1?"75%":a||"100%",height:n||"1em"}}});return{t:"div",a:{class:`bw_skeleton_group ${c}`.trim()},c:r}}function D(t={}){const{src:a,alt:n="",initials:o,size:c="md",variant:s="primary",className:r=""}=t;return a?{t:"img",a:{class:`bw_avatar bw_avatar_${c} ${r}`.trim(),src:a,alt:n}}:{t:"div",a:{class:`bw_avatar bw_avatar_${c} ${e(s)} ${r}`.trim()},c:o||""}}function j(e={}){const{items:t=[],showControls:a=!0,showIndicators:n=!0,autoPlay:o=!1,interval:c=5e3,height:s="300px",startIndex:r=0,className:i=""}=e;function l(e,t){var a=e.querySelectorAll(".bw_carousel_slide").length;t<0&&(t=a-1),t>=a&&(t=0),e._bw_carouselIndex=t,e.querySelector(".bw_carousel_track").style.transform="translateX(-"+100*t+"%)";for(var n=e.querySelectorAll(".bw_carousel_indicator"),o=0;o<n.length;o++)o===t?n[o].classList.add("active"):n[o].classList.remove("active")}var _=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}}),d=[{t:"div",a:{class:"bw_carousel_track",style:"transform: translateX(-"+100*r+"%)"},c:_}];return a&&t.length>1&&(d.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");l(t,(t._bw_carouselIndex||0)-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"}}}),d.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");l(t,(t._bw_carouselIndex||0)+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"}}})),n&&t.length>1&&d.push({t:"div",a:{class:"bw_carousel_indicators"},c:t.map(function(e,t){return{t:"button",a:{class:"bw_carousel_indicator"+(t===r?" active":""),type:"button","aria-label":"Go to slide "+(t+1),onclick:function(e){l(e.target.closest(".bw_carousel"),t)}}}})}),{t:"div",a:{class:("bw_carousel "+i).trim(),style:"height: "+s,tabindex:"0","aria-roledescription":"carousel"},c:d,o:{type:"carousel",state:{activeIndex:r,autoPlay:o,interval:c},handle:{goToSlide:function(e,t){l(e,t)},next:function(e){l(e,(e._bw_carouselIndex||0)+1)},prev:function(e){l(e,(e._bw_carouselIndex||0)-1)},getActiveIndex:function(e){return e._bw_carouselIndex||0},pause:function(e){e._bw_carouselInterval&&(clearInterval(e._bw_carouselInterval),e._bw_carouselInterval=null)},play:function(e){if(!e._bw_carouselInterval&&e._bw_state){var t=e._bw_state.interval||5e3;e._bw_carouselInterval=setInterval(function(){l(e,(e._bw_carouselIndex||0)+1)},t)}}},mounted:function(e){if(e._bw_carouselIndex=r,e.addEventListener("keydown",function(t){var a=e._bw_carouselIndex||0;"ArrowLeft"===t.key?(t.preventDefault(),l(e,a-1)):"ArrowRight"===t.key&&(t.preventDefault(),l(e,a+1))}),o){var t=setInterval(function(){var t=e._bw_carouselIndex||0;l(e,t+1)},c);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=e._bw_carouselIndex||0;l(e,t+1)},c)})}},unmount:function(e){e._bw_carouselInterval&&clearInterval(e._bw_carouselInterval)}}}}function z(t={}){"string"==typeof t&&(t={label:t});var{value:a=0,label:n,change:o,format:c,prefix:s,suffix:r,icon:i,variant:l,className:_="",style:d}=t;var b=["bw_stat_card",e(l),_].filter(Boolean).join(" ").trim(),u=[];return i&&u.push({t:"div",a:{class:"bw_stat_icon"},c:i}),u.push({t:"div",a:{class:"bw_stat_value"},c:function(e,t){if(s||r)return(s||"")+e+(r||"");switch(t){case"currency":return"$"+Number(e).toLocaleString();case"percent":return e+"%";case"number":return Number(e).toLocaleString();default:return""+e}}(a,c)}),n&&u.push({t:"div",a:{class:"bw_stat_label"},c:n}),null!=o&&u.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:b,style:d},c:u,o:{type:"stat-card",slots:{value:".bw_stat_value",label:".bw_stat_label"}}}}function O(e={}){var{content:t,text:a="",placement:n="top",className:o=""}=e;return{t:"span",a:{class:("bw_tooltip_wrapper "+o).trim()},c:[t,{t:"span",a:{class:"bw_tooltip bw_tooltip_"+n,role:"tooltip"},c:a}],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 P(e={}){var{trigger:t,title:a,content:n,placement:o="top",className:c=""}=e,s=[a&&{t:"div",a:{class:"bw_popover_header"},c:a},n&&{t:"div",a:{class:"bw_popover_body"},c:n}].filter(Boolean);return{t:"span",a:{class:("bw_popover_wrapper "+c).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:s}],o:{type:"popover",mounted:function(e){var t=function(t){if(!e.contains(t.target)){var a=e.querySelector(".bw_popover");a&&a.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 M(e={}){"string"==typeof e&&(e={placeholder:e});var{placeholder:t="Search...",value:a,onSearch:n,onInput:o,id:c,name:s,className:r=""}=e;return{t:"div",a:{class:("bw_search_input "+r).trim()},c:[{t:"input",a:{type:"search",class:"bw_form_control bw_search_field",placeholder:t,value:a,id:c,name:s,onkeydown:function(e){"Enter"===e.key&&n&&(e.preventDefault(),n(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:a?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(""),n&&n("")}},c:"×"}],o:{type:"search-input"}}}function R(e={}){var{min:t=0,max:a=100,step:n=1,value:o=50,label:c,showValue:s=!1,id:r,name:i,disabled:l=!1,className:_="",...d}=e,b=[];if(c||s){var u=[];c&&u.push({t:"span",c:c}),s&&u.push({t:"span",a:{class:"bw_range_value"},c:""+o}),b.push({t:"div",a:{class:"bw_range_label"},c:u})}var w=d.oninput;return s&&(d.oninput=function(e){var t=e.target.closest(".bw_range_wrapper").querySelector(".bw_range_value");t&&(t.textContent=e.target.value),w&&w(e)}),b.push({t:"input",a:{type:"range",class:"bw_range",min:t,max:a,step:n,value:o,id:r,name:i,disabled:l,...d}}),{t:"div",a:{class:("bw_range_wrapper "+_).trim()},c:b,o:{type:"range"}}}function G(e={}){var{src:t,alt:a="",title:n,content:o,reverse:c=!1,imageSize:s="3rem",className:r=""}=e,i=t?{t:"img",a:{class:"bw_media_img",src:t,alt:a,style:"width:"+s+";height:"+s}}:null,l={t:"div",a:{class:"bw_media_body"},c:[n&&{t:"h5",a:{class:"bw_media_title"},c:n},o].filter(Boolean)};return{t:"div",a:{class:("bw_media "+(c?"bw_media_reverse ":"")+r).trim()},c:c?[l,i].filter(Boolean):[i,l].filter(Boolean),o:{type:"media-object"}}}function V(e={}){var{accept:t,multiple:a=!1,onFiles:n,text:o="Drop files here or click to browse",id:c,className:s=""}=e;return{t:"div",a:{class:("bw_file_upload "+s).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:a,id:c,onchange:function(e){n&&e.target.files.length&&n(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"),n&&t.dataTransfer.files.length&&n(t.dataTransfer.files)})}}}}function F(t={}){var{items:a=[],className:n=""}=t;return{t:"div",a:{class:("bw_timeline "+n).trim()},c:a.map(function(t){return{t:"div",a:{class:"bw_timeline_item"},c:[{t:"div",a:{class:"bw_timeline_marker "+e(t.variant||"primary")}},{t:"div",a:{class:"bw_timeline_content"},c:[t.date&&{t:"div",a:{class:"bw_timeline_date"},c:t.date},t.title&&{t:"h5",a:{class:"bw_timeline_title"},c:t.title},t.content&&("string"==typeof t.content?{t:"p",a:{class:"bw_timeline_text"},c:t.content}:t.content)].filter(Boolean)}]}}),o:{type:"timeline"}}}function U(e={}){var{steps:t=[],currentStep:a=0,className:n=""}=e;return{t:"div",a:{class:("bw_stepper "+n).trim(),role:"list"},c:t.map(function(e,t){var n=t<a?"completed":t===a?"active":"pending";return{t:"div",a:{class:"bw_step bw_step_"+n,role:"listitem","aria-current":"active"===n?"step":void 0},c:[{t:"div",a:{class:"bw_step_indicator"},c:"completed"===n?"✓":""+(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 X(e={}){var{chips:t=[],placeholder:a="Add...",onAdd:n,onRemove:o,className:c=""}=e;return{t:"div",a:{class:("bw_chip_input "+c).trim()},c:[...t.map(function(e){return{t:"span",a:{class:"bw_chip"},c:[e,{t:"button",a:{type:"button",class:"bw_chip_remove","aria-label":"Remove "+e,onclick:function(t){var a=t.target.closest(".bw_chip");a.parentNode.removeChild(a),o&&o(e)}},c:"×"}]}}),{t:"input",a:{type:"text",class:"bw_chip_field",placeholder:a,onkeydown:function(e){if("Enter"===e.key&&e.target.value.trim()){e.preventDefault();var t=e.target.value.trim(),a=e.target.closest(".bw_chip_input"),c=document.createElement("span");c.className="bw_chip",c._bw_chipValue=t,c.innerHTML="",c.textContent=t;var s=document.createElement("button");s.type="button",s.className="bw_chip_remove",s.setAttribute("aria-label","Remove "+t),s.textContent="×",s.onclick=function(){c.parentNode.removeChild(c),o&&o(t)},c.appendChild(s),a.insertBefore(c,e.target),e.target.value="",n&&n(t)}if("Backspace"===e.key&&!e.target.value){var r=(a=e.target.closest(".bw_chip_input")).querySelectorAll(".bw_chip");if(r.length){var i=r[r.length-1],l=i._bw_chipValue||i.firstChild.textContent;i.parentNode.removeChild(i),o&&o(l)}}}}}],o:{type:"chip-input",handle:{addChip:function(e,t){if(t){var a=e.querySelector(".bw_chip_field"),n=document.createElement("span");n.className="bw_chip",n._bw_chipValue=t,n.textContent=t;var o=document.createElement("button");o.type="button",o.className="bw_chip_remove",o.setAttribute("aria-label","Remove "+t),o.textContent="×",o.onclick=function(){n.parentNode.removeChild(n)},n.appendChild(o),e.insertBefore(n,a)}},removeChip:function(e,t){for(var a=e.querySelectorAll(".bw_chip"),n=0;n<a.length;n++)if((a[n]._bw_chipValue||a[n].firstChild.textContent)===t)return void a[n].parentNode.removeChild(a[n])},getChips:function(e){for(var t=e.querySelectorAll(".bw_chip"),a=[],n=0;n<t.length;n++)a.push(t[n]._bw_chipValue||t[n].firstChild.textContent);return a},clear:function(e){for(var t=e.querySelectorAll(".bw_chip"),a=t.length-1;a>=0;a--)t[a].parentNode.removeChild(t[a])}}}}}var J={card:{make:t},button:{make:a},container:{make:n},row:{make:o},col:{make:c},nav:{make:s},navbar:{make:r},tabs:{make:i},alert:{make:l},badge:{make:_},progress:{make:d},listGroup:{make:b},breadcrumb:{make:u},form:{make:w},formGroup:{make:p},input:{make:m},textarea:{make:v},select:{make:f},checkbox:{make:h},stack:{make:g},spinner:{make:y},hero:{make:k},featureGrid:{make:x},cta:{make:$},section:{make:L},codeDemo:{make:N},pagination:{make:C},radio:{make:S},buttonGroup:{make:A},accordion:{make:I},modal:{make:q},toast:{make:B},dropdown:{make:E},switch:{make:H},skeleton:{make:T},avatar:{make:D},carousel:{make:j},statCard:{make:z},tooltip:{make:O},popover:{make:P},searchInput:{make:M},range:{make:R},mediaObject:{make:G},fileUpload:{make:V},timeline:{make:F},stepper:{make:U},chipInput:{make:X}};function K(e,t){var a=J[e];if(!a)throw new Error('bw.make: unknown component type "'+e+'". Available: '+Object.keys(J).join(", "));var n=a.make(t||{});return n&&"object"==typeof n&&(n._bwFactory={type:e,props:t||{}}),n}var Q=Object.freeze({__proto__:null,BCCL:J,make:K,makeAccordion:I,makeAlert:l,makeAvatar:D,makeBadge:_,makeBreadcrumb:u,makeButton:a,makeButtonGroup:A,makeCTA:$,makeCard:t,makeCarousel:j,makeCheckbox:h,makeChipInput:X,makeCodeDemo:N,makeCol:c,makeContainer:n,makeDropdown:E,makeFeatureGrid:x,makeFileUpload:V,makeForm:w,makeFormGroup:p,makeHero:k,makeInput:m,makeListGroup:b,makeMediaObject:G,makeModal:q,makeNav:s,makeNavbar:r,makePagination:C,makePopover:P,makeProgress:d,makeRadio:S,makeRange:R,makeRow:o,makeSearchInput:M,makeSection:L,makeSelect:f,makeSkeleton:T,makeSpinner:y,makeStack:g,makeStatCard:z,makeStepper:U,makeSwitch:H,makeTabs:i,makeTextarea:v,makeTimeline:F,makeToast:B,makeTooltip:O,variantClass:e});
21
21
  /**
22
22
  * bitwrench-bccl-entry.js — Standalone entry point for BCCL component library.
23
23
  *
@@ -36,5 +36,5 @@ function e(e){return e?0===e.indexOf("outline")?"bw_btn_outline bw_"+e.replace(/
36
36
  *
37
37
  * @module bitwrench-bccl
38
38
  * @license BSD-2-Clause
39
- */function W(t){t&&(Object.entries(Q).forEach(function(e){var a=e[0],s=e[1];0===a.indexOf("make")&&(t[a]=s)}),t.make=K,t.BCCL=J,t.variantClass=e,"function"==typeof t.renderComponent&&Object.entries(Q).forEach(function(e){var a=e[0],s=e[1];if(0===a.indexOf("make")){var n="create"+a.substring(4);t[n]=function(e){var a=s(e);return t.renderComponent(a)}}}))}"undefined"!=typeof window&&void 0!==window.bw?W(window.bw):"undefined"!=typeof globalThis&&void 0!==globalThis.bw&&W(globalThis.bw);export{J as BCCL,K as make,W as registerBCCL,e as variantClass};
39
+ */function W(t){t&&(Object.entries(Q).forEach(function(e){var a=e[0],n=e[1];0===a.indexOf("make")&&(t[a]=n)}),t.make=K,t.BCCL=J,t.variantClass=e,"function"==typeof t.createDOM&&Object.entries(Q).forEach(function(e){var a=e[0],n=e[1];if(0===a.indexOf("make")){var o="create"+a.substring(4);t[o]=function(e){return t.createDOM(n(e))}}}))}"undefined"!=typeof window&&void 0!==window.bw?W(window.bw):"undefined"!=typeof globalThis&&void 0!==globalThis.bw&&W(globalThis.bw);export{J as BCCL,K as make,W as registerBCCL,e as variantClass};
40
40
  //# sourceMappingURL=bitwrench-bccl.esm.min.js.map