var tcdn_top_move_bottom_time=0; var tcdn_run_time=1; var subDomainLanguageType=1; var tcdn_business=false; var tcdn_source_url = ''; var tcdn_wildcard_domain = ''; var tcdn_to = 'null'; var tcdn_share_url = 'http://tcdn.zvo.cn/?url=&to=null'; var tcdn_system_domain = 'http://tcdn.zvo.cn'; var tcdn_supportLanguage = null; var tcdn_smallLangs = {}; try{ tcdn_smallLangs = {"zh-cn":"chinese_simplified","zh-tw":"chinese_traditional","co":"corsican","gn":"guarani","rw":"kinyarwanda","ha":"hausa","no":"norwegian","nl":"dutch","yo":"yoruba","en":"english","kok":"gongen","la":"latin","ne":"nepali","fr":"french","cs":"czech","haw":"hawaiian","ka":"georgian","ru":"russian","fa":"persian","bho":"bhojpuri","hi":"hindi","be":"belarusian","sw":"swahili","is":"icelandic","yi":"yiddish","tw":"twi","ga":"irish","gu":"gujarati","km":"khmer","sk":"slovak","he":"hebrew","kn":"kannada","hu":"hungarian","ta":"tamil","ar":"arabic","bn":"bengali","az":"azerbaijani","sm":"samoan","af":"afrikaans","id":"indonesian","da":"danish","sn":"shona","bm":"bambara","lt":"lithuanian","vi":"vietnamese","mt":"maltese","tk":"turkmen","as":"assamese","ca":"catalan","si":"singapore","ceb":"cebuano","gd":"scottish-gaelic","sa":"sanskrit","pl":"polish","gl":"galician","lv":"latvian","uk":"ukrainian","tt":"tatar","cy":"welsh","ja":"japanese","fil":"filipino","ay":"aymara","lo":"lao","te":"telugu","ro":"romanian","ht":"haitian_creole","doi":"dogrid","sv":"swedish","mai":"maithili","th":"thai","hy":"armenian","my":"burmese","ps":"pashto","hmn":"hmong","dv":"dhivehi","lb":"luxembourgish","sd":"sindhi","ku":"kurdish","tr":"turkish","mk":"macedonian","bg":"bulgarian","ms":"malay","lg":"luganda","mr":"marathi","et":"estonian","ml":"malayalam","de":"deutsch","sl":"slovene","ur":"urdu","pt":"portuguese","ig":"igbo","ckb":"kurdish_sorani","om":"oromo","el":"greek","es":"spanish","fy":"frisian","so":"somali","am":"amharic","ny":"nyanja","pa":"punjabi","eu":"basque","it":"italian","sq":"albanian","ko":"korean","tg":"tajik","fi":"finnish","ky":"kyrgyz","ee":"ewe","hr":"croatian","kri":"creole","qu":"quechua","bs":"bosnian","mi":"maori"}; }catch(e){ console.log('请检查你自定义的 /mnt/tcdn/language.json 是否设置有误'); console.log(e); } if("undefined"==typeof translate&&(translate={}),void 0===translate.util&&(translate.util={}),void 0===tcdn)var tcdn={};translate.util.synchronizesLoadJs=function(e){var t=null;if(window.ActiveXObject)try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){t=new ActiveXObject("Microsoft.XMLHTTP")}else window.XMLHttpRequest&&(t=new XMLHttpRequest);if(t.open("GET",e,!1),t.send(null),4==t.readyState){if(t.status>=200&&t.status<300||0==t.status||304==t.status){var n=document.getElementsByTagName("HTML")[0],i=document.createElement("script");i.language="javascript",i.type="text/javascript";try{i.appendChild(document.createTextNode(t.responseText))}catch(e){i.text=t.responseText}return n.appendChild(i),!0}return!1}return!1},tcdn.more=function(){},tcdn.convertToPx=function(e){if("number"==typeof e)return e;const t={px:1,"%":function(){const e=elements[i].parentNode;return parseInt(window.getComputedStyle(e).height)/100},rem:function(){return parseFloat(window.getComputedStyle(document.documentElement).fontSize)},em:function(){return parseFloat(window.getComputedStyle(elements[i]).fontSize)},vw:function(){return window.innerWidth/100},vh:function(){return window.innerHeight/100},vmin:function(){const e=window.innerWidth,t=window.innerHeight;return Math.min(e,t)/100},vmax:function(){const e=window.innerWidth,t=window.innerHeight;return Math.max(e,t)/100},pt:function(){return 1.333},pc:function(){return 16},mm:function(){return 3.779527559055118},cm:function(){return 37.79527559055118},in:function(){return 96},ex:function(){return.5*parseFloat(window.getComputedStyle(elements[i]).fontSize)},ch:function(){return.5*parseFloat(window.getComputedStyle(elements[i]).fontSize)}},n=e.match(/[a-z]+$/);if(n&&t[n[0]]){const i=parseFloat(e);return"function"==typeof t[n[0]]?Math.round(i*t[n[0]]()):Math.round(i*t[n[0]])}return parseInt(e)},tcdn.elementMoveTop=function(){for(var e=document.getElementsByTagName("*"),t=0;t=35||i<0)continue;document.documentElement.clientHeight||document.body.clientHeight;const a=e[t].getBoundingClientRect(),d=window.innerHeight||document.documentElement.clientHeight;a.top>0&&a.top<=d&&a.bottom>0&&a.bottom<=d&&a.bottom+35>=d&&(e[t].style.bottom=i+35+"px")}catch(e){console.log(e)}}},tcdn.loading=function(){if("undefined"!=typeof tcdn_switchPrompt&&null!=tcdn_switchPrompt)try{msg.loading(tcdn_switchPrompt)}catch(e){}},tcdn.preview=function(){var e=tcdn.document().getElementById("url").value.trim(),t=tcdn.document().getElementById("languageSelect").value;if(e.length<2)return msg.failure("Exception
please set url"),tcdn.document().getElementById("url").style.borderWidth="4px",void(tcdn.document().getElementById("url").style.borderColor="red");if(""==t)return msg.failure("Exception
please select language"),tcdn.document().getElementById("languageSelect").style.borderWidth="4px",tcdn.document().getElementById("languageSelect").style.borderColor="red",tcdn.document().getElementById("languageSelect").style.fontSize="12px",void(tcdn.document().getElementById("languageSelect").style.paddingTop="3px");if(0!=e.indexOf("http")&&(e="http://"+e),tcdn.loading(),0==parent.tcdn_wildcard_domain.length)window.location.href="/?url="+encodeURIComponent(e)+"&to="+t;else if(e==tcdn_source_url){let e=window.location.href.replace(window.location.origin,"");if(e.indexOf("=")>-1){let t=new URLSearchParams(e.slice(e.indexOf("?")+1));t.delete("url"),t.delete("to"),e="";for(let[n,i]of t.entries())e.length>0&&(e+="&"),e=e+n+"="+i}else e="";let n="";n=void 0!==parent.tcdn_mainWildcardDomainLanguage&&null!=parent.tcdn_mainWildcardDomainLanguage&&t==parent.tcdn_mainWildcardDomainLanguage?parent.tcdn_mainWildcardDomain+parent.tcdn_wildcard_domain:tcdn.getSubDomainLanguage(t)+"."+parent.tcdn_wildcard_domain,window.location.href=window.location.protocol+"//"+n+window.location.pathname+(""==e?"":"?"+e)}else window.location.href=tcdn_system_domain+"/?url="+encodeURIComponent(e)+"&to="+t},tcdn.getSubDomainLanguage=function(e){if(void 0!==parent.subDomainLanguageType&&"2"==parent.subDomainLanguageType){var t={};for(var n in parent.tcdn_smallLangs)parent.tcdn_smallLangs.hasOwnProperty(n)&&(t[parent.tcdn_smallLangs[n]]=n);return console.log(t),t[e]}return e.replace("_","-")},tcdn.share=function(){prompt("当前页面分享出去的URL为:",tcdn_share_url)},tcdn.document=function(){var e=document.getElementById("translatejs_tcdn_top");return null==e?null:e.contentDocument||e.contentWindow.document},tcdn.setSelectedLanguage=function(e){for(var t=tcdn.document().getElementById("languageSelect"),n=0;n{tcdn.elementMoveTop(),tcdn.initelementMoveTopcount++,5===tcdn.initelementMoveTopcount&&clearInterval(tcdn.initElementMoveTopInterval)},1e3));var e=document.createElement("iframe");if(e.id="translatejs_tcdn_top","boolean"==typeof tcdn_business&&tcdn_business){const e=document.createElement("style");document.head.appendChild(e),e.sheet.insertRule("#translatejs_tcdn_top { position: fixed; z-index: 2147483647; width:150px; height:35px; }",0)}else e.style="border: none; border-radius: 0px; box-shadow: none; height: 35px; left: 0px; right: auto; position: fixed; top: 0px; transition: none 0s ease 0s; width: 100%; z-index: 99999999999999999; border-top: 1px solid rgb(238, 238, 238); animation: tcdn_top_move_buttom "+parent.tcdn_top_move_bottom_time+"s ease-in-out forwards; ";e.srcdoc='\n\t\t\n\t\t\n\t\t\t \x3c!--free-style-start--\x3e\n\t\t\t \n\t\t\t \x3c!--free-style-end--\x3e\n\t\n\t\t\t \n\t\t\n\t\t\n\t\t\t
\n\t\t\t\t\x3c!--Target URL, for example--\x3e\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t
声明
\n\t\t\t
\n\t\t\t\tAI计算耗时 : loading \n\t\t\t\t分享\n\t\t\t
\n\t\t\t
 提示:此能力仅供学习研究,禁止用于非法用途!
\n\t\t\n\t',"boolean"==typeof tcdn_business&&tcdn_business?window.addEventListener("DOMContentLoaded",function(){var t=document.getElementById("translate");void 0!==t&&null!=t?t.appendChild(e):document.body.insertBefore(e,document.body.firstChild)}):(e.addEventListener("animationend",function(){const e=document.createElement("style");document.head.appendChild(e)}),document.body.insertBefore(e,document.body.firstChild));const t=setInterval(function(){if(null!=tcdn.document()&&null!=tcdn.document().getElementById("languageSelect")){var e=[{id:"corsican",name:"hinaassicurasol",serviceId:"co"},{id:"guarani",name:"ondoho",serviceId:"gn"},{id:"kinyarwanda",name:"Kinyarwanda",serviceId:"rw"},{id:"hausa",name:"dictionary variant",serviceId:"ha"},{id:"norwegian",name:"Norge",serviceId:"no"},{id:"dutch",name:"nederlands",serviceId:"nl"},{id:"yoruba",name:"Yoruba",serviceId:"yo"},{id:"english",name:"English",serviceId:"en"},{id:"gongen",name:"गोंगेन हें नांव",serviceId:"gom"},{id:"latin",name:"Latina",serviceId:"la"},{id:"nepali",name:"नेपालीName",serviceId:"ne"},{id:"french",name:"Français",serviceId:"fr"},{id:"czech",name:"český",serviceId:"cs"},{id:"hawaiian",name:"panekeʻhaka",serviceId:"haw"},{id:"georgian",name:"ჯორჯიანიName",serviceId:"ka"},{id:"russian",name:"Русский язык",serviceId:"ru"},{id:"chinese_simplified",name:"简体中文",serviceId:"zh-CN"},{id:"persian",name:"Persian",serviceId:"fa"},{id:"bhojpuri",name:"हमार कपार दर्द करता।",serviceId:"bho"},{id:"hindi",name:"हिन्दी",serviceId:"hi"},{id:"belarusian",name:"БеларускаяName",serviceId:"be"},{id:"swahili",name:"Kiswahili",serviceId:"sw"},{id:"icelandic",name:"ÍslandName",serviceId:"is"},{id:"yiddish",name:"ייַדיש",serviceId:"yi"},{id:"twi",name:"Ma frɛ",serviceId:"ak"},{id:"irish",name:"Íris",serviceId:"ga"},{id:"gujarati",name:"ગુજરાતી",serviceId:"gu"},{id:"khmer",name:"ខ្មែរKCharselect unicode block name",serviceId:"km"},{id:"slovak",name:"Slovenská",serviceId:"sk"},{id:"hebrew",name:"היברית",serviceId:"iw"},{id:"kannada",name:"ಕನ್ನಡ್Name",serviceId:"kn"},{id:"hungarian",name:"magyar",serviceId:"hu"},{id:"tamil",name:"தாமில்",serviceId:"ta"},{id:"arabic",name:"بالعربية",serviceId:"ar"},{id:"bengali",name:"বেঙ্গালী",serviceId:"bn"},{id:"azerbaijani",name:"azerbaijani",serviceId:"az"},{id:"samoan",name:"lifiava",serviceId:"sm"},{id:"afrikaans",name:"afrikaans",serviceId:"af"},{id:"indonesian",name:"IndonesiaName",serviceId:"id"},{id:"danish",name:"dansk",serviceId:"da"},{id:"shona",name:"Shona",serviceId:"sn"},{id:"bambara",name:"Bamanankan",serviceId:"bm"},{id:"lithuanian",name:"Lietuva",serviceId:"lt"},{id:"vietnamese",name:"Tiếng Việt",serviceId:"vi"},{id:"maltese",name:"Malti",serviceId:"mt"},{id:"turkmen",name:"Türkmençe",serviceId:"tk"},{id:"assamese",name:"assamese",serviceId:"as"},{id:"catalan",name:"català",serviceId:"ca"},{id:"singapore",name:"සිංගාපුර්",serviceId:"si"},{id:"cebuano",name:"cebuano",serviceId:"ceb"},{id:"sanskrit",name:"Sanskrit",serviceId:"sa"},{id:"polish",name:"Polski",serviceId:"pl"},{id:"galician",name:"galico",serviceId:"gl"},{id:"latvian",name:"latviešu",serviceId:"lv"},{id:"ukrainian",name:"УкраїнськаName",serviceId:"uk"},{id:"tatar",name:"Татар",serviceId:"tt"},{id:"scottish_gaelic",name:"Gàidhlig na h-Alba",serviceId:"gd"},{id:"welsh",name:"color name",serviceId:"cy"},{id:"japanese",name:"日本語",serviceId:"ja"},{id:"filipino",name:"Pilipino",serviceId:"tl"},{id:"aymara",name:"aymara.",serviceId:"ay"},{id:"lao",name:"ກະຣຸນາ",serviceId:"lo"},{id:"telugu",name:"తెలుగుQFontDatabase",serviceId:"te"},{id:"romanian",name:"Română",serviceId:"ro"},{id:"haitian_creole",name:"Kreyòl ayisyen",serviceId:"ht"},{id:"dogrid",name:"कुकुरमुत्ता",serviceId:"doi"},{id:"swedish",name:"Svenska",serviceId:"sv"},{id:"maithili",name:"मरातिलीName",serviceId:"mai"},{id:"thai",name:"คนไทย",serviceId:"th"},{id:"armenian",name:"Արմենյան",serviceId:"hy"},{id:"burmese",name:"ဗာရမ်",serviceId:"my"},{id:"pashto",name:"پښتوName",serviceId:"ps"},{id:"hmong",name:"hmong",serviceId:"hmn"},{id:"dhivehi",name:"ދިވާރީވް",serviceId:"dv"},{id:"chinese_traditional",name:"繁體中文",serviceId:"zh-TW"},{id:"luxembourgish",name:"LëtzebuergeschName",serviceId:"lb"},{id:"sindhi",name:"سنڌي",serviceId:"sd"},{id:"kurdish",name:"Kurdî",serviceId:"ku"},{id:"turkish",name:"Türkçe",serviceId:"tr"},{id:"macedonian",name:"Македонски",serviceId:"mk"},{id:"bulgarian",name:"български",serviceId:"bg"},{id:"malay",name:"Malay",serviceId:"ms"},{id:"luganda",name:"luganda",serviceId:"lg"},{id:"marathi",name:"मराठीName",serviceId:"mr"},{id:"estonian",name:"eesti keel",serviceId:"et"},{id:"malayalam",name:"മലമാലം",serviceId:"ml"},{id:"deutsch",name:"Deutsch",serviceId:"de"},{id:"slovene",name:"slovenščina",serviceId:"sl"},{id:"urdu",name:"اوردو",serviceId:"ur"},{id:"portuguese",name:"português",serviceId:"pt"},{id:"igbo",name:"igbo",serviceId:"ig"},{id:"kurdish_sorani",name:"کوردی سۆرانی",serviceId:"ckb"},{id:"oromo",name:"adeta",serviceId:"om"},{id:"greek",name:"ελληνικά",serviceId:"el"},{id:"spanish",name:"Español",serviceId:"es"},{id:"frisian",name:"frysk",serviceId:"fy"},{id:"somali",name:"Soomaali",serviceId:"so"},{id:"amharic",name:"amharic",serviceId:"am"},{id:"nyanja",name:"potakuyan",serviceId:"ny"},{id:"punjabi",name:"ਪੰਜਾਬੀName",serviceId:"pa"},{id:"basque",name:"baskoa",serviceId:"eu"},{id:"italian",name:"italiano",serviceId:"it"},{id:"albanian",name:"albanian",serviceId:"sq"},{id:"korean",name:"한국어",serviceId:"ko"},{id:"tajik",name:"ТаjikӣName",serviceId:"tg"},{id:"finnish",name:"suomi",serviceId:"fi"},{id:"kyrgyz",name:"Кыргыз тили",serviceId:"ky"},{id:"ewe",name:"Eʋegbe",serviceId:"ee"},{id:"croatian",name:"hrvatski",serviceId:"hr"},{id:"creole",name:"a n:n",serviceId:"kri"},{id:"quechua",name:"Quechua",serviceId:"qu"},{id:"bosnian",name:"bosnian",serviceId:"bs"},{id:"maori",name:"Maori",serviceId:"mi"}];"undefined"!=typeof tcdn_supportLanguage&&null!=tcdn_supportLanguage&&(e=tcdn_supportLanguage);var n=tcdn.document().createElement("option");n.value="",n.textContent="目标语言",n.disabled="disabled",n.selected=!0,tcdn.document().getElementById("languageSelect").appendChild(n),e.forEach(function(e){var t=tcdn.document().createElement("option");t.value=e.id,t.textContent=e.name,tcdn.document().getElementById("languageSelect").appendChild(t)}),"undefined"!=typeof tcdn_source_url?tcdn.document().getElementById("url").value=tcdn_source_url:tcdn.document().getElementById("translatejs_tcdn_top_run_panel").style.display="none","undefined"!=typeof tcdn_to&&tcdn.setSelectedLanguage(tcdn_to),"undefined"!=typeof tcdn_run_time&&(tcdn.document().getElementById("translatejs_tcdn_top_usetime").innerHTML=tcdn_run_time+"ms"+(tcdn_run_time>0?"":" (Hit cache)")),clearInterval(t)}},20);"undefined"!=typeof tcdn_switchPrompt&&null!=tcdn_switchPrompt&&window.addEventListener("load",function(){const e=document.querySelectorAll("a");for(var t=0;t',currentWindowsId:0,id:{idArray:new Array,create:function(){var t=(new Date).getTime()+"";return msg.id.idArray[msg.id.idArray.length]=t,t},delete:function(t=""){var i="";if(""==t)i=msg.id.idArray[msg.id.idArray.length-1],msg.id.idArray.pop();else{i=t;for(var e=0;e');return msg.id.tishiIdArray[msg.id.tishiIdArray.length]=e,this.delayClose(1800,i,e),e},getElementDistanceToTop:function(t){var i=t.getBoundingClientRect(),e=window.pageYOffset||document.documentElement.scrollTop;return i.top+e},showTips:function(t){var i=document.getElementById(t.id),e=i.getBoundingClientRect(),n=this.getElementDistanceToTop(i),o=e.x,d=i.offsetWidth,l=i.offsetHeight,r=window.innerHeight,g=window.innerWidth,s=r-n-i.offsetHeight,a=g-o-d;if(t.background||(t.background="#10a6a8"),t.color||(t.color="#FFFFFF"),t.width||(t.width="200px"),t.height||(t.height="auto"),t.direction||(t.direction="right"),"left"!==t.direction&&"right"!==t.direction&&"top"!==t.direction&&"bottom"!==t.direction)return console.log("请输入正确的tips方向");var m=msg.id.create();if(null!=document.getElementsByTagName("body")&&document.getElementsByTagName("body").length>0&&i instanceof Element){var c=document.createElement("div");c.id="wangmarket_popup_"+m,c.style=`position:absolute;padding:10px;border-radius:2px;\n\t\t\t\t${"left"==t.direction||"right"==t.direction?`top: ${n}px;`:""}\n\t\t\t\t${"left"==t.direction?`right: calc(${a}px + ${d}px + ${parseInt("20px")/2}px);`:""}\n\t\t\t\t${"right"==t.direction?`left: calc(${o}px + ${d}px + ${parseInt("20px")/2}px);`:""}\n\n\t\t\t\t${"top"==t.direction||"bottom"==t.direction?`left:${o}px;`:""}\n\t\t\t\t${"top"==t.direction?`bottom: calc(${s}px + ${l}px + ${parseInt("20px")/2}px);`:""}\n\t\t\t\t${"bottom"==t.direction?`top: calc(${n}px + ${l}px + ${parseInt("20px")/2}px);`:""}\n\t\t\t\tbackground:${t.background};\n\t\t\t\tz-index: 2147483647;width: ${t.width};\n\t\t\t\tbox-shadow: 0px 3px 10px 0px rgba(143, 140, 140, 0.31);\n\t\t\t\theight:${t.height};box-sizing:border-box`,c.style.transform="scale(0.8)",c.style.transition="transform 0.1s ease-in-out",c.innerHTML=""+`
`+t.text+"
",c.classList.add("_custom_deng");var I=`\n\t\t\t\tcontent: " ";\n\t\t\t position: absolute;\n\t\t\t\t${"left"==t.direction||"right"==t.direction?"top: 13px;":""}\n\t\t\t\t${"top"==t.direction||"bottom"==t.direction?"left: 10%;":""}\n\t\t\t ${t.direction}: 100%;\n\t\t\t border: ${parseInt("20px")/4}px solid transparent;\n\t\t\t\tborder-${t.direction}: ${parseInt("20px")/2}px solid ${t.background};\n\t\t\t`,u=document.getElementById("_custom_deng_style");if(u)u.innerText=`._custom_deng::before { ${I} }`;else{var h=document.createElement("style");h.type="text/css",h.id="_custom_deng_style",h.innerText=`._custom_deng::before { ${I} }`,document.head.appendChild(h)}setTimeout(function(){c.style.transform="scale(1)"},10),document.body.appendChild(c)}else alert("提示,body中没有子元素,无法显示 msg.js 的提示");return m},tip:function(t){if(!t||!t.id||!t.text)return console.log("msg.tip()方法中请传入基本的选项(包括id和显示文本)");var i,e=document.getElementById(t.id);return e?(e.addEventListener("mouseenter",e=>{e.stopPropagation(),this.closeAllSimpleMsg(),i=this.showTips(t),msg.id.tishiIdArray[msg.id.tishiIdArray.length]=i}),e.addEventListener("mouseleave",()=>{this.close(i)}),i):void 0},failure:function(t,i){this.closeAllSimpleMsg();var e=this.show(t,this.errorIcon);return msg.id.tishiIdArray[msg.id.tishiIdArray.length]=e,this.delayClose(1800,i,e),e},info:function(t,i){this.closeAllSimpleMsg();var e=this.show(t,'');return msg.id.tishiIdArray[msg.id.tishiIdArray.length]=e,this.delayClose(1800,i,e),e},closeAllSimpleMsg:function(){for(var t=0;t')},close:function(t=""){this.currentWindowsId=0;var i=msg.id.delete(t),e=document.getElementById("wangmarket_popup_"+i);if(null!=e){var n=e.parentNode;null!=n&&n.removeChild(e)}},delayClose:function(t,i,e=""){var n=parseInt(1e5*Math.random());this.currentWindowsId=n;var o=this;setTimeout(function(){o.currentWindowsId==n&&msg.close(e),null!=i&&i()},t)},show:function(t,i){var e=!1;null!=t&&t.length>10&&(e=!0);var n=msg.id.create();if(null!=document.getElementsByTagName("body")&&document.getElementsByTagName("body").length>0){var o=document.createElement("div");o.id="wangmarket_popup_"+n,o.style="position: fixed;z-index: 2147483647;margin: 0 auto;text-align: center;width: 100%;",o.innerHTML='
"+i+'
'+t+"
",document.getElementsByTagName("body")[0].appendChild(o)}else alert("提示,body中没有子元素,无法显示 msg.js 的提示");return n},popups:function(t){var i=!1,e=!1;if(void 0===t?t={}:"string"==typeof t&&(t={text:t}),null==t&&(t={}),null!=t.left&&(i=!0),null==t.top&&null==t.bottom||(e=!0),null!=t.url){null!=t.text&&console.log("友好提醒:您已经设置了 attribute.url ,但是您又设置了 attribute.text ,根据优先级, 将采用 attribute.url ,而 attribute.text 设置无效。 ");var n="msg_popups_loading_"+(new Date).getTime();t.text='
加载中...
'}null==t.text&&(t.text="您未设置text的值,所以这里出现提醒文字。您可以这样用:
msg.popups('我是提示文字');
"),null!=t.height&&null!=t.bottom&&console.log("msg.js -- function popups() : 友情提示:您同时设置了height、bottom两个属性,此时height属性生效,bottom属性将会不起作用"),null==t.close&&(t.close=!0),null==t.top&&(t.top="auto"),(null==t.bottom||t.bottom.length<1)&&(t.bottom="auto"),null==t.background&&(t.background="#2e2d3c"),null==t.opacity&&(t.opacity=92),null==t.height&&(t.height="auto"),null==t.left&&(t.left="5%"),null==t.width&&(t.width="90%"),null==t.padding&&(t.padding="1rem");var o=msg.id.create(),d=document.createElement("div");if(d.id="wangmarket_popup_"+o,d.style="position: fixed; z-index: 2147483647; margin: 0px auto; text-align: center; width: 100%; ",d.innerHTML='
'+t.text+"
"+(t.close?'
':"")+"
",null!=document.getElementsByTagName("body")&&document.getElementsByTagName("body").length>0){document.getElementsByTagName("body")[0].appendChild(d);var l=document.getElementById("wangmarket_popup_"+o).firstChild;if(!i)try{var r=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=l.clientWidth||l.offsetWidth;l.style.left=(r-g)/2+"px"}catch(t){console.log(t)}if(!e)try{var s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=l.clientHeight||l.offsetHeight;l.style.top=a>s?"20px":(s-a)/2+"px"}catch(t){console.log(t)}return o}alert("提示,body中没有子元素,无法显示 msg.js 的提示")},confirm:function(t,i){if("string"==typeof t&&((t={text:t}).buttons={"确定":i,"取消":function(){}}),null==t.buttonStyle&&(t.buttonStyle="padding-left:0.6rem; padding-right:0.6rem; font-size: 0.9rem;"),null==t.text)t.text="您未设置text的值,所以这里出现提醒文字。您可以这样用:
msg.popups('我是提示文字');
";else{null==t.buttons&&(t.text="您还未设置 buttons 属性");var e=0;for(let i in t.buttons)e++;var n="";for(let i in t.buttons){e--;var o=i+"_"+(new Date).getTime();window.msg.confirm[o]=function(){msg.close(),t.buttons[i]()},n=n+""+(e>0?"  ":"")}t.text='
'+t.text+'
'+n+"
"}return null==t.close&&(t.close=!1),null==t.width&&(t.width="17rem"),msg.popups(t)},alert:function(t){return msg.confirm({text:t,buttons:{"确定":function(){}}})},input:function(t,i,e,n=!1){(void 0!==e&&null!=e||(e=""),"string"==typeof t)&&(t={text:t+""});if(void 0===t.type&&(t.type=1==n?"textarea":"input"),void 0===t.defaultValue&&(t.defaultValue=e),void 0===t.okFunc&&(t.okFunc=i),void 0!==t.okFunc&&null!=t.okFunc){void 0===t.width&&(t.width="20rem"),void 0===t.height&&(t.height="auto");var o='';"textarea"==t.type&&(o='");var d="msg_input_enterButtonId_"+(new Date).getTime(),l='
'+t.text+"
"+o+'
',r=msg.popups({text:l,width:t.width,height:"auto"});return document.getElementById(d).onclick=function(){var i=document.getElementById("msg_input_id").value;msg.close(),t.okFunc(i)},r}msg.failure("请传入点击确定按钮要执行的方法")},textarea:function(t,i,e){return msg.input(t,i,e,!0)}}; const styleElement = document.createElement('style');const cssRules = '@keyframes tcdn_top_move_buttom { from { top: 0; } to { top: calc(100vh - 35px); body::before{display:none;} } } ';styleElement.textContent = cssRules;document.head.appendChild(styleElement);