flyonui
Version:
The easiest, free and open-source Tailwind CSS component library with semantic classes.
65 lines • 239 kB
JavaScript
var e={66:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(392),n=i(709);
/*
* HSDataTable
* @version: 3.0.1
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
class o extends n.A{constructor(e,t,i){var s,n,o,l,r,a,c,h,d,u,p,m,g,v,f,w,y,b,C,L,S,I;super(e,t,i),this.el="string"==typeof e?document.querySelector(e):e;const x=[];Array.from(this.el.querySelectorAll("thead th, thead td")).forEach(((e,t)=>{e.classList.contains("--exclude-from-ordering")&&x.push({targets:t,orderable:!1})}));const E=this.el.getAttribute("data-datatable"),T=E?JSON.parse(E):{};this.concatOptions=Object.assign(Object.assign({searching:!0,lengthChange:!1,order:[],columnDefs:[...x]},T),t),this.table=this.el.querySelector("table"),this.searches=null!==(s=Array.from(this.el.querySelectorAll("[data-datatable-search]")))&&void 0!==s?s:null,this.pageEntitiesList=null!==(n=Array.from(this.el.querySelectorAll("[data-datatable-page-entities]")))&&void 0!==n?n:null,this.pagingList=null!==(o=Array.from(this.el.querySelectorAll("[data-datatable-paging]")))&&void 0!==o?o:null,this.pagingPagesList=null!==(l=Array.from(this.el.querySelectorAll("[data-datatable-paging-pages]")))&&void 0!==l?l:null,this.pagingPrevList=null!==(r=Array.from(this.el.querySelectorAll("[data-datatable-paging-prev]")))&&void 0!==r?r:null,this.pagingNextList=null!==(a=Array.from(this.el.querySelectorAll("[data-datatable-paging-next]")))&&void 0!==a?a:null,this.infoList=null!==(c=Array.from(this.el.querySelectorAll("[data-datatable-info]")))&&void 0!==c?c:null,(null===(h=this.concatOptions)||void 0===h?void 0:h.rowSelectingOptions)&&(this.rowSelectingAll=null!==(g=(null===(u=null===(d=this.concatOptions)||void 0===d?void 0:d.rowSelectingOptions)||void 0===u?void 0:u.selectAllSelector)?document.querySelector(null===(m=null===(p=this.concatOptions)||void 0===p?void 0:p.rowSelectingOptions)||void 0===m?void 0:m.selectAllSelector):document.querySelector("[data-datatable-row-selecting-all]"))&&void 0!==g?g:null),(null===(v=this.concatOptions)||void 0===v?void 0:v.rowSelectingOptions)&&(this.rowSelectingIndividual=null!==(b=null!==(y=null===(w=null===(f=this.concatOptions)||void 0===f?void 0:f.rowSelectingOptions)||void 0===w?void 0:w.individualSelector)&&void 0!==y?y:"[data-datatable-row-selecting-individual]")&&void 0!==b?b:null),this.pageEntitiesList.length&&(this.concatOptions.pageLength=parseInt(this.pageEntitiesList[0].value)),this.maxPagesToShow=3,this.isRowSelecting=!!(null===(C=this.concatOptions)||void 0===C?void 0:C.rowSelectingOptions),this.pageBtnClasses=null!==(I=null===(S=null===(L=this.concatOptions)||void 0===L?void 0:L.pagingOptions)||void 0===S?void 0:S.pageBtnClasses)&&void 0!==I?I:null,this.onSearchInputListener=[],this.onPageEntitiesChangeListener=[],this.onSinglePagingClickListener=[],this.onPagingPrevClickListener=[],this.onPagingNextClickListener=[],this.init()}init(){this.createCollection(window.$hsDataTableCollection,this),this.initTable(),this.searches.length&&this.initSearch(),this.pageEntitiesList.length&&this.initPageEntities(),this.pagingList.length&&this.initPaging(),this.pagingPagesList.length&&this.buildPagingPages(),this.pagingPrevList.length&&this.initPagingPrev(),this.pagingNextList.length&&this.initPagingNext(),this.infoList.length&&this.initInfo(),this.isRowSelecting&&this.initRowSelecting()}initTable(){this.dataTable=new DataTable(this.table,this.concatOptions),this.isRowSelecting&&this.triggerChangeEventToRow(),this.dataTable.on("draw",(()=>{this.isRowSelecting&&this.updateSelectAllCheckbox(),this.isRowSelecting&&this.triggerChangeEventToRow(),this.updateInfo(),this.pagingPagesList.forEach((e=>this.updatePaging(e)))}))}searchInput(e){this.onSearchInput(e.target.value)}pageEntitiesChange(e){this.onEntitiesChange(parseInt(e.target.value),e.target)}pagingPrevClick(){this.onPrevClick()}pagingNextClick(){this.onNextClick()}rowSelectingAllChange(){this.onSelectAllChange()}singlePagingClick(e){this.onPageClick(e)}initSearch(){this.searches.forEach((e=>{this.onSearchInputListener.push({el:e,fn:(0,s.sg)((e=>this.searchInput(e)))}),e.addEventListener("input",this.onSearchInputListener.find((t=>t.el===e)).fn)}))}onSearchInput(e){this.dataTable.search(e).draw()}initPageEntities(){this.pageEntitiesList.forEach((e=>{this.onPageEntitiesChangeListener.push({el:e,fn:e=>this.pageEntitiesChange(e)}),e.addEventListener("change",this.onPageEntitiesChangeListener.find((t=>t.el===e)).fn)}))}onEntitiesChange(e,t){const i=this.pageEntitiesList.filter((e=>e!==t));i.length&&i.forEach((t=>{if(window.HSSelect){const i=window.HSSelect.getInstance(t,!0);i&&i.element.setValue(`${e}`)}else t.value=`${e}`})),this.dataTable.page.len(e).draw()}initInfo(){this.infoList.forEach((e=>{this.initInfoFrom(e),this.initInfoTo(e),this.initInfoLength(e)}))}initInfoFrom(e){var t;const i=null!==(t=e.querySelector("[data-datatable-info-from]"))&&void 0!==t?t:null,{start:s}=this.dataTable.page.info();i&&(i.innerText=`${s+1}`)}initInfoTo(e){var t;const i=null!==(t=e.querySelector("[data-datatable-info-to]"))&&void 0!==t?t:null,{end:s}=this.dataTable.page.info();i&&(i.innerText=`${s}`)}initInfoLength(e){var t;const i=null!==(t=e.querySelector("[data-datatable-info-length]"))&&void 0!==t?t:null,{recordsTotal:s}=this.dataTable.page.info();i&&(i.innerText=`${s}`)}updateInfo(){this.initInfo()}initPaging(){this.pagingList.forEach((e=>this.hidePagingIfSinglePage(e)))}hidePagingIfSinglePage(e){const{pages:t}=this.dataTable.page.info();t<2?(e.classList.add("hidden"),e.style.display="none"):(e.classList.remove("hidden"),e.style.display="")}initPagingPrev(){this.pagingPrevList.forEach((e=>{this.onPagingPrevClickListener.push({el:e,fn:()=>this.pagingPrevClick()}),e.addEventListener("click",this.onPagingPrevClickListener.find((t=>t.el===e)).fn)}))}onPrevClick(){this.dataTable.page("previous").draw("page")}disablePagingArrow(e,t){t?(e.classList.add("disabled"),e.setAttribute("disabled","disabled")):(e.classList.remove("disabled"),e.removeAttribute("disabled"))}initPagingNext(){this.pagingNextList.forEach((e=>{this.onPagingNextClickListener.push({el:e,fn:()=>this.pagingNextClick()}),e.addEventListener("click",this.onPagingNextClickListener.find((t=>t.el===e)).fn)}))}onNextClick(){this.dataTable.page("next").draw("page")}buildPagingPages(){this.pagingPagesList.forEach((e=>this.updatePaging(e)))}updatePaging(e){const{page:t,pages:i,length:n}=this.dataTable.page.info(),o=this.dataTable.rows({search:"applied"}).count(),l=Math.ceil(o/n),r=t+1;let a=Math.max(1,r-Math.floor(this.maxPagesToShow/2)),c=Math.min(l,a+(this.maxPagesToShow-1));c-a+1<this.maxPagesToShow&&(a=Math.max(1,c-this.maxPagesToShow+1)),e.innerHTML="",a>1&&(this.buildPagingPage(1,e),a>2&&e.appendChild((0,s.fc)('<span class="ellipsis">...</span>')));for(let t=a;t<=c;t++)this.buildPagingPage(t,e);c<l&&(c<l-1&&e.appendChild((0,s.fc)('<span class="ellipsis">...</span>')),this.buildPagingPage(l,e)),this.pagingPrevList.forEach((e=>this.disablePagingArrow(e,0===t))),this.pagingNextList.forEach((e=>this.disablePagingArrow(e,t===i-1))),this.pagingList.forEach((e=>this.hidePagingIfSinglePage(e)))}buildPagingPage(e,t){const{page:i}=this.dataTable.page.info(),n=(0,s.fc)('<button type="button"></button>');n.innerText=`${e}`,n.setAttribute("data-page",`${e}`),this.pageBtnClasses&&(0,s.en)(this.pageBtnClasses,n),i===e-1&&n.classList.add("active"),this.onSinglePagingClickListener.push({el:n,fn:()=>this.singlePagingClick(e)}),n.addEventListener("click",this.onSinglePagingClickListener.find((e=>e.el===n)).fn),t.append(n)}onPageClick(e){this.dataTable.page(e-1).draw("page")}initRowSelecting(){this.onRowSelectingAllChangeListener=()=>this.rowSelectingAllChange(),this.rowSelectingAll.addEventListener("change",this.onRowSelectingAllChangeListener)}triggerChangeEventToRow(){this.table.querySelectorAll(`tbody ${this.rowSelectingIndividual}`).forEach((e=>{e.addEventListener("change",(()=>{this.updateSelectAllCheckbox()}))}))}onSelectAllChange(){let e=this.rowSelectingAll.checked;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((t=>{const i=t.querySelector(this.rowSelectingIndividual);i&&(i.checked=e)})),this.updateSelectAllCheckbox()}updateSelectAllCheckbox(){if(!this.dataTable.rows({search:"applied"}).count())return this.rowSelectingAll.checked=!1,!1;let e=!0;Array.from(this.dataTable.rows({page:"current",search:"applied"}).nodes()).forEach((t=>{const i=t.querySelector(this.rowSelectingIndividual);if(i&&!i.checked)return e=!1,!1})),this.rowSelectingAll.checked=e}destroy(){this.searches&&this.onSearchInputListener.forEach((({el:e,fn:t})=>e.removeEventListener("click",t))),this.pageEntitiesList&&this.onPageEntitiesChangeListener.forEach((({el:e,fn:t})=>e.removeEventListener("change",t))),this.pagingPagesList.length&&(this.onSinglePagingClickListener.forEach((({el:e,fn:t})=>e.removeEventListener("click",t))),this.pagingPagesList.forEach((e=>e.innerHTML=""))),this.pagingPrevList.length&&this.onPagingPrevClickListener.forEach((({el:e,fn:t})=>e.removeEventListener("click",t))),this.pagingNextList.length&&this.onPagingNextClickListener.forEach((({el:e,fn:t})=>e.removeEventListener("click",t))),this.rowSelectingAll&&this.rowSelectingAll.removeEventListener("change",this.onRowSelectingAllChangeListener),this.dataTable.destroy(),this.rowSelectingAll=null,this.rowSelectingIndividual=null,window.$hsDataTableCollection=window.$hsDataTableCollection.filter((({element:e})=>e.el!==this.el))}static getInstance(e,t){const i=window.$hsDataTableCollection.find((t=>t.element.el===("string"==typeof e?document.querySelector(e):e)));return i?t?i:i.element.el:null}static autoInit(){window.$hsDataTableCollection||(window.$hsDataTableCollection=[]),window.$hsDataTableCollection&&(window.$hsDataTableCollection=window.$hsDataTableCollection.filter((({element:e})=>document.contains(e.el)))),document.querySelectorAll("[data-datatable]:not(.--prevent-on-load-init)").forEach((e=>{window.$hsDataTableCollection.find((t=>{var i;return(null===(i=null==t?void 0:t.element)||void 0===i?void 0:i.el)===e}))||new o(e)}))}}window.addEventListener("load",(()=>{document.querySelectorAll("[data-datatable]:not(.--prevent-on-load-init)").length&&("undefined"==typeof jQuery&&console.error("HSDataTable: jQuery is not available, please add it to the page."),"undefined"==typeof DataTable&&console.error("HSDataTable: DataTable is not available, please add it to the page.")),"undefined"!=typeof DataTable&&"undefined"!=typeof jQuery&&o.autoInit()})),"undefined"!=typeof window&&(window.HSDataTable=o);const l=o},163:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(392),n=i(709);
/*
* HSScrollspy
* @version: 3.0.1
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
class o extends n.A{constructor(e,t={}){super(e,t),this.isScrollingDown=!1,this.lastScrollTop=0;const i=e.getAttribute("data-scrollspy-options"),s=i?JSON.parse(i):{},n=Object.assign(Object.assign({},s),t);this.ignoreScrollUp=void 0!==n.ignoreScrollUp&&n.ignoreScrollUp,this.links=this.el.querySelectorAll("[href]"),this.sections=[],this.scrollableId=this.el.getAttribute("data-scrollspy-scrollable-parent"),this.scrollable=this.scrollableId?document.querySelector(this.scrollableId):document,this.onLinkClickListener=[],this.init()}scrollableScroll(e){const t=this.scrollable instanceof HTMLElement?this.scrollable.scrollTop:window.scrollY;this.isScrollingDown=t>this.lastScrollTop,this.lastScrollTop=t<=0?0:t,Array.from(this.sections).forEach((t=>{if(!t.getAttribute("id"))return!1;this.update(e,t)}))}init(){this.createCollection(window.$hsScrollspyCollection,this),this.links.forEach((e=>{this.sections.push(this.scrollable.querySelector(e.getAttribute("href")))})),this.onScrollableScrollListener=e=>this.scrollableScroll(e),this.scrollable.addEventListener("scroll",this.onScrollableScrollListener),this.links.forEach((e=>{this.onLinkClickListener.push({el:e,fn:t=>this.linkClick(t,e)}),e.addEventListener("click",this.onLinkClickListener.find((t=>t.el===e)).fn)}))}determineScrollDirection(e){const t=this.el.querySelector("a.active");if(!t)return!0;const i=Array.from(this.links).indexOf(t),s=Array.from(this.links).indexOf(e);return-1===s||s>i}linkClick(e,t){e.preventDefault();const i=t.getAttribute("href");if(!i||"javascript:;"===i)return;(i?document.querySelector(i):null)&&(this.isScrollingDown=this.determineScrollDirection(t),this.scrollTo(t))}update(e,t){const i=parseInt((0,s.gj)(this.el,"--scrollspy-offset","0")),n=parseInt((0,s.gj)(t,"--scrollspy-offset"))||i,o=e.target===document?0:parseInt(String(e.target.getBoundingClientRect().top)),l=parseInt(String(t.getBoundingClientRect().top))-n-o,r=t.offsetHeight;if(this.ignoreScrollUp||this.isScrollingDown?l<=0&&l+r>0:l<=0&&l<r){this.links.forEach((e=>e.classList.remove("active")));const e=this.el.querySelector(`[href="#${t.getAttribute("id")}"]`);if(e){e.classList.add("active");const t=e.closest("[data-scrollspy-group]");if(t){const e=t.querySelector("[href]");e&&e.classList.add("active")}}this.fireEvent("afterScroll",e),(0,s.JD)("afterScroll.scrollspy",e,this.el)}}scrollTo(e){const t=e.getAttribute("href"),i=document.querySelector(t),n=parseInt((0,s.gj)(this.el,"--scrollspy-offset","0")),o=parseInt((0,s.gj)(i,"--scrollspy-offset"))||n,l=this.scrollable===document?0:this.scrollable.offsetTop,r=i.offsetTop-o-l,a=this.scrollable===document?window:this.scrollable,c=()=>{window.history.replaceState(null,null,e.getAttribute("href")),"scrollTo"in a&&a.scrollTo({top:r,left:0,behavior:"smooth"})},h=this.fireEvent("beforeScroll",this.el);(0,s.JD)("beforeScroll.scrollspy",this.el,this.el),h instanceof Promise?h.then((()=>c())):c()}destroy(){this.el.querySelector("[href].active").classList.remove("active"),this.scrollable.removeEventListener("scroll",this.onScrollableScrollListener),this.onLinkClickListener.length&&this.onLinkClickListener.forEach((({el:e,fn:t})=>{e.removeEventListener("click",t)})),window.$hsScrollspyCollection=window.$hsScrollspyCollection.filter((({element:e})=>e.el!==this.el))}static getInstance(e,t=!1){const i=window.$hsScrollspyCollection.find((t=>t.element.el===("string"==typeof e?document.querySelector(e):e)));return i?t?i:i.element.el:null}static autoInit(){window.$hsScrollspyCollection||(window.$hsScrollspyCollection=[]),window.$hsScrollspyCollection&&(window.$hsScrollspyCollection=window.$hsScrollspyCollection.filter((({element:e})=>document.contains(e.el)))),document.querySelectorAll("[data-scrollspy]:not(.--prevent-on-load-init)").forEach((e=>{window.$hsScrollspyCollection.find((t=>{var i;return(null===(i=null==t?void 0:t.element)||void 0===i?void 0:i.el)===e}))||new o(e)}))}}window.addEventListener("load",(()=>{o.autoInit()})),"undefined"!=typeof window&&(window.HSScrollspy=o);const l=o},179:(e,t,i)=>{i.d(t,{Fy:()=>o,In:()=>n,LO:()=>a,fp:()=>l,jU:()=>r,lP:()=>s});const s={auto:"auto","auto-start":"auto-start","auto-end":"auto-end",top:"top","top-start":"top-start","top-end":"top-end",bottom:"bottom","bottom-start":"bottom-start","bottom-end":"bottom-end",right:"right","right-start":"right-start","right-end":"right-end",left:"left","left-start":"left-start","left-end":"left-end"},n=["Escape","ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Home","End","Enter"],o=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End"],l=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter","Space","Tab"],r=["ArrowUp","ArrowLeft","ArrowDown","ArrowRight","Home","End","Escape","Enter"],a={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536}},224:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(392),n=i(709);
/*
* HSTogglePassword
* @version: 3.0.1
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
class o extends n.A{constructor(e,t){super(e,t);const i=e.getAttribute("data-toggle-password"),n=i?JSON.parse(i):{},o=Object.assign(Object.assign({},n),t),l=[];if((null==o?void 0:o.target)&&"string"==typeof(null==o?void 0:o.target)){(null==o?void 0:o.target.split(",")).forEach((e=>{l.push(document.querySelector(e))}))}else(null==o?void 0:o.target)&&"object"==typeof(null==o?void 0:o.target)?o.target.forEach((e=>l.push(document.querySelector(e)))):o.target.forEach((e=>l.push(e)));this.target=l,this.isShown=!!this.el.hasAttribute("type")&&this.el.checked,this.eventType=(0,s.V6)(this.el)?"change":"click",this.isMultiple=this.target.length>1&&!!this.el.closest("[data-toggle-password-group]"),this.target&&this.init()}elementAction(){this.isShown?this.hide():this.show(),this.fireEvent("toggle",this.target),(0,s.JD)("toggle.toggle-select",this.el,this.target)}init(){this.createCollection(window.$hsTogglePasswordCollection,this),this.isShown?this.show():this.hide(),this.onElementActionListener=()=>this.elementAction(),this.el.addEventListener(this.eventType,this.onElementActionListener)}getMultipleToggles(){const e=this.el.closest("[data-toggle-password-group]").querySelectorAll("[data-toggle-password]"),t=[];return e.forEach((e=>{t.push(o.getInstance(e))})),t}show(){if(this.isMultiple){this.getMultipleToggles().forEach((e=>!!e&&(e.isShown=!0))),this.el.closest("[data-toggle-password-group]").classList.add("active")}else this.isShown=!0,this.el.classList.add("active");this.target.forEach((e=>{e.type="text"}))}hide(){if(this.isMultiple){this.getMultipleToggles().forEach((e=>!!e&&(e.isShown=!1))),this.el.closest("[data-toggle-password-group]").classList.remove("active")}else this.isShown=!1,this.el.classList.remove("active");this.target.forEach((e=>{e.type="password"}))}destroy(){this.isMultiple?this.el.closest("[data-toggle-password-group]").classList.remove("active"):this.el.classList.remove("active"),this.target.forEach((e=>{e.type="password"})),this.el.removeEventListener(this.eventType,this.onElementActionListener),this.isShown=!1,window.$hsTogglePasswordCollection=window.$hsTogglePasswordCollection.filter((({element:e})=>e.el!==this.el))}static getInstance(e,t){const i=window.$hsTogglePasswordCollection.find((t=>t.element.el===("string"==typeof e?document.querySelector(e):e)));return i?t?i:i.element:null}static autoInit(){window.$hsTogglePasswordCollection||(window.$hsTogglePasswordCollection=[]),window.$hsTogglePasswordCollection&&(window.$hsTogglePasswordCollection=window.$hsTogglePasswordCollection.filter((({element:e})=>document.contains(e.el)))),document.querySelectorAll("[data-toggle-password]:not(.--prevent-on-load-init)").forEach((e=>{window.$hsTogglePasswordCollection.find((t=>{var i;return(null===(i=null==t?void 0:t.element)||void 0===i?void 0:i.el)===e}))||new o(e)}))}}window.addEventListener("load",(()=>{o.autoInit()})),"undefined"!=typeof window&&(window.HSTogglePassword=o);const l=o},230:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(392),n=i(709);
/*
* HSFileUpload
* @version: 3.0.1
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
"undefined"!=typeof Dropzone&&(Dropzone.autoDiscover=!1);class o extends n.A{constructor(e,t,i){var s;super(e,t,i),this.extensions={},this.el="string"==typeof e?document.querySelector(e):e;const n=this.el.getAttribute("data-file-upload"),o=n?JSON.parse(n):{};this.previewTemplate=(null===(s=this.el.querySelector("[data-file-upload-preview]"))||void 0===s?void 0:s.innerHTML)||'<div class="rounded-box shadow-lg shadow-base-300/20 bg-base-100 p-3">\n <div class="mb-1 flex items-center justify-between">\n <div class="flex items-center gap-x-3">\n <span class="text-base-content/80 border-base-content/20 flex size-8 items-center justify-center rounded-lg border p-0.5" data-file-upload-file-icon="" >\n <img class="rounded-md hidden" data-dz-thumbnail="" />\n </span>\n <div>\n <p class="text-base-content text-sm font-medium">\n <span class="inline-block truncate align-bottom" data-file-upload-file-name=""></span>.<span data-file-upload-file-ext=""></span>\n </p>\n <p class="text-base-content/50 text-xs" data-file-upload-file-size=""></p>\n </div>\n </div>\n <div class="flex items-center gap-x-2">\n <button type="button" class="btn btn-sm btn-circle btn-text" data-file-upload-remove="">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" class="size-4 shrink-0" viewBox="0 0 24 24"> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12" /> </svg>\n </button>\n </div>\n </div>\n <div class="flex items-center gap-x-3 whitespace-nowrap">\n <div class="progress h-2" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-file-upload-progress-bar="" >\n <div class="progress-bar progress-primary file-upload-complete:progress-success transition-all duration-500" style="width: 0" data-file-upload-progress-bar-pane="" ></div>\n </div>\n <span class="text-base-content mb-0.5 text-sm">\n <span data-file-upload-progress-bar-value="">0</span>%\n </span>\n </div>\n </div>',this.extensions=_.merge({default:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',class:"shrink-0 size-5"},xls:{icon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.0243 1.43996H7.08805C6.82501 1.43996 6.57277 1.54445 6.38677 1.73043C6.20077 1.91642 6.09631 2.16868 6.09631 2.43171V6.64796L15.0243 11.856L19.4883 13.7398L23.9523 11.856V6.64796L15.0243 1.43996Z" fill="#21A366"></path><path d="M6.09631 6.64796H15.0243V11.856H6.09631V6.64796Z" fill="#107C41"></path><path d="M22.9605 1.43996H15.0243V6.64796H23.9523V2.43171C23.9523 2.16868 23.8478 1.91642 23.6618 1.73043C23.4758 1.54445 23.2235 1.43996 22.9605 1.43996Z" fill="#33C481"></path><path d="M15.0243 11.856H6.09631V21.2802C6.09631 21.5433 6.20077 21.7955 6.38677 21.9815C6.57277 22.1675 6.82501 22.272 7.08805 22.272H22.9606C23.2236 22.272 23.4759 22.1675 23.6618 21.9815C23.8478 21.7955 23.9523 21.5433 23.9523 21.2802V17.064L15.0243 11.856Z" fill="#185C37"></path><path d="M15.0243 11.856H23.9523V17.064H15.0243V11.856Z" fill="#107C41"></path><path opacity="0.1" d="M12.5446 5.15996H6.09631V19.296H12.5446C12.8073 19.2952 13.0591 19.1904 13.245 19.0046C13.4308 18.8188 13.5355 18.567 13.5363 18.3042V6.1517C13.5355 5.88892 13.4308 5.63712 13.245 5.4513C13.0591 5.26548 12.8073 5.16074 12.5446 5.15996Z" fill="black"></path><path opacity="0.2" d="M11.8006 5.90396H6.09631V20.04H11.8006C12.0633 20.0392 12.3151 19.9344 12.501 19.7486C12.6868 19.5628 12.7915 19.311 12.7923 19.0482V6.8957C12.7915 6.6329 12.6868 6.38114 12.501 6.19532C12.3151 6.0095 12.0633 5.90475 11.8006 5.90396Z" fill="black"></path><path opacity="0.2" d="M11.8006 5.90396H6.09631V18.552H11.8006C12.0633 18.5512 12.3151 18.4464 12.501 18.2606C12.6868 18.0748 12.7915 17.823 12.7923 17.5602V6.8957C12.7915 6.6329 12.6868 6.38114 12.501 6.19532C12.3151 6.0095 12.0633 5.90475 11.8006 5.90396Z" fill="black"></path><path opacity="0.2" d="M11.0566 5.90396H6.09631V18.552H11.0566C11.3193 18.5512 11.5711 18.4464 11.757 18.2606C11.9428 18.0748 12.0475 17.823 12.0483 17.5602V6.8957C12.0475 6.6329 11.9428 6.38114 11.757 6.19532C11.5711 6.0095 11.3193 5.90475 11.0566 5.90396Z" fill="black"></path><path d="M1.13604 5.90396H11.0566C11.3195 5.90396 11.5718 6.00842 11.7578 6.19442C11.9438 6.38042 12.0483 6.63266 12.0483 6.8957V16.8162C12.0483 17.0793 11.9438 17.3315 11.7578 17.5175C11.5718 17.7035 11.3195 17.808 11.0566 17.808H1.13604C0.873012 17.808 0.620754 17.7035 0.434765 17.5175C0.248775 17.3315 0.144287 17.0793 0.144287 16.8162V6.8957C0.144287 6.63266 0.248775 6.38042 0.434765 6.19442C0.620754 6.00842 0.873012 5.90396 1.13604 5.90396Z" fill="#107C41"></path><path d="M2.77283 15.576L5.18041 11.8455L2.9752 8.13596H4.74964L5.95343 10.5071C6.06401 10.7318 6.14015 10.8994 6.18185 11.01H6.19745C6.27683 10.8305 6.35987 10.6559 6.44669 10.4863L7.73309 8.13596H9.36167L7.09991 11.8247L9.41897 15.576H7.68545L6.29489 12.972C6.22943 12.861 6.17387 12.7445 6.12899 12.6238H6.10817C6.06761 12.7419 6.01367 12.855 5.94748 12.9608L4.51676 15.576H2.77283Z" fill="white"></path></svg>',class:"shrink-0 size-5"},doc:{icon:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M30.6141 1.91994H9.45071C9.09999 1.91994 8.76367 2.05926 8.51567 2.30725C8.26767 2.55523 8.12839 2.89158 8.12839 3.24228V8.86395L20.0324 12.3359L31.9364 8.86395V3.24228C31.9364 2.89158 31.797 2.55523 31.549 2.30725C31.3011 2.05926 30.9647 1.91994 30.6141 1.91994Z" fill="#41A5EE"></path><path d="M31.9364 8.86395H8.12839V15.8079L20.0324 19.2799L31.9364 15.8079V8.86395Z" fill="#2B7CD3"></path><path d="M31.9364 15.8079H8.12839V22.7519L20.0324 26.2239L31.9364 22.7519V15.8079Z" fill="#185ABD"></path><path d="M31.9364 22.752H8.12839V28.3736C8.12839 28.7244 8.26767 29.0607 8.51567 29.3087C8.76367 29.5567 9.09999 29.696 9.45071 29.696H30.6141C30.9647 29.696 31.3011 29.5567 31.549 29.3087C31.797 29.0607 31.9364 28.7244 31.9364 28.3736V22.752Z" fill="#103F91"></path><path opacity="0.1" d="M16.7261 6.87994H8.12839V25.7279H16.7261C17.0764 25.7269 17.4121 25.5872 17.6599 25.3395C17.9077 25.0917 18.0473 24.756 18.0484 24.4056V8.20226C18.0473 7.8519 17.9077 7.51616 17.6599 7.2684C17.4121 7.02064 17.0764 6.88099 16.7261 6.87994Z" class="fill-black" fill="currentColor"></path><path opacity="0.2" d="M15.7341 7.87194H8.12839V26.7199H15.7341C16.0844 26.7189 16.4201 26.5792 16.6679 26.3315C16.9157 26.0837 17.0553 25.748 17.0564 25.3976V9.19426C17.0553 8.84386 16.9157 8.50818 16.6679 8.26042C16.4201 8.01266 16.0844 7.87299 15.7341 7.87194Z" class="fill-black" fill="currentColor"></path><path opacity="0.2" d="M15.7341 7.87194H8.12839V24.7359H15.7341C16.0844 24.7349 16.4201 24.5952 16.6679 24.3475C16.9157 24.0997 17.0553 23.764 17.0564 23.4136V9.19426C17.0553 8.84386 16.9157 8.50818 16.6679 8.26042C16.4201 8.01266 16.0844 7.87299 15.7341 7.87194Z" class="fill-black" fill="currentColor"></path><path opacity="0.2" d="M14.7421 7.87194H8.12839V24.7359H14.7421C15.0924 24.7349 15.4281 24.5952 15.6759 24.3475C15.9237 24.0997 16.0633 23.764 16.0644 23.4136V9.19426C16.0633 8.84386 15.9237 8.50818 15.6759 8.26042C15.4281 8.01266 15.0924 7.87299 14.7421 7.87194Z" class="fill-black" fill="currentColor"></path><path d="M1.51472 7.87194H14.7421C15.0927 7.87194 15.4291 8.01122 15.6771 8.25922C15.925 8.50722 16.0644 8.84354 16.0644 9.19426V22.4216C16.0644 22.7723 15.925 23.1087 15.6771 23.3567C15.4291 23.6047 15.0927 23.7439 14.7421 23.7439H1.51472C1.16401 23.7439 0.827669 23.6047 0.579687 23.3567C0.3317 23.1087 0.192383 22.7723 0.192383 22.4216V9.19426C0.192383 8.84354 0.3317 8.50722 0.579687 8.25922C0.827669 8.01122 1.16401 7.87194 1.51472 7.87194Z" fill="#185ABD"></path><path d="M12.0468 20.7679H10.2612L8.17801 13.9231L5.99558 20.7679H4.20998L2.22598 10.8479H4.01158L5.40038 17.7919L7.48358 11.0463H8.97161L10.9556 17.7919L12.3444 10.8479H14.0308L12.0468 20.7679Z" fill="white"></path></svg>',class:"shrink-0 size-5"},zip:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v18"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><circle cx="10" cy="20" r="2"/><path d="M10 7V6"/><path d="M10 12v-1"/><path d="M10 18v-2"/></svg>',class:"shrink-0 size-5"}},o.extensions),this.singleton=o.singleton,this.concatOptions=Object.assign(Object.assign({clickable:this.el.querySelector("[data-file-upload-trigger]"),previewsContainer:this.el.querySelector("[data-file-upload-previews]"),addRemoveLinks:!1,previewTemplate:this.previewTemplate,autoHideTrigger:!1},o),t),this.onReloadButtonClickListener=[],this.onTempFileInputChangeListener=[],this.init()}tempFileInputChange(e,t){var i;const s=null===(i=e.target.files)||void 0===i?void 0:i[0];if(s){const e=s;e.status=Dropzone.ADDED,e.accepted=!0,e.previewElement=t.previewElement,e.previewTemplate=t.previewTemplate,e.previewsContainer=t.previewsContainer,this.dropzone.removeFile(t),this.dropzone.addFile(e)}}reloadButtonClick(e,t){e.preventDefault(),e.stopPropagation();const i=document.createElement("input");i.type="file",this.onTempFileInputChangeListener.push({el:i,fn:e=>this.tempFileInputChange(e,t)}),i.click(),i.addEventListener("change",this.onTempFileInputChangeListener.find((e=>e.el===i)).fn)}init(){this.createCollection(window.$hsFileUploadCollection,this),this.initDropzone()}initDropzone(){const e=this.el.querySelector("[data-file-upload-clear]"),t=Array.from(this.el.querySelectorAll("[data-file-upload-pseudo-trigger]"));this.dropzone=new Dropzone(this.el,this.concatOptions),this.dropzone.on("addedfile",(e=>this.onAddFile(e))),this.dropzone.on("removedfile",(()=>this.onRemoveFile())),this.dropzone.on("uploadprogress",((e,t)=>this.onUploadProgress(e,t))),this.dropzone.on("complete",(e=>this.onComplete(e))),e&&(e.onclick=()=>{this.dropzone.files.length&&this.dropzone.removeAllFiles(!0)}),t.length&&t.forEach((e=>{e.onclick=()=>{var e,t;(null===(e=this.concatOptions)||void 0===e?void 0:e.clickable)&&(null===(t=this.concatOptions)||void 0===t?void 0:t.clickable).click()}}))}destroy(){this.onTempFileInputChangeListener.forEach((e=>{e.el.removeEventListener("change",e.fn)})),this.onTempFileInputChangeListener=null,this.onReloadButtonClickListener.forEach((e=>{e.el.removeEventListener("click",e.fn)})),this.onReloadButtonClickListener=null,this.dropzone.destroy(),window.$hsFileUploadCollection=window.$hsFileUploadCollection.filter((({element:e})=>e.el!==this.el))}onAddFile(e){const{previewElement:t}=e,i=e.previewElement.querySelector("[data-file-upload-reload]");if(!t)return!1;this.singleton&&this.dropzone.files.length>1&&this.dropzone.removeFile(this.dropzone.files[0]),i&&(this.onReloadButtonClickListener.push({el:i,fn:t=>this.reloadButtonClick(t,e)}),i.addEventListener("click",this.onReloadButtonClickListener.find((e=>e.el===i)).fn)),this.previewAccepted(e)}previewAccepted(e){const{previewElement:t}=e,i=this.splitFileName(e.name),s=t.querySelector("[data-file-upload-file-name]"),n=t.querySelector("[data-file-upload-file-ext]"),o=t.querySelector("[data-file-upload-file-size]"),l=t.querySelector("[data-file-upload-file-icon]"),r=this.el.querySelector("[data-file-upload-trigger]"),a=t.querySelector("[data-dz-thumbnail]"),c=t.querySelector("[data-file-upload-remove]");s&&(s.textContent=i.name),n&&(n.textContent=i.extension),o&&(o.textContent=this.formatFileSize(e.size)),a&&(e.type.includes("image/")?a.classList.remove("hidden"):this.setIcon(i.extension,l)),this.dropzone.files.length>0&&this.concatOptions.autoHideTrigger&&(r.style.display="none"),c&&(c.onclick=()=>this.dropzone.removeFile(e))}onRemoveFile(){const e=this.el.querySelector("[data-file-upload-trigger]");0===this.dropzone.files.length&&this.concatOptions.autoHideTrigger&&(e.style.display="")}onUploadProgress(e,t){const{previewElement:i}=e;if(!i)return!1;const s=i.querySelector("[data-file-upload-progress-bar]"),n=i.querySelector("[data-file-upload-progress-bar-pane]"),o=i.querySelector("[data-file-upload-progress-bar-value]"),l=Math.floor(t);s&&s.setAttribute("aria-valuenow",`${l}`),n&&(n.style.width=`${l}%`),o&&(o.innerText=`${l}`)}onComplete(e){const{previewElement:t}=e;if(!t)return!1;t.classList.add("complete")}setIcon(e,t){const i=this.createIcon(e);t.append(i)}createIcon(e){var t,i;const n=(null===(t=this.extensions[e])||void 0===t?void 0:t.icon)?(0,s.fc)(this.extensions[e].icon):(0,s.fc)(this.extensions.default.icon);return(0,s.en)((null===(i=this.extensions[e])||void 0===i?void 0:i.class)?this.extensions[e].class:this.extensions.default.class,n),n}formatFileSize(e){return e<1024?e.toFixed(2)+" B":e<1048576?(e/1024).toFixed(2)+" KB":e<1073741824?(e/1048576).toFixed(2)+" MB":e<1099511627776?(e/1073741824).toFixed(2)+" GB":(e/1099511627776).toFixed(2)+" TB"}splitFileName(e){let t=e.lastIndexOf(".");return-1==t?{name:e,extension:""}:{name:e.substring(0,t),extension:e.substring(t+1)}}static getInstance(e,t){const i=window.$hsFileUploadCollection.find((t=>t.element.el===("string"==typeof e?document.querySelector(e):e)));return i?t?i:i.element.el:null}static autoInit(){window.$hsFileUploadCollection||(window.$hsFileUploadCollection=[]),window.$hsFileUploadCollection&&(window.$hsFileUploadCollection=window.$hsFileUploadCollection.filter((({element:e})=>document.contains(e.el)))),document.querySelectorAll("[data-file-upload]:not(.--prevent-on-load-init)").forEach((e=>{window.$hsFileUploadCollection.find((t=>{var i;return(null===(i=null==t?void 0:t.element)||void 0===i?void 0:i.el)===e}))||new o(e)}))}}window.addEventListener("load",(()=>{document.querySelectorAll("[data-file-upload]:not(.--prevent-on-load-init)").length&&("undefined"==typeof _&&console.error("HSFileUpload: Lodash is not available, please add it to the page."),"undefined"==typeof Dropzone&&console.error("HSFileUpload: Dropzone is not available, please add it to the page.")),"undefined"!=typeof _&&"undefined"!=typeof Dropzone&&o.autoInit()})),"undefined"!=typeof window&&(window.HSFileUpload=o);const l=o},259:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(392),n=i(709);
/*
* HSRemoveElement
* @version: 3.0.1
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
class o extends n.A{constructor(e,t){super(e,t);const i=e.getAttribute("data-remove-element-options"),s=i?JSON.parse(i):{},n=Object.assign(Object.assign({},s),t);this.removeTargetId=this.el.getAttribute("data-remove-element"),this.removeTarget=document.querySelector(this.removeTargetId),this.removeTargetAnimationClass=(null==n?void 0:n.removeTargetAnimationClass)||"removing",this.removeTarget&&this.init()}elementClick(){this.remove()}init(){this.createCollection(window.$hsRemoveElementCollection,this),this.onElementClickListener=()=>this.elementClick(),this.el.addEventListener("click",this.onElementClickListener)}remove(){if(!this.removeTarget)return!1;this.removeTarget.classList.add(this.removeTargetAnimationClass),(0,s.yd)(this.removeTarget,(()=>setTimeout((()=>this.removeTarget.remove()))))}destroy(){this.removeTarget.classList.remove(this.removeTargetAnimationClass),this.el.removeEventListener("click",this.onElementClickListener),window.$hsRemoveElementCollection=window.$hsRemoveElementCollection.filter((({element:e})=>e.el!==this.el))}static getInstance(e,t){const i=window.$hsRemoveElementCollection.find((t=>t.element.el===("string"==typeof e?document.querySelector(e):e)||t.element.el===("string"==typeof e?document.querySelector(e):e)));return i?t?i:i.element.el:null}static autoInit(){window.$hsRemoveElementCollection||(window.$hsRemoveElementCollection=[]),window.$hsRemoveElementCollection&&(window.$hsRemoveElementCollection=window.$hsRemoveElementCollection.filter((({element:e})=>document.contains(e.el)))),document.querySelectorAll("[data-remove-element]:not(.--prevent-on-load-init)").forEach((e=>{window.$hsRemoveElementCollection.find((t=>{var i;return(null===(i=null==t?void 0:t.element)||void 0===i?void 0:i.el)===e}))||new o(e)}))}}window.addEventListener("load",(()=>{o.autoInit()})),"undefined"!=typeof window&&(window.HSRemoveElement=o);const l=o},306:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(392),n=i(709);
/*
* HSCopyMarkup
* @version: 3.0.1
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
class o extends n.A{constructor(e,t){super(e,t),this.count=0;const i=e.getAttribute("data-copy-markup"),s=i?JSON.parse(i):{},n=Object.assign(Object.assign({},s),t);this.targetSelector=(null==n?void 0:n.targetSelector)||null,this.wrapperSelector=(null==n?void 0:n.wrapperSelector)||null,this.limit=(null==n?void 0:n.limit)||null,this.items=[],this.targetSelector&&this.init()}elementClick(){this.copy()}deleteItemButtonClick(e){this.delete(e)}init(){this.createCollection(window.$hsCopyMarkupCollection,this),this.onElementClickListener=()=>this.elementClick(),this.setTarget(),this.setWrapper(),this.addPredefinedItems(),this.el.addEventListener("click",this.onElementClickListener)}copy(){if(this.limit&&this.items.length>=this.limit)return!1;this.el.hasAttribute("disabled")&&this.el.setAttribute("disabled","");const e=this.target.cloneNode(!0),t=`${this.target.id}-${this.count++}`;e.setAttribute("id",t),this.addToItems(e),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled"),this.fireEvent("copy",e),(0,s.JD)("copy.copyMarkup",e,e)}addPredefinedItems(){Array.from(this.wrapper.children).filter((e=>!e.classList.contains("[--ignore-for-count]"))).forEach((e=>{this.addToItems(e)})),this.limit&&this.items.length>=this.limit&&this.el.setAttribute("disabled","disabled")}setTarget(){const e="string"==typeof this.targetSelector?document.querySelector(this.targetSelector).cloneNode(!0):this.targetSelector.cloneNode(!0);this.target=e}setWrapper(){this.wrapper="string"==typeof this.wrapperSelector?document.querySelector(this.wrapperSelector):this.wrapperSelector}addToItems(e){const t=e.querySelector("[data-copy-markup-delete-item]");this.wrapper?this.wrapper.append(e):this.el.before(e),t&&(this.onDeleteItemButtonClickListener=()=>this.deleteItemButtonClick(e),t.addEventListener("click",this.onDeleteItemButtonClickListener)),this.items.push(e)}delete(e){if(e){const t=this.items.indexOf(e);-1!==t&&this.items.splice(t,1),e.remove(),this.fireEvent("delete",e),(0,s.JD)("delete.copyMarkup",e,e),this.limit&&this.items.length<this.limit&&this.el.removeAttribute("disabled")}}destroy(){const e=this.wrapper.querySelectorAll("[data-copy-markup-delete-item]");this.el.removeEventListener("click",this.onElementClickListener),e.length&&e.forEach((e=>e.removeEventListener("click",this.onDeleteItemButtonClickListener))),this.el.removeAttribute("disabled"),this.target=null,this.wrapper=null,this.items=null,window.$hsCopyMarkupCollection=window.$hsCopyMarkupCollection.filter((({element:e})=>e.el!==this.el))}static getInstance(e,t){const i=window.$hsCopyMarkupCollection.find((t=>t.element.el===("string"==typeof e?document.querySelector(e):e)));return i?t?i:i.element:null}static autoInit(){window.$hsCopyMarkupCollection||(window.$hsCopyMarkupCollection=[]),window.$hsCopyMarkupCollection&&(window.$hsCopyMarkupCollection=window.$hsCopyMarkupCollection.filter((({element:e})=>document.contains(e.el)))),document.querySelectorAll("[data-copy-markup]:not(.--prevent-on-load-init)").forEach((e=>{if(!window.$hsCopyMarkupCollection.find((t=>{var i;return(null===(i=null==t?void 0:t.element)||void 0===i?void 0:i.el)===e}))){const t=e.getAttribute("data-copy-markup"),i=t?JSON.parse(t):{};new o(e,i)}}))}}window.addEventListener("load",(()=>{o.autoInit()})),"undefined"!=typeof window&&(window.HSCopyMarkup=o);const l=o},330:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(392),n=i(709),o=i(179);
/*
* HSTabs
* @version: 3.0.1
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
class l extends n.A{constructor(e,t,i){var s,n;super(e,t,i);const l=e.getAttribute("data-tabs"),r=l?JSON.parse(l):{},a=Object.assign(Object.assign({},r),t);this.eventType=null!==(s=a.eventType)&&void 0!==s?s:"click",this.preventNavigationResolution="number"==typeof a.preventNavigationResolution?a.preventNavigationResolution:o.LO[a.preventNavigationResolution]||null,this.toggles=this.el.querySelectorAll("[data-tab]"),this.extraToggleId=this.el.getAttribute("data-tab-select"),this.extraToggle=this.extraToggleId?document.querySelector(this.extraToggleId):null,this.current=Array.from(this.toggles).find((e=>e.classList.contains("active"))),this.currentContentId=(null===(n=this.current)||void 0===n?void 0:n.getAttribute("data-tab"))||null,this.currentContent=this.currentContentId?document.querySelector(this.currentContentId):null,this.prev=null,this.prevContentId=null,this.prevContent=null,this.onToggleHandler=[],this.init()}toggle(e){this.open(e)}extraToggleChange(e){this.change(e)}init(){this.createCollection(window.$hsTabsCollection,this),this.toggles.forEach((e=>{const t=t=>{"click"===this.eventType&&this.preventNavigationResolution&&document.body.clientWidth<=+this.preventNavigationResolution&&t.preventDefault(),this.toggle(e)},i=e=>{this.preventNavigationResolution&&document.body.clientWidth<=+this.preventNavigationResolution&&e.preventDefault()};this.onToggleHandler.push({el:e,fn:t,preventClickFn:i}),"click"===this.eventType?e.addEventListener("click",t):(e.addEventListener("mouseenter",t),e.addEventListener("click",i))})),this.extraToggle&&(this.onExtraToggleChangeListener=e=>this.extraToggleChange(e),this.extraToggle.addEventListener("change",this.onExtraToggleChangeListener))}open(e){var t,i,n,o,l;this.prev=this.current,this.prevContentId=this.currentContentId,this.prevContent=this.currentContent,this.current=e,this.currentContentId=e.getAttribute("data-tab"),this.currentContent=this.currentContentId?document.querySelector(this.currentContentId):null,(null===(t=null==this?void 0:this.prev)||void 0===t?void 0:t.ariaSelected)&&(this.prev.ariaSelected="false"),null===(i=this.prev)||void 0===i||i.classList.remove("active"),null===(n=this.prevContent)||void 0===n||n.classList.add("hidden"),(null===(o=null==this?void 0:this.current)||void 0===o?void 0:o.ariaSelected)&&(this.current.ariaSelected="true"),this.current.classList.add("active"),null===(l=this.currentContent)||void 0===l||l.classList.remove("hidden"),this.fireEvent("change",{el:e,prev:this.prevContentId,current:this.currentContentId,tabsId:this.el.id}),(0,s.JD)("change.tab",e,{el:e,prev:this.prevContentId,current:this.currentContentId,tabsId:this.el.id})}change(e){const t=document.querySelector(`[data-tab="${e.target.value}"]`);t&&("hover"===this.eventType?t.dispatchEvent(new Event("mouseenter")):t.click())}destroy(){this.toggles.forEach((e=>{var t;const i=null===(t=this.onToggleHandler)||void 0===t?void 0:t.find((({el:t})=>t===e));i&&("click"===this.eventType?e.removeEventListener("click",i.fn):(e.removeEventListener("mouseenter",i.fn),e.removeEventListener("click",i.preventClickFn)))})),this.onToggleHandler=[],this.extraToggle&&this.extraToggle.removeEventListener("change",this.onExtraToggleChangeListener),window.$hsTabsCollection=window.$hsTabsCollection.filter((({element:e})=>e.el!==this.el))}static getInstance(e,t){const i=window.$hsTabsCollection.find((t=>t.element.el===("string"==typeof e?document.querySelector(e):e)));return i?t?i:i.element:null}static autoInit(){window.$hsTabsCollection||(window.$hsTabsCollection=[],document.addEventListener("keydown",(e=>l.accessibility(e)))),window.$hsTabsCollection&&(window.$hsTabsCollection=window.$hsTabsCollection.filter((({element:e})=>document.contains(e.el)))),document.querySelectorAll('[role="tablist"]:not(select):not(.--prevent-on-load-init)').forEach((e=>{window.$hsTabsCollection.find((t=>{var i;return(null===(i=null==t?void 0:t.element)||void 0===i?void 0:i.el)===e}))||new l(e)}))}static open(e){const t=window.$hsTabsCollection.find((t=>Array.from(t.element.toggles).includes("string"==typeof e?document.querySelector(e):e))),i=t?Array.from(t.element.toggles).find((t=>t===("string"==typeof e?document.querySelector(e):e))):null;i&&!i.classList.contains("active")&&t.element.open(i)}static accessibility(e){var t;const i=document.querySelector("[data-tab]:focus");if(i&&o.Fy.includes(e.code)&&!e.metaKey){const s=null===(t=i.closest('[role="tablist"]'))||void 0===t?void 0:t.getAttribute("data-tabs-vertical");switch(e.preventDefault(),e.code){case"true"===s?"ArrowUp":"ArrowLeft":this.onArrow();break;case"true"===s?"ArrowDown":"ArrowRight":this.onArrow(!1);break;case"Home":this.onStartEnd();break;case"End":this.onStartEnd(!1)}}}static onArrow(e=!0){var t;const i=null===(t=document.querySelector("[data-tab]:focus"))||void 0===t?void 0:t.closest('[role="tablist"]');if(!i)return;const s=window.$hsTabsCollection.find((e=>e.element.el===i));if(s){const t=e?Array.from(s.element.toggles).reverse():Array.from(s.element.toggles),i=t.find((e=>document.activeElement===e));let n=t.findIndex((e=>e===i));n=n+1<t.length?n+1:0,t[n].focus(),t[n].click()}}static onStartEnd(e=!0){var t;const i=null===(t=document.querySelector("[data-tab]:focus"))||void 0===t?void 0:t.closest('[role="tablist"]');if(!i)return;const s=window.$hsTabsCollection.find((e=>e.element.el===i));if(s){const t=e?Array.from(s.element.toggles):Array.from(s.element.toggles).reverse();t.length&&(t[0].focus(),t[0].click())}}static on(e,t,i){const s=window.$hsTabsCollection.find((e=>Array.from(e.element.toggles).includes("string"==typeof t?document.querySelector(t):t)));s&&(s.element.events[e]=i)}}window.addEventListener("load",(()=>{l.autoInit()})),"undefined"!=typeof window&&(window.HSTabs=l);const r=l},376:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(392),n=i(709),o=i(179);
/*
* HSCarousel
* @version: 3.0.1
* @author: Preline Labs Ltd.
* @license: Licensed under MIT and Preline UI Fair Use License (https://preline.co/docs/license.html)
* Copyright 2024 Preline Labs Ltd.
*/
class l extends n.A{constructor(e,t){var i,s,n,o,l;super(e,t);const r=e.getAttribute("data-carousel"),a=r?JSON.parse(r):{},c=Object.assign(Object.assign({},a),t);this.currentIndex=c.currentIndex||0,this.loadingClasses=c.loadingClasses?`${c.loadingClasses}`.split(","):null,this.dotsItemClasses=c.dotsItemClasses?c.dotsItemClasses:null,this.isAutoHeight=void 0!==c.isAutoHeight&&c.isAutoHeight,this.isAutoPlay=void 0!==c.isAutoPlay&&c.isAutoPlay,this.isCentered=void 0!==c.isCentered&&c.isCentered,this.isDraggable=void 0!==c.isDraggable&&c.isDraggable,this.isInfiniteLoop=void 0!==c.isInfiniteLoop&&c.isInfiniteLoop,this.isRTL=void 0!==c.isRTL&&c.isRTL,this.isSnap=void 0!==c.isSnap&&c.isSnap,this.hasSnapSpacers=void 0===c.hasSnapSpacers||c.hasSnapSpacers,this.speed=c.speed||4e3,this.updateDelay=c.updateDelay||0,this.slidesQty=c.slidesQty||1,this.loadingClassesRemove=(null===(i=this.loadingClasses)||void 0===i?void 0:i[0])?this.loadingClasses[0].split(" "):"opacity-0",this.loadingClassesAdd=(null===(s=this.loadingClasses)||void 0===s?void 0:s[1])?this.loadingClasses[1].split(" "):"",this.afterLoadingClassesAdd=(null===(n=this.loadingClasses)||void 0===n?void 0:n[2])?this.loadingClasses[2].split(" "):"",this.container=this.el.querySelector(".carousel")||null,this.inner=this.el.querySelector(".carousel-body")||null,this.slides=this.el.querySelectorAll(".carousel-slide")||[],this.prev=this.el.querySelector(".carousel-prev")||null,this.next=this.el.querySelector(".carousel-next")||null,this.dots=this.el.querySelector(".carousel-pagination")||null,this.info=this.el.querySelector(".carousel-info")||null,this.infoTotal=(null===(o=null==this?void 0:this.info)||void 0===o?void 0:o.querySelector(".carousel-info-total"))||null,this.infoCurrent=(null===(l=null==this?void 0:this.info)||void 0===l?void 0:l.querySelector(".carousel-info-current"))||null,this.sliderWidth=this.el.getBoundingClientRect().width,this.isDragging=!1,this.dragStartX=null,this.initialTranslateX=null,this.touchX={start:0,end:0},this.resizeContainer=document.querySelector("body"),this.resizeContainerWidth=0,this.init()}setIsSnap(){const e=this.container.getBoundingClientRect(),t=e.left+e.width/2;let i=null,s=null,n=1/0;Array.from(this.inner.children).forEach((e=>{const s=e.getBoundingClientRect(),o=this.inner.getBoundingClientRect(),l=s.left+s.width/2-o.left,r=Math.abs(t-(o.left+l));r<n&&(n=r,i=e)})),i&&(s=Array.from(this.slides).findIndex((e=>e===i))),this.setIndex(s),this.dots&&this.setCurrentDot()}prevClick(){this.goToPrev(),this.isAutoPlay&&(this.resetTimer(),this.setTimer())}nextClick(){this.goToNext(),this.isAutoPlay&&(this.resetTimer(),this.setTimer())}containerScroll(){clearTimeout(this.isScrolling),this.isScrolling=setTimeout((()=>{this.setIsSnap()}),100)}elementTouchStart(e){this.touchX.start=e.changedTouches[0].screenX}elementTouchEnd(e){this.touchX.end=e.changedTouches[0].screenX,this.detectDirection()}innerMouseDown(e){this.handleDragStart(e)}innerTouchStart(e){this.handleDragStart(e)}documentMouseMove(e){this.handleDragMove(e)}documentTouchMove(e){this.handleDragMove(e)}documentMouseUp(){this.handleDragEnd()}documentTouchEnd(){this.handleDragEnd()}dotClick(e){this.goTo(e),this.isAutoPlay&&(this.resetTimer(),this.setTimer())}init(){this.createCollection(window.$hsCarouselCollection,this),this.inner&&(this.calculateWidth(),this.isDraggable&&!this.isSnap&&this.initDragHandling()),this.prev&&(this.onPrevClickListener=()=>this.prevClick(),this.prev.addEventListener("click",this.onPrevClickListener)),this.next&&(this.onNextClickListener=()=>this.nextClick(),this.next.addEventListener("click",this.onNextClickListener)),this.dots&&this.initDots(),this.info&&this.buildInfo(),this.slides.length&&(this.addCurrentClass(),this.isInfiniteLoop||this.addDisabledClass(),this.isAutoPlay&&this.autoPlay()),setTimeout((()=>{this.isSnap&&this.setIsSnap(),this.loadingClassesRemove&&("string"==typeof this.loadingClassesRemove?this.inner.classList.remove(this.loadingClassesRemove):this.inner.classList.remove(...this.loadingClassesRemove)),this.loadingClassesAdd&&("string"==typeof this.loadingClassesAdd?this.inner.classList.add(this.loadingClassesAdd):this.inner