PageSourceSearch

https://jennifermargulis.net/wp-content/plugins/thrive-leads/tcb/editor/js/dist/modules/toc.min.js?v=3.13.2

js jennifermargulis.net collected 2026-10-02 05:39:05 UTC 11,299 bytes, 1 lines download raw bytes

1!function(){var t={28817:function(t,e,n){(t=>{const e=n(13088);t.fn.tocToggle=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"show";const o=t(this),i=o.closest(".tve-toc"),a=o.siblings(".tve-toc-content"),s=i.attr("data-animation-speed"),r=i.attr("data-animation");let c=e.getAnimationFunctions(r);o.toggleClass("tve-state-expanded","show"!==n),c[n](a,s),i.toggleClass("tve-toc-collapsed","show"!==n)}})(ThriveGlobal.$j)},13088:function(t){var e;e=ThriveGlobal.$j,TCB_Front,t.exports=class{static handleContent(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e(window).trigger(n?"tcb_on_content_show":"tcb_on_content_hide"),e(window).trigger("tve_after_content_toggle",[t,n])}static getAnimationFunctions(t,e){let n,o;switch(t){case"appear":n=function(t){return t.children(".tve-cb").removeAttr("style"),t.show()},o=function(t){return t.hide()};break;case"fade":n=function(t,e){return t.removeAttr("style").fadeIn(e)},o=function(t,e){return t.fadeOut(e)};break;case"slide-up":n=function(t){return t.children(".tve-cb").removeAttr("style").css({bottom:"100%",opacity:"0"}).animate({bottom:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({bottom:"0",opacity:"1"}).animate({bottom:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-down":n=function(t){return t.children(".tve-cb").removeAttr("style").css({top:"100%",opacity:"0"}).animate({top:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({top:"0",opacity:"1"}).animate({top:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide":n=function(t,e){return t.removeAttr("style").slideDown(e)},o=function(t,e){return t.slideUp(e)};break;case"slide-right":n=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",left:"100%"}).animate({left:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({opacity:"1",left:"0"}).animate({left:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-left":n=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",right:"100%"}).animate({right:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({opacity:"1",right:"100%"}).animate({right:"0",opacity:"0"}).hide(),t.hide()};break;case"smooth-resize":n=function(t){let n=t.children(),o=t.data("contentHeight")||t.height();return n.css({height:e}).animate({height:o},500).promise().done((()=>{n.css("height","100%")})),t.show()},o=function(t){return t.data("contentHeight",t.height()),t.hide()};break;case"swing-up":n=function(t){return t.css({transform:"rotateX(-20deg)",opacity:0}
1).animate({transform:"rotateX(0)",opacity:1},300).promise().done((()=>{t.css({transform:"rotateX(0)",opacity:1})})),t.show()},o=function(t){return t.hide()};break;case"slide-fade":n=function(t,e){return t.animate({opacity:"toggle",height:"toggle"},e)},o=function(t,e){return t.animate({opacity:"hide",height:"hide"},e)};break;default:n=function(t){return t.show()},o=function(t){return t.hide()}}return{show:n,hide:o}}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}!function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}void 0===TCB_Front.js_modules.toc&&TCB_Front.setModuleLoadedStatus("toc",!1),function(t,o){if(TCB_Front.isModuleLoaded("toc"))return;n(28817),window.addEventListener("load",(()=>{i.initToc(o.$body,!!tve_frontend_options.is_editor_page)})),t(window).on("tcb_after_dom_ready",(()=>{i.initToc(o.$body,!!tve_frontend_options.is_editor_page),t(".tve-toc-expandable").each(((e,n)=>{const i=t(n),a=o.getMediaAttr(i,"data-state-default");i.data("tcbTocDone")||(i.find(".tve-toc-title").tocToggle("expanded"===a?"show":"hide"),i.data("tcbTocDone",!0))})),function(){const e=t(TCB_Front.Utils.isEditorPage()?"#tve_editor":"body");e.off("click.tvetoc").on("click.tvetoc",".tve-toc-expandable .tve-toc-title, .tve-toc-expandable .tve-toc-title *",(function(e){const n=t(this).closest(".tve-toc-title");TCB_Front.Utils.isEditorPage()&&!n.hasClass("tve-prevent-content-edit")||(n.tocToggle(n.hasClass("tve-state-expanded")?"show":"hide"),e.preventDefault(),e.stopPropagation())})),e.on("click",".thrv_contents_table a",(function(e){try{const e=t(this.getAttribute("href"));if(e.length)return t("html, body").animate({scrollTop:e.offset().top-130},200),setTimeout((()=>{location.href=this.getAttribute("href")}),200),!1}catch(t){console.warn("ToC exception",t)}}))}()}));let i={},a=!1,s=t(),r=!1,c=(new Date).getTime();function l(t){parseInt(tve_frontend_options.is_single)&&t.find(".tve-toc:not(.tve-dynamic-toc), .thrv_symbol .tve-toc.tve-dynamic-toc").tableOfContents()}function d(e){const n=t(".thrv_header.tve-scroll-sticky").outerHeight()||0;e.find(".tve-toc.tve-elem-scroll").each(((e,o)=>{const i=t(o),a={};i.is(".tve-toc-dynamic:not(.tve-rendered)")||(i.find(".tve-toc-heading .tve-jump-scroll").each(((e,o)=>{let i=o.getAttribute("href")||o.getAttribute("data-target"),s=t(`${i}`);if(!s.length)return;const r=Math.max(0,s.offset().top-100-n);t(o).data("targetOffset",r),a[r]?a[r].push(`[href="${i}"]`):a[r]=[`[href="${i}"]`]})),i.data("headers",a),s=s.add(i))}))}function h(e,n,i){s.each(((n,o)=>{const i=t(o),a=o.dataset.highlight,s=i.data("headers");Object.keys(s).sort(((t,e)=>t-e)).forEach((t=>{let n=i.find(s[t].join(",")).parent();"heading"===a?e>=t?(i.find(".tve-toc-heading.tve-state-expanded").removeClass("tve-state-expanded"),n.addClass("tve-state-expanded")):n.removeClass("tve-state-expanded"):"section"===a?e>=t?(i.find(".tve-toc-heading.tve-state-expanded").removeClass("tve-state-expanded"),n.is(".tve-toc-heading-level0")||(n.prevUntil(".tve-toc-heading-level0").addClass("tve-state-expanded"),n.prevAll(".tve-toc-heading-level0").first().addClass("tve-state-expanded")),n.addClass("tve-state-expanded")):n.removeClass("tve-state-expanded"):n.toggleClass("tve-state-expanded",e>=t)}))})),o.isBottomScroll(e)&&h(e+window.innerHeight)}t.fn.tableOfContents=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={target:"#tve_editor.tar-main-content",columns:1,headers:"h1,h2,h3",distribute:"",itemCallback:jQuery.noop,hideEmpty:!0,numbering:"none",emptyText:window.tve_frontend_options&&tve_frontend_options.translations?tve_frontend_options.translations.no_headings:"No headings found",itemsFilter:function(t){return t}},s=!1,r={level0:0,level1:0,level2:0},l=(t,e,n,o,i,a)=>{let c;if(s)c=`<div class="tve_ct_level${n}"><a href="#${e}" rel="nofollow">${o}</a></div>`;
1else{let s="",l="",d="",h=t.numbering.includes("bullet"),v=t.numbering.includes("advance");if("none"!==t.numbering){if(h)(0===n||v)&&(d=`toc-bullet-${n}`);else if(0===n||v){r[`level${n}`]+=1,r[`level${n+1}`]=0;for(let t=0;t<n+1;t++)s+=`${r[`level${t}`]}${t===n?"":"."}`}if(h&&d){const o=a.attr("data-id");o&&(d+=`-${o}`),l=`<div class="thrv_wrapper tve-toc-bullet tve-toc-bullet${n} tve_no_icons tve-jump-scroll" data-target="#${e}" jump-animation="smooth" data-icon-target="${d}" data-element-name="Icon Level ${n+1}" data-css="${t.bulletStyle[n]||""}"><svg class="tcb-icon"><use href="#${d}"/></svg></div>`}else s&&(l=`<div class="thrv_wrapper tve-toc-number tve-toc-number${n} tve_no_icons tve-jump-scroll" data-target="#${e}" jump-animation="smooth" data-element-name="Number Level ${n+1}" data-level="${n}" data-css="${t.numberStyle[n]||""}"><span class="tve-toc-disabled">${s}${t.numberSuffix[n]||""}</span></div>`)}c=`<div class="thrv_wrapper tve-toc-heading tve-toc-heading-level${n} tve_no_icons" data-tag="${i}" data-css="${t.headingStyle[n]||""}" data-element-name="Heading Level ${n+1}">${l}<a href="#${e}" class="tve-toc-anchor tve-jump-scroll" jump-animation="smooth">${o}</a></div>`}return c};return this.each((function(){const d=t(this);if(!d.is(".thrv_contents_table,.tve-toc"))return;const h=d.closest(".thrv_gutenberg_block,.thrv_symbol");if(s=d.hasClass("thrv_contents_table"),a&&!d.attr("data-id")){const t=TVE.CSS_Rule_Cache.generate_id("",36);d.attr("data-id",t),d.find(".toc-icons symbol").each((function(){this.setAttribute("id",`${this.getAttribute("id").match(/toc-bullet-\d+/)[0]}-${t}`)}))}s||(r={level0:0,level1:0,level2:0},["headingStyle","bulletStyle","numberStyle","numberSuffix"].forEach((t=>{n[t]={};try{n[t]=JSON.parse(this.dataset[t])}catch(t){}})));const v=d.find(".tve_ct_content").empty(),u=e(e(e({},i),this.dataset),n);u.distribute=1===parseInt(u.distribute)||"true"===u.distribute||!0===u.distribute,u.columns=Number(o.getMediaAttr(d,"data-columns")||1);const f=u.headers.split(",").map((t=>t.toUpperCase()));let p,g=f.shift(),m=t(u.target);if(m.length||(m=h.length?h.parent():t("#tve_editor")),p=m.find(u.headers),p=u.itemsFilter(p),a&&d.hasClass("tve-dynamic-toc")||(p=p.filter(":visible")),p=p.filter(':not([data-hide="true"], .tve-toc *, .thrv-login-element *)'),!p.length)return void(u.hideEmpty&&!o.queryString.get("tve_block_preview")?d.hide():v.html(`<div class="tve-empty-toc">${u.emptyText}</div>`));for(;g&&f.length&&0===p.filter(g).length;)g=f.shift();let b=p.length/u.columns;u.distribute||(b=p.filter(g).length/u.columns);let _=new Array(u.columns).fill("",0,u.columns),y=0,w=-1;p.each((function(){const e=t(this),n=e.attr("data-alt-text")||e.text();(u.distribute||this.tagName===g)&&w++,w>=(1+y)*b&&y++;const o=this.id&&m.find(`[id="${this.id}"]`).length>1,i=e.closest(".tve-content-list,.tvo-testimonials-display ").length>0,s=o||i&&!a&&!this.classList.contains("tve-id-regenerated"),r=this.id&&!s?this.id:this.id="t-"+c++,h=u.headers.split(",").indexOf(this.tagName.toLowerCase()),v=l(u,r,h,n,this.tagName,d);s&&i&&!a&&this.classList.add("tve-id-regenerated"),u.itemCallback(e,h,u),_[y]+=v}));let $="";if(!s){const t=d.children(".tve-toc-divider");$=t.length?t.html():'<div class="thrv_wrapper thrv-divider tve-vert-divider" data-style="tve_sep-1" data-color-d="rgb(217, 217, 217)" data-thickness-d="1"><hr class="tve_sep tve_sep-1" style=""></div>'}v.html(_.map((t=>`<div class="ct_column">${t}</div>${$}`)).join("")),!a&&d.hasClass("tve-dynamic-toc")&&d.addClass("tve-rendered")}))},i.initToc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.$body,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a=n,a||(e.length||(e=t("body")),r||(l(e),d(e),r=!0),o.add_scroll_callback(h),o.$body.off(".tcb-jumplink-done").on("tcb-jumplink-done",((e,n,o)=>{(o.classList.contains("tve-toc-anchor")||o.classList.contains("tve-toc-number")||o.classList.contains("tve-toc-bullet"))&&setTimeout((()=>{h(t(o).data("targetOffset"))}),500)})))},window.TCB_Front.toc=i,TCB_Front.setModuleLoadedStatus("toc",!0)}(ThriveGlobal.$j,TCB_Front)}()}();

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.