PageSourceSearch

https://www.tbkbank.com/wp-content/themes/triumphant-child/assets/js/script-min.js?ver=5622290955

js tbkbank.com collected 2026-10-01 15:35:13 UTC 18,214 bytes, 1 lines download raw bytes

1!function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(r=i.key,a=void 0,"symbol"==typeof(a=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(r,"string"))?a:String(a)),i)}var r,a}function i(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=a.call(n)).done)&&(s.push(i.value),s.length!==e);c=!0);}catch(t){l=!0,r=t}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var s=function(){function t(n,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e4;e(this,t),this.list=n,this.listLength=a,this.filterSelector=i,this.filterElements=document.querySelectorAll(this.filterSelector),this.loadMore=document.querySelector(r),this.activeFilters={},this.init()}return i(t,[{key:"init",value:function(){var t=this;this.list.valueNames.forEach((function(e){t.activeFilters[e]=[],Object.defineProperty(t.activeFilters,e,[])})),this.list.show(1,this.listLength),this.loadMore&&this.list.on("updated",(function(){t.list.matchingItems.length<t.listLength||t.list.page>t.list.items.length?t.loadMore.style.display="none":t.loadMore.style.display="block"})),this.filterElements.forEach((function(e){e.addEventListener("change",(function(e){t.filterList()}))})),this.loadMore&&this.loadMore.addEventListener("click",(function(e){var n=t.list.page+t.listLength;t.list.show(1,n),t.list.update()}))}},{key:"getCheckedInputs",value:function(){var t=this,e=document.querySelectorAll(this.filterSelector);this.list.valueNames.forEach((function(e){t.activeFilters[e]=[]})),e.forEach((function(e){e.checked&&t.activeFilters[e.dataset.filter].push(e.value)}))}},{key:"filterList",value:function(){var t=this;this.getCheckedInputs(),this.list.filter((function(e){var n=!0,i=function(i){t.activeFilters[i].length&&e.values()[i]&&n&&(a=e.values()[i].split(", "),o=a.filter((function(e){return t.activeFilters[i].includes(e)})),n=o.length>0)};for(var r in t.activeFilters){var a,o;i(r)}return n}))}}]),t}(),c=function(){function n(i,a){if(e(this,n),this.accountComparison=i,this.table=this.accountComparison.querySelector("table"),this.tableHead=this.accountComparison.querySelector(".account-headers"),this.breakpointIndex=!1,this.tableWidth="100%",this.columns={first:null,last:null,visible:null,total:parseInt(this.table.dataset.accountNumber)},this.nav={prev:{active:!1,button:this.accountComparison.querySelector('[data-controls="prev"]'),dimension:0},next:{active:!0,button:this.accountComparison.querySelector('[data-controls="next"]'),dimension:100/this.columns.total},currentDimension:0,dimension:100/this.columns.total},"object"==t(a))for(var o=0,s=Object.entries(a);o<s.length;o++){var c=r(s[o],2),l=c[0],u=c[1];this[l]=u}this.init()}return i(n,[{key:"init",value:function(){var t=this;this.columns.first=0,this.nav.prev.button.addEventListener("click",(function(e){t.prev()})),this.nav.next.button.addEventListener("click",(function(e){t.next()}));for(var e=0,n=Object.entries(this.responsive);e<n.length;e++){var i=r(n[e],2);i[0];var o=i[1];o.items=this.columns.total>=o.items?o.items:this.columns.total}var s=Object.keys(this.responsive),c=new ResizeObserver((function(e){var n,i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];
1if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}(e);try{for(i.s();!(n=i.n()).done;)for(var o=n.value.target.offsetWidth,c=Object.entries(t.responsive),l=0,u=c;l<u.length;l++){var d=r(u[l],2),h=d[0],v=d[1],f=s.indexOf(h)+1;c[f]?o>=h&&o<parseInt(c[f][0])&&t.setTableWidth(s.indexOf(h),v.items):o>=h&&t.setTableWidth(s.indexOf(h),v.items)}}catch(t){i.e(t)}finally{i.f()}}));c.observe(this.accountComparison)}},{key:"setTableWidth",value:function(t,e){this.breakpointIndex===t&&0!=this.breakpointIndex||(this.breakpointIndex=t,this.tableWidth=this.columns.total*(100/parseInt(e))+"%",this.columns.visible=e,this.columns.visible==this.columns.total?(this.columns.first=0,this.columns.last=this.columns.total-1):this.columns.last=this.columns.first+e-1,this.table.style.width=this.tableWidth,this.tableHead.style.width=this.tableWidth,this.setNav())}},{key:"setNav",value:function(){this.nav.currentDimension=this.columns.first*this.nav.dimension,0==this.columns.first?(this.nav.prev.active=!1,this.nav.prev.button.setAttribute("disabled","disabled"),this.nav.prev.dimension=0):(this.nav.prev.active=!0,this.nav.prev.button.removeAttribute("disabled"),this.nav.prev.dimension=this.nav.currentDimension-this.nav.dimension),this.columns.last+1==this.columns.total?(this.nav.next.active=!1,this.nav.next.button.setAttribute("disabled","disabled")):(this.nav.next.active=!0,this.nav.next.button.removeAttribute("disabled"),this.nav.next.dimension=this.nav.currentDimension+this.nav.dimension);var t="-"+this.nav.currentDimension+"%";this.table.style.transform="translate3d("+t+",0,0)",this.tableHead.style.transform="translate3d("+t+",0,0)",this.nav.prev.active||this.nav.next.active?(this.nav.prev.button.style.display="block",this.nav.next.button.style.display="block"):(this.nav.prev.button.style.display="none",this.nav.next.button.style.display="none")}},{key:"prev",value:function(){this.nav.prev.active&&(this.columns.first=this.columns.first-1,this.columns.last=this.columns.last-1),this.setNav()}},{key:"next",value:function(){this.nav.next.active&&(this.columns.first=this.columns.first+1,this.columns.last=this.columns.last+1),this.setNav()}}]),n}(),l=function(){function t(n){e(this,t),this.branchFinder=n,this.zipForm=this.branchFinder.querySelector("form"),this.geoButton=this.branchFinder.querySelector("#find-by-geo"),this.loadingIcon=this.branchFinder.querySelector(".branch-loading"),this.branchWrapper=this.branchFinder.querySelector(".branches"),this.branchList=this.branchFinder.querySelector(".branch-list"),this.lat=null,this.lng=null,this.zip=null,this.init()}return i(t,[{key:"init",value:function(){var t=this;this.zipForm.addEventListener("submit",(function(e){e.preventDefault(),t.lat=null,t.lng=null,t.branchList.innerHTML="",t.loadingIcon.classList.remove("hidden"),t.zip=document.getElementById("zip").value,t.getBranches()})),this.geoButton.addEventListener("click",(function(){t.zip=null,t.branchList.innerHTML="",t.loadingIcon.classList.remove("hidden"),t.getLocation()}))}},{key:"getLocation",value:function(){var t=this;navigator.geolocation?navigator.geolocation.getCurrentPosition((function(e){t.lat=Number(e.coords.latitude.toFixed(4)),t.lng=Number(e.coords.longitude.toFixed(4)),t.getBranches()})):alert("Your browser settings do not allow for geolocation, please try the zip code form instead")}},{key:"getBranches",value:function(){var t=this,e="/wp-json/tbkbank/locations";this.zip?e+="?zip=".concat(this.zip):this.lat&&this.lng&&(e+="?lat=".concat(this.lat,"&lng=").concat(this.lng)),fetch(e).then((function(t){return t.json()})).then((function(e){t.loadingIcon.classList.add("hidden");for(var n="",i=0;i<5;i++){var r=e[i];n+=t.branchElement(r)}t.branchList.innerHTML=n}))}},{key:"branchElement",value:function(t){return'\n\t\t<li class="branch">\n\t\t\t<h3>'.concat(t.post_title,"</h3>\n\t\t\t<address>").concat(t.address," ").concat(t.city,", ").concat(t.state," ").concat(t.zip,'</
1address>\n\t\t\t<p><span class="label">Distance:</span> ').concat(Number(t.distance.toFixed(1)),' mi</p>\n\t\t\t<a class="simple-link primary" href="/account-rate/').concat(t.rate.slug,'">View Rates</a>\n\t\t</li>\n\t\t')}}]),t}(),u=function(){function t(n,i){e(this,t),this.list=n,this.listFilter=i,this.init()}return i(t,[{key:"init",value:function(){var t=this;document.forms["branch-list-controls"].addEventListener("submit",(function(e){e.preventDefault();var n=document.querySelector('[name="branch-zip-search"]').value;t.reorderByZip(n)}))}},{key:"reorderByZip",value:function(t){var e=this;this.list.show(1,1e4),fetch("https://maps.googleapis.com/maps/api/geocode/json?address="+t+"&key="+googleMapsApiKey).then((function(t){return t.json()})).then((function(n){var i=n.results[0].geometry.location.lat,r=n.results[0].geometry.location.lng;document.querySelectorAll(".branch-card").forEach((function(n){var a=e.getDistance(i,r,n.dataset.lat,n.dataset.lng,"M");n.querySelector(".distance").textContent=a,n.querySelector(".distance-text").textContent="mi from "+t})),e.list.reIndex(),e.list.sort("distance",{order:"asc"}),e.list.show(1,e.listFilter.listLength)})),this.list.update()}},{key:"getDistance",value:function(t,e,n,i,r){if(t==n&&e==i)return 0;var a=Math.PI*t/180,o=Math.PI*n/180,s=e-i,c=Math.PI*s/180,l=Math.sin(a)*Math.sin(o)+Math.cos(a)*Math.cos(o)*Math.cos(c);return l>1&&(l=1),l=60*(l=180*(l=Math.acos(l))/Math.PI)*1.1515,"K"==r&&(l*=1.609344),"N"==r&&(l*=.8684),l.toFixed(1)}}]),t}(),d=function(){function t(n,i){e(this,t),this.list=n,this.listFilter=i,this.init()}return i(t,[{key:"init",value:function(){var t=this;document.forms["partner-list-controls"].addEventListener("submit",(function(e){e.preventDefault(),console.log("submit method");var n=document.querySelector('[name="partner-zip-search"]').value;t.reorderByZip(n)}))}},{key:"reorderByZip",value:function(t){var e=this;this.list.show(1,1e4),fetch("https://maps.googleapis.com/maps/api/geocode/json?address="+t+"&key="+googleMapsApiKey).then((function(t){return t.json()})).then((function(t){var n=t.results[0].geometry.location.lat,i=t.results[0].geometry.location.lng;document.querySelectorAll(".partner-card").forEach((function(t){var e=getDistance(n,i,t.dataset.lat,t.dataset.lng);t.querySelector(".distance").textContent=e})),e.list.reIndex(),e.list.sort("distance",{order:"asc"}),e.list.show(1,e.listFilter.listLength),e.list.update(),document.getElementById("partner-list").scrollIntoView({block:"start",behavior:"smooth",inline:"start"})}))}}]),t}(),h=function(){function t(n){e(this,t),this.rateFinder=document.querySelector(n),this.form=this.rateFinder.querySelector("form"),this.method=this.form.dataset.method,this.rateWrapper=this.rateFinder.querySelector(".rate-wrapper"),this.init()}return i(t,[{key:"init",value:function(){var t=this;this.form.addEventListener("submit",(function(e){e.preventDefault();var n=document.getElementById("zip").value;document.getElementById("account")&&(n+="&account="+document.getElementById("account").value);var i="/wp-json/tbkbank/"+t.method+"?zip="+n;t.rateWrapper.innerHTML="",t.getAccountRates(i)}))}},{key:"buildRateCard",value:function(t){var e=t.rate,n=t.closest_location;return'\n\t\t<div class="region-card">\n\t\t\t<p><a href="'.concat(e.pdf.url,'">Download the PDF</a> of all the rates for your location.</p>\n\t\t\t<ul>\n\t\t\t\t<li><span class="label">Nearest Location:</span> <strong>').concat(n.post_title,"</strong><br>\n\t\t\t\t\t<p>").concat(n.address,"<br>\n\t\t\t\t\t").concat(n.city,", ").concat(n.state," ").concat(n.zip,"<br>\n\t\t\t\t\t").concat(n.phone,' \n\t\t\t\t\t</p>\n\t\t\t\t</li>\n\t\t\t\t<li><span class="label">Distance:</span> ').concat(Number(n.distance.toFixed(1))," mi</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t")}},{key:"buildAccountCards",value:function(t){var e="";return t.forEach((function(t){var n="",i="",r=0;
1t.rates.forEach((function(t){r++;var e="";""!==t.account_tier&&(1===r&&(n+="<th>Account Tier</th>"),e+="<td>"+t.account_tier+"</td>"),""!==t.interest_rate&&(1===r&&(n+="<th>Interest Rate</th>"),e+="<td>"+t.interest_rate+"%</td>"),""!==t.apy&&(1===r&&(n+="<th>APY</th>"),e+="<td>"+t.apy+"%</td>"),i+="<tr>"+e+"</tr>"}));var a='\n\t\t\t\t<div class="account-rate" data-account-type="'.concat(t.type,'">\n\t\t\t\t\t<div class="account-title-content">\n\t\t\t\t\t\t<h3>').concat(t.title,"</h3>\n\t\t\t\t\t\t<h4>").concat(t.type,'</h4>\n\t\t\t\t\t\t<a class="simple-link" href="').concat(t.link,'">View Account</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="rate-table-wrapper">\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>').concat(n,"</tr>\n\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t");e+=a})),e}},{key:"getAccountRates",value:function(t){var e=this;this.rateWrapper.insertAdjacentHTML("beforeend",'<div class="rate-loading"><i class="fas fa-spinner fa-pulse"></i></div>'),fetch(t).then((function(t){return t.json()})).then((function(t){e.rateWrapper.innerHTML="";var n=e.buildRateCard(t);e.rateWrapper.insertAdjacentHTML("beforeend",n)}))}}]),t}();function v(){document.querySelectorAll(".remove-location").forEach((function(t){t.addEventListener("click",(function(e){e.preventDefault(),t.parentElement.remove()}))}))}if(document.getElementById("check-mailing-address")&&document.querySelector('[data-control="check-mailing-address"]')){var f=document.getElementById("check-mailing-address"),m=document.querySelector('[data-control="check-mailing-address"]');f.addEventListener("change",(function(t){f.checked?m.style.display="block":m.style.display="none"}))}if(document.getElementById("location-1")&&document.getElementById("add-a-location")){var p=document.forms["golocal-partner"],y=document.getElementById("location-1").outerHTML,b=document.getElementById("add-a-location");document.querySelector("#location-1 .remove-location")&&document.querySelector("#location-1 .remove-location").remove(),v();var g=1;b.addEventListener("click",(function(t){t.preventDefault(),g++;var e=function(t,e){var n=t.replace(new RegExp("location-1","g"),"location-"+e);return(new DOMParser).parseFromString(n,"text/html").querySelector("fieldset")}(y,g);p.insertBefore(e,b),v()}))}var k=document.querySelectorAll('[name="business_type[]"]'),S=document.querySelector("#business_type_yes");if(k&&S){var L=!1;k.forEach((function(t){t.addEventListener("input",(function(t){var e=!1;k.forEach((function(t){t.checked&&(e=!0)})),L=e,S.checked=L}))}))}if(window.getDistance=function(t,e,n,i){if(t==n&&e==i)return 0;var r=Math.PI*t/180,a=Math.PI*n/180,o=e-i,s=Math.PI*o/180,c=Math.sin(r)*Math.sin(a)+Math.cos(r)*Math.cos(a)*Math.cos(s);return c>1&&(c=1),(c=60*(c=180*(c=Math.acos(c))/Math.PI)*1.1515).toFixed(1)},document.querySelectorAll(".account-comparison-wrapper").forEach((function(t){new c(t,{responsive:{0:{items:1},600:{items:2},800:{items:3},1e3:{items:4},1200:{items:5}}})})),"undefined"!=typeof List&&void 0!==s){if(document.querySelector("#branch-list .list")){var w=new List("branch-list",{valueNames:["id","post_title","latitude","longitude","distance","phone","address","city","state","zip","image"]});if(document.querySelector(".branch-list-filter"))new u(w,new s(w,".branch-list-filter-input","#branch-list-load-more",6))}if(document.querySelector("#partner-list .list")){var E=new List("partner-list",{valueNames:["distance","categories"]});if(document.querySelector(".partner-list-filter"))new d(E,new s(E,".partner-list-filter-input","#partner-list-load-more",6))}}document.querySelector(".rate-finder")&&new h(".rate-finder");var q=document.querySelector(".branch-finder");q&&new l(q);var I=document.querySelector("#subnav-5852 button"),M=document.querySelector("a.menu-item-5854"),x=document.querySelector("a.menu-item-5853"),A=document.querySelector("a.menu-item-5855");if(I){var F={hitType:"event",eventCategory:"Online Banking",eventAction:"click",eventLabel:"Online Banking Subnav"};I.addEventListener("click",(function(t){"undefined"!=typeof gtag&&(gtag("send",F),console.log(F))}))}if(M){console.log("exists");var j={hitType:"event",eventCategory:"commercial center login clicks",eventAction:"click",eventLabel:"commercial center login clicks"};M.addEventListener("click",(function(t){"undefined"!=typeof gtag&&(gtag("send",j),console.log(j))}))}if(x){var B={hitType:"event",eventCategory:"personal login button click",eventAction:"click",eventLabel:"personal login button click"};x.addEventListener("click",(function(t){"undefined"!=typeof gtag&&(gtag("send",B),console.log(B))}))}if(A){var C={hitType:"event",eventCategory:"small business login clicks",eventAction:"click",eventLabel:"small business login clicks"};A.addEventListener("click",(function(t){"undefined"!=typeof gtag&&(gtag("send",C),console.log(C))}))}
1var D=(new Date).toLocaleString("default",{weekday:"long"});document.querySelectorAll("[data-weekday]").forEach((function(t){t.dataset.weekday==D&&t.classList.add("today")}))}();

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.