w-dwdata-tweq 1.0.33 → 1.0.34
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* w-dwdata-tweq v1.0.
|
|
2
|
+
* w-dwdata-tweq v1.0.34
|
|
3
3
|
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("crypto"),require("events"),require("chokidar"),require("url"),require("pino"),require("sharp")):"function"==typeof define&&define.amd?define(["fs","path","crypto","events","chokidar","url","pino","sharp"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweq"]=t(e.fs,e.path,e.crypto,e.events,e.chokidar,e.url,e.pino,e.sharp)}(this,function(e,t,r,n,o,i,a,s){"use strict";var c="undefined"!=typeof document?document.currentScript:null,u=Array.isArray,l="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,d=l||f||Function("return this")(),h=d.Symbol,p=Object.prototype,y=p.hasOwnProperty,m=p.toString,g=h?h.toStringTag:void 0;var v=Object.prototype.toString;var w=h?h.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?function(e){var t=y.call(e,g),r=e[g];try{e[g]=void 0;var n=!0}catch(e){}var o=m.call(e);return n&&(t?e[g]=r:delete e[g]),o}(e):function(e){return v.call(e)}(e)}function S(e){return null!=e&&"object"==typeof e}function _(e){return"symbol"==typeof e||S(e)&&"[object Symbol]"==b(e)}var O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/;function j(e,t){if(u(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!_(e))||(E.test(e)||!O.test(e)||null!=t&&e in Object(t))}function R(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function x(e){if(!R(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var T,A=d["__core-js_shared__"],k=(T=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"";var C=Function.prototype.toString;function $(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var D=/^\[object .+?Constructor\]$/,P=Function.prototype,N=Object.prototype,F=P.toString,M=N.hasOwnProperty,L=RegExp("^"+F.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B(e){return!(!R(e)||(t=e,k&&k in t))&&(x(e)?L:D).test($(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return B(r)?r:void 0}var I=U(Object,"create");var q=Object.prototype.hasOwnProperty;var z=Object.prototype.hasOwnProperty;function H(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Y(e,t){return e===t||e!=e&&t!=t}function W(e,t){for(var r=e.length;r--;)if(Y(e[r][0],t))return r;return-1}H.prototype.clear=function(){this.__data__=I?I(null):{},this.size=0},H.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},H.prototype.get=function(e){var t=this.__data__;if(I){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(t,e)?t[e]:void 0},H.prototype.has=function(e){var t=this.__data__;return I?void 0!==t[e]:z.call(t,e)},H.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=I&&void 0===t?"__lodash_hash_undefined__":t,this};var J=Array.prototype.splice;function V(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}V.prototype.clear=function(){this.__data__=[],this.size=0},V.prototype.delete=function(e){var t=this.__data__,r=W(t,e);return!(r<0)&&(r==t.length-1?t.pop():J.call(t,r,1),--this.size,!0)},V.prototype.get=function(e){var t=this.__data__,r=W(t,e);return r<0?void 0:t[r][1]},V.prototype.has=function(e){return W(this.__data__,e)>-1},V.prototype.set=function(e,t){var r=this.__data__,n=W(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var K=U(d,"Map");function G(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Z.prototype.clear=function(){this.size=0,this.__data__={hash:new H,map:new(K||V),string:new H}},Z.prototype.delete=function(e){var t=G(this,e).delete(e);return this.size-=t?1:0,t},Z.prototype.get=function(e){return G(this,e).get(e)},Z.prototype.has=function(e){return G(this,e).has(e)},Z.prototype.set=function(e,t){var r=G(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function X(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(X.Cache||Z),r}X.Cache=Z;var Q,ee,te,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/\\(\\)?/g,oe=(Q=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,function(e,r,n,o){t.push(n?o.replace(ne,"$1"):r||e)}),t},ee=X(Q,function(e){return 500===te.size&&te.clear(),e}),te=ee.cache,ee),ie=oe;function ae(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var se=h?h.prototype:void 0,ce=se?se.toString:void 0;function ue(e){if("string"==typeof e)return e;if(u(e))return ae(e,ue)+"";if(_(e))return ce?ce.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function le(e){return null==e?"":ue(e)}function fe(e,t){return u(e)?e:j(e,t)?[e]:ie(le(e))}function de(e){if("string"==typeof e||_(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function he(e,t){for(var r=0,n=(t=fe(t,e)).length;null!=e&&r<n;)e=e[de(t[r++])];return r&&r==n?e:void 0}function pe(e,t,r){var n=null==e?void 0:he(e,t);return void 0===n?r:n}function ye(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var me,ge=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[me?a:++n];if(!1===t(o[s],s,o))break}return e};function ve(e){return S(e)&&"[object Arguments]"==b(e)}var we=Object.prototype,be=we.hasOwnProperty,Se=we.propertyIsEnumerable,_e=ve(function(){return arguments}())?ve:function(e){return S(e)&&be.call(e,"callee")&&!Se.call(e,"callee")},Oe=_e;var Ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,je=Ee&&"object"==typeof module&&module&&!module.nodeType&&module,Re=je&&je.exports===Ee?d.Buffer:void 0,xe=(Re?Re.isBuffer:void 0)||function(){return!1},Te=/^(?:0|[1-9]\d*)$/;function Ae(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Te.test(e))&&e>-1&&e%1==0&&e<t}function ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var Ce={};Ce["[object Float32Array]"]=Ce["[object Float64Array]"]=Ce["[object Int8Array]"]=Ce["[object Int16Array]"]=Ce["[object Int32Array]"]=Ce["[object Uint8Array]"]=Ce["[object Uint8ClampedArray]"]=Ce["[object Uint16Array]"]=Ce["[object Uint32Array]"]=!0,Ce["[object Arguments]"]=Ce["[object Array]"]=Ce["[object ArrayBuffer]"]=Ce["[object Boolean]"]=Ce["[object DataView]"]=Ce["[object Date]"]=Ce["[object Error]"]=Ce["[object Function]"]=Ce["[object Map]"]=Ce["[object Number]"]=Ce["[object Object]"]=Ce["[object RegExp]"]=Ce["[object Set]"]=Ce["[object String]"]=Ce["[object WeakMap]"]=!1;var $e="object"==typeof exports&&exports&&!exports.nodeType&&exports,De=$e&&"object"==typeof module&&module&&!module.nodeType&&module,Pe=De&&De.exports===$e&&l.process,Ne=function(){try{var e=De&&De.require&&De.require("util").types;return e||Pe&&Pe.binding&&Pe.binding("util")}catch(e){}}(),Fe=Ne&&Ne.isTypedArray,Me=Fe?function(e){return function(t){return e(t)}}(Fe):function(e){return S(e)&&ke(e.length)&&!!Ce[b(e)]},Le=Me,Be=Object.prototype.hasOwnProperty;function Ue(e,t){var r=u(e),n=!r&&Oe(e),o=!r&&!n&&xe(e),i=!r&&!n&&!o&&Le(e),a=r||n||o||i,s=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=s.length;for(var l in e)!t&&!Be.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||s.push(l);return s}var Ie=Object.prototype;function qe(e,t){return function(r){return e(t(r))}}var ze=qe(Object.keys,Object),He=Object.prototype.hasOwnProperty;function Ye(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Ie))return ze(e);var t,r,n=[];for(var o in Object(e))He.call(e,o)&&"constructor"!=o&&n.push(o);return n}function We(e){return null!=e&&ke(e.length)&&!x(e)}function Je(e){return We(e)?Ue(e):Ye(e)}var Ve=function(e,t){return function(r,n){if(null==r)return r;if(!We(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(function(e,t){return e&&ge(e,t,Je)}),Ke=Ve;function Ge(e){return e}function Ze(e,t){var r;return(u(e)?ye:Ke)(e,"function"==typeof(r=t)?r:Ge)}var Xe=Array.prototype.reverse;function Qe(e){return"[object String]"===Object.prototype.toString.call(e)}function et(e){return!(!Qe(e)||""===e)}function tt(e){let t=!1;if(et(e))t=!isNaN(Number(e));else if(function(e){return"[object Number]"===Object.prototype.toString.call(e)}(e)){if(function(e){return e!=e}(e))return!1;t=!0}return t}var rt=/\s/;var nt=/^\s+/;function ot(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&rt.test(e.charAt(t)););return t}(e)+1).replace(nt,""):e}var it=/^[-+]0x[0-9a-f]+$/i,at=/^0b[01]+$/i,st=/^0o[0-7]+$/i,ct=parseInt;function ut(e){if("number"==typeof e)return e;if(_(e))return NaN;if(R(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=R(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ot(e);var r=at.test(e);return r||st.test(e)?ct(e.slice(2),r?2:8):it.test(e)?NaN:+e}var lt=1/0;function ft(e){return e?(e=ut(e))===lt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function dt(e){var t=ft(e),r=t%1;return t==t?r?t-r:t:0}function ht(e){if(!tt(e))return 0;return ft(e)}function pt(e){return!!tt(e)&&(e=ht(e),"number"==typeof(t=e)&&t==dt(t));var t}var yt=d.isFinite,mt=Math.min;var gt=function(e){var t=Math[e];return function(e,r){if(e=ut(e),(r=null==r?0:mt(dt(r),292))&&yt(e)){var n=(le(e)+"e").split("e");return+((n=(le(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),vt=gt;function wt(e){if(!tt(e))return 0;e=ht(e);let t=vt(e);return"0"===String(t)?0:t}function bt(e){if(!pt(e))return!1;return wt(e)>=0}function St(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function _t(e,t={}){let r=pe(t,"fs"),n=!1;try{r.statSync(e),n=!0}catch{n=!1}return n}function Ot(e,t={}){let r=pe(t,"fs");if(!_t(e,{fs:r}))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function Et(t){return Ot(t,{fs:e})}function jt(e,t={}){let r=pe(t,"fs");if(Ot(e,{fs:r}))return{success:"input folder is already exists: "+e};if(_t(e,{fs:r}))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function Rt(r){return function(e,t={}){let r=pe(t,"path"),n=pe(t,"fs");if(!_t(e,{fs:n})){let t=jt(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!Ot(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let o of t){let t=r.join(e,o);n.statSync(t).isDirectory()?n.rmSync(t,{recursive:!0,force:!0}):n.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}(r,{path:t,fs:e})}function xt(t){return jt(t,{fs:e})}function Tt(e,t={}){let r=pe(t,"fs");if(!_t(e,{fs:r}))return{success:"folder does not exist: "+e};if(!Ot(e,{fs:r}))return{error:"input path is not a folder: "+e};try{r.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function At(e){if(!pt(e))return!1;return wt(e)>0}function kt(e,t=1,r={}){let n=1,o=pe(r,"path"),i=pe(r,"fs");if(!Ot(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return null!==t&&At(t)&&(t=wt(t))<1&&(t=1),function e(r){let a=[];return Ot(r,{fs:i})?(Ze(i.readdirSync(r),function(s){let c=o.resolve(r,s),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(a.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(a=a.concat(e(c))),n-=1):a.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),a):a}(e)}function Ct(r,n=1){return kt(r,n,{path:t,fs:e})}function $t(e){let t,r=Object.prototype.toString.call(e);if(t="[object Promise]"===r,t)return!0;if("[object Function]"!==r)return!1;try{t="function"!=typeof e.subscribe&&"function"==typeof e.then}catch(e){}return t}function Dt(e){var t=this.__data__=new V(e);this.size=t.size}Dt.prototype.clear=function(){this.__data__=new V,this.size=0},Dt.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Dt.prototype.get=function(e){return this.__data__.get(e)},Dt.prototype.has=function(e){return this.__data__.has(e)},Dt.prototype.set=function(e,t){var r=this.__data__;if(r instanceof V){var n=r.__data__;if(!K||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Z(n)}return r.set(e,t),this.size=r.size,this};function Pt(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Z;++t<r;)this.add(e[t])}function Nt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ft(e,t){return e.has(t)}Pt.prototype.add=Pt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pt.prototype.has=function(e){return this.__data__.has(e)};function Mt(e,t,r,n,o,i){var a=1&r,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,d=!0,h=2&r?new Pt:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var p=e[f],y=t[f];if(n)var m=a?n(y,p,f,t,e,i):n(p,y,f,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!Nt(t,function(e,t){if(!Ft(h,t)&&(p===e||o(p,e,r,n,i)))return h.push(t)})){d=!1;break}}else if(p!==y&&!o(p,y,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}var Lt=d.Uint8Array;function Bt(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Ut(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var It=h?h.prototype:void 0,qt=It?It.valueOf:void 0;function zt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}var Ht=Object.prototype.propertyIsEnumerable,Yt=Object.getOwnPropertySymbols,Wt=Yt?function(e){return null==e?[]:(e=Object(e),zt(Yt(e),function(t){return Ht.call(e,t)}))}:function(){return[]};function Jt(e){return function(e,t,r){var n=t(e);return u(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Je,Wt)}var Vt=Object.prototype.hasOwnProperty;var Kt=U(d,"DataView"),Gt=U(d,"Promise"),Zt=U(d,"Set"),Xt=U(d,"WeakMap"),Qt="[object Map]",er="[object Promise]",tr="[object Set]",rr="[object WeakMap]",nr="[object DataView]",or=$(Kt),ir=$(K),ar=$(Gt),sr=$(Zt),cr=$(Xt),ur=b;(Kt&&ur(new Kt(new ArrayBuffer(1)))!=nr||K&&ur(new K)!=Qt||Gt&&ur(Gt.resolve())!=er||Zt&&ur(new Zt)!=tr||Xt&&ur(new Xt)!=rr)&&(ur=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?$(r):"";if(n)switch(n){case or:return nr;case ir:return Qt;case ar:return er;case sr:return tr;case cr:return rr}return t});var lr=ur,fr="[object Arguments]",dr="[object Array]",hr="[object Object]",pr=Object.prototype.hasOwnProperty;function yr(e,t,r,n,o,i){var a=u(e),s=u(t),c=a?dr:lr(e),l=s?dr:lr(t),f=(c=c==fr?hr:c)==hr,d=(l=l==fr?hr:l)==hr,h=c==l;if(h&&xe(e)){if(!xe(t))return!1;a=!0,f=!1}if(h&&!f)return i||(i=new Dt),a||Le(e)?Mt(e,t,r,n,o,i):function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Lt(e),new Lt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Y(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Bt;case"[object Set]":var c=1&n;if(s||(s=Ut),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var l=Mt(s(e),s(t),n,o,i,a);return a.delete(e),l;case"[object Symbol]":if(qt)return qt.call(e)==qt.call(t)}return!1}(e,t,c,r,n,o,i);if(!(1&r)){var p=f&&pr.call(e,"__wrapped__"),y=d&&pr.call(t,"__wrapped__");if(p||y){var m=p?e.value():e,g=y?t.value():t;return i||(i=new Dt),o(m,g,r,n,i)}}return!!h&&(i||(i=new Dt),function(e,t,r,n,o,i){var a=1&r,s=Jt(e),c=s.length;if(c!=Jt(t).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in t:Vt.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++u<c;){var y=e[l=s[u]],m=t[l];if(n)var g=a?n(m,y,l,t,e,i):n(y,m,l,e,t,i);if(!(void 0===g?y===m||o(y,m,r,n,i):g)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,n,o,i))}function mr(e,t,r,n,o){return e===t||(null==e||null==t||!S(e)&&!S(t)?e!=e&&t!=t:yr(e,t,r,n,mr,o))}function gr(e){return e==e&&!R(e)}function vr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function wr(e){var t=function(e){for(var t=Je(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,gr(o)]}return t}(e);return 1==t.length&&t[0][2]?vr(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=r[o])[0],u=e[c],l=s[1];if(a&&s[2]){if(void 0===u&&!(c in e))return!1}else{var f=new Dt;if(n)var d=n(u,l,c,e,t,f);if(!(void 0===d?mr(l,u,3,n,f):d))return!1}}return!0}(r,e,t)}}function br(e,t){return null!=e&&t in Object(e)}function Sr(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=fe(t,e)).length,i=!1;++n<o;){var a=de(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&ke(o)&&Ae(a,o)&&(u(e)||Oe(e))}(e,t,br)}function _r(e){return function(t){return null==t?void 0:t[e]}}function Or(e){return j(e)?_r(de(e)):function(e){return function(t){return he(t,e)}}(e)}function Er(e){return"function"==typeof e?e:null==e?Ge:"object"==typeof e?u(e)?function(e,t){return j(e)&&gr(t)?vr(de(e),t):function(r){var n=pe(r,e);return void 0===n&&n===t?Sr(r,e):mr(t,n,3)}}(e[0],e[1]):wr(e):Or(e)}function jr(e,t){var r=-1,n=We(e)?Array(e.length):[];return Ke(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function Rr(e,t){return(u(e)?ae:jr)(e,Er(t))}var xr=_r("length"),Tr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Ar(e){return Tr.test(e)}var kr="\\ud800-\\udfff",Cr="["+kr+"]",$r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Dr="\\ud83c[\\udffb-\\udfff]",Pr="[^"+kr+"]",Nr="(?:\\ud83c[\\udde6-\\uddff]){2}",Fr="[\\ud800-\\udbff][\\udc00-\\udfff]",Mr="(?:"+$r+"|"+Dr+")"+"?",Lr="[\\ufe0e\\ufe0f]?",Br=Lr+Mr+("(?:\\u200d(?:"+[Pr,Nr,Fr].join("|")+")"+Lr+Mr+")*"),Ur="(?:"+[Pr+$r+"?",$r,Nr,Fr,Cr].join("|")+")",Ir=RegExp(Dr+"(?="+Dr+")|"+Ur+Br,"g");function qr(e){return Ar(e)?function(e){for(var t=Ir.lastIndex=0;Ir.test(e);)++t;return t}(e):xr(e)}function zr(e){if(null==e)return 0;if(We(e))return"string"==typeof(t=e)||!u(t)&&S(t)&&"[object String]"==b(t)?qr(e):e.length;var t,r=lr(e);return"[object Map]"==r||"[object Set]"==r?e.size:Ye(e).length}function Hr(e,t){return et(e)&&bt(t)?0===(t=wt(t))?e:function(e,t){if(!et(e))return"";if(!bt(t))return"";if(0===(t=wt(t)))return"";let r=e.length-t;return r<0&&(r=0),e.substring(r,r+t)}(e,e.length-t):""}function Yr(e,t){var r=[];return Ke(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function Wr(e,t){return(u(e)?zt:Yr)(e,Er(t))}function Jr(e){return"[object Array]"===Object.prototype.toString.call(e)}function Vr(e){return!0===(t=e)||!1===t||S(t)&&"[object Boolean]"==b(t);var t}function Kr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Gr(e,t){return!!Kr(e)&&(!(!et(t)&&!tt(t))&&t in e)}function Zr(e,t,r,n={}){let o=pe(n,"withInfor");Vr(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!et(r))return console.log("invalid key"),o&&(i.infor={}),i;Jr(e)||(e=[e]),Jr(t)||(t=[t]),e=Wr(e,e=>Gr(e,r)),t=Wr(t,e=>Gr(e,r));let a=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=a.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),a.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(a.values()),o){let e={};for(let t of i.del)e[t[r]]="del";for(let t of i.add)e[t[r]]="add";for(let t of i.diff)e[t[r]]="diff";for(let t of i.same)e[t[r]]="same";i.infor=e}return i}function Xr(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}function Qr(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function en(e,t){let r=Qr();if(!Jr(e)&&!Kr(e))return r.reject("rs is not an array or object"),r;let n=!1;if(Kr(e)){n=!0;let t=[];Ze(e,(e,r)=>{t.push({k:r,v:e})}),e=t}St(t)||(t=function(e){return e});let o=-1,i=[];return e.reduce(function(e,r){return e.then(function(e){i.push(e),o+=1;let a=o,s=r;return n&&(a=r.k,s=r.v),St(t)?t(s,a):s})},Promise.resolve()).then(function(e){var t,n,o,a;i.push(e),a=null==(t=i)?0:t.length,i=a?Xr(t,(n=o||void 0===n?1:dt(n))<0?0:n,a):[],r.resolve(i)}).catch(function(e){r.reject(e)}),r}function tn(e,t={}){let r=pe(t,"fs");return!!_t(e,{fs:r})&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function rn(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"useSync","");Vr(i)||(i=!0);let a="";return a=i?function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!tn(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};try{jt(n.dirname(t),{fs:o}),o.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!tn(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};let i=null;return await(async(e,t)=>{jt(n.dirname(t),{fs:o}),await new Promise((r,n)=>{let i=o.createReadStream(e),a=o.createWriteStream(t);i.on("error",n),a.on("error",n),a.on("finish",r),i.pipe(a)})})(e,t).then(()=>{i={success:"done: "+t}}).catch(e=>{i={error:e}}),i}(e,t,{path:n,fs:o}),a}function nn(e,t={}){let r=pe(t,"fs");if(!_t(e,{fs:r}))return{success:"file does not exist: "+e};if(!tn(e,{fs:r}))return{error:"input path is not a file: "+e};try{r.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}function on(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!Ot(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),a=n.resolve(t,r),s=o.lstatSync(i);if(s.isDirectory())jt(a,{fs:o}),on(i,a,{path:n,fs:o});else if(s.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,a)}else jt(n.dirname(a),{fs:o}),o.copyFileSync(i,a)})}catch(e){return{error:e}}return{success:"done: "+t}}function an(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"useSync","");Vr(i)||(i=!0);let a="";return a=i?on(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!Ot(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let a of r){let r=n.join(e,a),s=n.join(t,a),c=o.lstatSync(r);if(c.isDirectory())jt(s,{fs:o}),await i(r,s);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,s)}else jt(n.dirname(s),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(s);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},a=null;return await i(e,t).then(()=>{a={success:"done: "+t}}).catch(e=>{a={error:e}}),a}(e,t,{path:n,fs:o}),a}function sn(e,t={}){let r=pe(t,"fs"),n=pe(t,"crypto"),o=pe(t,"type","");et(o)||(o="sha512");let i=Qr();if(!tn(e,{fs:r}))return i.reject(`fp[${e}] is not a file`),i;try{let t=n.createHash(o),a=r.createReadStream(e);a.on("readable",()=>{let e=a.read();e?t.update(e):i.resolve(t.digest("hex"))}),a.on("error",e=>{i.reject(e.toString())})}catch(e){i.reject(e.toString())}return i}var cn=Array.prototype.join;function un(e,t){return null==e?"":cn.call(e,t)}async function ln(e,t=1,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"crypto"),a=pe(r,"type","");et(a)||(a="md5");let s=pe(r,"forFile",null);Vr(s)||(s=!0);let c=pe(r,"forFolder",null);if(Vr(c)||(c=!1),!Ot(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);let u=kt(e,t,{path:n,fs:o});return u=await en(u,async e=>{let t="";return s&&!e.isFolder&&(t=await sn(e.path,{fs:o,crypto:i,type:a})),c&&e.isFolder&&(t=await async function(e,t={}){let r=pe(t,"path"),n=pe(t,"fs"),o=pe(t,"crypto"),i=pe(t,"type","");et(i)||(i="md5");let a=[],s=kt(e,null,{path:r,fs:n});return await en(s,async e=>{if(e.isFolder)return;let t=await sn(e.path,{fs:n,crypto:o,type:i});a.push(t)}),un(a,"|")}(e.path,{path:n,fs:o,crypto:i,type:a})),e.hash=t,e}),u}async function fn(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"crypto"),a=pe(r,"type","");if(et(a)||(a="md5"),!Ot(e,{fs:o}))throw new Error(`fdSrc[${e}] is not a folder`);let s=!1;if(!Ot(t,{fs:o}))return await an(e,t,{path:n,fs:o,useSync:!1}),s=!0,s;let c=n.sep,u=n.sep.length,l=(e,t)=>{let r=e.isFolder?"folder":"file",n=e.path.replace(t,"");var o,i;return i=u,(et(o=n)&&bt(i)?0===(i=wt(i))?"":o.substring(0,i):"")===c&&(n=Hr(n,u)),n=n.replaceAll("\\","/"),{id:`${r}|${n}`,isFolder:e.isFolder,name:e.name,rpath:n,hash:e.hash}},f=(e,t)=>e=Rr(e,e=>l(e,t)),d=await ln(e,null,{path:n,fs:o,crypto:i,type:a,forFile:!0,forFolder:!1});d=f(d,n.resolve(e));let h=await ln(t,null,{path:n,fs:o,crypto:i,type:a,forFile:!0,forFolder:!1});h=f(h,n.resolve(t));let p=Zr(h,d,"id",{withInfor:!1});return s=zr(p.del)>0||zr(p.add)>0||zr(p.diff)>0,await en(p.del,async e=>{if(e.isFolder){Tt(n.resolve(t,e.rpath),{fs:o})}}),await en(p.del,async e=>{if(!e.isFolder){nn(n.resolve(t,e.rpath),{fs:o})}}),await en([...p.add,...p.diff],async r=>{if(!r.isFolder){let i=n.resolve(e,r.rpath),a=n.resolve(t,r.rpath);await rn(i,a,{path:n,fs:o,useSync:!1})}}),s}function dn(e){if(Kr(e)){for(let t in e)return!0;return!1}return!1}var hn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var mn={exports:{}};var gn,vn={exports:{}},wn=yn(Object.freeze({__proto__:null,default:{}}));function bn(){return gn||(gn=1,function(e){var t;e.exports=(t=t||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==hn&&hn.crypto&&(r=hn.crypto),!r)try{r=wn}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},a=i.lib={},s=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var a=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var s=0;s<o;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=i.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,o=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,i);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(o,f);r=o.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=h.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=i.algo={};return i}(Math),t)}(vn)),vn.exports}!function(e){e.exports=bn().enc.Utf8}(mn);var Sn=pn(mn.exports),_n={exports:{}};!function(e){var t;e.exports=(t=bn(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=s<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s++)o.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(_n);var On=pn(_n.exports);function En(e){if(!et(e))return"";let t=Sn.parse(e);return On.stringify(t)}var jn={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",s="day",c="week",u="month",l="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},v={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,u),i=r-o<0,a=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:c,d:s,D:d,h:a,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=m;var S="$isDayjsObject",_=function(e){return e instanceof R||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return w;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),r&&(b[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!n&&o&&(w=o),o||!n&&w},E=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new R(r)},j=v;j.l=O,j.i=_,j.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var R=function(){function m(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return j},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var r=E(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return E(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<E(e)},g.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,n=!!j.u(t)||t,l=j.p(e),h=function(e,t){var o=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(s)},p=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},y=this.$W,m=this.$M,g=this.$D,v="set"+(this.$u?"UTC":"");switch(l){case f:return n?h(1,0):h(31,11);case u:return n?h(1,m):h(0,m+1);case c:var w=this.$locale().weekStart||0,b=(y<w?y+7:y)-w;return h(n?g-b:g+(6-b),m);case s:case d:return p(v+"Hours",0);case a:return p(v+"Minutes",1);case i:return p(v+"Seconds",2);case o:return p(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var r,c=j.p(e),l="set"+(this.$u?"UTC":""),h=(r={},r[s]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[a]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],p=c===s?this.$D+(t-this.$W):t;if(c===u||c===f){var y=this.clone().set(d,1);y.$d[h](p),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[j.p(e)]()},g.add=function(n,l){var d,h=this;n=Number(n);var p=j.p(l),y=function(e){var t=E(h);return j.w(t.date(t.date()+Math.round(e*n)),h)};if(p===u)return this.set(u,this.$M+n);if(p===f)return this.set(f,this.$y+n);if(p===s)return y(1);if(p===c)return y(7);var m=(d={},d[i]=t,d[a]=r,d[o]=e,d)[p]||1,g=this.$d.getTime()+n*m;return j.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,s=this.$M,c=r.weekdays,u=r.months,l=r.meridiem,f=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return j.s(i%12||12,e,"0")},p=l||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(y,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return s+1;case"MM":return j.s(s+1,2,"0");case"MMM":return f(r.monthsShort,s,u,3);case"MMMM":return f(u,s);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(r.weekdaysMin,t.$W,c,2);case"ddd":return f(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(i,a,!0);case"A":return p(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,d,h){var p,y=this,m=j.p(d),g=E(n),v=(g.utcOffset()-this.utcOffset())*t,w=this-g,b=function(){return j.m(y,g)};switch(m){case f:p=b()/12;break;case u:p=b();break;case l:p=b()/3;break;case c:p=(w-v)/6048e5;break;case s:p=(w-v)/864e5;break;case a:p=w/r;break;case i:p=w/t;break;case o:p=w/e;break;default:p=w}return h?p:j.a(p)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=O(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return j.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),x=R.prototype;return E.prototype=x,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",s],["$M",u],["$y",f],["$D",d]].forEach(function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),E.extend=function(e,t){return e.$i||(e(t,R,E),e.$i=!0),E},E.locale=O,E.isDayjs=_,E.unix=function(e){return E(1e3*e)},E.en=b[w],E.Ls=b,E.p={},E}()}(jn);var Rn=pn(jn.exports);function xn(){if(!St(Rn))throw new Error("invalid dayjs");return Rn().format("YYYY-MM-DDTHH:mm:ssZ")}var Tn={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,i,a){var s=r?r+e:e;if(!this._events[s])return!1;var c,u,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,i),!0;case 6:return l.fn.call(l.context,t,n,o,i,a),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||a(this,i);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||o&&!s[c].once||n&&s[c].context!==n)&&u.push(s[c]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(Tn);var An=pn(Tn.exports);function kn(){return new An}function Cn(e=10){tt(e)||(e=10);let t=Qr();return setTimeout(function(){t.resolve()},e),t}var $n=qe(Object.getPrototypeOf,Object),Dn=Function.prototype,Pn=Object.prototype,Nn=Dn.toString,Fn=Pn.hasOwnProperty,Mn=Nn.call(Object);function Ln(e){if(!S(e))return!1;var t=b(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!function(e){if(!S(e)||"[object Object]"!=b(e))return!1;var t=$n(e);if(null===t)return!0;var r=Fn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Nn.call(r)==Mn}(e)}function Bn(e){if(!(et(e)||tt(e)||_(e)||function(e){return"[object BigInt]"===Object.prototype.toString.call(e)}(e)))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function Un(e){let t="";if(Ln(e))t=e.message;else{if(Qe(e))return e;if(Kr(e))return Gr(e,"message")?e.message:JSON.stringify(e);if(Jr(e))return JSON.stringify(e);t=Bn(e)}return t}function In(t){return tn(t,{fs:e})}function qn(e,t=!1){if(function(e){return"[object Undefined]"===Object.prototype.toString.call(e)}(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}function zn(e=300){return new function(e){let t=[],r=null,n=Date.now();return At(e)||(e=300),e=wt(e),function(o,...i){St(o)?(n=Date.now(),t.push({func:o,input:i}),null===r&&(r=setInterval(()=>{if(0===zr(t))return clearInterval(r),void(r=null);if(Date.now()-n>e){let e=t.pop();t=[];try{e.func(...e.input)}catch(e){console.log("m.func catch",e)}}},10))):console.log("func is not a function")}}(e)}function Hn(e,r={}){let i=pe(r,"polling");Vr(i)||(i=!1);let a=pe(r,"timeInterval");At(a)||(a=100),a=wt(a);let s=pe(r,"timeBinaryInterval");At(s)||(s=300),s=wt(s);let c=new n.EventEmitter,u=e,l=null,f=setInterval(()=>{null===l&&In(u)&&(l=o.watch(u,{usePolling:i,interval:a,binaryInterval:s,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),c.emit("change",{type:e,fp:r,stats:n})}))},a);return c.clear=()=>{(()=>{if(null!==l){try{l.unwatch(u)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(f)},c}function Yn(t,r,n={}){Et(t)||xt(t),Et(r)||xt(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,a=t=>{let r={};try{r=function(e){if(!et(e))return{};let t={};try{t=JSON.parse(e)}catch(e){t={}}return t}(e.readFileSync(t,"utf8"))}catch(e){}return r},s=(t,r)=>{try{let n=qn(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>pe(a(e),t,""),u=(e,t,r)=>{let n=a(e);n[t]=r,s(e,n)},l=(e,t)=>{let r=a(e);Gr(r,t)&&delete r[t],s(e,r)},f=()=>a(o),d=e=>s(o,e),h=e=>c(o,e),p=()=>a(i),y=e=>s(i,e),m=e=>c(i,e),g=(e,t)=>u(i,e,t),v=e=>l(i,e),w=e=>{let t=[];return Ze(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=kn();return e.set=(t,r)=>{((e,t)=>{u(o,e,t)})(t,r),e.emit("set",{type:"set",fp:t,hash:r})},e.get=h,e.remove=t=>{(e=>{l(o,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=f,e.writeKp=d,e},buildTar:()=>{let e=kn(),t=zn(300),r=Hn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=Qr(),r=f();if(!dn(r))return t.resolve("no src"),t;let n=p(),o=w(r),i=Zr(w(n),o,"fp",{withInfor:!1}),a=Qr();return a.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:a}),t})().catch(()=>{})})}),e.set=g,e.get=m,e.remove=v,e.readKp=p,e.writeKp=y,e.clear=r.clear,e}}}let Wn=i.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(Wn).href:"undefined"==typeof document?location.href:c&&"SCRIPT"===c.tagName.toUpperCase()&&c.src||new URL("w-dwdata-tweq.umd.js",document.baseURI).href),Jn=t.dirname(Wn);let Vn=async(r={})=>{let n=pe(r,"keyId");et(n)||(n="id");let o=pe(r,"fdTagRemove");et(o)||(o="./_tagRemove");let i=pe(r,"fdTaskCpActualSrc");et(i)||(i="./_taskCpActualSrc"),Et(i)||xt(i);let s=pe(r,"fdTaskCpSrc");et(s)||(s="./_taskCpSrc"),Et(s)||xt(s);let c=pe(r,"fdLog");et(c)||(c="./_logs"),Et(c)||xt(c);let u=pe(r,"funGetNew");if(!St(u))throw new Error("invalid funGetNew");let l=pe(r,"funGetCurrent");if(!St(l))throw new Error("invalid funGetCurrent");let f=pe(r,"funAdd"),d=pe(r,"funModify"),h=pe(r,"funRemove"),p=pe(r,"funAfterStart"),y=pe(r,"funBeforeEnd"),m=pe(r,"timeToleranceRemove");bt(m)||(m=0),m=ht(m),m>0&&!Et(o)&&xt(o);let g=pe(r,"eventNameProcCallfunGetNew");et(g)||(g="proc-callfun-getNew");let v=pe(r,"eventNameProcCallfunGetCurrent");et(v)||(v="proc-callfun-getCurrent");let w=pe(r,"eventNameProcAddCallfunAdd");et(w)||(w="proc-add-callfun-add");let b=pe(r,"eventNameProcDiffCallfunModify");et(b)||(b="proc-diff-callfun-modify");let S=pe(r,"eventNameProcRemoveCallfunRemove");et(S)||(S="proc-remove-callfun-remove");let _=pe(r,"eventNameProcCallfunAfterStart");et(_)||(_="proc-callfun-afterStart");let O=pe(r,"eventNameProcCallfunBeforeEnd");et(O)||(O="proc-callfun-beforeEnd");let E=pe(r,"eventNameProcCoreDetect");et(E)||(E="proc-coreDetect");let j=pe(r,"eventNameProcRetakeRemove");et(j)||(j="proc-retake-remove");let R=pe(r,"eventNameProcCoreRetake");et(R)||(R="proc-coreRetake");let x=kn(),T=function(r={}){let n=kn(),o=pe(r,"timeZone",null),i=pe(r,"fdLog");et(i)||(i="./_logs");let s=pe(r,"interval");"day"!==s&&"hr"!==s&&(s="day");let c=pe(r,"numKeep");At(c)||(c="day"===s?365:8760),c=wt(c);let u=a.transport({targets:[{level:"info",target:t.resolve(Jn,"./formatter.mjs"),options:{interval:s,fdLog:i,timeZone:o}}]}),l=a(u),f=()=>{try{if(!Et(i))return;let r="hr"===s?/^\d{4}-\d{2}-\d{2}T\d{2}\.log$/:/^\d{4}-\d{2}-\d{2}\.log$/,o=e.readdirSync(i).filter(e=>r.test(e));o.sort();let a=o.length-c;if(a<=0)return;let u=o.slice(0,a);for(let r of u){let o=t.join(i,r);try{e.unlinkSync(o),n.emit("delete",{fp:o,fn:r})}catch(e){}}}catch(e){console.error("WSyslog cleanLogs error:",e)}};f();let d=setInterval(f,36e5);d.unref();let h=null,p=e=>{let t=l[e].bind(l);return(...r)=>{try{n.emit(e,{args:r})}catch(e){}t(...r)}};return n.fatal=p("fatal"),n.error=p("error"),n.warn=p("warn"),n.info=p("info"),n.debug=p("debug"),n.trace=p("trace"),n.cleanLogs=f,n.clear=(e={})=>{if(null!==h)return h;let t=pe(e,"timeLimit");At(t)||(t=6e4),h=Qr();let r=!1,n=()=>{r||(r=!0,clearInterval(d),h.resolve())},o=setTimeout(()=>{try{u.worker.terminate()}catch(e){}n()},t);try{l.flush(e=>{if(e||u.closed)return clearTimeout(o),void n();u.once("close",()=>{clearTimeout(o),n()}),u.end()})}catch(e){clearTimeout(o),n()}return h},n}({fdLog:c,interval:"hr"}),A={info:e=>{T.info(e),x.emit("change",{type:"info",...e})},warn:e=>{T.warn(e),x.emit("change",{type:"warn",...e})},error:e=>{T.error(e),x.emit("change",{type:"error",...e})}},k=async t=>{let r=await(async(t,r,n="")=>{let i="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);i=o;let a=`${i}/${r}`,s={time:xn(),hash:n};e.writeFileSync(a,JSON.stringify(s),"utf8")})("remove",t);return r},C=async(t,r={})=>{let n=await(async(t,r,n={})=>{let i=pe(n,"checkTime");Vr(i)||(i=!0);let a=pe(n,"timeNow"),s="",c=0;if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);s=o,c=m;let u=`${s}/${r}`;if(!In(u))return{b:!1,msg:`fp[${u}] is not a file`};if(!i)return{b:!0,msg:`fp[${u}] exists`};if(!dn(a))throw new Error("invalid timeNow");let l=e.readFileSync(u,"utf8"),f=pe(JSON.parse(l),"time"),d=Rn(f),h=a.diff(d,"millisecond"),p=h>=c;return p?{b:p,msg:`time difference[${h}] >= time tolerance[${c}]`}:{b:p,msg:"allowable time difference"}})("remove",t,r);return n},$=async(t,r)=>{let n="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);n=o;let i=`${n}/${r}`;if(!In(i))return;let a=e.readFileSync(i,"utf8"),s=JSON.parse(a),c=nn(i,{fs:e});if(c.error)throw new Error(c.error);return s},D=async e=>await $("remove",e),P=null,N=null,F=(async()=>{await Cn(1);let e=Rn();A.info({event:"start",timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),msg:"running..."});let t=Yn(i,i);P=t.buildSrc();let r=Yn(s,s);N=r.buildSrc();let o="";et(o)||await(async()=>{if(St(p))try{A.info({event:_,msg:"start..."});let e=p();$t(e)&&(e=await e),A.info({event:_,msg:"done"})}catch(e){console.log(e),A.error({event:_,msg:Un(e)}),o="error at proc-callfun-afterStart"}return et(o)?(console.log("error occurred, task canceled"),void A.info({event:"cancel-stage-afterStart",msg:o})):null})().catch(()=>{});et(o)||await(async()=>{let e=[];try{A.info({event:g,msg:"start..."});let t=u();$t(t)&&(t=await t),e=t,A.info({event:g,num:zr(t),msg:"done"})}catch(e){console.log(e),A.error({event:g,msg:Un(e)}),o="error at proc-callfun-getNew"}if(et(o))return console.log("error occurred, task canceled"),void A.info({event:"cancel-stage-main",msg:o});let t=[];try{A.info({event:v,msg:"start..."});let e=l();$t(e)&&(e=await e),t=e,A.info({event:v,num:zr(e),msg:"done"})}catch(e){console.log(e),A.error({event:v,msg:Un(e)}),o="error at proc-callfun-getCurrent"}if(et(o))return console.log("error occurred, task canceled"),void A.info({event:"cancel-stage-main",msg:o});if(0===zr(e))return console.log("invalid data, task canceled"),void A.info({event:"cancel-stage-main",msg:"no data"});let r=null;try{A.info({event:"proc-compare",msg:"start..."}),r=Zr(t,e,n,{withInfor:!1});let o=zr(r.del),i=zr(r.add),a=zr(r.diff),s=zr(r.same);A.info({event:"proc-compare",numRemove:o,numAdd:i,numModify:a,numSame:s,msg:"done"})}catch(e){console.log(e),A.error({event:"proc-compare",msg:Un(e)}),o="error at proc-compare"}return et(o)?(console.log("error occurred, task canceled"),void A.info({event:"cancel-stage-main",msg:o})):dn(r)?0!==zr(r.del)||0!==zr(r.add)||0!==zr(r.diff)?(await en(r.del,async e=>{if(!et(o)){try{if(A.info({event:S,[n]:e[n],msg:"start..."}),St(h)){let t=h(e);$t(t)&&(t=await t)}}catch(t){console.log(t),A.error({event:S,[n]:e[n],msg:Un(t)}),o="error at proc-remove-callfun-remove"}if(!et(o))try{P.remove(e[n]),m<=0?(N.remove(e[n]),A.info({event:S,[n]:e[n],msg:"done"})):(await C(e[n],{checkTime:!1})).b||(await k(e[n]),A.info({event:S,[n]:e[n],msg:"add-tag"}))}catch(t){console.log(t),A.error({event:S,[n]:e[n],msg:Un(t)}),o="error at proc-remove-callfun-remove"}}}),et(o)?(console.log("error occurred, task canceled"),void A.info({event:"cancel-stage-main",msg:o})):(await en(r.add,async e=>{if(!et(o)){try{if(A.info({event:w,[n]:e[n],msg:"start..."}),St(f)){let t=f(e);$t(t)&&(t=await t)}}catch(t){console.log(t),A.error({event:w,[n]:e[n],msg:Un(t)}),o="error at proc-add-callfun-add"}if(!et(o))try{let t=En(JSON.stringify(e));P.set(e[n],t),N.set(e[n],t),m>0&&(await C(e[n],{checkTime:!1})).b&&(await D(e[n]),A.info({event:w,[n]:e[n],msg:"release-tag"})),A.info({event:w,[n]:e[n],msg:"done"})}catch(t){console.log(t),A.error({event:w,[n]:e[n],msg:Un(t)}),o="error at proc-add-callfun-add"}}}),et(o)?(console.log("error occurred, task canceled"),void A.info({event:"cancel-stage-main",msg:o})):(await en(r.diff,async e=>{if(!et(o)){try{if(A.info({event:b,[n]:e[n],msg:"start..."}),St(d)){let t=d(e);$t(t)&&(t=await t)}}catch(t){console.log(t),A.error({event:b,[n]:e[n],msg:Un(t)}),o="error at proc-diff-callfun-modify"}if(!et(o))try{let t=En(JSON.stringify(e));P.set(e[n],t),N.set(e[n],t),A.info({event:b,[n]:e[n],msg:"done"})}catch(t){console.log(t),A.error({event:b,[n]:e[n],msg:Un(t)}),o="error at proc-diff-callfun-modify"}}}),et(o)?(console.log("error occurred, task canceled"),void A.info({event:"cancel-stage-main",msg:o})):null))):void A.info({event:"cancel-stage-main",msg:"no difference"}):(console.log("can not calculate the difference, task canceled"),void A.info({event:"cancel-stage-main",msg:"can not calculate the difference between the data before and after"}))})().catch(()=>{});await(async()=>{if(St(y))try{A.info({event:O,msg:"start..."});let e=y();$t(e)&&(e=await e),A.info({event:O,msg:"done"})}catch(e){console.log(e),A.error({event:O,msg:Un(e)}),o="error at proc-callfun-beforeEnd"}return et(o)?(console.log("error occurred, task canceled"),void A.info({event:"cancel-stage-beforeEnd",msg:o})):null})().catch(()=>{}),A.info({event:"end",...(()=>{let t=Rn(),r=t.diff(e,"second");return{timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:t.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${r}s`}})(),msg:"done"})})().catch(e=>{console.log(e),A.error({event:E,msg:Un(e)})}),M=(async()=>{if(m<=0)return;await async function(e,t={}){let r=null,n=Qr();if(!St(e))return n.reject("waitfunction需輸入函數f"),n;let o=async()=>{let t=e();return $t(t)&&(t=await t),t};if(r=await o(),!0===r)return n.resolve(),n;let i=pe(t,"attemptNum",null);At(i)||(i=200);let a=pe(t,"timeInterval",null);At(a)||(a=1e3);let s=0,c=setInterval(async()=>{s+=1,r=await o(),!0===r&&(clearInterval(c),n.resolve()),s>i&&(clearInterval(c),n.reject(`exceeded attemptNum[${i}]`))},a);return n}(()=>null!==N);let e=Rn(),t=Ct(o,1);0!==zr(t)&&await en(t,async t=>{let r=(await C(t.name,{timeNow:e,checkTime:!0})).b,o=!et(P.get(t.name)),i=et(N.get(t.name));r&&o&&i&&(await D(t.name),A.info({event:j,[n]:t.name,from:"debounce",msg:"release-tag"}),N.remove(t.name),A.info({event:j,[n]:t.name,from:"debounce",msg:"done"}))})})().catch(e=>{console.log(e),A.error({event:R,msg:Un(e)})});return x.srlog=A,Promise.all([F,M]).finally(()=>{x.emit("end")}),x},Kn=async(n={})=>{let o=pe(n,"keyId");et(o)||(o="id");let i=pe(n,"fdTagRemove");et(i)||(i="./_tagRemove");let a=pe(n,"fdDwAttime");et(a)||(a="./_dwAttime"),Et(a)||xt(a);let s=pe(n,"fdDwCurrent");et(s)||(s="./_dwCurrent"),Et(s)||xt(s);let c=pe(n,"fdTaskCpActualSrc");et(c)||(c="./_taskCpActualSrc"),Et(c)||xt(c);let u=pe(n,"fdTaskCpSrc");et(u)||(u="./_taskCpSrc"),Et(u)||xt(u);let l=pe(n,"fdLog");et(l)||(l="./_logs"),Et(l)||xt(l);let f=pe(n,"funDownload");if(!St(f))throw new Error("invalid funDownload");let d=pe(n,"funGetCurrent");if(!St(d))throw new Error("invalid funGetCurrent");let h=pe(n,"funAdd");if(!St(h))throw new Error("invalid funAdd");let p=pe(n,"funModify");if(!St(p))throw new Error("invalid funModify");let y=pe(n,"funRemove");if(!St(y))throw new Error("invalid funRemove");let m=pe(n,"funAfterStart"),g=pe(n,"funBeforeEnd"),v=pe(n,"timeToleranceRemove");bt(v)||(v=0),v=ht(v);let w=async()=>{await function(n,o,i={}){return fn(n,o,{path:t,fs:e,crypto:r,...i})}(a,s)};return Vn({keyId:o,fdTagRemove:i,fdTaskCpActualSrc:c,fdTaskCpSrc:u,fdLog:l,funGetNew:f,funGetCurrent:d,funAdd:h,funModify:p,funRemove:y,funAfterStart:async()=>{if(St(m)){let e=m();$t(e)&&(e=await e)}},funBeforeEnd:async()=>{if(await w(),St(g)){let e=g();$t(e)&&(e=await e)}},timeToleranceRemove:v,eventNameProcCallfunGetNew:"proc-callfun-download"})};function Gn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zn}=Object.prototype,{getPrototypeOf:Xn}=Object,{iterator:Qn,toStringTag:eo}=Symbol,to=(e=>t=>{const r=Zn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ro=e=>(e=e.toLowerCase(),t=>to(t)===e),no=e=>t=>typeof t===e,{isArray:oo}=Array,io=no("undefined");function ao(e){return null!==e&&!io(e)&&null!==e.constructor&&!io(e.constructor)&&uo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const so=ro("ArrayBuffer");const co=no("string"),uo=no("function"),lo=no("number"),fo=e=>null!==e&&"object"==typeof e,ho=e=>{if("object"!==to(e))return!1;const t=Xn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||eo in e||Qn in e)},po=ro("Date"),yo=ro("File"),mo=ro("Blob"),go=ro("FileList"),vo=ro("URLSearchParams"),[wo,bo,So,_o]=["ReadableStream","Request","Response","Headers"].map(ro);function Oo(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),oo(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(ao(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function Eo(e,t){if(ao(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const jo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ro=e=>!io(e)&&e!==jo;const xo=(To="undefined"!=typeof Uint8Array&&Xn(Uint8Array),e=>To&&e instanceof To);var To;const Ao=ro("HTMLFormElement"),ko=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Co=ro("RegExp"),$o=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Oo(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const Do=ro("AsyncFunction"),Po=(No="function"==typeof setImmediate,Fo=uo(jo.postMessage),No?setImmediate:Fo?(Mo=`axios@${Math.random()}`,Lo=[],jo.addEventListener("message",({source:e,data:t})=>{e===jo&&t===Mo&&Lo.length&&Lo.shift()()},!1),e=>{Lo.push(e),jo.postMessage(Mo,"*")}):e=>setTimeout(e));var No,Fo,Mo,Lo;const Bo="undefined"!=typeof queueMicrotask?queueMicrotask.bind(jo):"undefined"!=typeof process&&process.nextTick||Po;var Uo={isArray:oo,isArrayBuffer:so,isBuffer:ao,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||uo(e.append)&&("formdata"===(t=to(e))||"object"===t&&uo(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&so(e.buffer),t},isString:co,isNumber:lo,isBoolean:e=>!0===e||!1===e,isObject:fo,isPlainObject:ho,isEmptyObject:e=>{if(!fo(e)||ao(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:wo,isRequest:bo,isResponse:So,isHeaders:_o,isUndefined:io,isDate:po,isFile:yo,isBlob:mo,isRegExp:Co,isFunction:uo,isStream:e=>fo(e)&&uo(e.pipe),isURLSearchParams:vo,isTypedArray:xo,isFileList:go,forEach:Oo,merge:function e(){const{caseless:t,skipUndefined:r}=Ro(this)&&this||{},n={},o=(o,i)=>{const a=t&&Eo(n,i)||i;ho(n[a])&&ho(o)?n[a]=e(n[a],o):ho(o)?n[a]=e({},o):oo(o)?n[a]=o.slice():r&&io(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Oo(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(Oo(t,(t,n)=>{r&&uo(t)?e[n]=Gn(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Xn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:to,kindOfTest:ro,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(oo(e))return e;let t=e.length;if(!lo(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Qn]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Ao,hasOwnProperty:ko,hasOwnProp:ko,reduceDescriptors:$o,freezeMethods:e=>{$o(e,(t,r)=>{if(uo(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];uo(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return oo(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Eo,global:jo,isContextDefined:Ro,isSpecCompliantForm:function(e){return!!(e&&uo(e.append)&&"FormData"===e[eo]&&e[Qn])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(fo(e)){if(t.indexOf(e)>=0)return;if(ao(e))return e;if(!("toJSON"in e)){t[n]=e;const o=oo(e)?[]:{};return Oo(e,(e,t)=>{const i=r(e,n+1);!io(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Do,isThenable:e=>e&&(fo(e)||uo(e))&&uo(e.then)&&uo(e.catch),setImmediate:Po,asap:Bo,isIterable:e=>null!=e&&uo(e[Qn])};function Io(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Uo.inherits(Io,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Uo.toJSONObject(this.config),code:this.code,status:this.status}}});const qo=Io.prototype,zo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{zo[e]={value:e}}),Object.defineProperties(Io,zo),Object.defineProperty(qo,"isAxiosError",{value:!0}),Io.from=(e,t,r,n,o,i)=>{const a=Object.create(qo);Uo.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Io.call(a,s,c,r,n,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};function Ho(e){return Uo.isPlainObject(e)||Uo.isArray(e)}function Yo(e){return Uo.endsWith(e,"[]")?e.slice(0,-2):e}function Wo(e,t,r){return e?e.concat(t).map(function(e,t){return e=Yo(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Jo=Uo.toFlatObject(Uo,{},null,function(e){return/^is[A-Z]/.test(e)});function Vo(e,t,r){if(!Uo.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Uo.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Uo.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Uo.isSpecCompliantForm(t);if(!Uo.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Uo.isDate(e))return e.toISOString();if(Uo.isBoolean(e))return e.toString();if(!s&&Uo.isBlob(e))throw new Io("Blob is not supported. Use a Buffer instead.");return Uo.isArrayBuffer(e)||Uo.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(Uo.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Uo.isArray(e)&&function(e){return Uo.isArray(e)&&!e.some(Ho)}(e)||(Uo.isFileList(e)||Uo.endsWith(r,"[]"))&&(s=Uo.toArray(e)))return r=Yo(r),s.forEach(function(e,n){!Uo.isUndefined(e)&&null!==e&&t.append(!0===a?Wo([r],n,i):null===a?r:r+"[]",c(e))}),!1;return!!Ho(e)||(t.append(Wo(o,r,i),c(e)),!1)}const l=[],f=Object.assign(Jo,{defaultVisitor:u,convertValue:c,isVisitable:Ho});if(!Uo.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Uo.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Uo.forEach(r,function(r,i){!0===(!(Uo.isUndefined(r)||null===r)&&o.call(t,r,Uo.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function Ko(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Go(e,t){this._pairs=[],e&&Vo(e,this,t)}const Zo=Go.prototype;function Xo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Qo(e,t,r){if(!t)return e;const n=r&&r.encode||Xo;Uo.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Uo.isURLSearchParams(t)?t.toString():new Go(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Zo.append=function(e,t){this._pairs.push([e,t])},Zo.toString=function(e){const t=e?function(t){return e.call(this,t,Ko)}:Ko;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ei=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Uo.forEach(this.handlers,function(t){null!==t&&e(t)})}},ti={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ri={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Go,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ni="undefined"!=typeof window&&"undefined"!=typeof document,oi="object"==typeof navigator&&navigator||void 0,ii=ni&&(!oi||["ReactNative","NativeScript","NS"].indexOf(oi.product)<0),ai="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,si=ni&&window.location.href||"http://localhost";var ci={...Object.freeze({__proto__:null,hasBrowserEnv:ni,hasStandardBrowserEnv:ii,hasStandardBrowserWebWorkerEnv:ai,navigator:oi,origin:si}),...ri};function ui(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&Uo.isArray(n)?n.length:i,s)return Uo.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&Uo.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&Uo.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(Uo.isFormData(e)&&Uo.isFunction(e.entries)){const r={};return Uo.forEachEntry(e,(e,n)=>{t(function(e){return Uo.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const li={transitional:ti,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Uo.isObject(e);o&&Uo.isHTMLForm(e)&&(e=new FormData(e));if(Uo.isFormData(e))return n?JSON.stringify(ui(e)):e;if(Uo.isArrayBuffer(e)||Uo.isBuffer(e)||Uo.isStream(e)||Uo.isFile(e)||Uo.isBlob(e)||Uo.isReadableStream(e))return e;if(Uo.isArrayBufferView(e))return e.buffer;if(Uo.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Vo(e,new ci.classes.URLSearchParams,{visitor:function(e,t,r,n){return ci.isNode&&Uo.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Uo.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Vo(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(Uo.isString(e))try{return(t||JSON.parse)(e),Uo.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||li.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Uo.isResponse(e)||Uo.isReadableStream(e))return e;if(e&&Uo.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw Io.from(e,Io.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ci.classes.FormData,Blob:ci.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Uo.forEach(["delete","get","head","post","put","patch"],e=>{li.headers[e]={}});var fi=li;const di=Uo.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const hi=Symbol("internals");function pi(e){return e&&String(e).trim().toLowerCase()}function yi(e){return!1===e||null==e?e:Uo.isArray(e)?e.map(yi):String(e)}function mi(e,t,r,n,o){return Uo.isFunction(n)?n.call(this,t,r):(o&&(t=r),Uo.isString(t)?Uo.isString(n)?-1!==t.indexOf(n):Uo.isRegExp(n)?n.test(t):void 0:void 0)}class gi{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=pi(t);if(!o)throw new Error("header name must be a non-empty string");const i=Uo.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=yi(e))}const i=(e,t)=>Uo.forEach(e,(e,r)=>o(e,r,t));if(Uo.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Uo.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&di[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Uo.isObject(e)&&Uo.isIterable(e)){let r,n,o={};for(const t of e){if(!Uo.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?Uo.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=pi(e)){const r=Uo.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Uo.isFunction(t))return t.call(this,e,r);if(Uo.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pi(e)){const r=Uo.findKey(this,e);return!(!r||void 0===this[r]||t&&!mi(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=pi(e)){const o=Uo.findKey(r,e);!o||t&&!mi(0,r[o],o,t)||(delete r[o],n=!0)}}return Uo.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!mi(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Uo.forEach(this,(n,o)=>{const i=Uo.findKey(r,o);if(i)return t[i]=yi(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();a!==o&&delete t[o],t[a]=yi(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Uo.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Uo.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[hi]=this[hi]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=pi(e);t[n]||(!function(e,t){const r=Uo.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return Uo.isArray(e)?e.forEach(n):n(e),this}}gi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Uo.reduceDescriptors(gi.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Uo.freezeMethods(gi);var vi=gi;function wi(e,t){const r=this||fi,n=t||r,o=vi.from(n.headers);let i=n.data;return Uo.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function bi(e){return!(!e||!e.__CANCEL__)}function Si(e,t,r){Io.call(this,null==e?"canceled":e,Io.ERR_CANCELED,t,r),this.name="CanceledError"}function _i(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Io("Request failed with status code "+r.status,[Io.ERR_BAD_REQUEST,Io.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Uo.inherits(Si,Io,{__CANCEL__:!0});const Oi=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},i-s)))},()=>r&&a(r)]}(r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},Ei=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ji=e=>(...t)=>Uo.asap(()=>e(...t));var Ri=ci.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ci.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ci.origin),ci.navigator&&/(msie|trident)/i.test(ci.navigator.userAgent)):()=>!0,xi=ci.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];Uo.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Uo.isString(n)&&a.push("path="+n),Uo.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ti(e,t,r){let n=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ai=e=>e instanceof vi?{...e}:e;function ki(e,t){t=t||{};const r={};function n(e,t,r,n){return Uo.isPlainObject(e)&&Uo.isPlainObject(t)?Uo.merge.call({caseless:n},e,t):Uo.isPlainObject(t)?Uo.merge({},t):Uo.isArray(t)?t.slice():t}function o(e,t,r,o){return Uo.isUndefined(t)?Uo.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Uo.isUndefined(t))return n(void 0,t)}function a(e,t){return Uo.isUndefined(t)?Uo.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Ai(e),Ai(t),0,!0)};return Uo.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,a=i(e[n],t[n],n);Uo.isUndefined(a)&&i!==s||(r[n]=a)}),r}var Ci=e=>{const t=ki({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=vi.from(a),t.url=Qo(Ti(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Uo.isFormData(r))if(ci.hasStandardBrowserEnv||ci.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Uo.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&a.set(e,r)})}if(ci.hasStandardBrowserEnv&&(n&&Uo.isFunction(n)&&(n=n(t)),n||!1!==n&&Ri(t.url))){const e=o&&i&&xi.read(i);e&&a.set(o,e)}return t};var $i="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Ci(e);let o=n.data;const i=vi.from(n.headers).normalize();let a,s,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:h}=n;function p(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=vi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());_i(function(e){t(e),p()},function(e){r(e),p()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new Io("Request aborted",Io.ECONNABORTED,e,y)),y=null)},y.onerror=function(t){const n=new Io(t&&t.message?t.message:"Network Error",Io.ERR_NETWORK,e,y);n.event=t||null,r(n),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||ti;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Io(t,o.clarifyTimeoutError?Io.ETIMEDOUT:Io.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&Uo.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),Uo.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),h&&([c,l]=Oi(h,!0),y.addEventListener("progress",c)),d&&y.upload&&([s,u]=Oi(d),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{y&&(r(!t||t.type?new Si(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ci.protocols.indexOf(g)?r(new Io("Unsupported protocol "+g+":",Io.ERR_BAD_REQUEST,e)):y.send(o||null)})};var Di=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Io?t:new Si(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Io(`timeout ${t} of ms exceeded`,Io.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=()=>Uo.asap(a),s}};const Pi=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},Ni=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Fi=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Ni(e))yield*Pi(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Mi}=Uo,Li=(({Request:e,Response:t})=>({Request:e,Response:t}))(Uo.global),{ReadableStream:Bi,TextEncoder:Ui}=Uo.global,Ii=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},qi=e=>{e=Uo.merge.call({skipUndefined:!0},Li,e);const{fetch:t,Request:r,Response:n}=e,o=t?Mi(t):"function"==typeof fetch,i=Mi(r),a=Mi(n);if(!o)return!1;const s=o&&Mi(Bi),c=o&&("function"==typeof Ui?(u=new Ui,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=i&&s&&Ii(()=>{let e=!1;const t=new r(ci.origin,{body:new Bi,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),f=a&&s&&Ii(()=>Uo.isReadableStream(new n("").body)),d={stream:f&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Io(`Response type '${e}' is not supported`,Io.ERR_NOT_SUPPORT,r)})});const h=async(e,t)=>{const n=Uo.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Uo.isBlob(e))return e.size;if(Uo.isSpecCompliantForm(e)){const t=new r(ci.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Uo.isArrayBufferView(e)||Uo.isArrayBuffer(e)?e.byteLength:(Uo.isURLSearchParams(e)&&(e+=""),Uo.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:u,timeout:p,onDownloadProgress:y,onUploadProgress:m,responseType:g,headers:v,withCredentials:w="same-origin",fetchOptions:b}=Ci(e),S=t||fetch;g=g?(g+"").toLowerCase():"text";let _=Di([c,u&&u.toAbortSignal()],p),O=null;const E=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let j;try{if(m&&l&&"get"!==a&&"head"!==a&&0!==(j=await h(v,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(Uo.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,r]=Ei(j,Oi(ji(m)));s=Fi(t.body,65536,e,r)}}Uo.isString(w)||(w=w?"include":"omit");const t=i&&"credentials"in r.prototype,c={...b,signal:_,method:a.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?w:void 0};O=i&&new r(o,c);let u=await(i?S(O,b):S(o,c));const p=f&&("stream"===g||"response"===g);if(f&&(y||p&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=Uo.toFiniteNumber(u.headers.get("content-length")),[r,o]=y&&Ei(t,Oi(ji(y),!0))||[];u=new n(Fi(u.body,65536,r,()=>{o&&o(),E&&E()}),e)}g=g||"text";let R=await d[Uo.findKey(d,g)||"text"](u,e);return!p&&E&&E(),await new Promise((t,r)=>{_i(t,r,{data:R,headers:vi.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(E&&E(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Io("Network Error",Io.ERR_NETWORK,e,O),{cause:t.cause||t});throw Io.from(t,t&&t.code,e,O)}}},zi=new Map,Hi=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let a,s,c=i.length,u=zi;for(;c--;)a=i[c],s=u.get(a),void 0===s&&u.set(a,s=c?new Map:qi(t)),u=s;return s};Hi();const Yi={http:null,xhr:$i,fetch:{get:Hi}};Uo.forEach(Yi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Wi=e=>`- ${e}`,Ji=e=>Uo.isFunction(e)||null===e||!1===e;var Vi=(e,t)=>{e=Uo.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!Ji(n)&&(o=Yi[(r=String(n)).toLowerCase()],void 0===o))throw new Io(`Unknown adapter '${r}'`);if(o&&(Uo.isFunction(o)||(o=o.get(t))))break;i[r||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Io("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(Wi).join("\n"):" "+Wi(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function Ki(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Si(null,e)}function Gi(e){Ki(e),e.headers=vi.from(e.headers),e.data=wi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Vi(e.adapter||fi.adapter,e)(e).then(function(t){return Ki(e),t.data=wi.call(e,e.transformResponse,t),t.headers=vi.from(t.headers),t},function(t){return bi(t)||(Ki(e),t&&t.response&&(t.response.data=wi.call(e,e.transformResponse,t.response),t.response.headers=vi.from(t.response.headers))),Promise.reject(t)})}const Zi="1.12.2",Xi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Qi={};Xi.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Zi+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Io(n(o," has been removed"+(t?" in "+t:"")),Io.ERR_DEPRECATED);return t&&!Qi[o]&&(Qi[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Xi.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var ea={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Io("options must be an object",Io.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new Io("option "+i+" must be "+r,Io.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Io("Unknown option "+i,Io.ERR_BAD_OPTION)}},validators:Xi};const ta=ea.validators;class ra{constructor(e){this.defaults=e||{},this.interceptors={request:new ei,response:new ei}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ki(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&ea.assertOptions(r,{silentJSONParsing:ta.transitional(ta.boolean),forcedJSONParsing:ta.transitional(ta.boolean),clarifyTimeoutError:ta.transitional(ta.boolean)},!1),null!=n&&(Uo.isFunction(n)?t.paramsSerializer={serialize:n}:ea.assertOptions(n,{encode:ta.function,serialize:ta.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ea.assertOptions(t,{baseUrl:ta.spelling("baseURL"),withXsrfToken:ta.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Uo.merge(o.common,o[t.method]);o&&Uo.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=vi.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!s){const e=[Gi.bind(this),void 0];for(e.unshift(...a),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=a.length;let d=t;for(;f<l;){const e=a[f++],t=a[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Gi.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Qo(Ti((e=ki(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Uo.forEach(["delete","get","head","options"],function(e){ra.prototype[e]=function(t,r){return this.request(ki(r||{},{method:e,url:t,data:(r||{}).data}))}}),Uo.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(ki(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ra.prototype[e]=t(),ra.prototype[e+"Form"]=t(!0)});var na=ra;class oa{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new Si(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new oa(function(t){e=t}),cancel:e}}}var ia=oa;const aa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(aa).forEach(([e,t])=>{aa[t]=e});var sa=aa;const ca=function e(t){const r=new na(t),n=Gn(na.prototype.request,r);return Uo.extend(n,na.prototype,r,{allOwnKeys:!0}),Uo.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ki(t,r))},n}(fi);ca.Axios=na,ca.CanceledError=Si,ca.CancelToken=ia,ca.isCancel=bi,ca.VERSION=Zi,ca.toFormData=Vo,ca.AxiosError=Io,ca.Cancel=ca.CanceledError,ca.all=function(e){return Promise.all(e)},ca.spread=function(e){return function(t){return e.apply(null,t)}},ca.isAxiosError=function(e){return Uo.isObject(e)&&!0===e.isAxiosError},ca.mergeConfig=ki,ca.AxiosHeaders=vi,ca.formToJSON=e=>ui(Uo.isHTMLForm(e)?new FormData(e):e),ca.getAdapter=Vi,ca.HttpStatusCode=sa,ca.default=ca;var ua=ca;let la=async(e,t)=>{let r={draw:6,"columns[0][data]":0,"columns[0][name]":"EventNo","columns[0][searchable]":!1,"columns[0][orderable]":!0,"columns[0][search][value]":"","columns[0][search][regex]":!1,"columns[1][data]":1,"columns[1][name]":"MaxIntensity","columns[1][searchable]":!0,"columns[1][orderable]":!0,"columns[1][search][value]":"","columns[1][search][regex]":!1,"columns[2][data]":2,"columns[2][name]":"OriginTime","columns[2][searchable]":!0,"columns[2][orderable]":!0,"columns[2][search][value]":"","columns[2][search][regex]":!1,"columns[3][data]":3,"columns[3][name]":"MagnitudeValue","columns[3][searchable]":!0,"columns[3][orderable]":!0,"columns[3][search][value]":"","columns[3][search][regex]":!1,"columns[4][data]":4,"columns[4][name]":"Depth","columns[4][searchable]":!0,"columns[4][orderable]":!0,"columns[4][search][value]":"","columns[4][search][regex]":!1,"columns[5][data]":5,"columns[5][name]":"Description","columns[5][searchable]":!0,"columns[5][orderable]":!0,"columns[5][search][value]":"","columns[5][search][regex]":!1,"columns[6][data]":6,"columns[6][name]":"Description","columns[6][searchable]":!0,"columns[6][orderable]":!0,"columns[6][search][value]":"","columns[6][search][regex]":!1,"order[0][column]":2,"order[0][dir]":"desc",start:0,length:-1,"search[value]":"","search[regex]":!1,Search:"",txtSDate:`${wt(e)}-1-1`,txtEDate:`${wt(t)+1}-1-1`,txtSscale:"",txtEscale:"",txtSdepth:"",txtEdepth:"",txtLonS:"",txtLonE:"",txtLatS:"",txtLatE:"",ddlCity:"",ddlTown:"",ddlCitySta:"",ddlStation:"",txtIntensityB:"",txtIntensityE:"",txtLon:"",txtLat:"",txtKM:"",ddlStationName:"------",cblEventNo:"Y",txtSDatePWS:"",txtEDatePWS:"",txtSscalePWS:"",txtEscalePWS:"",ddlMark:""},n=null;try{n=(await ua.post("https://scweb.cwa.gov.tw/zh-tw/earthquake/ajaxhandler",(o=r,un(Rr(o,(e,t)=>{let r=null==e?"":e;return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}),"&")),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(e){console.log(e)}var o;return n};function fa(e){return e!=e}function da(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,fa,r)}var ha="\\ud800-\\udfff",pa="["+ha+"]",ya="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ma="\\ud83c[\\udffb-\\udfff]",ga="[^"+ha+"]",va="(?:\\ud83c[\\udde6-\\uddff]){2}",wa="[\\ud800-\\udbff][\\udc00-\\udfff]",ba="(?:"+ya+"|"+ma+")"+"?",Sa="[\\ufe0e\\ufe0f]?",_a=Sa+ba+("(?:\\u200d(?:"+[ga,va,wa].join("|")+")"+Sa+ba+")*"),Oa="(?:"+[ga+ya+"?",ya,va,wa,pa].join("|")+")",Ea=RegExp(ma+"(?="+ma+")|"+Oa+_a,"g");function ja(e){return Ar(e)?function(e){return e.match(Ea)||[]}(e):function(e){return e.split("")}(e)}function Ra(e,t,r){if((e=le(e))&&(r||void 0===t))return ot(e);if(!e||!(t=ue(t)))return e;var n=ja(e),o=ja(t),i=function(e,t){for(var r=-1,n=e.length;++r<n&&da(t,e[r],0)>-1;);return r}(n,o),a=function(e,t){for(var r=e.length;r--&&da(t,e[r],0)>-1;);return r}(n,o)+1;return function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:Xr(e,t,r)}(n,i,a).join("")}let xa=async(t,r)=>{let n=await fetch(t);if(!n.ok)throw new Error(`can not download file, status[${n.status}]: ${n.statusText}`);let o=await n.arrayBuffer(),i=Buffer.from(o);e.writeFileSync(r,i)},Ta=async(e,t)=>{Et(e)||xt(e);let r=[{url:t.urlPicEqReport,fn:"picEqReport.gif"},{url:t.urlPicEqIntensity,fn:"picEqIntensity.png"},{url:t.urlPicEqPga,fn:"picEqPga.png"},{url:t.urlPicEqPgv,fn:"picEqPgv.png"}];await en(r,async t=>{let r=`${e}/${t.fn}`;await(async(e,t,r={})=>{let n=pe(r,"retries");bt(n)||(n=3),n=wt(n);let o=pe(r,"retrietimeDelays");bt(o)||(o=1e3),o=ht(o);let i="error",a=null,s=null;for(let r=1;r<=n&&(await xa(e,t).then(e=>{s=e,i="success"}).catch(e=>{console.log(e),a=e}),await Cn(o),null===s);r++);if("error"===i)throw new Error(a);return s})(t.url,r)})};return async(t,r,n={})=>{if(!tt(t))throw new Error("yearStart is not a number");if(t=wt(t),!tt(r))throw new Error("yearEnd is not a number");r=wt(r);let o=pe(n,"keyId");et(o)||(o="id");let i=pe(n,"fdTagRemove");et(i)||(i="./_tagRemove");let a=pe(n,"fdDwAttime");et(a)||(a="./_dwAttime"),Et(a)||xt(a);let c=pe(n,"fdDwCurrent");et(c)||(c="./_dwCurrent"),Et(c)||xt(c);let u=pe(n,"fdResult");et(u)||(u="./_result"),Et(u)||xt(u);let l=pe(n,"fdTaskCpActualSrc");et(l)||(l="./_taskCpActualSrc"),Et(l)||xt(l);let f=pe(n,"fdTaskCpSrc");et(f)||(f="./_taskCpSrc"),Et(f)||xt(f);let d=pe(n,"fdLog");et(d)||(d="./_logs"),Et(d)||xt(d);let h=pe(n,"funDownload"),p=pe(n,"funGetCurrent"),y=pe(n,"funAdd"),m=pe(n,"funModify"),g=pe(n,"funRemove"),v=pe(n,"timeToleranceRemove");bt(v)||(v=0),v=ht(v);let w=async()=>{let n=await la(t,r),i=Rr(pe(n,"data",[]),e=>{let t=pe(e,0,""),r=pe(e,1,""),n=pe(e,2,""),o=pe(e,3,""),i=pe(e,4,""),a=pe(e,5,""),s=pe(e,6,""),c=pe(e,7,""),u=pe(e,8,"");r=Ra(r);let l=Rn(n,"YYYY-MM-DD HH-mm:ss"),f=l.format("YYYY-MM-DDTHH:mm:ssZ"),d=l.format("YYYYMMDDHHmmss"),h=l.format("YYYY"),p=l.format("YYYYMM"),y="";return tt(r)&&tt(h)&&(y=`${wt(h)-1911}${r}`),{id:y,tag:t,number:r,time:f,timeRec:n,timeTag:d,ml:o,depth:i,location:a,intensity:s,longitude:c,latitude:u,urlWebEqInfor:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Details/${t}`,urlWebEqReport:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Imgs/${t}`,urlWebEqIntensity:`https://scweb.cwa.gov.tw/zh-TW/earthquake/ShakeMap/${t}`,urlWebEqWave:`https://scweb.cwa.gov.tw/zh-TW/earthquake/WaveformAcc/${t}`,urlPicEqReport:`https://scweb.cwa.gov.tw/webdata/OLDEQ/${p}/${t}.gif`,urlPicEqIntensity:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${h}/${h}${r}i.png`,urlPicEqPga:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${h}/${h}${r}a.png`,urlPicEqPgv:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${h}/${h}${r}v.png`}});var s;return i=null==(s=i)?s:Xe.call(s),Ze(i,t=>{let r=`${a}/${t[o]}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8")}),i};St(h)||(h=w);let b=async()=>{let t=Ct(c,1),r=[];return Ze(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};St(p)||(p=b);let S=async t=>{let r=`${u}/${t[o]}`;Et(r)&&Tt(r,{fs:e})};St(g)||(g=S);let _=async(t,r)=>{await Ta(t,r);let n=`${t}/picEqReport.gif`,o=`${t}/picEqIntensityList.gif`;await(async(t,r,n,o,i,a)=>{let c=e.readFileSync(t),u=await s(c,{animated:!1}).extract({left:n,top:o,width:i,height:a}).toBuffer();e.writeFileSync(r,u)})(n,o,364,199,276,204)},O=async e=>{let t=`${u}/${e[o]}`;Et(t)||xt(t),Rt(t),await _(t,e)};St(y)||(y=O);let E=async e=>{let t=`${u}/${e[o]}`;Et(t)||xt(t),Rt(t),await _(t,e)};St(m)||(m=E);let j={fdTagRemove:i,fdDwAttime:a,fdDwCurrent:c,fdTaskCpActualSrc:l,fdTaskCpSrc:f,fdLog:d,funDownload:h,funGetCurrent:p,funRemove:g,funAdd:y,funModify:m,timeToleranceRemove:v};return await Kn(j)}});
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("crypto"),require("events"),require("chokidar"),require("sharp")):"function"==typeof define&&define.amd?define(["fs","path","crypto","events","chokidar","sharp"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweq"]=t(e.fs,e.path,e.crypto,e.events,e.chokidar,e.sharp)}(this,function(e,t,r,n,o,i){"use strict";var a=Array.isArray,s="object"==typeof global&&global&&global.Object===Object&&global,c="object"==typeof self&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),l=u.Symbol,f=Object.prototype,d=f.hasOwnProperty,h=f.toString,p=l?l.toStringTag:void 0;var y=Object.prototype.toString;var m=l?l.toStringTag:void 0;function g(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":m&&m in Object(e)?function(e){var t=d.call(e,p),r=e[p];try{e[p]=void 0;var n=!0}catch(e){}var o=h.call(e);return n&&(t?e[p]=r:delete e[p]),o}(e):function(e){return y.call(e)}(e)}function v(e){return null!=e&&"object"==typeof e}function w(e){return"symbol"==typeof e||v(e)&&"[object Symbol]"==g(e)}var b=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S=/^\w*$/;function _(e,t){if(a(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!w(e))||(S.test(e)||!b.test(e)||null!=t&&e in Object(t))}function O(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function E(e){if(!O(e))return!1;var t=g(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var j,R=u["__core-js_shared__"],x=(j=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"";var A=Function.prototype.toString;function T(e){if(null!=e){try{return A.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var $=/^\[object .+?Constructor\]$/,k=Function.prototype,C=Object.prototype,D=k.toString,P=C.hasOwnProperty,N=RegExp("^"+D.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function F(e){return!(!O(e)||(t=e,x&&x in t))&&(E(e)?N:$).test(T(e));var t}function M(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return F(r)?r:void 0}var L=M(Object,"create");var B=Object.prototype.hasOwnProperty;var U=Object.prototype.hasOwnProperty;function I(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function q(e,t){return e===t||e!=e&&t!=t}function z(e,t){for(var r=e.length;r--;)if(q(e[r][0],t))return r;return-1}I.prototype.clear=function(){this.__data__=L?L(null):{},this.size=0},I.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},I.prototype.get=function(e){var t=this.__data__;if(L){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return B.call(t,e)?t[e]:void 0},I.prototype.has=function(e){var t=this.__data__;return L?void 0!==t[e]:U.call(t,e)},I.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=L&&void 0===t?"__lodash_hash_undefined__":t,this};var H=Array.prototype.splice;function Y(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,r=z(t,e);return!(r<0)&&(r==t.length-1?t.pop():H.call(t,r,1),--this.size,!0)},Y.prototype.get=function(e){var t=this.__data__,r=z(t,e);return r<0?void 0:t[r][1]},Y.prototype.has=function(e){return z(this.__data__,e)>-1},Y.prototype.set=function(e,t){var r=this.__data__,n=z(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var W=M(u,"Map");function J(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function V(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}V.prototype.clear=function(){this.size=0,this.__data__={hash:new I,map:new(W||Y),string:new I}},V.prototype.delete=function(e){var t=J(this,e).delete(e);return this.size-=t?1:0,t},V.prototype.get=function(e){return J(this,e).get(e)},V.prototype.has=function(e){return J(this,e).has(e)},V.prototype.set=function(e,t){var r=J(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function K(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(K.Cache||V),r}K.Cache=V;var G,Z,X,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/\\(\\)?/g,te=(G=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,r,n,o){t.push(n?o.replace(ee,"$1"):r||e)}),t},Z=K(G,function(e){return 500===X.size&&X.clear(),e}),X=Z.cache,Z),re=te;function ne(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var oe=l?l.prototype:void 0,ie=oe?oe.toString:void 0;function ae(e){if("string"==typeof e)return e;if(a(e))return ne(e,ae)+"";if(w(e))return ie?ie.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function se(e){return null==e?"":ae(e)}function ce(e,t){return a(e)?e:_(e,t)?[e]:re(se(e))}function ue(e){if("string"==typeof e||w(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function le(e,t){for(var r=0,n=(t=ce(t,e)).length;null!=e&&r<n;)e=e[ue(t[r++])];return r&&r==n?e:void 0}function fe(e,t,r){var n=null==e?void 0:le(e,t);return void 0===n?r:n}function de(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var he,pe=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[he?a:++n];if(!1===t(o[s],s,o))break}return e};function ye(e){return v(e)&&"[object Arguments]"==g(e)}var me=Object.prototype,ge=me.hasOwnProperty,ve=me.propertyIsEnumerable,we=ye(function(){return arguments}())?ye:function(e){return v(e)&&ge.call(e,"callee")&&!ve.call(e,"callee")},be=we;var Se="object"==typeof exports&&exports&&!exports.nodeType&&exports,_e=Se&&"object"==typeof module&&module&&!module.nodeType&&module,Oe=_e&&_e.exports===Se?u.Buffer:void 0,Ee=(Oe?Oe.isBuffer:void 0)||function(){return!1},je=/^(?:0|[1-9]\d*)$/;function Re(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&je.test(e))&&e>-1&&e%1==0&&e<t}function xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var Ae={};Ae["[object Float32Array]"]=Ae["[object Float64Array]"]=Ae["[object Int8Array]"]=Ae["[object Int16Array]"]=Ae["[object Int32Array]"]=Ae["[object Uint8Array]"]=Ae["[object Uint8ClampedArray]"]=Ae["[object Uint16Array]"]=Ae["[object Uint32Array]"]=!0,Ae["[object Arguments]"]=Ae["[object Array]"]=Ae["[object ArrayBuffer]"]=Ae["[object Boolean]"]=Ae["[object DataView]"]=Ae["[object Date]"]=Ae["[object Error]"]=Ae["[object Function]"]=Ae["[object Map]"]=Ae["[object Number]"]=Ae["[object Object]"]=Ae["[object RegExp]"]=Ae["[object Set]"]=Ae["[object String]"]=Ae["[object WeakMap]"]=!1;var Te="object"==typeof exports&&exports&&!exports.nodeType&&exports,$e=Te&&"object"==typeof module&&module&&!module.nodeType&&module,ke=$e&&$e.exports===Te&&s.process,Ce=function(){try{var e=$e&&$e.require&&$e.require("util").types;return e||ke&&ke.binding&&ke.binding("util")}catch(e){}}(),De=Ce&&Ce.isTypedArray,Pe=De?function(e){return function(t){return e(t)}}(De):function(e){return v(e)&&xe(e.length)&&!!Ae[g(e)]},Ne=Pe,Fe=Object.prototype.hasOwnProperty;function Me(e,t){var r=a(e),n=!r&&be(e),o=!r&&!n&&Ee(e),i=!r&&!n&&!o&&Ne(e),s=r||n||o||i,c=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=c.length;for(var l in e)!t&&!Fe.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Re(l,u))||c.push(l);return c}var Le=Object.prototype;function Be(e,t){return function(r){return e(t(r))}}var Ue=Be(Object.keys,Object),Ie=Object.prototype.hasOwnProperty;function qe(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Le))return Ue(e);var t,r,n=[];for(var o in Object(e))Ie.call(e,o)&&"constructor"!=o&&n.push(o);return n}function ze(e){return null!=e&&xe(e.length)&&!E(e)}function He(e){return ze(e)?Me(e):qe(e)}var Ye=function(e,t){return function(r,n){if(null==r)return r;if(!ze(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(function(e,t){return e&&pe(e,t,He)}),We=Ye;function Je(e){return e}function Ve(e,t){var r;return(a(e)?de:We)(e,"function"==typeof(r=t)?r:Je)}var Ke=Array.prototype.reverse;function Ge(e){return"[object String]"===Object.prototype.toString.call(e)}function Ze(e){return!(!Ge(e)||""===e)}function Xe(e){let t=!1;if(Ze(e))t=!isNaN(Number(e));else if(function(e){return"[object Number]"===Object.prototype.toString.call(e)}(e)){if(function(e){return e!=e}(e))return!1;t=!0}return t}var Qe=/\s/;var et=/^\s+/;function tt(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Qe.test(e.charAt(t)););return t}(e)+1).replace(et,""):e}var rt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,ot=/^0o[0-7]+$/i,it=parseInt;function at(e){if("number"==typeof e)return e;if(w(e))return NaN;if(O(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=O(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tt(e);var r=nt.test(e);return r||ot.test(e)?it(e.slice(2),r?2:8):rt.test(e)?NaN:+e}var st=1/0;function ct(e){return e?(e=at(e))===st||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ut(e){var t=ct(e),r=t%1;return t==t?r?t-r:t:0}function lt(e){if(!Xe(e))return 0;return ct(e)}function ft(e){return!!Xe(e)&&(e=lt(e),"number"==typeof(t=e)&&t==ut(t));var t}var dt=u.isFinite,ht=Math.min;var pt=function(e){var t=Math[e];return function(e,r){if(e=at(e),(r=null==r?0:ht(ut(r),292))&&dt(e)){var n=(se(e)+"e").split("e");return+((n=(se(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),yt=pt;function mt(e){if(!Xe(e))return 0;e=lt(e);let t=yt(e);return"0"===String(t)?0:t}function gt(e){if(!ft(e))return!1;return mt(e)>=0}function vt(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function wt(e,t={}){let r=fe(t,"fs"),n=!1;try{r.statSync(e),n=!0}catch{n=!1}return n}function bt(e,t={}){let r=fe(t,"fs");if(!wt(e,{fs:r}))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function St(t){return bt(t,{fs:e})}function _t(e,t={}){let r=fe(t,"fs");if(bt(e,{fs:r}))return{success:"input folder is already exists: "+e};if(wt(e,{fs:r}))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function Ot(r){return function(e,t={}){let r=fe(t,"path"),n=fe(t,"fs");if(!wt(e,{fs:n})){let t=_t(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!bt(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let o of t){let t=r.join(e,o);n.statSync(t).isDirectory()?n.rmSync(t,{recursive:!0,force:!0}):n.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}(r,{path:t,fs:e})}function Et(t){return _t(t,{fs:e})}function jt(e,t={}){let r=fe(t,"fs");if(!wt(e,{fs:r}))return{success:"folder does not exist: "+e};if(!bt(e,{fs:r}))return{error:"input path is not a folder: "+e};try{r.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function Rt(e){if(!ft(e))return!1;return mt(e)>0}function xt(e,t=1,r={}){let n=1,o=fe(r,"path"),i=fe(r,"fs");if(!bt(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return null!==t&&Rt(t)&&(t=mt(t))<1&&(t=1),function e(r){let a=[];return bt(r,{fs:i})?(Ve(i.readdirSync(r),function(s){let c=o.resolve(r,s),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(a.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(a=a.concat(e(c))),n-=1):a.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),a):a}(e)}function At(r,n=1){return xt(r,n,{path:t,fs:e})}function Tt(e){return!0===(t=e)||!1===t||v(t)&&"[object Boolean]"==g(t);var t}function $t(e){let t,r=Object.prototype.toString.call(e);if(t="[object Promise]"===r,t)return!0;if("[object Function]"!==r)return!1;try{t="function"!=typeof e.subscribe&&"function"==typeof e.then}catch(e){}return t}function kt(e){var t=this.__data__=new Y(e);this.size=t.size}kt.prototype.clear=function(){this.__data__=new Y,this.size=0},kt.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},kt.prototype.get=function(e){return this.__data__.get(e)},kt.prototype.has=function(e){return this.__data__.has(e)},kt.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Y){var n=r.__data__;if(!W||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new V(n)}return r.set(e,t),this.size=r.size,this};function Ct(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new V;++t<r;)this.add(e[t])}function Dt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Pt(e,t){return e.has(t)}Ct.prototype.add=Ct.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ct.prototype.has=function(e){return this.__data__.has(e)};function Nt(e,t,r,n,o,i){var a=1&r,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,d=!0,h=2&r?new Ct:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var p=e[f],y=t[f];if(n)var m=a?n(y,p,f,t,e,i):n(p,y,f,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!Dt(t,function(e,t){if(!Pt(h,t)&&(p===e||o(p,e,r,n,i)))return h.push(t)})){d=!1;break}}else if(p!==y&&!o(p,y,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}var Ft=u.Uint8Array;function Mt(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Lt(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Bt=l?l.prototype:void 0,Ut=Bt?Bt.valueOf:void 0;function It(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}var qt=Object.prototype.propertyIsEnumerable,zt=Object.getOwnPropertySymbols,Ht=zt?function(e){return null==e?[]:(e=Object(e),It(zt(e),function(t){return qt.call(e,t)}))}:function(){return[]};function Yt(e){return function(e,t,r){var n=t(e);return a(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,He,Ht)}var Wt=Object.prototype.hasOwnProperty;var Jt=M(u,"DataView"),Vt=M(u,"Promise"),Kt=M(u,"Set"),Gt=M(u,"WeakMap"),Zt="[object Map]",Xt="[object Promise]",Qt="[object Set]",er="[object WeakMap]",tr="[object DataView]",rr=T(Jt),nr=T(W),or=T(Vt),ir=T(Kt),ar=T(Gt),sr=g;(Jt&&sr(new Jt(new ArrayBuffer(1)))!=tr||W&&sr(new W)!=Zt||Vt&&sr(Vt.resolve())!=Xt||Kt&&sr(new Kt)!=Qt||Gt&&sr(new Gt)!=er)&&(sr=function(e){var t=g(e),r="[object Object]"==t?e.constructor:void 0,n=r?T(r):"";if(n)switch(n){case rr:return tr;case nr:return Zt;case or:return Xt;case ir:return Qt;case ar:return er}return t});var cr=sr,ur="[object Arguments]",lr="[object Array]",fr="[object Object]",dr=Object.prototype.hasOwnProperty;function hr(e,t,r,n,o,i){var s=a(e),c=a(t),u=s?lr:cr(e),l=c?lr:cr(t),f=(u=u==ur?fr:u)==fr,d=(l=l==ur?fr:l)==fr,h=u==l;if(h&&Ee(e)){if(!Ee(t))return!1;s=!0,f=!1}if(h&&!f)return i||(i=new kt),s||Ne(e)?Nt(e,t,r,n,o,i):function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Ft(e),new Ft(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return q(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Mt;case"[object Set]":var c=1&n;if(s||(s=Lt),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var l=Nt(s(e),s(t),n,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Ut)return Ut.call(e)==Ut.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var p=f&&dr.call(e,"__wrapped__"),y=d&&dr.call(t,"__wrapped__");if(p||y){var m=p?e.value():e,g=y?t.value():t;return i||(i=new kt),o(m,g,r,n,i)}}return!!h&&(i||(i=new kt),function(e,t,r,n,o,i){var a=1&r,s=Yt(e),c=s.length;if(c!=Yt(t).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in t:Wt.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++u<c;){var y=e[l=s[u]],m=t[l];if(n)var g=a?n(m,y,l,t,e,i):n(y,m,l,e,t,i);if(!(void 0===g?y===m||o(y,m,r,n,i):g)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,n,o,i))}function pr(e,t,r,n,o){return e===t||(null==e||null==t||!v(e)&&!v(t)?e!=e&&t!=t:hr(e,t,r,n,pr,o))}function yr(e){return e==e&&!O(e)}function mr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function gr(e){var t=function(e){for(var t=He(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,yr(o)]}return t}(e);return 1==t.length&&t[0][2]?mr(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=r[o])[0],u=e[c],l=s[1];if(a&&s[2]){if(void 0===u&&!(c in e))return!1}else{var f=new kt;if(n)var d=n(u,l,c,e,t,f);if(!(void 0===d?pr(l,u,3,n,f):d))return!1}}return!0}(r,e,t)}}function vr(e,t){return null!=e&&t in Object(e)}function wr(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=ce(t,e)).length,i=!1;++n<o;){var s=ue(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&xe(o)&&Re(s,o)&&(a(e)||be(e))}(e,t,vr)}function br(e){return function(t){return null==t?void 0:t[e]}}function Sr(e){return _(e)?br(ue(e)):function(e){return function(t){return le(t,e)}}(e)}function _r(e){return"function"==typeof e?e:null==e?Je:"object"==typeof e?a(e)?function(e,t){return _(e)&&yr(t)?mr(ue(e),t):function(r){var n=fe(r,e);return void 0===n&&n===t?wr(r,e):pr(t,n,3)}}(e[0],e[1]):gr(e):Sr(e)}function Or(e,t){var r=-1,n=ze(e)?Array(e.length):[];return We(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function Er(e,t){return(a(e)?ne:Or)(e,_r(t))}var jr=br("length"),Rr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function xr(e){return Rr.test(e)}var Ar="\\ud800-\\udfff",Tr="["+Ar+"]",$r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",kr="\\ud83c[\\udffb-\\udfff]",Cr="[^"+Ar+"]",Dr="(?:\\ud83c[\\udde6-\\uddff]){2}",Pr="[\\ud800-\\udbff][\\udc00-\\udfff]",Nr="(?:"+$r+"|"+kr+")"+"?",Fr="[\\ufe0e\\ufe0f]?",Mr=Fr+Nr+("(?:\\u200d(?:"+[Cr,Dr,Pr].join("|")+")"+Fr+Nr+")*"),Lr="(?:"+[Cr+$r+"?",$r,Dr,Pr,Tr].join("|")+")",Br=RegExp(kr+"(?="+kr+")|"+Lr+Mr,"g");function Ur(e){return xr(e)?function(e){for(var t=Br.lastIndex=0;Br.test(e);)++t;return t}(e):jr(e)}function Ir(e){if(null==e)return 0;if(ze(e))return"string"==typeof(t=e)||!a(t)&&v(t)&&"[object String]"==g(t)?Ur(e):e.length;var t,r=cr(e);return"[object Map]"==r||"[object Set]"==r?e.size:qe(e).length}function qr(e,t){return Ze(e)&>(t)?0===(t=mt(t))?e:function(e,t){if(!Ze(e))return"";if(!gt(t))return"";if(0===(t=mt(t)))return"";let r=e.length-t;return r<0&&(r=0),e.substring(r,r+t)}(e,e.length-t):""}function zr(e,t){var r=[];return We(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function Hr(e,t){return(a(e)?It:zr)(e,_r(t))}function Yr(e){return"[object Array]"===Object.prototype.toString.call(e)}function Wr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Jr(e,t){return!!Wr(e)&&(!(!Ze(t)&&!Xe(t))&&t in e)}function Vr(e,t,r,n={}){let o=fe(n,"withInfor");Tt(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!Ze(r))return console.log("invalid key"),o&&(i.infor={}),i;Yr(e)||(e=[e]),Yr(t)||(t=[t]),e=Hr(e,e=>Jr(e,r)),t=Hr(t,e=>Jr(e,r));let a=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=a.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),a.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(a.values()),o){let e={};for(let t of i.del)e[t[r]]="del";for(let t of i.add)e[t[r]]="add";for(let t of i.diff)e[t[r]]="diff";for(let t of i.same)e[t[r]]="same";i.infor=e}return i}function Kr(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}function Gr(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function Zr(e,t){let r=Gr();if(!Yr(e)&&!Wr(e))return r.reject("rs is not an array or object"),r;let n=!1;if(Wr(e)){n=!0;let t=[];Ve(e,(e,r)=>{t.push({k:r,v:e})}),e=t}vt(t)||(t=function(e){return e});let o=-1,i=[];return e.reduce(function(e,r){return e.then(function(e){i.push(e),o+=1;let a=o,s=r;return n&&(a=r.k,s=r.v),vt(t)?t(s,a):s})},Promise.resolve()).then(function(e){var t,n,o,a;i.push(e),a=null==(t=i)?0:t.length,i=a?Kr(t,(n=o||void 0===n?1:ut(n))<0?0:n,a):[],r.resolve(i)}).catch(function(e){r.reject(e)}),r}function Xr(e,t={}){let r=fe(t,"fs");return!!wt(e,{fs:r})&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function Qr(e,t,r={}){let n=fe(r,"path"),o=fe(r,"fs"),i=fe(r,"useSync","");Tt(i)||(i=!0);let a="";return a=i?function(e,t,r={}){let n=fe(r,"path"),o=fe(r,"fs");if(!Xr(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};try{_t(n.dirname(t),{fs:o}),o.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=fe(r,"path"),o=fe(r,"fs");if(!Xr(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};let i=null;return await(async(e,t)=>{_t(n.dirname(t),{fs:o}),await new Promise((r,n)=>{let i=o.createReadStream(e),a=o.createWriteStream(t);i.on("error",n),a.on("error",n),a.on("finish",r),i.pipe(a)})})(e,t).then(()=>{i={success:"done: "+t}}).catch(e=>{i={error:e}}),i}(e,t,{path:n,fs:o}),a}function en(e,t={}){let r=fe(t,"fs");if(!wt(e,{fs:r}))return{success:"file does not exist: "+e};if(!Xr(e,{fs:r}))return{error:"input path is not a file: "+e};try{r.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}function tn(e,t,r={}){let n=fe(r,"path"),o=fe(r,"fs");if(!bt(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),a=n.resolve(t,r),s=o.lstatSync(i);if(s.isDirectory())_t(a,{fs:o}),tn(i,a,{path:n,fs:o});else if(s.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,a)}else _t(n.dirname(a),{fs:o}),o.copyFileSync(i,a)})}catch(e){return{error:e}}return{success:"done: "+t}}function rn(e,t,r={}){let n=fe(r,"path"),o=fe(r,"fs"),i=fe(r,"useSync","");Tt(i)||(i=!0);let a="";return a=i?tn(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=fe(r,"path"),o=fe(r,"fs");if(!bt(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let a of r){let r=n.join(e,a),s=n.join(t,a),c=o.lstatSync(r);if(c.isDirectory())_t(s,{fs:o}),await i(r,s);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,s)}else _t(n.dirname(s),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(s);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},a=null;return await i(e,t).then(()=>{a={success:"done: "+t}}).catch(e=>{a={error:e}}),a}(e,t,{path:n,fs:o}),a}function nn(e,t={}){let r=fe(t,"fs"),n=fe(t,"crypto"),o=fe(t,"type","");Ze(o)||(o="sha512");let i=Gr();if(!Xr(e,{fs:r}))return i.reject(`fp[${e}] is not a file`),i;try{let t=n.createHash(o),a=r.createReadStream(e);a.on("readable",()=>{let e=a.read();e?t.update(e):i.resolve(t.digest("hex"))}),a.on("error",e=>{i.reject(e.toString())})}catch(e){i.reject(e.toString())}return i}var on=Array.prototype.join;function an(e,t){return null==e?"":on.call(e,t)}async function sn(e,t=1,r={}){let n=fe(r,"path"),o=fe(r,"fs"),i=fe(r,"crypto"),a=fe(r,"type","");Ze(a)||(a="md5");let s=fe(r,"forFile",null);Tt(s)||(s=!0);let c=fe(r,"forFolder",null);if(Tt(c)||(c=!1),!bt(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);let u=xt(e,t,{path:n,fs:o});return u=await Zr(u,async e=>{let t="";return s&&!e.isFolder&&(t=await nn(e.path,{fs:o,crypto:i,type:a})),c&&e.isFolder&&(t=await async function(e,t={}){let r=fe(t,"path"),n=fe(t,"fs"),o=fe(t,"crypto"),i=fe(t,"type","");Ze(i)||(i="md5");let a=[],s=xt(e,null,{path:r,fs:n});return await Zr(s,async e=>{if(e.isFolder)return;let t=await nn(e.path,{fs:n,crypto:o,type:i});a.push(t)}),an(a,"|")}(e.path,{path:n,fs:o,crypto:i,type:a})),e.hash=t,e}),u}async function cn(e,t,r={}){let n=fe(r,"path"),o=fe(r,"fs"),i=fe(r,"crypto"),a=fe(r,"type","");if(Ze(a)||(a="md5"),!bt(e,{fs:o}))throw new Error(`fdSrc[${e}] is not a folder`);let s=!1;if(!bt(t,{fs:o}))return await rn(e,t,{path:n,fs:o,useSync:!1}),s=!0,s;let c=n.sep,u=n.sep.length,l=(e,t)=>{let r=e.isFolder?"folder":"file",n=e.path.replace(t,"");var o,i;return i=u,(Ze(o=n)&>(i)?0===(i=mt(i))?"":o.substring(0,i):"")===c&&(n=qr(n,u)),n=n.replaceAll("\\","/"),{id:`${r}|${n}`,isFolder:e.isFolder,name:e.name,rpath:n,hash:e.hash}},f=(e,t)=>e=Er(e,e=>l(e,t)),d=await sn(e,null,{path:n,fs:o,crypto:i,type:a,forFile:!0,forFolder:!1});d=f(d,n.resolve(e));let h=await sn(t,null,{path:n,fs:o,crypto:i,type:a,forFile:!0,forFolder:!1});h=f(h,n.resolve(t));let p=Vr(h,d,"id",{withInfor:!1});return s=Ir(p.del)>0||Ir(p.add)>0||Ir(p.diff)>0,await Zr(p.del,async e=>{if(e.isFolder){jt(n.resolve(t,e.rpath),{fs:o})}}),await Zr(p.del,async e=>{if(!e.isFolder){en(n.resolve(t,e.rpath),{fs:o})}}),await Zr([...p.add,...p.diff],async r=>{if(!r.isFolder){let i=n.resolve(e,r.rpath),a=n.resolve(t,r.rpath);await Qr(i,a,{path:n,fs:o,useSync:!1})}}),s}function un(e){if(Wr(e)){for(let t in e)return!0;return!1}return!1}var ln="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var hn={exports:{}};var pn,yn={exports:{}},mn=dn(Object.freeze({__proto__:null,default:{}}));function gn(){return pn||(pn=1,function(e){var t;e.exports=(t=t||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==ln&&ln.crypto&&(r=ln.crypto),!r)try{r=mn}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},a=i.lib={},s=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var a=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var s=0;s<o;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=i.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,o=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,i);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(o,f);r=o.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=h.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=i.algo={};return i}(Math),t)}(yn)),yn.exports}!function(e){e.exports=gn().enc.Utf8}(hn);var vn=fn(hn.exports),wn={exports:{}};!function(e){var t;e.exports=(t=gn(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=s<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s++)o.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(wn);var bn=fn(wn.exports);function Sn(e){if(!Ze(e))return"";let t=vn.parse(e);return bn.stringify(t)}var _n={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",s="day",c="week",u="month",l="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},v={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,u),i=r-o<0,a=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:c,d:s,D:d,h:a,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=m;var S="$isDayjsObject",_=function(e){return e instanceof R||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return w;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),r&&(b[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!n&&o&&(w=o),o||!n&&w},E=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new R(r)},j=v;j.l=O,j.i=_,j.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var R=function(){function m(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return j},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var r=E(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return E(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<E(e)},g.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,n=!!j.u(t)||t,l=j.p(e),h=function(e,t){var o=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(s)},p=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},y=this.$W,m=this.$M,g=this.$D,v="set"+(this.$u?"UTC":"");switch(l){case f:return n?h(1,0):h(31,11);case u:return n?h(1,m):h(0,m+1);case c:var w=this.$locale().weekStart||0,b=(y<w?y+7:y)-w;return h(n?g-b:g+(6-b),m);case s:case d:return p(v+"Hours",0);case a:return p(v+"Minutes",1);case i:return p(v+"Seconds",2);case o:return p(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var r,c=j.p(e),l="set"+(this.$u?"UTC":""),h=(r={},r[s]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[a]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],p=c===s?this.$D+(t-this.$W):t;if(c===u||c===f){var y=this.clone().set(d,1);y.$d[h](p),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[j.p(e)]()},g.add=function(n,l){var d,h=this;n=Number(n);var p=j.p(l),y=function(e){var t=E(h);return j.w(t.date(t.date()+Math.round(e*n)),h)};if(p===u)return this.set(u,this.$M+n);if(p===f)return this.set(f,this.$y+n);if(p===s)return y(1);if(p===c)return y(7);var m=(d={},d[i]=t,d[a]=r,d[o]=e,d)[p]||1,g=this.$d.getTime()+n*m;return j.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,s=this.$M,c=r.weekdays,u=r.months,l=r.meridiem,f=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return j.s(i%12||12,e,"0")},p=l||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(y,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return s+1;case"MM":return j.s(s+1,2,"0");case"MMM":return f(r.monthsShort,s,u,3);case"MMMM":return f(u,s);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(r.weekdaysMin,t.$W,c,2);case"ddd":return f(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(i,a,!0);case"A":return p(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,d,h){var p,y=this,m=j.p(d),g=E(n),v=(g.utcOffset()-this.utcOffset())*t,w=this-g,b=function(){return j.m(y,g)};switch(m){case f:p=b()/12;break;case u:p=b();break;case l:p=b()/3;break;case c:p=(w-v)/6048e5;break;case s:p=(w-v)/864e5;break;case a:p=w/r;break;case i:p=w/t;break;case o:p=w/e;break;default:p=w}return h?p:j.a(p)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=O(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return j.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),x=R.prototype;return E.prototype=x,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",s],["$M",u],["$y",f],["$D",d]].forEach(function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),E.extend=function(e,t){return e.$i||(e(t,R,E),e.$i=!0),E},E.locale=O,E.isDayjs=_,E.unix=function(e){return E(1e3*e)},E.en=b[w],E.Ls=b,E.p={},E}()}(_n);var On=fn(_n.exports);function En(){if(!vt(On))throw new Error("invalid dayjs");return On().format("YYYY-MM-DDTHH:mm:ssZ")}var jn={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,i,a){var s=r?r+e:e;if(!this._events[s])return!1;var c,u,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,i),!0;case 6:return l.fn.call(l.context,t,n,o,i,a),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||a(this,i);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||o&&!s[c].once||n&&s[c].context!==n)&&u.push(s[c]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(jn);var Rn=fn(jn.exports);function xn(){return new Rn}function An(e=10){Xe(e)||(e=10);let t=Gr();return setTimeout(function(){t.resolve()},e),t}var Tn=Be(Object.getPrototypeOf,Object),$n=Function.prototype,kn=Object.prototype,Cn=$n.toString,Dn=kn.hasOwnProperty,Pn=Cn.call(Object);function Nn(e){if(!v(e))return!1;var t=g(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!function(e){if(!v(e)||"[object Object]"!=g(e))return!1;var t=Tn(e);if(null===t)return!0;var r=Dn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Cn.call(r)==Pn}(e)}function Fn(e){if(!(Ze(e)||Xe(e)||w(e)||function(e){return"[object BigInt]"===Object.prototype.toString.call(e)}(e)))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function Mn(e){let t="";if(Nn(e))t=e.message;else{if(Ge(e))return e;if(Wr(e))return Jr(e,"message")?e.message:JSON.stringify(e);if(Yr(e))return JSON.stringify(e);t=Fn(e)}return t}function Ln(t){return Xr(t,{fs:e})}function Bn(e,t=!1){if(function(e){return"[object Undefined]"===Object.prototype.toString.call(e)}(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}function Un(e=300){return new function(e){let t=[],r=null,n=Date.now();return Rt(e)||(e=300),e=mt(e),function(o,...i){vt(o)?(n=Date.now(),t.push({func:o,input:i}),null===r&&(r=setInterval(()=>{if(0===Ir(t))return clearInterval(r),void(r=null);if(Date.now()-n>e){let e=t.pop();t=[];try{e.func(...e.input)}catch(e){console.log("m.func catch",e)}}},10))):console.log("func is not a function")}}(e)}function In(e,r={}){let i=fe(r,"polling");Tt(i)||(i=!1);let a=fe(r,"timeInterval");Rt(a)||(a=100),a=mt(a);let s=fe(r,"timeBinaryInterval");Rt(s)||(s=300),s=mt(s);let c=new n.EventEmitter,u=e,l=null,f=setInterval(()=>{null===l&&Ln(u)&&(l=o.watch(u,{usePolling:i,interval:a,binaryInterval:s,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),c.emit("change",{type:e,fp:r,stats:n})}))},a);return c.clear=()=>{(()=>{if(null!==l){try{l.unwatch(u)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(f)},c}function qn(t,r,n={}){St(t)||Et(t),St(r)||Et(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,a=t=>{let r={};try{r=function(e){if(!Ze(e))return{};let t={};try{t=JSON.parse(e)}catch(e){t={}}return t}(e.readFileSync(t,"utf8"))}catch(e){}return r},s=(t,r)=>{try{let n=Bn(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>fe(a(e),t,""),u=(e,t,r)=>{let n=a(e);n[t]=r,s(e,n)},l=(e,t)=>{let r=a(e);Jr(r,t)&&delete r[t],s(e,r)},f=()=>a(o),d=e=>s(o,e),h=e=>c(o,e),p=()=>a(i),y=e=>s(i,e),m=e=>c(i,e),g=(e,t)=>u(i,e,t),v=e=>l(i,e),w=e=>{let t=[];return Ve(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=xn();return e.set=(t,r)=>{((e,t)=>{u(o,e,t)})(t,r),e.emit("set",{type:"set",fp:t,hash:r})},e.get=h,e.remove=t=>{(e=>{l(o,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=f,e.writeKp=d,e},buildTar:()=>{let e=xn(),t=Un(300),r=In(o);return r.on("change",r=>{t(()=>{(async()=>{let t=Gr(),r=f();if(!un(r))return t.resolve("no src"),t;let n=p(),o=w(r),i=Vr(w(n),o,"fp",{withInfor:!1}),a=Gr();return a.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:a}),t})().catch(()=>{})})}),e.set=g,e.get=m,e.remove=v,e.readKp=p,e.writeKp=y,e.clear=r.clear,e}}}let zn=async(t={})=>{let r=fe(t,"keyId");Ze(r)||(r="id");let n=fe(t,"fdTagRemove");Ze(n)||(n="./_tagRemove");let o=fe(t,"fdTaskCpActualSrc");Ze(o)||(o="./_taskCpActualSrc"),St(o)||Et(o);let i=fe(t,"fdTaskCpSrc");Ze(i)||(i="./_taskCpSrc"),St(i)||Et(i);let a=fe(t,"funGetNew");if(!vt(a))throw new Error("invalid funGetNew");let s=fe(t,"funGetCurrent");if(!vt(s))throw new Error("invalid funGetCurrent");let c=fe(t,"funAdd"),u=fe(t,"funModify"),l=fe(t,"funRemove"),f=fe(t,"funAfterStart"),d=fe(t,"funBeforeEnd"),h=fe(t,"timeToleranceRemove");gt(h)||(h=0),h=lt(h),h>0&&!St(n)&&Et(n);let p=fe(t,"eventNameProcCallfunGetNew");Ze(p)||(p="proc-callfun-getNew");let y=fe(t,"eventNameProcCallfunGetCurrent");Ze(y)||(y="proc-callfun-getCurrent");let m=fe(t,"eventNameProcCompare");Ze(m)||(m="proc-compare");let g=fe(t,"eventNameProcAddCallfunAdd");Ze(g)||(g="proc-add-callfun-add");let v=fe(t,"eventNameProcDiffCallfunModify");Ze(v)||(v="proc-diff-callfun-modify");let w=fe(t,"eventNameProcRemoveCallfunRemove");Ze(w)||(w="proc-remove-callfun-remove");let b=fe(t,"eventNameProcCallfunAfterStart");Ze(b)||(b="proc-callfun-afterStart");let S=fe(t,"eventNameProcCallfunBeforeEnd");Ze(S)||(S="proc-callfun-beforeEnd");let _=fe(t,"eventNameProcCoreDetect");Ze(_)||(_="proc-coreDetect");let O=fe(t,"eventNameProcRetakeRemove");Ze(O)||(O="proc-retake-remove");let E=fe(t,"eventNameProcCoreRetake");Ze(E)||(E="proc-coreRetake");let j=fe(t,"useShowLog");Tt(j)||(j=!0);let R=xn(),x=fe(t,"srLog",null),A=fe(x,"info",null);A=vt(A)?(...e)=>(R.emit("change",{type:"info",...e[0]}),x.info(...e)):(...e)=>{R.emit("change",{type:"info",...e[0]})};let T=fe(x,"warn",null);T=vt(T)?(...e)=>(R.emit("change",{type:"warn",...e[0]}),x.warn(...e)):(...e)=>{R.emit("change",{type:"warn",...e[0]})};let $=fe(x,"error",null);$=vt($)?(...e)=>(R.emit("change",{type:"error",...e[0]}),x.error(...e)):(...e)=>{R.emit("change",{type:"error",...e[0]})};let k=async t=>{let r=await(async(t,r,o="")=>{let i="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);i=n;let a=`${i}/${r}`,s={time:En(),hash:o};e.writeFileSync(a,JSON.stringify(s),"utf8")})("remove",t);return r},C=async(t,r={})=>{let o=await(async(t,r,o={})=>{let i=fe(o,"checkTime");Tt(i)||(i=!0);let a=fe(o,"timeNow"),s="",c=0;if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);s=n,c=h;let u=`${s}/${r}`;if(!Ln(u))return{b:!1,msg:`fp[${u}] is not a file`};if(!i)return{b:!0,msg:`fp[${u}] exists`};if(!un(a))throw new Error("invalid timeNow");let l=e.readFileSync(u,"utf8"),f=fe(JSON.parse(l),"time"),d=On(f),p=a.diff(d,"millisecond"),y=p>=c;return y?{b:y,msg:`time difference[${p}] >= time tolerance[${c}]`}:{b:y,msg:"allowable time difference"}})("remove",t,r);return o},D=async(t,r)=>{let o="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);o=n;let i=`${o}/${r}`;if(!Ln(i))return;let a=e.readFileSync(i,"utf8"),s=JSON.parse(a),c=en(i,{fs:e});if(c.error)throw new Error(c.error);return s},P=async e=>await D("remove",e),N=null,F=null,M=(async()=>{await An(1);let e=On();A({event:"start",timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),msg:"running..."});let t=qn(o,o);N=t.buildSrc();let n=qn(i,i);F=n.buildSrc();let _="";Ze(_)||await(async()=>{if(vt(f))try{A({event:b,msg:"start..."});let e=f();$t(e)&&(e=await e),A({event:b,msg:"done"})}catch(e){j&&console.log(e),$({event:b,msg:Mn(e)}),_=`error at ${b}`}return Ze(_)?(j&&console.log("error occurred, task canceled"),void A({event:"cancel-stage-afterStart",msg:_})):null})().catch(()=>{});Ze(_)||await(async()=>{let e=[];try{A({event:p,msg:"start..."});let t=a();$t(t)&&(t=await t),e=t,A({event:p,num:Ir(t),msg:"done"})}catch(e){j&&console.log(e),$({event:p,msg:Mn(e)}),_=`error at ${p}`}if(Ze(_))return j&&console.log("error occurred, task canceled"),void A({event:"cancel-stage-main",msg:_});let t=[];try{A({event:y,msg:"start..."});let e=s();$t(e)&&(e=await e),t=e,A({event:y,num:Ir(e),msg:"done"})}catch(e){j&&console.log(e),$({event:y,msg:Mn(e)}),_=`error at ${y}`}if(Ze(_))return j&&console.log("error occurred, task canceled"),void A({event:"cancel-stage-main",msg:_});if(0===Ir(e))return j&&console.log("invalid data, task canceled"),void A({event:"cancel-stage-main",msg:"no data"});let n=null;try{A({event:m,msg:"start..."}),n=Vr(t,e,r,{withInfor:!1});let o=Ir(n.del),i=Ir(n.add),a=Ir(n.diff),s=Ir(n.same);A({event:m,numRemove:o,numAdd:i,numModify:a,numSame:s,msg:"done"})}catch(e){j&&console.log(e),$({event:m,msg:Mn(e)}),_=`error at ${m}`}return Ze(_)?(j&&console.log("error occurred, task canceled"),void A({event:"cancel-stage-main",msg:_})):un(n)?0!==Ir(n.del)||0!==Ir(n.add)||0!==Ir(n.diff)?(await Zr(n.del,async e=>{if(!Ze(_)){try{if(A({event:w,[r]:e[r],msg:"start..."}),vt(l)){let t=l(e);$t(t)&&(t=await t)}}catch(t){j&&console.log(t),$({event:w,[r]:e[r],msg:Mn(t)}),_=`error at ${w}`}if(!Ze(_))try{N.remove(e[r]),h<=0?(F.remove(e[r]),A({event:w,[r]:e[r],msg:"done"})):(await C(e[r],{checkTime:!1})).b||(await k(e[r]),A({event:w,[r]:e[r],msg:"add-tag"}))}catch(t){j&&console.log(t),$({event:w,[r]:e[r],msg:Mn(t)}),_=`error at ${w}`}}}),Ze(_)?(j&&console.log("error occurred, task canceled"),void A({event:"cancel-stage-main",msg:_})):(await Zr(n.add,async e=>{if(!Ze(_)){try{if(A({event:g,[r]:e[r],msg:"start..."}),vt(c)){let t=c(e);$t(t)&&(t=await t)}}catch(t){j&&console.log(t),$({event:g,[r]:e[r],msg:Mn(t)}),_=`error at ${g}`}if(!Ze(_))try{let t=Sn(JSON.stringify(e));N.set(e[r],t),F.set(e[r],t),h>0&&(await C(e[r],{checkTime:!1})).b&&(await P(e[r]),A({event:g,[r]:e[r],msg:"release-tag"})),A({event:g,[r]:e[r],msg:"done"})}catch(t){j&&console.log(t),$({event:g,[r]:e[r],msg:Mn(t)}),_=`error at ${g}`}}}),Ze(_)?(j&&console.log("error occurred, task canceled"),void A({event:"cancel-stage-main",msg:_})):(await Zr(n.diff,async e=>{if(!Ze(_)){try{if(A({event:v,[r]:e[r],msg:"start..."}),vt(u)){let t=u(e);$t(t)&&(t=await t)}}catch(t){j&&console.log(t),$({event:v,[r]:e[r],msg:Mn(t)}),_=`error at ${v}`}if(!Ze(_))try{let t=Sn(JSON.stringify(e));N.set(e[r],t),F.set(e[r],t),A({event:v,[r]:e[r],msg:"done"})}catch(t){j&&console.log(t),$({event:v,[r]:e[r],msg:Mn(t)}),_=`error at ${v}`}}}),Ze(_)?(j&&console.log("error occurred, task canceled"),void A({event:"cancel-stage-main",msg:_})):null))):void A({event:"cancel-stage-main",msg:"no difference"}):(j&&console.log("can not calculate the difference, task canceled"),void A({event:"cancel-stage-main",msg:"can not calculate the difference between the data before and after"}))})().catch(()=>{});await(async()=>{if(vt(d))try{A({event:S,msg:"start..."});let e=d();$t(e)&&(e=await e),A({event:S,msg:"done"})}catch(e){j&&console.log(e),$({event:S,msg:Mn(e)}),_=`error at ${S}`}return Ze(_)?(j&&console.log("error occurred, task canceled"),void A({event:"cancel-stage-beforeEnd",msg:_})):null})().catch(()=>{}),A({event:"end",...(()=>{let t=On(),r=t.diff(e,"second");return{timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:t.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${r}s`}})(),msg:"done"})})().catch(e=>{j&&console.log(e),$({event:_,msg:Mn(e)})}),L=(async()=>{if(h<=0)return;await async function(e,t={}){let r=null,n=Gr();if(!vt(e))return n.reject("waitfunction需輸入函數f"),n;let o=async()=>{let t=e();return $t(t)&&(t=await t),t};if(r=await o(),!0===r)return n.resolve(),n;let i=fe(t,"attemptNum",null);Rt(i)||(i=200);let a=fe(t,"timeInterval",null);Rt(a)||(a=1e3);let s=0,c=setInterval(async()=>{s+=1,r=await o(),!0===r&&(clearInterval(c),n.resolve()),s>i&&(clearInterval(c),n.reject(`exceeded attemptNum[${i}]`))},a);return n}(()=>null!==F);let e=On(),t=At(n,1);0!==Ir(t)&&await Zr(t,async t=>{let n=(await C(t.name,{timeNow:e,checkTime:!0})).b,o=!Ze(N.get(t.name)),i=Ze(F.get(t.name));n&&o&&i&&(await P(t.name),A({event:O,[r]:t.name,from:"debounce",msg:"release-tag"}),F.remove(t.name),A({event:O,[r]:t.name,from:"debounce",msg:"done"}))})})().catch(e=>{j&&console.log(e),$({event:E,msg:Mn(e)})});return Promise.all([M,L]).finally(()=>{R.emit("end")}),R},Hn=async(n={})=>{let o=fe(n,"keyId");Ze(o)||(o="id");let i=fe(n,"fdTagRemove");Ze(i)||(i="./_tagRemove");let a=fe(n,"fdDwAttime");Ze(a)||(a="./_dwAttime"),St(a)||Et(a);let s=fe(n,"fdDwCurrent");Ze(s)||(s="./_dwCurrent"),St(s)||Et(s);let c=fe(n,"fdTaskCpActualSrc");Ze(c)||(c="./_taskCpActualSrc"),St(c)||Et(c);let u=fe(n,"fdTaskCpSrc");Ze(u)||(u="./_taskCpSrc"),St(u)||Et(u);let l=fe(n,"srLog",null),f=fe(n,"useShowLog");Tt(f)||(f=!0);let d=fe(n,"funDownload");if(!vt(d))throw new Error("invalid funDownload");let h=fe(n,"funGetCurrent");if(!vt(h))throw new Error("invalid funGetCurrent");let p=fe(n,"funAdd");if(!vt(p))throw new Error("invalid funAdd");let y=fe(n,"funModify");if(!vt(y))throw new Error("invalid funModify");let m=fe(n,"funRemove");if(!vt(m))throw new Error("invalid funRemove");let g=fe(n,"funAfterStart"),v=fe(n,"funBeforeEnd"),w=fe(n,"timeToleranceRemove");gt(w)||(w=0),w=lt(w);let b=async()=>{await function(n,o,i={}){return cn(n,o,{path:t,fs:e,crypto:r,...i})}(a,s)};return zn({keyId:o,fdTagRemove:i,fdTaskCpActualSrc:c,fdTaskCpSrc:u,srLog:l,useShowLog:f,funGetNew:d,funGetCurrent:h,funAdd:p,funModify:y,funRemove:m,funAfterStart:async()=>{if(vt(g)){let e=g();$t(e)&&(e=await e)}},funBeforeEnd:async()=>{if(await b(),vt(v)){let e=v();$t(e)&&(e=await e)}},timeToleranceRemove:w,eventNameProcCallfunGetNew:"proc-callfun-download"})};function Yn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wn}=Object.prototype,{getPrototypeOf:Jn}=Object,{iterator:Vn,toStringTag:Kn}=Symbol,Gn=(e=>t=>{const r=Wn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=e=>(e=e.toLowerCase(),t=>Gn(t)===e),Xn=e=>t=>typeof t===e,{isArray:Qn}=Array,eo=Xn("undefined");function to(e){return null!==e&&!eo(e)&&null!==e.constructor&&!eo(e.constructor)&&oo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ro=Zn("ArrayBuffer");const no=Xn("string"),oo=Xn("function"),io=Xn("number"),ao=e=>null!==e&&"object"==typeof e,so=e=>{if("object"!==Gn(e))return!1;const t=Jn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Kn in e||Vn in e)},co=Zn("Date"),uo=Zn("File"),lo=Zn("Blob"),fo=Zn("FileList"),ho=Zn("URLSearchParams"),[po,yo,mo,go]=["ReadableStream","Request","Response","Headers"].map(Zn);function vo(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Qn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(to(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function wo(e,t){if(to(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const bo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,So=e=>!eo(e)&&e!==bo;const _o=(Oo="undefined"!=typeof Uint8Array&&Jn(Uint8Array),e=>Oo&&e instanceof Oo);var Oo;const Eo=Zn("HTMLFormElement"),jo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ro=Zn("RegExp"),xo=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};vo(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const Ao=Zn("AsyncFunction"),To=($o="function"==typeof setImmediate,ko=oo(bo.postMessage),$o?setImmediate:ko?(Co=`axios@${Math.random()}`,Do=[],bo.addEventListener("message",({source:e,data:t})=>{e===bo&&t===Co&&Do.length&&Do.shift()()},!1),e=>{Do.push(e),bo.postMessage(Co,"*")}):e=>setTimeout(e));var $o,ko,Co,Do;const Po="undefined"!=typeof queueMicrotask?queueMicrotask.bind(bo):"undefined"!=typeof process&&process.nextTick||To;var No={isArray:Qn,isArrayBuffer:ro,isBuffer:to,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||oo(e.append)&&("formdata"===(t=Gn(e))||"object"===t&&oo(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ro(e.buffer),t},isString:no,isNumber:io,isBoolean:e=>!0===e||!1===e,isObject:ao,isPlainObject:so,isEmptyObject:e=>{if(!ao(e)||to(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:po,isRequest:yo,isResponse:mo,isHeaders:go,isUndefined:eo,isDate:co,isFile:uo,isBlob:lo,isRegExp:Ro,isFunction:oo,isStream:e=>ao(e)&&oo(e.pipe),isURLSearchParams:ho,isTypedArray:_o,isFileList:fo,forEach:vo,merge:function e(){const{caseless:t,skipUndefined:r}=So(this)&&this||{},n={},o=(o,i)=>{const a=t&&wo(n,i)||i;so(n[a])&&so(o)?n[a]=e(n[a],o):so(o)?n[a]=e({},o):Qn(o)?n[a]=o.slice():r&&eo(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&vo(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(vo(t,(t,n)=>{r&&oo(t)?e[n]=Yn(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Jn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Gn,kindOfTest:Zn,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(Qn(e))return e;let t=e.length;if(!io(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Vn]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Eo,hasOwnProperty:jo,hasOwnProp:jo,reduceDescriptors:xo,freezeMethods:e=>{xo(e,(t,r)=>{if(oo(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];oo(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return Qn(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:wo,global:bo,isContextDefined:So,isSpecCompliantForm:function(e){return!!(e&&oo(e.append)&&"FormData"===e[Kn]&&e[Vn])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(ao(e)){if(t.indexOf(e)>=0)return;if(to(e))return e;if(!("toJSON"in e)){t[n]=e;const o=Qn(e)?[]:{};return vo(e,(e,t)=>{const i=r(e,n+1);!eo(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Ao,isThenable:e=>e&&(ao(e)||oo(e))&&oo(e.then)&&oo(e.catch),setImmediate:To,asap:Po,isIterable:e=>null!=e&&oo(e[Vn])};function Fo(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}No.inherits(Fo,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:No.toJSONObject(this.config),code:this.code,status:this.status}}});const Mo=Fo.prototype,Lo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Lo[e]={value:e}}),Object.defineProperties(Fo,Lo),Object.defineProperty(Mo,"isAxiosError",{value:!0}),Fo.from=(e,t,r,n,o,i)=>{const a=Object.create(Mo);No.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Fo.call(a,s,c,r,n,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};function Bo(e){return No.isPlainObject(e)||No.isArray(e)}function Uo(e){return No.endsWith(e,"[]")?e.slice(0,-2):e}function Io(e,t,r){return e?e.concat(t).map(function(e,t){return e=Uo(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const qo=No.toFlatObject(No,{},null,function(e){return/^is[A-Z]/.test(e)});function zo(e,t,r){if(!No.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=No.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!No.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&No.isSpecCompliantForm(t);if(!No.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(No.isDate(e))return e.toISOString();if(No.isBoolean(e))return e.toString();if(!s&&No.isBlob(e))throw new Fo("Blob is not supported. Use a Buffer instead.");return No.isArrayBuffer(e)||No.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(No.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(No.isArray(e)&&function(e){return No.isArray(e)&&!e.some(Bo)}(e)||(No.isFileList(e)||No.endsWith(r,"[]"))&&(s=No.toArray(e)))return r=Uo(r),s.forEach(function(e,n){!No.isUndefined(e)&&null!==e&&t.append(!0===a?Io([r],n,i):null===a?r:r+"[]",c(e))}),!1;return!!Bo(e)||(t.append(Io(o,r,i),c(e)),!1)}const l=[],f=Object.assign(qo,{defaultVisitor:u,convertValue:c,isVisitable:Bo});if(!No.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!No.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),No.forEach(r,function(r,i){!0===(!(No.isUndefined(r)||null===r)&&o.call(t,r,No.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function Ho(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Yo(e,t){this._pairs=[],e&&zo(e,this,t)}const Wo=Yo.prototype;function Jo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Vo(e,t,r){if(!t)return e;const n=r&&r.encode||Jo;No.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):No.isURLSearchParams(t)?t.toString():new Yo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Wo.append=function(e,t){this._pairs.push([e,t])},Wo.toString=function(e){const t=e?function(t){return e.call(this,t,Ho)}:Ho;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Ko=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){No.forEach(this.handlers,function(t){null!==t&&e(t)})}},Go={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Yo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Xo="undefined"!=typeof window&&"undefined"!=typeof document,Qo="object"==typeof navigator&&navigator||void 0,ei=Xo&&(!Qo||["ReactNative","NativeScript","NS"].indexOf(Qo.product)<0),ti="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ri=Xo&&window.location.href||"http://localhost";var ni={...Object.freeze({__proto__:null,hasBrowserEnv:Xo,hasStandardBrowserEnv:ei,hasStandardBrowserWebWorkerEnv:ti,navigator:Qo,origin:ri}),...Zo};function oi(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&No.isArray(n)?n.length:i,s)return No.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&No.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&No.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(No.isFormData(e)&&No.isFunction(e.entries)){const r={};return No.forEachEntry(e,(e,n)=>{t(function(e){return No.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ii={transitional:Go,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=No.isObject(e);o&&No.isHTMLForm(e)&&(e=new FormData(e));if(No.isFormData(e))return n?JSON.stringify(oi(e)):e;if(No.isArrayBuffer(e)||No.isBuffer(e)||No.isStream(e)||No.isFile(e)||No.isBlob(e)||No.isReadableStream(e))return e;if(No.isArrayBufferView(e))return e.buffer;if(No.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return zo(e,new ni.classes.URLSearchParams,{visitor:function(e,t,r,n){return ni.isNode&&No.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=No.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return zo(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(No.isString(e))try{return(t||JSON.parse)(e),No.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ii.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(No.isResponse(e)||No.isReadableStream(e))return e;if(e&&No.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw Fo.from(e,Fo.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ni.classes.FormData,Blob:ni.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};No.forEach(["delete","get","head","post","put","patch"],e=>{ii.headers[e]={}});var ai=ii;const si=No.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const ci=Symbol("internals");function ui(e){return e&&String(e).trim().toLowerCase()}function li(e){return!1===e||null==e?e:No.isArray(e)?e.map(li):String(e)}function fi(e,t,r,n,o){return No.isFunction(n)?n.call(this,t,r):(o&&(t=r),No.isString(t)?No.isString(n)?-1!==t.indexOf(n):No.isRegExp(n)?n.test(t):void 0:void 0)}class di{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ui(t);if(!o)throw new Error("header name must be a non-empty string");const i=No.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=li(e))}const i=(e,t)=>No.forEach(e,(e,r)=>o(e,r,t));if(No.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(No.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&si[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(No.isObject(e)&&No.isIterable(e)){let r,n,o={};for(const t of e){if(!No.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?No.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=ui(e)){const r=No.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(No.isFunction(t))return t.call(this,e,r);if(No.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ui(e)){const r=No.findKey(this,e);return!(!r||void 0===this[r]||t&&!fi(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ui(e)){const o=No.findKey(r,e);!o||t&&!fi(0,r[o],o,t)||(delete r[o],n=!0)}}return No.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!fi(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return No.forEach(this,(n,o)=>{const i=No.findKey(r,o);if(i)return t[i]=li(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();a!==o&&delete t[o],t[a]=li(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return No.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&No.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[ci]=this[ci]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ui(e);t[n]||(!function(e,t){const r=No.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return No.isArray(e)?e.forEach(n):n(e),this}}di.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),No.reduceDescriptors(di.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),No.freezeMethods(di);var hi=di;function pi(e,t){const r=this||ai,n=t||r,o=hi.from(n.headers);let i=n.data;return No.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function yi(e){return!(!e||!e.__CANCEL__)}function mi(e,t,r){Fo.call(this,null==e?"canceled":e,Fo.ERR_CANCELED,t,r),this.name="CanceledError"}function gi(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Fo("Request failed with status code "+r.status,[Fo.ERR_BAD_REQUEST,Fo.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}No.inherits(mi,Fo,{__CANCEL__:!0});const vi=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},i-s)))},()=>r&&a(r)]}(r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},wi=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},bi=e=>(...t)=>No.asap(()=>e(...t));var Si=ni.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ni.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ni.origin),ni.navigator&&/(msie|trident)/i.test(ni.navigator.userAgent)):()=>!0,_i=ni.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];No.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),No.isString(n)&&a.push("path="+n),No.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Oi(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ei=e=>e instanceof hi?{...e}:e;function ji(e,t){t=t||{};const r={};function n(e,t,r,n){return No.isPlainObject(e)&&No.isPlainObject(t)?No.merge.call({caseless:n},e,t):No.isPlainObject(t)?No.merge({},t):No.isArray(t)?t.slice():t}function o(e,t,r,o){return No.isUndefined(t)?No.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!No.isUndefined(t))return n(void 0,t)}function a(e,t){return No.isUndefined(t)?No.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(Ei(e),Ei(t),0,!0)};return No.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,a=i(e[n],t[n],n);No.isUndefined(a)&&i!==s||(r[n]=a)}),r}var Ri=e=>{const t=ji({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=hi.from(a),t.url=Vo(Oi(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),No.isFormData(r))if(ni.hasStandardBrowserEnv||ni.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(No.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&a.set(e,r)})}if(ni.hasStandardBrowserEnv&&(n&&No.isFunction(n)&&(n=n(t)),n||!1!==n&&Si(t.url))){const e=o&&i&&_i.read(i);e&&a.set(o,e)}return t};var xi="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Ri(e);let o=n.data;const i=hi.from(n.headers).normalize();let a,s,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:h}=n;function p(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=hi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());gi(function(e){t(e),p()},function(e){r(e),p()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new Fo("Request aborted",Fo.ECONNABORTED,e,y)),y=null)},y.onerror=function(t){const n=new Fo(t&&t.message?t.message:"Network Error",Fo.ERR_NETWORK,e,y);n.event=t||null,r(n),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Go;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Fo(t,o.clarifyTimeoutError?Fo.ETIMEDOUT:Fo.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&No.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),No.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),h&&([c,l]=vi(h,!0),y.addEventListener("progress",c)),d&&y.upload&&([s,u]=vi(d),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{y&&(r(!t||t.type?new mi(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ni.protocols.indexOf(g)?r(new Fo("Unsupported protocol "+g+":",Fo.ERR_BAD_REQUEST,e)):y.send(o||null)})};var Ai=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Fo?t:new mi(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Fo(`timeout ${t} of ms exceeded`,Fo.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=()=>No.asap(a),s}};const Ti=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},$i=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},ki=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of $i(e))yield*Ti(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Ci}=No,Di=(({Request:e,Response:t})=>({Request:e,Response:t}))(No.global),{ReadableStream:Pi,TextEncoder:Ni}=No.global,Fi=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Mi=e=>{e=No.merge.call({skipUndefined:!0},Di,e);const{fetch:t,Request:r,Response:n}=e,o=t?Ci(t):"function"==typeof fetch,i=Ci(r),a=Ci(n);if(!o)return!1;const s=o&&Ci(Pi),c=o&&("function"==typeof Ni?(u=new Ni,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=i&&s&&Fi(()=>{let e=!1;const t=new r(ni.origin,{body:new Pi,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),f=a&&s&&Fi(()=>No.isReadableStream(new n("").body)),d={stream:f&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Fo(`Response type '${e}' is not supported`,Fo.ERR_NOT_SUPPORT,r)})});const h=async(e,t)=>{const n=No.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(No.isBlob(e))return e.size;if(No.isSpecCompliantForm(e)){const t=new r(ni.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return No.isArrayBufferView(e)||No.isArrayBuffer(e)?e.byteLength:(No.isURLSearchParams(e)&&(e+=""),No.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:u,timeout:p,onDownloadProgress:y,onUploadProgress:m,responseType:g,headers:v,withCredentials:w="same-origin",fetchOptions:b}=Ri(e),S=t||fetch;g=g?(g+"").toLowerCase():"text";let _=Ai([c,u&&u.toAbortSignal()],p),O=null;const E=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let j;try{if(m&&l&&"get"!==a&&"head"!==a&&0!==(j=await h(v,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(No.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,r]=wi(j,vi(bi(m)));s=ki(t.body,65536,e,r)}}No.isString(w)||(w=w?"include":"omit");const t=i&&"credentials"in r.prototype,c={...b,signal:_,method:a.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?w:void 0};O=i&&new r(o,c);let u=await(i?S(O,b):S(o,c));const p=f&&("stream"===g||"response"===g);if(f&&(y||p&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=No.toFiniteNumber(u.headers.get("content-length")),[r,o]=y&&wi(t,vi(bi(y),!0))||[];u=new n(ki(u.body,65536,r,()=>{o&&o(),E&&E()}),e)}g=g||"text";let R=await d[No.findKey(d,g)||"text"](u,e);return!p&&E&&E(),await new Promise((t,r)=>{gi(t,r,{data:R,headers:hi.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(E&&E(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Fo("Network Error",Fo.ERR_NETWORK,e,O),{cause:t.cause||t});throw Fo.from(t,t&&t.code,e,O)}}},Li=new Map,Bi=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let a,s,c=i.length,u=Li;for(;c--;)a=i[c],s=u.get(a),void 0===s&&u.set(a,s=c?new Map:Mi(t)),u=s;return s};Bi();const Ui={http:null,xhr:xi,fetch:{get:Bi}};No.forEach(Ui,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ii=e=>`- ${e}`,qi=e=>No.isFunction(e)||null===e||!1===e;var zi=(e,t)=>{e=No.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!qi(n)&&(o=Ui[(r=String(n)).toLowerCase()],void 0===o))throw new Fo(`Unknown adapter '${r}'`);if(o&&(No.isFunction(o)||(o=o.get(t))))break;i[r||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Fo("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(Ii).join("\n"):" "+Ii(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function Hi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new mi(null,e)}function Yi(e){Hi(e),e.headers=hi.from(e.headers),e.data=pi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return zi(e.adapter||ai.adapter,e)(e).then(function(t){return Hi(e),t.data=pi.call(e,e.transformResponse,t),t.headers=hi.from(t.headers),t},function(t){return yi(t)||(Hi(e),t&&t.response&&(t.response.data=pi.call(e,e.transformResponse,t.response),t.response.headers=hi.from(t.response.headers))),Promise.reject(t)})}const Wi="1.12.2",Ji={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ji[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Vi={};Ji.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Wi+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Fo(n(o," has been removed"+(t?" in "+t:"")),Fo.ERR_DEPRECATED);return t&&!Vi[o]&&(Vi[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Ji.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var Ki={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Fo("options must be an object",Fo.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new Fo("option "+i+" must be "+r,Fo.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Fo("Unknown option "+i,Fo.ERR_BAD_OPTION)}},validators:Ji};const Gi=Ki.validators;class Zi{constructor(e){this.defaults=e||{},this.interceptors={request:new Ko,response:new Ko}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ji(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Ki.assertOptions(r,{silentJSONParsing:Gi.transitional(Gi.boolean),forcedJSONParsing:Gi.transitional(Gi.boolean),clarifyTimeoutError:Gi.transitional(Gi.boolean)},!1),null!=n&&(No.isFunction(n)?t.paramsSerializer={serialize:n}:Ki.assertOptions(n,{encode:Gi.function,serialize:Gi.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ki.assertOptions(t,{baseUrl:Gi.spelling("baseURL"),withXsrfToken:Gi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&No.merge(o.common,o[t.method]);o&&No.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=hi.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!s){const e=[Yi.bind(this),void 0];for(e.unshift(...a),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=a.length;let d=t;for(;f<l;){const e=a[f++],t=a[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Yi.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Vo(Oi((e=ji(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}No.forEach(["delete","get","head","options"],function(e){Zi.prototype[e]=function(t,r){return this.request(ji(r||{},{method:e,url:t,data:(r||{}).data}))}}),No.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(ji(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Zi.prototype[e]=t(),Zi.prototype[e+"Form"]=t(!0)});var Xi=Zi;class Qi{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new mi(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Qi(function(t){e=t}),cancel:e}}}var ea=Qi;const ta={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ta).forEach(([e,t])=>{ta[t]=e});var ra=ta;const na=function e(t){const r=new Xi(t),n=Yn(Xi.prototype.request,r);return No.extend(n,Xi.prototype,r,{allOwnKeys:!0}),No.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ji(t,r))},n}(ai);na.Axios=Xi,na.CanceledError=mi,na.CancelToken=ea,na.isCancel=yi,na.VERSION=Wi,na.toFormData=zo,na.AxiosError=Fo,na.Cancel=na.CanceledError,na.all=function(e){return Promise.all(e)},na.spread=function(e){return function(t){return e.apply(null,t)}},na.isAxiosError=function(e){return No.isObject(e)&&!0===e.isAxiosError},na.mergeConfig=ji,na.AxiosHeaders=hi,na.formToJSON=e=>oi(No.isHTMLForm(e)?new FormData(e):e),na.getAdapter=zi,na.HttpStatusCode=ra,na.default=na;var oa=na;let ia=async(e,t)=>{let r={draw:6,"columns[0][data]":0,"columns[0][name]":"EventNo","columns[0][searchable]":!1,"columns[0][orderable]":!0,"columns[0][search][value]":"","columns[0][search][regex]":!1,"columns[1][data]":1,"columns[1][name]":"MaxIntensity","columns[1][searchable]":!0,"columns[1][orderable]":!0,"columns[1][search][value]":"","columns[1][search][regex]":!1,"columns[2][data]":2,"columns[2][name]":"OriginTime","columns[2][searchable]":!0,"columns[2][orderable]":!0,"columns[2][search][value]":"","columns[2][search][regex]":!1,"columns[3][data]":3,"columns[3][name]":"MagnitudeValue","columns[3][searchable]":!0,"columns[3][orderable]":!0,"columns[3][search][value]":"","columns[3][search][regex]":!1,"columns[4][data]":4,"columns[4][name]":"Depth","columns[4][searchable]":!0,"columns[4][orderable]":!0,"columns[4][search][value]":"","columns[4][search][regex]":!1,"columns[5][data]":5,"columns[5][name]":"Description","columns[5][searchable]":!0,"columns[5][orderable]":!0,"columns[5][search][value]":"","columns[5][search][regex]":!1,"columns[6][data]":6,"columns[6][name]":"Description","columns[6][searchable]":!0,"columns[6][orderable]":!0,"columns[6][search][value]":"","columns[6][search][regex]":!1,"order[0][column]":2,"order[0][dir]":"desc",start:0,length:-1,"search[value]":"","search[regex]":!1,Search:"",txtSDate:`${mt(e)}-1-1`,txtEDate:`${mt(t)+1}-1-1`,txtSscale:"",txtEscale:"",txtSdepth:"",txtEdepth:"",txtLonS:"",txtLonE:"",txtLatS:"",txtLatE:"",ddlCity:"",ddlTown:"",ddlCitySta:"",ddlStation:"",txtIntensityB:"",txtIntensityE:"",txtLon:"",txtLat:"",txtKM:"",ddlStationName:"------",cblEventNo:"Y",txtSDatePWS:"",txtEDatePWS:"",txtSscalePWS:"",txtEscalePWS:"",ddlMark:""},n=null;try{n=(await oa.post("https://scweb.cwa.gov.tw/zh-tw/earthquake/ajaxhandler",(o=r,an(Er(o,(e,t)=>{let r=null==e?"":e;return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}),"&")),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(e){console.log(e)}var o;return n};function aa(e){return e!=e}function sa(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,aa,r)}var ca="\\ud800-\\udfff",ua="["+ca+"]",la="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",fa="\\ud83c[\\udffb-\\udfff]",da="[^"+ca+"]",ha="(?:\\ud83c[\\udde6-\\uddff]){2}",pa="[\\ud800-\\udbff][\\udc00-\\udfff]",ya="(?:"+la+"|"+fa+")"+"?",ma="[\\ufe0e\\ufe0f]?",ga=ma+ya+("(?:\\u200d(?:"+[da,ha,pa].join("|")+")"+ma+ya+")*"),va="(?:"+[da+la+"?",la,ha,pa,ua].join("|")+")",wa=RegExp(fa+"(?="+fa+")|"+va+ga,"g");function ba(e){return xr(e)?function(e){return e.match(wa)||[]}(e):function(e){return e.split("")}(e)}function Sa(e,t,r){if((e=se(e))&&(r||void 0===t))return tt(e);if(!e||!(t=ae(t)))return e;var n=ba(e),o=ba(t),i=function(e,t){for(var r=-1,n=e.length;++r<n&&sa(t,e[r],0)>-1;);return r}(n,o),a=function(e,t){for(var r=e.length;r--&&sa(t,e[r],0)>-1;);return r}(n,o)+1;return function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:Kr(e,t,r)}(n,i,a).join("")}let _a=async(t,r)=>{let n=await fetch(t);if(!n.ok)throw new Error(`can not download file, status[${n.status}]: ${n.statusText}`);let o=await n.arrayBuffer(),i=Buffer.from(o);e.writeFileSync(r,i)},Oa=async(e,t)=>{St(e)||Et(e);let r=[{url:t.urlPicEqReport,fn:"picEqReport.gif"},{url:t.urlPicEqIntensity,fn:"picEqIntensity.png"},{url:t.urlPicEqPga,fn:"picEqPga.png"},{url:t.urlPicEqPgv,fn:"picEqPgv.png"}];await Zr(r,async t=>{let r=`${e}/${t.fn}`;await(async(e,t,r={})=>{let n=fe(r,"retries");gt(n)||(n=3),n=mt(n);let o=fe(r,"retrietimeDelays");gt(o)||(o=1e3),o=lt(o);let i="error",a=null,s=null;for(let r=1;r<=n&&(await _a(e,t).then(e=>{s=e,i="success"}).catch(e=>{console.log(e),a=e}),await An(o),null===s);r++);if("error"===i)throw new Error(a);return s})(t.url,r)})};return async(t,r,n={})=>{if(!Xe(t))throw new Error("yearStart is not a number");if(t=mt(t),!Xe(r))throw new Error("yearEnd is not a number");r=mt(r);let o=fe(n,"keyId");Ze(o)||(o="id");let a=fe(n,"fdTagRemove");Ze(a)||(a="./_tagRemove");let s=fe(n,"fdDwAttime");Ze(s)||(s="./_dwAttime"),St(s)||Et(s);let c=fe(n,"fdDwCurrent");Ze(c)||(c="./_dwCurrent"),St(c)||Et(c);let u=fe(n,"fdResult");Ze(u)||(u="./_result"),St(u)||Et(u);let l=fe(n,"fdTaskCpActualSrc");Ze(l)||(l="./_taskCpActualSrc"),St(l)||Et(l);let f=fe(n,"fdTaskCpSrc");Ze(f)||(f="./_taskCpSrc"),St(f)||Et(f);let d=fe(n,"fdLog");Ze(d)||(d="./_logs"),St(d)||Et(d);let h=fe(n,"funDownload"),p=fe(n,"funGetCurrent"),y=fe(n,"funAdd"),m=fe(n,"funModify"),g=fe(n,"funRemove"),v=fe(n,"timeToleranceRemove");gt(v)||(v=0),v=lt(v);let w=async()=>{let n=await ia(t,r),i=Er(fe(n,"data",[]),e=>{let t=fe(e,0,""),r=fe(e,1,""),n=fe(e,2,""),o=fe(e,3,""),i=fe(e,4,""),a=fe(e,5,""),s=fe(e,6,""),c=fe(e,7,""),u=fe(e,8,"");r=Sa(r);let l=On(n,"YYYY-MM-DD HH-mm:ss"),f=l.format("YYYY-MM-DDTHH:mm:ssZ"),d=l.format("YYYYMMDDHHmmss"),h=l.format("YYYY"),p=l.format("YYYYMM"),y="";return Xe(r)&&Xe(h)&&(y=`${mt(h)-1911}${r}`),{id:y,tag:t,number:r,time:f,timeRec:n,timeTag:d,ml:o,depth:i,location:a,intensity:s,longitude:c,latitude:u,urlWebEqInfor:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Details/${t}`,urlWebEqReport:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Imgs/${t}`,urlWebEqIntensity:`https://scweb.cwa.gov.tw/zh-TW/earthquake/ShakeMap/${t}`,urlWebEqWave:`https://scweb.cwa.gov.tw/zh-TW/earthquake/WaveformAcc/${t}`,urlPicEqReport:`https://scweb.cwa.gov.tw/webdata/OLDEQ/${p}/${t}.gif`,urlPicEqIntensity:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${h}/${h}${r}i.png`,urlPicEqPga:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${h}/${h}${r}a.png`,urlPicEqPgv:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${h}/${h}${r}v.png`}});var a;return i=null==(a=i)?a:Ke.call(a),Ve(i,t=>{let r=`${s}/${t[o]}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8")}),i};vt(h)||(h=w);let b=async()=>{let t=At(c,1),r=[];return Ve(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};vt(p)||(p=b);let S=async t=>{let r=`${u}/${t[o]}`;St(r)&&jt(r,{fs:e})};vt(g)||(g=S);let _=async(t,r)=>{await Oa(t,r);let n=`${t}/picEqReport.gif`,o=`${t}/picEqIntensityList.gif`;await(async(t,r,n,o,a,s)=>{let c=e.readFileSync(t),u=await i(c,{animated:!1}).extract({left:n,top:o,width:a,height:s}).toBuffer();e.writeFileSync(r,u)})(n,o,364,199,276,204)},O=async e=>{let t=`${u}/${e[o]}`;St(t)||Et(t),Ot(t),await _(t,e)};vt(y)||(y=O);let E=async e=>{let t=`${u}/${e[o]}`;St(t)||Et(t),Ot(t),await _(t,e)};vt(m)||(m=E);let j={fdTagRemove:a,fdDwAttime:s,fdDwCurrent:c,fdTaskCpActualSrc:l,fdTaskCpSrc:f,fdLog:d,funDownload:h,funGetCurrent:p,funRemove:g,funAdd:y,funModify:m,timeToleranceRemove:v};return await Hn(j)}});
|
|
7
7
|
//# sourceMappingURL=w-dwdata-tweq.umd.js.map
|