"use strict";/*! * HelpNDoc HTML template * Copyright (C) IBE Software - All rights reserved. * Can only be used in documentation generated by HelpNDoc: http://www.helpndoc.com */ var __extends=this&&this.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Exception=function(e){function t(t){var o=e.call(this,t)||this;return o.message=t,o.name="Exception",o.message=t,o}return __extends(t,e),t.prototype.toString=function(){return"["+this.name+']: "'+this.message+'"'},t}(Error),EInvalidHtmlElement=function(e){function t(t){var o=e.call(this,t)||this;return o.message=t,o.name="EInvalidHtmlElement",o}return __extends(t,e),t}(Exception),Hnd;!function(e){var t=function(){function e(){}return e}();e.AppOptions=t;var o=function(){function e(){}return e}();e.AppEvents=o;var n=function(){function e(e){this.DEFAULTS={animationDelay:200,elHeadroom:"header",elInlineTocContainer:"#inline-toc",elMask:".mask",elModal:"#hndModal",elSearchForm:"#search-form",elSearchInfo:"#search-info",elSearchInput:"#input-search",elToggler:".hnd-toggle",elTopicContainer:"article",elTopicContent:"#topic-content",elTreeContainers:".tree-container",elTreeSearch:"#search-tree",classNavExpandedSmall:"sm-nav-expanded",classNavExpandedMedium:"md-nav-expanded",inlineTocHeadings:"h1,h2,h3",searchEngineMinChars:3},this.EVENTS={onTopicChanged:null},this.TRANSLATIONS={"Search term too short":"Search term too short","No results":"No results","Please enter more characters":"Please enter more characters","Word list not ready yet. Please wait until the word list is fully downloaded":"Word list not ready yet. Please wait until the word list is fully downloaded","Incorrect or corrupt search data. Please check your HelpNDoc template":"Incorrect or corrupt search data. Please check your HelpNDoc template","Related topics...":"Related topics...","Loading...":"Loading...",Close:"Close"},this.options=$.extend({},this.DEFAULTS,e),this.Init()}return e.prototype._=function(e){var t=this.TRANSLATIONS[e];return t||e},e.prototype.doOnJsTreeError=function(e,t){console.error("JSTree Error",t);var o=e.find(".jstree-loading");o&&(t.error&&"ajax"==t.error?o.html('Loading Error: Please make sure your web-server is correctly configured to serve JSON files. Learn more...'):o.html("Error: please check your web-developer console for more information."))},e.prototype.doOnTopicChanged=function(e){this.EVENTS.onTopicChanged&&("string"==typeof e&&""!==e||(e=$(this.options.elTopicContent).data("hnd-id")+".html"),this.EVENTS.onTopicChanged(e))},e.prototype.doProcessParameters=function(){var e=URI(location.href),t=e.search(!0);t.tab&&""!=t.tab&&$("#tab-"+t.tab).tab("show"),t.search&&void 0!==t.search&&""!=t.search&&(this.$elSearchInput.val(t.search),this.$elSearchInput.keyup(),this.$elSearchForm.submit())},e.prototype.fixURI=function(e){return e.replace(/\%u00A0/g,"%20")},e.prototype.getAnchor=function(){return window.location.hash.substr(1)},e.prototype.isExternalLink=function(e){var t=function(e){return 0===e.indexOf("//")&&(e=location.protocol+e),e.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]};return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&t(location.href)!==t(e)||-1==["htm","html"].indexOf(new URI(e).suffix().toLowerCase())},e.prototype.DoShowExternalUrl=function(e,t,o){"mailto:"==t.substring(0,7).toLowerCase()?location.href=t:window.open(t,o)},e.prototype.DoShowTopic=function(e,t,o){var n=this;this.$elTopicContainer.load(o+" "+this.options.elTopicContent,function(e,i,r){var a=$(n.options.elTopicContent),s=a.data("hnd-id");if(window.history.pushState({id:s,title:t},t,o),"undefined"!=typeof ga&&ga)try{if(void 0!==ga.getAll&&ga.getAll&&ga.getAll()[0]){ga.getAll()[0].send("pageview",location.pathname)}else ga("send","pageview",location.pathname)}catch(e){console.error("[HND-APP] An error occurred while using Google Analytics tracking code =>",e.toString())}n.DoUpdateInlineToc(),n.SelectTopicInToc(s,t,!0),n.DoScrollToAnchorIfNeeded(),n.DoHighlightText(n.searchTerm),imageMapResize(),n.doOnTopicChanged(o)})},e.prototype.DoHandleLink=function(e,t,o,n,i){"_blank"==n||this.isExternalLink(o)||!0===i?this.DoShowExternalUrl(t,o,n):this.DoShowTopic(e,t,o)},e.prototype.DoHighlightText=function(e){try{this.$elTopicContainer.unmark(),e&&""!==e&&this.$elTopicContainer.mark(e,{accuracy:"complementary",diacritics:!1})}catch(e){console.error("[HND-APP] An error occurred while highlighting the search term =>",e.toString())}},e.prototype.DoScrollToAnchorIfNeeded=function(){var e=decodeURIComponent(this.getAnchor());if(""!==e){var t=$("a[name='"+e+"']");if(t&&t.length||(t=$("a[name='"+e.toLowerCase()+"']")),t&&t.length||(t=$("#"+e)),t&&void 0!==t&&t.offset&&t.offset()){var o=this.$elHeadroom.position().top<0?0:this.$elHeadroom.outerHeight(!0)+5;$("html,body").animate({scrollTop:t.offset().top-o},"fast")}else console.error("[HND-APP] Unkonwn or invalid anchor =>",e)}else $("html,body").animate({scrollTop:0},"fast")},e.prototype.DoUpdateInlineToc=function(){var e=this.options.inlineTocHeadings,t=$(this.options.elInlineTocContainer),o=e.split(","),n=0,i=[t];$(this.$elTopicContainer).find(e).attr("id",function(e,t){return t||function(e){0===e.length&&(e="heading");for(var t=e.replace(/[^a-zA-Z0-9]+/g,"_"),o="",n=1;null!==document.getElementById(t+o);)o="_"+n++;return t+o}($(this).text())}).each(function(){var e=$(this),t=$.map(o,function(t,o){return e.is(t)?o:void 0})[0];if(t>n){var r=i[0].children("li:last")[0];r&&i.unshift($("