Add massive collection of CSS, JavaScript and theme assets that were previously excluded: **CSS Files (681 total):** - HVAC plugin-specific styles (hvac-*.css): 34 files including dashboard, certificates, registration, mobile nav, accessibility fixes, animations, and welcome popup - Theme framework files (Astra, builder systems, layouts): 200+ files - Plugin compatibility styles (WooCommerce, WPForms, Elementor, Contact Form 7): 150+ files - WordPress core and editor styles: 50+ files - Responsive and RTL language support: 200+ files **JavaScript Files (400+ total):** - HVAC plugin functionality (hvac-*.js): 27 files including menu systems, dashboard enhancements, profile sharing, mobile responsive features, accessibility, and animations - Framework and library files: jQuery plugins, GSAP, AOS, Swiper, Chart.js, Lottie, Isotope - Plugin compatibility scripts: WPForms, WooCommerce, Elementor, Contact Form 7, LifterLMS - WordPress core functionality: customizer, admin, block editor compatibility - Third-party integrations: Stripe, SMTP, analytics, search functionality **Assets:** - Certificate background images and logos - Comprehensive theme styling infrastructure - Mobile-responsive design systems - Cross-browser compatibility assets - Performance-optimized minified versions **Updated .gitignore:** - Fixed asset directory whitelisting patterns to properly include CSS/JS/images - Added proper directory structure recognition (!/assets/css/, !/assets/js/, etc.) - Maintains security by excluding sensitive files while including essential assets This commit provides the complete frontend infrastructure needed for: - Full theme functionality and styling - Plugin feature implementations - Mobile responsiveness and accessibility - Cross-browser compatibility - Performance optimization - Developer workflow support
		
			
				
	
	
		
			16 lines
		
	
	
		
			No EOL
		
	
	
		
			10 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			No EOL
		
	
	
		
			10 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| let scrollData=!0,scrollOffset=30,scrolltoTop=!1,scrollElement=null,uagbTOCCollapseListener=!0;UAGBTableOfContents={_getDocumentElement(){let e=document;var t=document.querySelectorAll('iframe[name="editor-canvas"]');return!t?.length||(t=t?.[0]?.contentWindow?.document||t?.[0]?.contentDocument)&&(e=t),e},_setCollapseIconMargin(o,l){const s=UAGBTableOfContents._getDocumentElement(),r=s.querySelector(o),u=r.querySelector(".uagb-toc__loader");var n=r.querySelector("li.uagb-toc__list:not(.uagb-toc__list--expandable)");if(n){n=window.getComputedStyle(n).fontSize;const m=r.querySelector(".uagb-toc__list-wrap");var g=`calc(${n} / 3)`,a=o?.replace(/\./g,"");const c=s.querySelector(`#${a}-toc-style`),d=(c&&c.remove(),s.createElement("style")),p=(d.id=a+"-toc-style",navigator.userAgent.toLowerCase());var a=/^((?!chrome|android|crios|fxios).)*safari/i.test(p)&&!p.includes("edge"),i=p.includes("firefox");let e,t="-0.5px";"disc"===l?.markerView&&(a||i?(e=5+5*((parseFloat(n)-8)/8)+"px",t=i?"1px":"-0.5px"):e=n),"decimal"===l?.markerView&&(a=(e=>{e=parseFloat(e);return.25*e+2*Math.max(0,(e-16)/8)})(n),e=parseFloat(n)-a+"px",t="1px"),d.innerHTML+=`
 | |
| 				${o} .list-open::before,
 | |
| 				${o} .list-collapsed::before {
 | |
| 					width: ${g};
 | |
| 				}
 | |
| 				${o} .list-open,
 | |
| 				${o} .list-collapsed {
 | |
| 					margin-right: ${e};
 | |
| 					margin-left: ${t};
 | |
| 				}
 | |
| 				[dir="rtl"] ${o} .list-open,
 | |
| 				[dir="rtl"] ${o} .list-collapsed {
 | |
| 					margin-right: ${t};
 | |
| 					margin-left: ${e};
 | |
| 				}
 | |
| 			`,s.head.appendChild(d),setTimeout(()=>{r.style.opacity="",u?.remove(),m?.classList.remove("uagb-toc__list-hidden")},300)}},_initCollapsableList(e,t){const o=UAGBTableOfContents._getDocumentElement(),l=o.querySelector(e);if(t?.isFrontend&&t?.enableCollapsableList&&!l.classList.contains("init-collapsed-script")){l.classList.add("init-collapsed-script");const s=l.querySelectorAll("ul.uagb-toc__list"),r=("function"==typeof UAGBTableOfContents._setCollapseIconMargin&&UAGBTableOfContents._setCollapseIconMargin(e,t),s.forEach(e=>{const t=e.parentElement.querySelector(".list-open");var o;e.classList.add("transition"),e.dataset.originalMaxHeight=e.scrollHeight+"px",t?(o="true"===t.getAttribute("aria-expanded"),e.style.maxHeight=o?e.dataset.originalMaxHeight:"0px",e.style.overflow=o?"visible":"hidden",e.addEventListener("transitionend",()=>{"0px"!==e.style.maxHeight&&(e.style.overflow="visible")})):(e.style.maxHeight=e.dataset.originalMaxHeight,e.style.overflow="visible")}),Array.from(l.getElementsByClassName("list-open")));r.forEach(o=>{const t=()=>{const e=o.parentElement.querySelector("ul");if(e){const t="true"===o.getAttribute("aria-expanded");o.setAttribute("aria-expanded",!t),t||e.classList.remove("uagb-toc__list--hidden-child"),setTimeout(()=>{t?(e.style.maxHeight="0px",e.style.overflow="hidden"):e.style.maxHeight=e.dataset.originalMaxHeight,o.classList.toggle("list-open",!t),o.classList.toggle("list-collapsed",t),e.classList.toggle("uagb-toc__list--child-of-closed-list")},0),t&&setTimeout(()=>{e.classList.add("uagb-toc__list--hidden-child")},300)}};o.addEventListener("click",t),o.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())}),o.setAttribute("aria-expanded",o.classList.contains("list-open"))}),t?.initiallyCollapseList&&s.forEach(e=>{if(e.parentElement.querySelector("span")){e.style.maxHeight="0px",e.style.overflow="hidden",e.classList.add("uagb-toc__list--child-of-closed-list"),setTimeout(()=>{e.classList.add("uagb-toc__list--hidden-child")},300);const t=e.parentElement.querySelector(".list-open");t&&(t.setAttribute("aria-expanded","false"),t.classList.remove("list-open"),t.classList.add("list-collapsed"))}})}},init(r,n){(!n?.makeCollapsible||n?.initialCollapse)&&n?.makeCollapsible||UAGBTableOfContents._initCollapsableList(r,n);const e=UAGBTableOfContents._getDocumentElement();if(null!==document.querySelector(".uagb-toc__list")&&document.querySelector(".uagb-toc__list").addEventListener("click",UAGBTableOfContents._scroll),null!==document.querySelector(".uagb-toc__scroll-top")&&document.querySelector(".uagb-toc__scroll-top").addEventListener("click",UAGBTableOfContents._scrollTop),n?.makeCollapsible){const a=e.querySelector(r);uagbTOCCollapseListener&&(e.addEventListener("click",function(e){const t=e.target,o="path"===t?.tagName||"svg"===t?.tagName||"DIV"===t?.tagName,l="uagb-toc__title"===t?.className||"uagb-toc__title"===t?.parentNode?.className||"svg"===t?.parentNode?.tagName;if(o&&l){const s=t?.closest(".wp-block-uagb-table-of-contents"+r);e=a?.querySelector(".wp-block-uagb-table-of-contents .uagb-toc__list-wrap");e&&(s?.classList?.contains("uagb-toc__collapse")?(s?.classList?.remove("uagb-toc__collapse"),UAGBTableOfContents._slideDown(e,500,r,n)):(s?.classList?.add("uagb-toc__collapse"),UAGBTableOfContents._slideUp(e,500)))}}),uagbTOCCollapseListener=!1)}document.addEventListener("scroll",UAGBTableOfContents._showHideScroll)},_slideUp(e,t){e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.boxSizing="border-box",e.style.height=e.offsetHeight+"px",e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout(()=>{e.style.display="none",e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},t)},_slideDown(e,t,o,l){e.style?.removeProperty("display");let s=window?.getComputedStyle(e).display;"none"===s&&(s="block"),e.style.display=s;var r=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.boxSizing="border-box",e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=r+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),UAGBTableOfContents._initCollapsableList(o,l)},t)},hyperLinks(){const e=window.location.hash.substring(0);if(""!==e&&!/[^a-z0-9_-]$/.test(e)){encodeURI(e.substring(0));var t=e.replace(/([.#$+\^*[\](){}|\\])/g,"\\$1");if(null!==document?.querySelector(t)){const o=document.querySelector(".wp-block-uagb-table-of-contents");scrollOffset=o.getAttribute("data-offset");t=document.querySelector(e).offsetTop;null!==t&&scroll({top:t-scrollOffset,behavior:"smooth"})}}},_showHideScroll(){null!==(scrollElement=document.querySelector(".uagb-toc__scroll-top"))&&(300<window.scrollY&&scrolltoTop?scrollElement.classList.add("uagb-toc__show-scroll"):scrollElement.classList.remove("uagb-toc__show-scroll"))},_scrollTop(){window.scrollTo({top:0,behavior:"smooth"})},_scroll(e){e.preventDefault();let t=e.target.getAttribute("href");if(!t&&e.target.tagName&&"A"!==e.target.tagName){const o=e.target.closest("a");o&&(t=o.getAttribute("href"))}if(t){const l=document.querySelector(".wp-block-uagb-table-of-contents");scrollData=l.getAttribute("data-scroll"),scrollOffset=l.getAttribute("data-offset");let e=null;t=t.substring(1),document?.querySelector("[id='"+t+"']")&&(e=document.querySelector("[id='"+t+"']")?.getBoundingClientRect().top+window.scrollY),scrollData?null!==e&&scroll({top:e-scrollOffset,behavior:"smooth"}):scroll({top:e,behavior:"auto"})}},selectDomElement(e){const t=document.querySelector(e+":not(.script-init)");return t?(t.classList.add("script-init"),t):null},parseTocSlug(e){if(!e)return e;e=e.toString().toLowerCase().replace(/\…+/g,"").replace(/\u2013|\u2014/g,"").replace(/&(amp;)/g,"").replace(/[&]nbsp[;]/gi,"-").replace(/[^a-zA-Z0-9\u00C0-\u017F _-]/g,"").replace(/&(mdash;)/g,"").replace(/\s+/g,"-").replace(/[&\/\\#,^!+()$~%.\[\]'":*?;-_<>{}@‘’”“|]/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"");return decodeURI(encodeURIComponent(e))},mapTocAnchorsForHref(e){for(const o of e){var t=o.textContent,t=UAGBTableOfContents.parseTocSlug(t);o.setAttribute("href","#"+t)}},_run(e,t){setTimeout(function(){UAGBTableOfContents._runWithTimeOut(e,t)},500)},_runWithTimeOut(t,p){const o=UAGBTableOfContents.selectDomElement(p);if(o){null!==o.querySelector(".uag-toc__collapsible-wrap")&&0<o.querySelector(".uag-toc__collapsible-wrap").length&&o.querySelector(".uagb-toc__title-wrap").classList.add("uagb-toc__is-collapsible");const l=[];let e;void 0!==t.mappingHeaders&&(t.mappingHeaders.forEach(function(e,t){!0===e&&l.push("h"+(t+1))}),e=null!==l?l.join(","):"");var u=void 0!==e&&""!==e?document.body.querySelectorAll(e):document.body.querySelectorAll("h1, h2, h3, h4, h5, h6");if(0!==u.length){const s=o.querySelector(".uagb-toc__list-wrap");if(!s)return;const r=Array.from(u),n=s.getElementsByTagName("a");UAGBTableOfContents.mapTocAnchorsForHref(n);function g(e=[]){const o=[];return e.reduce((e,t)=>((e.some(e=>e.innerText===t.innerText)?o:e).push(t),e),[]),o}const a=g(r);for(let e=0;e<r.length;e++){let t=UAGBTableOfContents.parseTocSlug(r[e].innerText);if(""!==r[e].innerText&&t.length<1){var m=r[e].innerText;for(let e=0;e<n.length;e++)if(n[e].textContent===m){const c="#toc_"+Math.random();n[e].setAttribute("href",c),t=c.substring(1)}}const i=document.createElement("span");i.id=t,i.className="uag-toc__heading-anchor",r[e].prepend(i);for(let t=0;t<a.length;t++){const y="#toc_"+Math.random();a[t]?.querySelector(".uag-toc__heading-anchor")?.setAttribute("id",y.substring(1));const b=g(Array.from(s.getElementsByTagName("a")));for(let e=0;e<b.length;e++)b[t]?.setAttribute("href",y)}}}scrolltoTop=t.scrollToTop;if(null===(scrollElement=document.querySelector(".uagb-toc__scroll-top"))){const d=document.createElement("div");d.classList.add("uagb-toc__scroll-top"),d.innerHTML='<svg xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="26px" height="16.043px" viewBox="57 35.171 26 16.043" enable-background="new 57 35.171 26 16.043" xml:space="preserve"><path d="M57.5,38.193l12.5,12.5l12.5-12.5l-2.5-2.5l-10,10l-10-10L57.5,38.193z"/></svg>',document.body.appendChild(d)}null!==scrollElement&&scrollElement.classList.add("uagb-toc__show-scroll"),UAGBTableOfContents._showHideScroll(),UAGBTableOfContents.hyperLinks(),UAGBTableOfContents.init(p,t)}}}; |