1// 2// jwlib-utils 3// 4 5(function($){"use strict";jQuery.fn.exists=function(){return jQuery(this).length>0;};jQuery.getParameterByName=function(name,url){if(!url)url=window.location.href;name=name.replace(/[[\]]/g,"\\$&");var regex=new RegExp("[?&]"+name+"(=([^&#]*)|&|#|$)"),results=regex.exec(url);if(!results)return null;if(!results[2])return"";return decodeURIComponent(results[2].replace(/\+/g," "));};jQuery.debug=function(){if(window.debug===true)window.debug=1;var maxlevel=parseInt($.getParameterByName("debug")||window.debug)||0;if(maxlevel===0)return;var args=Array.prototype.slice.call(arguments),group="debug",loglevel=1;if(args.length>1&&typeof(args[args.length-1])==="number"){loglevel=args.pop();} 6if(loglevel>maxlevel)return;if(args.length>1&&typeof(args[0])==="string"){group=args.shift();} 7var debugGroup=$.getParameterByName("debugGroup")||window.debugGroup;if(debugGroup&&!group.match(debugGroup))return;console.group(group);args.forEach(function(arg){if(Array.isArray(arg)&&typeof arg[0]!=="object"){console.table(arg);} 8else{console.log(arg);}});console.groupEnd();};jQuery.isMobile=jQuery.isTouch=function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||false;};if(jQuery.isTouch())document.documentElement.classList.add("touch");jQuery.clearBrowserCache=function(){$(window).on("pageshow",function(event){if(event.originalEvent.persisted){window.location.reload();}});};jQuery.preloadImages=function(){for(var i=0;i<arguments.length;i++){$("<img />").attr("src",arguments[i]);}};var triggerWindowResize=function(){$(window).trigger("resize");};if(typeof(orientationEvent)==undefined){var orientationEvent=0;} 9$(window).on(orientationEvent,triggerWindowResize).on("load",triggerWindowResize);})(jQuery); 10 11 12// 13// vein 14// 15 16!function(e,t){"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vein",t):this.vein=t()}(0,function(){var e=function(){},t=function(e,t,n){var s,r,l=[],i=[],u=t[document.all?"rules":"cssRules"],o=e.replace(/\s/g,"");for(s=0,r=u.length;s<r;s++)(u[s].selectorText===e||4===u[s].type&&u[s].cssText.replace(/\s/g,"").substring(0,o.length)==o)&&(null===n?i.push(s):l.push(u[s]));for(s=0,r=i.length;s<r;s++)t.deleteRule(i[s]);return l},n=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+": "+e[n]+";");return t.join("")};e.getStylesheet=function(){return this.element&&document.getElementById("vein")||(this.element=document.createElement("style"),this.element.setAttribute("type","text/css"),this.element.setAttribute("id","vein"),document.getElementsByTagName("head")[0].appendChild(this.element),this.stylesheet=this.element.sheet),this.stylesheet};var s=function(e){return e[document.all?"rules":"cssRules"]},r=function(e,t,n){var r=s(n);n.insertRule?n.insertRule(e+"{"+t+"}",r.length):n.addRule(e,t,r.length)};return e.inject=function(e,l,i){var u,o,h,f,c,a,y,d,g,p,m=(i=function(e){e=e||{};for(var t=1;t<arguments.length;t++)if(arguments[t])for(var n in arguments[t])arguments[t].hasOwnProperty(n)&&(e[n]=arguments[t][n]);return e}({},i)).stylesheet||this.getStylesheet();s(m);for("string"==typeof e&&(e=[e]),u=0,o=e.length;u<o;u++)if("object"==typeof e[u]&&m.insertRule)for(h in e[u])if(0===(f=t(h,m,l)).length)for(c=n(l),g=0,p=e[u][h].length;g<p;g++)r(h,e[u][h][g]+"{"+c+"}",m);else for(y=0,d=f.length;y<d;y++)this.inject(e[u][h],l,{stylesheet:f[y]});else{if(f=t(e[u],m,l),null===l)return;if(0===f.length)c=n(l),r(e[u],c,m);else for(y=0,d=f.length;y<d;y++)for(a in l)l.hasOwnProperty(a)&&(f[y].style.setProperty?f[y].style.setProperty(a,l[a],""):f[y].style.setAttribute(a,l[a],""))}return this},e}); 17 18 19/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */ 20jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.no
20deName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window); 21var stacks = {}; 22stacks.jQuery = jQuery.noConflict(true); 23stacks.com_joeworkman_stacks_jack4 = {}; 24stacks.com_joeworkman_stacks_jack4 = (function(stack) { 25var jQuery = stacks.jQuery;var $ = jQuery; 26$(function(){$(".com_joeworkman_stacks_jack4_stack .proportional:not(.height-flexible)").proportional();if($.isMobile())$(".com_joeworkman_stacks_jack4_stack .jack").addClass("touch-device");}); 27 28return stack;})(stacks.com_joeworkman_stacks_jack4); 29stacks.com_bigwhiteduck_stacks_headerpro = {}; 30stacks.com_bigwhiteduck_stacks_headerpro = (function(stack) { 31var jQuery = stacks.jQuery;var $ = jQuery; var elements=document.getElementsByClassName('hp-slice');while(elements.length>0){elements[0].parentNode.removeChild(elements[0]);} 32 33return stack;})(stacks.com_bigwhiteduck_stacks_headerpro); 34stacks.stacks_in_2735 = {}; 35stacks.stacks_in_2735 = (function(stack) { 36var jQuery = stacks.jQuery;var $ = jQuery; 37$(function(){window.addEventListener('load',(event)=>{$('#stacks_in_2735>.s-pro:not(.vault-height)>.shear-wrapper').removeClass('preload-wrapper');$('#stacks_in_2735>.s-pro:not(.vault-height) .content').removeClass('preload-content');});}); 38 39return stack;})(stacks.stacks_in_2735); 40stacks.stacks_in_2765_1 = {}; 41stacks.stacks_in_2765_1 = (function(stack) { 42var jQuery = stacks.jQuery;var $ = jQuery; 43$(document).ready(function() { 44 45 // move the modal to be child of body 46 $('body').append($('#corner-stacks_in_2765_1')); 47 48 49 50 $('#corner-stacks_in_2765_1 .corner-button').on('click', function(){ 51 52 53 $(this).removeClass('corner-show'); 54 $('#corner-modal-stacks_in_2765_1, #corner-stacks_in_2765_1 .corner-overlay').addClass('corner-show'); 55 }); 56 57 $('#corner-stacks_in_2765_1 .corner-close').on('click', function(){ 58 $('#corner-stacks_in_2765_1 .corner-button').addClass('corner-show'); 59 $('#corner-modal-stacks_in_2765_1, #corner-stacks_in_2765_1 .corner-overlay').removeClass('corner-show'); 60 }); 61 62 $(document).on('click', function (e) { 63 if ($(e.target).closest("#corner-stacks_in_2765_1").length === 0) { 64 $('#corner-stacks_in_2765_1 .corner-button').addClass('corner-show'); 65 $('#corner-modal-stacks_in_2765_1, #corner-stacks_in_2765_1 .corner-overlay').removeClass('corner-show'); 66 } 67 }); 68 69 70 71 $('#corner-stacks_in_2765_1 .corner-button').addClass('corner-show'); 72 73}); 74 75return stack;})(stacks.stacks_in_2765_1); 76stacks.stacks_in_2765_2 = {}; 77stacks.stacks_in_2765_2 = (function(stack) { 78var jQuery = stacks.jQuery;var $ = jQuery;// 79if(window.liveSearchDefined == null) { 80 window.liveSearchDefined = true; 81/* 82 Tipue Search 5.0 83 Copyright (c) 2015 Tipue 84 Tipue Search is released under the MIT License 85 http://www.tipue.com/search 86 */ 87 88/* Tipue Search Copyright (c) 2015 Tipue 89 90 Permission is hereby granted, free of charge, to any person obtaining 91 a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including 92 without limitation the rights to use, copy, modify, merge, publish, 93 distribute, sublicense, and/or sell copies of the Software, and to 94 permit persons to whom the Software is furnished to do so, subject to 95 the following conditions: 96 97 The above copyright notice and this permission notice shall be 98 included in all copies or substantial portions of the Software. 99 100 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 101 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 102 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 103 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 104 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 105 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 106 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 107 */ 108 var tipuesearch_pages = []; 109 var tipuesearch_stop_words = ["zzzzzz"]; 110 //var tipuesearch_stop_words = ["a", "about", "above", "after", "again", "against", "all", "am", "an", "and", "any", "are", "aren't", "as", "at", "be", "because", "been", "before", "being", "below", "between", "both", "but", "by", "can't", "cannot", "could", "couldn't", "did", "didn't", "do", "does", "doesn't", "doing", "don't", "down", "during", "each", "few", "for", "from", "further", "had", "hadn't", "has", "hasn't", "have", "haven't", "having", "he", "he'd", "he'll", "he's", "her", "here", "here's", "hers", "herself", "him", "himself", "his", "how", "how's", "i", "i'd", "i'll", "i'm", "i've", "if", "in", "into", "is", "isn't", "it", "it's", "its", "itself", "let's", "me", "more", "most", "mustn't", "my", "myself", "no", "nor", "not", "of", "off", "on", "once", "only", "or", "other", "ought", "our", "ours", "ourselves", "out", "over", "own", "same", "shan't", "she", "she'd", "she'll", "she's", "should", "shouldn't", "so", "some", "such", "than", "that", "that's", "the", "their", "theirs", "them", "themselves", "then", "there", "there's", "these", "they", "they'd", "they'll", "they're", "they've", "this", "those", "through", "to", "too", "under", "until", "up", "very", "was", "wasn't", "we", "we'd", "we'll", "we're", "we've", "were", "weren't", "what", "what's", "when", "when's", "where", "where's", "which", "while", "who", "who's", "whom", "why", "why's", "with", "won't", "would", "wouldn't", "you", "you'd", "you'll", "you're", "you've", "your", "yours", "yourself", "yourselves"]; 111 // Word replace 112 var tipuesearch_replace = {'words': [ 113 {'word': 'tipua', 'replace_with': 'tipue'}, 114 {'word': 'javscript', 'replace_with': 'javascript'}, 115 {'word': 'jqeury', 'replace_with': '$'} 116 ]}; 117 // Weighting 118 var tipuesearch_weight = {'weight': [ 119 {'url': 'http://tipue.dev/search', 'score': 200}, 120 {'url': 'http://tipue.dev/about', 'score': 100}, 121 {'url': 'http://tipue.dev/tos', 'score': -1200} 122 ]}; 123 // Stemming 124 var tipuesearch_stem = {'words': [ 125 {'word': 'e-mail', 'stem': 'email'}, 126 {'word': 'javascript', 'stem': 'jQuery'}, 127 {'word': 'javascript', 'stem': 'js'} 128 ]}; 129 130 // 131 var tipuesearch_string_1 = 'No title'; 132 var tipuesearch_string_2 = 'Showing results for'; 133 var tipuesearch_string_3 = 'Search instead for'; 134 var tipuesearch_string_4 = '1 result'; 135 var tipuesearch_string_5 = 'results'; 136 var tipuesearch_string_6 = 'Prev'; 137 var tipuesearch_string_7 = 'Next'; 138 var tipuesearch_string_8 = 'Nothing found'; 139 var tipuesearch_string_9 = 'Common words are largely ignored'; 140 var tipuesearch_string_10 = 'Search too short'; 141 var tipuesearch_string_11 = 'Should be one character or more'; 142 var tipuesearch_string_12 = 'Should be 2 characters or more'; 143 var tipuesearch_string_13 = 'characters or more'; 144 // 145 146 // 147 148 //Tipue Search 149 150 /* 151 Tipue Search 5.0 152 Copyright (c) 2015 Tipue 153 Tipue Search is released under the MIT License 154 http://www.tipue.com/search 155 */ 156 157 158 (function($) { 159 160 $.fn.tipuesearch = function(options) { 161 162 var set = $.extend( { 163 164 'show' : 7, 165 'newWindow' : false, 166 'showURL' : true, 167 'showTitleCount' : true, 168 'minimumLength' : 3, 169 'descriptiveWords' : 25, 170 'highlightTerms' : true, 171 'highlightEveryTerm' : false, 172 'mode' : 'static', 173 'liveDescription' : '*', 174 'liveContent' : '*', 175 'contentLocation' : 'tipuesearch/tipuesearch_content.json', 176 'debug' : false, 177 'thisId' : 0 178 179 }, options); 180 181 return this.each(function() { 182 183 var tipuesearch_in = { 184 pages: [] 185 }; 186 $.ajaxSetup({ 187 async: true//modified from false 188 }); 189 var tipuesearch_t_c = 0; 190 191 //if (set.mode == 'live') { 192 function buildIndex() { 193 //$.each(tipuesearch_pages, function(index, value) { 194 var promises = []; 195 $(".tipue_search_loading .ts-count-wrap .ts-total").html(tipuesearch_pages.length); 196 $.each(tipuesearch_pages, function(index, val) { 197 let thisUrl = this.replace(/#/g,"?LSHASH"); 198 promises.push($.get(thisUrl).always(function(html) { 199 let value = this.url; 200 value = value.replace(/\?LSHASH/g,"#"); 201 window.customDesc = 0; 202 var noSearch, cont, desc, tex; 203 var tempHtml = "<div><div class='liveSearchAll'>"+html+"</div></div>"; 204 var ownerDocument = document.implementation.createHTMLDocument('virtual'); 205 html = $(tempHtml, ownerDocument); 206 var htmlObj = html; 207 htmlObj.find("img").remove(); 208 htmlObj.find("svg").remove(); 209 htmlObj.find("video").remove(); 210 htmlObj.find("script").remove(); 211 htmlObj.find("style").remove(); 212 htmlObj.find("link").remove(); 213 htmlObj.find("nav").remove(); 214 htmlObj.find("i").remove(); 215 htmlObj.find("li > a:not([href^='#'])").remove(); 216 htmlObj.find(".additional-pages").remove(); 217 htmlObj.find(".excluded-pages").remove(); 218 htmlObj.find("code").remove(); 219 htmlObj.find("pre").remove(); 220 htmlObj.find("samp").remove(); 221 //Get title 222 if ($("title", htmlObj).length > 0) { 223 var tit = $("title", htmlObj).text(); 224 } else { 225 var tit = value; 226 desc = ""; 227 } 228 htmlObj.find("title").remove(); 229 //Check for hashtags 230 var hashLink = value.split('#')[1], 231 hasHashLink = false;
232 if(typeof hashLink !== "undefined" && hashLink !== "") { 233 hasHashLink = true; 234 if("False" == "True") { 235 console.log("Hash link found: #" + hashLink); 236 } 237 } 238 //Find search container 239 if(hasHashLink && htmlObj.find("#"+hashLink).length) { 240 tex = htmlObj.find("#"+hashLink).text(); 241 if("False" == "True") { 242 console.log("Hash ID found in page, only searching ID element."); 243 } 244 } else if (hasHashLink && htmlObj.find('a[href="#'+hashLink+'"]:not(.ls-add-page)').length) { 245 tex = htmlObj.find('a[href="#'+hashLink+'"]:not(.ls-add-page)').parent().text(); 246 if("False" == "True") { 247 console.log("Hash link found in page, only searching link's parent element."); 248 } 249 } else if (htmlObj.find("").length > 0) { 250 if(hasHashLink && "False" == "True") { 251 console.log("ERROR: No matching hash link or element found. Searching instead."); 252 } 253 tex = htmlObj.find("").text(); 254 255 } else if (htmlObj.find(".stacks_top").length > 0) { 256 if(hasHashLink && "False" == "True") { 257 console.log("ERROR: No matching hash link or element found. Searching .stacks_top instead."); 258 } 259 tex = htmlObj.find(".stacks_top").text(); 260 } else { 261 if(hasHashLink && "False" == "True") { 262 console.log("ERROR: No matching hash link or element found. Searching entire page instead."); 263 } 264 tex = htmlObj.text(); 265 } 266 267 tex=tex.replace(/\s+/g," "); 268 tex=tex.replace(/<!--LIVESEARCH-->[\s\S]*?<!--LIVESEARCH-->/g,""); 269 tex=tex.replace(/<!--NOSEARCH-->[\s\S]*?<!--NOSEARCH-->/g,""); 270 tex=tex.replace(/<!---NOSEARCH--->[\s\S]*?<!---NOSEARCH--->/g,""); 271 tex=tex.replace(/<!âNOSEARCHâ>[\s\S]*?<!âNOSEARCHâ>/g,""); 272 tex=tex.replace(/<!--—NOSEARCH—-->[\s\S]*?<!--—NOSEARCH—-->/g,""); 273 tex=tex.replace(/<!---NOSE ARCH--->[\s\S]*?<!---NOSE ARCH--->/g,""); 274 tex=tex.replace(/ /g,""); 275 276 desc = tex; 277 cont = tex; 278 279 //custom description 280 if (htmlObj.find(".live-search-description").parent().length > 0) { 281 desc = htmlObj.find(".live-search-description").parent().text() + desc; 282 window.customDesc = 1; 283 } 284 285 // 286 tit=tit.replace(/\|/g, ""); 287 288 if(noSearch == 1) { 289 tit = " "; 290 desc = " "; 291 cont = " "; 292 value = " "; 293 } 294 var getHash; 295 if(value.includes('#')) { 296 getHash = value.substring(value.indexOf('#')); 297 value = value.substr(0, value.indexOf('#')); 298 } 299 if(getHash == undefined || getHash == "#") { 300 getHash = ""; 301 } 302 tipuesearch_in.pages.push( 303 { 304 "title": tit, 305 "text": desc, 306 "tags": cont, 307 "url": value, 308 "url_base": value, 309 "hash": getHash 310 }); 311 $(".tipue_search_loading .ts-count-wrap .ts-count").html(parseInt($(".tipue_search_loading .ts-count-wrap .ts-count").html())+1); 312 if(!pagOn){getTipueSearch(loadPage, true);} 313 if(parseInt($(".tipue_search_loading .ts-count-wrap .ts-count").html())+1 >= tipuesearch_pages.length) { 314 setTimeout(function() { 315 $(".tipue_search_spinner").remove(); 316 $('#'+set.thisId+'_tipue_search_content').addClass("showWarning"); 317 clearInterval(tipuesearch_in.updateResults); 318 },300); 319 } 320 })); 321 }); 322 } 323 324 if (set.mode == 'json') 325 { 326 $.getJSON(set.contentLocation) 327 .done(function(json) 328 { 329 tipuesearch_in = $.extend({}, json); 330 }); 331 } 332 333 if (set.mode == 'static') 334 { 335 tipuesearch_in = $.extend({}, tipuesearch); 336 } 337 338 var tipue_search_w = ''; 339 if (set.newWindow) 340 { 341 tipue_search_w = ' target="_blank"'; 342 } 343 344 function getURLP(name) { 345 return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20')) || null; 346 } 347 348 var built = 0, 349 loadPage = 0, 350 pagOn = false;
351 $(this).keyup(function(event) { 352 if(event.keyCode == '13') {//enter key pressed 353 if(built==0){ 354 $('#'+set.thisId+'_tipue_search_content .tipue_search_loading').html('<div class="tipue_search_spinner"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M434.67,285.59v-29.8C434.67,157.06,354.43,77,255.47,77a179,179,0,0,0-140.14,67.36m-38.53,82v29.8C76.8,355,157,435,256,435a180.45,180.45,0,0,0,140-66.92" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></path><polyline points="32 256 76 212 122 256" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></polyline><polyline points="480 256 436 300 390 256" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></polyline></svg><div class="ts-count-wrap"><span class="ts-count">0</span>/<span class="ts-total"></span></div></div>'); 355 buildIndex(); 356 built=1; 357 } else { 358 getTipueSearch(0, true); 359 } 360 } 361 }); 362 $(this).next().on("click",function(event) {//submit button pressed 363 if(built==0){ 364 $('#'+set.thisId+'_tipue_search_content .tipue_search_loading').html('<div class="tipue_search_spinner"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M434.67,285.59v-29.8C434.67,157.06,354.43,77,255.47,77a179,179,0,0,0-140.14,67.36m-38.53,82v29.8C76.8,355,157,435,256,435a180.45,180.45,0,0,0,140-66.92" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></path><polyline points="32 256 76 212 122 256" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></polyline><polyline points="480 256 436 300 390 256" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></polyline></svg><div class="ts-count-wrap"><span class="ts-count">0</span>/<span class="ts-total"></span></div></div>'); 365 buildIndex(); 366 built=1; 367 } else { 368 getTipueSearch(0, true); 369 } 370 }); 371 if (getURLP('q')) {//page loaded with a query string 372 $('#'+set.thisId+'_tipue_search_input').val(getURLP('q')); 373 if(built==0){ 374 $("body").addClass("searching"+set.thisId); 375 $('#'+set.thisId+'_tipue_search_content .tipue_search_loading').html('<div class="tipue_search_spinner"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M434.67,285.59v-29.8C434.67,157.06,354.43,77,255.47,77a179,179,0,0,0-140.14,67.36m-38.53,82v29.8C76.8,355,157,435,256,435a180.45,180.45,0,0,0,140-66.92" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></path><polyline points="32 256 76 212 122 256" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></polyline><polyline points="480 256 436 300 390 256" style="fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"></polyline></svg><div class="ts-count-wrap"><span class="ts-count">0</span>/<span class="ts-total"></span></div></div>'); 376 buildIndex(); 377 built=1; 378 } else { 379 getTipueSearch(0, true); 380 } 381 } 382 383 function getTipueSearch(start, replace) 384 { 385 $('#'+set.thisId+'_tipue_search_content').hide(); 386 $('#'+set.thisId+'_tipue_search_content').show(); 387 388 var out = ''; 389 var results = ''; 390 var show_replace = false; 391 var show_stop = false; 392 var standard = true; 393 var c = 0; 394 found = []; 395 var d = $('#'+set.thisId+'_tipue_search_input').val().toLowerCase(); 396 var urlVar = ""; 397 var randomN = Math.floor(Math.random() * 10001) 398 if("false" == "true") { 399 urlVar = "?s=" + encodeURIComponent(d) + "&r=" + randomN; 400 } else { 401 urlVar = "?r=" + randomN; 402 } 403 d = $.trim(d); 404 405 if ((d.match("^\"") && d.match("\"$")) || (d.match("^'") && d.match("'$"))) 406 { 407 standard = false; 408 } 409 410 if (standard) 411 { 412 var d_w = d.split(' '); 413 d = ''; 414 for (var i = 0; i < d_w.length; i++) 415 { 416 var a_w = true; 417 for (var f = 0; f < tipuesearch_stop_words.length; f++) 418 { 419 if (d_w[i] == tipuesearch_stop_words[f]) 420 { 421 a_w = false;
422 show_stop = true; 423 } 424 } 425 if (a_w) 426 { 427 d = d + ' ' + d_w[i]; 428 } 429 } 430 d = $.trim(d); 431 d_w = d.split(' '); 432 } 433 else 434 { 435 d = d.substring(1, d.length - 1); 436 } 437 438 if (d.length >= set.minimumLength) 439 { 440 if (standard) 441 { 442 if (replace) 443 { 444 var d_r = d; 445 for (var i = 0; i < d_w.length; i++) 446 { 447 for (var f = 0; f < tipuesearch_replace.words.length; f++) 448 { 449 if (d_w[i] == tipuesearch_replace.words[f].word) 450 { 451 d = d.replace(d_w[i], tipuesearch_replace.words[f].replace_with); 452 show_replace = true; 453 } 454 } 455 } 456 d_w = d.split(' '); 457 } 458 459 var d_t = d; 460 for (var i = 0; i < d_w.length; i++) 461 { 462 for (var f = 0; f < tipuesearch_stem.words.length; f++) 463 { 464 if (d_w[i] == tipuesearch_stem.words[f].word) 465 { 466 d_t = d_t + ' ' + tipuesearch_stem.words[f].stem; 467 } 468 } 469 } 470 d_w = d_t.split(' '); 471 472 for (var i = 0; i < tipuesearch_in.pages.length; i++) 473 { 474 var score = 0; 475 var s_t = tipuesearch_in.pages[i].text; 476 //console.log(d_w); 477 //console.log(s_t); 478 for (var f = 0; f < d_w.length; f++) 479 { 480 var pat = new RegExp(d_w[f], 'gi'); 481 if (tipuesearch_in.pages[i].title.search(pat) != -1) 482 { 483 var m_c = tipuesearch_in.pages[i].title.match(pat).length; 484 score += (20 * m_c); 485 } 486 if (tipuesearch_in.pages[i].text.search(pat) != -1) 487 { 488 var m_c = tipuesearch_in.pages[i].text.match(pat).length; 489 score += (20 * m_c); 490 } 491 492 if (set.highlightTerms) 493 { 494 if (set.highlightEveryTerm) 495 { 496 var patr = new RegExp('(' + d_w[f] + ')', 'gi'); 497 } 498 else 499 { 500 var patr = new RegExp('(' + d_w[f] + ')', 'i'); 501 } 502 //console.log(s_t); 503 s_t = s_t.replace(patr, "<span class=\"h01\">$1</span>"); 504 var s_t_check = s_t.split(/\s+/).slice(0,20).join(" "); 505 //if(s_t.includes("<span") ) { 506 if(s_t.indexOf("<span") >= 0) { 507 var s_t_start = s_t.split(/\s+/).slice(0,10).join(" "),// 10(9) words at the start of the search container 508 s_t_snip = s_t.substring(s_t.indexOf("<") - (30));// show 30 characters before the searched term 509 //if(!s_t_check.includes("<span")) { 510 if(s_t_check.indexOf("<span") < 0) {// if highlighted term is not inside of the first 10(9) words 511 s_t_snip = s_t_snip.substring(s_t_snip.indexOf(" ") + 1); 512 s_t = s_t_start + " ... " + s_t_snip;//first 10(9) words + ... + the rest of the searched text. It will be trimmed later by the set description length 513 } 514 } 515 } 516 517 if (tipuesearch_in.pages[i].tags.search(pat) != -1) 518 { 519 var m_c = tipuesearch_in.pages[i].tags.match(pat).length; 520 score += (10 * m_c); 521 } 522 523 if (tipuesearch_in.pages[i].url.search(pat) != -1) 524 { 525 score += 20; 526 } 527 528 if (score != 0) 529 { 530 for (var e = 0; e < tipuesearch_weight.weight.length; e++) 531 {
532 if (tipuesearch_in.pages[i].url == tipuesearch_weight.weight[e].url) 533 { 534 score += tipuesearch_weight.weight[e].score; 535 } 536 } 537 } 538 539 if (d_w[f].match('^-')) 540 { 541 pat = new RegExp(d_w[f].substring(1), 'i'); 542 if (tipuesearch_in.pages[i].title.search(pat) != -1 || tipuesearch_in.pages[i].text.search(pat) != -1 || tipuesearch_in.pages[i].tags.search(pat) != -1) 543 { 544 score = 0; 545 } 546 } 547 } 548 549 if (score != 0) 550 { 551 found.push( 552 { 553 "score": score, 554 "title": tipuesearch_in.pages[i].title + " " + tipuesearch_in.pages[i].hash, 555 "desc": s_t, 556 "url_base": tipuesearch_in.pages[i].url + tipuesearch_in.pages[i].hash, 557 "url": tipuesearch_in.pages[i].url + urlVar + tipuesearch_in.pages[i].hash 558 }); 559 c++; 560 } 561 } 562 } 563 else 564 { 565 for (var i = 0; i < tipuesearch_in.pages.length; i++) 566 { 567 var score = 0; 568 var s_t = tipuesearch_in.pages[i].text; 569 var pat = new RegExp(d, 'gi'); 570 if (tipuesearch_in.pages[i].title.search(pat) != -1) 571 { 572 var m_c = tipuesearch_in.pages[i].title.match(pat).length; 573 score += (20 * m_c); 574 } 575 if (tipuesearch_in.pages[i].text.search(pat) != -1) 576 { 577 var m_c = tipuesearch_in.pages[i].text.match(pat).length; 578 score += (20 * m_c); 579 } 580 581 if (set.highlightTerms) 582 { 583 if (set.highlightEveryTerm) 584 { 585 var patr = new RegExp('(' + d + ')', 'gi'); 586 } 587 else 588 { 589 var patr = new RegExp('(' + d + ')', 'i'); 590 } 591 //console.log(s_t); 592 s_t = s_t.replace(patr, "<span class=\"h01\">$1</span>"); 593 var s_t_check = s_t.split(/\s+/).slice(0,20).join(" "); 594 //if(s_t.includes("<span") ) { 595 if(s_t.indexOf("<span") >= 0) { 596 var s_t_start = s_t.split(/\s+/).slice(0,10).join(" "),// 10(9) words at the start of the search container 597 s_t_snip = s_t.substring(s_t.indexOf("<") - (30));// show 30 characters before the searched term 598 //if(!s_t_check.includes("<span")) { 599 if(s_t_check.indexOf("<span") < 0) {// if highlighted term is not inside of the first 10(9) words 600 s_t_snip = s_t_snip.substring(s_t_snip.indexOf(" ") + 1); 601 s_t = s_t_start + " ... " + s_t_snip;//first 10(9) words + ... + the rest of the searched text. It will be trimmed later by the set description length 602 } 603 } 604 } 605 606 if (tipuesearch_in.pages[i].tags.search(pat) != -1) 607 { 608 var m_c = tipuesearch_in.pages[i].tags.match(pat).length; 609 score += (10 * m_c); 610 } 611 612 if (tipuesearch_in.pages[i].url.search(pat) != -1) 613 { 614 score += 20; 615 } 616 617 if (score != 0) 618 { 619 for (var e = 0; e < tipuesearch_weight.weight.length; e++) 620 { 621 if (tipuesearch_in.pages[i].url == tipuesearch_weight.weight[e].url) 622 { 623 score += tipuesearch_weight.weight[e].score; 624 } 625 } 626 } 627 628 if (score != 0) 629 { 630 found.push( 631 { 632 "score": score, 633 "title": tipuesearch_in.pages[i].title + " " + tipuesearch_in.pages[i].hash, 634 "desc": s_t,
635 "url_base": tipuesearch_in.pages[i].url + tipuesearch_in.pages[i].hash, 636 "url": tipuesearch_in.pages[i].url + urlVar + tipuesearch_in.pages[i].hash 637 }); 638 c++; 639 } 640 } 641 } 642 643 if (c != 0) 644 { 645 if (set.showTitleCount && tipuesearch_t_c == 0) 646 { 647 var title = document.title; 648 document.title = '(' + c + ') ' + title; 649 tipuesearch_t_c++; 650 } 651 652 if (show_replace == 1) 653 { 654 out += '<div id="'+set.thisId+'_tipue_search_warning">' + tipuesearch_string_2 + ' ' + d + '. ' + tipuesearch_string_3 + ' <a id="'+set.thisId+'_tipue_search_replaced">' + d_r + '</a></div>'; 655 } 656 if (c == 1) 657 { 658 out += '<div id="'+set.thisId+'_tipue_search_results_count">' + tipuesearch_string_4 + '</div>'; 659 } 660 else 661 { 662 c_c = c.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 663 out += '<div id="'+set.thisId+'_tipue_search_results_count">' + c_c + ' ' + tipuesearch_string_5 + '</div>'; 664 } 665 666 found.sort(function(a, b) { return b.score - a.score } ); 667 668 var l_o = 0; 669 for (var i = 0; i < found.length; i++) 670 { 671 if (l_o >= start && l_o < set.show + start) 672 { 673 out += '<div class="tipue_search_content_title"><a href="' + found[i].url + '"' + tipue_search_w + '>' + found[i].title + '</a></div>'; 674 675 if (set.debug) 676 { 677 out += '<div class="tipue_search_content_debug">Score: ' + found[i].score + '</div>'; 678 } 679 680 if (set.showURL) 681 { 682 var s_u = found[i].url.toLowerCase(); 683 if(s_u.indexOf('http://') == 0) 684 { 685 s_u = s_u.slice(7); 686 } 687 out += '<div class="tipue_search_content_url"><a href="' + (found[i].url) + '"' + tipue_search_w + '>' + found[i].url_base + '</a></div>'; 688 } 689 690 if (found[i].desc) 691 { 692 var t = found[i].desc; 693 var t_d = ''; 694 var t_w = t.split(' '); 695 if (t_w.length < set.descriptiveWords){ 696 t_d = t; 697 } else { 698 for (var f = 0; f < set.descriptiveWords; f++) 699 { 700 t_d += t_w[f] + ' '; 701 } 702 } 703 t_d = $.trim(t_d); 704 if (t_d.charAt(t_d.length - 1) != '.') { 705 t_d += ' ...'; 706 } 707 out += '<div class="tipue_search_content_text">' + t_d + '</div>'; 708 } 709 } 710 l_o++; 711 } 712 713 if (c > set.show) 714 { 715 var pages = Math.ceil(c / set.show); 716 var page = (start / set.show); 717 loadPage = start; 718 out += '<div id="'+set.thisId+'_tipue_search_foot"><ul id="'+set.thisId+'_tipue_search_foot_boxes">'; 719 720 if (start > 0) 721 { 722 out += '<li><a class="tipue_search_foot_box" id="' + (start - set.show) + '_' + replace + '">' + tipuesearch_string_6 + '</a></li>'; 723 } 724 725 if (page <= 2) 726 { 727 var p_b = pages; 728 if (pages > 3) 729 { 730 p_b = 3; 731 } 732 for (var f = 0; f < p_b; f++) 733 { 734 if (f == page) 735 { 736 out += '<li class="current">' + (f + 1) + '</li>'; 737 738 } 739 else 740 { 741 out += '<li><a class="tipue_search_foot_box" id="' + (f * set.show) + '_' + replace + '">' + (f + 1) + '</a></li>'; 742 } 743 } 744 } 745 else 746 { 747 var p_b = page + 2; 748 if (p_b > pages) 749 { 750 p_b = pages; 751 } 752 for (var f = page - 1; f < p_b; f++) 753 { 754 if (f == page) 755 { 756 out += '<li class="current">' + (f + 1) + '</li>'; 757 } 758 else 759 { 760 out += '<li><a class="tipue_search_foot_box" id="' + (f * set.show) + '_' + replace + '">' + (f + 1) + '</a></li>'; 761 } 762 } 763 } 764 765 if (page + 1 != pages) 766 { 767 out += '<li><a class="tipue_search_foot_box" id="' + (start + set.show) + '_' + replace + '">' + tipuesearch_string_7 + '</a></li>'; 768 } 769 770 out += '</ul></div>'; 771 } 772 } 773 else 774 { 775 out += '<div id="'+set.thisId+'_tipue_search_warning">' + tipuesearch_string_8 + '</div>'; 776 } 777 } 778 else 779 { 780 if (show_stop) 781 { 782 out += '<div id="'+set.thisId+'_tipue_search_warning">' + tipuesearch_string_8 + '. ' + tipuesearch_string_9 + '</div>'; 783 } 784 else 785 { 786 out += '<div id="'+set.thisId+'_tipue_search_warning">' + tipuesearch_string_10 + '</div>'; 787 if (set.minimumLength == 1) 788 { 789 out += '<div id="'+set.thisId+'_tipue_search_warning">' + tipuesearch_string_11 + '</div>'; 790 } 791 else 792 { 793 out += '<div id="'+set.thisId+'_tipue_search_warning">' + tipuesearch_string_12 + '</div>'; 794 } 795 } 796 } 797 798 $('#'+set.thisId+'_tipue_search_content').hide(); 799 $('#'+set.thisId+'_tipue_search_content .tipue_search_results').html(out); 800 $('#'+set.thisId+'_tipue_search_content').slideDown(200); 801 802 $('#'+set.thisId+'_tipue_search_replaced').click(function() 803 { 804 getTipueSearch(0, false); 805 }); 806 807 $('.tipue_search_foot_box').click(function() { 808 pagOn = true; 809 var id_v = $(this).attr('id'); 810 var id_a = id_v.split('_'); 811 812 getTipueSearch(parseInt(id_a[0]), id_a[1]); 813 }); 814 } 815 816 }); 817 }; 818 819 })(jQuery); 820 /*!*************************************************** 821 * mark.js v8.11.1 822 * https://markjs.io/ 823 * Copyright (c) 2014â2018, Julian Kühnel 824 * Released under the MIT license https://git.io/vwTVl 825 *****************************************************/ 826 !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Mark=t()}(this,function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(n){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=i,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEac
vendor: 11,230 bytes, line 826
826h(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,i=!1,o=null,a=function a(){if(!i){i=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),o=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,c=0;a=Array.prototype.slice.call(a);var u=function(){--s<=0&&o(c)};s||u(),a.forEach(function(t){e.matches(t,i.exclude)?u():i.onIframeReady(t,function(e){n(t)&&(c++,r(e)),u()},u)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:null===t?e.nextNode():e.nextNode()&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var i=!1,o=!1;return r.forEach(function(e,t){e.val===n&&(i=t,o=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==i||o?!1===i||o||(r[i].handled=!0):r.push({val:n,handled:!0}),!0):(!1===i&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var i=this;e.forEach(function(e){e.handled||i.getIframeContents(e.val,function(e){i.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,i){for(var o,a=this,s=this.createIterator(t,e,r),c=[],u=[],l=void 0,h=void 0;void 0,o=a.getIteratorNode(s),h=o.prevNode,l=o.node;)this.iframes&&this.forEachIframe(t,function(e){return a.checkIframeFilter(l,h,e,c)},function(t){a.createInstanceOnIframe(t).forEachNode(e,function(e){return u.push(e)},r)}),u.push(l);u.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(c,e,n,r),i()}},{key:"forEachNode",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),a=o.length;a||i(),o.forEach(function(o){var s=function(){r.iterateThroughNodes(e,o,t,n,function(){--a<=0&&i()})};r.iframes?r.waitForIframes(o,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var i=!1;return n.every(function(t){return!r.call(e,t)||(i=!0,!1)}),i}return!1}}]),e}(),o=function(){function e(n){t(this,e),this.opt=r({},{diacritics:!0,synonyms:{},accuracy:"partially",caseSensitive:!1,ignoreJoiners:!1,ignorePunctuation:[],wildcards:"disabled"},n)}return n(e,[{key:"create",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),new RegExp(e,"gm"+(this.opt.caseSensitive?"":"i"))}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==a&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(a)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynonyms(a)+"|"+this.processSynonyms(s)+")"+r))}return e}},{key:"processSynonyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,function(e){return"\\"===e.charAt(0)?"?":"�"})).replace(/(?:\\)*\*/g,function(e){return"\\"===e.charAt(0)?"*":"�"})}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"})}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aà áảãạÄằắẳẵặâầấẩẫáºÃ¤Ã¥ÄÄ
","AÃÃẢÃẠÄẰẮẲẴẶÃẦẤẨẪẬÃÃ
ÄÄ","cçÄÄ","CÃÄÄ","dÄÄ","DÄÄ","eèéẻẽẹêá»áº¿á»á»
á»Ã«ÄÄÄ","EÃÃẺẼẸÃá»áº¾á»á»á»ÃÄÄÄ","iìÃá»Ä©á»Ã®Ã¯Ä«","IÃÃá»Ä¨á»ÃÃĪ","lÅ","LÅ","nñÅÅ","NÃÅÅ","oòóá»Ãµá»Ã´á»á»á»á»á»Æ¡á»á»¡á»á»á»£Ã¶Ã¸Å","OÃÃá»Ãá»Ãá»á»á»á»á»Æ á»á» á»á»á»¢ÃÃÅ","rÅ","RÅ","sÅ¡ÅÈÅ","SÅ ÅÈÅ","tÅ¥ÈÅ£","TŤÈÅ¢","uùúủũụưừứá»á»¯á»±Ã»Ã¼Å¯Å«","UÃÃỦŨỤƯỪỨỬỮỰÃÃŮŪ","yýỳỷỹỵÿ","YÃỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aà áảãạÄằắẳẵặâầấẩẫáºÃ¤Ã¥ÄÄ
AÃÃẢÃẠÄẰẮẲẴẶÃẦẤẨẪẬÃÃ
ÄÄ","cçÄÄCÃÄÄ","dÄÄDÄÄ","eèéẻẽẹêá»áº¿á»á»
á»Ã«ÄÄÄEÃÃẺẼẸÃá»áº¾á»á»á»ÃÄÄÄ","iìÃá»Ä©á»Ã®Ã¯Ä«IÃÃá»Ä¨á»ÃÃĪ","lÅLÅ","nñÅÅNÃÅÅ","oòóá»Ãµá»Ã´á»á»á»á»á»Æ¡á»á»¡á»á»á»£Ã¶Ã¸ÅOÃÃá»Ãá»Ãá»á»á»á»á»Æ á»á» á»á»á»¢ÃÃÅ","rÅRÅ","sÅ¡ÅÈÅSÅ ÅÈÅ","tÅ¥ÈÅ£TŤÈÅ¢","uùúủũụưừứá»á»¯á»±Ã»Ã¼Å¯Å«UÃÃỦŨỤƯỪỨỬỮỰÃÃŮŪ","yýỳỷỹỵÿYÃỲỶỸỴŸ","zžżźZŽŻŹ"],r=[];return e.split("").forEach(function(i){n.every(function(n){if(-1!==n.indexOf(i)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0})}),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,r="string"==typeof n?n:n.value,i="";switch(("string"==typeof n?[]:n.limiters).forEach(function(e){i+="|"+t.escapeStr(e)}),r){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}}]),e}(),a=function(){function a(e){t(this,a),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(a,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach(function(e){t.opt.separateWordSearch?e.split(" ").forEach(function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)}):e.trim()&&-1===n.indexOf(e)&&n.push(e)}),{keywords:n.sort(function(e,t){return t.length-e.length}),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort(function(e,t){return e.start-t.start}).forEach(function(e){var i=t.callNoMatchOnInvalidRanges(e,r),o=i.start,a=i.end;i.valid&&(e.start=o,e.length=a-o,n.push(e),r=a)}),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,i=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,i=!0,o=n.length,a=t-o,s=parseInt(e.start,10)-a;return(r=(s=s>o?o:s)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),s<0||r-s<0||s>o||r>o?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})},function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){e({value:n,nodes:r})})}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),o=i.splitText(n-t),a=document.createElement(r);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=i.textContent,i.parentNode.replaceChild(a,i),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,i){var o=this;e.nodes.every(function(a,s){var c=e.nodes[s+1];if(void 0===c||c.start>t){if(!r(a.node))return!1;var u=t-a.start,l=(n>a.end?a.end:n)-a.start,h=e.value.substr(0,a.start),f=e.value.substr(l+a.start);if(a.node=o.wrapRangeInTextNode(a.node,u,l),e.value=h+f,e.nodes.forEac
vendor: 4,181 bytes, line 826
826h(function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=l),e.nodes[n].end-=l)}),n-=l,i(a.node.previousSibling,a.start),!(n>a.end))return!1;t=a.end}return!0})}},{key:"wrapGroups",value:function(e,t,n,r){return r((e=this.wrapRangeInTextNode(e,t,t+n)).previousSibling),e}},{key:"separateGroups",value:function(e,t,n,r,i){for(var o=t.length,a=1;a<o;a++){var s=e.textContent.indexOf(t[a]);t[a]&&s>-1&&r(t[a],e)&&(e=this.wrapGroups(e,s,t[a].length,i))}return e}},{key:"wrapMatches",value:function(e,t,n,r,i){var o=this,a=0===t?0:t+1;this.getTextNodes(function(t){t.nodes.forEach(function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[a];){if(o.opt.separateGroups)t=o.separateGroups(t,i,a,n,r);else{if(!n(i[a],t))continue;var s=i.index;if(0!==a)for(var c=1;c<a;c++)s+=i[c].length;t=o.wrapGroups(t,s,i[a].length,r)}e.lastIndex=0}}),i()})}},{key:"wrapMatchesAcrossElements",value:function(e,t,n,r,i){var o=this,a=0===t?0:t+1;this.getTextNodes(function(t){for(var s=void 0;null!==(s=e.exec(t.value))&&""!==s[a];){var c=s.index;if(0!==a)for(var u=1;u<a;u++)c+=s[u].length;var l=c+s[a].length;o.wrapRangeInMappedTextNode(t,c,l,function(e){return n(s[a],e)},function(t,n){e.lastIndex=n,r(t)})}i()})}},{key:"wrapRangeFromIndex",value:function(e,t,n,r){var i=this;this.getTextNodes(function(o){var a=o.value.length;e.forEach(function(e,r){var s=i.checkWhitespaceRanges(e,a,o.value),c=s.start,u=s.end;s.valid&&i.wrapRangeInMappedTextNode(o,c,u,function(n){return t(n,e,o.value.substring(c,u),r)},function(t){n(t,e)})}),r()})}},{key:"unwrapMatches",value:function(e){for(var t=e.parentNode,n=document.createDocumentFragment();e.firstChild;)n.appendChild(e.removeChild(e.firstChild));t.replaceChild(n,e),this.ie?this.normalizeTextNode(t):t.normalize()}},{key:"normalizeTextNode",value:function(e){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}},{key:"markRegExp",value:function(e,t){var n=this;this.opt=t,this.log('Searching with expression "'+e+'"');var r=0,i="wrapMatches";this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),this[i](e,this.opt.ignoreGroups,function(e,t){return n.opt.filter(t,e,r)},function(e){r++,n.opt.each(e)},function(){0===r&&n.opt.noMatch(e),n.opt.done(r)})}},{key:"mark",value:function(e,t){var n=this;this.opt=t;var r=0,i="wrapMatches",a=this.getSeparatedKeywords("string"==typeof e?[e]:e),s=a.keywords,c=a.length;this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),0===c?this.opt.done(r):function e(t){var a=new o(n.opt).create(t),u=0;n.log('Searching with expression "'+a+'"'),n[i](a,1,function(e,i){return n.opt.filter(i,t,r,u)},function(e){u++,r++,n.opt.each(e)},function(){0===u&&n.opt.noMatch(t),s[c-1]===t?n.opt.done(r):e(s[s.indexOf(t)+1])})}(s[0])}},{key:"markRanges",value:function(e,t){var n=this;this.opt=t;var r=0,i=this.checkRanges(e);i&&i.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(i)),this.wrapRangeFromIndex(i,function(e,t,r,i){return n.opt.filter(e,t,r,i)},function(e,t){r++,n.opt.each(e,t)},function(){n.opt.done(r)})):this.opt.done(r)}},{key:"unmark",value:function(e){var t=this;this.opt=e;var n=this.opt.element?this.opt.element:"*";n+="[data-markjs]",this.opt.className&&(n+="."+this.opt.className),this.log('Removal selector "'+n+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,function(e){t.unwrapMatches(e)},function(e){var r=i.matches(e,n),o=t.matchesExclude(e);return!r||o?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}},{key:"opt",set:function(e){this._opt=r({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,acrossElements:!1,ignoreGroups:0,each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:window.console},e)},get:function(){return this._opt}},{key:"iterator",get:function(){return new i(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),a}();return function(e){var t=this,n=new a(e);return this.mark=function(e,r){return n.mark(e,r),t}
826,this.markRegExp=function(e,r){return n.markRegExp(e,r),t},this.markRanges=function(e,r){return n.markRanges(e,r),t},this.unmark=function(e){return n.unmark(e),t},this}}); 827 function stringIsEmpty(value) { 828 return value ? value.trim().length == 0 : true; 829 } 830 function highlight() { 831 var liveSearchTerm = location.search.split('s=')[1]; 832 if (liveSearchTerm == null){ 833 834 } else if (liveSearchTerm.includes('&')) { 835 liveSearchTerm = liveSearchTerm.substring(0, liveSearchTerm.indexOf('&')); 836 } 837 liveSearchTerm = decodeURIComponent(liveSearchTerm); 838 if("False" == "True") { 839 console.log("Search Term/s: " + liveSearchTerm); 840 } 841 if(!stringIsEmpty(liveSearchTerm)) { 842 var markInstance; 843 if ($("").length > 0 ) { 844 markInstance = new Mark(document.querySelector("")); 845 markInstance.mark(liveSearchTerm, { wildcards: "enabled", exclude: ["nav *"], 846 done: function() { 847 if($('mark').length) { 848 $("html, body").animate({ scrollTop: $('mark').offset().top - 300 }, 300); 849 } 850 } 851 }); 852 if($('mark').length) { 853 $('html, body').scrollTop($("mark").offset().top - $('html, body').offset().top + $('html, body').scrollTop()); 854 } 855 } else if ($(".stacks_top").length > 0){ 856 markInstance = new Mark(document.querySelector("div.stacks_top")); 857 markInstance.mark(liveSearchTerm, { wildcards: "enabled", exclude: ["nav *"], 858 done: function() { 859 if($('mark').length) { 860 $("html, body").animate({ scrollTop: $('mark').offset().top - 300 }, 300); 861 } 862 } 863 }); 864 } else { 865 markInstance = new Mark(document.querySelector("body")); 866 markInstance.mark(liveSearchTerm, { wildcards: "enabled", exclude: ["nav *"], 867 done: function() { 868 if($('mark').length) { 869 $("html, body").animate({ scrollTop: $('mark').offset().top - 300 }, 300); 870 } 871 } 872 }); 873 } 874 } 875 } 876 function cleanString(input) { 877 var output = ""; 878 for (var i=0; i<input.length; i++) { 879 if (input.charCodeAt(i) <= 127) { 880 output += input.charAt(i); 881 } 882 } 883 return output; 884 } 885 function searchFinalize() { 886 if("False" == "True") { 887 if ($("").length > 0) { 888 console.log("Search Container: "); 889 } else if ($(".stacks_top").length > 0){ 890 console.log("Search Container: .stacks_top"); 891 } else { 892 console.log("Search Container: None"); 893 } 894 console.log("Automatically identified pages:"); 895 for (i = 0; i < tipuesearch_pages.length; i++){ 896 console.log(tipuesearch_pages[i]); 897 } 898 } 899 900 // jQuery.each(pages, function(index, value) { 901 // tipuesearch_pages.push(this); 902 // }); 903 // 904 905 //Exclude pages 906 // 907 908 //Remove duplicates 909 var arrayUnique = function (arr) { 910 return arr.filter(function(item, index){ 911 return arr.indexOf(item) >= index; 912 }); 913 }; 914 tipuesearch_pages = arrayUnique(tipuesearch_pages); 915 916 $.when(tipuesearch_pages).done(function() { 917 if("False" == "True") { 918 console.log("Final list of pages to search:"); 919 } 920 //Remove URL variables 921 for (i = 0; i < tipuesearch_pages.length; i++){ 922 tipuesearch_pages[i] = tipuesearch_pages[i].replace(/\?.*\#/, '#'); 923 var hasVar = tipuesearch_pages[i].indexOf('?'); 924 tipuesearch_pages[i] = tipuesearch_pages[i].substring(0, hasVar != -1 ? hasVar : tipuesearch_pages[i].length); 925 if("False" == "True") {console.log(tipuesearch_pages[i]);} 926 } 927 }); 928 searchEventsstacks_in_2765_2(); 929 jQuery("body").addClass("tipue_search_loaded"); 930 } 931 function searchInit(data) { 932 933 let sitemapUrls = [], 934 xmlReqPromises = []; 935 // 936 sitemapUrls.push(window.liveSearchBaseUrl + "sitemap.xml"); 937 $.when.apply($, sitemapUrls.map(function(val) { 938 let thisUrl = val.trim(); 939 xmlReqPromises.push( 940 new Promise(function(resolve, reject) { 941 $.ajax({ 942 type: "GET", 943 url: thisUrl, 944 dataType: "xml", 945 cache: false 946 }).done(function( data ) { 947 if("False" == "True") { 948 console.log("Sitemap found: " + thisUrl + "sitemap.xml"); 949 } 950 let xmlPages = $(data).find("url"); 951 $(xmlPages).each(function(){ 952 tipuesearch_pages.push($(this).find("loc").text()); 953 }).promise().done(function() { 954 resolve(); 955 }); 956 }).fail( function(xhr, textStatus, errorThrown) { 957 if("False" == "True") { 958 console.log("Sitemap not found: " + thisUrl + "sitemap.xml"); 959 } 960 resolve(); 961 }); 962 })); 963 })).then(function() { 964 Promise.all(xmlReqPromises).then(function() { 965 if(tipuesearch_pages.length < 1) { 966 console.log("No sitemap.xml files found"); 967 //Get folder path 968 var path = jQuery(".stacks_in_2765_2_pages").html(); 969 path = path.split('href="'); 970 window.folderPath = ""; 971 jQuery.each(path, function(index, value) { 972 var newArr = this.split('"'); 973 if (index == 1 && newArr[0] != "./") { 974 if (newArr[0].match("^../../../../../")) { 975 window.folderPath = "../../../../../"; 976 } else if (newArr[0].match("^../../../../")) { 977 window.folderPath = "../../../../"; 978 } else if (newArr[0].match("^../../../")) { 979 window.folderPath = "../../../"; 980 } else if (newArr[0].match("^../../")) { 981 window.folderPath = "../../"; 982 } else if (newArr[0].match("^../")) { 983 window.folderPath = "../"; 984 } 985 newArr = newArr[0]; 986 } 987 }); 988 //Get all links 989 var pages = [], duplicates; 990 for (var i= document.links.length; i-->0;) { 991 if (document.links[i].hostname===location.hostname) { 992 var href = document.links[i].href; 993 href = href.replace(/\?.*/,''); 994 href = href.replace(/\#.*/,''); 995 if (href.match(/\.(jpeg|jpg|gif|pdf|png)$/) == null) { 996 duplicates = document.links[i].href; 997 if(duplicates.substr(duplicates.indexOf("#") + 1) == "") { 998 duplicates = duplicates.replace(/\#.*/,''); 999 } 1000 if($.inArray(duplicates, tipuesearch_pages) === -1) { 1001 tipuesearch_pages.push(document.links[i].href); 1002 } 1003 } 1004 } 1005 } 1006 searchFinalize(); 1007 } else { 1008 searchFinalize(); 1009 } 1010 }); 1011 }); 1012 } 1013 jQuery(window).load(function() { 1014 highlight(); 1015 }); 1016} 1017function searchEventsstacks_in_2765_2() { 1018 //More results 1019 if ($(".live-search-results").length && $(window).width() > 768) { 1020 $("#stacks_in_2765_2_tipue_search_content").appendTo(".live-search-results"); 1021 } else if ($(".live-search-results-mobile").length) { 1022 $("#stacks_in_2765_2_tipue_search_content").appendTo(".live-search-results-mobile"); 1023 } 1024 //Search 1025 jQuery('#stacks_in_2765_2_tipue_search_input').tipuesearch({ 1026 'mode': 'live', //The mode for loading content. The value can be 'static', 'live' or 'json'. The default is 'static'. 1027 'liveDescription': '*', // the element containing the descriptive text 1028 // 1029 // 1030 'liveContent': '*', 1031 // 1032 'show': 3, //The number of results displayed. The default is 7. 1033 'newWindow': false, //The search result opens in a new browser tab if set to true. The default is false. 1034 'showURL': false, //The URL is displayed in each search result if set to true. The default is true. 1035 'showTitleCount': true, //The number of search results is displayed in the document title if set to true. The default is true. 1036 'minimumLength': 3, //The minimum length of characters in a search query. The default is 3. 1037 'descriptiveWords': 50, //The number of words displayed in the descriptive text in the search search. The default is 25. 1038 'highlightTerms': true, //Search terms are highlighted if set to true. The default is true. The highlight CSS is set in the h01 class. 1039 'highlightEveryTerm': true, //Every occurrence of search terms are highlighted if set to true. The default is false. 1040 'thisId': 'stacks_in_2765_2' 1041 }); 1042 jQuery('form#stacks_in_2765_2_live-search').on('submit', function() { 1043 jQuery("body").addClass("searchingstacks_in_2765_2"); 1044 return false;
1045 }); 1046 jQuery('#stacks_in_2765_2_tipue_search_input, #stacks_in_2765_2_tipue_search_content').on('click', function(e) { 1047 e.stopPropagation(); 1048 }); 1049 jQuery(document).on('click', function (e) { 1050 jQuery("body").removeClass("searchingstacks_in_2765_2"); 1051 }); 1052} 1053// 1054jQuery(document).ready( function() { 1055 // 1056 // 1057 // 1058 if(window.liveSearchInitialized == null) { 1059 searchInit(); 1060 window.liveSearchInitialized = true; 1061 } else { 1062 searchEventsstacks_in_2765_2(); 1063 } 1064 // 1065}); 1066 1067return stack;})(stacks.stacks_in_2765_2); 1068stacks.stacks_in_2767_1 = {}; 1069stacks.stacks_in_2767_1 = (function(stack) { 1070var jQuery = stacks.jQuery;var $ = jQuery; 1071document.addEventListener("DOMContentLoaded",function(){window.addEventListener('load',(event)=>{var stack=$('#stacks_in_2767_1 .pin-it'),wrapper=$('#stacks_in_2767_1'),spacer=$('#stacks_in_2767_1 .pin-spacer'),didScroll,lastPos=0,downTolerance=100,upTolerance=100,navbarHeight=stack.outerHeight(),topOffset=0,offsetUnits='px',smallOffsetUnits=false===true?'px':'px',breakpoint=640,smallTopOffset=false===true?0:0,smallTopOffset=false===true?-9999:smallTopOffset,triggerTop=stack.offset().top-topOffset;spacer.css('height',0);calcOffset(breakpoint,true);resizeElement();stack.addClass('pin-static');$(window).scroll(function(event){shouldAnimate($(this).scrollTop());didScroll=true});setInterval(function(){if(didScroll){hasScrolled();didScroll=false;}},10);function hasScrolled(){var sup=$(window).scrollTop();if(sup>triggerTop&&stack.hasClass('pin-static')){toggleSpacer(true);stack.removeClass('pin-static').addClass('pin-fixed');wrapper.addClass('pin-fixed');lastPos=sup;} 1072if(sup<triggerTop&&stack.hasClass('pin-fixed')){toggleSpacer(false);stack.removeClass('pin-fixed').addClass("pin-static");wrapper.removeClass('pin-fixed')}if(stack.hasClass('pin-fixed')){if(sup>(lastPos+downTolerance)){stack.removeClass('slide-down').addClass('slide-up');lastPos=sup;$('body').trigger('menuSlideUp');} 1073if((sup<(lastPos-upTolerance))&&(sup+$(window).height()<$(document).height())){stack.removeClass('slide-up').addClass('slide-down');lastPos=sup;}}} 1074function shouldAnimate(yPos){if(yPos<triggerTop){stack.removeClass('animate').removeClass('slide-up').removeClass('slide-down')}else{stack.addClass('animate')}} 1075function toggleSpacer(fix){if(fix==true){spacer.css('height',$('#stacks_in_2767_1 .pin-it').height());}else 1076{spacer.css('height',0);}} 1077function resizeElement(){stack.css('width',spacer.outerWidth(true));} 1078function convertToPercent(percentValue){var absBottom;return((percentValue/100)*$(window).height());} 1079function calcOffset(breakpoint,init){var thisTop,thisUnits,winWidth=$(window).width();thisTop=winWidth>breakpoint?topOffset:smallTopOffset;thisUnits=winWidth>breakpoint?offsetUnits:smallOffsetUnits;if(thisUnits==="%")thisTop=convertToPercent(thisTop);if(init){lastPos=$(window).scrollTop;if(spacer.offset().top<thisTop){stack.addClass('pin-fixed').removeClass('pin-static')} 1080else{stack.removeClass('pin-fixed').addClass('pin-static')}}triggerTop=spacer.offset().top-thisTop;} 1081function calcPositions(){resizeElement();calcOffset(breakpoint,true);hasScrolled();} 1082$(window).resize(function(){calcPositions();});setTimeout(function(){var resize=true;},10);function isTouchDevice(){return true==("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}});}); 1083 1084return stack;})(stacks.stacks_in_2767_1); 1085stacks.stacks_in_2767_2 = {}; 1086stacks.stacks_in_2767_2 = (function(stack) { 1087var jQuery = stacks.jQuery;var $ = jQuery; 1088 1089(function($){ 1090 1091 jQuery.fn.fnav = function(options){ 1092 var settings; 1093 $.extend( settings = { 1094 showSpeed: 300, 1095 hideSpeed: 300, 1096 trigger: "hover", 1097 showDelay: 0, 1098 hideDelay: 0, 1099 effect: "fade", 1100 align: "right", 1101 responsive: true, 1102 animation: "none", 1103 indentChildren: true, 1104 dropalign: false, 1105 indicatorFirstLevel: "â¿", 1106 indicatorSecondLevel: "â¿", 1107 scrollable: true, 1108 scrollableMaxHeight: 400 1109 }, options); 1110 1111 // variables 1112 var menu_container = $(this); 1113 var menu = $(menu_container).children(".fnav-menu"); 1114 var menu_li = $(menu).find("li"); 1115 var showHideButton; 1116 var mobileWidthBase = 768; 1117 var bigScreenFlag = 2000; // a number greater than "mobileWidthBase" 1118 var smallScreenFlag = 200; // a number less than "mobileWidthBase" 1119 var subnav = "subnavver"; 1120 1121 // dropdown indicators 1122 $(menu).children("li").children("a").each(function(){ 1123 if($(this).siblings(".dropdown").length > 0){ 1124 $(this).append("<span class='indicator'>" + "  " + settings.indicatorFirstLevel + "</span>"); 1125 1126 // hide the before 1127 1128 } 1129 }); 1130 1131 $(menu).find(".dropdown").children("li").children("a").each(function(){ 1132 if($(this).siblings(".dropdown").length > 0){ 1133 $(this).append("<span class='indicator'>" + settings.indicatorSecondLevel + "</span>"); 1134 } 1135 }); 1136 1137 $(menu).find(".dropdown").children("li").each(function(){ 1138 $(this).addClass(subnav); 1139 }); 1140 1141 // navigation alignment 1142 if(settings.align == "right"){ 1143 $(menu).addClass("fnav-right"); 1144 } 1145 1146 // dropdown indentation (mobile mode) 1147 if(settings.indentChildren){ 1148 $(menu).addClass("fnav-indented"); 1149 } 1150 1151 // dropdown alignment 1152 if(settings.dropalign){ 1153 $('ul.dropdown').addClass("dropdown-left"); 1154 } 1155 1156 // responsive behavior 1157 if(settings.responsive){ 1158 $(menu_container) 1159 .addClass("fnav-responsive")
1160 .prepend("<a href='javascript:void(0)' class='showhide'><em></em><em></em><em></em></a>"); 1161 showHideButton = $(menu_container).children(".showhide"); 1162 } 1163 1164 // scrollable menu 1165 if(settings.scrollable){ 1166 if(settings.responsive){ 1167 $(menu).css("max-height", settings.scrollableMaxHeight) 1168 .addClass("scrollable") 1169 .append("<li class='scrollable-fix'></li>"); 1170 } 1171 } 1172 1173 // shows a dropdown 1174 function showDropdown(item){ 1175 if(settings.effect == "fade") 1176 $(item).children(".dropdown") 1177 .stop(true, true) 1178 .delay(settings.showDelay) 1179 .fadeIn(settings.showSpeed) 1180 .addClass(settings.animation); 1181 else 1182 $(item).children(".dropdown") 1183 .stop(true, true) 1184 .delay(settings.showDelay) 1185 .slideDown(settings.showSpeed) 1186 .addClass(settings.animation); 1187 } 1188 1189 // hides a dropdown 1190 function hideDropdown(item){ 1191 if(settings.effect == "fade") 1192 $(item).children(".dropdown") 1193 .stop(true, true) 1194 .delay(settings.hideDelay) 1195 .fadeOut(settings.hideSpeed) 1196 .removeClass(settings.animation); 1197 else 1198 $(item).children(".dropdown") 1199 .stop(true, true).delay(settings.hideDelay) 1200 .slideUp(settings.hideSpeed) 1201 .removeClass(settings.animation); 1202 $(item).children(".dropdown") 1203 .find(".dropdown") 1204 .stop(true, true) 1205 .delay(settings.hideDelay) 1206 .fadeOut(settings.hideSpeed); 1207 } 1208 1209 // landscape mode 1210 function landscapeMode(){ 1211 $(menu).find(".dropdown").hide(0); 1212 if(navigator.userAgent.match(/Mobi/i) || window.navigator.msMaxTouchPoints > 0 || settings.trigger == "click"){ 1213 $(".fnav-menu > li > a, .fnav-menu ul.dropdown li a").bind("click touchstart", function(e){ 1214 e.stopPropagation(); 1215 e.preventDefault(); 1216 $(this).parent("li") 1217 .siblings("li") 1218 .find(".dropdown") 1219 .stop(true, true) 1220 .fadeOut(300); 1221 if($(this).siblings(".dropdown").css("display") == "none"){ 1222 showDropdown($(this).parent("li")); 1223 return false; 1224 } 1225 else{ 1226 hideDropdown($(this).parent("li")); 1227 } 1228 window.location.href = $(this).attr("href"); 1229 }); 1230 $(document).bind("click.menu touchstart.menu", function(ev){ 1231 if($(ev.target).closest(".fnav").length == 0){ 1232 $(".fnav-menu").find(".dropdown").fadeOut(300); 1233 } 1234 }); 1235 } 1236 else{ 1237 $(menu_li).bind("mouseenter", function(){ 1238 showDropdown(this); 1239 }).bind("mouseleave", function(){ 1240 hideDropdown(this); 1241 }); 1242 } 1243 } 1244 1245 // portrait mode 1246 function portraitMode(){ 1247 $(menu).find(".dropdown").hide(0); 1248 $(menu).find(".indicator").each(function(){ 1249 if($(this).parent("a").siblings(".dropdown").length > 0){ 1250 $(this).bind("click", function(e){ 1251 $(menu).scrollTo({top: 45, left: 0}, 600); 1252 if($(this).parent().prop("tagName") == "A"){ 1253 e.preventDefault(); 1254 } 1255 if($(this).parent("a") 1256 .siblings(".dropdown") 1257 .css("display") == "none"){ 1258 $(this) 1259 .parent("a") 1260 .siblings(".dropdown") 1261 .delay(settings.showDelay) 1262 .slideDown(settings.showSpeed); 1263 $(this) 1264 .parent("a") 1265 .parent("li") 1266 .siblings("li") 1267 .find(".dropdown") 1268 .slideUp(settings.hideSpeed); 1269 } 1270 else{ 1271 $(this) 1272 .parent("a") 1273 .siblings(".dropdown") 1274 .slideUp(settings.hideSpeed); 1275 } 1276 }); 1277 } 1278 }); 1279 } 1280 1281 // Fix the submenu on the right side 1282 function fixSubmenuRight(){ 1283 var submenus = $(menu) 1284 .children("li") 1285 .children(".dropdown"); 1286 1287 if($(window).innerWidth() > mobileWidthBase){ 1288 1289 var menu_width = $(menu_container).outerWidth(true); 1290 1291 for(var i = 0; i < submenus.length; i++){ 1292 if($(submenus[i]) 1293 .parent("li") 1294 .position().left + $(submenus[i]).outerWidth() > menu_width){ 1295 $(submenus[i]).css("right", 0); 1296 } 1297 else{ 1298 if(menu_width == $(submenus[i]).outerWidth() || (menu_width - $(submenus[i]).outerWidth()) < 20){ 1299 $(submenus[i]).css("left", 0); 1300 } 1301 if($(submenus[i]).parent("li").position().left + $(submenus[i]).outerWidth() < menu_width){ 1302 $(submenus[i]).css("right", "auto"); 1303 } 1304 } 1305 } 1306 } 1307 } 1308 1309 // show the bar to show/hide menu items on mobile 1310 function showMobileBar(){ 1311 $(menu).hide(0); 1312 $(showHideButton) 1313 .show(0) 1314 .click(function(){ 1315 1316 if($(menu).css("display") == "none") 1317 $(menu).slideDown(settings.showSpeed); 1318 else 1319 $(menu) 1320 .slideUp(settings 1321 .hideSpeed) 1322 .find(".dropdown") 1323 .hide(settings.hideSpeed); 1324 }); 1325 } 1326 1327 // hide the bar to show/hide menu items on mobile 1328 function hideMobileBar(){ 1329 $(menu).show(0); 1330 $(showHideButton).hide(0); 1331 } 1332 1333 // unbind events 1334 function unbindEvents(){ 1335 $(menu_container) 1336 .find("li, a") 1337 .unbind(); 1338 $(document).unbind("click.menu touchstart.menu"); 1339 } 1340 1341 // fnav tabs 1342 function menuTabs(){ 1343 function startTab(tab){ 1344 var TabNavs = $(tab).find(".fnav-tabs-nav > li"); 1345 var TabContents = $(tab).find(".fnav-tabs-content"); 1346 $(TabNavs).bind("click touchstart", function(e){ 1347 e.stopPropagation(); 1348 e.preventDefault(); 1349 $(TabNavs).removeClass("active"); 1350 $(this).addClass("active"); 1351 $(TabContents).hide(0); 1352 $(TabContents[$(this).index()]).show(0); 1353 }); 1354 } 1355 if($(menu).find(".fnav-tabs").length > 0){ 1356 var menuTabs = $(menu).find(".fnav-tabs"); 1357 for(var i = 0; i < menuTabs.length; i++){ 1358 startTab(menuTabs[i]); 1359 } 1360 } 1361 } 1362 1363 // navigation start function 1364 function startMenu(){ 1365 fixSubmenuRight(); 1366 if($(window).innerWidth() <= mobileWidthBase && bigScreenFlag > mobileWidthBase){ 1367 unbindEvents(); 1368 if(settings.responsive){ 1369 showMobileBar(); 1370 portraitMode(); 1371 } 1372 else{ 1373 landscapeMode(); 1374 } 1375 } 1376 if($(window).innerWidth() > mobileWidthBase && smallScreenFlag <= mobileWidthBase){ 1377 unbindEvents(); 1378 hideMobileBar(); 1379 landscapeMode(); 1380 } 1381 bigScreenFlag = $(window).innerWidth(); 1382 smallScreenFlag = $(window).innerWidth(); 1383 menuTabs(); 1384 /* IE8 fix */ 1385 if(/MSIE (\d+\.\d+);/.test(navigator.userAgent) && $(window).innerWidth() < mobileWidthBase){ 1386 var ieversion = new Number(RegExp.$1); 1387 if(ieversion == 8){ 1388 $(showHideButton).hide(0); 1389 $(menu).show(0); 1390 unbindEvents(); 1391 landscapeMode(); 1392 } 1393 } 1394 } 1395 1396 1397 startMenu(); 1398 $(window).resize(function(){ 1399 startMenu(); 1400 fixSubmenuRight(); 1401 }); 1402 1403 // Add tabbing for accessibility 1404 $("li").each(function (i) { $(this).attr('tabindex', i + 1); }); 1405 1406 } 1407}(jQuery)); 1408 1409/** 1410* jquery.scrollTo 1411* Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com 1412* Licensed under MIT 1413* @author Ariel Flesler 1414* @version 1.4.13 1415*/ 1416 1417(function(k){'use strict';k(['jquery'],function($){var j=$.scrollTo=function(a,b,c){return $(window).scrollTo(a,b,c)};j.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:!0};j.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(f,g,h){if(typeof g=='object'){h=g;g=0}if(typeof h=='function')h={onAfter:h};if(f=='max')f=9e9;h=$.extend({},j.defaults,h);g=g||h.duration;h.queue=h.queue&&h.axis.length>1;if(h.queue)g/=2;h.offset=both(h.offset);h.over=both(h.over);return this._scrollable().each(function(){if(f==null)return;var d=this,$elem=$(d),targ=f,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=win?$(targ):$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}
1417var e=$.isFunction(h.offset)&&h.offset(d,targ)||h.offset;$.each(h.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=j.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(h.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=e[pos]||0;if(h.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*h.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(h.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&h.queue){if(old!=attr[key])animate(h.onAfterFirst);delete attr[key]}});animate(h.onAfter);function animate(a){$elem.animate(attr,g,h.easing,a&&function(){a.call(this,targ,h)})}}).end()};j.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return $.isFunction(a)||typeof a=='object'?a:{top:a,left:a}}return j})}(typeof define==='function'&&define.amd?define:function(a,b){if(typeof module!=='undefined'&&module.exports){module.exports=b(require('jquery'))}else{b(jQuery)}})); 1418 1419 1420$(document).ready(function(){ 1421 1422 var mn = $("#fnav ul"); 1423 mn.addClass("fnav-menu dropdown"); 1424 mn.removeClass("fnav-right"); 1425 1426 var mo = $(".Selected"); 1427 mo.addClass("active"); 1428 mo.removeClass("Selected"); 1429 1430 $("#fnav #max-width-nav").fnav({ 1431 align: "right", 1432 responsive: true, 1433 trigger: "hover", 1434 animation: "drop-up" 1435 }); 1436 1437 1438 var $tt = $("#fnav ul"); 1439 var $dropdown_open = "dropdown off"; 1440 1441 if ($tt.hasClass("$dropdown_open")) { 1442 $("#fnav ul li a:before").hide(); 1443 } 1444 1445 1446 1447}); 1448 1449jQuery(document).ready(function() { 1450 1451 var e = $('#fnav #max-width-nav'); 1452 while (e.is("div")) { 1453 e.css({ 'overflow': 'visible', 'z-index': '9999' }); 1454 e.append("<div style='clear:both;'></div>"); 1455 e = e.parent(); 1456 } 1457 1458}); 1459 1460/* Scroll to solid colour*/ 1461 1462 1463 1464 1465return stack;})(stacks.stacks_in_2767_2); 1466stacks.stacks_in_2288 = {}; 1467stacks.stacks_in_2288 = (function(stack) { 1468var jQuery = stacks.jQuery;var $ = jQuery; 1469 1470return stack;})(stacks.stacks_in_2288); 1471stacks.stacks_in_2446 = {}; 1472stacks.stacks_in_2446 = (function(stack) { 1473var jQuery = stacks.jQuery;var $ = jQuery;// Start Responsive Shim stack Javascript code��$(document).ready(function() {����});��// End Responsive Shim stack Javascript code 1474return stack;})(stacks.stacks_in_2446); 1475stacks.stacks_in_2445 = {}; 1476stacks.stacks_in_2445 = (function(stack) { 1477var jQuery = stacks.jQuery;var $ = jQuery;// Start Responsive Shim stack Javascript code��$(document).ready(function() {����});��// End Responsive Shim stack Javascript code 1478return stack;})(stacks.stacks_in_2445); 1479stacks.stacks_in_2447 = {}; 1480stacks.stacks_in_2447 = (function(stack) { 1481var jQuery = stacks.jQuery;var $ = jQuery;// Start Responsive Shim stack Javascript code��$(document).ready(function() {����});��// End Responsive Shim stack Javascript code 1482return stack;})(stacks.stacks_in_2447); 1483stacks.stacks_in_2379 = {}; 1484stacks.stacks_in_2379 = (function(stack) { 1485var jQuery = stacks.jQuery;var $ = jQuery;function preload(arrayOfImages){$(arrayOfImages).each(function(){if(this==='')next;$('<img/>')[0].src=this;});} 1486preload(['','','','','']); 1487 1488return stack;})(stacks.stacks_in_2379); 1489stacks.stacks_in_2386 = {}; 1490stacks.stacks_in_2386 = (function(stack) { 1491var jQuery = stacks.jQuery;var $ = jQuery;function preload(arrayOfImages){$(arrayOfImages).each(function(){if(this==='')next;$('<img/>')[0].src=this;});} 1492preload(['','','','','']); 1493 1494return stack;})(stacks.stacks_in_2386); 1495stacks.stacks_in_2393 = {}; 1496stacks.stacks_in_2393 = (function(stack) { 1497var jQuery = stacks.jQuery;var $ = jQuery;function preload(arrayOfImages){$(arrayOfImages).each(function(){if(this==='')next;$('<img/>')[0].src=this;});} 1498preload(['','','','','']); 1499 1500return stack;})(stacks.stacks_in_2393); 1501stacks.stacks_in_2400 = {}; 1502stacks.stacks_in_2400 = (function(stack) { 1503var jQuery = stacks.jQuery;var $ = jQuery;function preload(arrayOfImages){$(arrayOfImages).each(function(){if(this==='')next;$('<img/>')[0].src=this;});} 1504preload(['','','','','']); 1505 1506return stack;})(stacks.stacks_in_2400); 1507stacks.stacks_in_2407 = {}; 1508stacks.stacks_in_2407 = (function(stack) { 1509var jQuery = stacks.jQuery;var $ = jQuery;function preload(arrayOfImages){$(arrayOfImages).each(function(){if(this==='')next;$('<img/>')[0].src=this;});} 1510preload(['','','','','']); 1511 1512return stack;})(stacks.stacks_in_2407); 1513stacks.stacks_in_2414 = {}; 1514stacks.stacks_in_2414 = (function(stack) { 1515var jQuery = stacks.jQuery;var $ = jQuery;function preload(arrayOfImages){$(arrayOfImages).each(function(){if(this==='')next;$('<img/>')[0].src=this;});} 1516preload(['','','','','']); 1517 1518return stack;})(stacks.stacks_in_2414); 1519stacks.stacks_in_2339 = {}; 1520stacks.stacks_in_2339 = (function(stack) { 1521var jQuery = stacks.jQuery;var $ = jQuery; 1522$(function(){window.addEventListener('load',(event)=>{$('#stacks_in_2339>.s-pro:not(.vault-height)>.shear-wrapper').removeClass('preload-wrapper');$('#stacks_in_2339>.s-pro:not(.vault-height) .content').removeClass('preload-content');});}); 1523 1524return stack;})(stacks.stacks_in_2339); 1525stacks.stacks_in_2734_1 = {}; 1526stacks.stacks_in_2734_1 = (function(stack) { 1527var jQuery = stacks.jQuery;var $ = jQuery; 1528stacks.fInit=function(stack){return stack;} 1529window.wowjsmobile=false;window.revealAnimation='none';window.revealNoScroll=false;$(document).on('opened.fndtn.reveal','[data-reveal]',function(){$(window).trigger('resize')}
1529);$(document).ready(function(){if($.isMobile()){$('.show-for-touch').fadeIn('fast');$("a[data-dropdown],a.menu-icon,a.touchfix").on('touchend',function(){$(this).trigger('click')});}});var useCustomSelector='False',stacksTrue='True',headerFamily='Open Sans'==='custom'?'':"Open Sans",headerFamilyFallback='sans-serif',headerSelector='h1'+',.font-family-h1',headerStyle='normal',headerGoogle=headerFamily==='Open Sans'?stacksTrue:'Open Sans'==='custom'?'False':'false',headerWeight=headerStyle==='italic'?'300italic':'300',headerWeight=headerWeight+',400'.replace(/\s/g,''),header2Family='Open Sans'==='custom'?'':'Open Sans',header2FamilyFallback='sans-serif',header2Selector='h2, h3, h4, h5, h6'+',.font-family-h2',header2Style='normal',header2Google=header2Family==='Open Sans'?stacksTrue:'Open Sans'==='custom'?'False':'false',header2Weight=header2Style==='italic'?'600italic':'600',header2Weight=header2Weight+',400'.replace(/\s/g,''),fontFamily='Open Sans'==='custom'?'Spinnaker':'Open Sans',fontFamilyFallback='sans-serif',fontSelector='p'+',.font-family-text',fontGoogle=fontFamily==='Open Sans'?stacksTrue:'Open Sans'==='custom'?'True':'false',fontWeight='400,400'.replace(/\s/g,''),getGoogleUrls=function(fontStore){var googleFonts=[];for(var family in fontStore){var weights=fontStore[family].join().replace(/,,/g,',').replace(/,$/,'');googleFonts.push('https://fonts.googleapis.com/css?family='+family+':'+weights);} 1530return googleFonts;},isGFont=function(family,google){if(google===stacksTrue)return family;return false;},getGoogleFonts=function(data){var fonts=data.fonts,weights=data.weights,google=data.google,fontStore=new Object();for(var i=0;i<fonts.length;i++){if(isGFont(fonts[i],google[i])===false)continue;(fontStore[fonts[i]]=fontStore[fonts[i]]||[]).push(weights[i]);} 1531return getGoogleUrls(fontStore);};headerFamily=$.trim(headerFamily);header2Family=$.trim(header2Family);fontFamily=$.trim(fontFamily);var cssFontFiles=getGoogleFonts({fonts:[headerFamily,header2Family,fontFamily],weights:[headerWeight,header2Weight,fontWeight],google:[headerGoogle,header2Google,fontGoogle]});for(var i=0;i<cssFontFiles.length;i++){loadCSS(decodeURIComponent(cssFontFiles[i]));} 1532if(useCustomSelector===stacksTrue){fontFamily='"'+fontFamily+'"';headerFamily='"'+headerFamily+'"';header2Family='"'+header2Family+'"';var customFontStyles={'font-family':[fontFamily,fontFamilyFallback].join()+'!important','font-weight':fontWeight.split(',')[0]+'!important'},customHeaderSyles={'font-family':[headerFamily,headerFamilyFallback].join()+'!important','font-weight':headerWeight.split(',')[0]+'!important','font-style':headerStyle+'!important'},customHeader2Syles={'font-family':[header2Family,header2FamilyFallback].join()+'!important','font-weight':header2Weight.split(',')[0]+'!important','font-style':header2Style+'!important'};if(fontFamily!=='fontpro'){$.debug('Custom Font Selectors:'+fontSelector,customFontStyles);vein.inject(fontSelector,customFontStyles);} 1533if(headerFamily!=='fontpro'){$.debug('Custom Header Selectors:'+headerSelector,customHeaderSyles);vein.inject(headerSelector,customHeaderSyles);} 1534if(header2Family!=='fontpro'){$.debug('Custom Header2 Selectors:'+header2Selector,customHeader2Syles);vein.inject(header2Selector,customHeader2Syles);}} 1535 1536return stack;})(stacks.stacks_in_2734_1); 1537stacks.stacks_in_2192_2 = {}; 1538stacks.stacks_in_2192_2 = (function(stack) { 1539 1540return stack;})(stacks.stacks_in_2192_2); 1541stacks.stacks_in_2192_8 = {}; 1542stacks.stacks_in_2192_8 = (function(stack) { 1543 1544return stack;})(stacks.stacks_in_2192_8);
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.