import"./vue.runtime.esm-bundler-DpGzKKN4.js";import{t as e}from"./message-box-DHGKoTag.js";import{n as t}from"./request-CWxGgYu0.js";function n(e){return t({url:`/file.svc?cmd=download`,method:`post`,data:e})}function r(e,t){if(!i(Reflect.ownKeys(e),Reflect.ownKeys(t)))return!1;for(let n in e)if(e.hasOwnProperty(n)&&!l(e[n],t[n]))return!1;return!0}function i(e,t){return e.length==t.length?(e.forEach((e,n)=>{if(!l(e,t[n]))return!1}),!0):!1}function a(e,t){return e.getTime()===t.getTime()}function o(e,t){return e.toString()===t.toString()}function s(e,t){return e===t}function c(e){return e===EventTarget.prototype?!0:e?c(e.__proto__):!1}function l(e,t){let n=Object.prototype.toString.call(e);if(n!==Object.prototype.toString.call(t)||c(e)||c(t))return!1;switch(n){case`[object Object]`:return r(e,t);case`[object Function]`:return!1;case`[object Array]`:return i(e,t);case`[object Date]`:return a(e,t);case`[object RegExp]`:return o(e,t);default:return s(e,t)}}var u=(e,t,n)=>{let r=new Date().getTime(),i=null,a=n||!1;return function(...o){let s=new Date().getTime(),c=this,l=s-r;r=s,clearTimeout(i);let u=o[0]===`immediate`;if(u&&(o=o.slice(1)),a&&l>t||u)return a=n||!1,e.apply(c,o);i=setTimeout(()=>{e.apply(c,o),a=n||!1},t),a=!0}},d=(function(){var e=document.createElement(`a`);return e.style.cssText=`display: none`,function(t,n){var r=window.URL.createObjectURL(t);e.href=r,e.download=n,document.body.appendChild(e),e.click(),window.URL.revokeObjectURL(r),document.body.removeChild(e)}})(),f=(function(){var e=document.createElement(`a`);return e.style.cssText=`display: none`,function(t,n){e.href=t;let r=new Date().getTime().toString();e.download=n||r,document.body.appendChild(e),e.click(),window.URL.revokeObjectURL(t),document.body.removeChild(e)}})();window.saveAs=d;function p(e,t=`yyyy-MM-dd`){if(!e)return``;if(arguments.length===0)return null;(e+``).length===10&&(e*=1e3),e=new Date(e),/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+``).substr(4-RegExp.$1.length)));let n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(let e in n)if(RegExp(`(${e})`).test(t)){let i=n[e].toString().padStart(2,`0`);t=t.replace(RegExp.$1,RegExp.$1.length===1?i:r(i))}return t;function r(e){return(`00`+e).substr(e.length)}}var m=()=>{if(typeof crypto==`object`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();if(URL&&URL.createObjectURL&&Blob)return URL.createObjectURL(new Blob).split(/[:\/]/g).pop();let e=new Date().getTime(),t=typeof performance<`u`&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,n=>{let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n===`x`?r:r&3|8).toString(16)})},h={encode:e=>encodeURI(e),decode:e=>decodeURI(e)},g=async(e,n=`百度翻译`)=>{if(!e||typeof e!=`string`)return``;let r=[];try{r=(await t({url:`/zxl_rm/translate.svc`,method:`post`,data:{cmd:`getTextAllTranslate`,isUseExternalService:!0,text:e}}))?.data||[]}catch{r=[]}if(!r.length)return``;let i=r.filter(e=>e.source===n);return i.length||(i=r),(i.map((e,t)=>({item:e,originalIndex:t})).sort((e,t)=>t.item.priority===e.item.priority?e.originalIndex-t.originalIndex:t.item.priority-e.item.priority).map(e=>e.item)[0]?.termEn||``).replace(/\s+/g,`_`)},_=t=>{let n=()=>{let e=window.location.hash||``,t=(()=>{let t=e.indexOf(`?`);return t>=0?e.slice(t+1):``})(),n=new URLSearchParams(t),r=n.get(`titleCombined`)||``,i=n.get(`productId`)||``,a=new URLSearchParams;r&&a.set(`titleCombined`,r),i&&a.set(`productId`,i);let o=a.toString(),s=o?`#/product-manage/req/version-manage-v3?${o}`:`#/product-manage/req/version-manage-v3`;window.location.hash=s};e.confirm((t||``).replace(/\\n/g,`<br>`).replace(/\n/g,`<br>`),`错误`,{dangerouslyUseHTMLString:!0,confirmButtonText:`跳转`,type:`primary`,showCancelButton:!1,showClose:!1,closeOnPressEscape:!1,closeOnClickModal:!1,center:!0,confirmButtonClass:`message-box-confim`,cancelButtonClass:`message-box-cancel el-button--primary`}).then(()=>{n()})};function v(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}export{n as a,p as c,g as d,f as i,_ as l,u as n,m as o,d as r,l as s,v as t,h as u};