function comparison(t){return(e,r)=>{const i=e[t],n=r[t];return i<n?-1:i>n?1:0}}function formatTime(t){if(!t||"number"!=typeof t)return"00:00:00";let e=Math.floor(t/3600);e<10&&(e="0"+e),t%=3600;let r=Math.floor(t/60);return r<10&&(r="0"+r),(t%=60)<10&&(t="0"+t),e+":"+r+":"+t}const getDomRect=(t,e)=>new Promise((r=>{const i=wx.createSelectorQuery().in(e);i.select(t).boundingClientRect(),i.exec((t=>{r(t[0]||{})}))})),imagePrefixUrlMethod=t=>{const e="https:";if("string"!=typeof t||""===t.trim())return"";if(t.indexOf("live.polyv.net")>-1||t.indexOf("static.live.polyv.net")>-1||t.indexOf("livestatic.videocc.net")>-1){if(/^http/.test(t)){if(t.indexOf(".net")>-1){return`https://router.polyv.net/proxy/livestatic.videocc.net${t.split(".net")[1]}`}}else if(!/^\/\//.test(t))return`https://router.polyv.net/proxy/livestatic.videocc.net${t}`}else{if(/^\/\//.test(t))return e+t;if(/^\//.test(t))return`https://router.polyv.net/proxy/livestatic.videocc.net${t}`;if(/^(?!\/)/.test(t)&&!/^http/.test(t))return`https://router.polyv.net/proxy/img.videocc.net/uimage/${t.slice(0,1)}/${t}`}return t},prefixUrl=t=>{const e="https:";return"string"!=typeof t||""===t.trim()?"":/^http/.test(t)?t.replace("http:",e):/^\/\//.test(t)?`https:${t}`:t},isPhoneX=t=>-1!==t.indexOf("iPhone X"),isArray=t=>"[object Array]"===Object.prototype.toString.call(t),isString=t=>"string"==typeof t,isFunc=t=>"function"==typeof t,isObj=t=>"[object Object]"===Object.prototype.toString.call(t),returnTime=t=>{const e=new Date(t),r=new Date,i=e.getFullYear(),n=`0${e.getMonth()+1}`.slice(-2),o=`0${e.getDate()}`.slice(-2),s=`0${e.getHours()}`.slice(-2),c=`0${e.getMinutes()}`.slice(-2),l=`0${e.getSeconds()}`.slice(-2);return e.getDate()===r.getDate()?`${s}:${c}:${l}`:`${i}-${n}-${o} ${s}:${c}:${l}`};function isPhoneNO(t){return/^1[3-9]\d{9}$/.test(t)}function throttle(t,e=1e3){let r=0;return(...i)=>{const n=Date.now();n-r>=e&&(t.call(this,...i),r=n)}}export default{comparison:comparison,formatTime:formatTime,getDomRect:getDomRect,imagePrefixUrlMethod:imagePrefixUrlMethod,prefixUrl:prefixUrl,isPhoneX:isPhoneX,isArray:isArray,isString:isString,isFunc:isFunc,isObj:isObj,isPhoneNO:isPhoneNO,returnTime:returnTime,throttle:throttle};