!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.commonFooter=t():e.commonFooter=t()}(window,(function(){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t,o){},function(e,t,o){},function(e,t,o){"use strict";o.r(t);o(0),o(1);var n=function(e){try{flash_fe_core_tool.$AsyncLoadFileManagement.load("/SystemFragment/adobe/footer.adobe.js",{isLastest:!0,cache:!1}).then(()=>{_footer_adobe_tool.init()})}catch(e){console.log("footer:"+JSON.stringify(e))}let t=e,o=navigator.userAgent,n=(o.indexOf("Android")>-1||o.indexOf("Adr"),!!o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)),r=flash_fe_core_tool.$util.$coreMethods.isApp(),i=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,l=(flash_fe_core_tool.$util.$coreMethods.getMetaContent("storeinfo.storeid"),flash_fe_core_tool.$util.$coreMethods.getMetaContent("lc")),c=flash_fe_core_tool.$util.$coreMethods.getMetaContent("cc"),a=null;flash_fe_core_tool.$util.$coreMethods.getMetaContent("siteRoot");let s="";const _="/"+c+"/"+l;let d="";const f=t==flash_fe_core_tool.$CONSTANT.TERMINAL.PC;if(t!=flash_fe_core_tool.$CONSTANT.TERMINAL.TABLET){let e=$(".commonFooter ul.social_icon"),o=$(".commonFooter ul.social_icon>li").length,n=8;t==flash_fe_core_tool.$CONSTANT.TERMINAL.MOBILE&&(n=6),o&&o>n&&e.css("width",45*Math.ceil(o/2)+"px")}const m=flash_fe_core_tool.$util.$coreMethods.getMetaContent("taxonomytype"),h=flash_fe_core_tool.$util.$coreMethods.checkStoreType().isPublic,u=!!$(".single-sku-hero-content").length,p=!!$(".subseries-hero-content").length||u,g=["pdp","subseriespage"].includes(m);if(h&&(p||g)){let e=flash_fe_core_tool.$util.$coreMethods.getPageName().split("/").pop();flash_fe_core_tool.$queue.add(flash_fe_core_tool.$http.jsonp,{params:flash_fe_core_tool.$util.$coreMethods.getRequestPrefix()+"/online/product/getVenderIcons?productNumber="+e,delay:2e3}).then(e=>{if(200==e.status&&e.data.length){let t="";e.data.forEach(e=>{e.iconUrl&&(t+='
\n\t\t\t\t\t\t').concat(e.iconAlt,'\n\t\t\t\t\t
'))}),$(".commonFooter .parterLogos_list").empty().append(t)}}).catch(e=>{console.log("get vendor logo error:",e)})}t==flash_fe_core_tool.$CONSTANT.TERMINAL.MOBILE&&(r?$(".commonFooter .software_download").hide():n?$(".commonFooter .and_goole_play").hide():$(".commonFooter .ios_app_store").hide()),flash_fe_core_tool.$queue.add(flash_fe_core_tool.$Api.getStoreInfo,{delay:2e3}).then(e=>{var t,o;"1"===e.data.CMS["Footer Contact Info Toggle"]&&(null==e||null===(t=e.data)||void 0===t?void 0:t.CMS["Footer Contact Info"])&&$(".pc_footer_nav").after('"));const n=null==e||null===(o=e.data)||void 0===o?void 0:o.CMS["Footer Email Message"];n&&$(".commonFooter").find(".email_label:first").attr({"aria-label":n,descrition:"优先取store字段:Footer Email Message.其次取词条"}).text(n)}).catch(e=>{e.msg&&console.error(e.msg)}).finally(()=>{$('.commonFooter a[target="_blank"]').attr("social_icon_key","footer.social.befofre.content").attr("social_icon_before_content",translate("footer.social.befofre.content")||"open in new tab")}),$(".commonFooter").find(".pc_footer_nav a[target='_blank']").attr("aria-description","opens in a new tab"),Promise.all(flash_fe_core_tool.$util.$dom.loadImg($(".commonFooter"))).then().catch();let y=document.createElement("template");try{let e=flash_fe_core_tool.$domain.getDomain(3)+"/t_/"+flash_fe_core_tool.$util.$coreMethods.getMetaContent("lenovo.language")+"_"+flash_fe_core_tool.$util.$coreMethods.getMetaContent("lenovo.country")+"/SystemFragment/countryList/select_list.html";flash_fe_core_tool.$util.$coreMethods.getMetaContent("Account")===location.host&&(e+="?accountDomain=true"),flash_fe_core_tool.$AsyncLoadFileManagement.load(e).then(e=>{if(e&&y){y.innerHTML=e;let t=$(y.content).find('li[data-key="'.concat(_,'"]'));t.length>0&&($(y.content).find('li[data-key="'.concat(_,'"]')).remove(),s=t.text(),t.addClass("active"),d=t.data("img"),d&&$("#selectLogo").attr("src",d),y.content.insertBefore(t[0],y.content.firstChild)),f?k():s?($(".commonFooter .select_country #checked_select").html(s),$(".commonFooter .select_country #checked_select").show(),$(".commonFooter .select_country #no_checked_select").hide()):($(".commonFooter .select_country #checked_select").hide(),$(".commonFooter .select_country #no_checked_select").show())}})}catch(e){console.log("load countryList error",e)}const v=$(".commonFooter .le_input input[type='text']"),M=$(".commonFooter #selectList");function C(){let e="";return e=$(".common_footer .account").val(),""==e.trim()?($(".empty_email_message").css("display","block"),$(".err_email_message").css("display","none"),$(".enter_email .select_view").addClass("select_view_error"),void $(".enter_email .select_view form>label").addClass("err_email")):($(".empty_email_message").css("display","none"),$(".enter_email .select_view").removeClass("select_view_error"),$(".enter_email .select_view form>label").removeClass("err_email"),1!=i.test(e)?($(".err_email_message").css("display","block"),$(".empty_email_message").css("display","none"),$(".enter_email .select_view").addClass("select_view_error"),void $(".enter_email .select_view form>label").addClass("err_email")):($(".err_email_message").css("display","none"),a="https://gp.wd.lenovo.com/".concat(l,"/signup/comems15v2243?country_iso2=").concat(c,"&email=").concat(e,"&enableOverflowScrolling=true"),void(3==t||2==t?($("#footer_mask_iframe").attr({src:a,width:"100%",height:"100%"}),$("#footerMask").show()):1==t&&($("#footer_mask_iframe").attr({src:a,width:"600px",height:"600px"}),$("#footerMask").show()))))}function k(){$(".country_input").val(""),s&&$(".country_input").val(s)}$(".commonFooter ul.social_icon a").on("keydown",(function(e){if(13==e.keyCode){let e=$(this).attr("_lazy_href");flash_fe_core_tool.$util.$coreMethods.doRedirect(e)}})),$(".commonFooter .footer_footer .inter").on("keydown",(function(e){if(13==e.keyCode){let e=$(this).find("a").attr("_lazy_href");flash_fe_core_tool.$util.$coreMethods.doRedirect(e)}})),$(".commonFooter .copyright .link a").on("keydown",(function(e){if(13==e.keyCode){let e=$(this).attr("_lazy_href");flash_fe_core_tool.$util.$coreMethods.doRedirect(e)}})),$(".commonFooter .copyright .link a").on("click",(function(e){let t=$(this).attr("_lazy_href");flash_fe_core_tool.$util.$coreMethods.doRedirect(t)})),$(".commonFooter div.pc_footer_nav .item ul li").on("keydown",(function(e){if(13==e.keyCode){let e=$(this).find("a").attr("_lazy_href");flash_fe_core_tool.$util.$coreMethods.doRedirect(e)}})),v.on("focus",(function(){$(this).parent(".input_box").addClass("focus")})).on("blur",(function(){this.value.length||$(this).parent(".input_box").removeClass("focus")})),$(".common_footer .toggle_mask_icon").on("click",(function(e){e.stopPropagation(),C()})),$(".common_footer .account").on("keydown",(function(e){e.keyCode&&13===e.keyCode&&C()})),$(".common_footer #footer_nav .item .title").on("click",(function(){const e=$(this);e.hasClass("title_toogle")?e.attr("aria-expanded","false"):e.attr("aria-expanded","true"),e.toggleClass("title_toogle"),e.next().toggle("fast")})),$(".common_footer .select_view").on("click",(function(e){e.stopPropagation(),$(this).addClass("afocus"),"country"==$(this).attr("_type")&&(f?($(".country_input").focus(),k(),y.innerHTML&&$(".commonFooter #selectList").html(y.innerHTML)):0===$(".commonFooter #selectList li").length&&y.innerHTML&&$(".commonFooter #selectList").html(y.innerHTML),$(".commonFooter #selectList").toggle(),"true"==$(this).attr("aria-expanded")?$(this).attr("aria-expanded","false"):$(this).attr("aria-expanded","true"))})),$(".common_footer #countrySelect").on("keydown",(function(e){13==e.keyCode&&(e.stopPropagation(),$(".select_view").css({border:"1px solid #BCBCBC"}),$(this).css({border:"1px solid #1976A1"}),"country"==$(this).attr("_type")&&(f?(k(),y.innerHTML&&$(".commonFooter #selectList").html(y.innerHTML)):0===$(".commonFooter #selectList li").length&&y.innerHTML&&$(".commonFooter #selectList").html(y.innerHTML),M.toggle(),"true"==$(this).attr("aria-expanded")?$(this).attr("aria-expanded","false"):$(this).attr("aria-expanded","true")))})),$(document).on("click",(function(){M.hide(),f&&k(),setTimeout(()=>{var e;$(".select_view").removeClass("afocus"),$("#countrySelect").attr("aria-expanded","false"),""==(null===(e=$(".commonFooter .account").val())||void 0===e?void 0:e.trim())?$(".enter_email .select_view").removeClass("hasInputValue"):$(".enter_email .select_view").addClass("hasInputValue"),$(".enter_email .select_view").removeClass("select_view_error"),$(".empty_email_message,.err_email_message").hide(),$(".enter_email .select_view form>label").removeClass("err_email")},10)})),$(".common_footer .closeIframe").on("click",(function(){$(".footer").show(),$("#footerMask").hide()})),$(".common_footer .closeIframe").on("keydown",(function(e){$(".footer").show(),13==e.keyCode&&$("#footerMask").hide()})),M.on("click","li",(function(e){if(e.stopPropagation(),$(this).addClass("active").siblings().removeClass("active"),f){let e=$(this).text();$(".country_input").val(e)}else{let e=$(this).html();$("#checked_select").html(e),$("#checked_select").show(),$("#no_checked_select").hide(),e||($("#checked_select").hide(),$("#no_checked_select").show())}M.toggle();let t=$(this).attr("_lazy_href");flash_fe_core_tool.$util.$coreMethods.doRedirect(t)})),M.on("keydown","li",(function(e){if(e.stopPropagation(),13==e.keyCode){if($(this).addClass("active").siblings().removeClass("active"),f){let e=$(this).text();$(".country_input").val(e)}else{let e=$(this).html();$("#checked_select").html(e),$("#checked_select").show(),$("#no_checked_select").hide(),e||($("#checked_select").hide(),$("#no_checked_select").show())}M.toggle();let e=$(this).attr("_lazy_href");flash_fe_core_tool.$util.$coreMethods.doRedirect(e)}})),function(){const e=flash_fe_core_tool.$util.$coreMethods.checkChannel().isB2B;if(flash_fe_core_tool.$CONSTANT.TERMINAL.TABLET,flash_fe_core_tool.$CONSTANT.TERMINAL.PC,e){const e=$(".common_footer");e.find(".footer_header").hide(),e.find(".software_download").hide(),e.find(".social_icon").hide(),e.css("margin-top","15px")}}(),function(e){if(!e)return;let t=translate("commonfooterCopyright");t=t.replace("${year}",(new Date).getFullYear()),e.querySelector('[data-tkey="commonfooterCopyright"]').innerText=t}(document.querySelector(".commonFooter .common_footer")),f&&$(".country_input").on("input",(function(){let e=$(this).val(),t="";$(".commonFooter #selectList").show(),$(this).attr("aria-expanded","true"),e?($(".commonFooter #selectList").html(y.innerHTML),$(".commonFooter #selectList li").length&&($(".commonFooter #selectList li").each((function(){-1!==$(this).text().indexOf(e)&&(t+=$(this).prop("outerHTML"))})),$(".commonFooter #selectList").html(t))):y.innerHTML&&$(".commonFooter #selectList").html(y.innerHTML)}))};var r={el:"",data:{},init(e,t){this.el=e,this.data=t,flash_fe_core_tool.$util.$coreMethods.isApp()?$(".commonFooter").addClass("hidefooter"):(this.registerEvent(),this.closeTabTooltip())},registerEvent(){let e=$(".footer_footer .parterLogos_list .parterLogos_item"),t=$(".footer_footer .copyright .link a");if(e.length>0){let t="";e.each((function(){if($(this).find("img").attr("_src")){const e=$(this).find("img").attr("_src");$(this).find("img").attr("alt")||($(this).find("img").removeAttr("tabindex"),$(this).find("a").attr("tabindex","-1"),$(this).find("a").removeAttr("aria-label")),$(this).find("img").attr("src",e),$(this).find("img").removeAttr("_src"),t+=$(this).prop("outerHTML")}})),$(".commonFooter .parterLogos_list").empty().append(t)}if(t.length>0){let e="";t.each((function(){$(this).text()&&(e+=$(this).prop("outerHTML"))})),$(".footer_footer .copyright .link").empty().append(e)}n(flash_fe_core_tool.$CONSTANT.TERMINAL.PC)},closeTabTooltip(){let e=$('.commonFooter a[target="_blank"]');e.on("keydown",(function(e){27!=e.keyCode||$(this).hasClass("tab_tooltip_hide")||$(this).addClass("tab_tooltip_hide")})),e.on("focusout",(function(){$(this).hasClass("tab_tooltip_hide")&&$(this).removeClass("tab_tooltip_hide")}))}};t.default=function(e,t){r.init(e,t)}}]).default}));