@gsc-basic/utils 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # @gsc-basic/utils
2
+
3
+ > Utils for GSC Basic Team
4
+
5
+ **DO NOT use it in your own project if you don't know what it's for**
6
+
7
+ ## 说明
8
+
9
+ 常用的前端工具、方法
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(t){if(Array.isArray(t))return e(t)}function r(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}function o(e,t,n){if(t)i(e.prototype,t);if(n)i(e,n);return e}function u(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function a(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function s(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var i=true;var o=false;var u,a;try{for(n=n.call(e);!(i=(u=n.next()).done);i=true){r.push(u.value);if(t&&r.length===t)break}}catch(e){o=true;a=e}finally{try{if(!i&&n["return"]!=null)n["return"]()}finally{if(o)throw a}}return r}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){u(e,t,n[t])})}return e}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);if(t){r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}n.push.apply(n,r)}return n}function v(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{h(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function p(e,t){if(e==null)return{};var n=y(e,t);var r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++){r=o[i];if(t.indexOf(r)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,r))continue;n[r]=e[r]}}return n}function y(e,t){if(e==null)return{};var n={};var r=Object.keys(e);var i,o;for(o=0;o<r.length;o++){i=r[o];if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function m(e,n){return t(e)||c(e,n)||b(e,n)||l()}function g(e){return n(e)||s(e)||b(e)||d()}function w(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function b(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}var S=Object.create;var E=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var C=function(e,t){for(var n in t)E(e,n,{get:t[n],enumerable:!0})},L=function(e,t,n,r){var i=true,o=false,u=undefined;if(t&&(typeof t==="undefined"?"undefined":w(t))=="object"||typeof t=="function")try{var a=function(){var i=c.value;!_.call(e,i)&&i!==n&&E(e,i,{get:function(){return t[i]},enumerable:!(r=O(t,i))||r.enumerable})};for(var s=A(t)[Symbol.iterator](),c;!(i=(c=s.next()).done);i=true)a()}catch(e){o=true;u=e}finally{try{if(!i&&s.return!=null){s.return()}}finally{if(o){throw u}}}return e};var B=function(e,t,n){return n=e!=null?S(k(e)):{},L(t||!e||!e.__esModule?E(n,"default",{value:e,enumerable:!0}):n,e)},j=function(e){return L(E({},"__esModule",{value:!0}),e)};var P={};C(P,{AesEncryption:function(){return ev},addClass:function(){return ek},addLocationListener:function(){return ex},addResizeListener:function(){return eT},buildBEM:function(){return eo},buildShortUUID:function(){return tk},buildUUID:function(){return tO},createBEM:function(){return eu},createNamespace:function(){return ea},createSearchReg:function(){return en},dataURLtoBlob:function(){return eM},decodeByBase64:function(){return ey},deepMerge:function(){return K},domOffEvent:function(){return ej},domOnEvent:function(){return eB},downloadByBase64:function(){return eq},downloadByData:function(){return eH},downloadByOnlineUrl:function(){return e$},downloadByUrl:function(){return eW},downloadPercent:function(){return eN},enableTransitions:function(){return eb},encryptByBase64:function(){return ep},encryptByMd5:function(){return em},escapeStringRegexp:function(){return ta},extendSlots:function(){return tn},filterTree:function(){return tg},findNode:function(){return tv},findNodeAll:function(){return tp},findPath:function(){return ty},findPathAll:function(){return tm},forEachTree:function(){return tw},getActualWidthOfChars:function(){return er},getBoundingClientRect:function(){return eS},getPopupContainer:function(){return G},getRawRoute:function(){return X},getSlot:function(){return tt},getViewportOffset:function(){return eC},hackCss:function(){return eL},hasClass:function(){return eO},highlightHtml:function(){return eG},ifActivity:function(){return e7},is:function(){return I},isBrowser:function(){return H},isChineseText:function(){return Z},isChrome:function(){return $},isClient:function(){return N},isIterableArray:function(){return F},isMatch:function(){return tu},isObject:function(){return U},isPositiveInteger:function(){return M},isSafari:function(){return q},isServer:function(){return z},isSupportNativeEllipsis:function(){return W},isSupportResizeObserver:function(){return V},isUrl:function(){return x},loadScript:function(){return tr},matcher:function(){return to},openWindow:function(){return Y},regexpMap:function(){return R},removeClass:function(){return e_},removeResizeListener:function(){return eI},setCssVar:function(){return eA},setObjToUrlParams:function(){return Q},treeMap:function(){return tb},treeMapEach:function(){return tS},triggerWindowResize:function(){return eU},unloadScript:function(){return ti},unsetAllProperty:function(){return ee},urlToBase64:function(){return ez},useRafThrottle:function(){return eP},withInstall:function(){return J}});module.exports=j(P);var D=require("lodash-es");var R={mobile:/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,tel:/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,numAndLetter:/^[A-Z0-9]+$/i,password:/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S+$/,email:/^[A-Z0-9\u4E00-\u9FA5]+@[\w-]+(?:\.[\w-]+)+$/i,postalCode:/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,identityCard:/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,ip:/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/,url:/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-][^!@#$%^&*?.\s]{0,64}\.)+[a-z]{2,6}\/?/,httpsUrl:/^https:\/\//,domain:/^([0-9a-z-]+\.)+([a-z]{2,})$/i,plateNumber:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,md5:/^[a-f0-9]{32}$/i,base64:/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([\w!$&',()*+;=\-.~:@/?%\s]*?)\s*$/i,uuid:/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i,version:/^\d+(?:\.\d+){2}$/,videoUrl:/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i,imageUrl:/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,chinese:/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,itcode:/^[a-z]+\d*$/i};var T=Object.prototype.toString;function I(e,t){return T.call(e)==="[object ".concat(t,"]")}function U(e){return e!==null&&I(e,"Object")}function x(e){return R.url.test(e)}function F(e){return Array.isArray(e)&&e.length>0}function M(e){return Number.isInteger(e)&&e>=0}var z=(typeof window==="undefined"?"undefined":w(window))>"u",N=!z,$=N&&window.navigator.userAgent.toLowerCase().includes("chrome"),q=N&&window.navigator.userAgent.toLowerCase().includes("safari"),H=(typeof window==="undefined"?"undefined":w(window))<"u"&&(typeof document==="undefined"?"undefined":w(document))<"u",W=H&&w(document.body.style.lineClamp)<"u",V=H&&(typeof ResizeObserver==="undefined"?"undefined":w(ResizeObserver))<"u",Z=function(e){return R.chinese.test(e)};var J=function(e,t){var n=e;return n.install=function(r){r.component(n.name||n.displayName,e),t&&(r.config.globalProperties[t]=e)},e};function X(e){if(!e)return e;var t=e.matched,n=p(e,["matched"]);return v(f({},n),{matched:t?t.map(function(e){return{meta:e.meta,name:e.name,path:e.path}}):void 0})}function Y(e,t){var n=t||{},r=n.target,i=r===void 0?"__blank":r,o=n.noopener,u=o===void 0?!0:o,a=n.noreferrer,s=a===void 0?!0:a,c=[];u&&c.push("noopener=yes"),s&&c.push("noreferrer=yes"),window.open(e,i,c.join(","))}function K(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"replace";return t?e?(0,D.mergeWith)(e,t,function(e,t){if((0,D.isArray)(t)&&(0,D.isArray)(e))switch(n){case"union":return(0,D.unionWith)(e,t,D.isEqual);case"intersection":return(0,D.intersectionWith)(e,t,D.isEqual);case"concat":return e.concat(t);case"replace":return t;default:throw new Error("Unknown merge array strategy: ".concat(n))}if(U(t)&&U(e))return K(e,t,n)}):t:e}function G(e){var t;return(t=e===null||e===void 0?void 0:e.parentNode)!==null&&t!==void 0?t:document.body}function Q(e,t){if(!F(Object.keys(t)))return e;var n="";for(var r in t)n+="".concat(r,"=").concat(encodeURIComponent(t[r]),"&");return n=n.replace(/&$/,""),/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n}function ee(e){(0,D.isPlainObject)(e)&&Object.keys(e).forEach(function(t){Reflect.deleteProperty(e,t)})}function et(e){return["$","(",")","*","+",".","[","]","?","\\","^","{","}","|"].includes(e)?"\\".concat(e):e}function en(e){var t=[""].concat(g(g(e).map(function(e){return et(e)})),[""]).join(".*");return new RegExp(t,"i")}function er(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var n=t.size,r=n===void 0?14:n,i=t.family,o=i===void 0?getComputedStyle(document.documentElement).getPropertyValue("--vxe-font-family")||"sans-serif":i,u=document.createElement("canvas").getContext("2d");u.font="".concat(r,"px ").concat(o);var a=u.measureText(e),s=Math.abs(a.actualBoundingBoxLeft)+Math.abs(a.actualBoundingBoxRight);return Math.ceil(Math.max(a.width,s))}function ei(e,t){return t?typeof t=="string"?" ".concat(e,"--").concat(t):Array.isArray(t)?t.reduce(function(t,n){return t+ei(e,n)},""):Object.keys(t).reduce(function(n,r){return n+(t[r]?ei(e,r):"")},""):""}function eo(e){return function(t,n){return t&&typeof t!="string"&&(n=t,t=""),t=t?"".concat(e,"__").concat(t):e,"".concat(t).concat(ei(t,n))}}function eu(e,t){return[eo("".concat(t,"-").concat(e))]}function ea(e,t){var n="".concat(t,"-").concat(e);return[n,eo(n)]}var es=require("crypto-js/aes"),ec=B(require("crypto-js/enc-utf8"),1),el=B(require("crypto-js/pad-pkcs7"),1),ed=B(require("crypto-js/mode-ecb"),1),ef=B(require("crypto-js/md5"),1),eh=B(require("crypto-js/enc-base64"),1),ev=/*#__PURE__*/function(){"use strict";function e(t){r(this,e);var n=t.key,i=t.iv;n&&(this.key=(0,ec.parse)(n)),i&&(this.iv=(0,ec.parse)(i))}o(e,[{key:"getOptions",get:function e(){return{mode:ed.default,padding:el.default,iv:this.iv}}},{key:"encryptByAES",value:function e(e){return(0,es.encrypt)(e,this.key,this.getOptions).toString()}},{key:"decryptByAES",value:function e(e){return(0,es.decrypt)(e,this.key,this.getOptions).toString(ec.default)}}]);return e}();function ep(e){return ec.default.parse(e).toString(eh.default)}function ey(e){return eh.default.parse(e).toString(ec.default)}function em(e){return(0,ef.default)(e).toString()}var eg=require("lodash-es"),ew=document.documentElement,eb=function(){return"startViewTransition"in document&&window.matchMedia("(prefers-reduced-motion: no-preference)").matches};function eS(e){return!e||!e.getBoundingClientRect?0:e.getBoundingClientRect()}function eE(e){return(e||"").replace(/^\s+|\s+$/g,"")}function eO(e,t){if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):" ".concat(e.className," ").includes(" ".concat(t," "))}function eA(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ew;n.style.setProperty(e,t)}function ek(e,t){if(!e)return;var n=e.className,r=(t||"").split(" ");for(var i=0,o=r.length;i<o;i++){var u=r[i];u&&(e.classList?e.classList.add(u):eO(e,u)||(n+=" ".concat(u)))}e.classList||(e.className=n)}function e_(e,t){if(!e||!t)return;var n=t.split(" "),r=" ".concat(e.className," ");for(var i=0,o=n.length;i<o;i++){var u=n[i];u&&(e.classList?e.classList.remove(u):eO(e,u)&&(r=r.replace(" ".concat(u," ")," ")))}e.classList||(e.className=eE(r))}function eC(e){var t=document.documentElement,n=t.scrollLeft,r=t.scrollTop,i=t.clientLeft,o=t.clientTop,u=window.scrollX,a=window.scrollY,s=eS(e),c=s.left,l=s.top,d=s.width,f=s.height,h=(u||n)-(i||0),v=(a||r)-(o||0),p=c+u,y=l+a,m=p-h,g=y-v,w=window.document.documentElement.clientWidth,b=window.document.documentElement.clientHeight;return{left:m,top:g,right:w-d-m,bottom:b-f-g,rightIncludeBody:w-m,bottomIncludeBody:b-g}}function eL(e,t){var n=["webkit","Moz","ms","OT"],r={};return n.forEach(function(n){r["".concat(n).concat((0,eg.upperFirst)(e))]=t}),v(f({},r),u({},e,t))}function eB(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}function ej(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}function eP(e){var t=!1;return function(){var n=this;for(var r=arguments.length,i=new Array(r),o=0;o<r;o++){i[o]=arguments[o]}t||(t=!0,window.requestAnimationFrame(function(){e.apply(n,i),t=!1}))}}var eD=B(require("resize-observer-polyfill"),1);function eR(e){var t=true,n=false,r=undefined;try{for(var i=e[Symbol.iterator](),o;!(t=(o=i.next()).done);t=true){var u=o.value;var a=u.target.__resizeListeners__||[];a.length&&a.forEach(function(e){e()})}}catch(e){n=true;r=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(n){throw r}}}}function eT(e,t){z||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new eD.default(eR),e.__ro__.observe(e)),e.__resizeListeners__.push(t))}function eI(e,t){!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.__ro__.disconnect(),e.__ro__=null,e.__resizeListeners__=null))}function eU(){var e=new Event("resize",{bubbles:!0,cancelable:!0});window.dispatchEvent(e)}function ex(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function n(e){var t=window.history[e];return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++){r[i]=arguments[i]}var o=new Event(e);return o.arguments=r,window.dispatchEvent(o),t.apply(this,r)}}return window.history.pushState=n("pushState"),window.history.replaceState=n("replaceState"),window.addEventListener("popstate",e,t),window.addEventListener("hashchange",e,t),window.addEventListener("replaceState",e,t),window.addEventListener("pushState",e,t),{removeListener:function(){window.removeEventListener("popstate",e,t),window.removeEventListener("hashchange",e,t),window.removeEventListener("replaceState",e,t),window.removeEventListener("pushState",e,t)}}}var eF=require("lodash-es");function eM(e){var t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=window.atob(t[1]),i=r.length,o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}function ez(e,t){return new Promise(function(n,r){var i=document.createElement("CANVAS"),o=i.getContext("2d"),u=new Image;u.crossOrigin="",u.onload=function(){if(!i||!o)return r();i.height=u.height,i.width=u.width,o.drawImage(u,0,0);var e=i.toDataURL(t||"image/png");i=null,n(e)},u.src=e})}function eN(e){var t=e.loaded,n=e.total;if(n<=0||(0,eF.isNil)(n))return 0;var r=t/n;return(0,eF.round)((r>1?1:r)*100)}function e$(e,t,n,r){ez(e).then(function(e){eq(e,t,n,r)})}function eq(e,t,n,r){var i=eM(e);eH(i,t,n,r)}function eH(e,t,n,r){var i=(typeof r==="undefined"?"undefined":w(r))<"u"?[r,e]:[e],o=new Blob(i,{type:n||"application/octet-stream"});if(w(window.navigator.msSaveBlob)<"u")window.navigator.msSaveBlob(o,t);else{var u=window.URL.createObjectURL(o),a=document.createElement("a");a.style.display="none",a.href=u,a.setAttribute("download",t),w(a.download)>"u"&&a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(u)}}function eW(e){var t=e.url,n=e.target,r=n===void 0?"_blank":n,i=e.fileName;if(/iP/.test(window.navigator.userAgent))return!1;if($||q){var o=document.createElement("a");return o.href=t,o.download=i||t.substring(t.lastIndexOf("/")+1,t.length),o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),!0}return t.includes("?")||(t+="?download"),Y(t,{target:r}),!0}var eV=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"ig";var r=new RegExp(t,n);return g(e.matchAll(r)).map(function(e){return{index:e.index,subString:e[0]}})};function eZ(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}var eJ=function(e,t){var n=e;if(!t)return n;var r=t.tagName,i=r===void 0?"mark":r,o=t.bgColor,u=t.color,a=t.style,s=a===void 0?{}:a,c=t.renderHighlightKeyword;if(typeof c=="function")return c(e);s.backgroundColor=o,s.color=u;var l='style="'.concat(Object.keys(s).map(function(e){return"".concat(eZ(e),":").concat(s[e])}).join(";"),'"');return"<".concat(i," ").concat(l,">").concat(n,"</").concat(i,">")},eX=function(e,t){var n="";return t.forEach(function(t){var r=t.start,i=t.end,o=t.option,u=e.slice(r,i),a=eJ(u,o);n+=a,t.subString=a}),n},eY=function(e,t){var n=[];return t.forEach(function(t){var r={keyword:""};typeof t=="string"?r={keyword:t}:r=t;var i=r.keyword,o=r.caseSensitive,u=o===void 0?!0:o,a=eV(e,i,u?"g":"gi"),s={keyword:i,indexList:a,option:r};n.push(s)}),n},eK=function(e,t){var n=eY(e,t),r=[],i=function(e,t){for(var n=0;n<r.length;n++){var i=r[n];if(e>i.start&&e<i.end||e+t>i.start&&e+t<i.end||i.start>e&&i.start<e+t||i.end>e&&i.end<e+t||e===i.start&&e+t===i.end)return-1;if(e+t<=i.start)return n}return r.length};n.forEach(function(e){var t=e.indexList,n=e.option;t.forEach(function(e){var t=e.index,o=e.subString,u={start:t,end:t+o.length,option:n},a=i(t,o.length);a!==-1&&r.splice(a,0,u)})});var o=[];return r.forEach(function(t,n){var i=t.start,u=t.end,a=r[n+1];n===0&&i>0&&o.push({start:0,end:i,subString:e.slice(0,i)}),o.push(v(f({},t),{subString:e.slice(i,u)})),(a===null||a===void 0?void 0:a.start)>u&&o.push({start:u,end:a.start,subString:e.slice(u,a.start)}),n===r.length-1&&u<e.length-1&&o.push({start:u,end:e.length-1,subString:e.slice(u,e.length)})}),o},eG=function(e,t){var n=eK(e,t);return{highText:eX(e,n),highList:n}};var eQ=require("worker-timers"),e0="active",e1="idle",e2="hidden",e4,e6,e3,e5={},e8={attach:function e(e,t){e5[e]||(e5[e]=[]),e5[e].push(t)},fire:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];e5[e]&&e5[e].forEach(function(e){e.apply(void 0,g(t))})},remove:function e(e,t){t||Reflect.deleteProperty(e5,e),e5[e]&&(e5[e]=e5[e].filter(function(e){return t!==e}))},dom:function e(e,t,n){return e3||(e.addEventListener?e3=function(e,t,n){return e.addEventListener(t,n,!1)}:typeof e.attachEvent=="function"?e3=function(e,t,n){return e.attachEvent("on".concat(t),n,!1)}:e3=function(e,t,n){return e["on".concat(t)]=n}),e3(e,t,n)}},e9=/*#__PURE__*/function(){"use strict";function e(t,n,i){var o=this;r(this,e);this.activity=t,this.seconds=n,this.callback=i,this.stopped=!1,this.start(),this.activity.on("statusChanged",function(e){o.stopped===!1&&(e.status===e0?o.start():o.pause())})}o(e,[{key:"start",value:function e(){this.stopped=!1,(0,eQ.clearInterval)(this.token),this.token=(0,eQ.setInterval)(this.callback,this.seconds*1e3)}},{key:"stop",value:function e(){this.stopped=!0,(0,eQ.clearInterval)(this.token)}},{key:"resume",value:function e(){this.start()}},{key:"pause",value:function e(){this.stop()}}]);return e}(),e7=/*#__PURE__*/function(){"use strict";function e(){var t=this;r(this,e);if(this.status=e0,this.timers=[],this.idleTime=3e4,this.isLegacyModeOn=!1,document.hidden!==void 0?(e4="hidden",e6="visibilitychange"):document.mozHidden!==void 0?(e4="mozHidden",e6="mozvisibilitychange"):document.msHidden!==void 0?(e4="msHidden",e6="msvisibilitychange"):document.webkitHidden!==void 0&&(e4="webkitHidden",e6="webkitvisibilitychange"),e4===void 0)this.legacyMode();else{var n=function(){document[e4]?t.blur():t.focus()};n(),e8.dom(document,e6,n)}this.startIdleTimer(),this.trackIdleStatus()}o(e,[{key:"legacyMode",value:function e(){var e=this;this.isLegacyModeOn||(e8.dom(window,"blur",function(){return e.blur()}),e8.dom(window,"focus",function(){return e.focus()}),this.isLegacyModeOn=!0)}},{key:"startIdleTimer",value:function e(e){var t=this;a(e,MouseEvent)&&e.movementX===0&&e.movementY===0||(this.timers.map(eQ.clearTimeout),this.timers.length=0,this.status===e1&&this.wakeUp(),this.idleStartedTime=+new Date,this.timers.push((0,eQ.setTimeout)(function(){if(t.status===e0||t.status===e2)return t.idle()},this.idleTime)))}},{key:"trackIdleStatus",value:function e(){e8.dom(document,"mousemove",this.startIdleTimer.bind(this)),e8.dom(document,"mousedown",this.startIdleTimer.bind(this)),e8.dom(document,"keyup",this.startIdleTimer.bind(this)),e8.dom(document,"touchstart",this.startIdleTimer.bind(this)),e8.dom(window,"scroll",this.startIdleTimer.bind(this)),this.focus(this.startIdleTimer.bind(this))}},{key:"on",value:function e(e,t){return e8.attach(e,t),this}},{key:"off",value:function e(e,t){return e8.remove(e,t),this}},{key:"setIdleDuration",value:function e(e){return this.idleTime=e*1e3,this.startIdleTimer(),this}},{key:"getIdleDuration",value:function e(){return this.idleTime}},{key:"getIdleInfo",value:function e(){var e=+new Date,t;if(this.status===e1)t={isIdle:!0,idleFor:e-this.idleStartedTime,timeLeft:0,timeLeftPer:100};else{var n=this.idleStartedTime+this.idleTime-e;t={isIdle:!1,idleFor:e-this.idleStartedTime,timeLeft:n,timeLeftPer:Number.parseFloat((100-n*100/this.idleTime).toFixed(2))}}return t}},{key:"idle",value:function e(e){return e?this.on("idle",e):(this.status=e1,e8.fire("idle"),e8.fire("statusChanged",[{status:this.status}])),this}},{key:"blur",value:function e(e){return e?this.on("blur",e):(this.status=e2,e8.fire("blur"),e8.fire("statusChanged",[{status:this.status}])),this}},{key:"focus",value:function e(e){return e?this.on("focus",e):this.status!==e0&&(this.status=e0,e8.fire("focus"),e8.fire("wakeUp"),e8.fire("statusChanged",[{status:this.status}])),this}},{key:"wakeUp",value:function e(e){return e?this.on("wakeUp",e):this.status!==e0&&(this.status=e0,e8.fire("wakeUp"),e8.fire("statusChanged",[{status:this.status}])),this}},{key:"onEvery",value:function e(e,t){return new e9(this,e,t)}},{key:"now",value:function e(e){return e!==void 0?this.status===e:this.status===e0}}]);return e}();var te=require("lodash-es");function tt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;if(!e||!Reflect.has(e,t)||!(0,te.isFunction)(e[t]))return null;var r=e[t];return r?r(n):null}function tn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];var n=Object.keys(e),r={};return n.forEach(function(n){if(t.includes(n))return null;r[n]=function(t){return tt(e,n,t)}}),r}function tr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.type,r=n===void 0?"text/javascript":n;return new Promise(function(t,n){var i=!1,o=document.querySelector('script[src="'.concat(e,'"]'));if(!o)o=document.createElement("script"),o.type=r,o.async=!0,o.src=e,i=!0;else if(o.hasAttribute("data-loaded")){t({el:o});return}o.addEventListener("error",n),o.addEventListener("abort",n),o.addEventListener("load",function(){o.setAttribute("data-loaded",!0),t({el:o})}),i&&document.head.appendChild(o)})}function ti(e){return new Promise(function(t,n){var r=document.querySelector('script[src="'.concat(e,'"]'));if(!r){n();return}document.head.removeChild(r),t()})}function to(e,t,n){return td(e,t,n,!1)}function tu(e,t,n){return td(e,t,n,!0).length>0}function ta(e){return typeof e!="string"?e:e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ts=new Map;function tc(e,t){if(!Array.isArray(e))switch(typeof e==="undefined"?"undefined":w(e)){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError("Expected '".concat(t,"' to be a string or an array, but got a type of '").concat(typeof e==="undefined"?"undefined":w(e),"'"))}return e.filter(function(e){if(typeof e!="string"){if((typeof e==="undefined"?"undefined":w(e))>"u")return!1;throw new TypeError("Expected '".concat(t,"' to be an array of strings, but found a type of '").concat(typeof e==="undefined"?"undefined":w(e),"' in the array"))}return!0})}function tl(e,t){t=f({caseSensitive:!1},t);var n=e+JSON.stringify(t);if(ts.has(n))return ts.get(n);var r=e[0]==="!";r&&(e=e.slice(1)),e=ta(e).replace(/\\\*/g,"[\\s\\S]*");var i=new RegExp("^".concat(e,"$"),t.caseSensitive?"":"i");return i.negated=r,ts.set(n,i),i}function td(e,t,n,r){if(e=tc(e,"inputs"),t=tc(t,"patterns"),t.length===0)return[];t=t.map(function(e){return tl(e,n)});var i=n||{},o=i.allPatterns,u=[];var a=true,s=false,c=undefined;try{for(var l=e[Symbol.iterator](),d;!(a=(d=l.next()).done);a=true){var f=d.value;var h=void 0,v=g(t).fill(!1);var p=true,y=false,w=undefined;try{for(var b=t.entries()[Symbol.iterator](),S;!(p=(S=b.next()).done);p=true){var E=m(S.value,2),O=E[0],A=E[1];if(A.test(f)&&(v[O]=!0,h=!A.negated,!h))break}}catch(e){y=true;w=e}finally{try{if(!p&&b.return!=null){b.return()}}finally{if(y){throw w}}}if(!(h===!1||h===void 0&&t.some(function(e){return!e.negated})||o&&v.some(function(e,n){return!e&&!t[n].negated}))&&(u.push(f),r))break}}catch(e){s=true;c=e}finally{try{if(!a&&l.return!=null){l.return()}}finally{if(s){throw c}}}return u}var tf={id:"id",children:"children",pid:"pid"},th=function(e){return Object.assign({},tf,e)};function tv(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=th(n);var r=n.children,i=g(e);var o=true,u=false,a=undefined;try{for(var s=i[Symbol.iterator](),c;!(o=(c=s.next()).done);o=true){var l=c.value;var d;if(t(l))return l;l[r]&&(d=i).push.apply(d,g(l[r]))}}catch(e){u=true;a=e}finally{try{if(!o&&s.return!=null){s.return()}}finally{if(u){throw a}}}return null}function tp(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r;n=th(n);var i=n.children,o=g(e),u=[];var a=true,s=false,c=undefined;try{for(var l=o[Symbol.iterator](),d;!(a=(d=l.next()).done);a=true){var f=d.value;t(f)&&u.push(f),f[i]&&(r=o).push.apply(r,g(f[i]))}}catch(e){s=true;c=e}finally{try{if(!a&&l.return!=null){l.return()}}finally{if(s){throw c}}}return u}function ty(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=th(n);var r=[],i=g(e),o=new Set,u=n.children;for(;i.length;){var a;var s=i[0];if(o.has(s))r.pop(),i.shift();else if(o.add(s),s[u]&&(a=i).unshift.apply(a,g(s[u])),r.push(s),t(s))return r}return null}function tm(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=th(n);var r=[],i=g(e),o=[],u=new Set,a=n.children;for(;i.length;){var s;var c=i[0];u.has(c)?(r.pop(),i.shift()):(u.add(c),c[a]&&(s=i).unshift.apply(s,g(c[a])),r.push(c),t(c)&&o.push(g(r)))}return o}function tg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=th(n);var r=n.children;function i(e){return e.map(function(e){return f({},e)}).filter(function(e){return e[r]=e[r]&&i(e[r]),t(e)||e[r]&&e[r].length})}return i(e)}function tw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=th(n);var r=g(e),i=n.children;for(var o=0;o<r.length;o++){var u;if(t(r[o]))return;i&&r[o][i]&&(u=r).splice.apply(u,[o+1,0].concat(g(r[o][i])))}}function tb(e,t){return e.map(function(e){return tS(e,t)})}function tS(e,t){var n=t.children,r=n===void 0?"children":n,i=t.conversion;var o=Array.isArray(e[r])&&e[r].length>0,a=i(e)||{};return o?v(f({},a),u({},r,e[r].map(function(e){return tS(e,{children:r,conversion:i})}))):f({},a)}var tE=require("uuid");function tO(){var e,t;var n;return(n=(t=window.crypto)===null||t===void 0?void 0:(e=t.randomUUID)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:(0,tE.v4)()}var tA=0;function tk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";var t=Date.now(),n=Math.floor(Math.random()*1e9);return tA++,"".concat(e,"_").concat(n).concat(tA).concat(String(t))}0&&(module.exports={AesEncryption:AesEncryption,addClass:addClass,addLocationListener:addLocationListener,addResizeListener:addResizeListener,buildBEM:buildBEM,buildShortUUID:buildShortUUID,buildUUID:buildUUID,createBEM:createBEM,createNamespace:createNamespace,createSearchReg:createSearchReg,dataURLtoBlob:dataURLtoBlob,decodeByBase64:decodeByBase64,deepMerge:deepMerge,domOffEvent:domOffEvent,domOnEvent:domOnEvent,downloadByBase64:downloadByBase64,downloadByData:downloadByData,downloadByOnlineUrl:downloadByOnlineUrl,downloadByUrl:downloadByUrl,downloadPercent:downloadPercent,enableTransitions:enableTransitions,encryptByBase64:encryptByBase64,encryptByMd5:encryptByMd5,escapeStringRegexp:escapeStringRegexp,extendSlots:extendSlots,filterTree:filterTree,findNode:findNode,findNodeAll:findNodeAll,findPath:findPath,findPathAll:findPathAll,forEachTree:forEachTree,getActualWidthOfChars:getActualWidthOfChars,getBoundingClientRect:getBoundingClientRect,getPopupContainer:getPopupContainer,getRawRoute:getRawRoute,getSlot:getSlot,getViewportOffset:getViewportOffset,hackCss:hackCss,hasClass:hasClass,highlightHtml:highlightHtml,ifActivity:ifActivity,is:is,isBrowser:isBrowser,isChineseText:isChineseText,isChrome:isChrome,isClient:isClient,isIterableArray:isIterableArray,isMatch:isMatch,isObject:isObject,isPositiveInteger:isPositiveInteger,isSafari:isSafari,isServer:isServer,isSupportNativeEllipsis:isSupportNativeEllipsis,isSupportResizeObserver:isSupportResizeObserver,isUrl:isUrl,loadScript:loadScript,matcher:matcher,openWindow:openWindow,regexpMap:regexpMap,removeClass:removeClass,removeResizeListener:removeResizeListener,setCssVar:setCssVar,setObjToUrlParams:setObjToUrlParams,treeMap:treeMap,treeMapEach:treeMapEach,triggerWindowResize:triggerWindowResize,unloadScript:unloadScript,unsetAllProperty:unsetAllProperty,urlToBase64:urlToBase64,useRafThrottle:useRafThrottle,withInstall:withInstall});
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ function t(t,e){if(e==null||e>t.length)e=t.length;for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function e(t){if(Array.isArray(t))return t}function n(e){if(Array.isArray(e))return t(e)}function r(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(t,r.key,r)}}function a(t,e,n){if(e)i(t.prototype,e);if(n)i(t,n);return t}function o(t,e,n){if(e in t){Object.defineProperty(t,e,{value:n,enumerable:true,configurable:true,writable:true})}else{t[e]=n}return t}function s(t,e){if(e!=null&&typeof Symbol!=="undefined"&&e[Symbol.hasInstance]){return!!e[Symbol.hasInstance](t)}else{return t instanceof e}}function u(t){if(typeof Symbol!=="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function c(t,e){var n=t==null?null:typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n==null)return;var r=[];var i=true;var a=false;var o,s;try{for(n=n.call(t);!(i=(o=n.next()).done);i=true){r.push(o.value);if(e&&r.length===e)break}}catch(t){a=true;s=t}finally{try{if(!i&&n["return"]!=null)n["return"]()}finally{if(a)throw s}}return r}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))}r.forEach(function(e){o(t,e,n[e])})}return t}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);if(e){r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})}n.push.apply(n,r)}return n}function v(t,e){e=e!=null?e:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(e))}else{h(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function p(t,e){if(t==null)return{};var n=m(t,e);var r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++){r=a[i];if(e.indexOf(r)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,r))continue;n[r]=t[r]}}return n}function m(t,e){if(t==null)return{};var n={};var r=Object.keys(t);var i,a;for(a=0;a<r.length;a++){i=r[a];if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}function y(t,n){return e(t)||c(t,n)||b(t,n)||d()}function g(t){return n(t)||u(t)||b(t)||l()}function w(t){"@swc/helpers - typeof";return t&&typeof Symbol!=="undefined"&&t.constructor===Symbol?"symbol":typeof t}function b(e,n){if(!e)return;if(typeof e==="string")return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor)r=e.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}import{isPlainObject as S,mergeWith as E,isArray as k,isEqual as _,intersectionWith as O,unionWith as A}from"lodash-es";var L={mobile:/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,tel:/^(?:(?:\d{3}-)?\d{8}|(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,numAndLetter:/^[A-Z0-9]+$/i,password:/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S+$/,email:/^[A-Z0-9\u4E00-\u9FA5]+@[\w-]+(?:\.[\w-]+)+$/i,postalCode:/^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/,identityCard:/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[12]\d|30|31)\d{3}[\dX]$/i,ip:/^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/,url:/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-][^!@#$%^&*?.\s]{0,64}\.)+[a-z]{2,6}\/?/,httpsUrl:/^https:\/\//,domain:/^([0-9a-z-]+\.)+([a-z]{2,})$/i,plateNumber:/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,md5:/^[a-f0-9]{32}$/i,base64:/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([\w!$&',()*+;=\-.~:@/?%\s]*?)\s*$/i,uuid:/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i,version:/^\d+(?:\.\d+){2}$/,videoUrl:/^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i,imageUrl:/^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i,chinese:/^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/,itcode:/^[a-z]+\d*$/i};var D=Object.prototype.toString;function j(t,e){return D.call(t)==="[object ".concat(e,"]")}function C(t){return t!==null&&j(t,"Object")}function F(t){return L.url.test(t)}function I(t){return Array.isArray(t)&&t.length>0}function T(t){return Number.isInteger(t)&&t>=0}var P=(typeof window==="undefined"?"undefined":w(window))>"u",x=!P,B=x&&window.navigator.userAgent.toLowerCase().includes("chrome"),$=x&&window.navigator.userAgent.toLowerCase().includes("safari"),z=(typeof window==="undefined"?"undefined":w(window))<"u"&&(typeof document==="undefined"?"undefined":w(document))<"u",R=z&&w(document.body.style.lineClamp)<"u",U=z&&(typeof ResizeObserver==="undefined"?"undefined":w(ResizeObserver))<"u",M=function(t){return L.chinese.test(t)};var N=function(t,e){var n=t;return n.install=function(r){r.component(n.name||n.displayName,t),e&&(r.config.globalProperties[e]=t)},t};function H(t){if(!t)return t;var e=t.matched,n=p(t,["matched"]);return v(f({},n),{matched:e?e.map(function(t){return{meta:t.meta,name:t.name,path:t.path}}):void 0})}function Z(t,e){var n=e||{},r=n.target,i=r===void 0?"__blank":r,a=n.noopener,o=a===void 0?!0:a,s=n.noreferrer,u=s===void 0?!0:s,c=[];o&&c.push("noopener=yes"),u&&c.push("noreferrer=yes"),window.open(t,i,c.join(","))}function W(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"replace";return e?t?E(t,e,function(t,e){if(k(e)&&k(t))switch(n){case"union":return A(t,e,_);case"intersection":return O(t,e,_);case"concat":return t.concat(e);case"replace":return e;default:throw new Error("Unknown merge array strategy: ".concat(n))}if(C(e)&&C(t))return W(t,e,n)}):e:t}function J(t){var e;return(e=t===null||t===void 0?void 0:t.parentNode)!==null&&e!==void 0?e:document.body}function V(t,e){if(!I(Object.keys(e)))return t;var n="";for(var r in e)n+="".concat(r,"=").concat(encodeURIComponent(e[r]),"&");return n=n.replace(/&$/,""),/\?$/.test(t)?t+n:t.replace(/\/?$/,"?")+n}function q(t){S(t)&&Object.keys(t).forEach(function(e){Reflect.deleteProperty(t,e)})}function X(t){return["$","(",")","*","+",".","[","]","?","\\","^","{","}","|"].includes(t)?"\\".concat(t):t}function Y(t){var e=[""].concat(g(g(t).map(function(t){return X(t)})),[""]).join(".*");return new RegExp(e,"i")}function G(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var n=e.size,r=n===void 0?14:n,i=e.family,a=i===void 0?getComputedStyle(document.documentElement).getPropertyValue("--vxe-font-family")||"sans-serif":i,o=document.createElement("canvas").getContext("2d");o.font="".concat(r,"px ").concat(a);var s=o.measureText(t),u=Math.abs(s.actualBoundingBoxLeft)+Math.abs(s.actualBoundingBoxRight);return Math.ceil(Math.max(s.width,u))}function K(t,e){return e?typeof e=="string"?" ".concat(t,"--").concat(e):Array.isArray(e)?e.reduce(function(e,n){return e+K(t,n)},""):Object.keys(e).reduce(function(n,r){return n+(e[r]?K(t,r):"")},""):""}function Q(t){return function(e,n){return e&&typeof e!="string"&&(n=e,e=""),e=e?"".concat(t,"__").concat(e):t,"".concat(e).concat(K(e,n))}}function tt(t,e){return[Q("".concat(e,"-").concat(t))]}function te(t,e){var n="".concat(e,"-").concat(t);return[n,Q(n)]}import{encrypt as tn,decrypt as tr}from"crypto-js/aes";import ti,{parse as ta}from"crypto-js/enc-utf8";import to from"crypto-js/pad-pkcs7";import ts from"crypto-js/mode-ecb";import tu from"crypto-js/md5";import tc from"crypto-js/enc-base64";var td=/*#__PURE__*/function(){"use strict";function t(e){r(this,t);var n=e.key,i=e.iv;n&&(this.key=ta(n)),i&&(this.iv=ta(i))}a(t,[{key:"getOptions",get:function t(){return{mode:ts,padding:to,iv:this.iv}}},{key:"encryptByAES",value:function t(t){return tn(t,this.key,this.getOptions).toString()}},{key:"decryptByAES",value:function t(t){return tr(t,this.key,this.getOptions).toString(ti)}}]);return t}();function tl(t){return ti.parse(t).toString(tc)}function tf(t){return tc.parse(t).toString(ti)}function th(t){return tu(t).toString()}import{upperFirst as tv}from"lodash-es";var tp=document.documentElement,tm=function(){return"startViewTransition"in document&&window.matchMedia("(prefers-reduced-motion: no-preference)").matches};function ty(t){return!t||!t.getBoundingClientRect?0:t.getBoundingClientRect()}function tg(t){return(t||"").replace(/^\s+|\s+$/g,"")}function tw(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):" ".concat(t.className," ").includes(" ".concat(e," "))}function tb(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tp;n.style.setProperty(t,e)}function tS(t,e){if(!t)return;var n=t.className,r=(e||"").split(" ");for(var i=0,a=r.length;i<a;i++){var o=r[i];o&&(t.classList?t.classList.add(o):tw(t,o)||(n+=" ".concat(o)))}t.classList||(t.className=n)}function tE(t,e){if(!t||!e)return;var n=e.split(" "),r=" ".concat(t.className," ");for(var i=0,a=n.length;i<a;i++){var o=n[i];o&&(t.classList?t.classList.remove(o):tw(t,o)&&(r=r.replace(" ".concat(o," ")," ")))}t.classList||(t.className=tg(r))}function tk(t){var e=document.documentElement,n=e.scrollLeft,r=e.scrollTop,i=e.clientLeft,a=e.clientTop,o=window.scrollX,s=window.scrollY,u=ty(t),c=u.left,d=u.top,l=u.width,f=u.height,h=(o||n)-(i||0),v=(s||r)-(a||0),p=c+o,m=d+s,y=p-h,g=m-v,w=window.document.documentElement.clientWidth,b=window.document.documentElement.clientHeight;return{left:y,top:g,right:w-l-y,bottom:b-f-g,rightIncludeBody:w-y,bottomIncludeBody:b-g}}function t_(t,e){var n=["webkit","Moz","ms","OT"],r={};return n.forEach(function(n){r["".concat(n).concat(tv(t))]=e}),v(f({},r),o({},t,e))}function tO(t,e,n){t&&e&&n&&t.addEventListener(e,n,!1)}function tA(t,e,n){t&&e&&n&&t.removeEventListener(e,n,!1)}function tL(t){var e=!1;return function(){var n=this;for(var r=arguments.length,i=new Array(r),a=0;a<r;a++){i[a]=arguments[a]}e||(e=!0,window.requestAnimationFrame(function(){t.apply(n,i),e=!1}))}}import tD from"resize-observer-polyfill";function tj(t){var e=true,n=false,r=undefined;try{for(var i=t[Symbol.iterator](),a;!(e=(a=i.next()).done);e=true){var o=a.value;var s=o.target.__resizeListeners__||[];s.length&&s.forEach(function(t){t()})}}catch(t){n=true;r=t}finally{try{if(!e&&i.return!=null){i.return()}}finally{if(n){throw r}}}}function tC(t,e){P||(t.__resizeListeners__||(t.__resizeListeners__=[],t.__ro__=new tD(tj),t.__ro__.observe(t)),t.__resizeListeners__.push(e))}function tF(t,e){!t||!t.__resizeListeners__||(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||(t.__ro__.disconnect(),t.__ro__=null,t.__resizeListeners__=null))}function tI(){var t=new Event("resize",{bubbles:!0,cancelable:!0});window.dispatchEvent(t)}function tT(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function n(t){var e=window.history[t];return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++){r[i]=arguments[i]}var a=new Event(t);return a.arguments=r,window.dispatchEvent(a),e.apply(this,r)}}return window.history.pushState=n("pushState"),window.history.replaceState=n("replaceState"),window.addEventListener("popstate",t,e),window.addEventListener("hashchange",t,e),window.addEventListener("replaceState",t,e),window.addEventListener("pushState",t,e),{removeListener:function(){window.removeEventListener("popstate",t,e),window.removeEventListener("hashchange",t,e),window.removeEventListener("replaceState",t,e),window.removeEventListener("pushState",t,e)}}}import{round as tP,isNil as tx}from"lodash-es";function tB(t){var e=t.split(","),n=e[0].match(/:(.*?);/)[1],r=window.atob(e[1]),i=r.length,a=new Uint8Array(i);for(;i--;)a[i]=r.charCodeAt(i);return new Blob([a],{type:n})}function t$(t,e){return new Promise(function(n,r){var i=document.createElement("CANVAS"),a=i.getContext("2d"),o=new Image;o.crossOrigin="",o.onload=function(){if(!i||!a)return r();i.height=o.height,i.width=o.width,a.drawImage(o,0,0);var t=i.toDataURL(e||"image/png");i=null,n(t)},o.src=t})}function tz(t){var e=t.loaded,n=t.total;if(n<=0||tx(n))return 0;var r=e/n;return tP((r>1?1:r)*100)}function tR(t,e,n,r){t$(t).then(function(t){tU(t,e,n,r)})}function tU(t,e,n,r){var i=tB(t);tM(i,e,n,r)}function tM(t,e,n,r){var i=(typeof r==="undefined"?"undefined":w(r))<"u"?[r,t]:[t],a=new Blob(i,{type:n||"application/octet-stream"});if(w(window.navigator.msSaveBlob)<"u")window.navigator.msSaveBlob(a,e);else{var o=window.URL.createObjectURL(a),s=document.createElement("a");s.style.display="none",s.href=o,s.setAttribute("download",e),w(s.download)>"u"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(o)}}function tN(t){var e=t.url,n=t.target,r=n===void 0?"_blank":n,i=t.fileName;if(/iP/.test(window.navigator.userAgent))return!1;if(B||$){var a=document.createElement("a");return a.href=e,a.download=i||e.substring(e.lastIndexOf("/")+1,e.length),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),!0}return e.includes("?")||(e+="?download"),Z(e,{target:r}),!0}var tH=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"ig";var r=new RegExp(e,n);return g(t.matchAll(r)).map(function(t){return{index:t.index,subString:t[0]}})};function tZ(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}var tW=function(t,e){var n=t;if(!e)return n;var r=e.tagName,i=r===void 0?"mark":r,a=e.bgColor,o=e.color,s=e.style,u=s===void 0?{}:s,c=e.renderHighlightKeyword;if(typeof c=="function")return c(t);u.backgroundColor=a,u.color=o;var d='style="'.concat(Object.keys(u).map(function(t){return"".concat(tZ(t),":").concat(u[t])}).join(";"),'"');return"<".concat(i," ").concat(d,">").concat(n,"</").concat(i,">")},tJ=function(t,e){var n="";return e.forEach(function(e){var r=e.start,i=e.end,a=e.option,o=t.slice(r,i),s=tW(o,a);n+=s,e.subString=s}),n},tV=function(t,e){var n=[];return e.forEach(function(e){var r={keyword:""};typeof e=="string"?r={keyword:e}:r=e;var i=r.keyword,a=r.caseSensitive,o=a===void 0?!0:a,s=tH(t,i,o?"g":"gi"),u={keyword:i,indexList:s,option:r};n.push(u)}),n},tq=function(t,e){var n=tV(t,e),r=[],i=function(t,e){for(var n=0;n<r.length;n++){var i=r[n];if(t>i.start&&t<i.end||t+e>i.start&&t+e<i.end||i.start>t&&i.start<t+e||i.end>t&&i.end<t+e||t===i.start&&t+e===i.end)return-1;if(t+e<=i.start)return n}return r.length};n.forEach(function(t){var e=t.indexList,n=t.option;e.forEach(function(t){var e=t.index,a=t.subString,o={start:e,end:e+a.length,option:n},s=i(e,a.length);s!==-1&&r.splice(s,0,o)})});var a=[];return r.forEach(function(e,n){var i=e.start,o=e.end,s=r[n+1];n===0&&i>0&&a.push({start:0,end:i,subString:t.slice(0,i)}),a.push(v(f({},e),{subString:t.slice(i,o)})),(s===null||s===void 0?void 0:s.start)>o&&a.push({start:o,end:s.start,subString:t.slice(o,s.start)}),n===r.length-1&&o<t.length-1&&a.push({start:o,end:t.length-1,subString:t.slice(o,t.length)})}),a},tX=function(t,e){var n=tq(t,e);return{highText:tJ(t,n),highList:n}};import{clearInterval as tY,clearTimeout as tG,setInterval as tK,setTimeout as tQ}from"worker-timers";var t0="active",t1="idle",t2="hidden",t4,t6,t3,t8={},t9={attach:function t(t,e){t8[t]||(t8[t]=[]),t8[t].push(e)},fire:function t(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];t8[t]&&t8[t].forEach(function(t){t.apply(void 0,g(e))})},remove:function t(t,e){e||Reflect.deleteProperty(t8,t),t8[t]&&(t8[t]=t8[t].filter(function(t){return e!==t}))},dom:function t(t,e,n){return t3||(t.addEventListener?t3=function(t,e,n){return t.addEventListener(e,n,!1)}:typeof t.attachEvent=="function"?t3=function(t,e,n){return t.attachEvent("on".concat(e),n,!1)}:t3=function(t,e,n){return t["on".concat(e)]=n}),t3(t,e,n)}},t5=/*#__PURE__*/function(){"use strict";function t(e,n,i){var a=this;r(this,t);this.activity=e,this.seconds=n,this.callback=i,this.stopped=!1,this.start(),this.activity.on("statusChanged",function(t){a.stopped===!1&&(t.status===t0?a.start():a.pause())})}a(t,[{key:"start",value:function t(){this.stopped=!1,tY(this.token),this.token=tK(this.callback,this.seconds*1e3)}},{key:"stop",value:function t(){this.stopped=!0,tY(this.token)}},{key:"resume",value:function t(){this.start()}},{key:"pause",value:function t(){this.stop()}}]);return t}(),t7=/*#__PURE__*/function(){"use strict";function t(){var e=this;r(this,t);if(this.status=t0,this.timers=[],this.idleTime=3e4,this.isLegacyModeOn=!1,document.hidden!==void 0?(t4="hidden",t6="visibilitychange"):document.mozHidden!==void 0?(t4="mozHidden",t6="mozvisibilitychange"):document.msHidden!==void 0?(t4="msHidden",t6="msvisibilitychange"):document.webkitHidden!==void 0&&(t4="webkitHidden",t6="webkitvisibilitychange"),t4===void 0)this.legacyMode();else{var n=function(){document[t4]?e.blur():e.focus()};n(),t9.dom(document,t6,n)}this.startIdleTimer(),this.trackIdleStatus()}a(t,[{key:"legacyMode",value:function t(){var t=this;this.isLegacyModeOn||(t9.dom(window,"blur",function(){return t.blur()}),t9.dom(window,"focus",function(){return t.focus()}),this.isLegacyModeOn=!0)}},{key:"startIdleTimer",value:function t(t){var e=this;s(t,MouseEvent)&&t.movementX===0&&t.movementY===0||(this.timers.map(tG),this.timers.length=0,this.status===t1&&this.wakeUp(),this.idleStartedTime=+new Date,this.timers.push(tQ(function(){if(e.status===t0||e.status===t2)return e.idle()},this.idleTime)))}},{key:"trackIdleStatus",value:function t(){t9.dom(document,"mousemove",this.startIdleTimer.bind(this)),t9.dom(document,"mousedown",this.startIdleTimer.bind(this)),t9.dom(document,"keyup",this.startIdleTimer.bind(this)),t9.dom(document,"touchstart",this.startIdleTimer.bind(this)),t9.dom(window,"scroll",this.startIdleTimer.bind(this)),this.focus(this.startIdleTimer.bind(this))}},{key:"on",value:function t(t,e){return t9.attach(t,e),this}},{key:"off",value:function t(t,e){return t9.remove(t,e),this}},{key:"setIdleDuration",value:function t(t){return this.idleTime=t*1e3,this.startIdleTimer(),this}},{key:"getIdleDuration",value:function t(){return this.idleTime}},{key:"getIdleInfo",value:function t(){var t=+new Date,e;if(this.status===t1)e={isIdle:!0,idleFor:t-this.idleStartedTime,timeLeft:0,timeLeftPer:100};else{var n=this.idleStartedTime+this.idleTime-t;e={isIdle:!1,idleFor:t-this.idleStartedTime,timeLeft:n,timeLeftPer:Number.parseFloat((100-n*100/this.idleTime).toFixed(2))}}return e}},{key:"idle",value:function t(t){return t?this.on("idle",t):(this.status=t1,t9.fire("idle"),t9.fire("statusChanged",[{status:this.status}])),this}},{key:"blur",value:function t(t){return t?this.on("blur",t):(this.status=t2,t9.fire("blur"),t9.fire("statusChanged",[{status:this.status}])),this}},{key:"focus",value:function t(t){return t?this.on("focus",t):this.status!==t0&&(this.status=t0,t9.fire("focus"),t9.fire("wakeUp"),t9.fire("statusChanged",[{status:this.status}])),this}},{key:"wakeUp",value:function t(t){return t?this.on("wakeUp",t):this.status!==t0&&(this.status=t0,t9.fire("wakeUp"),t9.fire("statusChanged",[{status:this.status}])),this}},{key:"onEvery",value:function t(t,e){return new t5(this,t,e)}},{key:"now",value:function t(t){return t!==void 0?this.status===t:this.status===t0}}]);return t}();import{isFunction as et}from"lodash-es";function ee(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;if(!t||!Reflect.has(t,e)||!et(t[e]))return null;var r=t[e];return r?r(n):null}function en(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];var n=Object.keys(t),r={};return n.forEach(function(n){if(e.includes(n))return null;r[n]=function(e){return ee(t,n,e)}}),r}function er(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.type,r=n===void 0?"text/javascript":n;return new Promise(function(e,n){var i=!1,a=document.querySelector('script[src="'.concat(t,'"]'));if(!a)a=document.createElement("script"),a.type=r,a.async=!0,a.src=t,i=!0;else if(a.hasAttribute("data-loaded")){e({el:a});return}a.addEventListener("error",n),a.addEventListener("abort",n),a.addEventListener("load",function(){a.setAttribute("data-loaded",!0),e({el:a})}),i&&document.head.appendChild(a)})}function ei(t){return new Promise(function(e,n){var r=document.querySelector('script[src="'.concat(t,'"]'));if(!r){n();return}document.head.removeChild(r),e()})}function ea(t,e,n){return el(t,e,n,!1)}function eo(t,e,n){return el(t,e,n,!0).length>0}function es(t){return typeof t!="string"?t:t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var eu=new Map;function ec(t,e){if(!Array.isArray(t))switch(typeof t==="undefined"?"undefined":w(t)){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError("Expected '".concat(e,"' to be a string or an array, but got a type of '").concat(typeof t==="undefined"?"undefined":w(t),"'"))}return t.filter(function(t){if(typeof t!="string"){if((typeof t==="undefined"?"undefined":w(t))>"u")return!1;throw new TypeError("Expected '".concat(e,"' to be an array of strings, but found a type of '").concat(typeof t==="undefined"?"undefined":w(t),"' in the array"))}return!0})}function ed(t,e){e=f({caseSensitive:!1},e);var n=t+JSON.stringify(e);if(eu.has(n))return eu.get(n);var r=t[0]==="!";r&&(t=t.slice(1)),t=es(t).replace(/\\\*/g,"[\\s\\S]*");var i=new RegExp("^".concat(t,"$"),e.caseSensitive?"":"i");return i.negated=r,eu.set(n,i),i}function el(t,e,n,r){if(t=ec(t,"inputs"),e=ec(e,"patterns"),e.length===0)return[];e=e.map(function(t){return ed(t,n)});var i=n||{},a=i.allPatterns,o=[];var s=true,u=false,c=undefined;try{for(var d=t[Symbol.iterator](),l;!(s=(l=d.next()).done);s=true){var f=l.value;var h=void 0,v=g(e).fill(!1);var p=true,m=false,w=undefined;try{for(var b=e.entries()[Symbol.iterator](),S;!(p=(S=b.next()).done);p=true){var E=y(S.value,2),k=E[0],_=E[1];if(_.test(f)&&(v[k]=!0,h=!_.negated,!h))break}}catch(t){m=true;w=t}finally{try{if(!p&&b.return!=null){b.return()}}finally{if(m){throw w}}}if(!(h===!1||h===void 0&&e.some(function(t){return!t.negated})||a&&v.some(function(t,n){return!t&&!e[n].negated}))&&(o.push(f),r))break}}catch(t){u=true;c=t}finally{try{if(!s&&d.return!=null){d.return()}}finally{if(u){throw c}}}return o}var ef={id:"id",children:"children",pid:"pid"},eh=function(t){return Object.assign({},ef,t)};function ev(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=eh(n);var r=n.children,i=g(t);var a=true,o=false,s=undefined;try{for(var u=i[Symbol.iterator](),c;!(a=(c=u.next()).done);a=true){var d=c.value;var l;if(e(d))return d;d[r]&&(l=i).push.apply(l,g(d[r]))}}catch(t){o=true;s=t}finally{try{if(!a&&u.return!=null){u.return()}}finally{if(o){throw s}}}return null}function ep(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r;n=eh(n);var i=n.children,a=g(t),o=[];var s=true,u=false,c=undefined;try{for(var d=a[Symbol.iterator](),l;!(s=(l=d.next()).done);s=true){var f=l.value;e(f)&&o.push(f),f[i]&&(r=a).push.apply(r,g(f[i]))}}catch(t){u=true;c=t}finally{try{if(!s&&d.return!=null){d.return()}}finally{if(u){throw c}}}return o}function em(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=eh(n);var r=[],i=g(t),a=new Set,o=n.children;for(;i.length;){var s;var u=i[0];if(a.has(u))r.pop(),i.shift();else if(a.add(u),u[o]&&(s=i).unshift.apply(s,g(u[o])),r.push(u),e(u))return r}return null}function ey(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=eh(n);var r=[],i=g(t),a=[],o=new Set,s=n.children;for(;i.length;){var u;var c=i[0];o.has(c)?(r.pop(),i.shift()):(o.add(c),c[s]&&(u=i).unshift.apply(u,g(c[s])),r.push(c),e(c)&&a.push(g(r)))}return a}function eg(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=eh(n);var r=n.children;function i(t){return t.map(function(t){return f({},t)}).filter(function(t){return t[r]=t[r]&&i(t[r]),e(t)||t[r]&&t[r].length})}return i(t)}function ew(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};n=eh(n);var r=g(t),i=n.children;for(var a=0;a<r.length;a++){var o;if(e(r[a]))return;i&&r[a][i]&&(o=r).splice.apply(o,[a+1,0].concat(g(r[a][i])))}}function eb(t,e){return t.map(function(t){return eS(t,e)})}function eS(t,e){var n=e.children,r=n===void 0?"children":n,i=e.conversion;var a=Array.isArray(t[r])&&t[r].length>0,s=i(t)||{};return a?v(f({},s),o({},r,t[r].map(function(t){return eS(t,{children:r,conversion:i})}))):f({},s)}import{v4 as eE}from"uuid";function ek(){var t,e;var n;return(n=(e=window.crypto)===null||e===void 0?void 0:(t=e.randomUUID)===null||t===void 0?void 0:t.call(e))!==null&&n!==void 0?n:eE()}var e_=0;function eO(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";var e=Date.now(),n=Math.floor(Math.random()*1e9);return e_++,"".concat(t,"_").concat(n).concat(e_).concat(String(e))}export{td as AesEncryption,tS as addClass,tT as addLocationListener,tC as addResizeListener,Q as buildBEM,eO as buildShortUUID,ek as buildUUID,tt as createBEM,te as createNamespace,Y as createSearchReg,tB as dataURLtoBlob,tf as decodeByBase64,W as deepMerge,tA as domOffEvent,tO as domOnEvent,tU as downloadByBase64,tM as downloadByData,tR as downloadByOnlineUrl,tN as downloadByUrl,tz as downloadPercent,tm as enableTransitions,tl as encryptByBase64,th as encryptByMd5,es as escapeStringRegexp,en as extendSlots,eg as filterTree,ev as findNode,ep as findNodeAll,em as findPath,ey as findPathAll,ew as forEachTree,G as getActualWidthOfChars,ty as getBoundingClientRect,J as getPopupContainer,H as getRawRoute,ee as getSlot,tk as getViewportOffset,t_ as hackCss,tw as hasClass,tX as highlightHtml,t7 as ifActivity,j as is,z as isBrowser,M as isChineseText,B as isChrome,x as isClient,I as isIterableArray,eo as isMatch,C as isObject,T as isPositiveInteger,$ as isSafari,P as isServer,R as isSupportNativeEllipsis,U as isSupportResizeObserver,F as isUrl,er as loadScript,ea as matcher,Z as openWindow,L as regexpMap,tE as removeClass,tF as removeResizeListener,tb as setCssVar,V as setObjToUrlParams,eb as treeMap,eS as treeMapEach,tI as triggerWindowResize,ei as unloadScript,q as unsetAllProperty,t$ as urlToBase64,tL as useRafThrottle,N as withInstall};
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@gsc-basic/utils",
3
+ "type": "module",
4
+ "version": "1.0.0",
5
+ "description": "Web Dev Utils for GSC Basic Team",
6
+ "author": "wangll47 <wangll47@lenovo.com>",
7
+ "license": "UNLICENSED",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://gitlab.xpaas.lenovo.com/tsd-basic/gsc-frontend-config.git"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public",
14
+ "registry": "https://registry.npmjs.com/"
15
+ },
16
+ "keywords": [
17
+ "GSC Basic",
18
+ "utils",
19
+ "tools"
20
+ ],
21
+ "exports": {
22
+ ".": {
23
+ "import": "./dist/index.js",
24
+ "require": "./dist/index.cjs"
25
+ }
26
+ },
27
+ "main": "./dist/index.js",
28
+ "files": [
29
+ "./dist"
30
+ ],
31
+ "peerDependencies": {},
32
+ "dependencies": {
33
+ "crypto-js": "^4.2.0",
34
+ "lodash-es": "^4.17.21",
35
+ "resize-observer-polyfill": "^1.5.1",
36
+ "uuid": "^11.0.3",
37
+ "worker-timers": "^8.0.11"
38
+ },
39
+ "scripts": {
40
+ "build": "tsup --minify --target es5",
41
+ "outdated": "pnpm outdated",
42
+ "clean": "rimraf ./dist"
43
+ }
44
+ }