PageSourceSearch

https://usantotomas.edu.co/hubfs/hub_generated/template_assets/1/1…/template_TabbedSection.min.js

js usantotomas.edu.co collected 2026-10-02 07:33:04 UTC 3,340 bytes, 2 lines download raw bytes

1!function(e,t){"function"==typeof define&&define.amd?define(["exports"],t):"undefined"!=typeof exports?t(exports):(t(t={}),e.TabbedSection=t)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(e){"use strict";function o(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function(){function n(e){var a=this,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"vertical";if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.el=e,this.direction=t,this.navigationItems=e.querySelectorAll('[role="tab"]'),this.activeNav=null,this.lastFocusedNav=null,this.bodies=e.querySelectorAll('[role="tabpanel"]'),this.activeBody=null,this.el.addEventListener("keydown",function(e){if(!e.defaultPrevented&&Array.from(a.navigationItems).includes(document.activeElement)){var t=Array.from(a.bodies).indexOf(a.activeBody),i=null,o="vertical"===a.direction?"ArrowDown":"ArrowRight",n="vertical"===a.direction?"ArrowUp":"ArrowLeft";switch(e.code){case o:i=a.activeBody===a.bodies[a.bodies.length-1]?a.bodies[0]:a.bodies[t+1];break;case n:i=a.activeBody===a.bodies[0]?a.bodies[a.bodies.length-1]:a.bodies[t-1];break;case"Home":i=a.bodies[0];break;case"End":i=a.bodies[a.bodies.length-1]}i&&(e.preventDefault(),a.makeActive(i),Array.from(a.navigationItems).find(function(e){return null!==e.offsetParent&&Array.from(a.activeNav).includes(e)}).focus())}}),this.navigationItems.forEach(function(e){var t=a.getBody(e);e.addEventListener("click",function(e){e.defaultPrevented||a.makeActive(t)})}),this.makeActive(this.bodies[0],!1)}var e,t;return e=n,(t=[{key:"makeActive",value:function(e){var o=this,t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],i=e!==this.activeBody,n=this.getNav(e);this.activeBody=e,this.activeNav=n,this.bodies.forEach(function(e){var t=o.activeBody===e,i=(e.classList.toggle("active",t),e.getBoundingClientRect().top+window.scrollY);document.querySelector(".site-header--sticky")&&(i-=document.querySelector("#site-header").offsetHeight),window.matchMedia("(max-width: 768px)").matches&&e.scroll({top:i,behavior:"smooth"}),o.getNav(e).forEach(function(e){e.classList.toggle("active",t),e.setAttribute("aria-selected",t),e.setAttribute("tabindex",t?0:-1)})}),t&&window.requestAnimationFrame(function(){80<=o.activeBody.getBoundingClientRect().top||o.activeBody.scrollIntoView()}),i&&(t=new CustomEvent("tabbed-section.change",{detail:{body:e,navItems:n}}),this.el.dispatchEvent(t))}},{key:"bodyAndNavMatch",value:function(e,t){return e.id===t.getAttribute("aria-controls")}},{key:"getNav",value:function(t){var i=this;return Array.from(this.navigationItems).filter(function(e){return i.bodyAndNavMatch(t,e)})}},{key:"getBody",value:function(t){var i=this;return Array.from(this.bodies).find(function(e){return i.bodyAndNavMatch(e,t)})}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),i=(document.querySelectorAll(".tabs").forEach(function(e){new t(e,e.dataset.direction)}),t);e.default=i});
2//# sourceURL=https://5516883.fs1.hubspotusercontent-na1.net/hubfs/5516883/hub_generated/template_assets/1/165831085200/1790009194345/template_TabbedSection.js

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.