PageSourceSearch

https://cdn-shared.altium.com/development/navigation_new/dist/js/footer.min.js

js altium.com collected 2026-10-02 02:26:16 UTC 17,520 bytes, 1 lines download raw bytes

1!function(n){var o={};function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=5)}([function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var o=function(){function t(e){if(!function(e){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),this.clb=e&&e.clb||void 0,this.onError=e&&e.onError||function(){},this.sessionId=e&&e.sessionId||void 0,this.url=e&&e.url||void 0,this.useOwnRequest=e&&e.useOwnRequest||!1,this.requestName=e&&e.useOwnRequest&&e.requestName||"geoIpRequest",this.geo=void 0,this.clb){if(this.sessionId)return this.geo=sessionStorage.getItem(this.sessionId),this.geo?this.clb(JSON.parse(this.geo)):void(this.url?this.geo||this.init(this.clb):console.warn("Please, add url for geo!"));console.warn("Please, add id for caching!")}else console.warn("Use callback!")}var e,n,o;return e=t,(n=[{key:"init",value:function(n){var o=this;function e(e){if(200===window[o.requestName].status){var t=JSON.parse(window[o.requestName].responseText);return sessionStorage.setItem(e,JSON.stringify(t)),n(t)}console.warn("Error "+window[o.requestName].status+": "+window[o.requestName].statusText),o.onError()}void 0===window[this.requestName]?(window[this.requestName]=new XMLHttpRequest,window[this.requestName].open("GET",this.url,!0),window[this.requestName].addEventListener("load",function(){e(this.sessionId)}.bind(this)),window[this.requestName].addEventListener("error",function(){console.warn("There was a connection error of some sort"),o.onError()}),window[this.requestName].send()):window[this.requestName].addEventListener("load",function(){e(this.sessionId)}.bind(this))}}])&&i(e.prototype,n),o&&i(e,o),t}(),s=window.GetGeo=o;function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}o=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(e){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),this.wrapper=document.querySelector(e.wrapper||".footer-v2"),this.beforeReplaceOnElm=e.beforeReplaceOnElm||function(e){},this.afterReplaceOnElm=e.afterReplaceOnElm||function(e){},this.afterHideElm=e.afterHideElm||function(e){},this.beforeSuccess=e.beforeSuccess||function(){},this.beforeError=e.beforeError||function(){},this.afterSuccess=e.afterSuccess||function(){},this.afterError=e.afterError||function(){},this.sessionLang="geo-page-lang",this.sessionId="geo-lang-geoip",this.requestName="geoFooterGEORequest",this.dataAttr=e.dataAttr||"data-geo-use",this.dataAttrReplace=e.dataAttr||"data-geo-use-update",this.flagUrl=e.flagUrl||"https://www.altium.com/shared/navigation_new/dist/images/flags/",this.lang=this.getLang(),this.dafaultGeo=e.dafaultGeo||{success:!0,region:55071,country:"USA",region_tid:"247",office:"United States",title:"ALTIUM INC.",phone:"1-800-544-4186",contact_phone:"1-800-544-4186",additional_phone:"1-858-864-1798",support_phone:"1800 488 0681 (toll free)",fax:"1-858-864-1601",email:"[email protected]",address:"West Coast<br>4225 Executive Sq Ste. 700,<br>Suite 200<br>La Jolla, CA 92037<br><br>East Coast<br>1 University Ave<br>South Lobby, Suite 2C<br>Westwood, Ma 02090",hours:"8:00 - 18:00",website:"https://www.altium.com",country_code:"US",region_code:"NA",geoip_region:"NA",geoip_country:"United States",geoip_code:"US"},this.checkInit()}var e,n,o;return e=t,(n=[{key:"init",value:function(){var t=this;this.checkStoredLang(),new s({sessionId:this.sessionId,useOwnRequest:!0,requestName:this.requestName,url:"https://www.altium.com/".concat(this.lang&&"en"!==this.lang?this.lang+"/":"","geoip"),clb:function(e){t.beforeSuccess(),t.setDataAttr(e),t.afterSuccess();e=(null==e?void 0:e.geoip_code)||"en";document.documentElement.setAttribute("data-geo-code",e.toLowerCase())},onError:function(){t.beforeError(),t.setDataAttr(t.dafaultGeo),t.afterError()}})}},{key:"checkStoredLang",value:function(){var e=this.getStoreLang();e?e!==this.lang&&(sessionStorage.removeItem(this.sessionId),this.storeLang()):this.storeLang()}},{key:"storeLang",value:function(){sessionStorage.setItem(this.sessionLang,this.lang)}},{key:"getStoreLang",value:function(){return sessionStorage.getItem(this.sessionLang)}},{key:"setDataAttr",value:function(e){var t=this.wrapper;if(t){var n=t.querySelectorAll("[".concat(this.dataAttr,"]"));if(n)for(var o=0,i=n.length;o<i;o++){var s=n[o].getAttribute(this.dataAttr),a=e[s];if(a){this.beforeReplaceOnElm(n[o]);var r,c=n[o].getAttribute(this.dataAttrReplace);if("footer"===s&&this.addFooterInfo(n[o],e),!c)return;
1~(c=c.split(",")).indexOf("innerText")&&(~s.indexOf("phone")?n[o].innerText=a.replace(/[a-zA-z()\s]/g,""):n[o].innerText=a),~c.indexOf("flag-img")&&((r=new Image).src=this.flagUrl+a.toLowerCase()+".svg",n[o].innerHTML="",n[o].appendChild(r)),~c.indexOf("href")&&n[o].href&&(~s.indexOf("phone")?n[o].href="tel:"+a.replace(/[a-zA-z()\s]/g,""):~s.indexOf("email")&&(n[o].href="mailto:"+a)),this.afterReplaceOnElm(n[o])}}}}},{key:"addFooterInfo",value:function(e,t){if(t.hasOwnProperty("footer")){for(var n=t.footer,o=e.tagName,i=e.parentNode,s=0,a=n.length;s<a;s++){var r=n[s],c=Object.keys(r)[0],l=r[c],u=Object.keys(r[c]);this.insertFooterTitle(o,r,i,c);for(var h=0,f=u.length;h<f;h++){var g=u[h],d=l[g];"title"===g&&d&&this.insertFooterSubTitle(o,r,i,d)}for(var m=0,v=u.length;m<v;m++){var p=u[m],w=l[p];"title"!==p&&w&&this.insertFooterGEOInfo(o,r,i,p,w)}}e.remove()}}},{key:"insertFooterGEOInfo",value:function(e,t,n,o,i){var s=document.createElement(e),a=document.createElement("A");"link"===o?(a.innerText=i.title,a.href=i.url):~i.indexOf("|http")?(e=i.split("|"),a.innerText=e[0],a.href=e[1]):(a.innerText=i,a.href=("email"===o?"mailto:":"tel:")+i),s.appendChild(a),n.appendChild(s)}},{key:"insertFooterTitle",value:function(e,t,n,o){e=document.createElement(e);e.innerText=o,e.className="list-elms-title",n.appendChild(e)}},{key:"insertFooterSubTitle",value:function(e,t,n,o){e=document.createElement(e);e.innerText=o,e.className="list-elms-subtitle",n.appendChild(e)}},{key:"getLang",value:function(){var e=document.documentElement.getAttribute("lang");return e?("ja"===e&&(e="jp"),"ko"===e&&(e="kr"),e):(e=document.body.className.match("i18n-[A-Za-z][A-Za-z]"))?("ja"===(e=e[0].replace("i18n-",""))&&(e="jp"),"ko"===e&&(e="kr"),e):"en"}},{key:"checkInit",value:function(){this.wrapper&&!this.wrapper.classList.contains("useGeoData-processed")&&(this.wrapper.classList.add("useGeoData-processed"),this.init())}}])&&a(e.prototype,n),o&&a(e,o),t}();window.UseGeoData=o;t.a=o},,,,,function(e,t,n){n(8),e.exports=n(6)},function(e,t,n){"use strict";n.r(t);t=n(7)},function(e,t,n){},function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}n.r(t);var o=function(){function t(e){!function(e){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),this.conf=e,this.textShowLess="Show Less Options",this.textShowMore="Show More Options",document.body.classList.contains("footer_initialized")||this.checkInit()}var e,n,o;return e=t,(n=[{key:"init",value:function(){this.isFixed=this.conf.elm.classList.contains("footer-v2_fixed-bottom"),this.isFixed&&this.logicFixedFooter(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}return null}),this.conf.elm.addEventListener("click",this.clickEvent.bind(this))}},{key:"logicFixedFooter",value:function(){var e=this;this.conf.elm.insertAdjacentHTML("beforeBegin",'\n      <div class="footer-v2__footer-clone"></div>\n    '),this.conf.elm.insertAdjacentHTML("afterBegin",'\n      <div class="footer-v2__fixed-control">\n        <div class="footer-v2__container">\n          '.concat(this.langHTML(),"\n          ").concat(this.logicShowMoreOptions(),"\n        </div>\n      </div>\n    ")),window.addEventListener("scroll",function(){e.fixedFooterScrollLogic()}),window.addEventListener("resize",function(){e.fixedFooterScrollLogic()})}},{key:"fixedFooterScrollLogic",value:function(){var e;this.conf.elm.classList.contains("footer-v2_static-at-the-bottom")&&(e=this.conf.elm.previousElementSibling.getBoundingClientRect(),window.innerHeight+100>=e.top?(this.conf.elm.classList.add("_footer-v2_fixed-bottom--disabled"),this.hideFixedMenu()):(this.conf.elm.classList.remove("_footer-v2_fixed-bottom--disabled"),this.hideLang()))}},{key:"langHTML",value:function(){if(this.elmLang=this.conf.elm.querySelector(".footer-v2__lang"),this.elmLang){var e=document.createElement("div");return e.appendChild(this.elmLang.cloneNode(!0)),e.innerHTML}}},{key:"logicShowMoreOptions",value:function(){return'\n      <div class="footer-v2__show-more">'.concat(this.textShowMore,"</div>\n    ")}},{key:"clickEvent",value:function(e){var t,n=e.target;this.elmLang=this.conf.elm.querySelector(".footer-v2__lang"),this.elmLangActive=this.conf.elm.querySelector(".footer-v2__lang-active"),n.classList.contains("footer-v2__lang-active")?this.handlerLang(document.body):"A"===n.tagName&&n.closest(".footer-v2__lang-list")?(e.stopPropagation(),this.handlerLangChose(n)):n.classList.contains("footer-v2__nav-title")?(this.prevent(e),this.handlerShowMobileMenu(n.closest(".footer-v2__nav-menu"))):n.classList.contains("footer-v2__show-more")&&(this.prevent(e),this.handlerShowFixedMenu(n)),null!==(n=this.elmLang)&&void 0!==n&&n.addEventListener("mouseenter",function(){clearTimeout(t)}),this.isFixed||null!==(n=this.elmLang)&&void 0!==n&&n.addEventListener("mouseleave",function(){t=setTimeout(function(){document.body.classList.remove("footer-v2__lang_active")},1400)})}},{key:"handlerShowFixedMenu",value:function(e){this.toggleClass(this.conf.elm,"footer-v2__fixed-show"),this.conf.elm.scrollTop=0,this.conf.elm.classList.contains("footer-v2__fixed-show")?e.innerText=this.textShowLess:e.innerText=this.textShowMore}},{key:"hideFixedMenu",value:function(){this.conf.elm.classList.remove("footer-v2__fixed-show"),this.conf.elm.scrollTop=0;var e=document.querySelector(".footer-v2__show-more");e&&(e.innerText=this.textShowMore)}},{key:"handlerLang",value:function(e){var t,n;this.toggleClass(e,"footer-v2__lang_active"),!this.isFixed||(t=this.conf.elm.querySelector(".footer-v2__lang-list"))&&(n=t.querySelector("ul"),e.classList.contains("footer-v2__lang_active")?(t.style.height="".concat(n.offsetHeight+20,"px"),this.conf.elm.style.transform="translate(0, -".concat(n.offsetHeight+72,"px)")):this.hideLang())}},{key:"hideLang",value:function(){var e=this.conf.elm.querySelector(".footer-v2__lang-list");e&&(this.conf.elm.removeAttribute("style"),e.style.height="0px",document.body.classList.remove("footer-v2__lang_active"))}},{key:"handlerLangChose",value:function(e){this.elmLangActive&&(document.body.classList.remove("footer-v2__lang_active"),this.elmLangActive.innerText=e.innerText)}},{key:"handlerShowMobileMenu",value:function(e){this.toggleClass(e,"footer-v2__nav-menu_active")}},{key:"checkInit",value:function(){"string"==typeof this.conf.elm&&(this.conf.elm=document.querySelector(this.conf.elm)),this.conf.elm&&(this.conf.elm.classList.contains(this.conf.processedClass)||(this.conf.elm.classList.add(this.conf.processedClass),this.init()))}},{key:"toggleClass",value:function(e,t){var n,o;e&&t&&(-1===(o=(n=e.className).indexOf(t))?n+=" "+t:n=n.substr(0,o)+n.substr(o+t.length),e.className=n)}},{key:"prevent",value:function(e){e.stopPropagation(),e.preventDefault()}}])&&i(e.prototype,n),o&&i(e,o),t}(),t=window.FooterV2=o;function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}o=function(){function t(){!function(e){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),this.langCookieName="lang_selected_code",this.domainRegex=/\.altium\.com$/,this.baseDomain=".altium.com",this.defaultLang="en",this.currentLanguage="",this.cookieLanguage="",this.browserLanguage="",this.pageLanguages=null,this.isDocumentation=~location.pathname.indexOf("/documentation"),this.isStore="store.altium.com"===location.host,this.isRedirectDisabled=this.isStore||document.body.classList.contains("user-logged-in")||document.body.classList.contains("logged-in")||document.body.classList.contains("disable-redirect"),this.checkInit()}var e,n,o;return e=t,(n=[{key:"init",value:function(){this.currentLanguage=document.documentElement.lang,this.cookieLanguage=this.readCookie(this.langCookieName),this.browserLanguage=window.navigator.language.replace(/(\w{2})(-\w{2,4})/gi,"$1"),this.pageLanguages=this.isDocumentation?this.getPageLanguagesDocumentation():this.getPageLanguagesDefault(),this.checkRedirect(),this.footerLanguagesListView()}},{key:"getPageLanguagesDocumentation",value:function(){var e={},t=document.querySelectorAll(".footer-v2__lang-list a");if(t&&t.length)for(var n=0,o=t.length;n<o;n++){var i=t[n],s=i.getAttribute("data-language"),i=i.getAttribute("href");s&&i&&("zh-hans"===s||"zh"===s?s="cn":"ja"===s?s="jp":"ko"===s&&(s="kr"),e[s]=i)}return e}},{key:"getPageLanguagesDefault",value:function(){var e={},t=document.querySelectorAll('link[rel="alternate"][hreflang][href]');if(t&&t.length)for(var n=0,o=t.length;n<o;n++){var i=t[n],s=i.getAttribute("hreflang"),i=i.getAttribute("href");s&&i&&("zh-hans"===s||"zh"===s?s="cn":"ja"===s?s="jp":"ko"===s?s="kr":"pt-pt"===s&&(s="pt"),e[s]=i)}return e}},{key:"checkRedirect",value:function(){var e,t;"zh-hans"!==this.currentLanguage&&(this.isRedirectDisabled||(this.defaultLang===this.currentLanguage?(e=this.cookieLanguage&&this.pageLanguages[this.cookieLanguage]?this.pageLanguages[this.cookieLanguage]:"",t=this.browserLanguage&&this.pageLanguages[this.browserLanguage]?this.pageLanguages[this.browserLanguage]:"",this.cookieLanguage!==this.currentLanguage&&e?(this.setCookieLang(this.cookieLanguage),this.redirect(e)):!this.cookieLanguage&&this.browserLanguage!==this.currentLanguage&&t?(this.setCookieLang(this.browserLanguage),this.redirect(t)):this.setCookieLang(this.defaultLang)):this.setCookieLang(this.currentLanguage)))}},{key:"footerLanguagesListView",value:function(){var i=this,s=this.getLanguages(),e=document.querySelectorAll(".footer-v2__lang");e.length&&e.forEach(function(e){if(i.isEmpty(s))e.style.visibility="hidden";else{var o=e.querySelectorAll(".footer-v2__lang-list a");if(o)for(var t=0,n=o.length;t<n;t++)!function(e){var t=(e=o[e]).getAttribute("data-language"),n=s[t]||"";n&&""!==n?e.addEventListener("click",function(e){e.preventDefault(),t&&n&&(i.setCookieLang(t),i.redirect(n))}):e.parentNode.style.display="none"}(t)}})}},{key:"isEmpty",value:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return JSON.stringify(e)===JSON.stringify({})}},{key:"setCookieLang",value:function(e){"cn"!==e&&this.setCookie(this.langCookieName,e,{domain:this.getDomain(),path:"/",expires:365})}},{key:"getDomain",value:function(){return this.domainRegex.test(location.hostname)?this.baseDomain:location.hostname}},{key:"redirect",value:function(e){var t=window.location,n=t.search,t=t.hash,e=new URL(e),t="".concat(e.origin).concat(e.pathname).concat(n).concat(t);window.open(t,"_self")}},{key:"isRedirectToAnotherAndCNDomain",value:function(e){e=new URL(e);return!(location.hostname===e.hostname||!e.hostname.match("[^.]*.alt
1ium.com.cn$"))}},{key:"getLanguages",value:function(){return this.pageLanguages}},{key:"readCookie",value:function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var i=n[o];" "==i.charAt(0);)i=i.substring(1,i.length);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return null}},{key:"setCookie",value:function(e,t,n){var o,i=(n=n||{}).expires;"number"==typeof i&&i&&((o=new Date).setTime(o.getTime()+24*i*60*60*1e3),i=n.expires=o),i&&i.toUTCString&&(n.expires=i.toUTCString());var s,a=e+"="+(t=encodeURIComponent(t));for(s in n){a+="; "+s;var r=n[s];!0!==r&&(a+="="+r)}document.cookie=a}},{key:"checkInit",value:function(){var e=document.body;e&&!e.classList.contains("browserLang-processed")&&(e.classList.add("browserLang-processed"),this.init())}}])&&s(e.prototype,n),o&&s(e,o),t}(),o=window.BrowserLang=o,n=n(0);new t({elm:".footer-v2",processedClass:"footer-v2_processed"}),new o,new n.a}]);

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.