mazey 5.6.2 → 5.6.3
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 +25 -0
- package/lib/index.cjs.js +2 -2
- package/lib/index.d.ts +30 -1
- package/lib/index.esm.js +2 -2
- package/lib/mazey.min.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,6 +132,7 @@ There are some examples maintained by hand below. For more information, please c
|
|
|
132
132
|
- [longestComSubstring](#longestcomsubstring)
|
|
133
133
|
- [longestComSubsequence](#longestcomsubsequence)
|
|
134
134
|
- [Browser Information](#browser-information)
|
|
135
|
+
- [getSystemTheme](#getsystemtheme)
|
|
135
136
|
- [resolveThemePreference](#resolvethemepreference)
|
|
136
137
|
- [setThemePreference](#setthemepreference)
|
|
137
138
|
- [resolveLanguagePreference](#resolvelanguagepreference)
|
|
@@ -1382,6 +1383,30 @@ Output:
|
|
|
1382
1383
|
|
|
1383
1384
|
### Browser Information
|
|
1384
1385
|
|
|
1386
|
+
#### getSystemTheme
|
|
1387
|
+
|
|
1388
|
+
Read the operating system's current `prefers-color-scheme` value directly. The
|
|
1389
|
+
function returns `"light"`, `"dark"`, or `null` when the preference cannot be
|
|
1390
|
+
determined.
|
|
1391
|
+
|
|
1392
|
+
```javascript
|
|
1393
|
+
const systemTheme = getSystemTheme();
|
|
1394
|
+
|
|
1395
|
+
console.log(systemTheme);
|
|
1396
|
+
```
|
|
1397
|
+
|
|
1398
|
+
Possible browser output:
|
|
1399
|
+
|
|
1400
|
+
```text
|
|
1401
|
+
dark
|
|
1402
|
+
```
|
|
1403
|
+
|
|
1404
|
+
This is a one-time synchronous read. It is safe during SSR and does not inspect
|
|
1405
|
+
URL parameters, access project storage, apply a theme, mutate the DOM, or add
|
|
1406
|
+
media-query listeners. Use `resolveThemePreference` when URL, storage, system,
|
|
1407
|
+
and fallback resolution is required. Use `listenMediaQueryChanges` to observe
|
|
1408
|
+
future color-scheme changes.
|
|
1409
|
+
|
|
1385
1410
|
#### resolveThemePreference
|
|
1386
1411
|
|
|
1387
1412
|
Resolve a project-specific website theme without applying it to the page.
|
package/lib/index.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Mazey v5.6.
|
|
2
|
+
* Mazey v5.6.3 https://github.com/chengchuu/mazey
|
|
3
3
|
* (c) 2018-2026 Cheng
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t(t,r){if(t){if("string"==typeof t)return e(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}}function r(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,r)||t(e,r)||function(){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 n(e){try{return Date.prototype.getTime.call(e)}catch(e){return null}}var o=/^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/,i=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;function a(e,t,r,n,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=new Date(0);return u?(c.setUTCFullYear(e,t-1,r),c.setUTCHours(n,o,i,a),Number.isFinite(c.getTime())&&c.getUTCFullYear()===e&&c.getUTCMonth()===t-1&&c.getUTCDate()===r&&c.getUTCHours()===n&&c.getUTCMinutes()===o&&c.getUTCSeconds()===i&&c.getUTCMilliseconds()===a):(c.setFullYear(e,t-1,r),c.setHours(n,o,i,a),Number.isFinite(c.getTime())&&c.getFullYear()===e&&c.getMonth()===t-1&&c.getDate()===r&&c.getHours()===n&&c.getMinutes()===o&&c.getSeconds()===i&&c.getMilliseconds()===a)}function u(e,t,r,n,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=new Date(0);return u.setFullYear(e,t-1,r),u.setHours(n,o,i,a),u}function c(e){if("number"==typeof e){var t=new Date(e);return Number.isFinite(e)&&Number.isFinite(t.getTime())?t:null}if("object"==typeof e&&null!==e){var c=n(e);return null!==c&&Number.isFinite(c)?new Date(c):null}if("string"!=typeof e)return null;var s=e.trim();if(!s)return null;var l=o.exec(s);if(l){var f=r(l.slice(1),6),p=f[0],d=f[1],v=f[2],g=f[3],m=void 0===g?"0":g,h=f[4],y=void 0===h?"0":h,w=f[5],b=r([p,d,v,m,y,void 0===w?"0":w].map(Number),6),x=b[0],S=b[1],E=b[2],T=b[3],O=b[4],A=b[5];return a(x,S,E,T,O,A)?u(x,S,E,T,O,A):null}var j=i.exec(s);if(!j)return null;var _=r(j.slice(1),8),C=_[0],N=_[1],k=_[2],M=_[3],P=_[4],D=_[5],L=void 0===D?"0":D,F=_[6],R=void 0===F?"":F,U=_[7],I=Number("".concat(R,"00").slice(0,3));if(!a(Number(C),Number(N),Number(k),Number(M),Number(P),Number(L),I,!0))return null;if("Z"!==U){var z=Number(U.slice(1,3)),B=Number(U.slice(4,6));if(z>23||B>59)return null}return function(e,t,r,n,o,i,a,u){var c=new Date(0);if(c.setUTCFullYear(e,t-1,r),c.setUTCHours(n,o,i,a),"Z"===u)return c;var s="+"===u[0]?1:-1,l=60*Number(u.slice(1,3))+Number(u.slice(4,6));return new Date(c.getTime()-s*l*60*1e3)}(Number(C),Number(N),Number(k),Number(M),Number(P),Number(L),I,U)}var s=/^(\d{4,})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/;function l(e,t){var r=String(e);return r.length>=t?r:"".concat("0".repeat(t-r.length)).concat(r)}function f(){return Date.now?Date.now():(new Date).getTime()}var p={type:"d"};function d(e){return"string"==typeof e&&/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T"):e}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,o=(n=Object.assign({},p,n)).type;"number"==typeof e&&Number.isFinite(e)||(e=new Date(d(e)).getTime()),"number"==typeof t&&Number.isFinite(t)||(t=new Date(d(t)).getTime());var i=Number(t)-Number(e),a="",u=r(new Array(4).fill(0),4),c=u[0],s=(u[1],u[2],u[3]);if(i>=0)switch(c=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),s=Math.floor(i/1e3),o){case"d":a=c;break;case"text":a=[{value:c=Math.floor(i/1e3/60/60/24),unit:"day"},{value:Math.floor(i/1e3/60/60%24),unit:"hour"},{value:Math.floor(i/1e3/60%60),unit:"minute"},{value:s=Math.floor(i/1e3%60),unit:"second"}].filter(function(e){return e.value>0}).map(function(e){return g(e.value,e.unit)}).join(" ")||g(0,"second");break;default:a=s}return a}function g(e,t){var r=Math.round(10*e)/10,n=1===r?t:"".concat(t,"s");return"".concat(r," ").concat(n)}function m(e,t){var r=Math.max(1,Math.round(e));return"about ".concat(r," ").concat(t).concat(1===r?"":"s")}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd";void 0===e&&(e=new Date);var r=new Date(e);if(!Number.isFinite(r.getTime()))throw new RangeError("Invalid date");var n=r.getHours(),o={yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate()<10?"0"+r.getDate():r.getDate(),HH:n<10?"0"+n:n,hh:(n%12||12)<10?"0"+(n%12||12):n%12||12,mm:r.getMinutes()<10?"0"+r.getMinutes():r.getMinutes(),ss:r.getSeconds()<10?"0"+r.getSeconds():r.getSeconds(),a:n<12?"AM":"PM"},i=t||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var t=o[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),i=i.split(e).join(String(t))}),i}function y(e,t){var r=e.length,n=t.length;if(0===r||0===n)return 0;for(var o=Array.from({length:r},function(){return new Array(n).fill(0)}),i=0,a=0;a<r;++a)for(var u=0;u<n;++u)if(e[a]===t[u]){var c=0;a>0&&u>0&&(c=o[a-1][u-1]),o[a][u]=c+1,i=Math.max(i,o[a][u])}return i}function w(e,t){var r=e.length,n=t.length;if(0===r||0===n)return 0;for(var o=Array.from({length:r},function(){return new Array(n).fill(0)}),i=0;i<r;++i)for(var a=0;a<n;++a)if(e[i]===t[a]){var u=0;i>0&&a>0&&(u=o[i-1][a-1]),o[i][a]=u+1}else{var c=0,s=0;a>0&&(c=o[i][a-1]),i>0&&(s=o[i-1][a]),o[i][a]=Math.max(c,s)}return o[r-1][n-1]}function b(e){return Math.random()<e}function x(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,u,"next",e)}function u(e){x(i,n,o,a,u,"throw",e)}a(void 0)})}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T,O={exports:{}},A={exports:{}};(T=A).exports=function(e,t){this.v=e,this.k=t},T.exports.__esModule=!0,T.exports.default=T.exports;var j=A.exports,_={exports:{}},C={exports:{}};!function(e){function t(r,n,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,o){function i(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(C);var N=C.exports;!function(e){var t=N;function r(){var n,o,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.toStringTag||"@@toStringTag";function c(e,r,i,a){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return t(c,"_invoke",function(e,t,r){var i,a,u,c=0,l=r||[],f=!1,p={p:0,n:0,v:n,a:d,f:d.bind(n,4),d:function(e,t){return i=e,a=0,u=n,p.n=t,s}};function d(e,t){for(a=e,u=t,o=0;!f&&c&&!r&&o<l.length;o++){var r,i=l[o],d=p.p,v=i[2];e>3?(r=v===t)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=n):i[0]<=d&&((r=e<2&&d<i[1])?(a=0,p.v=t,p.n=i[1]):d<v&&(r=e<3||i[0]>t||t>v)&&(i[4]=e,i[5]=t,p.n=v,a=0))}if(r||e>1)return s;throw f=!0,t}return function(r,l,v){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,v),a=l,u=v;(o=a<2?n:u)||!f;){i||(a?a<3?(a>1&&(p.n=-1),d(a,u)):p.n=u:p.v=u);try{if(c=2,i){if(a||(r="next"),o=i[r]){if(!(o=o.call(i,u)))throw TypeError("iterator result is not an object");if(!o.done)return o;u=o.value,a<2&&(a=0)}else 1===a&&(o=i.return)&&o.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=n}else if((o=(f=p.n<0)?u:e.call(t,p))!==s)break}catch(e){i=n,a=1,u=e}finally{c=1}}return{value:o,done:f}}}(e,i,a),!0),c}var s={};function l(){}function f(){}function p(){}o=Object.getPrototypeOf;var d=[][a]?o(o([][a]())):(t(o={},a,function(){return this}),o),v=p.prototype=l.prototype=Object.create(d);function g(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,t(e,u,"GeneratorFunction")),e.prototype=Object.create(v),e}return f.prototype=p,t(v,"constructor",p),t(p,"constructor",f),f.displayName="GeneratorFunction",t(p,u,"GeneratorFunction"),t(v),t(v,u,"Generator"),t(v,a,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:c,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(_);var k=_.exports,M={exports:{}},P={exports:{}},D={exports:{}};!function(e){var t=j,r=N;e.exports=function e(n,o){function i(e,r,a,u){try{var c=n[e](r),s=c.value;return s instanceof t?o.resolve(s.v).then(function(e){i("next",e,a,u)},function(e){i("throw",e,a,u)}):o.resolve(s).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,u)})}catch(e){u(e)}}var a;this.next||(r(e.prototype),r(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(e,t,r){function n(){return new o(function(t,n){i(e,r,t,n)})}return a=a?a.then(n,n):n()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports}(D);var L=D.exports;!function(e){var t=k,r=L;e.exports=function(e,n,o,i,a){return new r(t().w(e,n,o,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports}(P);var F=P.exports;!function(e){var t=F;e.exports=function(e,r,n,o,i){var a=t(e,r,n,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports}(M);var R=M.exports,U={exports:{}};!function(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports}(U);var I=U.exports,z={exports:{}},B={exports:{}};!function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(B);var $=B.exports;!function(e){var t=$.default;e.exports=function(e){if(null!=e){var r=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(t(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports}(z);var H=z.exports;!function(e){var t=j,r=k,n=R,o=F,i=L,a=I,u=H;function c(){var s=r(),l=s.m(c),f=(Object.getPrototypeOf?Object.getPrototypeOf(l):l.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,o,i){return t.resultName=o,r(n.d,u(e),i)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,t,r,n){return s.w(v(e),t,r,n&&n.reverse())},isGeneratorFunction:p,mark:s.m,awrap:function(e,r){return new t(e,r)},AsyncIterator:i,async:function(e,t,r,i,a){return(p(t)?o:n)(v(e),t,r,i,a)},keys:a,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports}(O);var q=(0,O.exports)(),Y=q;try{regeneratorRuntime=q}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=q:Function("r","regeneratorRuntime = r")(q)}var W=E(Y);function V(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var G=Function.prototype.toString.call(Object);function J(e,t,r){var n,o=null===(n=Object.getOwnPropertyDescriptor(t,r))||void 0===n?void 0:n.get;if(!o)return!1;try{return o.call(e),!0}catch(e){return!1}}function Q(e){return null===e||"object"!=typeof e?e:K(e,function(){if("undefined"!=typeof WeakMap)return new WeakMap;var e=[],t=[];return{get:function(r){var n=e.indexOf(r);return-1===n?void 0:t[n]},set:function(r,n){e.push(r),t.push(n)}}}())}function K(e,t){if(null===e||"object"!=typeof e)return e;var r=e,o=t.get(r);if(void 0!==o)return o;var i=n(r);if(null!==i){var a=new Date(i);return t.set(r,a),a}var u=function(e){var t,r=null===(t=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))||void 0===t?void 0:t.get;if(!r)return null;try{return r.call(e)}catch(e){return null}}(r);if(null!==u){var c=e,s=new RegExp(u,function(e){if("string"==typeof e.flags)return e.flags;var t=e,r="";return t.hasIndices&&(r+="d"),e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),e.sticky&&(r+="y"),r}(c));return s.lastIndex=c.lastIndex,t.set(r,s),s}if("undefined"!=typeof ArrayBuffer&&J(r,ArrayBuffer.prototype,"byteLength")){var l=ArrayBuffer.prototype.slice.call(e,0);return t.set(r,l),l}if("undefined"!=typeof SharedArrayBuffer&&J(r,SharedArrayBuffer.prototype,"byteLength")){var f=SharedArrayBuffer.prototype.slice.call(e,0);return t.set(r,f),f}if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)){var p=K(e.buffer,t),d="undefined"!=typeof DataView&&J(r,DataView.prototype,"byteLength")?new DataView(p,e.byteOffset,e.byteLength):new e.constructor(p,e.byteOffset,e.length);return t.set(r,d),d}if("undefined"!=typeof Map&&J(r,Map.prototype,"size")){var v=new Map;return t.set(r,v),Map.prototype.forEach.call(e,function(e,r){v.set(K(r,t),K(e,t))}),v}if("undefined"!=typeof Set&&J(r,Set.prototype,"size")){var g=new Set;return t.set(r,g),Set.prototype.forEach.call(e,function(e){g.add(K(e,t))}),g}var m=Array.isArray(e),h=Object.getPrototypeOf(e),y=function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.prototype.hasOwnProperty.call(t,"constructor")?t.constructor:null;return"function"==typeof r&&Function.prototype.toString.call(r)===G}(r),w=!m&&!y&&function(e){var t=Object.getPrototypeOf(e),r=null==t?void 0:t.constructor;return"function"==typeof r&&-1===Function.prototype.toString.call(r).indexOf("[native code]")}(r);if(!m&&!y&&!w)return t.set(r,e),e;var b=m?new Array(e.length):Object.create(w?Object.prototype:h);return t.set(r,b),function(e){var t=Object.getOwnPropertyNames(e);return"function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t}(r).forEach(function(e){if(!m||"length"!==e){var n=Object.getOwnPropertyDescriptor(r,e);n&&("value"in n&&(n.value=K(n.value,t)),Object.defineProperty(b,e,n))}}),b}function X(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substring(1):t}function ee(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substring(1):t}function te(e){return ee(e)}function re(e){if("string"!=typeof e)throw new TypeError("value must be a string");var t=e.replace(/[^A-Za-z0-9_$]/g,"_").toUpperCase();return/^[A-Za-z_$]/.test(t)?t:"_".concat(t)}function ne(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch(e){}return!1}function oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(!Number.isFinite(e)||e<=0)return"";e=Math.floor(e);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function ie(){return oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:5)}function ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[f(),ie(e||3)];return t[0]+t[1]}function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isNaNAsNumber,n=void 0!==r&&r,o=t.isInfinityAsNumber,i=void 0!==o&&o,a=t.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!n&&isNaN(e)))}function ce(e){var t=null;if(e&&"function"==typeof e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t=e.apply(void 0,n)}return t}function se(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return ce.apply(void 0,[e].concat(r))}function le(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t}function fe(e){var t=Boolean(e),r="object"==typeof e,n="[object Object]"===Object.prototype.toString.call(e);return t&&r&&n}function pe(e){return"boolean"==typeof e}function de(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")}function ve(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).removeNewLine,r=void 0!==t&&t,n="";return e&&(n=e.replace(/<\/?.+?>/g,""),r&&(n=n.replace(/[\r\n]/g,""))),n}function ge(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return t[e]})}function me(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hasDot:!1,dotText:"..."};if(r=Object.assign({hasDot:!1,dotText:"..."},r),""!=e&&e){for(var n=0,o="",i=/[^\x00-\xff]/g,a="",u=e.replace(i,"**").length,c=0;c<u&&(null!=(a=e.charAt(c).toString()).match(i)?n+=2:n++,!(n>t));c++)o+=a;return r.hasDot&&u>t&&(o+=r.dotText),o}return""}function he(e,t){return me(e,t,{hasDot:arguments.length>2&&void 0!==arguments[2]&&arguments[2]})}var ye=["B","KB","MB","GB","TB"];function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.base,n=void 0===r?1024:r,o=t.fractionDigits,i=void 0===o?1:o,a=t.invalidValue,u=void 0===a?"":a;if(!Number.isFinite(e)||e<0||1e3!==n&&1024!==n||!Number.isInteger(i)||i<0||i>20)return u;for(var c=e,s=0;c>=n&&s<ye.length-1;)c/=n,s+=1;return 0===s?"".concat(Number(c.toFixed(i))," ").concat(ye[s]):"".concat(c.toFixed(i)," ").concat(ye[s])}function be(){return(be=S(W.mark(function e(t){var r,n,o,i,a,u,c;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(r="undefined"==typeof crypto?null:crypto)&&r.subtle&&"function"==typeof r.subtle.digest){e.next=1;break}throw new Error("Web Crypto API is not available.");case 1:if(n=t,"string"!=typeof t){e.next=3;break}if("undefined"!=typeof TextEncoder){e.next=2;break}throw new Error("TextEncoder is not available.");case 2:n=(new TextEncoder).encode(t);case 3:return e.next=4,r.subtle.digest("SHA-256",n);case 4:for(o=e.sent,i="",a=new Uint8Array(o),u=0;u<a.length;u++)c=a[u].toString(16),i+=1===c.length?"0".concat(c):c;return e.abrupt("return",i);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function xe(e){return Se.apply(this,arguments)}function Se(){return(Se=S(W.mark(function e(t){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e){setTimeout(function(){e(t)},t)}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ee(){return(Ee=S(W.mark(function e(t){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",xe(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Te="";function Oe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ae(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function je(e,t){var r=e[t];if(void 0!==r&&"string"!=typeof r)throw new TypeError("manifest.".concat(t," must be a string when provided"));return r}function _e(e){if(void 0===e)return{name:""};if("string"==typeof e)return{name:e.trim()};if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError("manifest.author must be a string or object");var t,r=e,n={name:""},o=Oe(["name","email","url"]);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=r[i];if(void 0!==a&&"string"!=typeof a)throw new TypeError("manifest.author.".concat(i," must be a string when provided"));if("string"==typeof a){var u=a.trim();("name"===i||u)&&(n[i]=u)}}}catch(e){o.e(e)}finally{o.f()}return n}function Ce(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function Ne(e){var t=e.indexOf("#"),r=-1===t?e:e.slice(0,t),n=r.indexOf("?"),o=/^(?:[a-z][a-z\d+.-]*:)?\/\//i.test(r)||"/"===r.charAt(0),i=-1===n?o?"":r:r.slice(n+1);return i?i.split("&").reduce(function(e,t){if(!t||-1===t.indexOf("="))return e;var r=t.indexOf("=");return e.push([Ce(t.slice(0,r)),Ce(t.slice(r+1))]),e},[]):[]}function ke(e,t){return Ne(e).filter(function(e){return r(e,1)[0]===t}).map(function(e){return r(e,2)[1]})}var Me=/^(?=.{1,39}$)(?!.*--)[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/,Pe=/^(?=.{1,100}$)(?!\.{1,2}$)[A-Za-z0-9_.-]+$/;function De(){return new Error("The value does not identify one supported GitHub repository")}function Le(e,t){var r=t.replace(/\.git$/i,"");if(!Me.test(e)||!Pe.test(r))throw De();var n="".concat(e,"/").concat(r);return{owner:e,name:r,slug:n,url:"https://github.com/".concat(n)}}function Fe(e){return void 0===e||Number(e)<=65535}function Re(e){var t=e.split(".");return 4===t.length&&t.every(function(e){return/^\d{1,3}$/.test(e)&&(1===e.length||"0"!==e.charAt(0))&&Number(e)<=255})}function Ue(e){var t=e.split("::");if(t.length>2)return!1;var r=2===t.length,n=[];t.forEach(function(e){e&&(n=n.concat(e.split(":")))});for(var o=0,i=0;i<n.length;i++){var a=n[i];if(-1!==a.indexOf(".")){if(i!==n.length-1||!Re(a))return!1;o+=2}else{if(!/^[0-9a-f]{1,4}$/i.test(a))return!1;o+=1}}return r?o<8:8===o}function Ie(e){var t=e.match(/^\[([0-9a-f:.]+)\]$/i);if(t)return Ue(t[1]);if("."===e.charAt(e.length-1)&&(e=e.slice(0,-1)),Re(e))return!0;var r=e.split(".");return!(r.length<2||r.some(function(e){return!e||!/^[a-z\d-]+$/i.test(e)||"-"===e.charAt(0)||"-"===e.charAt(e.length-1)}))&&!/^\d+$/.test(r[r.length-1])}function ze(e){var t=e.match(/^https?:\/\/([^/?#]+)(?:[/?#][^\s<>"`]*)?$/i);if(!t||-1!==t[1].indexOf("@"))return!1;var r=t[1],n=r.match(/^\[([0-9a-f:.]+)\](?::(\d*))?$/i);if(n)return Ue(n[1])&&Fe(n[2]);var o=r.match(/^([^:]+)(?::(\d*))?$/);return!(!o||!Fe(o[2]))&&Ie(o[1])}function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{strict:!0};if("string"!=typeof e||!e||e.trim()!==e)return!1;var r=/^https?:\/\/[^/\\]/i.test(e),n=/^\/\/[^/\\]/.test(e);if(!r&&(t.strict||!n))return!1;var o=n?"http:".concat(e):e;if(!ze(o))return!1;if("function"!=typeof URL)return!0;try{var i=new URL(o);return("http:"===i.protocol||"https:"===i.protocol)&&Ie(i.hostname)&&!i.username&&!i.password}catch(e){try{return new URL("http://example.com"),!1}catch(e){return ze(o)}}}function $e(e){return e.replace(/^http:/,"https:")}function He(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=window.URL;if("function"!=typeof t)return!1;try{var r=new t(e);return Boolean(r.href)}catch(e){return!1}}function qe(r){return function(t){if(Array.isArray(t))return e(t)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||t(r)||function(){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 Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function We(e){var t=function(e,t){if("object"!=Ye(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ye(t)?t:t+""}function Ve(e,t,r){return(t=We(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach(function(t){Ve(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Je={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function Qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ge({},Je),r=Object.assign(Ge({},Je),t),n=r.enabled,o=r.isClosed,i=r.showWrap,a=r.showDate,u=r.locales,c=r.isStringifyObject,s=r.logFn,l=r.errorFn,f=n;!0===o&&(Ke.warn("The options.isClosed is deprecated. Please use options.enabled instead."),f=!1);var p=Object.create(null),d=function(){return(new Date).toLocaleDateString(u,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(t){p[t]=function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];if(f){var u,p,v=e,g=e;if("string"==typeof e&&e.length>=2){var m=e.length;v=":"===e[m-1]?e.substring(0,m-1):e}if(i&&console.log("--- ".concat(v," - begin ---")),a&&(g=e?"".concat(d()," ").concat(e):"".concat(d())),c&&(n=n.map(function(e){return fe(e)?JSON.stringify(e):e})),e||a)(u=console)[t].apply(u,[g].concat(qe(n)));else(p=console)[t].apply(p,qe(n));"log"===t&&s(),"error"===t&&l(),i&&console.log("--- ".concat(v," - end ---"))}}}),p}var Ke=Qe("[Mazey]"),Xe=Qe("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function et(e,t){if(e){if(Array.isArray(t))t.forEach(function(t){t&&e.classList.add(t)});else if(t){for(var r=e.className,n=r.split(/\s+/),o=0;o<n.length;o++)if(n[o]===t)return;var i,a="";""!==r&&(a=" "),i=r+a+t,e.className=i}}else Ke.error("The element is not exist.")}function tt(){var e=window.jQuery||window.$;if(e){var t=e("img");return!(!t||!t.length)&&(t.each(function(){var t=e(this);if(t){var r=t.attr("src");if(r&&"string"==typeof r&&r.length){var n=r.match(/[?&]width=([0-9]+[a-z%]*)/),o=r.match(/[?&]height=([0-9]+[a-z%]*)/);n&&le(n)&&n[1]&&t.width(n[1]),o&&le(o)&&o[1]&&t.height(o[1])}}}),!0)}var r=document.getElementsByTagName("img");return r.length>0&&(Array.from(r).forEach(function(e){var t=e;if(t){var r=t.getAttribute("src");if(r&&"string"==typeof r&&r.length){var n=r.match(/[?&]width=([0-9]+[a-z%]*)/),o=r.match(/[?&]height=([0-9]+[a-z%]*)/);n&&le(n)&&n[1]&&(t.style.width=n[1]),o&&le(o)&&o[1]&&(t.style.height=o[1])}}}),!0)}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)return!1;var r=e.trim();if(!r)return!0===t.allowEmpty;var n=t.root||("undefined"==typeof document?null:document);if(!n)return!1;try{return n.querySelector(r),!0}catch(e){return!1}}function nt(e){return Boolean(e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}function ot(){var e=window.MAZEY_DEFINE_LISTENERS;if(e&&"object"==typeof e)return e;var t=Object.create(null);return window.MAZEY_DEFINE_LISTENERS=t,t}function it(e,t){var r=ot()[e];if(Array.isArray(r))for(var n=r.slice(),o=0,i=n.length;o<i;o++)"function"==typeof n[o]&&(void 0===t?n[o]():n[o](t))}var at="__mazey_cookie_name_encoded__-",ut="__mazey_cookie_value_encoded__-";function ct(e){return"".concat(ut).concat(encodeURIComponent(e))}function st(e){var t=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(e),r=0===e.indexOf(at)||0===e.indexOf(ut);return t&&!r?e:function(e){return"".concat(at).concat(encodeURIComponent(e))}(e)}function lt(e){var t=st(e);return t!==e?[t,e]:[e]}function ft(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){var o=r[n].trim();if(0===o.indexOf(t))return o.substring(t.length)}}function pt(e){for(var t=lt(e),r="1"===ft(ct(e)),n=0;n<t.length;n++){var o=ft(t[n]);if(void 0!==o){if(r)try{return decodeURIComponent(o)}catch(e){return o}return o}}return""}function dt(e){var t=lt(e),r=t.concat(ct(e)),n=new Date;n.setTime(n.getTime()-1);var o=t.some(function(e){return void 0!==ft(e)});return r.forEach(function(e,t){r.indexOf(e)===t&&void 0!==ft(e)&&["".concat(e,"=; expires=").concat(n.toUTCString()),"".concat(e,"=; expires=").concat(n.toUTCString(),"; path=/")].forEach(function(e){document.cookie=e;var t=location.hostname;if(-1!==t.indexOf("."))for(var r=t.split("."),n=0;n<r.length;n++)document.cookie="".concat(e,"; domain=.").concat(r.slice(n).join("."))})}),o&&r.every(function(e){return void 0===ft(e)})}function vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(r),!0).forEach(function(t){Ve(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function mt(e){var t,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""}).id,n=function(){},o=new Promise(function(e,r){t=e,n=r}),i=function(){l(),t("loaded")},a=document.createElement("link");a||n(new Error("Not support create link element"));var u="onload"in a,c=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(a.rel="stylesheet",a.type="text/css",a.href=e,void 0!==r&&(a.id=r),document.getElementsByTagName("head")[0].appendChild(a),c||!u)return setTimeout(function(){f(a,i,0)},1),o;function s(){i()}function l(){a&&(a.onload=a.onerror=a.onreadystatechange=null),a=null}function f(e,t,r){if(e){var n,o=e.sheet;if((r+=1)>3e5)return n=!0,e&&(e=null),void t();if(c)o&&(n=!0);else if(o)try{o.cssRules&&(n=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(n=!0)}setTimeout(function(){n?t():f(e,t,r)},20)}}return u?(a.onload=s,a.onerror=function(){l(),n(new Error("Failed to load CSS: ".concat(e)))}):a.onreadystatechange=function(){a&&/loaded|complete/.test(a.readyState)&&s()},o}var ht={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function yt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt({},ht),r=Object.assign(gt({},ht),t),n=r.id,o=r.callback,i=r.timeout,a=r.isDefer,u=r.isAsync,c=r.isCrossOrigin,s=r.attributes,l=r.cssUrl;if(l){var f=function(e,t){if(!t)return"";if(Be(t))return t;try{var r=new URL(e,location.href);return new URL(t,r).href}catch(r){var n=e.split("/");return n.pop(),"".concat(n.join("/"),"/").concat(t)}}(e,l);f&&mt(f).catch(function(e){console.error("Failed to load CSS from ".concat(f,": ").concat(null==e?void 0:e.message))})}return new Promise(function(t,r){var l=document.createElement("script"),f=!1,p=null,d=function(){l.onload=null,l.onerror=null,l.onreadystatechange=null,null!==p&&(clearTimeout(p),p=null)},v=function(){if(!f){f=!0,d();try{se(o),t("loaded")}catch(e){r(e)}}},g=function(e){f||(f=!0,d(),r(e))};l.type="text/javascript",l.defer=Boolean(a),l.async=Boolean(u),c&&(l.crossOrigin="anonymous"),n&&(l.id=n),s&&Object.keys(s).forEach(function(e){l.setAttribute(e,s[e])}),l.readyState?l.onreadystatechange=function(){"loaded"!==l.readyState&&"complete"!==l.readyState||v()}:l.onload=v,l.onerror=function(){return g(new Error("Failed to load script: ".concat(e)))},l.src=e,i&&(p=setTimeout(function(){return g(new Error("timeout"))},i));var m=document.getElementsByTagName("script")[0];null!=m&&m.parentNode?m.parentNode.insertBefore(l,m):(document.head||document.body||document.documentElement).appendChild(l)})}var wt=new Map;function bt(e){if("undefined"==typeof window)return!1;var t=[],r=window.PerformanceObserver;return!!r&&(le(r.supportedEntryTypes)&&(t=r.supportedEntryTypes),t.includes(e))}function xt(){return St.apply(this,arguments)}function St(){return(St=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().find(function(e){return"first-contentful-paint"===e.name});n&&(t.disconnect(),e(Math.round(n.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Et(){return Tt.apply(this,arguments)}function Tt(){return(Tt=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().find(function(e){return"first-paint"===e.name});n&&(t.disconnect(),e(Math.round(n.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ot(){return(Ot=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("largest-contentful-paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});n&&(t.disconnect(),e(Math.round(n.startTime)))});t.observe({type:"largest-contentful-paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function At(){return(At=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("first-input")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().find(function(e){return"first-input"===e.entryType});if(n){t.disconnect();var o=n.processingStart;e(o?Math.round(n.processingStart-n.startTime):0)}});t.observe({type:"first-input",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function jt(){return(jt=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("layout-shift")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().reduce(function(e,t){var r=0;return ue(t.value)&&(r=t.value),e+r},0);t.disconnect(),e(n)});t.observe({type:"layout-shift",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function _t(){return(_t=S(W.mark(function e(){var t,r;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("navigation")){e.next=1;break}return e.abrupt("return",0);case 1:if(window.performance&&window.performance.getEntriesByType){e.next=2;break}return e.abrupt("return",0);case 2:if(t=window.performance.getEntriesByType("navigation")[0],r=0,t){e.next=3;break}return e.abrupt("return",0);case 3:return r=t.responseStart-t.requestStart,e.abrupt("return",Math.round(r));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ct(){return Ct=S(W.mark(function e(){var t,n,o,i,a,u,c,s,l,f,p,d,v,g,m,h,y,w,b,x,S,E,T,O,A,j,_,C,N,k,M,P,D,L,F,R,U,I,z,B,$,H,q,Y=arguments;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(q=function(e,t){var r=0;return t&&(r=e-t),r},H=function(){var e="";return window.screen&&window.screen.orientation&&"number"==typeof window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e},$=function(){var e="",t=window.navigator;if(t.connection&&t.connection.effectiveType)switch(t.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e},B=function(){var e,t=navigator.userAgent.toLowerCase(),r=t.match(/(ipad)/i)&&"ipad",n=t.match(/iphone os/i)&&"iphone os",o=t.match(/midp/i)&&"midp",i=t.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=t.match(/ucweb/i)&&"ucweb",u=t.match(/android/i)&&"android",c=t.match(/windows ce/i)&&"windows ce",s=t.match(/windows mobile/i)&&"windows mobile";return(e=r||n||o||i||a||u||c||s?n||o||i||a||u||c||s?"phone":r?"ipad":void 0:"pc")||(e=""),e},z=function(){var e="",t=navigator.userAgent,r=t.indexOf("Android")>-1,n=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(r&&(e=(i.match(/\d+\.\d+/g)||[])[0]),n&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e},I=function(){return navigator.userAgent.indexOf("Android")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"},U=function(){if(a){var e=a;j=e.decodedBodySize,_=e.encodedBodySize;var r=a;l=r.unloadEventEnd,f=r.unloadEventStart,p=r.redirectEnd,d=r.redirectStart,v=r.domainLookupEnd,g=r.domainLookupStart,m=r.connectEnd,h=r.connectStart,y=r.secureConnectionStart,w=r.responseStart,b=r.requestStart,x=r.responseEnd,S=r.domContentLoadedEventStart,E=r.loadEventStart,T=r.loadEventEnd,O=r.startTime,A=r.fetchStart}else C&&(l=C.unloadEventEnd,f=C.unloadEventStart,p=C.redirectEnd,d=C.redirectStart,v=C.domainLookupEnd,g=C.domainLookupStart,m=C.connectEnd,h=C.connectStart,y=C.secureConnectionStart,w=C.responseStart,b=C.requestStart,x=C.responseEnd,S=C.domContentLoadedEventStart,E=C.loadEventStart,T=C.loadEventEnd,O=C.navigationStart,A=C.fetchStart);ue(O)?P=O:ue(A)&&(P=A);var n={source:N,os:I(),osVersion:z(),deviceType:B(),network:$(),screenDirection:H(),unloadTime:l-f,redirectTime:p-d,dnsTime:v-g,tcpTime:m-h,sslTime:q(m,y),responseTime:w-b,downloadTime:x-w,firstPaintTime:F,firstContentfulPaintTime:R,domReadyTime:S-P,onloadTime:E-P,whiteTime:w-P,renderTime:T-P,decodedBodySize:j,encodedBodySize:_};Object.keys(n).forEach(function(e){ue(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))}),ue(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var i={};t||Object.keys(n).forEach(function(e){i[te(e)]=n[e]}),Object.keys(i).length?o(i):o(n)},t=Y.length>0&&void 0!==Y[0]&&Y[0],bt("navigation")){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("navigation is not supported")));case 1:if((n=window.performance)&&"function"==typeof n.getEntries&&"function"==typeof n.getEntriesByType){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("performance is not supported")));case 2:if(i=new Promise(function(e){o=e}),a=null,le(u=n.getEntriesByType("navigation"))&&(a=u[0]),c=new Array(19).fill(0),s=r(c,19),l=s[0],f=s[1],p=s[2],d=s[3],v=s[4],g=s[5],m=s[6],h=s[7],y=s[8],w=s[9],b=s[10],x=s[11],S=s[12],E=s[13],T=s[14],O=s[15],A=s[16],j=s[17],_=s[18],C=n.timing,N="",!a){e.next=3;break}N="PerformanceNavigationTiming",j=(k=a).decodedBodySize,_=k.encodedBodySize,l=(M=a).unloadEventEnd,f=M.unloadEventStart,p=M.redirectEnd,d=M.redirectStart,v=M.domainLookupEnd,g=M.domainLookupStart,m=M.connectEnd,h=M.connectStart,y=M.secureConnectionStart,w=M.responseStart,b=M.requestStart,x=M.responseEnd,S=M.domContentLoadedEventStart,E=M.loadEventStart,T=M.loadEventEnd,O=M.startTime,A=M.fetchStart,e.next=5;break;case 3:if(!C){e.next=4;break}N="PerformanceTiming",l=C.unloadEventEnd,f=C.unloadEventStart,p=C.redirectEnd,d=C.redirectStart,v=C.domainLookupEnd,g=C.domainLookupStart,m=C.connectEnd,h=C.connectStart,y=C.secureConnectionStart,w=C.responseStart,b=C.requestStart,x=C.responseEnd,S=C.domContentLoadedEventStart,E=C.loadEventStart,T=C.loadEventEnd,O=C.navigationStart,A=C.fetchStart,e.next=5;break;case 4:return e.abrupt("return",Promise.reject(new Error("NavigationTiming and Timing are not supported")));case 5:if(P=0,!ue(O)){e.next=6;break}P=O,e.next=8;break;case 6:if(!ue(A)){e.next=7;break}P=A,e.next=8;break;case 7:return e.abrupt("return",Promise.reject(new Error("startTime, navigationStart or fetchStart are required")));case 8:return e.next=9,Promise.all([Et(),xt()]);case 9:return D=e.sent,L=r(D,2),F=L[0],R=L[1],ue(T)&&T>0?U():"complete"===document.readyState?window.setTimeout(U,0):window.addEventListener("load",function e(){window.removeEventListener("load",e),window.setTimeout(function(){U()},0)}),e.abrupt("return",i);case 10:case"end":return e.stop()}},e)})),Ct.apply(this,arguments)}function Nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(r),!0).forEach(function(t){Ve(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Mt=Object.freeze(["adsbot-google","ahrefsbot","amazonbot","applebot","baiduspider","bingbot","bingpreview","bytespider","ccbot","chatgpt-user","claudebot","discordbot","dotbot","duckduckbot","facebookexternalhit","facebot","google-inspectiontool","googlebot","googleother","gptbot","linkedinbot","mediapartners-google","mj12bot","perplexitybot","petalbot","semrushbot","slackbot","slurp","storebot-google","telegrambot","twitterbot","whatsapp","yandexbot"]),Pt=Object.freeze(["headlesschrome","phantomjs","slimerjs","selenium","puppeteer","playwright"]);function Dt(){try{return"undefined"==typeof navigator?null:navigator}catch(e){return null}}function Lt(e,t){var r=e.trim().toLowerCase();return t.some(function(e){return r.includes(e)})}function Ft(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:"",colorScheme:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var r=function(e){return e.test(t)},n=function(e){var r="",n=t.match(e);return n&&le(n)&&(r=(r=(r=n.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),r},o="",i="";r(/windows|win32|win64|wow32|wow64/g)?o="windows":r(/macintosh|macintel/g)?o="macos":r(/x11/g)?o="linux":r(/android|adr/g)?o="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(o="ios",r(/ipad/g)?i="ipad":r(/iphone/g)?i="iphone":r(/iwatch/g)?i="iwatch":r(/ipod/g)&&(i="ipod")),e=kt(kt({},e),{},{system:o,appleType:i});var a="";"windows"===o?r(/windows nt 5.0|windows 2000/g)?a="2000":r(/windows nt 5.1|windows xp/g)?a="xp":r(/windows nt 5.2|windows 2003/g)?a="2003":r(/windows nt 6.0|windows vista/g)?a="vista":r(/windows nt 6.1|windows 7/g)?a="7":r(/windows nt 6.2|windows 8/g)?a="8":r(/windows nt 6.3|windows 8.1/g)?a="8.1":r(/windows nt 10.0|windows 10/g)&&(a="10"):"macos"===o?a=n(/os x [\d._]+/g):"android"===o?a=n(/android [\d._]+/g):"ios"===o&&(a=n(/os [\d._]+/g)),e=kt(kt({},e),{},{systemVs:a});var u="";"windows"===o||"macos"===o||"linux"===o?u="desktop":("android"===o||"ios"===o||r(/mobile/g))&&(u="mobile"),e=kt(kt({},e),{},{platform:u});var c="",s="";r(/applewebkit/g)?(c="webkit",r(/edg(?:a|ios)?\//g)||r(/edge\//g)?s="edge":r(/opr/g)?s="opera":r(/chrome/g)?s="chrome":r(/safari/g)&&(s="safari")):r(/gecko/g)&&r(/firefox/g)?(c="gecko",s="firefox"):r(/presto/g)?(c="presto",s="opera"):r(/trident|compatible|msie/g)&&(c="trident",s="iexplore"),e=kt(kt({},e),{},{engine:c,supporter:s});var l="";"webkit"===c?l=n(/applewebkit\/[\d._]+/g):"gecko"===c?l=n(/gecko\/[\d._]+/g):"presto"===c?l=n(/presto\/[\d._]+/g):"trident"===c&&(l=n(/trident\/[\d._]+/g)),e=kt(kt({},e),{},{engineVs:l});var f="";"chrome"===s?f=n(/chrome\/[\d._]+/g):"safari"===s?f=n(/version\/[\d._]+/g):"firefox"===s?f=n(/firefox\/[\d._]+/g):"opera"===s?f=n(/opr\/[\d._]+/g):"iexplore"===s?f=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===s&&(f=n(/(?:edge|edg|edga|edgios)\/[\d._]+/g)),e=kt(kt({},e),{},{supporterVs:f});var p="",d="";r(/micromessenger/g)?(p="wechat",d=n(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",d=n(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",d=n(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",d=n(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",d=n(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),e=kt(kt({},e),{},{shell:p,shellVs:d});var v="";if(window.matchMedia){var g=window.matchMedia("(prefers-color-scheme: dark)"),m=window.matchMedia("(prefers-color-scheme: light)");g.matches?v="dark":m.matches&&(v="light")}return e=kt(kt({},e),{},{colorScheme:v}),window.MAZEY_BROWSER_INFO=e,e}catch(t){return Ke.warn(t),e}}var Rt="";function Ut(e){if("string"!=typeof e||""===e.trim())throw new TypeError("storageKey must be a non-empty string.")}function It(e){if("undefined"==typeof window)return null;try{return new URL(window.location.href).searchParams.get(e)}catch(e){return null}}function zt(e){if("undefined"==typeof window)return null;try{var t=window.localStorage;return t&&"function"==typeof t.getItem?t.getItem(e):null}catch(e){return null}}function Bt(e,t){if("undefined"==typeof window)return!1;try{var r=window.localStorage;return!(!r||"function"!=typeof r.setItem)&&(r.setItem(e,t),!0)}catch(e){return!1}}var $t=Object.freeze({system:"System",light:"Light",dark:"Dark"});function Ht(e){return"light"===e||"dark"===e}function qt(e,t){return{value:e,label:$t[t]}}function Yt(e){var t=e.split("-");if(!/^[a-z]{2,8}$/i.test(t[0]))return null;var r=[t[0].toLowerCase()],n=1;if(n<t.length&&/^[a-z]{4}$/i.test(t[n])){var o=t[n].toLowerCase();r.push("".concat(o[0].toUpperCase()).concat(o.slice(1))),n++}for(n<t.length&&(/^[a-z]{2}$/i.test(t[n])||/^\d{3}$/.test(t[n]))&&(r.push(/^[a-z]{2}$/i.test(t[n])?t[n].toUpperCase():t[n]),n++);n<t.length;n++){var i=t[n];if(!/^(?:[a-z0-9]{5,8}|\d[a-z0-9]{3})$/i.test(i))return null;r.push(i.toLowerCase())}return r.join("-")}function Wt(e){if("string"!=typeof e)return null;var t=e.trim().replace(/_/g,"-");if(!t)return null;if("undefined"!=typeof Intl)try{var r=Intl,n=r.getCanonicalLocales;if("function"==typeof n){var o=n.call(r,t)[0];return"string"==typeof o&&o?o:null}}catch(e){return e instanceof RangeError||"object"==typeof e&&null!==e&&"name"in e&&"RangeError"===e.name?null:Yt(t)}return Yt(t)}function Vt(e){if("undefined"==typeof Intl)return e;try{var t=Intl.DisplayNames;if("function"!=typeof t)return e;var r=new t([e],{type:"language"}).of(e);return"string"==typeof r&&r.trim()?r:e}catch(t){return e}}function Zt(e){return{value:e,label:Vt(e)}}exports.addClass=et,exports.addEvent=function(e,t){var r=ot();Array.isArray(r[e])||Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:[],writable:!0}),"function"==typeof t&&r[e].push(t)},exports.addStyle=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""};if(!e)return!1;var r=document.createDocumentFragment(),n=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(n=document.getElementById(o))?n.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,r.appendChild(i),document.head.appendChild(r))):(i.innerHTML=e,r.appendChild(i),document.head.appendChild(r)),!0},exports.assignDefined=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.forEach(function(t){void 0!==t&&Object.keys(t).forEach(function(r){var n=t[r];if(void 0!==n){var o=e;"__proto__"!==r||Object.prototype.hasOwnProperty.call(e,r)?o[r]=n:Object.defineProperty(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0})}})}),e},exports.calLongestCommonSubsequence=function(e,t){return w(e,t)},exports.calLongestCommonSubstring=function(e,t){return y(e,t)},exports.calculateCAGR=function(e,t,r){var n=c(e);if(!n)throw new TypeError("startDate must be a valid date.");var o=c(t);if(!o)throw new TypeError("endDate must be a valid date.");var i=o.getTime()-n.getTime();if(i<=0)throw new RangeError("endDate must be later than startDate.");var a=function(e){if("number"==typeof e){if(!Number.isFinite(e))throw new TypeError("totalReturnRate must be a finite number or percentage string.");return e}if("string"!=typeof e)throw new TypeError("totalReturnRate must be a finite number or percentage string.");var t=e.trim();if(!t)throw new TypeError("totalReturnRate must not be empty.");var r=t.endsWith("%")?t.slice(0,-1).trim():t;if(!r)throw new TypeError("totalReturnRate must be a valid percentage string.");var n=Number(r);if(!Number.isFinite(n))throw new TypeError("totalReturnRate must be a valid percentage string.");return n/100}(r);if(a<=-1)throw new RangeError("totalReturnRate must be greater than -1.");var u=i/864e5,s=Math.pow(1+a,365/u)-1;if(!Number.isFinite(s))throw new RangeError("calculated CAGR must be finite.");return s},exports.camelCase2Underscore=te,exports.camelCaseToKebabCase=function(e){return X(e)},exports.cancelBubble=function(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},exports.clearHTML=function(e){return ve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},exports.clearHtml=function(e){return ve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},exports.convert10To26=function(e){if(!Number.isFinite(e)||e<=0)return"";e=Math.floor(e);for(var t="";e>0;){var r=e%26;0===r&&(r=26),t=String.fromCharCode(r+96)+t,e=(e-r)/26}return t},exports.convertCamelToKebab=X,exports.convertCamelToUnder=ee,exports.convertHttpToHttps=$e,exports.convertKebabToCamel=function(e){var t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t.endsWith("-")?t.slice(0,-1):t},exports.convertObjectToQuery=function(e){return e&&0===Object.keys(e).length?"":"?".concat(Object.keys(e).map(function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))}).join("&"))},exports.convertToHtmlBreaks=de,exports.convertUnderToCamel=function(e){return e.replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})},exports.cutCHSString=function(e,t){return he(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},exports.cutZHString=me,exports.debounce=function(e,t,r){var n=null,o=null,i=null,a=null,u=null,c=function(){var s=f()-i;s<t&&s>=0?o=setTimeout(c,t-s):(o=null,r||(u=e.apply(n,a),o||(n=a=null)))};return function(){n=this;for(var s=arguments.length,l=new Array(s),p=0;p<s;p++)l[p]=arguments[p];a=l,i=f();var d=r&&!o;return o||(o=setTimeout(c,t)),d&&(u=e.apply(n,a),n=a=null),u}},exports.deepCopy=Q,exports.deepCopyObject=function(e){return Q(e)},exports.deepFreeze=function e(t){return!t||"object"!=typeof t||Object.isFrozen(t)||(Object.freeze(t),Object.values(t).forEach(e)),t},exports.delCookie=function(e){dt(e)},exports.derivePackageMetadata=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError("manifest must be an object");if(null===r||"object"!=typeof r||Array.isArray(r))throw new TypeError("options must be an object when provided");var n=e;if("string"!=typeof n.name||!n.name.trim())throw new TypeError("manifest.name must be a non-empty string");var o=n.name.trim(),i=function(e){if(/\s/.test(e))throw new TypeError("manifest.name must not contain whitespace");if(e.startsWith("@")){var t=e.split("/");if(2!==t.length||t[0].length<2||!t[1])throw new TypeError("manifest.name must be a valid scoped package name");return t[1]}if(e.includes("/"))throw new TypeError("manifest.name must be an unscoped or scoped package name");return e}(o),a=null!==(t=r.packageManager)&&void 0!==t?t:"npm";if("npm"!==a&&"pnpm"!==a&&"yarn"!==a)throw new TypeError('packageManager must be "npm", "pnpm", or "yarn"');var u="npm"===a?"npm install":"".concat(a," add");return{name:o,version:je(n,"version"),description:je(n,"description"),license:je(n,"license"),author:_e(n.author),unscopedName:i,iifeGlobal:re(i),installCommand:"".concat(u," ").concat(o)}},exports.detectVisitorType=function(e){if(void 0!==e&&"string"!=typeof e)throw new TypeError("userAgent must be a string when provided.");var t=void 0===e?function(){var e=Dt();if(!e)return"";try{var t=e.userAgent;return"string"==typeof t?t:""}catch(e){return""}}():e;return Lt(t,Mt)?"crawler":Lt(t,Pt)||function(){var e=Dt();if(!e)return!1;try{return!0===e.webdriver}catch(e){return!1}}()?"automation":"unknown"},exports.doFn=se,exports.extractElementText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.excludeSelector,n=void 0===r?"":r,o=t.replaceImagesWithAlt,i=void 0===o||o,a=t.normalizeWhitespace,u=void 0===a||a,c=e.cloneNode(!0);i&&Array.from(c.querySelectorAll("img[alt]")).forEach(function(e){var t,r=e.getAttribute("alt")||"";null===(t=e.parentNode)||void 0===t||t.replaceChild(c.ownerDocument.createTextNode(r),e)});var s=n.trim();s&&rt(s,{root:c})&&Array.from(c.querySelectorAll(s)).forEach(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)});var l=c.innerText||c.textContent||"";return u?l.replace(/\u00a0/g," ").replace(/\s+/g," ").trim():l},exports.fireEvent=it,exports.floatFixed=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(String(e)).toFixed(t)},exports.floatToPercent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="";return r=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(r,"%")},exports.formatByteSize=we,exports.formatDate=h,exports.formatDistanceToNow=function(e){var t=c(e);if(!t)return"";var r=6e4,n=36e5,o=864e5,i=Math.abs(t.getTime()-Date.now());return i<3e4?"less than a minute":i<9e4?"about 1 minute":i<27e5?m(i/r,"minute"):i<54e5?"about 1 hour":i<864e5?m(i/n,"hour"):i<1512e5?"about 1 day":i<30*o?m(i/o,"day"):i<45*o?"about 1 month":i<365*o?m(i/(30*o),"month"):i<545*o?"about 1 year":m(i/(365*o),"year")},exports.formatDurationFromMs=function(e){var t=(Number.isFinite(e)?Math.max(e,0):0)/1e3;return t>=86400?g(t/24/60/60,"day"):t>=3600?g(t/60/60,"hour"):t>=60?g(t/60,"minute"):g(t,"second")},exports.formatLocalDateTime=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="object"==typeof e&&null!==e?n(e):null;if(null===o)throw new TypeError("date must be a Date");if(!Number.isFinite(o))throw new RangeError("Invalid date");var i=null!==(t=r.precision)&&void 0!==t?t:"minute";if("minute"!==i&&"second"!==i&&"millisecond"!==i)throw new TypeError("precision must be minute, second, or millisecond");var a=new Date(o),u=a.getFullYear();if(u<1)throw new RangeError("Date year must be greater than zero");var c=[l(u,4),l(a.getMonth()+1,2),l(a.getDate(),2)].join("-"),s=[l(a.getHours(),2),l(a.getMinutes(),2)];"minute"!==i&&s.push(l(a.getSeconds(),2));var f="".concat(c,"T").concat(s.join(":"));return"millisecond"===i&&(f+=".".concat(l(a.getMilliseconds(),3))),f},exports.genBrowserAttrs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",r=Ft(),n=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=r[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(t)),n.push("".concat(a).concat(i))}}),n},exports.genCustomConsole=Qe,exports.genHashCode=function(e){var t,r=0;for(t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r},exports.genRndNumString=oe,exports.genStyleString=function(e,t){var r="";return t&&t.length>0&&(r=t.join(";")+";"),"".concat(e,"{").concat(r,"}")},exports.genUniqueNumString=ae,exports.generateCalendarVersion=function(e){return h(void 0===e?new Date:new Date(e instanceof Date?e.getTime():e),"yyyy.MMdd.HHmmss").split(".").map(function(e){return String(Number(e))}).join(".")},exports.generateRndNum=ie,exports.generateUniqueNum=function(){return ae(arguments.length>0&&void 0!==arguments[0]?arguments[0]:3)},exports.getAllQueryParams=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";""===e&&(e=location.search);var t={};return Ne(e).forEach(function(e){var n=r(e,2),o=n[0],i=n[1];Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:i,writable:!0})}),t},exports.getBrowserInfo=Ft,exports.getCLS=function(){return jt.apply(this,arguments)},exports.getCookie=pt,exports.getCurrentVersion=function(){return"v4"},exports.getDateDifference=v,exports.getDefineListeners=ot,exports.getDomain=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["hostname"];if(He(e)){var r=new window.URL(e);return t.reduce(function(e,t){return e+=r[t]},"")}var n=document.createElement("a");return n.href=e,t.reduce(function(e,t){return e+=n[t]},"")},exports.getFCP=xt,exports.getFID=function(){return At.apply(this,arguments)},exports.getFP=Et,exports.getFileSize=function(e){return we(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},exports.getFriendlyInterval=function(){return v(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:p)},exports.getHashQueryParam=function(e){var t=location.hash.split("?");return 1===t.length?"":ke("?".concat(t.slice(1).join("?")),e)[0]||""},exports.getLCP=function(){return Ot.apply(this,arguments)},exports.getLocalStorage=function(e){var t=null;if(e){var r=localStorage.getItem(e);if(r)try{t=JSON.parse(r)}catch(e){t=r}}return t},exports.getPageMeta=function(e){for(var t=document.getElementsByTagName("meta"),r=0;r<t.length;r++)if(t[r].getAttribute("name")===e)return t[r].getAttribute("content")||"";return""},exports.getPerformance=function(){return Ct.apply(this,arguments)},exports.getQueryParam=function(e){return ke(location.search,e)[0]||""},exports.getScriptQueryParam=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t||(t=".js");for(var r=document.querySelectorAll("script[src]"),n=0;n<r.length;n++){var o=r[n].getAttribute("src");if(o&&-1!==o.indexOf(t)){var i=ke(o,e)[0];if(void 0!==i)return i}}return""},exports.getSessionStorage=function(e){var t=null;if(e){var r=sessionStorage.getItem(e);if(r)try{t=JSON.parse(r)}catch(e){t=r}}return t},exports.getTTFB=function(){return _t.apply(this,arguments)},exports.getUrlFileType=function(e){var t="";if("string"!=typeof e||""==e)return t;var r=e.split(/[?#]/,1)[0],n=/\.[^/]+$/.exec(r);return n?(n[0].length>1&&(t=n[0].substring(1)),t):t},exports.getUrlHost=function(e){var t="";return!Be(e)&&Be(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),He(e)&&(t=new URL(e).host),t},exports.getUrlParam=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=ke(e,t);return r.returnArray?n:n.length?n[0]:null},exports.getUrlPath=function(e){var t="";return!Be(e)&&Be(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),He(e)&&(t=new URL(e).pathname),t},exports.hasClass=function(e,t){if(!e)return Ke.error("The element is not exist."),!1;for(var r=e.className.split(/\s+/),n=0;n<r.length;n++)if(r[n]===t)return!0;return!1},exports.inRate=function(e){return b(e)},exports.invokeEvent=function(e,t){it(e,t)},exports.invokeFn=ce,exports.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},exports.isBool=pe,exports.isBoolean=function(e){return pe(e)},exports.isBrowser=function(){if(Te)return"browser"===Te;var e="undefined"!=typeof window;return e&&(Te="browser"),e},exports.isFunction=function(e){return"function"==typeof e},exports.isHit=b,exports.isJSONString=ne,exports.isJsonString=function(e){return ne(e)},exports.isNonEmptyArray=le,exports.isNonEmptyObject=function(e){return!!fe(e)&&0!==Object.keys(e).length},exports.isNumber=ue,exports.isPureObject=fe,exports.isSafePWAEnv=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof window||"undefined"==typeof navigator)return!1;try{var t;if(null===e||"object"!=typeof e||Array.isArray(e))return!1;var r=e.requireManifest,n=e.scope;if(void 0!==r&&"boolean"!=typeof r||void 0!==n&&"string"!=typeof n)return!1;if(!0!==window.isSecureContext||!("serviceWorker"in navigator))return!1;if(void 0!==n&&!function(e){var t=e.trim();if(!t||/[?#]/.test(t))return!1;try{var r=new URL(window.location.href),n=new URL(t,r);if(n.origin!==r.origin||""!==n.search||""!==n.hash)return!1;if(r.pathname===n.pathname)return!0;var o=n.pathname.endsWith("/")?n.pathname:"".concat(n.pathname,"/");return r.pathname.startsWith(o)}catch(e){return!1}}(n))return!1;if(!1===r)return!0;if("undefined"==typeof document)return!1;var o=document.querySelector('link[rel~="manifest"][href]');return Boolean(null==o||null===(t=o.getAttribute("href"))||void 0===t?void 0:t.trim())}catch(e){return!1}},exports.isStandalonePWA=function(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;var e=navigator;try{var t=window.matchMedia;if("function"==typeof t&&t.call(window,"(display-mode: standalone)").matches)return!0}catch(e){}try{return!0===e.standalone}catch(e){return!1}},exports.isString=function(e){return"string"==typeof e},exports.isSupportWebp=function(){return Rt?Promise.resolve("webp"===Rt):new Promise(function(e){var t=new Image;t.onload=function(){var r=t.width>0&&t.height>0;Rt=r?"webp":"no-webp",e(r)},t.onerror=function(){Rt="no-webp",e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})},exports.isSupportedEntryType=bt,exports.isThisHour=function(e){var t=c(e);if(!t)return!1;var r=new Date;return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()&&t.getHours()===r.getHours()},exports.isThisMonth=function(e){var t=c(e);if(!t)return!1;var r=new Date;return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()},exports.isThisWeek=function(e){var t=c(e);if(!t)return!1;var r=new Date,n=(r.getDay()+6)%7;r.setHours(0,0,0,0),r.setDate(r.getDate()-n);var o=new Date(r.getTime());o.setDate(o.getDate()+7);var i=t.getTime();return i>=r.getTime()&&i<o.getTime()},exports.isThisYear=function(e){var t=c(e);return null!==t&&t.getFullYear()===(new Date).getFullYear()},exports.isToday=function(e){var t=c(e);if(!t)return!1;var r=new Date;return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()},exports.isUdfOrNul=function(e){return null==e},exports.isValidCssSelector=rt,exports.isValidData=function(e,t,r){if(null===e||"object"!=typeof e)return!1;var n,o=e,i=V(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(null===o||"object"!=typeof o&&"function"!=typeof o||!Object.prototype.hasOwnProperty.call(o,a))return!1;o=o[a]}}catch(e){i.e(e)}finally{i.f()}return o===r},exports.isValidDate=function(e){return null!==c(e)},exports.isValidEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},exports.isValidHttpUrl=Be,exports.isValidPhoneNumber=function(e){return/^1\d{10}$/.test(e)},exports.isValidUrl=function(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)},exports.listenMediaQueryChanges=function(e,t){if("function"!=typeof t)throw new TypeError("listener must be a function");if(null===e)return function(){};if("object"!=typeof e)throw new TypeError("media must be a MediaQueryList or null");var r=e.addEventListener,n=e.removeEventListener,o=e.addListener,i=e.removeListener,a=null;if("function"==typeof r&&"function"==typeof n){var u=t;r.call(e,"change",u),a=function(){return n.call(e,"change",u)}}else"function"==typeof o&&"function"==typeof i&&(o.call(e,t),a=function(){return i.call(e,t)});var c=!1;return function(){var e;c||(c=!0,null===(e=a)||void 0===e||e())}},exports.loadCSS=mt,exports.loadImage=function(e){return new Promise(function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=function(e){r(e)},n.src=e})},exports.loadScript=yt,exports.loadScriptIfUndefined=function(e,t){var r;if(window[e])return Promise.resolve("defined");var n=wt.get(e),o=null===(r=n)||void 0===r?void 0:r.get(t);if(o)return o;n||(n=new Map,wt.set(e,n));var i=function(){var r,o;null===(r=n)||void 0===r||r.delete(t),0===(null===(o=n)||void 0===o?void 0:o.size)&&wt.delete(e)},a=yt(t).then(function(e){return i(),e},function(e){throw i(),e});return n.set(t,a),a},exports.longestComSubsequence=w,exports.longestComSubstring=y,exports.mNow=f,exports.mTrim=function(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,r=/\s/;r.test(e.charAt(t));)t--;return e.slice(0,t+1)},exports.mazeyCon=Ke,exports.newLine=function(e){return de(e)},exports.onURLChange=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fireOnInit,r=void 0===t||t,n=history,o=location.href,i=[],a=function(t){var r=location.href;if(r!==o||"load"===t){var n=o;o=r,e({url:r,oldUrl:n,trigger:t})}},u=function(){return a("popstate")},c=function(){return a("hashchange")};window.addEventListener("popstate",u),window.addEventListener("hashchange",c),i.push(function(){return window.removeEventListener("popstate",u)}),i.push(function(){return window.removeEventListener("hashchange",c)}),n.__mazeyUrlChangePatched__||(n.__mazeyUrlChangePatched__=!0,n.__mazeyUrlChangeSubscribers__=new Set,n.__mazeyRawPushState__=history.pushState.bind(history),n.__mazeyRawReplaceState__=history.replaceState.bind(history),history.pushState=function(){n.__mazeyRawPushState__.apply(n,arguments),n.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("pushState")})},history.replaceState=function(){n.__mazeyRawReplaceState__.apply(n,arguments),n.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("replaceState")})});var s=function(e){return a(e)};return n.__mazeyUrlChangeSubscribers__.add(s),i.push(function(){return n.__mazeyUrlChangeSubscribers__.delete(s)}),r&&a("load"),function(){i.forEach(function(e){return e()})}},exports.parseGitHubRepository=function(e){if("string"!=typeof e)throw new TypeError("value must be a string");var t=e.trim();if(!t||/[%\\?#]/.test(t)||function(e){for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<=31||127===r)return!0}return!1}(t))throw De();var r=t.match(/^(?:github:)?([^/:\s]+)\/([^/\s]+)$/i);if(r)return Le(r[1],r[2]);var n=t.match(/^git@([^:\s]+):([^/\s]+)\/([^/\s]+)$/);if(n&&"github.com"===n[1].toLowerCase())return Le(n[2],n[3]);var o,i=t.replace(/^git\+(?=(?:git|ssh|https?):\/\/)/i,""),a=i.match(/^[a-z][a-z\d+.-]*:\/\/([^/?#]+)/i);if(!a||/(^|\/)\.{1,2}(?:\/|$)/.test(i.slice(a[0].length)))throw De();if(-1!==a[1].slice(a[1].lastIndexOf("@")+1).indexOf(":")||"function"!=typeof URL)throw De();try{o=new URL(i)}catch(e){throw De()}var u=o.protocol.toLowerCase(),c=o.hostname.toLowerCase().replace(/^www\./,"");if(!["git:","ssh:","http:","https:"].includes(u)||"github.com"!==c||""!==o.username&&"git"!==o.username||""!==o.password||""!==o.search||""!==o.hash)throw De();var s=o.pathname.match(/^\/([^/]+)\/([^/]+)\/?$/);if(!s)throw De();return Le(s[1],s[2])},exports.parseJsonSafe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{return JSON.parse(e)}catch(e){return t}},exports.parseLocalDateTime=function(e){if("string"!=typeof e)return null;var t=s.exec(e);if(!t)return null;var n=r(t.slice(1),7),o=n[0],i=n[1],c=n[2],l=n[3],f=n[4],p=n[5],d=void 0===p?"0":p,v=n[6],g=void 0===v?"":v,m=Number(o),h=Number(i),y=Number(c),w=Number(l),b=Number(f),x=Number(d),S=Number("".concat(g,"00").slice(0,3));return m<1||!a(m,h,y,w,b,x,S)?null:u(m,h,y,w,b,x,S)},exports.removeClass=function(e,t){var r;e?(r=(r=(r=(r=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=r):Ke.error("The element is not exist.")},exports.removeCookie=dt,exports.removeEvent=function(e,t){var r=ot(),n=r[e];if("string"==typeof e&&Array.isArray(n))if("function"==typeof t){for(var o=0,i=n.length;o<i;o++)if(n[o]===t){r[e].splice(o,1);break}}else delete r[e]},exports.removeHTML=ve,exports.removeHtml=function(e){return ve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},exports.repeatUntilConditionMet=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return!0===e},n=t.interval,o=void 0===n?1e3:n,i=t.times,a=void 0===i?10:i,u=t.context,c=t.args;if("function"==typeof e){if(!Number.isFinite(o)||o<0)console.error("Expected a non-negative number for interval.");else if(!Number.isFinite(a)||a<0)console.error("Expected a non-negative number for times.");else if(0!==a){var s=0,l=function(){setTimeout(S(W.mark(function t(){var n;return W.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.apply(u,c);case 1:if(n=t.sent,!(r(n)||++s>=a)){t.next=2;break}return t.abrupt("return");case 2:l();case 3:case"end":return t.stop()}},t)})),o)};l()}}else console.error("Expected a function.")},exports.replaceHttp=function(e){return $e(e)},exports.resolveElementTarget=function(e,t){if(void 0===e)return nt(t.defaultElement)?t.defaultElement:null;var r=t.unwrap?t.unwrap(e):e;if(null==r)return null;if("string"==typeof r)try{return t.root.querySelector(r)}catch(e){return null}return"object"==typeof r&&"$el"in r&&(r=r.$el),nt(r)?r:null},exports.resolveLanguagePreference=function(e){Ut(e);var t=Wt(It("lang"));if(t)return Zt(t);var r=Wt(zt(e));if(r)return Zt(r);var n=Wt(function(){if("undefined"==typeof window||"undefined"==typeof navigator)return null;try{return"string"==typeof navigator.language?navigator.language:null}catch(e){return null}}());return Zt(null!=n?n:"en")},exports.resolveThemePreference=function(e){Ut(e);var t=It("theme");if(Ht(t))return Bt(e,t),qt(t,t);var r=zt(e);if(Ht(r))return qt(r,r);var n=function(){if("undefined"==typeof window)return null;try{var e=window.matchMedia;return"function"!=typeof e?null:e.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}catch(e){return null}}();return"system"===r&&n||n?qt(n,"system"):qt("light","light")},exports.sanitizeInput=function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return t[e]})},exports.setClass=function(e,t){et(e,t)},exports.setCookie=function(e,t,r,n){var o;if(r){var i=new Date;i.setTime(i.getTime()+24*r*60*60*1e3),o="; expires="+i.toUTCString()}else o="";var a=function(e){for(var t=!0,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(!(33===n||n>=35&&n<=43||n>=45&&n<=58||n>=60&&n<=91||n>=93&&n<=126)){t=!1;break}}return{isEncoded:!t,value:t?e:encodeURIComponent(e)}}(t),u=st(e),c=a.isEncoded?"1":"",s=a.isEncoded?o:"; expires=Thu, 01 Jan 1970 00:00:00 GMT",l=["".concat(u,"=").concat(a.value).concat(o,"; path=/"),"".concat(ct(e),"=").concat(c).concat(s,"; path=/")],f=function(e){var t=e?"; domain=".concat(e):"";l.forEach(function(e){document.cookie="".concat(e).concat(t)})},p=location.hostname;if(n)f(n);else if(-1===p.indexOf("."))f();else{var d=p.split(".");d.shift(),f("."+d.join(".")),pt(e)!==t&&f(".".concat(p))}},exports.setImgSizeBySrc=tt,exports.setImgWidHeiBySrc=function(){return tt()},exports.setLanguagePreference=function(e,t){Ut(e);var r=Wt(t);if(!r)throw new TypeError("language must be a valid language tag.");return Bt(e,r)},exports.setLocalStorage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var r=JSON.stringify(t);localStorage.setItem(e,void 0===r?"null":r)}},exports.setSessionStorage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var r=JSON.stringify(t);sessionStorage.setItem(e,void 0===r?"null":r)}},exports.setThemePreference=function(e,t){if(Ut(e),!function(e){return"system"===e||Ht(e)}(t))throw new TypeError('value must be "system", "light", or "dark".');return Bt(e,t)},exports.sha256Hex=function(e){return be.apply(this,arguments)},exports.sleep=function(e){return Ee.apply(this,arguments)},exports.subYears=function(e,t){var r="number"==typeof e?e:"object"==typeof e&&null!==e?n(e):null,o=new Date(null!=r?r:NaN),i="number"==typeof t?t<0?Math.ceil(t):Math.floor(t):NaN;if(!Number.isFinite(o.getTime())||!Number.isFinite(i))return new Date(NaN);if(0===i)return o;var a=o.getMonth(),u=o.getDate(),c=o.getFullYear()-i,s=new Date(o.getTime());return s.setFullYear(c,a+1,0),u>=s.getDate()?s:(o.setFullYear(c,a,u),o)},exports.throttle=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=Object.assign({},r);var n=null,o=null,i=null,a=null,u=0,c=function(){u=!1===r.leading?0:f(),i=null,a=e.apply(this,o),i||(n=o=null)};return function(){var s=f();u||!1!==r.leading||(u=s);var l=t-(s-u);n=this;for(var p=arguments.length,d=new Array(p),v=0;v<p;v++)d[v]=arguments[v];return o=d,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=s,a=e.apply(n,o),i||(n=o=null)):i||!1===r.trailing||(i=setTimeout(c.bind(n),l)),a}},exports.timeCon=Xe,exports.toJavaScriptGlobalName=re,exports.truncateZHString=he,exports.unsanitize=function(e){return ge(e)},exports.unsanitizeInput=ge,exports.updateQueryParam=function(e,t,r){var n=e.indexOf("#"),o=-1===n?"":e.slice(n),i=-1===n?e:e.slice(0,n),a=i.indexOf("?"),u=-1===a?i:i.slice(0,a),c=-1===a?"":i.slice(a+1),s=encodeURIComponent(t),l=encodeURIComponent(r),f=!1,p=(c?c.split("&").filter(Boolean):[]).reduce(function(e,r){var n=r.indexOf("=");return Ce(-1===n?r:r.slice(0,n))===t?f||(e.push("".concat(s,"=").concat(l)),f=!0):e.push(r),e},[]);return f||p.push("".concat(s,"=").concat(l)),"".concat(u,"?").concat(p.join("&")).concat(o)},exports.waitTime=xe,exports.watchServiceWorkerUpdates=function(e,t,r){if(null===e||"object"!=typeof e||"function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)throw new TypeError("registration must support event listeners");if(null===t||"object"!=typeof t||"function"!=typeof t.addEventListener||"function"!=typeof t.removeEventListener)throw new TypeError("container must support event listeners");if(null===r||"object"!=typeof r||"function"!=typeof r.onUpdateAvailable||void 0!==r.onControllerChange&&"function"!=typeof r.onControllerChange)throw new TypeError("callbacks must provide onUpdateAvailable");var n=!1,o=null,i=null,a=!1,u=!1,c=function(e){n||i===e||(i=e,r.onUpdateAvailable(e))},s=function(){var e;!n&&"installed"===(null===(e=o)||void 0===e?void 0:e.state)&&t.controller&&c(o)},l=function(){var t,r;n||(null===(t=o)||void 0===t||t.removeEventListener("statechange",s),null===(r=o=e.installing)||void 0===r||r.addEventListener("statechange",s),s())},f=function(){var e;n||null===(e=r.onControllerChange)||void 0===e||e.call(r)},p=function(){if(a){try{e.removeEventListener("updatefound",l)}catch(e){}a=!1}try{var r;null===(r=o)||void 0===r||r.removeEventListener("statechange",s)}catch(e){}if(u){try{t.removeEventListener("controllerchange",f)}catch(e){}u=!1}};try{e.addEventListener("updatefound",l),a=!0,t.addEventListener("controllerchange",f),u=!0,e.waiting&&t.controller&&c(e.waiting),e.installing&&l()}catch(e){throw n=!0,p(),o=null,i=null,e}return{activateWaiting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"SKIP_WAITING"};if(n||!i)return!1;try{return i.postMessage(e),!0}catch(e){return!1}},dispose:function(){n||(n=!0,p(),o=null,i=null)}}},exports.windowLoaded=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return new Promise(function(t,r){var n=null,o=function(){window.removeEventListener("load",i),null!==n&&(clearTimeout(n),n=null)},i=function(){o(),t("load")};"complete"!==document.readyState?(window.addEventListener("load",i),n=setTimeout(function(){o(),r(new Error("timeout"))},e)):t("complete")})},exports.zAxiosIsValidRes=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{validStatusRange:[200,300],validCode:[0]})||{},r=t.validStatusRange,n=void 0===r?[200,300]:r,o=t.validCode,i=void 0===o?[0]:o;2!==n.length&&console.error("valid validStatusRange is required");var a=!1;if(e&&e.status&&2===n.length&&e.status>=n[0]&&e.status<n[1]){var u=e.data;u&&i.includes(u.code)&&(a=!0)}return a};
|
|
6
|
+
"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t(t,r){if(t){if("string"==typeof t)return e(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}}function r(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,r)||t(e,r)||function(){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 n(e){try{return Date.prototype.getTime.call(e)}catch(e){return null}}var o=/^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/,i=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;function a(e,t,r,n,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=new Date(0);return u?(c.setUTCFullYear(e,t-1,r),c.setUTCHours(n,o,i,a),Number.isFinite(c.getTime())&&c.getUTCFullYear()===e&&c.getUTCMonth()===t-1&&c.getUTCDate()===r&&c.getUTCHours()===n&&c.getUTCMinutes()===o&&c.getUTCSeconds()===i&&c.getUTCMilliseconds()===a):(c.setFullYear(e,t-1,r),c.setHours(n,o,i,a),Number.isFinite(c.getTime())&&c.getFullYear()===e&&c.getMonth()===t-1&&c.getDate()===r&&c.getHours()===n&&c.getMinutes()===o&&c.getSeconds()===i&&c.getMilliseconds()===a)}function u(e,t,r,n,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=new Date(0);return u.setFullYear(e,t-1,r),u.setHours(n,o,i,a),u}function c(e){if("number"==typeof e){var t=new Date(e);return Number.isFinite(e)&&Number.isFinite(t.getTime())?t:null}if("object"==typeof e&&null!==e){var c=n(e);return null!==c&&Number.isFinite(c)?new Date(c):null}if("string"!=typeof e)return null;var s=e.trim();if(!s)return null;var l=o.exec(s);if(l){var f=r(l.slice(1),6),p=f[0],d=f[1],v=f[2],g=f[3],m=void 0===g?"0":g,h=f[4],y=void 0===h?"0":h,w=f[5],b=r([p,d,v,m,y,void 0===w?"0":w].map(Number),6),x=b[0],S=b[1],E=b[2],T=b[3],O=b[4],A=b[5];return a(x,S,E,T,O,A)?u(x,S,E,T,O,A):null}var j=i.exec(s);if(!j)return null;var _=r(j.slice(1),8),C=_[0],N=_[1],k=_[2],M=_[3],P=_[4],D=_[5],L=void 0===D?"0":D,F=_[6],R=void 0===F?"":F,U=_[7],I=Number("".concat(R,"00").slice(0,3));if(!a(Number(C),Number(N),Number(k),Number(M),Number(P),Number(L),I,!0))return null;if("Z"!==U){var z=Number(U.slice(1,3)),B=Number(U.slice(4,6));if(z>23||B>59)return null}return function(e,t,r,n,o,i,a,u){var c=new Date(0);if(c.setUTCFullYear(e,t-1,r),c.setUTCHours(n,o,i,a),"Z"===u)return c;var s="+"===u[0]?1:-1,l=60*Number(u.slice(1,3))+Number(u.slice(4,6));return new Date(c.getTime()-s*l*60*1e3)}(Number(C),Number(N),Number(k),Number(M),Number(P),Number(L),I,U)}var s=/^(\d{4,})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/;function l(e,t){var r=String(e);return r.length>=t?r:"".concat("0".repeat(t-r.length)).concat(r)}function f(){return Date.now?Date.now():(new Date).getTime()}var p={type:"d"};function d(e){return"string"==typeof e&&/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T"):e}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,o=(n=Object.assign({},p,n)).type;"number"==typeof e&&Number.isFinite(e)||(e=new Date(d(e)).getTime()),"number"==typeof t&&Number.isFinite(t)||(t=new Date(d(t)).getTime());var i=Number(t)-Number(e),a="",u=r(new Array(4).fill(0),4),c=u[0],s=(u[1],u[2],u[3]);if(i>=0)switch(c=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),s=Math.floor(i/1e3),o){case"d":a=c;break;case"text":a=[{value:c=Math.floor(i/1e3/60/60/24),unit:"day"},{value:Math.floor(i/1e3/60/60%24),unit:"hour"},{value:Math.floor(i/1e3/60%60),unit:"minute"},{value:s=Math.floor(i/1e3%60),unit:"second"}].filter(function(e){return e.value>0}).map(function(e){return g(e.value,e.unit)}).join(" ")||g(0,"second");break;default:a=s}return a}function g(e,t){var r=Math.round(10*e)/10,n=1===r?t:"".concat(t,"s");return"".concat(r," ").concat(n)}function m(e,t){var r=Math.max(1,Math.round(e));return"about ".concat(r," ").concat(t).concat(1===r?"":"s")}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd";void 0===e&&(e=new Date);var r=new Date(e);if(!Number.isFinite(r.getTime()))throw new RangeError("Invalid date");var n=r.getHours(),o={yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate()<10?"0"+r.getDate():r.getDate(),HH:n<10?"0"+n:n,hh:(n%12||12)<10?"0"+(n%12||12):n%12||12,mm:r.getMinutes()<10?"0"+r.getMinutes():r.getMinutes(),ss:r.getSeconds()<10?"0"+r.getSeconds():r.getSeconds(),a:n<12?"AM":"PM"},i=t||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var t=o[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),i=i.split(e).join(String(t))}),i}function y(e,t){var r=e.length,n=t.length;if(0===r||0===n)return 0;for(var o=Array.from({length:r},function(){return new Array(n).fill(0)}),i=0,a=0;a<r;++a)for(var u=0;u<n;++u)if(e[a]===t[u]){var c=0;a>0&&u>0&&(c=o[a-1][u-1]),o[a][u]=c+1,i=Math.max(i,o[a][u])}return i}function w(e,t){var r=e.length,n=t.length;if(0===r||0===n)return 0;for(var o=Array.from({length:r},function(){return new Array(n).fill(0)}),i=0;i<r;++i)for(var a=0;a<n;++a)if(e[i]===t[a]){var u=0;i>0&&a>0&&(u=o[i-1][a-1]),o[i][a]=u+1}else{var c=0,s=0;a>0&&(c=o[i][a-1]),i>0&&(s=o[i-1][a]),o[i][a]=Math.max(c,s)}return o[r-1][n-1]}function b(e){return Math.random()<e}function x(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,u,"next",e)}function u(e){x(i,n,o,a,u,"throw",e)}a(void 0)})}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T,O={exports:{}},A={exports:{}};(T=A).exports=function(e,t){this.v=e,this.k=t},T.exports.__esModule=!0,T.exports.default=T.exports;var j=A.exports,_={exports:{}},C={exports:{}};!function(e){function t(r,n,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,o){function i(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(C);var N=C.exports;!function(e){var t=N;function r(){var n,o,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.toStringTag||"@@toStringTag";function c(e,r,i,a){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return t(c,"_invoke",function(e,t,r){var i,a,u,c=0,l=r||[],f=!1,p={p:0,n:0,v:n,a:d,f:d.bind(n,4),d:function(e,t){return i=e,a=0,u=n,p.n=t,s}};function d(e,t){for(a=e,u=t,o=0;!f&&c&&!r&&o<l.length;o++){var r,i=l[o],d=p.p,v=i[2];e>3?(r=v===t)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=n):i[0]<=d&&((r=e<2&&d<i[1])?(a=0,p.v=t,p.n=i[1]):d<v&&(r=e<3||i[0]>t||t>v)&&(i[4]=e,i[5]=t,p.n=v,a=0))}if(r||e>1)return s;throw f=!0,t}return function(r,l,v){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,v),a=l,u=v;(o=a<2?n:u)||!f;){i||(a?a<3?(a>1&&(p.n=-1),d(a,u)):p.n=u:p.v=u);try{if(c=2,i){if(a||(r="next"),o=i[r]){if(!(o=o.call(i,u)))throw TypeError("iterator result is not an object");if(!o.done)return o;u=o.value,a<2&&(a=0)}else 1===a&&(o=i.return)&&o.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=n}else if((o=(f=p.n<0)?u:e.call(t,p))!==s)break}catch(e){i=n,a=1,u=e}finally{c=1}}return{value:o,done:f}}}(e,i,a),!0),c}var s={};function l(){}function f(){}function p(){}o=Object.getPrototypeOf;var d=[][a]?o(o([][a]())):(t(o={},a,function(){return this}),o),v=p.prototype=l.prototype=Object.create(d);function g(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,t(e,u,"GeneratorFunction")),e.prototype=Object.create(v),e}return f.prototype=p,t(v,"constructor",p),t(p,"constructor",f),f.displayName="GeneratorFunction",t(p,u,"GeneratorFunction"),t(v),t(v,u,"Generator"),t(v,a,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:c,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(_);var k=_.exports,M={exports:{}},P={exports:{}},D={exports:{}};!function(e){var t=j,r=N;e.exports=function e(n,o){function i(e,r,a,u){try{var c=n[e](r),s=c.value;return s instanceof t?o.resolve(s.v).then(function(e){i("next",e,a,u)},function(e){i("throw",e,a,u)}):o.resolve(s).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,u)})}catch(e){u(e)}}var a;this.next||(r(e.prototype),r(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(e,t,r){function n(){return new o(function(t,n){i(e,r,t,n)})}return a=a?a.then(n,n):n()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports}(D);var L=D.exports;!function(e){var t=k,r=L;e.exports=function(e,n,o,i,a){return new r(t().w(e,n,o,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports}(P);var F=P.exports;!function(e){var t=F;e.exports=function(e,r,n,o,i){var a=t(e,r,n,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports}(M);var R=M.exports,U={exports:{}};!function(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports}(U);var I=U.exports,z={exports:{}},B={exports:{}};!function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(B);var $=B.exports;!function(e){var t=$.default;e.exports=function(e){if(null!=e){var r=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(t(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports}(z);var H=z.exports;!function(e){var t=j,r=k,n=R,o=F,i=L,a=I,u=H;function c(){var s=r(),l=s.m(c),f=(Object.getPrototypeOf?Object.getPrototypeOf(l):l.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,o,i){return t.resultName=o,r(n.d,u(e),i)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,t,r,n){return s.w(v(e),t,r,n&&n.reverse())},isGeneratorFunction:p,mark:s.m,awrap:function(e,r){return new t(e,r)},AsyncIterator:i,async:function(e,t,r,i,a){return(p(t)?o:n)(v(e),t,r,i,a)},keys:a,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports}(O);var q=(0,O.exports)(),Y=q;try{regeneratorRuntime=q}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=q:Function("r","regeneratorRuntime = r")(q)}var W=E(Y);function V(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var G=Function.prototype.toString.call(Object);function J(e,t,r){var n,o=null===(n=Object.getOwnPropertyDescriptor(t,r))||void 0===n?void 0:n.get;if(!o)return!1;try{return o.call(e),!0}catch(e){return!1}}function Q(e){return null===e||"object"!=typeof e?e:K(e,function(){if("undefined"!=typeof WeakMap)return new WeakMap;var e=[],t=[];return{get:function(r){var n=e.indexOf(r);return-1===n?void 0:t[n]},set:function(r,n){e.push(r),t.push(n)}}}())}function K(e,t){if(null===e||"object"!=typeof e)return e;var r=e,o=t.get(r);if(void 0!==o)return o;var i=n(r);if(null!==i){var a=new Date(i);return t.set(r,a),a}var u=function(e){var t,r=null===(t=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))||void 0===t?void 0:t.get;if(!r)return null;try{return r.call(e)}catch(e){return null}}(r);if(null!==u){var c=e,s=new RegExp(u,function(e){if("string"==typeof e.flags)return e.flags;var t=e,r="";return t.hasIndices&&(r+="d"),e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),e.sticky&&(r+="y"),r}(c));return s.lastIndex=c.lastIndex,t.set(r,s),s}if("undefined"!=typeof ArrayBuffer&&J(r,ArrayBuffer.prototype,"byteLength")){var l=ArrayBuffer.prototype.slice.call(e,0);return t.set(r,l),l}if("undefined"!=typeof SharedArrayBuffer&&J(r,SharedArrayBuffer.prototype,"byteLength")){var f=SharedArrayBuffer.prototype.slice.call(e,0);return t.set(r,f),f}if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)){var p=K(e.buffer,t),d="undefined"!=typeof DataView&&J(r,DataView.prototype,"byteLength")?new DataView(p,e.byteOffset,e.byteLength):new e.constructor(p,e.byteOffset,e.length);return t.set(r,d),d}if("undefined"!=typeof Map&&J(r,Map.prototype,"size")){var v=new Map;return t.set(r,v),Map.prototype.forEach.call(e,function(e,r){v.set(K(r,t),K(e,t))}),v}if("undefined"!=typeof Set&&J(r,Set.prototype,"size")){var g=new Set;return t.set(r,g),Set.prototype.forEach.call(e,function(e){g.add(K(e,t))}),g}var m=Array.isArray(e),h=Object.getPrototypeOf(e),y=function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.prototype.hasOwnProperty.call(t,"constructor")?t.constructor:null;return"function"==typeof r&&Function.prototype.toString.call(r)===G}(r),w=!m&&!y&&function(e){var t=Object.getPrototypeOf(e),r=null==t?void 0:t.constructor;return"function"==typeof r&&-1===Function.prototype.toString.call(r).indexOf("[native code]")}(r);if(!m&&!y&&!w)return t.set(r,e),e;var b=m?new Array(e.length):Object.create(w?Object.prototype:h);return t.set(r,b),function(e){var t=Object.getOwnPropertyNames(e);return"function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t}(r).forEach(function(e){if(!m||"length"!==e){var n=Object.getOwnPropertyDescriptor(r,e);n&&("value"in n&&(n.value=K(n.value,t)),Object.defineProperty(b,e,n))}}),b}function X(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substring(1):t}function ee(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substring(1):t}function te(e){return ee(e)}function re(e){if("string"!=typeof e)throw new TypeError("value must be a string");var t=e.replace(/[^A-Za-z0-9_$]/g,"_").toUpperCase();return/^[A-Za-z_$]/.test(t)?t:"_".concat(t)}function ne(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch(e){}return!1}function oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(!Number.isFinite(e)||e<=0)return"";e=Math.floor(e);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function ie(){return oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:5)}function ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[f(),ie(e||3)];return t[0]+t[1]}function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isNaNAsNumber,n=void 0!==r&&r,o=t.isInfinityAsNumber,i=void 0!==o&&o,a=t.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!n&&isNaN(e)))}function ce(e){var t=null;if(e&&"function"==typeof e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t=e.apply(void 0,n)}return t}function se(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return ce.apply(void 0,[e].concat(r))}function le(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t}function fe(e){var t=Boolean(e),r="object"==typeof e,n="[object Object]"===Object.prototype.toString.call(e);return t&&r&&n}function pe(e){return"boolean"==typeof e}function de(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")}function ve(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).removeNewLine,r=void 0!==t&&t,n="";return e&&(n=e.replace(/<\/?.+?>/g,""),r&&(n=n.replace(/[\r\n]/g,""))),n}function ge(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return t[e]})}function me(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hasDot:!1,dotText:"..."};if(r=Object.assign({hasDot:!1,dotText:"..."},r),""!=e&&e){for(var n=0,o="",i=/[^\x00-\xff]/g,a="",u=e.replace(i,"**").length,c=0;c<u&&(null!=(a=e.charAt(c).toString()).match(i)?n+=2:n++,!(n>t));c++)o+=a;return r.hasDot&&u>t&&(o+=r.dotText),o}return""}function he(e,t){return me(e,t,{hasDot:arguments.length>2&&void 0!==arguments[2]&&arguments[2]})}var ye=["B","KB","MB","GB","TB"];function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.base,n=void 0===r?1024:r,o=t.fractionDigits,i=void 0===o?1:o,a=t.invalidValue,u=void 0===a?"":a;if(!Number.isFinite(e)||e<0||1e3!==n&&1024!==n||!Number.isInteger(i)||i<0||i>20)return u;for(var c=e,s=0;c>=n&&s<ye.length-1;)c/=n,s+=1;return 0===s?"".concat(Number(c.toFixed(i))," ").concat(ye[s]):"".concat(c.toFixed(i)," ").concat(ye[s])}function be(){return(be=S(W.mark(function e(t){var r,n,o,i,a,u,c;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(r="undefined"==typeof crypto?null:crypto)&&r.subtle&&"function"==typeof r.subtle.digest){e.next=1;break}throw new Error("Web Crypto API is not available.");case 1:if(n=t,"string"!=typeof t){e.next=3;break}if("undefined"!=typeof TextEncoder){e.next=2;break}throw new Error("TextEncoder is not available.");case 2:n=(new TextEncoder).encode(t);case 3:return e.next=4,r.subtle.digest("SHA-256",n);case 4:for(o=e.sent,i="",a=new Uint8Array(o),u=0;u<a.length;u++)c=a[u].toString(16),i+=1===c.length?"0".concat(c):c;return e.abrupt("return",i);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function xe(e){return Se.apply(this,arguments)}function Se(){return(Se=S(W.mark(function e(t){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e){setTimeout(function(){e(t)},t)}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ee(){return(Ee=S(W.mark(function e(t){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",xe(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Te="";function Oe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ae(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function je(e,t){var r=e[t];if(void 0!==r&&"string"!=typeof r)throw new TypeError("manifest.".concat(t," must be a string when provided"));return r}function _e(e){if(void 0===e)return{name:""};if("string"==typeof e)return{name:e.trim()};if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError("manifest.author must be a string or object");var t,r=e,n={name:""},o=Oe(["name","email","url"]);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=r[i];if(void 0!==a&&"string"!=typeof a)throw new TypeError("manifest.author.".concat(i," must be a string when provided"));if("string"==typeof a){var u=a.trim();("name"===i||u)&&(n[i]=u)}}}catch(e){o.e(e)}finally{o.f()}return n}function Ce(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function Ne(e){var t=e.indexOf("#"),r=-1===t?e:e.slice(0,t),n=r.indexOf("?"),o=/^(?:[a-z][a-z\d+.-]*:)?\/\//i.test(r)||"/"===r.charAt(0),i=-1===n?o?"":r:r.slice(n+1);return i?i.split("&").reduce(function(e,t){if(!t||-1===t.indexOf("="))return e;var r=t.indexOf("=");return e.push([Ce(t.slice(0,r)),Ce(t.slice(r+1))]),e},[]):[]}function ke(e,t){return Ne(e).filter(function(e){return r(e,1)[0]===t}).map(function(e){return r(e,2)[1]})}var Me=/^(?=.{1,39}$)(?!.*--)[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/,Pe=/^(?=.{1,100}$)(?!\.{1,2}$)[A-Za-z0-9_.-]+$/;function De(){return new Error("The value does not identify one supported GitHub repository")}function Le(e,t){var r=t.replace(/\.git$/i,"");if(!Me.test(e)||!Pe.test(r))throw De();var n="".concat(e,"/").concat(r);return{owner:e,name:r,slug:n,url:"https://github.com/".concat(n)}}function Fe(e){return void 0===e||Number(e)<=65535}function Re(e){var t=e.split(".");return 4===t.length&&t.every(function(e){return/^\d{1,3}$/.test(e)&&(1===e.length||"0"!==e.charAt(0))&&Number(e)<=255})}function Ue(e){var t=e.split("::");if(t.length>2)return!1;var r=2===t.length,n=[];t.forEach(function(e){e&&(n=n.concat(e.split(":")))});for(var o=0,i=0;i<n.length;i++){var a=n[i];if(-1!==a.indexOf(".")){if(i!==n.length-1||!Re(a))return!1;o+=2}else{if(!/^[0-9a-f]{1,4}$/i.test(a))return!1;o+=1}}return r?o<8:8===o}function Ie(e){var t=e.match(/^\[([0-9a-f:.]+)\]$/i);if(t)return Ue(t[1]);if("."===e.charAt(e.length-1)&&(e=e.slice(0,-1)),Re(e))return!0;var r=e.split(".");return!(r.length<2||r.some(function(e){return!e||!/^[a-z\d-]+$/i.test(e)||"-"===e.charAt(0)||"-"===e.charAt(e.length-1)}))&&!/^\d+$/.test(r[r.length-1])}function ze(e){var t=e.match(/^https?:\/\/([^/?#]+)(?:[/?#][^\s<>"`]*)?$/i);if(!t||-1!==t[1].indexOf("@"))return!1;var r=t[1],n=r.match(/^\[([0-9a-f:.]+)\](?::(\d*))?$/i);if(n)return Ue(n[1])&&Fe(n[2]);var o=r.match(/^([^:]+)(?::(\d*))?$/);return!(!o||!Fe(o[2]))&&Ie(o[1])}function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{strict:!0};if("string"!=typeof e||!e||e.trim()!==e)return!1;var r=/^https?:\/\/[^/\\]/i.test(e),n=/^\/\/[^/\\]/.test(e);if(!r&&(t.strict||!n))return!1;var o=n?"http:".concat(e):e;if(!ze(o))return!1;if("function"!=typeof URL)return!0;try{var i=new URL(o);return("http:"===i.protocol||"https:"===i.protocol)&&Ie(i.hostname)&&!i.username&&!i.password}catch(e){try{return new URL("http://example.com"),!1}catch(e){return ze(o)}}}function $e(e){return e.replace(/^http:/,"https:")}function He(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=window.URL;if("function"!=typeof t)return!1;try{var r=new t(e);return Boolean(r.href)}catch(e){return!1}}function qe(r){return function(t){if(Array.isArray(t))return e(t)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||t(r)||function(){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 Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function We(e){var t=function(e,t){if("object"!=Ye(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ye(t)?t:t+""}function Ve(e,t,r){return(t=We(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach(function(t){Ve(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Je={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function Qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ge({},Je),r=Object.assign(Ge({},Je),t),n=r.enabled,o=r.isClosed,i=r.showWrap,a=r.showDate,u=r.locales,c=r.isStringifyObject,s=r.logFn,l=r.errorFn,f=n;!0===o&&(Ke.warn("The options.isClosed is deprecated. Please use options.enabled instead."),f=!1);var p=Object.create(null),d=function(){return(new Date).toLocaleDateString(u,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(t){p[t]=function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];if(f){var u,p,v=e,g=e;if("string"==typeof e&&e.length>=2){var m=e.length;v=":"===e[m-1]?e.substring(0,m-1):e}if(i&&console.log("--- ".concat(v," - begin ---")),a&&(g=e?"".concat(d()," ").concat(e):"".concat(d())),c&&(n=n.map(function(e){return fe(e)?JSON.stringify(e):e})),e||a)(u=console)[t].apply(u,[g].concat(qe(n)));else(p=console)[t].apply(p,qe(n));"log"===t&&s(),"error"===t&&l(),i&&console.log("--- ".concat(v," - end ---"))}}}),p}var Ke=Qe("[Mazey]"),Xe=Qe("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function et(e,t){if(e){if(Array.isArray(t))t.forEach(function(t){t&&e.classList.add(t)});else if(t){for(var r=e.className,n=r.split(/\s+/),o=0;o<n.length;o++)if(n[o]===t)return;var i,a="";""!==r&&(a=" "),i=r+a+t,e.className=i}}else Ke.error("The element is not exist.")}function tt(){var e=window.jQuery||window.$;if(e){var t=e("img");return!(!t||!t.length)&&(t.each(function(){var t=e(this);if(t){var r=t.attr("src");if(r&&"string"==typeof r&&r.length){var n=r.match(/[?&]width=([0-9]+[a-z%]*)/),o=r.match(/[?&]height=([0-9]+[a-z%]*)/);n&&le(n)&&n[1]&&t.width(n[1]),o&&le(o)&&o[1]&&t.height(o[1])}}}),!0)}var r=document.getElementsByTagName("img");return r.length>0&&(Array.from(r).forEach(function(e){var t=e;if(t){var r=t.getAttribute("src");if(r&&"string"==typeof r&&r.length){var n=r.match(/[?&]width=([0-9]+[a-z%]*)/),o=r.match(/[?&]height=([0-9]+[a-z%]*)/);n&&le(n)&&n[1]&&(t.style.width=n[1]),o&&le(o)&&o[1]&&(t.style.height=o[1])}}}),!0)}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)return!1;var r=e.trim();if(!r)return!0===t.allowEmpty;var n=t.root||("undefined"==typeof document?null:document);if(!n)return!1;try{return n.querySelector(r),!0}catch(e){return!1}}function nt(e){return Boolean(e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}function ot(){var e=window.MAZEY_DEFINE_LISTENERS;if(e&&"object"==typeof e)return e;var t=Object.create(null);return window.MAZEY_DEFINE_LISTENERS=t,t}function it(e,t){var r=ot()[e];if(Array.isArray(r))for(var n=r.slice(),o=0,i=n.length;o<i;o++)"function"==typeof n[o]&&(void 0===t?n[o]():n[o](t))}var at="__mazey_cookie_name_encoded__-",ut="__mazey_cookie_value_encoded__-";function ct(e){return"".concat(ut).concat(encodeURIComponent(e))}function st(e){var t=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(e),r=0===e.indexOf(at)||0===e.indexOf(ut);return t&&!r?e:function(e){return"".concat(at).concat(encodeURIComponent(e))}(e)}function lt(e){var t=st(e);return t!==e?[t,e]:[e]}function ft(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){var o=r[n].trim();if(0===o.indexOf(t))return o.substring(t.length)}}function pt(e){for(var t=lt(e),r="1"===ft(ct(e)),n=0;n<t.length;n++){var o=ft(t[n]);if(void 0!==o){if(r)try{return decodeURIComponent(o)}catch(e){return o}return o}}return""}function dt(e){var t=lt(e),r=t.concat(ct(e)),n=new Date;n.setTime(n.getTime()-1);var o=t.some(function(e){return void 0!==ft(e)});return r.forEach(function(e,t){r.indexOf(e)===t&&void 0!==ft(e)&&["".concat(e,"=; expires=").concat(n.toUTCString()),"".concat(e,"=; expires=").concat(n.toUTCString(),"; path=/")].forEach(function(e){document.cookie=e;var t=location.hostname;if(-1!==t.indexOf("."))for(var r=t.split("."),n=0;n<r.length;n++)document.cookie="".concat(e,"; domain=.").concat(r.slice(n).join("."))})}),o&&r.every(function(e){return void 0===ft(e)})}function vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(r),!0).forEach(function(t){Ve(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function mt(e){var t,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""}).id,n=function(){},o=new Promise(function(e,r){t=e,n=r}),i=function(){l(),t("loaded")},a=document.createElement("link");a||n(new Error("Not support create link element"));var u="onload"in a,c=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(a.rel="stylesheet",a.type="text/css",a.href=e,void 0!==r&&(a.id=r),document.getElementsByTagName("head")[0].appendChild(a),c||!u)return setTimeout(function(){f(a,i,0)},1),o;function s(){i()}function l(){a&&(a.onload=a.onerror=a.onreadystatechange=null),a=null}function f(e,t,r){if(e){var n,o=e.sheet;if((r+=1)>3e5)return n=!0,e&&(e=null),void t();if(c)o&&(n=!0);else if(o)try{o.cssRules&&(n=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(n=!0)}setTimeout(function(){n?t():f(e,t,r)},20)}}return u?(a.onload=s,a.onerror=function(){l(),n(new Error("Failed to load CSS: ".concat(e)))}):a.onreadystatechange=function(){a&&/loaded|complete/.test(a.readyState)&&s()},o}var ht={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function yt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt({},ht),r=Object.assign(gt({},ht),t),n=r.id,o=r.callback,i=r.timeout,a=r.isDefer,u=r.isAsync,c=r.isCrossOrigin,s=r.attributes,l=r.cssUrl;if(l){var f=function(e,t){if(!t)return"";if(Be(t))return t;try{var r=new URL(e,location.href);return new URL(t,r).href}catch(r){var n=e.split("/");return n.pop(),"".concat(n.join("/"),"/").concat(t)}}(e,l);f&&mt(f).catch(function(e){console.error("Failed to load CSS from ".concat(f,": ").concat(null==e?void 0:e.message))})}return new Promise(function(t,r){var l=document.createElement("script"),f=!1,p=null,d=function(){l.onload=null,l.onerror=null,l.onreadystatechange=null,null!==p&&(clearTimeout(p),p=null)},v=function(){if(!f){f=!0,d();try{se(o),t("loaded")}catch(e){r(e)}}},g=function(e){f||(f=!0,d(),r(e))};l.type="text/javascript",l.defer=Boolean(a),l.async=Boolean(u),c&&(l.crossOrigin="anonymous"),n&&(l.id=n),s&&Object.keys(s).forEach(function(e){l.setAttribute(e,s[e])}),l.readyState?l.onreadystatechange=function(){"loaded"!==l.readyState&&"complete"!==l.readyState||v()}:l.onload=v,l.onerror=function(){return g(new Error("Failed to load script: ".concat(e)))},l.src=e,i&&(p=setTimeout(function(){return g(new Error("timeout"))},i));var m=document.getElementsByTagName("script")[0];null!=m&&m.parentNode?m.parentNode.insertBefore(l,m):(document.head||document.body||document.documentElement).appendChild(l)})}var wt=new Map;function bt(e){if("undefined"==typeof window)return!1;var t=[],r=window.PerformanceObserver;return!!r&&(le(r.supportedEntryTypes)&&(t=r.supportedEntryTypes),t.includes(e))}function xt(){return St.apply(this,arguments)}function St(){return(St=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().find(function(e){return"first-contentful-paint"===e.name});n&&(t.disconnect(),e(Math.round(n.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Et(){return Tt.apply(this,arguments)}function Tt(){return(Tt=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().find(function(e){return"first-paint"===e.name});n&&(t.disconnect(),e(Math.round(n.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ot(){return(Ot=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("largest-contentful-paint")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});n&&(t.disconnect(),e(Math.round(n.startTime)))});t.observe({type:"largest-contentful-paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function At(){return(At=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("first-input")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().find(function(e){return"first-input"===e.entryType});if(n){t.disconnect();var o=n.processingStart;e(o?Math.round(n.processingStart-n.startTime):0)}});t.observe({type:"first-input",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function jt(){return(jt=S(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("layout-shift")){e.next=1;break}return e.abrupt("return",0);case 1:return e.abrupt("return",new Promise(function(e){var t=new window.PerformanceObserver(function(r){var n=r.getEntries().reduce(function(e,t){var r=0;return ue(t.value)&&(r=t.value),e+r},0);t.disconnect(),e(n)});t.observe({type:"layout-shift",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function _t(){return(_t=S(W.mark(function e(){var t,r;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(bt("navigation")){e.next=1;break}return e.abrupt("return",0);case 1:if(window.performance&&window.performance.getEntriesByType){e.next=2;break}return e.abrupt("return",0);case 2:if(t=window.performance.getEntriesByType("navigation")[0],r=0,t){e.next=3;break}return e.abrupt("return",0);case 3:return r=t.responseStart-t.requestStart,e.abrupt("return",Math.round(r));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ct(){return Ct=S(W.mark(function e(){var t,n,o,i,a,u,c,s,l,f,p,d,v,g,m,h,y,w,b,x,S,E,T,O,A,j,_,C,N,k,M,P,D,L,F,R,U,I,z,B,$,H,q,Y=arguments;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(q=function(e,t){var r=0;return t&&(r=e-t),r},H=function(){var e="";return window.screen&&window.screen.orientation&&"number"==typeof window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e},$=function(){var e="",t=window.navigator;if(t.connection&&t.connection.effectiveType)switch(t.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e},B=function(){var e,t=navigator.userAgent.toLowerCase(),r=t.match(/(ipad)/i)&&"ipad",n=t.match(/iphone os/i)&&"iphone os",o=t.match(/midp/i)&&"midp",i=t.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=t.match(/ucweb/i)&&"ucweb",u=t.match(/android/i)&&"android",c=t.match(/windows ce/i)&&"windows ce",s=t.match(/windows mobile/i)&&"windows mobile";return(e=r||n||o||i||a||u||c||s?n||o||i||a||u||c||s?"phone":r?"ipad":void 0:"pc")||(e=""),e},z=function(){var e="",t=navigator.userAgent,r=t.indexOf("Android")>-1,n=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(r&&(e=(i.match(/\d+\.\d+/g)||[])[0]),n&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e},I=function(){return navigator.userAgent.indexOf("Android")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"},U=function(){if(a){var e=a;j=e.decodedBodySize,_=e.encodedBodySize;var r=a;l=r.unloadEventEnd,f=r.unloadEventStart,p=r.redirectEnd,d=r.redirectStart,v=r.domainLookupEnd,g=r.domainLookupStart,m=r.connectEnd,h=r.connectStart,y=r.secureConnectionStart,w=r.responseStart,b=r.requestStart,x=r.responseEnd,S=r.domContentLoadedEventStart,E=r.loadEventStart,T=r.loadEventEnd,O=r.startTime,A=r.fetchStart}else C&&(l=C.unloadEventEnd,f=C.unloadEventStart,p=C.redirectEnd,d=C.redirectStart,v=C.domainLookupEnd,g=C.domainLookupStart,m=C.connectEnd,h=C.connectStart,y=C.secureConnectionStart,w=C.responseStart,b=C.requestStart,x=C.responseEnd,S=C.domContentLoadedEventStart,E=C.loadEventStart,T=C.loadEventEnd,O=C.navigationStart,A=C.fetchStart);ue(O)?P=O:ue(A)&&(P=A);var n={source:N,os:I(),osVersion:z(),deviceType:B(),network:$(),screenDirection:H(),unloadTime:l-f,redirectTime:p-d,dnsTime:v-g,tcpTime:m-h,sslTime:q(m,y),responseTime:w-b,downloadTime:x-w,firstPaintTime:F,firstContentfulPaintTime:R,domReadyTime:S-P,onloadTime:E-P,whiteTime:w-P,renderTime:T-P,decodedBodySize:j,encodedBodySize:_};Object.keys(n).forEach(function(e){ue(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))}),ue(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var i={};t||Object.keys(n).forEach(function(e){i[te(e)]=n[e]}),Object.keys(i).length?o(i):o(n)},t=Y.length>0&&void 0!==Y[0]&&Y[0],bt("navigation")){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("navigation is not supported")));case 1:if((n=window.performance)&&"function"==typeof n.getEntries&&"function"==typeof n.getEntriesByType){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("performance is not supported")));case 2:if(i=new Promise(function(e){o=e}),a=null,le(u=n.getEntriesByType("navigation"))&&(a=u[0]),c=new Array(19).fill(0),s=r(c,19),l=s[0],f=s[1],p=s[2],d=s[3],v=s[4],g=s[5],m=s[6],h=s[7],y=s[8],w=s[9],b=s[10],x=s[11],S=s[12],E=s[13],T=s[14],O=s[15],A=s[16],j=s[17],_=s[18],C=n.timing,N="",!a){e.next=3;break}N="PerformanceNavigationTiming",j=(k=a).decodedBodySize,_=k.encodedBodySize,l=(M=a).unloadEventEnd,f=M.unloadEventStart,p=M.redirectEnd,d=M.redirectStart,v=M.domainLookupEnd,g=M.domainLookupStart,m=M.connectEnd,h=M.connectStart,y=M.secureConnectionStart,w=M.responseStart,b=M.requestStart,x=M.responseEnd,S=M.domContentLoadedEventStart,E=M.loadEventStart,T=M.loadEventEnd,O=M.startTime,A=M.fetchStart,e.next=5;break;case 3:if(!C){e.next=4;break}N="PerformanceTiming",l=C.unloadEventEnd,f=C.unloadEventStart,p=C.redirectEnd,d=C.redirectStart,v=C.domainLookupEnd,g=C.domainLookupStart,m=C.connectEnd,h=C.connectStart,y=C.secureConnectionStart,w=C.responseStart,b=C.requestStart,x=C.responseEnd,S=C.domContentLoadedEventStart,E=C.loadEventStart,T=C.loadEventEnd,O=C.navigationStart,A=C.fetchStart,e.next=5;break;case 4:return e.abrupt("return",Promise.reject(new Error("NavigationTiming and Timing are not supported")));case 5:if(P=0,!ue(O)){e.next=6;break}P=O,e.next=8;break;case 6:if(!ue(A)){e.next=7;break}P=A,e.next=8;break;case 7:return e.abrupt("return",Promise.reject(new Error("startTime, navigationStart or fetchStart are required")));case 8:return e.next=9,Promise.all([Et(),xt()]);case 9:return D=e.sent,L=r(D,2),F=L[0],R=L[1],ue(T)&&T>0?U():"complete"===document.readyState?window.setTimeout(U,0):window.addEventListener("load",function e(){window.removeEventListener("load",e),window.setTimeout(function(){U()},0)}),e.abrupt("return",i);case 10:case"end":return e.stop()}},e)})),Ct.apply(this,arguments)}function Nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(r),!0).forEach(function(t){Ve(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Mt=Object.freeze(["adsbot-google","ahrefsbot","amazonbot","applebot","baiduspider","bingbot","bingpreview","bytespider","ccbot","chatgpt-user","claudebot","discordbot","dotbot","duckduckbot","facebookexternalhit","facebot","google-inspectiontool","googlebot","googleother","gptbot","linkedinbot","mediapartners-google","mj12bot","perplexitybot","petalbot","semrushbot","slackbot","slurp","storebot-google","telegrambot","twitterbot","whatsapp","yandexbot"]),Pt=Object.freeze(["headlesschrome","phantomjs","slimerjs","selenium","puppeteer","playwright"]);function Dt(){try{return"undefined"==typeof navigator?null:navigator}catch(e){return null}}function Lt(e,t){var r=e.trim().toLowerCase();return t.some(function(e){return r.includes(e)})}function Ft(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:"",colorScheme:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var r=function(e){return e.test(t)},n=function(e){var r="",n=t.match(e);return n&&le(n)&&(r=(r=(r=n.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),r},o="",i="";r(/windows|win32|win64|wow32|wow64/g)?o="windows":r(/macintosh|macintel/g)?o="macos":r(/x11/g)?o="linux":r(/android|adr/g)?o="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(o="ios",r(/ipad/g)?i="ipad":r(/iphone/g)?i="iphone":r(/iwatch/g)?i="iwatch":r(/ipod/g)&&(i="ipod")),e=kt(kt({},e),{},{system:o,appleType:i});var a="";"windows"===o?r(/windows nt 5.0|windows 2000/g)?a="2000":r(/windows nt 5.1|windows xp/g)?a="xp":r(/windows nt 5.2|windows 2003/g)?a="2003":r(/windows nt 6.0|windows vista/g)?a="vista":r(/windows nt 6.1|windows 7/g)?a="7":r(/windows nt 6.2|windows 8/g)?a="8":r(/windows nt 6.3|windows 8.1/g)?a="8.1":r(/windows nt 10.0|windows 10/g)&&(a="10"):"macos"===o?a=n(/os x [\d._]+/g):"android"===o?a=n(/android [\d._]+/g):"ios"===o&&(a=n(/os [\d._]+/g)),e=kt(kt({},e),{},{systemVs:a});var u="";"windows"===o||"macos"===o||"linux"===o?u="desktop":("android"===o||"ios"===o||r(/mobile/g))&&(u="mobile"),e=kt(kt({},e),{},{platform:u});var c="",s="";r(/applewebkit/g)?(c="webkit",r(/edg(?:a|ios)?\//g)||r(/edge\//g)?s="edge":r(/opr/g)?s="opera":r(/chrome/g)?s="chrome":r(/safari/g)&&(s="safari")):r(/gecko/g)&&r(/firefox/g)?(c="gecko",s="firefox"):r(/presto/g)?(c="presto",s="opera"):r(/trident|compatible|msie/g)&&(c="trident",s="iexplore"),e=kt(kt({},e),{},{engine:c,supporter:s});var l="";"webkit"===c?l=n(/applewebkit\/[\d._]+/g):"gecko"===c?l=n(/gecko\/[\d._]+/g):"presto"===c?l=n(/presto\/[\d._]+/g):"trident"===c&&(l=n(/trident\/[\d._]+/g)),e=kt(kt({},e),{},{engineVs:l});var f="";"chrome"===s?f=n(/chrome\/[\d._]+/g):"safari"===s?f=n(/version\/[\d._]+/g):"firefox"===s?f=n(/firefox\/[\d._]+/g):"opera"===s?f=n(/opr\/[\d._]+/g):"iexplore"===s?f=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===s&&(f=n(/(?:edge|edg|edga|edgios)\/[\d._]+/g)),e=kt(kt({},e),{},{supporterVs:f});var p="",d="";r(/micromessenger/g)?(p="wechat",d=n(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",d=n(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",d=n(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",d=n(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",d=n(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),e=kt(kt({},e),{},{shell:p,shellVs:d});var v="";if(window.matchMedia){var g=window.matchMedia("(prefers-color-scheme: dark)"),m=window.matchMedia("(prefers-color-scheme: light)");g.matches?v="dark":m.matches&&(v="light")}return e=kt(kt({},e),{},{colorScheme:v}),window.MAZEY_BROWSER_INFO=e,e}catch(t){return Ke.warn(t),e}}var Rt="";function Ut(e){if("string"!=typeof e||""===e.trim())throw new TypeError("storageKey must be a non-empty string.")}function It(e){if("undefined"==typeof window)return null;try{return new URL(window.location.href).searchParams.get(e)}catch(e){return null}}function zt(e){if("undefined"==typeof window)return null;try{var t=window.localStorage;return t&&"function"==typeof t.getItem?t.getItem(e):null}catch(e){return null}}function Bt(e,t){if("undefined"==typeof window)return!1;try{var r=window.localStorage;return!(!r||"function"!=typeof r.setItem)&&(r.setItem(e,t),!0)}catch(e){return!1}}var $t=Object.freeze({system:"System",light:"Light",dark:"Dark"});function Ht(e){return"light"===e||"dark"===e}function qt(){if("undefined"==typeof window)return null;try{var e=window.matchMedia;return"function"!=typeof e?null:e.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}catch(e){return null}}function Yt(e,t){return{value:e,label:$t[t]}}function Wt(e){var t=e.split("-");if(!/^[a-z]{2,8}$/i.test(t[0]))return null;var r=[t[0].toLowerCase()],n=1;if(n<t.length&&/^[a-z]{4}$/i.test(t[n])){var o=t[n].toLowerCase();r.push("".concat(o[0].toUpperCase()).concat(o.slice(1))),n++}for(n<t.length&&(/^[a-z]{2}$/i.test(t[n])||/^\d{3}$/.test(t[n]))&&(r.push(/^[a-z]{2}$/i.test(t[n])?t[n].toUpperCase():t[n]),n++);n<t.length;n++){var i=t[n];if(!/^(?:[a-z0-9]{5,8}|\d[a-z0-9]{3})$/i.test(i))return null;r.push(i.toLowerCase())}return r.join("-")}function Vt(e){if("string"!=typeof e)return null;var t=e.trim().replace(/_/g,"-");if(!t)return null;if("undefined"!=typeof Intl)try{var r=Intl,n=r.getCanonicalLocales;if("function"==typeof n){var o=n.call(r,t)[0];return"string"==typeof o&&o?o:null}}catch(e){return e instanceof RangeError||"object"==typeof e&&null!==e&&"name"in e&&"RangeError"===e.name?null:Wt(t)}return Wt(t)}function Zt(e){if("undefined"==typeof Intl)return e;try{var t=Intl.DisplayNames;if("function"!=typeof t)return e;var r=new t([e],{type:"language"}).of(e);return"string"==typeof r&&r.trim()?r:e}catch(t){return e}}function Gt(e){return{value:e,label:Zt(e)}}exports.addClass=et,exports.addEvent=function(e,t){var r=ot();Array.isArray(r[e])||Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:[],writable:!0}),"function"==typeof t&&r[e].push(t)},exports.addStyle=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""};if(!e)return!1;var r=document.createDocumentFragment(),n=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(n=document.getElementById(o))?n.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,r.appendChild(i),document.head.appendChild(r))):(i.innerHTML=e,r.appendChild(i),document.head.appendChild(r)),!0},exports.assignDefined=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.forEach(function(t){void 0!==t&&Object.keys(t).forEach(function(r){var n=t[r];if(void 0!==n){var o=e;"__proto__"!==r||Object.prototype.hasOwnProperty.call(e,r)?o[r]=n:Object.defineProperty(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0})}})}),e},exports.calLongestCommonSubsequence=function(e,t){return w(e,t)},exports.calLongestCommonSubstring=function(e,t){return y(e,t)},exports.calculateCAGR=function(e,t,r){var n=c(e);if(!n)throw new TypeError("startDate must be a valid date.");var o=c(t);if(!o)throw new TypeError("endDate must be a valid date.");var i=o.getTime()-n.getTime();if(i<=0)throw new RangeError("endDate must be later than startDate.");var a=function(e){if("number"==typeof e){if(!Number.isFinite(e))throw new TypeError("totalReturnRate must be a finite number or percentage string.");return e}if("string"!=typeof e)throw new TypeError("totalReturnRate must be a finite number or percentage string.");var t=e.trim();if(!t)throw new TypeError("totalReturnRate must not be empty.");var r=t.endsWith("%")?t.slice(0,-1).trim():t;if(!r)throw new TypeError("totalReturnRate must be a valid percentage string.");var n=Number(r);if(!Number.isFinite(n))throw new TypeError("totalReturnRate must be a valid percentage string.");return n/100}(r);if(a<=-1)throw new RangeError("totalReturnRate must be greater than -1.");var u=i/864e5,s=Math.pow(1+a,365/u)-1;if(!Number.isFinite(s))throw new RangeError("calculated CAGR must be finite.");return s},exports.camelCase2Underscore=te,exports.camelCaseToKebabCase=function(e){return X(e)},exports.cancelBubble=function(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},exports.clearHTML=function(e){return ve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},exports.clearHtml=function(e){return ve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},exports.convert10To26=function(e){if(!Number.isFinite(e)||e<=0)return"";e=Math.floor(e);for(var t="";e>0;){var r=e%26;0===r&&(r=26),t=String.fromCharCode(r+96)+t,e=(e-r)/26}return t},exports.convertCamelToKebab=X,exports.convertCamelToUnder=ee,exports.convertHttpToHttps=$e,exports.convertKebabToCamel=function(e){var t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t.endsWith("-")?t.slice(0,-1):t},exports.convertObjectToQuery=function(e){return e&&0===Object.keys(e).length?"":"?".concat(Object.keys(e).map(function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))}).join("&"))},exports.convertToHtmlBreaks=de,exports.convertUnderToCamel=function(e){return e.replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})},exports.cutCHSString=function(e,t){return he(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])},exports.cutZHString=me,exports.debounce=function(e,t,r){var n=null,o=null,i=null,a=null,u=null,c=function(){var s=f()-i;s<t&&s>=0?o=setTimeout(c,t-s):(o=null,r||(u=e.apply(n,a),o||(n=a=null)))};return function(){n=this;for(var s=arguments.length,l=new Array(s),p=0;p<s;p++)l[p]=arguments[p];a=l,i=f();var d=r&&!o;return o||(o=setTimeout(c,t)),d&&(u=e.apply(n,a),n=a=null),u}},exports.deepCopy=Q,exports.deepCopyObject=function(e){return Q(e)},exports.deepFreeze=function e(t){return!t||"object"!=typeof t||Object.isFrozen(t)||(Object.freeze(t),Object.values(t).forEach(e)),t},exports.delCookie=function(e){dt(e)},exports.derivePackageMetadata=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError("manifest must be an object");if(null===r||"object"!=typeof r||Array.isArray(r))throw new TypeError("options must be an object when provided");var n=e;if("string"!=typeof n.name||!n.name.trim())throw new TypeError("manifest.name must be a non-empty string");var o=n.name.trim(),i=function(e){if(/\s/.test(e))throw new TypeError("manifest.name must not contain whitespace");if(e.startsWith("@")){var t=e.split("/");if(2!==t.length||t[0].length<2||!t[1])throw new TypeError("manifest.name must be a valid scoped package name");return t[1]}if(e.includes("/"))throw new TypeError("manifest.name must be an unscoped or scoped package name");return e}(o),a=null!==(t=r.packageManager)&&void 0!==t?t:"npm";if("npm"!==a&&"pnpm"!==a&&"yarn"!==a)throw new TypeError('packageManager must be "npm", "pnpm", or "yarn"');var u="npm"===a?"npm install":"".concat(a," add");return{name:o,version:je(n,"version"),description:je(n,"description"),license:je(n,"license"),author:_e(n.author),unscopedName:i,iifeGlobal:re(i),installCommand:"".concat(u," ").concat(o)}},exports.detectVisitorType=function(e){if(void 0!==e&&"string"!=typeof e)throw new TypeError("userAgent must be a string when provided.");var t=void 0===e?function(){var e=Dt();if(!e)return"";try{var t=e.userAgent;return"string"==typeof t?t:""}catch(e){return""}}():e;return Lt(t,Mt)?"crawler":Lt(t,Pt)||function(){var e=Dt();if(!e)return!1;try{return!0===e.webdriver}catch(e){return!1}}()?"automation":"unknown"},exports.doFn=se,exports.extractElementText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.excludeSelector,n=void 0===r?"":r,o=t.replaceImagesWithAlt,i=void 0===o||o,a=t.normalizeWhitespace,u=void 0===a||a,c=e.cloneNode(!0);i&&Array.from(c.querySelectorAll("img[alt]")).forEach(function(e){var t,r=e.getAttribute("alt")||"";null===(t=e.parentNode)||void 0===t||t.replaceChild(c.ownerDocument.createTextNode(r),e)});var s=n.trim();s&&rt(s,{root:c})&&Array.from(c.querySelectorAll(s)).forEach(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)});var l=c.innerText||c.textContent||"";return u?l.replace(/\u00a0/g," ").replace(/\s+/g," ").trim():l},exports.fireEvent=it,exports.floatFixed=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(String(e)).toFixed(t)},exports.floatToPercent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="";return r=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(r,"%")},exports.formatByteSize=we,exports.formatDate=h,exports.formatDistanceToNow=function(e){var t=c(e);if(!t)return"";var r=6e4,n=36e5,o=864e5,i=Math.abs(t.getTime()-Date.now());return i<3e4?"less than a minute":i<9e4?"about 1 minute":i<27e5?m(i/r,"minute"):i<54e5?"about 1 hour":i<864e5?m(i/n,"hour"):i<1512e5?"about 1 day":i<30*o?m(i/o,"day"):i<45*o?"about 1 month":i<365*o?m(i/(30*o),"month"):i<545*o?"about 1 year":m(i/(365*o),"year")},exports.formatDurationFromMs=function(e){var t=(Number.isFinite(e)?Math.max(e,0):0)/1e3;return t>=86400?g(t/24/60/60,"day"):t>=3600?g(t/60/60,"hour"):t>=60?g(t/60,"minute"):g(t,"second")},exports.formatLocalDateTime=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="object"==typeof e&&null!==e?n(e):null;if(null===o)throw new TypeError("date must be a Date");if(!Number.isFinite(o))throw new RangeError("Invalid date");var i=null!==(t=r.precision)&&void 0!==t?t:"minute";if("minute"!==i&&"second"!==i&&"millisecond"!==i)throw new TypeError("precision must be minute, second, or millisecond");var a=new Date(o),u=a.getFullYear();if(u<1)throw new RangeError("Date year must be greater than zero");var c=[l(u,4),l(a.getMonth()+1,2),l(a.getDate(),2)].join("-"),s=[l(a.getHours(),2),l(a.getMinutes(),2)];"minute"!==i&&s.push(l(a.getSeconds(),2));var f="".concat(c,"T").concat(s.join(":"));return"millisecond"===i&&(f+=".".concat(l(a.getMilliseconds(),3))),f},exports.genBrowserAttrs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",r=Ft(),n=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=r[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(t)),n.push("".concat(a).concat(i))}}),n},exports.genCustomConsole=Qe,exports.genHashCode=function(e){var t,r=0;for(t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r},exports.genRndNumString=oe,exports.genStyleString=function(e,t){var r="";return t&&t.length>0&&(r=t.join(";")+";"),"".concat(e,"{").concat(r,"}")},exports.genUniqueNumString=ae,exports.generateCalendarVersion=function(e){return h(void 0===e?new Date:new Date(e instanceof Date?e.getTime():e),"yyyy.MMdd.HHmmss").split(".").map(function(e){return String(Number(e))}).join(".")},exports.generateRndNum=ie,exports.generateUniqueNum=function(){return ae(arguments.length>0&&void 0!==arguments[0]?arguments[0]:3)},exports.getAllQueryParams=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";""===e&&(e=location.search);var t={};return Ne(e).forEach(function(e){var n=r(e,2),o=n[0],i=n[1];Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:i,writable:!0})}),t},exports.getBrowserInfo=Ft,exports.getCLS=function(){return jt.apply(this,arguments)},exports.getCookie=pt,exports.getCurrentVersion=function(){return"v4"},exports.getDateDifference=v,exports.getDefineListeners=ot,exports.getDomain=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["hostname"];if(He(e)){var r=new window.URL(e);return t.reduce(function(e,t){return e+=r[t]},"")}var n=document.createElement("a");return n.href=e,t.reduce(function(e,t){return e+=n[t]},"")},exports.getFCP=xt,exports.getFID=function(){return At.apply(this,arguments)},exports.getFP=Et,exports.getFileSize=function(e){return we(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},exports.getFriendlyInterval=function(){return v(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:p)},exports.getHashQueryParam=function(e){var t=location.hash.split("?");return 1===t.length?"":ke("?".concat(t.slice(1).join("?")),e)[0]||""},exports.getLCP=function(){return Ot.apply(this,arguments)},exports.getLocalStorage=function(e){var t=null;if(e){var r=localStorage.getItem(e);if(r)try{t=JSON.parse(r)}catch(e){t=r}}return t},exports.getPageMeta=function(e){for(var t=document.getElementsByTagName("meta"),r=0;r<t.length;r++)if(t[r].getAttribute("name")===e)return t[r].getAttribute("content")||"";return""},exports.getPerformance=function(){return Ct.apply(this,arguments)},exports.getQueryParam=function(e){return ke(location.search,e)[0]||""},exports.getScriptQueryParam=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t||(t=".js");for(var r=document.querySelectorAll("script[src]"),n=0;n<r.length;n++){var o=r[n].getAttribute("src");if(o&&-1!==o.indexOf(t)){var i=ke(o,e)[0];if(void 0!==i)return i}}return""},exports.getSessionStorage=function(e){var t=null;if(e){var r=sessionStorage.getItem(e);if(r)try{t=JSON.parse(r)}catch(e){t=r}}return t},exports.getSystemTheme=qt,exports.getTTFB=function(){return _t.apply(this,arguments)},exports.getUrlFileType=function(e){var t="";if("string"!=typeof e||""==e)return t;var r=e.split(/[?#]/,1)[0],n=/\.[^/]+$/.exec(r);return n?(n[0].length>1&&(t=n[0].substring(1)),t):t},exports.getUrlHost=function(e){var t="";return!Be(e)&&Be(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),He(e)&&(t=new URL(e).host),t},exports.getUrlParam=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=ke(e,t);return r.returnArray?n:n.length?n[0]:null},exports.getUrlPath=function(e){var t="";return!Be(e)&&Be(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),He(e)&&(t=new URL(e).pathname),t},exports.hasClass=function(e,t){if(!e)return Ke.error("The element is not exist."),!1;for(var r=e.className.split(/\s+/),n=0;n<r.length;n++)if(r[n]===t)return!0;return!1},exports.inRate=function(e){return b(e)},exports.invokeEvent=function(e,t){it(e,t)},exports.invokeFn=ce,exports.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},exports.isBool=pe,exports.isBoolean=function(e){return pe(e)},exports.isBrowser=function(){if(Te)return"browser"===Te;var e="undefined"!=typeof window;return e&&(Te="browser"),e},exports.isFunction=function(e){return"function"==typeof e},exports.isHit=b,exports.isJSONString=ne,exports.isJsonString=function(e){return ne(e)},exports.isNonEmptyArray=le,exports.isNonEmptyObject=function(e){return!!fe(e)&&0!==Object.keys(e).length},exports.isNumber=ue,exports.isPureObject=fe,exports.isSafePWAEnv=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof window||"undefined"==typeof navigator)return!1;try{var t;if(null===e||"object"!=typeof e||Array.isArray(e))return!1;var r=e.requireManifest,n=e.scope;if(void 0!==r&&"boolean"!=typeof r||void 0!==n&&"string"!=typeof n)return!1;if(!0!==window.isSecureContext||!("serviceWorker"in navigator))return!1;if(void 0!==n&&!function(e){var t=e.trim();if(!t||/[?#]/.test(t))return!1;try{var r=new URL(window.location.href),n=new URL(t,r);if(n.origin!==r.origin||""!==n.search||""!==n.hash)return!1;if(r.pathname===n.pathname)return!0;var o=n.pathname.endsWith("/")?n.pathname:"".concat(n.pathname,"/");return r.pathname.startsWith(o)}catch(e){return!1}}(n))return!1;if(!1===r)return!0;if("undefined"==typeof document)return!1;var o=document.querySelector('link[rel~="manifest"][href]');return Boolean(null==o||null===(t=o.getAttribute("href"))||void 0===t?void 0:t.trim())}catch(e){return!1}},exports.isStandalonePWA=function(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;var e=navigator;try{var t=window.matchMedia;if("function"==typeof t&&t.call(window,"(display-mode: standalone)").matches)return!0}catch(e){}try{return!0===e.standalone}catch(e){return!1}},exports.isString=function(e){return"string"==typeof e},exports.isSupportWebp=function(){return Rt?Promise.resolve("webp"===Rt):new Promise(function(e){var t=new Image;t.onload=function(){var r=t.width>0&&t.height>0;Rt=r?"webp":"no-webp",e(r)},t.onerror=function(){Rt="no-webp",e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})},exports.isSupportedEntryType=bt,exports.isThisHour=function(e){var t=c(e);if(!t)return!1;var r=new Date;return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()&&t.getHours()===r.getHours()},exports.isThisMonth=function(e){var t=c(e);if(!t)return!1;var r=new Date;return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()},exports.isThisWeek=function(e){var t=c(e);if(!t)return!1;var r=new Date,n=(r.getDay()+6)%7;r.setHours(0,0,0,0),r.setDate(r.getDate()-n);var o=new Date(r.getTime());o.setDate(o.getDate()+7);var i=t.getTime();return i>=r.getTime()&&i<o.getTime()},exports.isThisYear=function(e){var t=c(e);return null!==t&&t.getFullYear()===(new Date).getFullYear()},exports.isToday=function(e){var t=c(e);if(!t)return!1;var r=new Date;return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate()},exports.isUdfOrNul=function(e){return null==e},exports.isValidCssSelector=rt,exports.isValidData=function(e,t,r){if(null===e||"object"!=typeof e)return!1;var n,o=e,i=V(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(null===o||"object"!=typeof o&&"function"!=typeof o||!Object.prototype.hasOwnProperty.call(o,a))return!1;o=o[a]}}catch(e){i.e(e)}finally{i.f()}return o===r},exports.isValidDate=function(e){return null!==c(e)},exports.isValidEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},exports.isValidHttpUrl=Be,exports.isValidPhoneNumber=function(e){return/^1\d{10}$/.test(e)},exports.isValidUrl=function(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)},exports.listenMediaQueryChanges=function(e,t){if("function"!=typeof t)throw new TypeError("listener must be a function");if(null===e)return function(){};if("object"!=typeof e)throw new TypeError("media must be a MediaQueryList or null");var r=e.addEventListener,n=e.removeEventListener,o=e.addListener,i=e.removeListener,a=null;if("function"==typeof r&&"function"==typeof n){var u=t;r.call(e,"change",u),a=function(){return n.call(e,"change",u)}}else"function"==typeof o&&"function"==typeof i&&(o.call(e,t),a=function(){return i.call(e,t)});var c=!1;return function(){var e;c||(c=!0,null===(e=a)||void 0===e||e())}},exports.loadCSS=mt,exports.loadImage=function(e){return new Promise(function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=function(e){r(e)},n.src=e})},exports.loadScript=yt,exports.loadScriptIfUndefined=function(e,t){var r;if(window[e])return Promise.resolve("defined");var n=wt.get(e),o=null===(r=n)||void 0===r?void 0:r.get(t);if(o)return o;n||(n=new Map,wt.set(e,n));var i=function(){var r,o;null===(r=n)||void 0===r||r.delete(t),0===(null===(o=n)||void 0===o?void 0:o.size)&&wt.delete(e)},a=yt(t).then(function(e){return i(),e},function(e){throw i(),e});return n.set(t,a),a},exports.longestComSubsequence=w,exports.longestComSubstring=y,exports.mNow=f,exports.mTrim=function(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,r=/\s/;r.test(e.charAt(t));)t--;return e.slice(0,t+1)},exports.mazeyCon=Ke,exports.newLine=function(e){return de(e)},exports.onURLChange=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fireOnInit,r=void 0===t||t,n=history,o=location.href,i=[],a=function(t){var r=location.href;if(r!==o||"load"===t){var n=o;o=r,e({url:r,oldUrl:n,trigger:t})}},u=function(){return a("popstate")},c=function(){return a("hashchange")};window.addEventListener("popstate",u),window.addEventListener("hashchange",c),i.push(function(){return window.removeEventListener("popstate",u)}),i.push(function(){return window.removeEventListener("hashchange",c)}),n.__mazeyUrlChangePatched__||(n.__mazeyUrlChangePatched__=!0,n.__mazeyUrlChangeSubscribers__=new Set,n.__mazeyRawPushState__=history.pushState.bind(history),n.__mazeyRawReplaceState__=history.replaceState.bind(history),history.pushState=function(){n.__mazeyRawPushState__.apply(n,arguments),n.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("pushState")})},history.replaceState=function(){n.__mazeyRawReplaceState__.apply(n,arguments),n.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("replaceState")})});var s=function(e){return a(e)};return n.__mazeyUrlChangeSubscribers__.add(s),i.push(function(){return n.__mazeyUrlChangeSubscribers__.delete(s)}),r&&a("load"),function(){i.forEach(function(e){return e()})}},exports.parseGitHubRepository=function(e){if("string"!=typeof e)throw new TypeError("value must be a string");var t=e.trim();if(!t||/[%\\?#]/.test(t)||function(e){for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<=31||127===r)return!0}return!1}(t))throw De();var r=t.match(/^(?:github:)?([^/:\s]+)\/([^/\s]+)$/i);if(r)return Le(r[1],r[2]);var n=t.match(/^git@([^:\s]+):([^/\s]+)\/([^/\s]+)$/);if(n&&"github.com"===n[1].toLowerCase())return Le(n[2],n[3]);var o,i=t.replace(/^git\+(?=(?:git|ssh|https?):\/\/)/i,""),a=i.match(/^[a-z][a-z\d+.-]*:\/\/([^/?#]+)/i);if(!a||/(^|\/)\.{1,2}(?:\/|$)/.test(i.slice(a[0].length)))throw De();if(-1!==a[1].slice(a[1].lastIndexOf("@")+1).indexOf(":")||"function"!=typeof URL)throw De();try{o=new URL(i)}catch(e){throw De()}var u=o.protocol.toLowerCase(),c=o.hostname.toLowerCase().replace(/^www\./,"");if(!["git:","ssh:","http:","https:"].includes(u)||"github.com"!==c||""!==o.username&&"git"!==o.username||""!==o.password||""!==o.search||""!==o.hash)throw De();var s=o.pathname.match(/^\/([^/]+)\/([^/]+)\/?$/);if(!s)throw De();return Le(s[1],s[2])},exports.parseJsonSafe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{return JSON.parse(e)}catch(e){return t}},exports.parseLocalDateTime=function(e){if("string"!=typeof e)return null;var t=s.exec(e);if(!t)return null;var n=r(t.slice(1),7),o=n[0],i=n[1],c=n[2],l=n[3],f=n[4],p=n[5],d=void 0===p?"0":p,v=n[6],g=void 0===v?"":v,m=Number(o),h=Number(i),y=Number(c),w=Number(l),b=Number(f),x=Number(d),S=Number("".concat(g,"00").slice(0,3));return m<1||!a(m,h,y,w,b,x,S)?null:u(m,h,y,w,b,x,S)},exports.removeClass=function(e,t){var r;e?(r=(r=(r=(r=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=r):Ke.error("The element is not exist.")},exports.removeCookie=dt,exports.removeEvent=function(e,t){var r=ot(),n=r[e];if("string"==typeof e&&Array.isArray(n))if("function"==typeof t){for(var o=0,i=n.length;o<i;o++)if(n[o]===t){r[e].splice(o,1);break}}else delete r[e]},exports.removeHTML=ve,exports.removeHtml=function(e){return ve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},exports.repeatUntilConditionMet=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return!0===e},n=t.interval,o=void 0===n?1e3:n,i=t.times,a=void 0===i?10:i,u=t.context,c=t.args;if("function"==typeof e){if(!Number.isFinite(o)||o<0)console.error("Expected a non-negative number for interval.");else if(!Number.isFinite(a)||a<0)console.error("Expected a non-negative number for times.");else if(0!==a){var s=0,l=function(){setTimeout(S(W.mark(function t(){var n;return W.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.apply(u,c);case 1:if(n=t.sent,!(r(n)||++s>=a)){t.next=2;break}return t.abrupt("return");case 2:l();case 3:case"end":return t.stop()}},t)})),o)};l()}}else console.error("Expected a function.")},exports.replaceHttp=function(e){return $e(e)},exports.resolveElementTarget=function(e,t){if(void 0===e)return nt(t.defaultElement)?t.defaultElement:null;var r=t.unwrap?t.unwrap(e):e;if(null==r)return null;if("string"==typeof r)try{return t.root.querySelector(r)}catch(e){return null}return"object"==typeof r&&"$el"in r&&(r=r.$el),nt(r)?r:null},exports.resolveLanguagePreference=function(e){Ut(e);var t=Vt(It("lang"));if(t)return Gt(t);var r=Vt(zt(e));if(r)return Gt(r);var n=Vt(function(){if("undefined"==typeof window||"undefined"==typeof navigator)return null;try{return"string"==typeof navigator.language?navigator.language:null}catch(e){return null}}());return Gt(null!=n?n:"en")},exports.resolveThemePreference=function(e){Ut(e);var t=It("theme");if(Ht(t))return Bt(e,t),Yt(t,t);var r=zt(e);if(Ht(r))return Yt(r,r);var n=qt();return"system"===r&&n||n?Yt(n,"system"):Yt("light","light")},exports.sanitizeInput=function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return t[e]})},exports.setClass=function(e,t){et(e,t)},exports.setCookie=function(e,t,r,n){var o;if(r){var i=new Date;i.setTime(i.getTime()+24*r*60*60*1e3),o="; expires="+i.toUTCString()}else o="";var a=function(e){for(var t=!0,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(!(33===n||n>=35&&n<=43||n>=45&&n<=58||n>=60&&n<=91||n>=93&&n<=126)){t=!1;break}}return{isEncoded:!t,value:t?e:encodeURIComponent(e)}}(t),u=st(e),c=a.isEncoded?"1":"",s=a.isEncoded?o:"; expires=Thu, 01 Jan 1970 00:00:00 GMT",l=["".concat(u,"=").concat(a.value).concat(o,"; path=/"),"".concat(ct(e),"=").concat(c).concat(s,"; path=/")],f=function(e){var t=e?"; domain=".concat(e):"";l.forEach(function(e){document.cookie="".concat(e).concat(t)})},p=location.hostname;if(n)f(n);else if(-1===p.indexOf("."))f();else{var d=p.split(".");d.shift(),f("."+d.join(".")),pt(e)!==t&&f(".".concat(p))}},exports.setImgSizeBySrc=tt,exports.setImgWidHeiBySrc=function(){return tt()},exports.setLanguagePreference=function(e,t){Ut(e);var r=Vt(t);if(!r)throw new TypeError("language must be a valid language tag.");return Bt(e,r)},exports.setLocalStorage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var r=JSON.stringify(t);localStorage.setItem(e,void 0===r?"null":r)}},exports.setSessionStorage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var r=JSON.stringify(t);sessionStorage.setItem(e,void 0===r?"null":r)}},exports.setThemePreference=function(e,t){if(Ut(e),!function(e){return"system"===e||Ht(e)}(t))throw new TypeError('value must be "system", "light", or "dark".');return Bt(e,t)},exports.sha256Hex=function(e){return be.apply(this,arguments)},exports.sleep=function(e){return Ee.apply(this,arguments)},exports.subYears=function(e,t){var r="number"==typeof e?e:"object"==typeof e&&null!==e?n(e):null,o=new Date(null!=r?r:NaN),i="number"==typeof t?t<0?Math.ceil(t):Math.floor(t):NaN;if(!Number.isFinite(o.getTime())||!Number.isFinite(i))return new Date(NaN);if(0===i)return o;var a=o.getMonth(),u=o.getDate(),c=o.getFullYear()-i,s=new Date(o.getTime());return s.setFullYear(c,a+1,0),u>=s.getDate()?s:(o.setFullYear(c,a,u),o)},exports.throttle=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=Object.assign({},r);var n=null,o=null,i=null,a=null,u=0,c=function(){u=!1===r.leading?0:f(),i=null,a=e.apply(this,o),i||(n=o=null)};return function(){var s=f();u||!1!==r.leading||(u=s);var l=t-(s-u);n=this;for(var p=arguments.length,d=new Array(p),v=0;v<p;v++)d[v]=arguments[v];return o=d,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=s,a=e.apply(n,o),i||(n=o=null)):i||!1===r.trailing||(i=setTimeout(c.bind(n),l)),a}},exports.timeCon=Xe,exports.toJavaScriptGlobalName=re,exports.truncateZHString=he,exports.unsanitize=function(e){return ge(e)},exports.unsanitizeInput=ge,exports.updateQueryParam=function(e,t,r){var n=e.indexOf("#"),o=-1===n?"":e.slice(n),i=-1===n?e:e.slice(0,n),a=i.indexOf("?"),u=-1===a?i:i.slice(0,a),c=-1===a?"":i.slice(a+1),s=encodeURIComponent(t),l=encodeURIComponent(r),f=!1,p=(c?c.split("&").filter(Boolean):[]).reduce(function(e,r){var n=r.indexOf("=");return Ce(-1===n?r:r.slice(0,n))===t?f||(e.push("".concat(s,"=").concat(l)),f=!0):e.push(r),e},[]);return f||p.push("".concat(s,"=").concat(l)),"".concat(u,"?").concat(p.join("&")).concat(o)},exports.waitTime=xe,exports.watchServiceWorkerUpdates=function(e,t,r){if(null===e||"object"!=typeof e||"function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)throw new TypeError("registration must support event listeners");if(null===t||"object"!=typeof t||"function"!=typeof t.addEventListener||"function"!=typeof t.removeEventListener)throw new TypeError("container must support event listeners");if(null===r||"object"!=typeof r||"function"!=typeof r.onUpdateAvailable||void 0!==r.onControllerChange&&"function"!=typeof r.onControllerChange)throw new TypeError("callbacks must provide onUpdateAvailable");var n=!1,o=null,i=null,a=!1,u=!1,c=function(e){n||i===e||(i=e,r.onUpdateAvailable(e))},s=function(){var e;!n&&"installed"===(null===(e=o)||void 0===e?void 0:e.state)&&t.controller&&c(o)},l=function(){var t,r;n||(null===(t=o)||void 0===t||t.removeEventListener("statechange",s),null===(r=o=e.installing)||void 0===r||r.addEventListener("statechange",s),s())},f=function(){var e;n||null===(e=r.onControllerChange)||void 0===e||e.call(r)},p=function(){if(a){try{e.removeEventListener("updatefound",l)}catch(e){}a=!1}try{var r;null===(r=o)||void 0===r||r.removeEventListener("statechange",s)}catch(e){}if(u){try{t.removeEventListener("controllerchange",f)}catch(e){}u=!1}};try{e.addEventListener("updatefound",l),a=!0,t.addEventListener("controllerchange",f),u=!0,e.waiting&&t.controller&&c(e.waiting),e.installing&&l()}catch(e){throw n=!0,p(),o=null,i=null,e}return{activateWaiting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"SKIP_WAITING"};if(n||!i)return!1;try{return i.postMessage(e),!0}catch(e){return!1}},dispose:function(){n||(n=!0,p(),o=null,i=null)}}},exports.windowLoaded=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return new Promise(function(t,r){var n=null,o=function(){window.removeEventListener("load",i),null!==n&&(clearTimeout(n),n=null)},i=function(){o(),t("load")};"complete"!==document.readyState?(window.addEventListener("load",i),n=setTimeout(function(){o(),r(new Error("timeout"))},e)):t("complete")})},exports.zAxiosIsValidRes=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{validStatusRange:[200,300],validCode:[0]})||{},r=t.validStatusRange,n=void 0===r?[200,300]:r,o=t.validCode,i=void 0===o?[0]:o;2!==n.length&&console.error("valid validStatusRange is required");var a=!1;if(e&&e.status&&2===n.length&&e.status>=n[0]&&e.status<n[1]){var u=e.data;u&&i.includes(u.code)&&(a=!0)}return a};
|
package/lib/index.d.ts
CHANGED
|
@@ -3967,6 +3967,35 @@ type ThemePreference = "system" | "light" | "dark";
|
|
|
3967
3967
|
* @category Browser Information
|
|
3968
3968
|
*/
|
|
3969
3969
|
type ResolvedTheme = "light" | "dark";
|
|
3970
|
+
/**
|
|
3971
|
+
* Read the operating system's current color-scheme preference.
|
|
3972
|
+
*
|
|
3973
|
+
* This performs one synchronous
|
|
3974
|
+
* `(prefers-color-scheme: dark)` media-query check. It returns `dark` when
|
|
3975
|
+
* the query matches, `light` when the query is available and does not match,
|
|
3976
|
+
* or `null` when the preference cannot be read safely.
|
|
3977
|
+
*
|
|
3978
|
+
* Usage:
|
|
3979
|
+
*
|
|
3980
|
+
* ```ts
|
|
3981
|
+
* import { getSystemTheme } from "mazey";
|
|
3982
|
+
*
|
|
3983
|
+
* const systemTheme = getSystemTheme();
|
|
3984
|
+
*
|
|
3985
|
+
* console.log(systemTheme);
|
|
3986
|
+
* ```
|
|
3987
|
+
*
|
|
3988
|
+
* Possible browser output:
|
|
3989
|
+
*
|
|
3990
|
+
* ```text
|
|
3991
|
+
* dark
|
|
3992
|
+
* ```
|
|
3993
|
+
*
|
|
3994
|
+
* @returns The current `light` or `dark` system theme, or `null` during SSR and in unsupported or inaccessible environments.
|
|
3995
|
+
* @remarks Unlike `resolveThemePreference`, this function does not inspect URL parameters or storage and does not provide a fallback theme. It performs a one-time read without mutating the DOM, applying a theme, writing storage, or adding media-query listeners. Use `listenMediaQueryChanges` when future changes must be observed.
|
|
3996
|
+
* @category Browser Information
|
|
3997
|
+
*/
|
|
3998
|
+
declare function getSystemTheme(): ResolvedTheme | null;
|
|
3970
3999
|
/**
|
|
3971
4000
|
* Resolve the current website theme.
|
|
3972
4001
|
*
|
|
@@ -4218,5 +4247,5 @@ declare const mazeyCon: Console;
|
|
|
4218
4247
|
*/
|
|
4219
4248
|
declare const timeCon: Console;
|
|
4220
4249
|
|
|
4221
|
-
export { addClass, addEvent, addStyle, assignDefined, calLongestCommonSubsequence, calLongestCommonSubstring, calculateCAGR, camelCase2Underscore, camelCaseToKebabCase, cancelBubble, clearHTML, clearHtml, convert10To26, convertCamelToKebab, convertCamelToUnder, convertHttpToHttps, convertKebabToCamel, convertObjectToQuery, convertToHtmlBreaks, convertUnderToCamel, cutCHSString, cutZHString, debounce, deepCopy, deepCopyObject, deepFreeze, delCookie, derivePackageMetadata, detectVisitorType, doFn, extractElementText, fireEvent, floatFixed, floatToPercent, formatByteSize, formatDate, formatDistanceToNow, formatDurationFromMs, formatLocalDateTime, genBrowserAttrs, genCustomConsole, genHashCode, genRndNumString, genStyleString, genUniqueNumString, generateCalendarVersion, generateRndNum, generateUniqueNum, getAllQueryParams, getBrowserInfo, getCLS, getCookie, getCurrentVersion, getDateDifference, getDefineListeners, getDomain, getFCP, getFID, getFP, getFileSize, getFriendlyInterval, getHashQueryParam, getLCP, getLocalStorage, getPageMeta, getPerformance, getQueryParam, getScriptQueryParam, getSessionStorage, getTTFB, getUrlFileType, getUrlHost, getUrlParam, getUrlPath, hasClass, inRate, invokeEvent, invokeFn, isArray, isBool, isBoolean, isBrowser, isFunction, isHit, isJSONString, isJsonString, isNonEmptyArray, isNonEmptyObject, isNumber, isPureObject, isSafePWAEnv, isStandalonePWA, isString, isSupportWebp, isSupportedEntryType, isThisHour, isThisMonth, isThisWeek, isThisYear, isToday, isUdfOrNul, isValidCssSelector, isValidData, isValidDate, isValidEmail, isValidHttpUrl, isValidPhoneNumber, isValidUrl, listenMediaQueryChanges, loadCSS, loadImage, loadScript, loadScriptIfUndefined, longestComSubsequence, longestComSubstring, mNow, mTrim, mazeyCon, newLine, onURLChange, parseGitHubRepository, parseJsonSafe, parseLocalDateTime, removeClass, removeCookie, removeEvent, removeHTML, removeHtml, repeatUntilConditionMet, replaceHttp, resolveElementTarget, resolveLanguagePreference, resolveThemePreference, sanitizeInput, setClass, setCookie, setImgSizeBySrc, setImgWidHeiBySrc, setLanguagePreference, setLocalStorage, setSessionStorage, setThemePreference, sha256Hex, sleep, subYears, throttle, timeCon, toJavaScriptGlobalName, truncateZHString, unsanitize, unsanitizeInput, updateQueryParam, waitTime, watchServiceWorkerUpdates, windowLoaded, zAxiosIsValidRes };
|
|
4250
|
+
export { addClass, addEvent, addStyle, assignDefined, calLongestCommonSubsequence, calLongestCommonSubstring, calculateCAGR, camelCase2Underscore, camelCaseToKebabCase, cancelBubble, clearHTML, clearHtml, convert10To26, convertCamelToKebab, convertCamelToUnder, convertHttpToHttps, convertKebabToCamel, convertObjectToQuery, convertToHtmlBreaks, convertUnderToCamel, cutCHSString, cutZHString, debounce, deepCopy, deepCopyObject, deepFreeze, delCookie, derivePackageMetadata, detectVisitorType, doFn, extractElementText, fireEvent, floatFixed, floatToPercent, formatByteSize, formatDate, formatDistanceToNow, formatDurationFromMs, formatLocalDateTime, genBrowserAttrs, genCustomConsole, genHashCode, genRndNumString, genStyleString, genUniqueNumString, generateCalendarVersion, generateRndNum, generateUniqueNum, getAllQueryParams, getBrowserInfo, getCLS, getCookie, getCurrentVersion, getDateDifference, getDefineListeners, getDomain, getFCP, getFID, getFP, getFileSize, getFriendlyInterval, getHashQueryParam, getLCP, getLocalStorage, getPageMeta, getPerformance, getQueryParam, getScriptQueryParam, getSessionStorage, getSystemTheme, getTTFB, getUrlFileType, getUrlHost, getUrlParam, getUrlPath, hasClass, inRate, invokeEvent, invokeFn, isArray, isBool, isBoolean, isBrowser, isFunction, isHit, isJSONString, isJsonString, isNonEmptyArray, isNonEmptyObject, isNumber, isPureObject, isSafePWAEnv, isStandalonePWA, isString, isSupportWebp, isSupportedEntryType, isThisHour, isThisMonth, isThisWeek, isThisYear, isToday, isUdfOrNul, isValidCssSelector, isValidData, isValidDate, isValidEmail, isValidHttpUrl, isValidPhoneNumber, isValidUrl, listenMediaQueryChanges, loadCSS, loadImage, loadScript, loadScriptIfUndefined, longestComSubsequence, longestComSubstring, mNow, mTrim, mazeyCon, newLine, onURLChange, parseGitHubRepository, parseJsonSafe, parseLocalDateTime, removeClass, removeCookie, removeEvent, removeHTML, removeHtml, repeatUntilConditionMet, replaceHttp, resolveElementTarget, resolveLanguagePreference, resolveThemePreference, sanitizeInput, setClass, setCookie, setImgSizeBySrc, setImgWidHeiBySrc, setLanguagePreference, setLocalStorage, setSessionStorage, setThemePreference, sha256Hex, sleep, subYears, throttle, timeCon, toJavaScriptGlobalName, truncateZHString, unsanitize, unsanitizeInput, updateQueryParam, waitTime, watchServiceWorkerUpdates, windowLoaded, zAxiosIsValidRes };
|
|
4222
4251
|
export type { DerivePackageMetadataOptions, DerivedPackageMetadata, FormatByteSizeOptions, GitHubRepositoryDetails, InvestmentReturnRate, IsSafePWAEnvOptions, LocalDateTimePrecision, PackageManager, PackageManifest, PackageManifestAuthor, PreferenceResult, ResolveElementTargetOptions, ResolvedTheme, ServiceWorkerUpdateCallbacks, ServiceWorkerUpdateWatcher, ThemePreference, VisitorType };
|