mazey 5.6.0 → 5.6.2
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 +38 -0
- package/lib/index.cjs.js +2 -2
- package/lib/index.d.ts +89 -2
- package/lib/index.esm.js +2 -2
- package/lib/mazey.min.js +2 -2
- package/package.json +15 -3
package/lib/index.d.ts
CHANGED
|
@@ -456,6 +456,36 @@ declare function parseLocalDateTime(value: string): Date | null;
|
|
|
456
456
|
declare function formatLocalDateTime(date: Date, options?: {
|
|
457
457
|
precision?: LocalDateTimePrecision;
|
|
458
458
|
}): string;
|
|
459
|
+
/**
|
|
460
|
+
* Subtract a number of calendar years from a date.
|
|
461
|
+
*
|
|
462
|
+
* Positive decimal amounts are rounded with `Math.floor`; negative decimal
|
|
463
|
+
* amounts are rounded with `Math.ceil`. A negative amount therefore adds
|
|
464
|
+
* calendar years. When the destination year does not contain the original
|
|
465
|
+
* day, the result is clamped to the final day of that month.
|
|
466
|
+
*
|
|
467
|
+
* Usage:
|
|
468
|
+
*
|
|
469
|
+
* ```javascript
|
|
470
|
+
* import { formatDate, subYears } from "mazey";
|
|
471
|
+
*
|
|
472
|
+
* const result = subYears(new Date(2014, 8, 1), 5);
|
|
473
|
+
* console.log(formatDate(result, "yyyy-MM-dd"));
|
|
474
|
+
* ```
|
|
475
|
+
*
|
|
476
|
+
* Output:
|
|
477
|
+
*
|
|
478
|
+
* ```text
|
|
479
|
+
* 2009-09-01
|
|
480
|
+
* ```
|
|
481
|
+
*
|
|
482
|
+
* @param date Date or timestamp in milliseconds to change.
|
|
483
|
+
* @param amount Number of years to subtract. Positive decimals use `Math.floor`; negative decimals use `Math.ceil`.
|
|
484
|
+
* @returns A new `Date` with the specified number of calendar years subtracted. Invalid inputs produce an invalid `Date`.
|
|
485
|
+
* @remarks The calculation uses local calendar fields and preserves the local month, time, and day where possible. The supplied `Date` is not mutated.
|
|
486
|
+
* @category Util
|
|
487
|
+
*/
|
|
488
|
+
declare function subYears(date: Date | number, amount: number): Date;
|
|
459
489
|
/**
|
|
460
490
|
* Get the current timestamp in milliseconds.
|
|
461
491
|
*
|
|
@@ -2799,6 +2829,63 @@ declare function isValidCssSelector(selector: unknown, options?: {
|
|
|
2799
2829
|
allowEmpty?: boolean;
|
|
2800
2830
|
root?: ParentNode;
|
|
2801
2831
|
}): boolean;
|
|
2832
|
+
/**
|
|
2833
|
+
* Options for resolving an element target.
|
|
2834
|
+
*
|
|
2835
|
+
* @category DOM
|
|
2836
|
+
*/
|
|
2837
|
+
interface ResolveElementTargetOptions {
|
|
2838
|
+
/** Query root used to resolve selector targets. */
|
|
2839
|
+
root: ParentNode;
|
|
2840
|
+
/** Element returned when `target` is `undefined`. Defaults to `null`. */
|
|
2841
|
+
defaultElement?: Element | null;
|
|
2842
|
+
/** Optional adapter for ref-like or framework-specific target wrappers. */
|
|
2843
|
+
unwrap?: (value: unknown) => unknown;
|
|
2844
|
+
}
|
|
2845
|
+
/**
|
|
2846
|
+
* Resolve an element from a direct element, a selector, an optionally
|
|
2847
|
+
* unwrapped value, or a component-like object containing an `$el` element.
|
|
2848
|
+
* Selector queries are scoped to the supplied root. Invalid selectors,
|
|
2849
|
+
* unmatched selectors, `null`, and unsupported values return `null`.
|
|
2850
|
+
*
|
|
2851
|
+
* Usage:
|
|
2852
|
+
*
|
|
2853
|
+
* ```javascript
|
|
2854
|
+
* import { resolveElementTarget } from "mazey";
|
|
2855
|
+
*
|
|
2856
|
+
* const element = resolveElementTarget("#dialog", {
|
|
2857
|
+
* root: document,
|
|
2858
|
+
* defaultElement: document.documentElement,
|
|
2859
|
+
* });
|
|
2860
|
+
* console.log(element?.id);
|
|
2861
|
+
* ```
|
|
2862
|
+
*
|
|
2863
|
+
* Output:
|
|
2864
|
+
*
|
|
2865
|
+
* ```text
|
|
2866
|
+
* dialog
|
|
2867
|
+
* ```
|
|
2868
|
+
*
|
|
2869
|
+
* Ref-like values can be supported without coupling Mazey to a framework:
|
|
2870
|
+
*
|
|
2871
|
+
* ```javascript
|
|
2872
|
+
* const elementRef = { value: document.querySelector("#dialog") };
|
|
2873
|
+
* const element = resolveElementTarget(elementRef, {
|
|
2874
|
+
* root: document,
|
|
2875
|
+
* unwrap: value => value?.value,
|
|
2876
|
+
* });
|
|
2877
|
+
* ```
|
|
2878
|
+
*
|
|
2879
|
+
* @remarks Browser only unless compatible DOM objects are supplied. The
|
|
2880
|
+
* function does not query or mutate the DOM when given a direct element.
|
|
2881
|
+
* `defaultElement` is used only when `target` is `undefined`; an explicit
|
|
2882
|
+
* `null` target resolves to `null`.
|
|
2883
|
+
* @param target Direct element, selector, wrapped value, component-like value, or `undefined`.
|
|
2884
|
+
* @param options Query root, optional default element, and optional unwrap adapter.
|
|
2885
|
+
* @returns The resolved element, or `null` when the target cannot be resolved.
|
|
2886
|
+
* @category DOM
|
|
2887
|
+
*/
|
|
2888
|
+
declare function resolveElementTarget(target: unknown, options: ResolveElementTargetOptions): Element | null;
|
|
2802
2889
|
/**
|
|
2803
2890
|
* Extract text from a cloned element without modifying the original DOM.
|
|
2804
2891
|
* Images can be replaced by their `alt` text, selected descendants can be
|
|
@@ -4131,5 +4218,5 @@ declare const mazeyCon: Console;
|
|
|
4131
4218
|
*/
|
|
4132
4219
|
declare const timeCon: Console;
|
|
4133
4220
|
|
|
4134
|
-
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, resolveLanguagePreference, resolveThemePreference, sanitizeInput, setClass, setCookie, setImgSizeBySrc, setImgWidHeiBySrc, setLanguagePreference, setLocalStorage, setSessionStorage, setThemePreference, sha256Hex, sleep, throttle, timeCon, toJavaScriptGlobalName, truncateZHString, unsanitize, unsanitizeInput, updateQueryParam, waitTime, watchServiceWorkerUpdates, windowLoaded, zAxiosIsValidRes };
|
|
4135
|
-
export type { DerivePackageMetadataOptions, DerivedPackageMetadata, FormatByteSizeOptions, GitHubRepositoryDetails, InvestmentReturnRate, IsSafePWAEnvOptions, LocalDateTimePrecision, PackageManager, PackageManifest, PackageManifestAuthor, PreferenceResult, ResolvedTheme, ServiceWorkerUpdateCallbacks, ServiceWorkerUpdateWatcher, ThemePreference, VisitorType };
|
|
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 };
|
|
4222
|
+
export type { DerivePackageMetadataOptions, DerivedPackageMetadata, FormatByteSizeOptions, GitHubRepositoryDetails, InvestmentReturnRate, IsSafePWAEnvOptions, LocalDateTimePrecision, PackageManager, PackageManifest, PackageManifestAuthor, PreferenceResult, ResolveElementTargetOptions, ResolvedTheme, ServiceWorkerUpdateCallbacks, ServiceWorkerUpdateWatcher, ThemePreference, VisitorType };
|
package/lib/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Mazey v5.6.
|
|
2
|
+
* Mazey v5.6.2 https://github.com/chengchuu/mazey
|
|
3
3
|
* (c) 2018-2026 Cheng
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
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,f=!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){f=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(f)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 f=e.trim();if(!f)return null;var s=o.exec(f);if(s){var l=r(s.slice(1),6),d=l[0],p=l[1],v=l[2],h=l[3],g=void 0===h?"0":h,m=l[4],y=void 0===m?"0":m,w=l[5],b=r([d,p,v,g,y,void 0===w?"0":w].map(Number),6),x=b[0],E=b[1],S=b[2],O=b[3],T=b[4],A=b[5];return a(x,E,S,O,T,A)?u(x,E,S,O,T,A):null}var _=i.exec(f);if(!_)return null;var j=r(_.slice(1),8),k=j[0],M=j[1],N=j[2],P=j[3],C=j[4],D=j[5],R=void 0===D?"0":D,L=j[6],F=void 0===L?"":L,U=j[7],I=Number("".concat(F,"00").slice(0,3));if(!a(Number(k),Number(M),Number(N),Number(P),Number(C),Number(R),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 f="+"===u[0]?1:-1,s=60*Number(u.slice(1,3))+Number(u.slice(4,6));return new Date(c.getTime()-f*s*60*1e3)}(Number(k),Number(M),Number(N),Number(P),Number(C),Number(R),I,U)}var f=/^(\d{4,})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/;function s(e,t){var r=String(e);return r.length>=t?r:"".concat("0".repeat(t-r.length)).concat(r)}function l(e){if("string"!=typeof e)return null;var t=f.exec(e);if(!t)return null;var n=r(t.slice(1),7),o=n[0],i=n[1],c=n[2],s=n[3],l=n[4],d=n[5],p=void 0===d?"0":d,v=n[6],h=void 0===v?"":v,g=Number(o),m=Number(i),y=Number(c),w=Number(s),b=Number(l),x=Number(p),E=Number("".concat(h,"00").slice(0,3));return g<1||!a(g,m,y,w,b,x,E)?null:u(g,m,y,w,b,x,E)}function d(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=[s(u,4),s(a.getMonth()+1,2),s(a.getDate(),2)].join("-"),f=[s(a.getHours(),2),s(a.getMinutes(),2)];"minute"!==i&&f.push(s(a.getSeconds(),2));var l="".concat(c,"T").concat(f.join(":"));return"millisecond"===i&&(l+=".".concat(s(a.getMilliseconds(),3))),l}function p(){return Date.now?Date.now():(new Date).getTime()}var v={type:"d"};function h(e){return"string"==typeof e&&/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T"):e}function g(){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]:v,o=(n=Object.assign({},v,n)).type;"number"==typeof e&&Number.isFinite(e)||(e=new Date(h(e)).getTime()),"number"==typeof t&&Number.isFinite(t)||(t=new Date(h(t)).getTime());var i=Number(t)-Number(e),a="",u=r(new Array(4).fill(0),4),c=u[0],f=(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),f=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:f=Math.floor(i/1e3%60),unit:"second"}].filter(function(e){return e.value>0}).map(function(e){return y(e.value,e.unit)}).join(" ")||y(0,"second");break;default:a=f}return a}function m(){return g(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]:v)}function y(e,t){var r=Math.round(10*e)/10,n=1===r?t:"".concat(t,"s");return"".concat(r," ").concat(n)}function w(e){var t=(Number.isFinite(e)?Math.max(e,0):0)/1e3;return t>=86400?y(t/24/60/60,"day"):t>=3600?y(t/60/60,"hour"):t>=60?y(t/60,"minute"):y(t,"second")}function b(e){return null!==c(e)}function x(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()}function E(e){var t=c(e);return null!==t&&t.getFullYear()===(new Date).getFullYear()}function S(e){var t=c(e);if(!t)return!1;var r=new Date;return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()}function O(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()}function T(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()}function A(e,t){var r=Math.max(1,Math.round(e));return"about ".concat(r," ").concat(t).concat(1===r?"":"s")}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?A(i/r,"minute"):i<54e5?"about 1 hour":i<864e5?A(i/n,"hour"):i<1512e5?"about 1 day":i<30*o?A(i/o,"day"):i<45*o?"about 1 month":i<365*o?A(i/(30*o),"month"):i<545*o?"about 1 year":A(i/(365*o),"year")}function j(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 k(e){return j(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(".")}function M(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,f=Math.pow(1+a,365/u)-1;if(!Number.isFinite(f))throw new RangeError("calculated CAGR must be finite.");return f}function N(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 P(e,t){return N(e,t)}function C(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,f=0;a>0&&(c=o[i][a-1]),i>0&&(f=o[i-1][a]),o[i][a]=Math.max(c,f)}return o[r-1][n-1]}function D(e,t){return C(e,t)}function R(e){return Math.random()<e}function L(e){return R(e)}function F(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 U(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){F(i,n,o,a,u,"next",e)}function u(e){F(i,n,o,a,u,"throw",e)}a(void 0)})}}function I(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var z,B={exports:{}},$={exports:{}};(z=$).exports=function(e,t){this.v=e,this.k=t},z.exports.__esModule=!0,z.exports.default=z.exports;var q=$.exports,Y={exports:{}},Z={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}(Z);var W=Z.exports;!function(e){var t=W;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 s?r:s,c=Object.create(u.prototype);return t(c,"_invoke",function(e,t,r){var i,a,u,c=0,s=r||[],l=!1,d={p:0,n:0,v:n,a:p,f:p.bind(n,4),d:function(e,t){return i=e,a=0,u=n,d.n=t,f}};function p(e,t){for(a=e,u=t,o=0;!l&&c&&!r&&o<s.length;o++){var r,i=s[o],p=d.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]<=p&&((r=e<2&&p<i[1])?(a=0,d.v=t,d.n=i[1]):p<v&&(r=e<3||i[0]>t||t>v)&&(i[4]=e,i[5]=t,d.n=v,a=0))}if(r||e>1)return f;throw l=!0,t}return function(r,s,v){if(c>1)throw TypeError("Generator is already running");for(l&&1===s&&p(s,v),a=s,u=v;(o=a<2?n:u)||!l;){i||(a?a<3?(a>1&&(d.n=-1),p(a,u)):d.n=u:d.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=(l=d.n<0)?u:e.call(t,d))!==f)break}catch(e){i=n,a=1,u=e}finally{c=1}}return{value:o,done:l}}}(e,i,a),!0),c}var f={};function s(){}function l(){}function d(){}o=Object.getPrototypeOf;var p=[][a]?o(o([][a]())):(t(o={},a,function(){return this}),o),v=d.prototype=s.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,t(e,u,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=d,t(v,"constructor",d),t(d,"constructor",l),l.displayName="GeneratorFunction",t(d,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:h}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(Y);var H=Y.exports,V={exports:{}},G={exports:{}},J={exports:{}};!function(e){var t=q,r=W;e.exports=function e(n,o){function i(e,r,a,u){try{var c=n[e](r),f=c.value;return f instanceof t?o.resolve(f.v).then(function(e){i("next",e,a,u)},function(e){i("throw",e,a,u)}):o.resolve(f).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}(J);var K=J.exports;!function(e){var t=H,r=K;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}(G);var Q=G.exports;!function(e){var t=Q;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}(V);var X=V.exports,ee={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}(ee);var te=ee.exports,re={exports:{}},ne={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}(ne);var oe=ne.exports;!function(e){var t=oe.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}(re);var ie=re.exports;!function(e){var t=q,r=H,n=X,o=Q,i=K,a=te,u=ie;function c(){var f=r(),s=f.m(c),l=(Object.getPrototypeOf?Object.getPrototypeOf(s):s.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var p={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,p[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 f.w(v(e),t,r,n&&n.reverse())},isGeneratorFunction:d,mark:f.m,awrap:function(e,r){return new t(e,r)},AsyncIterator:i,async:function(e,t,r,i,a){return(d(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}(B);var ae=(0,B.exports)(),ue=ae;try{regeneratorRuntime=ae}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=ae:Function("r","regeneratorRuntime = r")(ae)}var ce=I(ue);function fe(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 se(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)?se(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 se(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 le=Function.prototype.toString.call(Object);function de(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 pe(e){return null===e||"object"!=typeof e?e:ve(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 ve(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,f=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 f.lastIndex=c.lastIndex,t.set(r,f),f}if("undefined"!=typeof ArrayBuffer&&de(r,ArrayBuffer.prototype,"byteLength")){var s=ArrayBuffer.prototype.slice.call(e,0);return t.set(r,s),s}if("undefined"!=typeof SharedArrayBuffer&&de(r,SharedArrayBuffer.prototype,"byteLength")){var l=SharedArrayBuffer.prototype.slice.call(e,0);return t.set(r,l),l}if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)){var d=ve(e.buffer,t),p="undefined"!=typeof DataView&&de(r,DataView.prototype,"byteLength")?new DataView(d,e.byteOffset,e.byteLength):new e.constructor(d,e.byteOffset,e.length);return t.set(r,p),p}if("undefined"!=typeof Map&&de(r,Map.prototype,"size")){var v=new Map;return t.set(r,v),Map.prototype.forEach.call(e,function(e,r){v.set(ve(r,t),ve(e,t))}),v}if("undefined"!=typeof Set&&de(r,Set.prototype,"size")){var h=new Set;return t.set(r,h),Set.prototype.forEach.call(e,function(e){h.add(ve(e,t))}),h}var g=Array.isArray(e),m=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)===le}(r),w=!g&&!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(!g&&!y&&!w)return t.set(r,e),e;var b=g?new Array(e.length):Object.create(w?Object.prototype:m);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(!g||"length"!==e){var n=Object.getOwnPropertyDescriptor(r,e);n&&("value"in n&&(n.value=ve(n.value,t)),Object.defineProperty(b,e,n))}}),b}function he(e){return!e||"object"!=typeof e||Object.isFrozen(e)||(Object.freeze(e),Object.values(e).forEach(he)),e}function ge(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}function me(e){return pe(e)}function ye(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substring(1):t}function we(e){var t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t.endsWith("-")?t.slice(0,-1):t}function be(e){return ye(e)}function xe(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substring(1):t}function Ee(e){return e.replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})}function Se(e){return xe(e)}function Oe(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 Te(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,r=/\s/;r.test(e.charAt(t));)t--;return e.slice(0,t+1)}function Ae(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch(e){}return!1}function _e(e){return Ae(e)}function je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{return JSON.parse(e)}catch(e){return t}}function ke(){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 Me(){return ke(arguments.length>0&&void 0!==arguments[0]?arguments[0]:5)}function Ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[p(),Me(e||3)];return t[0]+t[1]}function Pe(){return Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:3)}function Ce(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,"%")}function De(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(String(e)).toFixed(t)}function Re(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:p(),i=null,a=e.apply(this,o),i||(n=o=null)};return function(){var f=p();u||!1!==r.leading||(u=f);var s=t-(f-u);n=this;for(var l=arguments.length,d=new Array(l),v=0;v<l;v++)d[v]=arguments[v];return o=d,s<=0||s>t?(i&&(clearTimeout(i),i=null),u=f,a=e.apply(n,o),i||(n=o=null)):i||!1===r.trailing||(i=setTimeout(c.bind(n),s)),a}}function Le(e,t,r){var n=null,o=null,i=null,a=null,u=null,c=function(){var f=p()-i;f<t&&f>=0?o=setTimeout(c,t-f):(o=null,r||(u=e.apply(n,a),o||(n=a=null)))};return function(){n=this;for(var f=arguments.length,s=new Array(f),l=0;l<f;l++)s[l]=arguments[l];a=s,i=p();var d=r&&!o;return o||(o=setTimeout(c,t)),d&&(u=e.apply(n,a),n=a=null),u}}function Fe(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 Ue(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 Ie(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 Ue.apply(void 0,[e].concat(r))}function ze(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t}function Be(e){var t=Boolean(e),r="object"==typeof e,n="[object Object]"===Object.prototype.toString.call(e);return t&&r&&n}function $e(e){return"function"==typeof e}function qe(e){return"string"==typeof e}function Ye(e){return"boolean"==typeof e}function Ze(e){return Ye(e)}function We(e){return null==e}function He(e){return"[object Array]"===Object.prototype.toString.call(e)}function Ve(e){return!!Be(e)&&0!==Object.keys(e).length}function Ge(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")}function Je(e){return Ge(e)}function Ke(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 Qe(e){return Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function Xe(e){return Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function et(e){return Ke(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function tt(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 rt(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 nt(e){return rt(e)}function ot(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 it(e,t){return ot(e,t,{hasDot:arguments.length>2&&void 0!==arguments[2]&&arguments[2]})}function at(e,t){return it(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])}function ut(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}function ct(e,t,r){if(null===e||"object"!=typeof e)return!1;var n,o=e,i=fe(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}var ft=["B","KB","MB","GB","TB"];function st(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,f=0;c>=n&&f<ft.length-1;)c/=n,f+=1;return 0===f?"".concat(Number(c.toFixed(i))," ").concat(ft[f]):"".concat(c.toFixed(i)," ").concat(ft[f])}function lt(e){return st(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function dt(e){var t,r=0;for(t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return r}function pt(e){return vt.apply(this,arguments)}function vt(){return(vt=U(ce.mark(function e(t){var r,n,o,i,a,u,c;return ce.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 ht(e){return/^1\d{10}$/.test(e)}function gt(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)}function mt(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}function yt(){return"v4"}function wt(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 f=0,s=function(){setTimeout(U(ce.mark(function t(){var n;return ce.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)||++f>=a)){t.next=2;break}return t.abrupt("return");case 2:s();case 3:case"end":return t.stop()}},t)})),o)};s()}}else console.error("Expected a function.")}function bt(e){return xt.apply(this,arguments)}function xt(){return(xt=U(ce.mark(function e(t){return ce.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 Et(e){return St.apply(this,arguments)}function St(){return(St=U(ce.mark(function e(t){return ce.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",bt(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ot="";function Tt(){if(Ot)return"browser"===Ot;var e="undefined"!=typeof window;return e&&(Ot="browser"),e}function At(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 _t(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)?_t(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 _t(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 jt(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 kt(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=At(["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 Mt(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:jt(n,"version"),description:jt(n,"description"),license:jt(n,"license"),author:kt(n.author),unscopedName:i,iifeGlobal:Oe(i),installCommand:"".concat(u," ").concat(o)}}function Nt(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function Pt(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([Nt(t.slice(0,r)),Nt(t.slice(r+1))]),e},[]):[]}function Ct(e,t){return Pt(e).filter(function(e){return r(e,1)[0]===t}).map(function(e){return r(e,2)[1]})}var Dt=/^(?=.{1,39}$)(?!.*--)[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/,Rt=/^(?=.{1,100}$)(?!\.{1,2}$)[A-Za-z0-9_.-]+$/;function Lt(){return new Error("The value does not identify one supported GitHub repository")}function Ft(e,t){var r=t.replace(/\.git$/i,"");if(!Dt.test(e)||!Rt.test(r))throw Lt();var n="".concat(e,"/").concat(r);return{owner:e,name:r,slug:n,url:"https://github.com/".concat(n)}}function Ut(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 Lt();var r=t.match(/^(?:github:)?([^/:\s]+)\/([^/\s]+)$/i);if(r)return Ft(r[1],r[2]);var n=t.match(/^git@([^:\s]+):([^/\s]+)\/([^/\s]+)$/);if(n&&"github.com"===n[1].toLowerCase())return Ft(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 Lt();if(-1!==a[1].slice(a[1].lastIndexOf("@")+1).indexOf(":")||"function"!=typeof URL)throw Lt();try{o=new URL(i)}catch(e){throw Lt()}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 Lt();var f=o.pathname.match(/^\/([^/]+)\/([^/]+)\/?$/);if(!f)throw Lt();return Ft(f[1],f[2])}function It(e){return Ct(location.search,e)[0]||""}function zt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";""===e&&(e=location.search);var t={};return Pt(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}function Bt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Ct(e,t);return r.returnArray?n:n.length?n[0]:null}function $t(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),f=encodeURIComponent(t),s=encodeURIComponent(r),l=!1,d=(c?c.split("&").filter(Boolean):[]).reduce(function(e,r){var n=r.indexOf("=");return Nt(-1===n?r:r.slice(0,n))===t?l||(e.push("".concat(f,"=").concat(s)),l=!0):e.push(r),e},[]);return l||d.push("".concat(f,"=").concat(s)),"".concat(u,"?").concat(d.join("&")).concat(o)}function qt(e){var t=location.hash.split("?");return 1===t.length?"":Ct("?".concat(t.slice(1).join("?")),e)[0]||""}function Yt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["hostname"];if(nr(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]},"")}function Zt(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)}function Wt(e){return void 0===e||Number(e)<=65535}function Ht(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 Vt(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||!Ht(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 Gt(e){var t=e.match(/^\[([0-9a-f:.]+)\]$/i);if(t)return Vt(t[1]);if("."===e.charAt(e.length-1)&&(e=e.slice(0,-1)),Ht(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 Jt(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 Vt(n[1])&&Wt(n[2]);var o=r.match(/^([^:]+)(?::(\d*))?$/);return!(!o||!Wt(o[2]))&&Gt(o[1])}function Kt(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(!Jt(o))return!1;if("function"!=typeof URL)return!0;try{var i=new URL(o);return("http:"===i.protocol||"https:"===i.protocol)&&Gt(i.hostname)&&!i.username&&!i.password}catch(e){try{return new URL("http://example.com"),!1}catch(e){return Jt(o)}}}function Qt(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}function Xt(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=Ct(o,e)[0];if(void 0!==i)return i}}return""}function er(e){return e&&0===Object.keys(e).length?"":"?".concat(Object.keys(e).map(function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))}).join("&"))}function tr(e){return e.replace(/^http:/,"https:")}function rr(e){return tr(e)}function nr(){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 or(e){var t="";(!Kt(e)&&Kt(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),nr(e))&&(t=new URL(e).host);return t}function ir(e){var t="";(!Kt(e)&&Kt(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),nr(e))&&(t=new URL(e).pathname);return t}function ar(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 f=function(e){return a(e)};return n.__mazeyUrlChangeSubscribers__.add(f),i.push(function(){return n.__mazeyUrlChangeSubscribers__.delete(f)}),r&&a("load"),function(){i.forEach(function(e){return e()})}}function ur(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 cr(e){return cr="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},cr(e)}function fr(e){var t=function(e,t){if("object"!=cr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=cr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==cr(t)?t:t+""}function sr(e,t,r){return(t=fr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lr(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 dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(r),!0).forEach(function(t){sr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var pr={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function vr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr({},pr),r=Object.assign(dr({},pr),t),n=r.enabled,o=r.isClosed,i=r.showWrap,a=r.showDate,u=r.locales,c=r.isStringifyObject,f=r.logFn,s=r.errorFn,l=n;!0===o&&(hr.warn("The options.isClosed is deprecated. Please use options.enabled instead."),l=!1);var d=Object.create(null),p=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){d[t]=function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];if(l){var u,d,v=e,h=e;if("string"==typeof e&&e.length>=2){var g=e.length;v=":"===e[g-1]?e.substring(0,g-1):e}if(i&&console.log("--- ".concat(v," - begin ---")),a&&(h=e?"".concat(p()," ").concat(e):"".concat(p())),c&&(n=n.map(function(e){return Be(e)?JSON.stringify(e):e})),e||a)(u=console)[t].apply(u,[h].concat(ur(n)));else(d=console)[t].apply(d,ur(n));"log"===t&&f(),"error"===t&&s(),i&&console.log("--- ".concat(v," - end ---"))}}}),d}var hr=vr("[Mazey]"),gr=vr("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function mr(e,t){if(!e)return hr.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}function yr(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 hr.error("The element is not exist.")}function wr(e,t){yr(e,t)}function br(e,t){var r;e?(r=(r=(r=(r=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=r):hr.error("The element is not exist.")}function xr(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}function Er(){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&&ze(n)&&n[1]&&t.width(n[1]),o&&ze(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&&ze(n)&&n[1]&&(t.style.width=n[1]),o&&ze(o)&&o[1]&&(t.style.height=o[1])}}}),!0)}function Sr(){return Er()}function Or(e,t){var r="";return t&&t.length>0&&(r=t.join(";")+";"),"".concat(e,"{").concat(r,"}")}function Tr(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""}function Ar(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 _r(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 f=n.trim();f&&Ar(f,{root:c})&&Array.from(c.querySelectorAll(f)).forEach(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)});var s=c.innerText||c.textContent||"";return u?s.replace(/\u00a0/g," ").replace(/\s+/g," ").trim():s}function jr(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function kr(){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 Mr(e,t){var r=kr();Array.isArray(r[e])||Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:[],writable:!0}),"function"==typeof t&&r[e].push(t)}function Nr(e,t){var r=kr()[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))}function Pr(e,t){Nr(e,t)}function Cr(e,t){var r=kr(),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]}function Dr(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)}}function Rr(e){var t=null;if(e){var r=sessionStorage.getItem(e);if(r)try{t=JSON.parse(r)}catch(e){t=r}}return t}function Lr(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)}}function Fr(e){var t=null;if(e){var r=localStorage.getItem(e);if(r)try{t=JSON.parse(r)}catch(e){t=r}}return t}var Ur="__mazey_cookie_name_encoded__-",Ir="__mazey_cookie_value_encoded__-";function zr(e){return"".concat(Ir).concat(encodeURIComponent(e))}function Br(e){var t=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(e),r=0===e.indexOf(Ur)||0===e.indexOf(Ir);return t&&!r?e:function(e){return"".concat(Ur).concat(encodeURIComponent(e))}(e)}function $r(e){var t=Br(e);return t!==e?[t,e]:[e]}function qr(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 Yr(e){for(var t=$r(e),r="1"===qr(zr(e)),n=0;n<t.length;n++){var o=qr(t[n]);if(void 0!==o){if(r)try{return decodeURIComponent(o)}catch(e){return o}return o}}return""}function Zr(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=Br(e),c=a.isEncoded?"1":"",f=a.isEncoded?o:"; expires=Thu, 01 Jan 1970 00:00:00 GMT",s=["".concat(u,"=").concat(a.value).concat(o,"; path=/"),"".concat(zr(e),"=").concat(c).concat(f,"; path=/")],l=function(e){var t=e?"; domain=".concat(e):"";s.forEach(function(e){document.cookie="".concat(e).concat(t)})},d=location.hostname;if(n)l(n);else if(-1===d.indexOf("."))l();else{var p=d.split(".");p.shift(),l("."+p.join(".")),Yr(e)!==t&&l(".".concat(d))}}function Wr(e){var t=$r(e),r=t.concat(zr(e)),n=new Date;n.setTime(n.getTime()-1);var o=t.some(function(e){return void 0!==qr(e)});return r.forEach(function(e,t){r.indexOf(e)===t&&void 0!==qr(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===qr(e)})}function Hr(e){Wr(e)}function Vr(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 Gr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(r),!0).forEach(function(t){sr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Jr(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(){s(),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(){l(a,i,0)},1),o;function f(){i()}function s(){a&&(a.onload=a.onerror=a.onreadystatechange=null),a=null}function l(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():l(e,t,r)},20)}}return u?(a.onload=f,a.onerror=function(){s(),n(new Error("Failed to load CSS: ".concat(e)))}):a.onreadystatechange=function(){a&&/loaded|complete/.test(a.readyState)&&f()},o}var Kr={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function Qr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Gr({},Kr),r=Object.assign(Gr({},Kr),t),n=r.id,o=r.callback,i=r.timeout,a=r.isDefer,u=r.isAsync,c=r.isCrossOrigin,f=r.attributes,s=r.cssUrl;if(s){var l=function(e,t){if(!t)return"";if(Kt(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,s);l&&Jr(l).catch(function(e){console.error("Failed to load CSS from ".concat(l,": ").concat(null==e?void 0:e.message))})}return new Promise(function(t,r){var s=document.createElement("script"),l=!1,d=null,p=function(){s.onload=null,s.onerror=null,s.onreadystatechange=null,null!==d&&(clearTimeout(d),d=null)},v=function(){if(!l){l=!0,p();try{Ie(o),t("loaded")}catch(e){r(e)}}},h=function(e){l||(l=!0,p(),r(e))};s.type="text/javascript",s.defer=Boolean(a),s.async=Boolean(u),c&&(s.crossOrigin="anonymous"),n&&(s.id=n),f&&Object.keys(f).forEach(function(e){s.setAttribute(e,f[e])}),s.readyState?s.onreadystatechange=function(){"loaded"!==s.readyState&&"complete"!==s.readyState||v()}:s.onload=v,s.onerror=function(){return h(new Error("Failed to load script: ".concat(e)))},s.src=e,i&&(d=setTimeout(function(){return h(new Error("timeout"))},i));var g=document.getElementsByTagName("script")[0];null!=g&&g.parentNode?g.parentNode.insertBefore(s,g):(document.head||document.body||document.documentElement).appendChild(s)})}function Xr(){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")})}function en(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})}function tn(e,t){var r;if(window[e])return Promise.resolve("defined");var n=rn.get(e),o=null===(r=n)||void 0===r?void 0:r.get(t);if(o)return o;n||(n=new Map,rn.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)&&rn.delete(e)},a=Qr(t).then(function(e){return i(),e},function(e){throw i(),e});return n.set(t,a),a}var rn=new Map;function nn(e){if("undefined"==typeof window)return!1;var t=[],r=window.PerformanceObserver;return!!r&&(ze(r.supportedEntryTypes)&&(t=r.supportedEntryTypes),t.includes(e))}function on(){return an.apply(this,arguments)}function an(){return(an=U(ce.mark(function e(){return ce.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(nn("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 un(){return cn.apply(this,arguments)}function cn(){return(cn=U(ce.mark(function e(){return ce.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(nn("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 fn(){return sn.apply(this,arguments)}function sn(){return(sn=U(ce.mark(function e(){return ce.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(nn("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 ln(){return dn.apply(this,arguments)}function dn(){return(dn=U(ce.mark(function e(){return ce.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(nn("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 pn(){return vn.apply(this,arguments)}function vn(){return(vn=U(ce.mark(function e(){return ce.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(nn("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 Fe(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 hn(){return gn.apply(this,arguments)}function gn(){return(gn=U(ce.mark(function e(){var t,r;return ce.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(nn("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 mn(){return yn.apply(this,arguments)}function yn(){return yn=U(ce.mark(function e(){var t,n,o,i,a,u,c,f,s,l,d,p,v,h,g,m,y,w,b,x,E,S,O,T,A,_,j,k,M,N,P,C,D,R,L,F,U,I,z,B,$,q,Y,Z=arguments;return ce.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Y=function(e,t){var r=0;return t&&(r=e-t),r},q=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",f=t.match(/windows mobile/i)&&"windows mobile";return(e=r||n||o||i||a||u||c||f?n||o||i||a||u||c||f?"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;_=e.decodedBodySize,j=e.encodedBodySize;var r=a;s=r.unloadEventEnd,l=r.unloadEventStart,d=r.redirectEnd,p=r.redirectStart,v=r.domainLookupEnd,h=r.domainLookupStart,g=r.connectEnd,m=r.connectStart,y=r.secureConnectionStart,w=r.responseStart,b=r.requestStart,x=r.responseEnd,E=r.domContentLoadedEventStart,S=r.loadEventStart,O=r.loadEventEnd,T=r.startTime,A=r.fetchStart}else k&&(s=k.unloadEventEnd,l=k.unloadEventStart,d=k.redirectEnd,p=k.redirectStart,v=k.domainLookupEnd,h=k.domainLookupStart,g=k.connectEnd,m=k.connectStart,y=k.secureConnectionStart,w=k.responseStart,b=k.requestStart,x=k.responseEnd,E=k.domContentLoadedEventStart,S=k.loadEventStart,O=k.loadEventEnd,T=k.navigationStart,A=k.fetchStart);Fe(T)?C=T:Fe(A)&&(C=A);var n={source:M,os:I(),osVersion:z(),deviceType:B(),network:$(),screenDirection:q(),unloadTime:s-l,redirectTime:d-p,dnsTime:v-h,tcpTime:g-m,sslTime:Y(g,y),responseTime:w-b,downloadTime:x-w,firstPaintTime:L,firstContentfulPaintTime:F,domReadyTime:E-C,onloadTime:S-C,whiteTime:w-C,renderTime:O-C,decodedBodySize:_,encodedBodySize:j};Object.keys(n).forEach(function(e){Fe(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))}),Fe(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var i={};t||Object.keys(n).forEach(function(e){i[Se(e)]=n[e]}),Object.keys(i).length?o(i):o(n)},t=Z.length>0&&void 0!==Z[0]&&Z[0],nn("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,ze(u=n.getEntriesByType("navigation"))&&(a=u[0]),c=new Array(19).fill(0),f=r(c,19),s=f[0],l=f[1],d=f[2],p=f[3],v=f[4],h=f[5],g=f[6],m=f[7],y=f[8],w=f[9],b=f[10],x=f[11],E=f[12],S=f[13],O=f[14],T=f[15],A=f[16],_=f[17],j=f[18],k=n.timing,M="",!a){e.next=3;break}M="PerformanceNavigationTiming",_=(N=a).decodedBodySize,j=N.encodedBodySize,s=(P=a).unloadEventEnd,l=P.unloadEventStart,d=P.redirectEnd,p=P.redirectStart,v=P.domainLookupEnd,h=P.domainLookupStart,g=P.connectEnd,m=P.connectStart,y=P.secureConnectionStart,w=P.responseStart,b=P.requestStart,x=P.responseEnd,E=P.domContentLoadedEventStart,S=P.loadEventStart,O=P.loadEventEnd,T=P.startTime,A=P.fetchStart,e.next=5;break;case 3:if(!k){e.next=4;break}M="PerformanceTiming",s=k.unloadEventEnd,l=k.unloadEventStart,d=k.redirectEnd,p=k.redirectStart,v=k.domainLookupEnd,h=k.domainLookupStart,g=k.connectEnd,m=k.connectStart,y=k.secureConnectionStart,w=k.responseStart,b=k.requestStart,x=k.responseEnd,E=k.domContentLoadedEventStart,S=k.loadEventStart,O=k.loadEventEnd,T=k.navigationStart,A=k.fetchStart,e.next=5;break;case 4:return e.abrupt("return",Promise.reject(new Error("NavigationTiming and Timing are not supported")));case 5:if(C=0,!Fe(T)){e.next=6;break}C=T,e.next=8;break;case 6:if(!Fe(A)){e.next=7;break}C=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([un(),on()]);case 9:return D=e.sent,R=r(D,2),L=R[0],F=R[1],Fe(O)&&O>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)})),yn.apply(this,arguments)}function wn(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 bn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(r),!0).forEach(function(t){sr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var xn=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"]),En=Object.freeze(["headlesschrome","phantomjs","slimerjs","selenium","puppeteer","playwright"]);function Sn(){try{return"undefined"==typeof navigator?null:navigator}catch(e){return null}}function On(e,t){var r=e.trim().toLowerCase();return t.some(function(e){return r.includes(e)})}function Tn(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=Sn();if(!e)return"";try{var t=e.userAgent;return"string"==typeof t?t:""}catch(e){return""}}():e;return On(t,xn)?"crawler":On(t,En)||function(){var e=Sn();if(!e)return!1;try{return!0===e.webdriver}catch(e){return!1}}()?"automation":"unknown"}function An(){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}}function _n(){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}}function jn(){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&&ze(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=bn(bn({},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=bn(bn({},e),{},{systemVs:a});var u="";"windows"===o||"macos"===o||"linux"===o?u="desktop":("android"===o||"ios"===o||r(/mobile/g))&&(u="mobile"),e=bn(bn({},e),{},{platform:u});var c="",f="";r(/applewebkit/g)?(c="webkit",r(/edg(?:a|ios)?\//g)||r(/edge\//g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(c="gecko",f="firefox"):r(/presto/g)?(c="presto",f="opera"):r(/trident|compatible|msie/g)&&(c="trident",f="iexplore"),e=bn(bn({},e),{},{engine:c,supporter:f});var s="";"webkit"===c?s=n(/applewebkit\/[\d._]+/g):"gecko"===c?s=n(/gecko\/[\d._]+/g):"presto"===c?s=n(/presto\/[\d._]+/g):"trident"===c&&(s=n(/trident\/[\d._]+/g)),e=bn(bn({},e),{},{engineVs:s});var l="";"chrome"===f?l=n(/chrome\/[\d._]+/g):"safari"===f?l=n(/version\/[\d._]+/g):"firefox"===f?l=n(/firefox\/[\d._]+/g):"opera"===f?l=n(/opr\/[\d._]+/g):"iexplore"===f?l=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(l=n(/(?:edge|edg|edga|edgios)\/[\d._]+/g)),e=bn(bn({},e),{},{supporterVs:l});var d="",p="";r(/micromessenger/g)?(d="wechat",p=n(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(d="qq_browser",p=n(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?d="qq_app":r(/ucbrowser/g)?(d="uc",p=n(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?d="360":r(/2345explorer/g)?(d="2345",p=n(/2345explorer\/[\d._]+/g)):r(/metasr/g)?d="sougou":r(/lbbrowser/g)?d="liebao":r(/maxthon/g)?(d="maxthon",p=n(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(d="bilibili"),e=bn(bn({},e),{},{shell:d,shellVs:p});var v="";if(window.matchMedia){var h=window.matchMedia("(prefers-color-scheme: dark)"),g=window.matchMedia("(prefers-color-scheme: light)");h.matches?v="dark":g.matches&&(v="light")}return e=bn(bn({},e),{},{colorScheme:v}),window.MAZEY_BROWSER_INFO=e,e}catch(t){return hr.warn(t),e}}function kn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",r=jn(),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}var Mn="";function Nn(){if(Mn)return Promise.resolve("webp"===Mn);return new Promise(function(e){var t=new Image;t.onload=function(){var r=t.width>0&&t.height>0;Mn=r?"webp":"no-webp",e(r)},t.onerror=function(){Mn="no-webp",e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})}function Pn(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())}}function Cn(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))},f=function(){var e;!n&&"installed"===(null===(e=o)||void 0===e?void 0:e.state)&&t.controller&&c(o)},s=function(){var t,r;n||(null===(t=o)||void 0===t||t.removeEventListener("statechange",f),null===(r=o=e.installing)||void 0===r||r.addEventListener("statechange",f),f())},l=function(){var e;n||null===(e=r.onControllerChange)||void 0===e||e.call(r)},d=function(){if(a){try{e.removeEventListener("updatefound",s)}catch(e){}a=!1}try{var r;null===(r=o)||void 0===r||r.removeEventListener("statechange",f)}catch(e){}if(u){try{t.removeEventListener("controllerchange",l)}catch(e){}u=!1}};try{e.addEventListener("updatefound",s),a=!0,t.addEventListener("controllerchange",l),u=!0,e.waiting&&t.controller&&c(e.waiting),e.installing&&s()}catch(e){throw n=!0,d(),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,d(),o=null,i=null)}}}function Dn(e){if("string"!=typeof e||""===e.trim())throw new TypeError("storageKey must be a non-empty string.")}function Rn(e){if("undefined"==typeof window)return null;try{return new URL(window.location.href).searchParams.get(e)}catch(e){return null}}function Ln(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 Fn(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 Un=Object.freeze({system:"System",light:"Light",dark:"Dark"});function In(e){return"light"===e||"dark"===e}function zn(e,t){return{value:e,label:Un[t]}}function Bn(e){Dn(e);var t=Rn("theme");if(In(t))return Fn(e,t),zn(t,t);var r=Ln(e);if(In(r))return zn(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?zn(n,"system"):zn("light","light")}function $n(e,t){if(Dn(e),!function(e){return"system"===e||In(e)}(t))throw new TypeError('value must be "system", "light", or "dark".');return Fn(e,t)}function qn(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 Yn(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:qn(t)}return qn(t)}function Zn(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 Wn(e){return{value:e,label:Zn(e)}}function Hn(e){Dn(e);var t=Yn(Rn("lang"));if(t)return Wn(t);var r=Yn(Ln(e));if(r)return Wn(r);var n=Yn(function(){if("undefined"==typeof window||"undefined"==typeof navigator)return null;try{return"string"==typeof navigator.language?navigator.language:null}catch(e){return null}}());return Wn(null!=n?n:"en")}function Vn(e,t){Dn(e);var r=Yn(t);if(!r)throw new TypeError("language must be a valid language tag.");return Fn(e,r)}export{yr as addClass,Mr as addEvent,xr as addStyle,ge as assignDefined,D as calLongestCommonSubsequence,P as calLongestCommonSubstring,M as calculateCAGR,Se as camelCase2Underscore,be as camelCaseToKebabCase,jr as cancelBubble,Xe as clearHTML,et as clearHtml,mt as convert10To26,ye as convertCamelToKebab,xe as convertCamelToUnder,tr as convertHttpToHttps,we as convertKebabToCamel,er as convertObjectToQuery,Ge as convertToHtmlBreaks,Ee as convertUnderToCamel,at as cutCHSString,ot as cutZHString,Le as debounce,pe as deepCopy,me as deepCopyObject,he as deepFreeze,Hr as delCookie,Mt as derivePackageMetadata,Tn as detectVisitorType,Ie as doFn,_r as extractElementText,Nr as fireEvent,De as floatFixed,Ce as floatToPercent,st as formatByteSize,j as formatDate,_ as formatDistanceToNow,w as formatDurationFromMs,d as formatLocalDateTime,kn as genBrowserAttrs,vr as genCustomConsole,dt as genHashCode,ke as genRndNumString,Or as genStyleString,Ne as genUniqueNumString,k as generateCalendarVersion,Me as generateRndNum,Pe as generateUniqueNum,zt as getAllQueryParams,jn as getBrowserInfo,pn as getCLS,Yr as getCookie,yt as getCurrentVersion,g as getDateDifference,kr as getDefineListeners,Yt as getDomain,on as getFCP,ln as getFID,un as getFP,lt as getFileSize,m as getFriendlyInterval,qt as getHashQueryParam,fn as getLCP,Fr as getLocalStorage,Tr as getPageMeta,mn as getPerformance,It as getQueryParam,Xt as getScriptQueryParam,Rr as getSessionStorage,hn as getTTFB,Qt as getUrlFileType,or as getUrlHost,Bt as getUrlParam,ir as getUrlPath,mr as hasClass,L as inRate,Pr as invokeEvent,Ue as invokeFn,He as isArray,Ye as isBool,Ze as isBoolean,Tt as isBrowser,$e as isFunction,R as isHit,Ae as isJSONString,_e as isJsonString,ze as isNonEmptyArray,Ve as isNonEmptyObject,Fe as isNumber,Be as isPureObject,An as isSafePWAEnv,_n as isStandalonePWA,qe as isString,Nn as isSupportWebp,nn as isSupportedEntryType,T as isThisHour,S as isThisMonth,O as isThisWeek,E as isThisYear,x as isToday,We as isUdfOrNul,Ar as isValidCssSelector,ct as isValidData,b as isValidDate,gt as isValidEmail,Kt as isValidHttpUrl,ht as isValidPhoneNumber,Zt as isValidUrl,Pn as listenMediaQueryChanges,Jr as loadCSS,en as loadImage,Qr as loadScript,tn as loadScriptIfUndefined,C as longestComSubsequence,N as longestComSubstring,p as mNow,Te as mTrim,hr as mazeyCon,Je as newLine,ar as onURLChange,Ut as parseGitHubRepository,je as parseJsonSafe,l as parseLocalDateTime,br as removeClass,Wr as removeCookie,Cr as removeEvent,Ke as removeHTML,Qe as removeHtml,wt as repeatUntilConditionMet,rr as replaceHttp,Hn as resolveLanguagePreference,Bn as resolveThemePreference,tt as sanitizeInput,wr as setClass,Zr as setCookie,Er as setImgSizeBySrc,Sr as setImgWidHeiBySrc,Vn as setLanguagePreference,Lr as setLocalStorage,Dr as setSessionStorage,$n as setThemePreference,pt as sha256Hex,Et as sleep,Re as throttle,gr as timeCon,Oe as toJavaScriptGlobalName,it as truncateZHString,nt as unsanitize,rt as unsanitizeInput,$t as updateQueryParam,bt as waitTime,Cn as watchServiceWorkerUpdates,Xr as windowLoaded,ut as zAxiosIsValidRes};
|
|
6
|
+
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function n(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,f=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){f=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw o}}return u}}(e,n)||t(e,n)||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 r(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,n,r,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,n),c.setUTCHours(r,o,i,a),Number.isFinite(c.getTime())&&c.getUTCFullYear()===e&&c.getUTCMonth()===t-1&&c.getUTCDate()===n&&c.getUTCHours()===r&&c.getUTCMinutes()===o&&c.getUTCSeconds()===i&&c.getUTCMilliseconds()===a):(c.setFullYear(e,t-1,n),c.setHours(r,o,i,a),Number.isFinite(c.getTime())&&c.getFullYear()===e&&c.getMonth()===t-1&&c.getDate()===n&&c.getHours()===r&&c.getMinutes()===o&&c.getSeconds()===i&&c.getMilliseconds()===a)}function u(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=new Date(0);return u.setFullYear(e,t-1,n),u.setHours(r,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=r(e);return null!==c&&Number.isFinite(c)?new Date(c):null}if("string"!=typeof e)return null;var f=e.trim();if(!f)return null;var s=o.exec(f);if(s){var l=n(s.slice(1),6),d=l[0],p=l[1],v=l[2],g=l[3],h=void 0===g?"0":g,m=l[4],y=void 0===m?"0":m,w=l[5],b=n([d,p,v,h,y,void 0===w?"0":w].map(Number),6),x=b[0],E=b[1],S=b[2],O=b[3],T=b[4],A=b[5];return a(x,E,S,O,T,A)?u(x,E,S,O,T,A):null}var j=i.exec(f);if(!j)return null;var _=n(j.slice(1),8),N=_[0],k=_[1],M=_[2],P=_[3],C=_[4],D=_[5],R=void 0===D?"0":D,L=_[6],F=void 0===L?"":L,U=_[7],I=Number("".concat(F,"00").slice(0,3));if(!a(Number(N),Number(k),Number(M),Number(P),Number(C),Number(R),I,!0))return null;if("Z"!==U){var z=Number(U.slice(1,3)),$=Number(U.slice(4,6));if(z>23||$>59)return null}return function(e,t,n,r,o,i,a,u){var c=new Date(0);if(c.setUTCFullYear(e,t-1,n),c.setUTCHours(r,o,i,a),"Z"===u)return c;var f="+"===u[0]?1:-1,s=60*Number(u.slice(1,3))+Number(u.slice(4,6));return new Date(c.getTime()-f*s*60*1e3)}(Number(N),Number(k),Number(M),Number(P),Number(C),Number(R),I,U)}var f=/^(\d{4,})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/;function s(e,t){var n=String(e);return n.length>=t?n:"".concat("0".repeat(t-n.length)).concat(n)}function l(e){if("string"!=typeof e)return null;var t=f.exec(e);if(!t)return null;var r=n(t.slice(1),7),o=r[0],i=r[1],c=r[2],s=r[3],l=r[4],d=r[5],p=void 0===d?"0":d,v=r[6],g=void 0===v?"":v,h=Number(o),m=Number(i),y=Number(c),w=Number(s),b=Number(l),x=Number(p),E=Number("".concat(g,"00").slice(0,3));return h<1||!a(h,m,y,w,b,x,E)?null:u(h,m,y,w,b,x,E)}function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="object"==typeof e&&null!==e?r(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=n.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=[s(u,4),s(a.getMonth()+1,2),s(a.getDate(),2)].join("-"),f=[s(a.getHours(),2),s(a.getMinutes(),2)];"minute"!==i&&f.push(s(a.getSeconds(),2));var l="".concat(c,"T").concat(f.join(":"));return"millisecond"===i&&(l+=".".concat(s(a.getMilliseconds(),3))),l}function p(e,t){var n="number"==typeof e?e:"object"==typeof e&&null!==e?r(e):null,o=new Date(null!=n?n: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,f=new Date(o.getTime());return f.setFullYear(c,a+1,0),u>=f.getDate()?f:(o.setFullYear(c,a,u),o)}function v(){return Date.now?Date.now():(new Date).getTime()}var g={type:"d"};function h(e){return"string"==typeof e&&/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?e.replace(" ","T"):e}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g,o=(r=Object.assign({},g,r)).type;"number"==typeof e&&Number.isFinite(e)||(e=new Date(h(e)).getTime()),"number"==typeof t&&Number.isFinite(t)||(t=new Date(h(t)).getTime());var i=Number(t)-Number(e),a="",u=n(new Array(4).fill(0),4),c=u[0],f=(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),f=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:f=Math.floor(i/1e3%60),unit:"second"}].filter(function(e){return e.value>0}).map(function(e){return w(e.value,e.unit)}).join(" ")||w(0,"second");break;default:a=f}return a}function y(){return m(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]:g)}function w(e,t){var n=Math.round(10*e)/10,r=1===n?t:"".concat(t,"s");return"".concat(n," ").concat(r)}function b(e){var t=(Number.isFinite(e)?Math.max(e,0):0)/1e3;return t>=86400?w(t/24/60/60,"day"):t>=3600?w(t/60/60,"hour"):t>=60?w(t/60,"minute"):w(t,"second")}function x(e){return null!==c(e)}function E(e){var t=c(e);if(!t)return!1;var n=new Date;return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()}function S(e){var t=c(e);return null!==t&&t.getFullYear()===(new Date).getFullYear()}function O(e){var t=c(e);if(!t)return!1;var n=new Date;return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()}function T(e){var t=c(e);if(!t)return!1;var n=new Date,r=(n.getDay()+6)%7;n.setHours(0,0,0,0),n.setDate(n.getDate()-r);var o=new Date(n.getTime());o.setDate(o.getDate()+7);var i=t.getTime();return i>=n.getTime()&&i<o.getTime()}function A(e){var t=c(e);if(!t)return!1;var n=new Date;return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()&&t.getHours()===n.getHours()}function j(e,t){var n=Math.max(1,Math.round(e));return"about ".concat(n," ").concat(t).concat(1===n?"":"s")}function _(e){var t=c(e);if(!t)return"";var n=6e4,r=36e5,o=864e5,i=Math.abs(t.getTime()-Date.now());return i<3e4?"less than a minute":i<9e4?"about 1 minute":i<27e5?j(i/n,"minute"):i<54e5?"about 1 hour":i<864e5?j(i/r,"hour"):i<1512e5?"about 1 day":i<30*o?j(i/o,"day"):i<45*o?"about 1 month":i<365*o?j(i/(30*o),"month"):i<545*o?"about 1 year":j(i/(365*o),"year")}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd";void 0===e&&(e=new Date);var n=new Date(e);if(!Number.isFinite(n.getTime()))throw new RangeError("Invalid date");var r=n.getHours(),o={yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate()<10?"0"+n.getDate():n.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),ss:n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds(),a:r<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 k(e){return N(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(".")}function M(e,t,n){var r=c(e);if(!r)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()-r.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 n=t.endsWith("%")?t.slice(0,-1).trim():t;if(!n)throw new TypeError("totalReturnRate must be a valid percentage string.");var r=Number(n);if(!Number.isFinite(r))throw new TypeError("totalReturnRate must be a valid percentage string.");return r/100}(n);if(a<=-1)throw new RangeError("totalReturnRate must be greater than -1.");var u=i/864e5,f=Math.pow(1+a,365/u)-1;if(!Number.isFinite(f))throw new RangeError("calculated CAGR must be finite.");return f}function P(e,t){var n=e.length,r=t.length;if(0===n||0===r)return 0;for(var o=Array.from({length:n},function(){return new Array(r).fill(0)}),i=0,a=0;a<n;++a)for(var u=0;u<r;++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 C(e,t){return P(e,t)}function D(e,t){var n=e.length,r=t.length;if(0===n||0===r)return 0;for(var o=Array.from({length:n},function(){return new Array(r).fill(0)}),i=0;i<n;++i)for(var a=0;a<r;++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,f=0;a>0&&(c=o[i][a-1]),i>0&&(f=o[i-1][a]),o[i][a]=Math.max(c,f)}return o[n-1][r-1]}function R(e,t){return D(e,t)}function L(e){return Math.random()<e}function F(e){return L(e)}function U(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function I(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){U(i,r,o,a,u,"next",e)}function u(e){U(i,r,o,a,u,"throw",e)}a(void 0)})}}function z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $,B={exports:{}},q={exports:{}};($=q).exports=function(e,t){this.v=e,this.k=t},$.exports.__esModule=!0,$.exports.default=$.exports;var Y=q.exports,Z={exports:{}},W={exports:{}};!function(e){function t(n,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(W);var H=W.exports;!function(e){var t=H;function n(){var r,o,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.toStringTag||"@@toStringTag";function c(e,n,i,a){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return t(c,"_invoke",function(e,t,n){var i,a,u,c=0,s=n||[],l=!1,d={p:0,n:0,v:r,a:p,f:p.bind(r,4),d:function(e,t){return i=e,a=0,u=r,d.n=t,f}};function p(e,t){for(a=e,u=t,o=0;!l&&c&&!n&&o<s.length;o++){var n,i=s[o],p=d.p,v=i[2];e>3?(n=v===t)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=r):i[0]<=p&&((n=e<2&&p<i[1])?(a=0,d.v=t,d.n=i[1]):p<v&&(n=e<3||i[0]>t||t>v)&&(i[4]=e,i[5]=t,d.n=v,a=0))}if(n||e>1)return f;throw l=!0,t}return function(n,s,v){if(c>1)throw TypeError("Generator is already running");for(l&&1===s&&p(s,v),a=s,u=v;(o=a<2?r:u)||!l;){i||(a?a<3?(a>1&&(d.n=-1),p(a,u)):d.n=u:d.v=u);try{if(c=2,i){if(a||(n="next"),o=i[n]){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 '"+n+"' method"),a=1);i=r}else if((o=(l=d.n<0)?u:e.call(t,d))!==f)break}catch(e){i=r,a=1,u=e}finally{c=1}}return{value:o,done:l}}}(e,i,a),!0),c}var f={};function s(){}function l(){}function d(){}o=Object.getPrototypeOf;var p=[][a]?o(o([][a]())):(t(o={},a,function(){return this}),o),v=d.prototype=s.prototype=Object.create(p);function g(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,t(e,u,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=d,t(v,"constructor",d),t(d,"constructor",l),l.displayName="GeneratorFunction",t(d,u,"GeneratorFunction"),t(v),t(v,u,"Generator"),t(v,a,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e.exports=n=function(){return{w:c,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Z);var V=Z.exports,G={exports:{}},J={exports:{}},K={exports:{}};!function(e){var t=Y,n=H;e.exports=function e(r,o){function i(e,n,a,u){try{var c=r[e](n),f=c.value;return f instanceof t?o.resolve(f.v).then(function(e){i("next",e,a,u)},function(e){i("throw",e,a,u)}):o.resolve(f).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,u)})}catch(e){u(e)}}var a;this.next||(n(e.prototype),n(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(e,t,n){function r(){return new o(function(t,r){i(e,n,t,r)})}return a=a?a.then(r,r):r()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports}(K);var Q=K.exports;!function(e){var t=V,n=Q;e.exports=function(e,r,o,i,a){return new n(t().w(e,r,o,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports}(J);var X=J.exports;!function(e){var t=X;e.exports=function(e,n,r,o,i){var a=t(e,n,r,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports}(G);var ee=G.exports,te={exports:{}};!function(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports}(te);var ne=te.exports,re={exports:{}},oe={exports:{}};!function(e){function t(n){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(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(oe);var ie=oe.exports;!function(e){var t=ie.default;e.exports=function(e){if(null!=e){var n=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(t(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports}(re);var ae=re.exports;!function(e){var t=Y,n=V,r=ee,o=X,i=Q,a=ne,u=ae;function c(){var f=n(),s=f.m(c),l=(Object.getPrototypeOf?Object.getPrototypeOf(s):s.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function v(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,u(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,t,n,r){return f.w(v(e),t,n,r&&r.reverse())},isGeneratorFunction:d,mark:f.m,awrap:function(e,n){return new t(e,n)},AsyncIterator:i,async:function(e,t,n,i,a){return(d(t)?o:r)(v(e),t,n,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}(B);var ue=(0,B.exports)(),ce=ue;try{regeneratorRuntime=ue}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=ue:Function("r","regeneratorRuntime = r")(ue)}var fe=z(ce);function se(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return le(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var de=Function.prototype.toString.call(Object);function pe(e,t,n){var r,o=null===(r=Object.getOwnPropertyDescriptor(t,n))||void 0===r?void 0:r.get;if(!o)return!1;try{return o.call(e),!0}catch(e){return!1}}function ve(e){return null===e||"object"!=typeof e?e:ge(e,function(){if("undefined"!=typeof WeakMap)return new WeakMap;var e=[],t=[];return{get:function(n){var r=e.indexOf(n);return-1===r?void 0:t[r]},set:function(n,r){e.push(n),t.push(r)}}}())}function ge(e,t){if(null===e||"object"!=typeof e)return e;var n=e,o=t.get(n);if(void 0!==o)return o;var i=r(n);if(null!==i){var a=new Date(i);return t.set(n,a),a}var u=function(e){var t,n=null===(t=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))||void 0===t?void 0:t.get;if(!n)return null;try{return n.call(e)}catch(e){return null}}(n);if(null!==u){var c=e,f=new RegExp(u,function(e){if("string"==typeof e.flags)return e.flags;var t=e,n="";return t.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n}(c));return f.lastIndex=c.lastIndex,t.set(n,f),f}if("undefined"!=typeof ArrayBuffer&&pe(n,ArrayBuffer.prototype,"byteLength")){var s=ArrayBuffer.prototype.slice.call(e,0);return t.set(n,s),s}if("undefined"!=typeof SharedArrayBuffer&&pe(n,SharedArrayBuffer.prototype,"byteLength")){var l=SharedArrayBuffer.prototype.slice.call(e,0);return t.set(n,l),l}if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)){var d=ge(e.buffer,t),p="undefined"!=typeof DataView&&pe(n,DataView.prototype,"byteLength")?new DataView(d,e.byteOffset,e.byteLength):new e.constructor(d,e.byteOffset,e.length);return t.set(n,p),p}if("undefined"!=typeof Map&&pe(n,Map.prototype,"size")){var v=new Map;return t.set(n,v),Map.prototype.forEach.call(e,function(e,n){v.set(ge(n,t),ge(e,t))}),v}if("undefined"!=typeof Set&&pe(n,Set.prototype,"size")){var g=new Set;return t.set(n,g),Set.prototype.forEach.call(e,function(e){g.add(ge(e,t))}),g}var h=Array.isArray(e),m=Object.getPrototypeOf(e),y=function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.prototype.hasOwnProperty.call(t,"constructor")?t.constructor:null;return"function"==typeof n&&Function.prototype.toString.call(n)===de}(n),w=!h&&!y&&function(e){var t=Object.getPrototypeOf(e),n=null==t?void 0:t.constructor;return"function"==typeof n&&-1===Function.prototype.toString.call(n).indexOf("[native code]")}(n);if(!h&&!y&&!w)return t.set(n,e),e;var b=h?new Array(e.length):Object.create(w?Object.prototype:m);return t.set(n,b),function(e){var t=Object.getOwnPropertyNames(e);return"function"==typeof Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t}(n).forEach(function(e){if(!h||"length"!==e){var r=Object.getOwnPropertyDescriptor(n,e);r&&("value"in r&&(r.value=ge(r.value,t)),Object.defineProperty(b,e,r))}}),b}function he(e){return!e||"object"!=typeof e||Object.isFrozen(e)||(Object.freeze(e),Object.values(e).forEach(he)),e}function me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach(function(t){void 0!==t&&Object.keys(t).forEach(function(n){var r=t[n];if(void 0!==r){var o=e;"__proto__"!==n||Object.prototype.hasOwnProperty.call(e,n)?o[n]=r:Object.defineProperty(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0})}})}),e}function ye(e){return ve(e)}function we(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substring(1):t}function be(e){var t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t.endsWith("-")?t.slice(0,-1):t}function xe(e){return we(e)}function Ee(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substring(1):t}function Se(e){return e.replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})}function Oe(e){return Ee(e)}function Te(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 Ae(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)}function je(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch(e){}return!1}function _e(e){return je(e)}function Ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{return JSON.parse(e)}catch(e){return t}}function ke(){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 Me(){return ke(arguments.length>0&&void 0!==arguments[0]?arguments[0]:5)}function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[v(),Me(e||3)];return t[0]+t[1]}function Ce(){return Pe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:3)}function De(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="";return n=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(n,"%")}function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(String(e)).toFixed(t)}function Le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=Object.assign({},n);var r=null,o=null,i=null,a=null,u=0,c=function(){u=!1===n.leading?0:v(),i=null,a=e.apply(this,o),i||(r=o=null)};return function(){var f=v();u||!1!==n.leading||(u=f);var s=t-(f-u);r=this;for(var l=arguments.length,d=new Array(l),p=0;p<l;p++)d[p]=arguments[p];return o=d,s<=0||s>t?(i&&(clearTimeout(i),i=null),u=f,a=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(c.bind(r),s)),a}}function Fe(e,t,n){var r=null,o=null,i=null,a=null,u=null,c=function(){var f=v()-i;f<t&&f>=0?o=setTimeout(c,t-f):(o=null,n||(u=e.apply(r,a),o||(r=a=null)))};return function(){r=this;for(var f=arguments.length,s=new Array(f),l=0;l<f;l++)s[l]=arguments[l];a=s,i=v();var d=n&&!o;return o||(o=setTimeout(c,t)),d&&(u=e.apply(r,a),r=a=null),u}}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isNaNAsNumber,r=void 0!==n&&n,o=t.isInfinityAsNumber,i=void 0!==o&&o,a=t.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function Ie(e){var t=null;if(e&&"function"==typeof e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t=e.apply(void 0,r)}return t}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Ie.apply(void 0,[e].concat(n))}function $e(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t}function Be(e){var t=Boolean(e),n="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return t&&n&&r}function qe(e){return"function"==typeof e}function Ye(e){return"string"==typeof e}function Ze(e){return"boolean"==typeof e}function We(e){return Ze(e)}function He(e){return null==e}function Ve(e){return"[object Array]"===Object.prototype.toString.call(e)}function Ge(e){return!!Be(e)&&0!==Object.keys(e).length}function Je(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")}function Ke(e){return Je(e)}function Qe(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).removeNewLine,n=void 0!==t&&t,r="";return e&&(r=e.replace(/<\/?.+?>/g,""),n&&(r=r.replace(/[\r\n]/g,""))),r}function Xe(e){return Qe(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function et(e){return Qe(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function tt(e){return Qe(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function nt(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 rt(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 ot(e){return rt(e)}function it(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{hasDot:!1,dotText:"..."};if(n=Object.assign({hasDot:!1,dotText:"..."},n),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",u=e.replace(i,"**").length,c=0;c<u&&(null!=(a=e.charAt(c).toString()).match(i)?r+=2:r++,!(r>t));c++)o+=a;return n.hasDot&&u>t&&(o+=n.dotText),o}return""}function at(e,t){return it(e,t,{hasDot:arguments.length>2&&void 0!==arguments[2]&&arguments[2]})}function ut(e,t){return at(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2])}function ct(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{validStatusRange:[200,300],validCode:[0]})||{},n=t.validStatusRange,r=void 0===n?[200,300]:n,o=t.validCode,i=void 0===o?[0]:o;2!==r.length&&console.error("valid validStatusRange is required");var a=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var u=e.data;u&&i.includes(u.code)&&(a=!0)}return a}function ft(e,t,n){if(null===e||"object"!=typeof e)return!1;var r,o=e,i=se(t);try{for(i.s();!(r=i.n()).done;){var a=r.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===n}var st=["B","KB","MB","GB","TB"];function lt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.base,r=void 0===n?1024:n,o=t.fractionDigits,i=void 0===o?1:o,a=t.invalidValue,u=void 0===a?"":a;if(!Number.isFinite(e)||e<0||1e3!==r&&1024!==r||!Number.isInteger(i)||i<0||i>20)return u;for(var c=e,f=0;c>=r&&f<st.length-1;)c/=r,f+=1;return 0===f?"".concat(Number(c.toFixed(i))," ").concat(st[f]):"".concat(c.toFixed(i)," ").concat(st[f])}function dt(e){return lt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function pt(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n}function vt(e){return gt.apply(this,arguments)}function gt(){return(gt=I(fe.mark(function e(t){var n,r,o,i,a,u,c;return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(n="undefined"==typeof crypto?null:crypto)&&n.subtle&&"function"==typeof n.subtle.digest){e.next=1;break}throw new Error("Web Crypto API is not available.");case 1:if(r=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:r=(new TextEncoder).encode(t);case 3:return e.next=4,n.subtle.digest("SHA-256",r);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 ht(e){return/^1\d{10}$/.test(e)}function mt(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)}function yt(e){if(!Number.isFinite(e)||e<=0)return"";e=Math.floor(e);for(var t="";e>0;){var n=e%26;0===n&&(n=26),t=String.fromCharCode(n+96)+t,e=(e-n)/26}return t}function wt(){return"v4"}function bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return!0===e},r=t.interval,o=void 0===r?1e3:r,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 f=0,s=function(){setTimeout(I(fe.mark(function t(){var r;return fe.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.apply(u,c);case 1:if(r=t.sent,!(n(r)||++f>=a)){t.next=2;break}return t.abrupt("return");case 2:s();case 3:case"end":return t.stop()}},t)})),o)};s()}}else console.error("Expected a function.")}function xt(e){return Et.apply(this,arguments)}function Et(){return(Et=I(fe.mark(function e(t){return fe.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 St(e){return Ot.apply(this,arguments)}function Ot(){return(Ot=I(fe.mark(function e(t){return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",xt(t));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Tt="";function At(){if(Tt)return"browser"===Tt;var e="undefined"!=typeof window;return e&&(Tt="browser"),e}function jt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _t(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Nt(e,t){var n=e[t];if(void 0!==n&&"string"!=typeof n)throw new TypeError("manifest.".concat(t," must be a string when provided"));return n}function kt(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,n=e,r={name:""},o=jt(["name","email","url"]);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=n[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)&&(r[i]=u)}}}catch(e){o.e(e)}finally{o.f()}return r}function Mt(e){var t,n=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===n||"object"!=typeof n||Array.isArray(n))throw new TypeError("options must be an object when provided");var r=e;if("string"!=typeof r.name||!r.name.trim())throw new TypeError("manifest.name must be a non-empty string");var o=r.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=n.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:Nt(r,"version"),description:Nt(r,"description"),license:Nt(r,"license"),author:kt(r.author),unscopedName:i,iifeGlobal:Te(i),installCommand:"".concat(u," ").concat(o)}}function Pt(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function Ct(e){var t=e.indexOf("#"),n=-1===t?e:e.slice(0,t),r=n.indexOf("?"),o=/^(?:[a-z][a-z\d+.-]*:)?\/\//i.test(n)||"/"===n.charAt(0),i=-1===r?o?"":n:n.slice(r+1);return i?i.split("&").reduce(function(e,t){if(!t||-1===t.indexOf("="))return e;var n=t.indexOf("=");return e.push([Pt(t.slice(0,n)),Pt(t.slice(n+1))]),e},[]):[]}function Dt(e,t){return Ct(e).filter(function(e){return n(e,1)[0]===t}).map(function(e){return n(e,2)[1]})}var Rt=/^(?=.{1,39}$)(?!.*--)[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/,Lt=/^(?=.{1,100}$)(?!\.{1,2}$)[A-Za-z0-9_.-]+$/;function Ft(){return new Error("The value does not identify one supported GitHub repository")}function Ut(e,t){var n=t.replace(/\.git$/i,"");if(!Rt.test(e)||!Lt.test(n))throw Ft();var r="".concat(e,"/").concat(n);return{owner:e,name:n,slug:r,url:"https://github.com/".concat(r)}}function It(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 n=e.charCodeAt(t);if(n<=31||127===n)return!0}return!1}(t))throw Ft();var n=t.match(/^(?:github:)?([^/:\s]+)\/([^/\s]+)$/i);if(n)return Ut(n[1],n[2]);var r=t.match(/^git@([^:\s]+):([^/\s]+)\/([^/\s]+)$/);if(r&&"github.com"===r[1].toLowerCase())return Ut(r[2],r[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 Ft();if(-1!==a[1].slice(a[1].lastIndexOf("@")+1).indexOf(":")||"function"!=typeof URL)throw Ft();try{o=new URL(i)}catch(e){throw Ft()}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 Ft();var f=o.pathname.match(/^\/([^/]+)\/([^/]+)\/?$/);if(!f)throw Ft();return Ut(f[1],f[2])}function zt(e){return Dt(location.search,e)[0]||""}function $t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";""===e&&(e=location.search);var t={};return Ct(e).forEach(function(e){var r=n(e,2),o=r[0],i=r[1];Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:i,writable:!0})}),t}function Bt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Dt(e,t);return n.returnArray?r:r.length?r[0]:null}function qt(e,t,n){var r=e.indexOf("#"),o=-1===r?"":e.slice(r),i=-1===r?e:e.slice(0,r),a=i.indexOf("?"),u=-1===a?i:i.slice(0,a),c=-1===a?"":i.slice(a+1),f=encodeURIComponent(t),s=encodeURIComponent(n),l=!1,d=(c?c.split("&").filter(Boolean):[]).reduce(function(e,n){var r=n.indexOf("=");return Pt(-1===r?n:n.slice(0,r))===t?l||(e.push("".concat(f,"=").concat(s)),l=!0):e.push(n),e},[]);return l||d.push("".concat(f,"=").concat(s)),"".concat(u,"?").concat(d.join("&")).concat(o)}function Yt(e){var t=location.hash.split("?");return 1===t.length?"":Dt("?".concat(t.slice(1).join("?")),e)[0]||""}function Zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["hostname"];if(on(e)){var n=new window.URL(e);return t.reduce(function(e,t){return e+=n[t]},"")}var r=document.createElement("a");return r.href=e,t.reduce(function(e,t){return e+=r[t]},"")}function Wt(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)}function Ht(e){return void 0===e||Number(e)<=65535}function Vt(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 Gt(e){var t=e.split("::");if(t.length>2)return!1;var n=2===t.length,r=[];t.forEach(function(e){e&&(r=r.concat(e.split(":")))});for(var o=0,i=0;i<r.length;i++){var a=r[i];if(-1!==a.indexOf(".")){if(i!==r.length-1||!Vt(a))return!1;o+=2}else{if(!/^[0-9a-f]{1,4}$/i.test(a))return!1;o+=1}}return n?o<8:8===o}function Jt(e){var t=e.match(/^\[([0-9a-f:.]+)\]$/i);if(t)return Gt(t[1]);if("."===e.charAt(e.length-1)&&(e=e.slice(0,-1)),Vt(e))return!0;var n=e.split(".");return!(n.length<2||n.some(function(e){return!e||!/^[a-z\d-]+$/i.test(e)||"-"===e.charAt(0)||"-"===e.charAt(e.length-1)}))&&!/^\d+$/.test(n[n.length-1])}function Kt(e){var t=e.match(/^https?:\/\/([^/?#]+)(?:[/?#][^\s<>"`]*)?$/i);if(!t||-1!==t[1].indexOf("@"))return!1;var n=t[1],r=n.match(/^\[([0-9a-f:.]+)\](?::(\d*))?$/i);if(r)return Gt(r[1])&&Ht(r[2]);var o=n.match(/^([^:]+)(?::(\d*))?$/);return!(!o||!Ht(o[2]))&&Jt(o[1])}function Qt(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 n=/^https?:\/\/[^/\\]/i.test(e),r=/^\/\/[^/\\]/.test(e);if(!n&&(t.strict||!r))return!1;var o=r?"http:".concat(e):e;if(!Kt(o))return!1;if("function"!=typeof URL)return!0;try{var i=new URL(o);return("http:"===i.protocol||"https:"===i.protocol)&&Jt(i.hostname)&&!i.username&&!i.password}catch(e){try{return new URL("http://example.com"),!1}catch(e){return Kt(o)}}}function Xt(e){var t="";if("string"!=typeof e||""==e)return t;var n=e.split(/[?#]/,1)[0],r=/\.[^/]+$/.exec(n);return r?(r[0].length>1&&(t=r[0].substring(1)),t):t}function en(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t||(t=".js");for(var n=document.querySelectorAll("script[src]"),r=0;r<n.length;r++){var o=n[r].getAttribute("src");if(o&&-1!==o.indexOf(t)){var i=Dt(o,e)[0];if(void 0!==i)return i}}return""}function tn(e){return e&&0===Object.keys(e).length?"":"?".concat(Object.keys(e).map(function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))}).join("&"))}function nn(e){return e.replace(/^http:/,"https:")}function rn(e){return nn(e)}function on(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=window.URL;if("function"!=typeof t)return!1;try{var n=new t(e);return Boolean(n.href)}catch(e){return!1}}function an(e){var t="";(!Qt(e)&&Qt(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),on(e))&&(t=new URL(e).host);return t}function un(e){var t="";(!Qt(e)&&Qt(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),on(e))&&(t=new URL(e).pathname);return t}function cn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fireOnInit,n=void 0===t||t,r=history,o=location.href,i=[],a=function(t){var n=location.href;if(n!==o||"load"===t){var r=o;o=n,e({url:n,oldUrl:r,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)}),r.__mazeyUrlChangePatched__||(r.__mazeyUrlChangePatched__=!0,r.__mazeyUrlChangeSubscribers__=new Set,r.__mazeyRawPushState__=history.pushState.bind(history),r.__mazeyRawReplaceState__=history.replaceState.bind(history),history.pushState=function(){r.__mazeyRawPushState__.apply(r,arguments),r.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("pushState")})},history.replaceState=function(){r.__mazeyRawReplaceState__.apply(r,arguments),r.__mazeyUrlChangeSubscribers__.forEach(function(e){return e("replaceState")})});var f=function(e){return a(e)};return r.__mazeyUrlChangeSubscribers__.add(f),i.push(function(){return r.__mazeyUrlChangeSubscribers__.delete(f)}),n&&a("load"),function(){i.forEach(function(e){return e()})}}function fn(n){return function(t){if(Array.isArray(t))return e(t)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||t(n)||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 sn(e){return sn="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},sn(e)}function ln(e){var t=function(e,t){if("object"!=sn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==sn(t)?t:t+""}function dn(e,t,n){return(t=ln(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pn(Object(n),!0).forEach(function(t){dn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gn={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function hn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vn({},gn),n=Object.assign(vn({},gn),t),r=n.enabled,o=n.isClosed,i=n.showWrap,a=n.showDate,u=n.locales,c=n.isStringifyObject,f=n.logFn,s=n.errorFn,l=r;!0===o&&(mn.warn("The options.isClosed is deprecated. Please use options.enabled instead."),l=!1);var d=Object.create(null),p=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){d[t]=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(l){var u,d,v=e,g=e;if("string"==typeof e&&e.length>=2){var h=e.length;v=":"===e[h-1]?e.substring(0,h-1):e}if(i&&console.log("--- ".concat(v," - begin ---")),a&&(g=e?"".concat(p()," ").concat(e):"".concat(p())),c&&(r=r.map(function(e){return Be(e)?JSON.stringify(e):e})),e||a)(u=console)[t].apply(u,[g].concat(fn(r)));else(d=console)[t].apply(d,fn(r));"log"===t&&f(),"error"===t&&s(),i&&console.log("--- ".concat(v," - end ---"))}}}),d}var mn=hn("[Mazey]"),yn=hn("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function wn(e,t){if(!e)return mn.error("The element is not exist."),!1;for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1}function bn(e,t){if(e){if(Array.isArray(t))t.forEach(function(t){t&&e.classList.add(t)});else if(t){for(var n=e.className,r=n.split(/\s+/),o=0;o<r.length;o++)if(r[o]===t)return;var i,a="";""!==n&&(a=" "),i=n+a+t,e.className=i}}else mn.error("The element is not exist.")}function xn(e,t){bn(e,t)}function En(e,t){var n;e?(n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n):mn.error("The element is not exist.")}function Sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""};if(!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0}function On(){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 n=t.attr("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/[?&]width=([0-9]+[a-z%]*)/),o=n.match(/[?&]height=([0-9]+[a-z%]*)/);r&&$e(r)&&r[1]&&t.width(r[1]),o&&$e(o)&&o[1]&&t.height(o[1])}}}),!0)}var n=document.getElementsByTagName("img");return n.length>0&&(Array.from(n).forEach(function(e){var t=e;if(t){var n=t.getAttribute("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/[?&]width=([0-9]+[a-z%]*)/),o=n.match(/[?&]height=([0-9]+[a-z%]*)/);r&&$e(r)&&r[1]&&(t.style.width=r[1]),o&&$e(o)&&o[1]&&(t.style.height=o[1])}}}),!0)}function Tn(){return On()}function An(e,t){var n="";return t&&t.length>0&&(n=t.join(";")+";"),"".concat(e,"{").concat(n,"}")}function jn(e){for(var t=document.getElementsByTagName("meta"),n=0;n<t.length;n++)if(t[n].getAttribute("name")===e)return t[n].getAttribute("content")||"";return""}function _n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)return!1;var n=e.trim();if(!n)return!0===t.allowEmpty;var r=t.root||("undefined"==typeof document?null:document);if(!r)return!1;try{return r.querySelector(n),!0}catch(e){return!1}}function Nn(e){return Boolean(e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}function kn(e,t){if(void 0===e)return Nn(t.defaultElement)?t.defaultElement:null;var n=t.unwrap?t.unwrap(e):e;if(null==n)return null;if("string"==typeof n)try{return t.root.querySelector(n)}catch(e){return null}return"object"==typeof n&&"$el"in n&&(n=n.$el),Nn(n)?n:null}function Mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeSelector,r=void 0===n?"":n,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,n=e.getAttribute("alt")||"";null===(t=e.parentNode)||void 0===t||t.replaceChild(c.ownerDocument.createTextNode(n),e)});var f=r.trim();f&&_n(f,{root:c})&&Array.from(c.querySelectorAll(f)).forEach(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)});var s=c.innerText||c.textContent||"";return u?s.replace(/\u00a0/g," ").replace(/\s+/g," ").trim():s}function Pn(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Cn(){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 Dn(e,t){var n=Cn();Array.isArray(n[e])||Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:[],writable:!0}),"function"==typeof t&&n[e].push(t)}function Rn(e,t){var n=Cn()[e];if(Array.isArray(n))for(var r=n.slice(),o=0,i=r.length;o<i;o++)"function"==typeof r[o]&&(void 0===t?r[o]():r[o](t))}function Ln(e,t){Rn(e,t)}function Fn(e,t){var n=Cn(),r=n[e];if("string"==typeof e&&Array.isArray(r))if("function"==typeof t){for(var o=0,i=r.length;o<i;o++)if(r[o]===t){n[e].splice(o,1);break}}else delete n[e]}function Un(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var n=JSON.stringify(t);sessionStorage.setItem(e,void 0===n?"null":n)}}function In(e){var t=null;if(e){var n=sessionStorage.getItem(e);if(n)try{t=JSON.parse(n)}catch(e){t=n}}return t}function zn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var n=JSON.stringify(t);localStorage.setItem(e,void 0===n?"null":n)}}function $n(e){var t=null;if(e){var n=localStorage.getItem(e);if(n)try{t=JSON.parse(n)}catch(e){t=n}}return t}var Bn="__mazey_cookie_name_encoded__-",qn="__mazey_cookie_value_encoded__-";function Yn(e){return"".concat(qn).concat(encodeURIComponent(e))}function Zn(e){var t=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(e),n=0===e.indexOf(Bn)||0===e.indexOf(qn);return t&&!n?e:function(e){return"".concat(Bn).concat(encodeURIComponent(e))}(e)}function Wn(e){var t=Zn(e);return t!==e?[t,e]:[e]}function Hn(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){var o=n[r].trim();if(0===o.indexOf(t))return o.substring(t.length)}}function Vn(e){for(var t=Wn(e),n="1"===Hn(Yn(e)),r=0;r<t.length;r++){var o=Hn(t[r]);if(void 0!==o){if(n)try{return decodeURIComponent(o)}catch(e){return o}return o}}return""}function Gn(e,t,n,r){var o;if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o="; expires="+i.toUTCString()}else o="";var a=function(e){for(var t=!0,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(!(33===r||r>=35&&r<=43||r>=45&&r<=58||r>=60&&r<=91||r>=93&&r<=126)){t=!1;break}}return{isEncoded:!t,value:t?e:encodeURIComponent(e)}}(t),u=Zn(e),c=a.isEncoded?"1":"",f=a.isEncoded?o:"; expires=Thu, 01 Jan 1970 00:00:00 GMT",s=["".concat(u,"=").concat(a.value).concat(o,"; path=/"),"".concat(Yn(e),"=").concat(c).concat(f,"; path=/")],l=function(e){var t=e?"; domain=".concat(e):"";s.forEach(function(e){document.cookie="".concat(e).concat(t)})},d=location.hostname;if(r)l(r);else if(-1===d.indexOf("."))l();else{var p=d.split(".");p.shift(),l("."+p.join(".")),Vn(e)!==t&&l(".".concat(d))}}function Jn(e){var t=Wn(e),n=t.concat(Yn(e)),r=new Date;r.setTime(r.getTime()-1);var o=t.some(function(e){return void 0!==Hn(e)});return n.forEach(function(e,t){n.indexOf(e)===t&&void 0!==Hn(e)&&["".concat(e,"=; expires=").concat(r.toUTCString()),"".concat(e,"=; expires=").concat(r.toUTCString(),"; path=/")].forEach(function(e){document.cookie=e;var t=location.hostname;if(-1!==t.indexOf("."))for(var n=t.split("."),r=0;r<n.length;r++)document.cookie="".concat(e,"; domain=.").concat(n.slice(r).join("."))})}),o&&n.every(function(e){return void 0===Hn(e)})}function Kn(e){Jn(e)}function Qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(n),!0).forEach(function(t){dn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function er(e){var t,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:""}).id,r=function(){},o=new Promise(function(e,n){t=e,r=n}),i=function(){s(),t("loaded")},a=document.createElement("link");a||r(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!==n&&(a.id=n),document.getElementsByTagName("head")[0].appendChild(a),c||!u)return setTimeout(function(){l(a,i,0)},1),o;function f(){i()}function s(){a&&(a.onload=a.onerror=a.onreadystatechange=null),a=null}function l(e,t,n){if(e){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e&&(e=null),void t();if(c)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout(function(){r?t():l(e,t,n)},20)}}return u?(a.onload=f,a.onerror=function(){s(),r(new Error("Failed to load CSS: ".concat(e)))}):a.onreadystatechange=function(){a&&/loaded|complete/.test(a.readyState)&&f()},o}var tr={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function nr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xn({},tr),n=Object.assign(Xn({},tr),t),r=n.id,o=n.callback,i=n.timeout,a=n.isDefer,u=n.isAsync,c=n.isCrossOrigin,f=n.attributes,s=n.cssUrl;if(s){var l=function(e,t){if(!t)return"";if(Qt(t))return t;try{var n=new URL(e,location.href);return new URL(t,n).href}catch(n){var r=e.split("/");return r.pop(),"".concat(r.join("/"),"/").concat(t)}}(e,s);l&&er(l).catch(function(e){console.error("Failed to load CSS from ".concat(l,": ").concat(null==e?void 0:e.message))})}return new Promise(function(t,n){var s=document.createElement("script"),l=!1,d=null,p=function(){s.onload=null,s.onerror=null,s.onreadystatechange=null,null!==d&&(clearTimeout(d),d=null)},v=function(){if(!l){l=!0,p();try{ze(o),t("loaded")}catch(e){n(e)}}},g=function(e){l||(l=!0,p(),n(e))};s.type="text/javascript",s.defer=Boolean(a),s.async=Boolean(u),c&&(s.crossOrigin="anonymous"),r&&(s.id=r),f&&Object.keys(f).forEach(function(e){s.setAttribute(e,f[e])}),s.readyState?s.onreadystatechange=function(){"loaded"!==s.readyState&&"complete"!==s.readyState||v()}:s.onload=v,s.onerror=function(){return g(new Error("Failed to load script: ".concat(e)))},s.src=e,i&&(d=setTimeout(function(){return g(new Error("timeout"))},i));var h=document.getElementsByTagName("script")[0];null!=h&&h.parentNode?h.parentNode.insertBefore(s,h):(document.head||document.body||document.documentElement).appendChild(s)})}function rr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e4;return new Promise(function(t,n){var r=null,o=function(){window.removeEventListener("load",i),null!==r&&(clearTimeout(r),r=null)},i=function(){o(),t("load")};"complete"!==document.readyState?(window.addEventListener("load",i),r=setTimeout(function(){o(),n(new Error("timeout"))},e)):t("complete")})}function or(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e})}function ir(e,t){var n;if(window[e])return Promise.resolve("defined");var r=ar.get(e),o=null===(n=r)||void 0===n?void 0:n.get(t);if(o)return o;r||(r=new Map,ar.set(e,r));var i=function(){var n,o;null===(n=r)||void 0===n||n.delete(t),0===(null===(o=r)||void 0===o?void 0:o.size)&&ar.delete(e)},a=nr(t).then(function(e){return i(),e},function(e){throw i(),e});return r.set(t,a),a}var ar=new Map;function ur(e){if("undefined"==typeof window)return!1;var t=[],n=window.PerformanceObserver;return!!n&&($e(n.supportedEntryTypes)&&(t=n.supportedEntryTypes),t.includes(e))}function cr(){return fr.apply(this,arguments)}function fr(){return(fr=I(fe.mark(function e(){return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(ur("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(n){var r=n.getEntries().find(function(e){return"first-contentful-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function sr(){return lr.apply(this,arguments)}function lr(){return(lr=I(fe.mark(function e(){return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(ur("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(n){var r=n.getEntries().find(function(e){return"first-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function dr(){return pr.apply(this,arguments)}function pr(){return(pr=I(fe.mark(function e(){return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(ur("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(n){var r=n.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"largest-contentful-paint",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function vr(){return gr.apply(this,arguments)}function gr(){return(gr=I(fe.mark(function e(){return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(ur("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(n){var r=n.getEntries().find(function(e){return"first-input"===e.entryType});if(r){t.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}});t.observe({type:"first-input",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function hr(){return mr.apply(this,arguments)}function mr(){return(mr=I(fe.mark(function e(){return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(ur("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(n){var r=n.getEntries().reduce(function(e,t){var n=0;return Ue(t.value)&&(n=t.value),e+n},0);t.disconnect(),e(r)});t.observe({type:"layout-shift",buffered:!0})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function yr(){return wr.apply(this,arguments)}function wr(){return(wr=I(fe.mark(function e(){var t,n;return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(ur("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],n=0,t){e.next=3;break}return e.abrupt("return",0);case 3:return n=t.responseStart-t.requestStart,e.abrupt("return",Math.round(n));case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function br(){return xr.apply(this,arguments)}function xr(){return xr=I(fe.mark(function e(){var t,r,o,i,a,u,c,f,s,l,d,p,v,g,h,m,y,w,b,x,E,S,O,T,A,j,_,N,k,M,P,C,D,R,L,F,U,I,z,$,B,q,Y,Z=arguments;return fe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Y=function(e,t){var n=0;return t&&(n=e-t),n},q=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},B=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},$=function(){var e,t=navigator.userAgent.toLowerCase(),n=t.match(/(ipad)/i)&&"ipad",r=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",f=t.match(/windows mobile/i)&&"windows mobile";return(e=n||r||o||i||a||u||c||f?r||o||i||a||u||c||f?"phone":n?"ipad":void 0:"pc")||(e=""),e},z=function(){var e="",t=navigator.userAgent,n=t.indexOf("Android")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(n&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(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 n=a;s=n.unloadEventEnd,l=n.unloadEventStart,d=n.redirectEnd,p=n.redirectStart,v=n.domainLookupEnd,g=n.domainLookupStart,h=n.connectEnd,m=n.connectStart,y=n.secureConnectionStart,w=n.responseStart,b=n.requestStart,x=n.responseEnd,E=n.domContentLoadedEventStart,S=n.loadEventStart,O=n.loadEventEnd,T=n.startTime,A=n.fetchStart}else N&&(s=N.unloadEventEnd,l=N.unloadEventStart,d=N.redirectEnd,p=N.redirectStart,v=N.domainLookupEnd,g=N.domainLookupStart,h=N.connectEnd,m=N.connectStart,y=N.secureConnectionStart,w=N.responseStart,b=N.requestStart,x=N.responseEnd,E=N.domContentLoadedEventStart,S=N.loadEventStart,O=N.loadEventEnd,T=N.navigationStart,A=N.fetchStart);Ue(T)?C=T:Ue(A)&&(C=A);var r={source:k,os:I(),osVersion:z(),deviceType:$(),network:B(),screenDirection:q(),unloadTime:s-l,redirectTime:d-p,dnsTime:v-g,tcpTime:h-m,sslTime:Y(h,y),responseTime:w-b,downloadTime:x-w,firstPaintTime:L,firstContentfulPaintTime:F,domReadyTime:E-C,onloadTime:S-C,whiteTime:w-C,renderTime:O-C,decodedBodySize:j,encodedBodySize:_};Object.keys(r).forEach(function(e){Ue(r[e])&&(r[e]<0?r[e]=0:r[e]=Math.round(r[e]))}),Ue(r.whiteTime)&&r.whiteTime>r.onloadTime&&(r.whiteTime=0);var i={};t||Object.keys(r).forEach(function(e){i[Oe(e)]=r[e]}),Object.keys(i).length?o(i):o(r)},t=Z.length>0&&void 0!==Z[0]&&Z[0],ur("navigation")){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("navigation is not supported")));case 1:if((r=window.performance)&&"function"==typeof r.getEntries&&"function"==typeof r.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,$e(u=r.getEntriesByType("navigation"))&&(a=u[0]),c=new Array(19).fill(0),f=n(c,19),s=f[0],l=f[1],d=f[2],p=f[3],v=f[4],g=f[5],h=f[6],m=f[7],y=f[8],w=f[9],b=f[10],x=f[11],E=f[12],S=f[13],O=f[14],T=f[15],A=f[16],j=f[17],_=f[18],N=r.timing,k="",!a){e.next=3;break}k="PerformanceNavigationTiming",j=(M=a).decodedBodySize,_=M.encodedBodySize,s=(P=a).unloadEventEnd,l=P.unloadEventStart,d=P.redirectEnd,p=P.redirectStart,v=P.domainLookupEnd,g=P.domainLookupStart,h=P.connectEnd,m=P.connectStart,y=P.secureConnectionStart,w=P.responseStart,b=P.requestStart,x=P.responseEnd,E=P.domContentLoadedEventStart,S=P.loadEventStart,O=P.loadEventEnd,T=P.startTime,A=P.fetchStart,e.next=5;break;case 3:if(!N){e.next=4;break}k="PerformanceTiming",s=N.unloadEventEnd,l=N.unloadEventStart,d=N.redirectEnd,p=N.redirectStart,v=N.domainLookupEnd,g=N.domainLookupStart,h=N.connectEnd,m=N.connectStart,y=N.secureConnectionStart,w=N.responseStart,b=N.requestStart,x=N.responseEnd,E=N.domContentLoadedEventStart,S=N.loadEventStart,O=N.loadEventEnd,T=N.navigationStart,A=N.fetchStart,e.next=5;break;case 4:return e.abrupt("return",Promise.reject(new Error("NavigationTiming and Timing are not supported")));case 5:if(C=0,!Ue(T)){e.next=6;break}C=T,e.next=8;break;case 6:if(!Ue(A)){e.next=7;break}C=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([sr(),cr()]);case 9:return D=e.sent,R=n(D,2),L=R[0],F=R[1],Ue(O)&&O>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)})),xr.apply(this,arguments)}function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach(function(t){dn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Or=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"]),Tr=Object.freeze(["headlesschrome","phantomjs","slimerjs","selenium","puppeteer","playwright"]);function Ar(){try{return"undefined"==typeof navigator?null:navigator}catch(e){return null}}function jr(e,t){var n=e.trim().toLowerCase();return t.some(function(e){return n.includes(e)})}function _r(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=Ar();if(!e)return"";try{var t=e.userAgent;return"string"==typeof t?t:""}catch(e){return""}}():e;return jr(t,Or)?"crawler":jr(t,Tr)||function(){var e=Ar();if(!e)return!1;try{return!0===e.webdriver}catch(e){return!1}}()?"automation":"unknown"}function Nr(){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 n=e.requireManifest,r=e.scope;if(void 0!==n&&"boolean"!=typeof n||void 0!==r&&"string"!=typeof r)return!1;if(!0!==window.isSecureContext||!("serviceWorker"in navigator))return!1;if(void 0!==r&&!function(e){var t=e.trim();if(!t||/[?#]/.test(t))return!1;try{var n=new URL(window.location.href),r=new URL(t,n);if(r.origin!==n.origin||""!==r.search||""!==r.hash)return!1;if(n.pathname===r.pathname)return!0;var o=r.pathname.endsWith("/")?r.pathname:"".concat(r.pathname,"/");return n.pathname.startsWith(o)}catch(e){return!1}}(r))return!1;if(!1===n)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}}function kr(){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}}function Mr(){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 n=function(e){return e.test(t)},r=function(e){var n="",r=t.match(e);return r&&$e(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},o="",i="";n(/windows|win32|win64|wow32|wow64/g)?o="windows":n(/macintosh|macintel/g)?o="macos":n(/x11/g)?o="linux":n(/android|adr/g)?o="android":n(/ios|iphone|ipad|ipod|iwatch/g)&&(o="ios",n(/ipad/g)?i="ipad":n(/iphone/g)?i="iphone":n(/iwatch/g)?i="iwatch":n(/ipod/g)&&(i="ipod")),e=Sr(Sr({},e),{},{system:o,appleType:i});var a="";"windows"===o?n(/windows nt 5.0|windows 2000/g)?a="2000":n(/windows nt 5.1|windows xp/g)?a="xp":n(/windows nt 5.2|windows 2003/g)?a="2003":n(/windows nt 6.0|windows vista/g)?a="vista":n(/windows nt 6.1|windows 7/g)?a="7":n(/windows nt 6.2|windows 8/g)?a="8":n(/windows nt 6.3|windows 8.1/g)?a="8.1":n(/windows nt 10.0|windows 10/g)&&(a="10"):"macos"===o?a=r(/os x [\d._]+/g):"android"===o?a=r(/android [\d._]+/g):"ios"===o&&(a=r(/os [\d._]+/g)),e=Sr(Sr({},e),{},{systemVs:a});var u="";"windows"===o||"macos"===o||"linux"===o?u="desktop":("android"===o||"ios"===o||n(/mobile/g))&&(u="mobile"),e=Sr(Sr({},e),{},{platform:u});var c="",f="";n(/applewebkit/g)?(c="webkit",n(/edg(?:a|ios)?\//g)||n(/edge\//g)?f="edge":n(/opr/g)?f="opera":n(/chrome/g)?f="chrome":n(/safari/g)&&(f="safari")):n(/gecko/g)&&n(/firefox/g)?(c="gecko",f="firefox"):n(/presto/g)?(c="presto",f="opera"):n(/trident|compatible|msie/g)&&(c="trident",f="iexplore"),e=Sr(Sr({},e),{},{engine:c,supporter:f});var s="";"webkit"===c?s=r(/applewebkit\/[\d._]+/g):"gecko"===c?s=r(/gecko\/[\d._]+/g):"presto"===c?s=r(/presto\/[\d._]+/g):"trident"===c&&(s=r(/trident\/[\d._]+/g)),e=Sr(Sr({},e),{},{engineVs:s});var l="";"chrome"===f?l=r(/chrome\/[\d._]+/g):"safari"===f?l=r(/version\/[\d._]+/g):"firefox"===f?l=r(/firefox\/[\d._]+/g):"opera"===f?l=r(/opr\/[\d._]+/g):"iexplore"===f?l=r(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(l=r(/(?:edge|edg|edga|edgios)\/[\d._]+/g)),e=Sr(Sr({},e),{},{supporterVs:l});var d="",p="";n(/micromessenger/g)?(d="wechat",p=r(/micromessenger\/[\d._]+/g)):n(/qqbrowser/g)?(d="qq_browser",p=r(/qqbrowser\/[\d._]+/g)):n(/\sqq/g)?d="qq_app":n(/ucbrowser/g)?(d="uc",p=r(/ucbrowser\/[\d._]+/g)):n(/qihu 360se/g)?d="360":n(/2345explorer/g)?(d="2345",p=r(/2345explorer\/[\d._]+/g)):n(/metasr/g)?d="sougou":n(/lbbrowser/g)?d="liebao":n(/maxthon/g)?(d="maxthon",p=r(/maxthon\/[\d._]+/g)):n(/biliapp/g)&&(d="bilibili"),e=Sr(Sr({},e),{},{shell:d,shellVs:p});var v="";if(window.matchMedia){var g=window.matchMedia("(prefers-color-scheme: dark)"),h=window.matchMedia("(prefers-color-scheme: light)");g.matches?v="dark":h.matches&&(v="light")}return e=Sr(Sr({},e),{},{colorScheme:v}),window.MAZEY_BROWSER_INFO=e,e}catch(t){return mn.warn(t),e}}function Pr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n=Mr(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=n[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(t)),r.push("".concat(a).concat(i))}}),r}var Cr="";function Dr(){if(Cr)return Promise.resolve("webp"===Cr);return new Promise(function(e){var t=new Image;t.onload=function(){var n=t.width>0&&t.height>0;Cr=n?"webp":"no-webp",e(n)},t.onerror=function(){Cr="no-webp",e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})}function Rr(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 n=e.addEventListener,r=e.removeEventListener,o=e.addListener,i=e.removeListener,a=null;if("function"==typeof n&&"function"==typeof r){var u=t;n.call(e,"change",u),a=function(){return r.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())}}function Lr(e,t,n){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===n||"object"!=typeof n||"function"!=typeof n.onUpdateAvailable||void 0!==n.onControllerChange&&"function"!=typeof n.onControllerChange)throw new TypeError("callbacks must provide onUpdateAvailable");var r=!1,o=null,i=null,a=!1,u=!1,c=function(e){r||i===e||(i=e,n.onUpdateAvailable(e))},f=function(){var e;!r&&"installed"===(null===(e=o)||void 0===e?void 0:e.state)&&t.controller&&c(o)},s=function(){var t,n;r||(null===(t=o)||void 0===t||t.removeEventListener("statechange",f),null===(n=o=e.installing)||void 0===n||n.addEventListener("statechange",f),f())},l=function(){var e;r||null===(e=n.onControllerChange)||void 0===e||e.call(n)},d=function(){if(a){try{e.removeEventListener("updatefound",s)}catch(e){}a=!1}try{var n;null===(n=o)||void 0===n||n.removeEventListener("statechange",f)}catch(e){}if(u){try{t.removeEventListener("controllerchange",l)}catch(e){}u=!1}};try{e.addEventListener("updatefound",s),a=!0,t.addEventListener("controllerchange",l),u=!0,e.waiting&&t.controller&&c(e.waiting),e.installing&&s()}catch(e){throw r=!0,d(),o=null,i=null,e}return{activateWaiting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"SKIP_WAITING"};if(r||!i)return!1;try{return i.postMessage(e),!0}catch(e){return!1}},dispose:function(){r||(r=!0,d(),o=null,i=null)}}}function Fr(e){if("string"!=typeof e||""===e.trim())throw new TypeError("storageKey must be a non-empty string.")}function Ur(e){if("undefined"==typeof window)return null;try{return new URL(window.location.href).searchParams.get(e)}catch(e){return null}}function Ir(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 zr(e,t){if("undefined"==typeof window)return!1;try{var n=window.localStorage;return!(!n||"function"!=typeof n.setItem)&&(n.setItem(e,t),!0)}catch(e){return!1}}var $r=Object.freeze({system:"System",light:"Light",dark:"Dark"});function Br(e){return"light"===e||"dark"===e}function qr(e,t){return{value:e,label:$r[t]}}function Yr(e){Fr(e);var t=Ur("theme");if(Br(t))return zr(e,t),qr(t,t);var n=Ir(e);if(Br(n))return qr(n,n);var r=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"===n&&r||r?qr(r,"system"):qr("light","light")}function Zr(e,t){if(Fr(e),!function(e){return"system"===e||Br(e)}(t))throw new TypeError('value must be "system", "light", or "dark".');return zr(e,t)}function Wr(e){var t=e.split("-");if(!/^[a-z]{2,8}$/i.test(t[0]))return null;var n=[t[0].toLowerCase()],r=1;if(r<t.length&&/^[a-z]{4}$/i.test(t[r])){var o=t[r].toLowerCase();n.push("".concat(o[0].toUpperCase()).concat(o.slice(1))),r++}for(r<t.length&&(/^[a-z]{2}$/i.test(t[r])||/^\d{3}$/.test(t[r]))&&(n.push(/^[a-z]{2}$/i.test(t[r])?t[r].toUpperCase():t[r]),r++);r<t.length;r++){var i=t[r];if(!/^(?:[a-z0-9]{5,8}|\d[a-z0-9]{3})$/i.test(i))return null;n.push(i.toLowerCase())}return n.join("-")}function Hr(e){if("string"!=typeof e)return null;var t=e.trim().replace(/_/g,"-");if(!t)return null;if("undefined"!=typeof Intl)try{var n=Intl,r=n.getCanonicalLocales;if("function"==typeof r){var o=r.call(n,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:Wr(t)}return Wr(t)}function Vr(e){if("undefined"==typeof Intl)return e;try{var t=Intl.DisplayNames;if("function"!=typeof t)return e;var n=new t([e],{type:"language"}).of(e);return"string"==typeof n&&n.trim()?n:e}catch(t){return e}}function Gr(e){return{value:e,label:Vr(e)}}function Jr(e){Fr(e);var t=Hr(Ur("lang"));if(t)return Gr(t);var n=Hr(Ir(e));if(n)return Gr(n);var r=Hr(function(){if("undefined"==typeof window||"undefined"==typeof navigator)return null;try{return"string"==typeof navigator.language?navigator.language:null}catch(e){return null}}());return Gr(null!=r?r:"en")}function Kr(e,t){Fr(e);var n=Hr(t);if(!n)throw new TypeError("language must be a valid language tag.");return zr(e,n)}export{bn as addClass,Dn as addEvent,Sn as addStyle,me as assignDefined,R as calLongestCommonSubsequence,C as calLongestCommonSubstring,M as calculateCAGR,Oe as camelCase2Underscore,xe as camelCaseToKebabCase,Pn as cancelBubble,et as clearHTML,tt as clearHtml,yt as convert10To26,we as convertCamelToKebab,Ee as convertCamelToUnder,nn as convertHttpToHttps,be as convertKebabToCamel,tn as convertObjectToQuery,Je as convertToHtmlBreaks,Se as convertUnderToCamel,ut as cutCHSString,it as cutZHString,Fe as debounce,ve as deepCopy,ye as deepCopyObject,he as deepFreeze,Kn as delCookie,Mt as derivePackageMetadata,_r as detectVisitorType,ze as doFn,Mn as extractElementText,Rn as fireEvent,Re as floatFixed,De as floatToPercent,lt as formatByteSize,N as formatDate,_ as formatDistanceToNow,b as formatDurationFromMs,d as formatLocalDateTime,Pr as genBrowserAttrs,hn as genCustomConsole,pt as genHashCode,ke as genRndNumString,An as genStyleString,Pe as genUniqueNumString,k as generateCalendarVersion,Me as generateRndNum,Ce as generateUniqueNum,$t as getAllQueryParams,Mr as getBrowserInfo,hr as getCLS,Vn as getCookie,wt as getCurrentVersion,m as getDateDifference,Cn as getDefineListeners,Zt as getDomain,cr as getFCP,vr as getFID,sr as getFP,dt as getFileSize,y as getFriendlyInterval,Yt as getHashQueryParam,dr as getLCP,$n as getLocalStorage,jn as getPageMeta,br as getPerformance,zt as getQueryParam,en as getScriptQueryParam,In as getSessionStorage,yr as getTTFB,Xt as getUrlFileType,an as getUrlHost,Bt as getUrlParam,un as getUrlPath,wn as hasClass,F as inRate,Ln as invokeEvent,Ie as invokeFn,Ve as isArray,Ze as isBool,We as isBoolean,At as isBrowser,qe as isFunction,L as isHit,je as isJSONString,_e as isJsonString,$e as isNonEmptyArray,Ge as isNonEmptyObject,Ue as isNumber,Be as isPureObject,Nr as isSafePWAEnv,kr as isStandalonePWA,Ye as isString,Dr as isSupportWebp,ur as isSupportedEntryType,A as isThisHour,O as isThisMonth,T as isThisWeek,S as isThisYear,E as isToday,He as isUdfOrNul,_n as isValidCssSelector,ft as isValidData,x as isValidDate,mt as isValidEmail,Qt as isValidHttpUrl,ht as isValidPhoneNumber,Wt as isValidUrl,Rr as listenMediaQueryChanges,er as loadCSS,or as loadImage,nr as loadScript,ir as loadScriptIfUndefined,D as longestComSubsequence,P as longestComSubstring,v as mNow,Ae as mTrim,mn as mazeyCon,Ke as newLine,cn as onURLChange,It as parseGitHubRepository,Ne as parseJsonSafe,l as parseLocalDateTime,En as removeClass,Jn as removeCookie,Fn as removeEvent,Qe as removeHTML,Xe as removeHtml,bt as repeatUntilConditionMet,rn as replaceHttp,kn as resolveElementTarget,Jr as resolveLanguagePreference,Yr as resolveThemePreference,nt as sanitizeInput,xn as setClass,Gn as setCookie,On as setImgSizeBySrc,Tn as setImgWidHeiBySrc,Kr as setLanguagePreference,zn as setLocalStorage,Un as setSessionStorage,Zr as setThemePreference,vt as sha256Hex,St as sleep,p as subYears,Le as throttle,yn as timeCon,Te as toJavaScriptGlobalName,at as truncateZHString,ot as unsanitize,rt as unsanitizeInput,qt as updateQueryParam,xt as waitTime,Lr as watchServiceWorkerUpdates,rr as windowLoaded,ct as zAxiosIsValidRes};
|