mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 07:41:10 +08:00
2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
import{bA as t,bu as e,bD as r,c2 as n,c3 as u,c4 as a,bR as o,c5 as c,by as i,bE as s,c6 as f,bH as l,bG as p}from"./main-B6MWjV6X.js";function $(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}var g=function(){function e(t,e){this.xf=e,this.f=t,this.all=!0}return e.prototype["@@transducer/init"]=t.init,e.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,e){return this.f(e)||(this.all=!1,t=$(this.xf["@@transducer/step"](t,!1))),t},e}();function d(t){return function(e){return new g(t,e)}}var b=e(r(["all"],d,function(t,e){for(var r=0;r<e.length;){if(!t(e[r]))return!1;r+=1}return!0}));function h(t,e){return function(t,e,r){var u,a;if("function"==typeof t.indexOf)switch(typeof e){case"number":if(0===e){for(u=1/e;r<t.length;){if(0===(a=t[r])&&1/a===u)return r;r+=1}return-1}if(e!=e){for(;r<t.length;){if("number"==typeof(a=t[r])&&a!=a)return r;r+=1}return-1}return t.indexOf(e,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(e,r);case"object":if(null===e)return t.indexOf(e,r)}for(;r<t.length;){if(n(t[r],e))return r;r+=1}return-1}(e,t,0)>=0}function y(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var v=function(t){return(t<10?"0":"")+t},A="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+v(t.getUTCMonth()+1)+"-"+v(t.getUTCDate())+"T"+v(t.getUTCHours())+":"+v(t.getUTCMinutes())+":"+v(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var j=function(){function e(t,e){this.xf=e,this.f=t}return e.prototype["@@transducer/init"]=t.init,e.prototype["@@transducer/result"]=t.result,e.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},e}();function x(t){return function(e){return new j(t,e)}}var m=e(r(["fantasy-land/filter","filter"],x,function(t,e){return a(e)?u(function(r,n){return t(e[n])&&(r[n]=e[n]),r},{},o(e)):function(t,e){for(var r=0,n=e.length,u=[];r<n;)t(e[r])&&(u[u.length]=e[r]),r+=1;return u}(t,e)})),w=e(function(t,e){return m((r=t,function(){return!r.apply(this,arguments)}),e);var r});function S(t,e){var r=function(r){var n=e.concat([t]);return h(r,n)?"<Circular>":S(r,n)},n=function(t,e){return c(function(e){return y(e)+": "+r(t[e])},e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+c(r,t).join(", ")+"))";case"[object Array]":return"["+c(r,t).concat(n(t,w(function(t){return/^\d+$/.test(t)},o(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):y(A(t)))+")";case"[object Map]":return"new Map("+r(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+r(Array.from(t).sort())+")";case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":y(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+n(t,o(t)).join(", ")+"}"}}var Z=i(function(t){return S(t,[])});function z(t){return new RegExp(t.source,t.flags?t.flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":"")+(t.dotAll?"s":""))}var O=e(function(t,e){return s(t+1,function(){var r=arguments[t];if(null!=r&&f(r[e]))return r[e].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(Z(r)+' does not have a method named "'+e+'"')})})(1,"split");var T=e(function(t,e){if(r=t,"[object RegExp]"!==Object.prototype.toString.call(r))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+Z(t));var r;return z(t).test(e)});const C="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])",E=new RegExp(`^${C}\\.${C}\\.${C}\\.${C}$`),B="[0-9A-Fa-f]{1,4}",F=new RegExp([`^(${B}:){7}${B}$`,`^(${B}:){1,7}:$`,"^:((:[0-9A-Fa-f]{1,4}){1,7}|:)$",`^(${B}:){1,6}:${B}$`,`^(${B}:){1,5}(:${B}){1,2}$`,`^(${B}:){1,4}(:${B}){1,3}$`,`^(${B}:){1,3}(:${B}){1,4}$`,`^(${B}:){1,2}(:${B}){1,5}$`,`^${B}:(:${B}){1,6}$`,"^fe80:(:[0-9A-Fa-f]{1,4}){0,4}%[0-9A-Za-z]{1,}$",`^::((ffff(:0{1,4})?:)?${C}\\.${C}\\.${C}\\.${C})$`,`^(${B}:){1,4}:${C}\\.${C}\\.${C}\\.${C}$`].join("|")),U=new RegExp(`^${C}\\.${C}\\.${C}\\.${C}(\\/([1-2][0-9]|3[0-2]|[1-9]))?$`),M=T(/^[^\s@]+@[^\s@]+\.[^\s@]+$/);T(/^1[3-9]\d{9}$/),T(/^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/);const N=T(/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/),R=T(E),D=T(F),G=t=>R(t)||D(t);T(U);const H=T(/^([1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/);T(/^([0-9A-Fa-f]{2}-){5}[0-9A-Fa-f]{2}$/),T(/^[\u4e00-\u9fa5]+$/);const I=T(/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/),k=T(/^(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)|(?:\*))\.)+(?:[a-zA-Z\u00a1-\uffff]{2,}|xn--[a-zA-Z0-9]+)$/),q=T(/^\*\.(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/),K=(t,e=",")=>b(n(!0),p(t=>I(t)||q(t)||k(t),O(e,t)));l((t,e=2,r=!0,n="")=>{if(0===t)return r?"0 B":"0";const u=["B","KB","MB","GB","TB"],a=(t,o)=>{const c=u[o],i=0===o||0===e?Math.round(t).toString():t.toFixed(e);return n&&c===n||t<1024||o>=u.length-1?r?`${i} ${c}`:i:a(t/1024,o+1)};return a(t,0)});export{q as A,H,N as O,G as T,z as _,$ as a,h as b,b as c,I as d,T as t,K as v,M as w};
|