w-dwdata-tweqod 1.0.4 → 1.0.6

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-tweqod v1.0.4
2
+ * w-dwdata-tweqod v1.0.6
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("xxhash-wasm"),require("events"),require("chokidar"),require("url"),require("pino")):"function"==typeof define&&define.amd?define(["fs","path","xxhash-wasm","events","chokidar","url","pino"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweqod"]=t(e.fs,e.path,e["xxhash-wasm"],e.events,e.chokidar,e.url,e.pino)}(this,function(e,t,r,n,o,i,s){"use strict";var a="undefined"!=typeof document?document.currentScript:null,c=Array.isArray,u="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,l=u||f||Function("return this")(),d=l.Symbol,h=Object.prototype,p=h.hasOwnProperty,y=h.toString,m=d?d.toStringTag:void 0;var g=Object.prototype.toString;var v=d?d.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":v&&v in Object(e)?function(e){var t=p.call(e,m),r=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=y.call(e);return n&&(t?e[m]=r:delete e[m]),o}(e):function(e){return g.call(e)}(e)}function w(e){return null!=e&&"object"==typeof e}function S(e){return"symbol"==typeof e||w(e)&&"[object Symbol]"==b(e)}var _=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;function j(e,t){if(c(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!S(e))||(O.test(e)||!_.test(e)||null!=t&&e in Object(t))}function E(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function R(e){if(!E(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var A,x=l["__core-js_shared__"],T=(A=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"";var k=Function.prototype.toString;function C(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var $=/^\[object .+?Constructor\]$/,D=Function.prototype,N=Object.prototype,P=D.toString,M=N.hasOwnProperty,L=RegExp("^"+P.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function F(e){return!(!E(e)||(t=e,T&&T in t))&&(R(e)?L:$).test(C(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return F(r)?r:void 0}var B=U(Object,"create");var q=Object.prototype.hasOwnProperty;var I=Object.prototype.hasOwnProperty;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])}}function H(e,t){return e===t||e!=e&&t!=t}function J(e,t){for(var r=e.length;r--;)if(H(e[r][0],t))return r;return-1}z.prototype.clear=function(){this.__data__=B?B(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(B){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:I.call(t,e)},z.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};var W=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=J(t,e);return!(r<0)&&(r==t.length-1?t.pop():W.call(t,r,1),--this.size,!0)},Y.prototype.get=function(e){var t=this.__data__,r=J(t,e);return r<0?void 0:t[r][1]},Y.prototype.has=function(e){return J(this.__data__,e)>-1},Y.prototype.set=function(e,t){var r=this.__data__,n=J(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var V=U(l,"Map");function K(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 G(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])}}G.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(V||Y),string:new z}},G.prototype.delete=function(e){var t=K(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return K(this,e).get(e)},G.prototype.has=function(e){return K(this,e).has(e)},G.prototype.set=function(e,t){var r=K(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 s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(X.Cache||G),r}X.Cache=G;var Z,Q,ee,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/\\(\\)?/g,ne=(Z=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,r,n,o){t.push(n?o.replace(re,"$1"):r||e)}),t},Q=X(Z,function(e){return 500===ee.size&&ee.clear(),e}),ee=Q.cache,Q),oe=ne;function ie(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=d?d.prototype:void 0,ae=se?se.toString:void 0;function ce(e){if("string"==typeof e)return e;if(c(e))return ie(e,ce)+"";if(S(e))return ae?ae.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ue(e){return null==e?"":ce(e)}function fe(e,t){return c(e)?e:j(e,t)?[e]:oe(ue(e))}function le(e){if("string"==typeof e||S(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function de(e,t){for(var r=0,n=(t=fe(t,e)).length;null!=e&&r<n;)e=e[le(t[r++])];return r&&r==n?e:void 0}function he(e,t,r){var n=null==e?void 0:de(e,t);return void 0===n?r:n}function pe(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var ye,me=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[ye?s:++n];if(!1===t(o[a],a,o))break}return e};function ge(e){return w(e)&&"[object Arguments]"==b(e)}var ve=Object.prototype,be=ve.hasOwnProperty,we=ve.propertyIsEnumerable,Se=ge(function(){return arguments}())?ge:function(e){return w(e)&&be.call(e,"callee")&&!we.call(e,"callee")},_e=Se;var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,je=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=je&&je.exports===Oe?l.Buffer:void 0,Re=(Ee?Ee.isBuffer:void 0)||function(){return!1},Ae=/^(?:0|[1-9]\d*)$/;function xe(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Ae.test(e))&&e>-1&&e%1==0&&e<t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var Ce="object"==typeof exports&&exports&&!exports.nodeType&&exports,$e=Ce&&"object"==typeof module&&module&&!module.nodeType&&module,De=$e&&$e.exports===Ce&&u.process,Ne=function(){try{var e=$e&&$e.require&&$e.require("util").types;return e||De&&De.binding&&De.binding("util")}catch(e){}}(),Pe=Ne&&Ne.isTypedArray,Me=Pe?function(e){return function(t){return e(t)}}(Pe):function(e){return w(e)&&Te(e.length)&&!!ke[b(e)]},Le=Me,Fe=Object.prototype.hasOwnProperty;function Ue(e,t){var r=c(e),n=!r&&_e(e),o=!r&&!n&&Re(e),i=!r&&!n&&!o&&Le(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var f in e)!t&&!Fe.call(e,f)||s&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||xe(f,u))||a.push(f);return a}var Be=Object.prototype;function qe(e,t){return function(r){return e(t(r))}}var Ie=qe(Object.keys,Object),ze=Object.prototype.hasOwnProperty;function He(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Be))return Ie(e);var t,r,n=[];for(var o in Object(e))ze.call(e,o)&&"constructor"!=o&&n.push(o);return n}function Je(e){return null!=e&&Te(e.length)&&!R(e)}function We(e){return Je(e)?Ue(e):He(e)}var Ye=function(e,t){return function(r,n){if(null==r)return r;if(!Je(r))return e(r,n);for(var o=r.length,i=t?o:-1,s=Object(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}(function(e,t){return e&&me(e,t,We)}),Ve=Ye;function Ke(e){return e}function Ge(e,t){var r;return(c(e)?pe:Ve)(e,"function"==typeof(r=t)?r:Ke)}var Xe=Array.prototype.reverse;function Ze(e){return null==e?[]:function(e,t){return ie(t,function(t){return e[t]})}(e,We(e))}function Qe(e){return"[object String]"===Object.prototype.toString.call(e)}function et(e){return!(!Qe(e)||""===e)}function tt(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function rt(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 nt(e){return"[object Object]"===Object.prototype.toString.call(e)}function ot(e){return e!=e}function it(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(ot(e))return!1;t=!0}return t}function st(e,t){return!!nt(e)&&(!(!et(t)&&!it(t))&&t in e)}var at=/\s/;var ct=/^\s+/;function ut(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&at.test(e.charAt(t)););return t}(e)+1).replace(ct,""):e}var ft=/^[-+]0x[0-9a-f]+$/i,lt=/^0b[01]+$/i,dt=/^0o[0-7]+$/i,ht=parseInt;function pt(e){if("number"==typeof e)return e;if(S(e))return NaN;if(E(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=E(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ut(e);var r=lt.test(e);return r||dt.test(e)?ht(e.slice(2),r?2:8):ft.test(e)?NaN:+e}var yt=1/0;function mt(e){return e?(e=pt(e))===yt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function gt(e){var t=mt(e),r=t%1;return t==t?r?t-r:t:0}function vt(e,t,r){var n=null==e?0:e.length;return n?function(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}(e,(t=r||void 0===t?1:gt(t))<0?0:t,n):[]}function bt(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function wt(e){return"[object Array]"===Object.prototype.toString.call(e)}function St(e,t){let r=bt();if(!wt(e)&&!nt(e))return r.reject("rs is not an array or object"),r;let n=!1;if(nt(e)){n=!0;let t=[];Ge(e,(e,r)=>{t.push({k:r,v:e})}),e=t}tt(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 s=o,a=r;return n&&(s=r.k,a=r.v),tt(t)?t(a,s):a})},Promise.resolve()).then(function(e){i.push(e),i=vt(i),r.resolve(i)}).catch(function(e){r.reject(e)}),r}function _t(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function Ot(t){return _t(t,{fs:e})}function jt(e){return!0===(t=e)||!1===t||w(t)&&"[object Boolean]"==b(t);var t}function Et(e,t={}){let r=he(t,"fs");return!!r.existsSync(e)&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function Rt(e,t={}){let r=he(t,"fs");if(_t(e,{fs:r}))return{success:"input folder is already exists: "+e};if(r.existsSync(e))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function At(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"useSync","");jt(i)||(i=!0);let s="";return s=i?function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!Et(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};try{Rt(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=he(r,"path"),o=he(r,"fs");if(!Et(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};let i=null;return await(async(e,t)=>{Rt(n.dirname(t),{fs:o}),await new Promise((r,n)=>{let i=o.createReadStream(e),s=o.createWriteStream(t);i.on("error",n),s.on("error",n),s.on("finish",r),i.pipe(s)})})(e,t).then(()=>{i={success:"done: "+t}}).catch(e=>{i={error:e}}),i}(e,t,{path:n,fs:o}),s}function xt(r,n,o={}){return At(r,n,{path:t,fs:e,...o})}function Tt(r){return function(e,t={}){let r=he(t,"path"),n=he(t,"fs");if(!n.existsSync(e)){let t=Rt(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!_t(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 kt(t){return Rt(t,{fs:e})}function Ct(t){return function(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!_t(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}}(t,{fs:e})}function $t(r,n=1){return function(e,t=1,r={}){let n=1,o=he(r,"path"),i=he(r,"fs");if(!_t(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return function e(r){let s=[];return _t(r,{fs:i})?(Ge(i.readdirSync(r),function(a){let c=o.resolve(r,a),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(s.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(s=s.concat(e(c))),n-=1):s.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),s):s}(e)}(r,n,{path:t,fs:e})}function Dt(e){if(!it(e))return 0;return mt(e)}function Nt(t,n={}){return async function(e,t={}){let n=he(t,"fs"),o=he(t,"chunkSize");if(it(o)||(o=67108864),o=Dt(o),!Et(e,{fs:n}))return Promise.reject("fp is not a file");let i=bt();try{let{create64:t}=await r(),s=t(),a=n.createReadStream(e,{highWaterMark:o});a.on("data",e=>{s.update(e)}),a.on("end",()=>{let e=s.digest().toString(16).padStart(16,"0");i.resolve(e)}),a.on("error",i.reject)}catch(e){i.reject(e.toString())}return i}(t,{fs:e,...n})}var Pt=U(l,"DataView"),Mt=U(l,"Promise"),Lt=U(l,"Set"),Ft=U(l,"WeakMap"),Ut="[object Map]",Bt="[object Promise]",qt="[object Set]",It="[object WeakMap]",zt="[object DataView]",Ht=C(Pt),Jt=C(V),Wt=C(Mt),Yt=C(Lt),Vt=C(Ft),Kt=b;(Pt&&Kt(new Pt(new ArrayBuffer(1)))!=zt||V&&Kt(new V)!=Ut||Mt&&Kt(Mt.resolve())!=Bt||Lt&&Kt(new Lt)!=qt||Ft&&Kt(new Ft)!=It)&&(Kt=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?C(r):"";if(n)switch(n){case Ht:return zt;case Jt:return Ut;case Wt:return Bt;case Yt:return qt;case Vt:return It}return t});var Gt=Kt;function Xt(e){return function(t){return null==t?void 0:t[e]}}var Zt=Xt("length"),Qt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var er="\\ud800-\\udfff",tr="["+er+"]",rr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",nr="\\ud83c[\\udffb-\\udfff]",or="[^"+er+"]",ir="(?:\\ud83c[\\udde6-\\uddff]){2}",sr="[\\ud800-\\udbff][\\udc00-\\udfff]",ar="(?:"+rr+"|"+nr+")"+"?",cr="[\\ufe0e\\ufe0f]?",ur=cr+ar+("(?:\\u200d(?:"+[or,ir,sr].join("|")+")"+cr+ar+")*"),fr="(?:"+[or+rr+"?",rr,ir,sr,tr].join("|")+")",lr=RegExp(nr+"(?="+nr+")|"+fr+ur,"g");function dr(e){return function(e){return Qt.test(e)}(e)?function(e){for(var t=lr.lastIndex=0;lr.test(e);)++t;return t}(e):Zt(e)}function hr(e){if(null==e)return 0;if(Je(e))return"string"==typeof(t=e)||!c(t)&&w(t)&&"[object String]"==b(t)?dr(e):e.length;var t,r=Gt(e);return"[object Map]"==r||"[object Set]"==r?e.size:He(e).length}function pr(e){if(nt(e)){for(let t in e)return!0;return!1}return!1}var yr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gr(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 vr={exports:{}};var br,wr={exports:{}},Sr=gr(Object.freeze({__proto__:null,default:{}}));function _r(){return br||(br=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!==yr&&yr.crypto&&(r=yr.crypto),!r)try{r=Sr}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={},s=i.lib={},a=s.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=s.WordArray=a.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||f).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 s=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var a=0;a<o;a+=4)t[n+a>>>2]=r[a>>>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=a.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={},f=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)}},l=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(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},h=s.BufferedBlockAlgorithm=a.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,s=this.blockSize,a=i/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,f=e.min(4*u,i);if(u){for(var l=0;l<u;l+=s)this._doProcessBlock(o,l);r=o.splice(0,u),n.sigBytes-=f}return new c.init(r,f)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=h.extend({cfg:a.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)}(wr)),wr.exports}!function(e){e.exports=_r().enc.Utf8}(vr);var Or=mr(vr.exports),jr={exports:{}};!function(e){var t;e.exports=(t=_r(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=a<<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 s=(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,a=0;a<4&&i+.75*a<r;a++)o.push(n.charAt(s>>>6*(3-a)&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 s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(jr);var Er=mr(jr.exports);function Rr(e){if(!et(e))return"";let t=Or.parse(e);return Er.stringify(t)}function Ar(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function xr(e,t){var r=[];return Ve(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function Tr(e){var t=this.__data__=new Y(e);this.size=t.size}Tr.prototype.clear=function(){this.__data__=new Y,this.size=0},Tr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Tr.prototype.get=function(e){return this.__data__.get(e)},Tr.prototype.has=function(e){return this.__data__.has(e)},Tr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Y){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(e,t),this.size=r.size,this};function kr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new G;++t<r;)this.add(e[t])}function Cr(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 $r(e,t){return e.has(t)}kr.prototype.add=kr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kr.prototype.has=function(e){return this.__data__.has(e)};function Dr(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var l=-1,d=!0,h=2&r?new kr:void 0;for(i.set(e,t),i.set(t,e);++l<a;){var p=e[l],y=t[l];if(n)var m=s?n(y,p,l,t,e,i):n(p,y,l,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!Cr(t,function(e,t){if(!$r(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 Nr=l.Uint8Array;function Pr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Mr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Lr=d?d.prototype:void 0,Fr=Lr?Lr.valueOf:void 0;var Ur=Object.prototype.propertyIsEnumerable,Br=Object.getOwnPropertySymbols,qr=Br?function(e){return null==e?[]:(e=Object(e),Ar(Br(e),function(t){return Ur.call(e,t)}))}:function(){return[]};function Ir(e){return function(e,t,r){var n=t(e);return c(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,We,qr)}var zr=Object.prototype.hasOwnProperty;var Hr="[object Arguments]",Jr="[object Array]",Wr="[object Object]",Yr=Object.prototype.hasOwnProperty;function Vr(e,t,r,n,o,i){var s=c(e),a=c(t),u=s?Jr:Gt(e),f=a?Jr:Gt(t),l=(u=u==Hr?Wr:u)==Wr,d=(f=f==Hr?Wr:f)==Wr,h=u==f;if(h&&Re(e)){if(!Re(t))return!1;s=!0,l=!1}if(h&&!l)return i||(i=new Tr),s||Le(e)?Dr(e,t,r,n,o,i):function(e,t,r,n,o,i,s){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 Nr(e),new Nr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+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 a=Pr;case"[object Set]":var c=1&n;if(a||(a=Mr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var f=Dr(a(e),a(t),n,o,i,s);return s.delete(e),f;case"[object Symbol]":if(Fr)return Fr.call(e)==Fr.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var p=l&&Yr.call(e,"__wrapped__"),y=d&&Yr.call(t,"__wrapped__");if(p||y){var m=p?e.value():e,g=y?t.value():t;return i||(i=new Tr),o(m,g,r,n,i)}}return!!h&&(i||(i=new Tr),function(e,t,r,n,o,i){var s=1&r,a=Ir(e),c=a.length;if(c!=Ir(t).length&&!s)return!1;for(var u=c;u--;){var f=a[u];if(!(s?f in t:zr.call(t,f)))return!1}var l=i.get(e),d=i.get(t);if(l&&d)return l==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=s;++u<c;){var y=e[f=a[u]],m=t[f];if(n)var g=s?n(m,y,f,t,e,i):n(y,m,f,e,t,i);if(!(void 0===g?y===m||o(y,m,r,n,i):g)){h=!1;break}p||(p="constructor"==f)}if(h&&!p){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,n,o,i))}function Kr(e,t,r,n,o){return e===t||(null==e||null==t||!w(e)&&!w(t)?e!=e&&t!=t:Vr(e,t,r,n,Kr,o))}function Gr(e){return e==e&&!E(e)}function Xr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function Zr(e){var t=function(e){for(var t=We(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]?Xr(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var a=r[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var c=(a=r[o])[0],u=e[c],f=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var l=new Tr;if(n)var d=n(u,f,c,e,t,l);if(!(void 0===d?Kr(f,u,3,n,l):d))return!1}}return!0}(r,e,t)}}function Qr(e,t){return null!=e&&t in Object(e)}function en(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=fe(t,e)).length,i=!1;++n<o;){var s=le(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Te(o)&&xe(s,o)&&(c(e)||_e(e))}(e,t,Qr)}function tn(e){return j(e)?Xt(le(e)):function(e){return function(t){return de(t,e)}}(e)}function rn(e){return"function"==typeof e?e:null==e?Ke:"object"==typeof e?c(e)?function(e,t){return j(e)&&Gr(t)?Xr(le(e),t):function(r){var n=he(r,e);return void 0===n&&n===t?en(r,e):Kr(t,n,3)}}(e[0],e[1]):Zr(e):tn(e)}function nn(e,t){return(c(e)?Ar:xr)(e,rn(t))}function on(e,t,r,n={}){let o=he(n,"withInfor");jt(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!et(r))return console.log("invalid key"),o&&(i.infor={}),i;wt(e)||(e=[e]),wt(t)||(t=[t]),e=nn(e,e=>st(e,r)),t=nn(t,e=>st(e,r));let s=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=s.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),s.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(s.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}var sn={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,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.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},a.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,s=new Array(i);o<i;o++)s[o]=n[o].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,o,i,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,f=this._events[a],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(e,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,t),!0;case 3:return f.fn.call(f.context,t,n),!0;case 4:return f.fn.call(f.context,t,n,o),!0;case 5:return f.fn.call(f.context,t,n,o,i),!0;case 6:return f.fn.call(f.context,t,n,o,i,s),!0}for(u=1,c=new Array(l-1);u<l;u++)c[u-1]=arguments[u];f.fn.apply(f.context,c)}else{var d,h=f.length;for(u=0;u<h;u++)switch(f[u].once&&this.removeListener(e,f[u].fn,void 0,!0),l){case 1:f[u].fn.call(f[u].context);break;case 2:f[u].fn.call(f[u].context,t);break;case 3:f[u].fn.call(f[u].context,t,n);break;case 4:f[u].fn.call(f[u].context,t,n,o);break;default:if(!c)for(d=1,c=new Array(l-1);d<l;d++)c[d-1]=arguments[d];f[u].fn.apply(f[u].context,c)}}return!0},a.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||s(this,i);else{for(var c=0,u=[],f=a.length;c<f;c++)(a[c].fn!==t||o&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a}(sn);var an=mr(sn.exports);function cn(){return new an}var un=qe(Object.getPrototypeOf,Object),fn=Function.prototype,ln=Object.prototype,dn=fn.toString,hn=ln.hasOwnProperty,pn=dn.call(Object);function yn(e){if(!w(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(!w(e)||"[object Object]"!=b(e))return!1;var t=un(e);if(null===t)return!0;var r=hn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dn.call(r)==pn}(e)}function mn(e){if(!et(e)&&!it(e)&&!S(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function gn(e){let t="";if(yn(e))t=e.message;else{if(Qe(e))return e;if(nt(e))return st(e,"message")?e.message:JSON.stringify(e);if(wt(e))return JSON.stringify(e);t=mn(e)}return t}function vn(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!_t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),s=n.resolve(t,r),a=o.lstatSync(i);if(a.isDirectory())Rt(s,{fs:o}),vn(i,s,{path:n,fs:o});else if(a.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,s)}else Rt(n.dirname(s),{fs:o}),o.copyFileSync(i,s)})}catch(e){return{error:e}}return{success:"done: "+t}}function bn(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"useSync","");jt(i)||(i=!0);let s="";return s=i?vn(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!_t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let s of r){let r=n.join(e,s),a=n.join(t,s),c=o.lstatSync(r);if(c.isDirectory())Rt(a,{fs:o}),await i(r,a);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,a)}else Rt(n.dirname(a),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(a);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},s=null;return await i(e,t).then(()=>{s={success:"done: "+t}}).catch(e=>{s={error:e}}),s}(e,t,{path:n,fs:o}),s}function wn(r,n,o={}){return bn(r,n,{path:t,fs:e,...o})}function Sn(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function _n(e){return!!it(e)&&(e=Dt(e),"number"==typeof(t=e)&&t==gt(t));var t}var On=l.isFinite,jn=Math.min;var En=function(e){var t=Math[e];return function(e,r){if(e=pt(e),(r=null==r?0:jn(gt(r),292))&&On(e)){var n=(ue(e)+"e").split("e");return+((n=(ue(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),Rn=En;function An(e){if(!it(e))return 0;e=Dt(e);let t=Rn(e);return"0"===String(t)?0:t}function xn(e){if(!_n(e))return!1;return An(e)>0}function Tn(e=300){return new function(e){let t=[],r=null,n=null;return xn(e)||(e=300),e=An(e),function(o,...i){tt(o)?(n=Date.now(),t.push({func:o,input:i}),null===r&&(r=setInterval(()=>{if(Date.now()-n>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(r),r=null)},10))):console.log("func is not a function")}}(e)}function kn(r,i={}){let s=he(i,"polling");jt(s)||(s=!1);let a=he(i,"timeInterval");xn(a)||(a=100),a=An(a);let c=he(i,"timeBinaryInterval");xn(c)||(c=300),c=An(c);let u=new n.EventEmitter,f=r,l=null,d=setInterval(()=>{null===l&&(Et(f,{fs:e})&&(l=o.watch(f,{usePolling:s,interval:a,binaryInterval:c,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),u.emit("change",{type:e,fp:r,stats:n})})))},a);return u.clear=()=>{(()=>{if(null!==l){try{l.unwatch(f)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(d)},u}function Cn(t,r,n={}){Ot(t)||kt(t),Ot(r)||kt(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,s=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},a=(t,r)=>{try{let n=function(e,t=!1){if(Sn(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>he(s(e),t,""),u=(e,t,r)=>{let n=s(e);n[t]=r,a(e,n)},f=(e,t)=>{let r=s(e);st(r,t)&&delete r[t],a(e,r)},l=()=>s(o),d=e=>a(o,e),h=e=>c(o,e),p=()=>s(i),y=e=>a(i,e),m=e=>c(i,e),g=(e,t)=>u(i,e,t),v=e=>f(i,e),b=e=>{let t=[];return Ge(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=cn();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=>{f(o,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=l,e.writeKp=d,e},buildTar:()=>{let e=cn(),t=Tn(300),r=kn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=bt(),r=l();if(!pr(r))return t.resolve("no src"),t;let n=p(),o=b(r),i=on(b(n),o,"fp",{withInfor:!1}),s=bt();return s.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:s}),t})().catch(()=>{})})}),e.set=g,e.get=m,e.remove=v,e.readKp=p,e.writeKp=y,e.clear=r.clear,e}}}let $n=i.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL($n).href:"undefined"==typeof document?location.href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("w-dwdata-tweqod.umd.js",document.baseURI).href),Dn=t.dirname($n);var Nn={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",a="day",c="week",u="month",f="quarter",l="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=/\[([^\]]+)]|Y{1,4}|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,s=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:l,w:c,d:a,D:d,h:s,m:i,s:o,ms:n,Q:f}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=m;var S="$isDayjsObject",_=function(e){return e instanceof R||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var s=t.split("-");if(!o&&s.length>1)return e(s[0])}else{var a=t.name;w[a]=t,o=a}return!n&&o&&(b=o),o||!n&&b},j=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new R(r)},E=v;E.l=O,E.i=_,E.w=function(e,t){return j(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(E.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 E},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var r=j(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return j(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<j(e)},g.$g=function(e,t,r){return E.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=!!E.u(t)||t,f=E.p(e),h=function(e,t){var o=E.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(a)},p=function(e,t){return E.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(f){case l:return n?h(1,0):h(31,11);case u:return n?h(1,m):h(0,m+1);case c:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return h(n?g-w:g+(6-w),m);case a:case d:return p(v+"Hours",0);case s: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=E.p(e),f="set"+(this.$u?"UTC":""),h=(r={},r[a]=f+"Date",r[d]=f+"Date",r[u]=f+"Month",r[l]=f+"FullYear",r[s]=f+"Hours",r[i]=f+"Minutes",r[o]=f+"Seconds",r[n]=f+"Milliseconds",r)[c],p=c===a?this.$D+(t-this.$W):t;if(c===u||c===l){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[E.p(e)]()},g.add=function(n,f){var d,h=this;n=Number(n);var p=E.p(f),y=function(e){var t=j(h);return E.w(t.date(t.date()+Math.round(e*n)),h)};if(p===u)return this.set(u,this.$M+n);if(p===l)return this.set(l,this.$y+n);if(p===a)return y(1);if(p===c)return y(7);var m=(d={},d[i]=t,d[s]=r,d[o]=e,d)[p]||1,g=this.$d.getTime()+n*m;return E.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=E.z(this),i=this.$H,s=this.$m,a=this.$M,c=r.weekdays,u=r.months,f=r.meridiem,l=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return E.s(i%12||12,e,"0")},p=f||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 E.s(t.$y,4,"0");case"M":return a+1;case"MM":return E.s(a+1,2,"0");case"MMM":return l(r.monthsShort,a,u,3);case"MMMM":return l(u,a);case"D":return t.$D;case"DD":return E.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return l(r.weekdaysMin,t.$W,c,2);case"ddd":return l(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return E.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(i,s,!0);case"A":return p(i,s,!1);case"m":return String(s);case"mm":return E.s(s,2,"0");case"s":return String(t.$s);case"ss":return E.s(t.$s,2,"0");case"SSS":return E.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=E.p(d),g=j(n),v=(g.utcOffset()-this.utcOffset())*t,b=this-g,w=function(){return E.m(y,g)};switch(m){case l:p=w()/12;break;case u:p=w();break;case f:p=w()/3;break;case c:p=(b-v)/6048e5;break;case a:p=(b-v)/864e5;break;case s:p=b/r;break;case i:p=b/t;break;case o:p=b/e;break;default:p=b}return h?p:E.a(p)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return w[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 E.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}(),A=R.prototype;return j.prototype=A,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",a],["$M",u],["$y",l],["$D",d]].forEach(function(e){A[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),j.extend=function(e,t){return e.$i||(e(t,R,j),e.$i=!0),j},j.locale=O,j.isDayjs=_,j.unix=function(e){return j(1e3*e)},j.en=w[b],j.Ls=w,j.p={},j}()}(Nn);var Pn=mr(Nn.exports);let Mn=async(e={})=>{let r=he(e,"keyId");et(r)||(r="id");let n=he(e,"fdDwAttime");et(n)||(n="./_dwAttime"),Ot(n)||kt(n);let o=he(e,"fdDwCurrent");et(o)||(o="./_dwCurrent"),Ot(o)||kt(o);let i=he(e,"fdResult");et(i)||(i="./_result"),Ot(i)||kt(i);let a=he(e,"fdTaskCpSrc");et(a)||(a="./_taskCpSrc"),Ot(a)||kt(a);let c=he(e,"fdLog");et(c)||(c="./_logs"),Ot(c)||kt(c);let u=he(e,"funDownload");if(!tt(u))throw new Error("invalid funDownload");let f=he(e,"funGetCurrent");if(!tt(f))throw new Error("invalid funGetCurrent");let l=he(e,"funAdd");if(!tt(l))throw new Error("invalid funAdd");let d=he(e,"funModify");if(!tt(d))throw new Error("invalid funModify");let h=he(e,"funRemove");if(!tt(h))throw new Error("invalid funRemove");let p=cn(),y=function(e={}){let r=he(e,"fdLog");et(r)||(r="./_logs");let n=he(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let o=s.transport({targets:[{level:"info",target:t.resolve(Dn,"./formatter.mjs"),options:{interval:n,logDir:r}}]});return s(o)}({fdLog:c,interval:"hr"}),m={info:e=>{y.info(e),p.emit("change",{type:"info",...e})},warn:e=>{y.warn(e),p.emit("change",{type:"warn",...e})},error:e=>{y.error(e),p.emit("change",{type:"error",...e})}};return(async()=>{await function(e=10){it(e)||(e=10);let t=bt();return setTimeout(function(){t.resolve()},e),t}(1);let e=Pn(),t=()=>{let t=Pn(),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`}};m.info({event:"start",msg:"running..."});let i="",s=Cn(a,a).buildSrc(),c=[];try{m.info({event:"proc-callfun-download",msg:"start..."});let e=u();rt(e)&&(e=await e),m.info({event:"proc-callfun-download",msg:"done"}),c=e}catch(e){console.log(e),m.error({event:"proc-callfun-download",msg:gn(e)}),i="error at proc-callfun-download"}if(et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});let p=[];try{m.info({event:"proc-callfun-getCurrent",msg:"start..."});let e=f();rt(e)&&(e=await e),m.info({event:"proc-callfun-getCurrent",msg:"done"}),p=e}catch(e){console.log(e),m.error({event:"proc-callfun-getCurrent",msg:gn(e)}),i="error at proc-callfun-getCurrent"}if(et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});if(0===hr(c))return console.log("invalid data, task canceled"),void m.info({event:"cancel",...t(),msg:"can not download data"});if(hr(p)-hr(c)>10)return console.log(`difference between the data before and after is too large, size(itemsCur)[${hr(p)}]-size(itemsAtt)[${hr(c)}]>10`),void m.info({event:"cancel",...t(),msg:"difference between the data before and after is too large"});let y=null;try{m.info({event:"compare",msg:"start..."}),y=on(p,c,r,{withInfor:!1}),m.info({event:"compare",msg:"done"})}catch(e){console.log(e),m.error({event:"compare",msg:gn(e)})}if(!pr(y))return console.log("can not calculate the difference, task canceled"),void m.info({event:"cancel",...t(),msg:"can not calculate the difference between the data before and after"});if(0===hr(y.del)&&0===hr(y.add)&&0===hr(y.diff))return console.log("no difference, task canceled"),void m.info({event:"cancel",...t(),msg:"no difference"});if(await St(y.del,async e=>{if(!et(i)){try{m.info({event:"proc-remove-callfun-remove",[r]:e[r],msg:"start..."});let t=h(e);rt(t)&&(t=await t)}catch(t){console.log(t),m.error({event:"proc-remove-callfun-remove",[r]:e[r],msg:gn(t)}),i="error at proc-remove-callfun-remove"}if(!et(i))try{s.remove(e[r]),m.info({event:"proc-remove-callfun-remove",[r]:e[r],msg:"done"})}catch(t){console.log(t),m.error({event:"proc-remove-otk-remove",[r]:e[r],msg:gn(t)}),i="error at proc-remove-otk-remove"}}}),et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});if(await St(y.add,async e=>{if(!et(i)){try{m.info({event:"proc-add-callfun-add",[r]:e[r],msg:"start..."});let t=l(e);rt(t)&&(t=await t)}catch(t){console.log(t),m.error({event:"proc-add-callfun-add",[r]:e[r],msg:gn(t)}),i="error at proc-add-callfun-add"}if(!et(i))try{let t=Rr(JSON.stringify(e));s.set(e[r],t),m.info({event:"proc-add-callfun-add",[r]:e[r],msg:"done"})}catch(t){console.log(t),m.error({event:"proc-add-otk-set",[r]:e[r],msg:gn(t)}),i="error at proc-add-otk-set"}}}),et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});if(await St(y.diff,async e=>{if(!et(i)){try{m.info({event:"proc-diff-callfun-modify",[r]:e[r],msg:"start..."});let t=d(e);rt(t)&&(t=await t)}catch(t){console.log(t),m.error({event:"proc-diff-callfun-modify",[r]:e[r],msg:gn(t)}),i="error at proc-diff-callfun-modify"}if(!et(i))try{let t=Rr(JSON.stringify(e));s.set(e[r],t),m.info({event:"proc-diff-callfun-modify",[r]:e[r],msg:"done"})}catch(t){console.log(t),m.error({event:"proc-diff-otk-set",[r]:e[r],msg:gn(t)}),i="error at proc-diff-otk-set"}}}),et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});{Tt(o);let e=wn(n,o);if(e.error)return console.log(e.error),m.error({event:"task-update-rawData",msg:e.error}),void(i="error at task-update-rawData")}if(et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});m.info({event:"end",...t(),msg:"done"})})().catch(e=>{console.log(e),m.error({event:"proc-core",msg:gn(e)})}),p.srlog=m,p};function Ln(e){return!!Sn(e)||(!!function(e){return"[object Null]"===Object.prototype.toString.call(e)}(e)||(!!function(e){if(nt(e)){for(let t in e)return!1;return!0}return!1}(e)||(!!function(e){return!(!Qe(e)||""!==e)}(e)||(!!function(e){return!!wt(e)&&0===e.length}(e)||!!ot(e)))))}function Fn(e){if(!_n(e))return!1;return An(e)>=0}function Un(e,t){return et(e)&&Fn(t)?0===(t=An(t))?e:function(e,t){if(!et(e))return"";if(!Fn(t))return"";if(0===(t=An(t)))return"";let r=e.length-t;return r<0&&(r=0),e.substring(r,r+t)}(e,e.length-t):""}function Bn(e,t){return function(){return e.apply(t,arguments)}}const{toString:qn}=Object.prototype,{getPrototypeOf:In}=Object,{iterator:zn,toStringTag:Hn}=Symbol,Jn=(e=>t=>{const r=qn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wn=e=>(e=e.toLowerCase(),t=>Jn(t)===e),Yn=e=>t=>typeof t===e,{isArray:Vn}=Array,Kn=Yn("undefined");function Gn(e){return null!==e&&!Kn(e)&&null!==e.constructor&&!Kn(e.constructor)&&Qn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xn=Wn("ArrayBuffer");const Zn=Yn("string"),Qn=Yn("function"),eo=Yn("number"),to=e=>null!==e&&"object"==typeof e,ro=e=>{if("object"!==Jn(e))return!1;const t=In(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Hn in e||zn in e)},no=Wn("Date"),oo=Wn("File"),io=Wn("Blob"),so=Wn("FileList"),ao=Wn("URLSearchParams"),[co,uo,fo,lo]=["ReadableStream","Request","Response","Headers"].map(Wn);function ho(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Vn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Gn(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function po(e,t){if(Gn(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 yo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,mo=e=>!Kn(e)&&e!==yo;const go=(vo="undefined"!=typeof Uint8Array&&In(Uint8Array),e=>vo&&e instanceof vo);var vo;const bo=Wn("HTMLFormElement"),wo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),So=Wn("RegExp"),_o=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ho(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const Oo=Wn("AsyncFunction"),jo=(Eo="function"==typeof setImmediate,Ro=Qn(yo.postMessage),Eo?setImmediate:Ro?(Ao=`axios@${Math.random()}`,xo=[],yo.addEventListener("message",({source:e,data:t})=>{e===yo&&t===Ao&&xo.length&&xo.shift()()},!1),e=>{xo.push(e),yo.postMessage(Ao,"*")}):e=>setTimeout(e));var Eo,Ro,Ao,xo;const To="undefined"!=typeof queueMicrotask?queueMicrotask.bind(yo):"undefined"!=typeof process&&process.nextTick||jo;var ko={isArray:Vn,isArrayBuffer:Xn,isBuffer:Gn,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Qn(e.append)&&("formdata"===(t=Jn(e))||"object"===t&&Qn(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Xn(e.buffer),t},isString:Zn,isNumber:eo,isBoolean:e=>!0===e||!1===e,isObject:to,isPlainObject:ro,isEmptyObject:e=>{if(!to(e)||Gn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:co,isRequest:uo,isResponse:fo,isHeaders:lo,isUndefined:Kn,isDate:no,isFile:oo,isBlob:io,isRegExp:So,isFunction:Qn,isStream:e=>to(e)&&Qn(e.pipe),isURLSearchParams:ao,isTypedArray:go,isFileList:so,forEach:ho,merge:function e(){const{caseless:t}=mo(this)&&this||{},r={},n=(n,o)=>{const i=t&&po(r,o)||o;ro(r[i])&&ro(n)?r[i]=e(r[i],n):ro(n)?r[i]=e({},n):Vn(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&ho(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(ho(t,(t,n)=>{r&&Qn(t)?e[n]=Bn(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,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&In(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Jn,kindOfTest:Wn,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(Vn(e))return e;let t=e.length;if(!eo(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[zn]).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:bo,hasOwnProperty:wo,hasOwnProp:wo,reduceDescriptors:_o,freezeMethods:e=>{_o(e,(t,r)=>{if(Qn(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Qn(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 Vn(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:po,global:yo,isContextDefined:mo,isSpecCompliantForm:function(e){return!!(e&&Qn(e.append)&&"FormData"===e[Hn]&&e[zn])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(to(e)){if(t.indexOf(e)>=0)return;if(Gn(e))return e;if(!("toJSON"in e)){t[n]=e;const o=Vn(e)?[]:{};return ho(e,(e,t)=>{const i=r(e,n+1);!Kn(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Oo,isThenable:e=>e&&(to(e)||Qn(e))&&Qn(e.then)&&Qn(e.catch),setImmediate:jo,asap:To,isIterable:e=>null!=e&&Qn(e[zn])};function Co(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)}ko.inherits(Co,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:ko.toJSONObject(this.config),code:this.code,status:this.status}}});const $o=Co.prototype,Do={};["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=>{Do[e]={value:e}}),Object.defineProperties(Co,Do),Object.defineProperty($o,"isAxiosError",{value:!0}),Co.from=(e,t,r,n,o,i)=>{const s=Object.create($o);return ko.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Co.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function No(e){return ko.isPlainObject(e)||ko.isArray(e)}function Po(e){return ko.endsWith(e,"[]")?e.slice(0,-2):e}function Mo(e,t,r){return e?e.concat(t).map(function(e,t){return e=Po(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Lo=ko.toFlatObject(ko,{},null,function(e){return/^is[A-Z]/.test(e)});function Fo(e,t,r){if(!ko.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=ko.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ko.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ko.isSpecCompliantForm(t);if(!ko.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ko.isDate(e))return e.toISOString();if(ko.isBoolean(e))return e.toString();if(!a&&ko.isBlob(e))throw new Co("Blob is not supported. Use a Buffer instead.");return ko.isArrayBuffer(e)||ko.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(ko.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ko.isArray(e)&&function(e){return ko.isArray(e)&&!e.some(No)}(e)||(ko.isFileList(e)||ko.endsWith(r,"[]"))&&(a=ko.toArray(e)))return r=Po(r),a.forEach(function(e,n){!ko.isUndefined(e)&&null!==e&&t.append(!0===s?Mo([r],n,i):null===s?r:r+"[]",c(e))}),!1;return!!No(e)||(t.append(Mo(o,r,i),c(e)),!1)}const f=[],l=Object.assign(Lo,{defaultVisitor:u,convertValue:c,isVisitable:No});if(!ko.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ko.isUndefined(r)){if(-1!==f.indexOf(r))throw Error("Circular reference detected in "+n.join("."));f.push(r),ko.forEach(r,function(r,i){!0===(!(ko.isUndefined(r)||null===r)&&o.call(t,r,ko.isString(i)?i.trim():i,n,l))&&e(r,n?n.concat(i):[i])}),f.pop()}}(e),t}function Uo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Bo(e,t){this._pairs=[],e&&Fo(e,this,t)}const qo=Bo.prototype;function Io(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zo(e,t,r){if(!t)return e;const n=r&&r.encode||Io;ko.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):ko.isURLSearchParams(t)?t.toString():new Bo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}qo.append=function(e,t){this._pairs.push([e,t])},qo.toString=function(e){const t=e?function(t){return e.call(this,t,Uo)}:Uo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Ho=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){ko.forEach(this.handlers,function(t){null!==t&&e(t)})}},Jo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Wo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Bo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Yo="undefined"!=typeof window&&"undefined"!=typeof document,Vo="object"==typeof navigator&&navigator||void 0,Ko=Yo&&(!Vo||["ReactNative","NativeScript","NS"].indexOf(Vo.product)<0),Go="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Xo=Yo&&window.location.href||"http://localhost";var Zo={...Object.freeze({__proto__:null,hasBrowserEnv:Yo,hasStandardBrowserEnv:Ko,hasStandardBrowserWebWorkerEnv:Go,navigator:Vo,origin:Xo}),...Wo};function Qo(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&ko.isArray(n)?n.length:i,a)return ko.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s;n[i]&&ko.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&ko.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])),!s}if(ko.isFormData(e)&&ko.isFunction(e.entries)){const r={};return ko.forEachEntry(e,(e,n)=>{t(function(e){return ko.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ei={transitional:Jo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=ko.isObject(e);o&&ko.isHTMLForm(e)&&(e=new FormData(e));if(ko.isFormData(e))return n?JSON.stringify(Qo(e)):e;if(ko.isArrayBuffer(e)||ko.isBuffer(e)||ko.isStream(e)||ko.isFile(e)||ko.isBlob(e)||ko.isReadableStream(e))return e;if(ko.isArrayBufferView(e))return e.buffer;if(ko.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 Fo(e,new Zo.classes.URLSearchParams,{visitor:function(e,t,r,n){return Zo.isNode&&ko.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=ko.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Fo(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(ko.isString(e))try{return(t||JSON.parse)(e),ko.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ei.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ko.isResponse(e)||ko.isReadableStream(e))return e;if(e&&ko.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Co.from(e,Co.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:Zo.classes.FormData,Blob:Zo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ko.forEach(["delete","get","head","post","put","patch"],e=>{ei.headers[e]={}});var ti=ei;const ri=ko.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 ni=Symbol("internals");function oi(e){return e&&String(e).trim().toLowerCase()}function ii(e){return!1===e||null==e?e:ko.isArray(e)?e.map(ii):String(e)}function si(e,t,r,n,o){return ko.isFunction(n)?n.call(this,t,r):(o&&(t=r),ko.isString(t)?ko.isString(n)?-1!==t.indexOf(n):ko.isRegExp(n)?n.test(t):void 0:void 0)}class ai{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=oi(t);if(!o)throw new Error("header name must be a non-empty string");const i=ko.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=ii(e))}const i=(e,t)=>ko.forEach(e,(e,r)=>o(e,r,t));if(ko.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ko.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]&&ri[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(ko.isObject(e)&&ko.isIterable(e)){let r,n,o={};for(const t of e){if(!ko.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?ko.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=oi(e)){const r=ko.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(ko.isFunction(t))return t.call(this,e,r);if(ko.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=oi(e)){const r=ko.findKey(this,e);return!(!r||void 0===this[r]||t&&!si(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=oi(e)){const o=ko.findKey(r,e);!o||t&&!si(0,r[o],o,t)||(delete r[o],n=!0)}}return ko.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&&!si(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return ko.forEach(this,(n,o)=>{const i=ko.findKey(r,o);if(i)return t[i]=ii(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();s!==o&&delete t[o],t[s]=ii(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ko.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ko.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[ni]=this[ni]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=oi(e);t[n]||(!function(e,t){const r=ko.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 ko.isArray(e)?e.forEach(n):n(e),this}}ai.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ko.reduceDescriptors(ai.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),ko.freezeMethods(ai);var ci=ai;function ui(e,t){const r=this||ti,n=t||r,o=ci.from(n.headers);let i=n.data;return ko.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function fi(e){return!(!e||!e.__CANCEL__)}function li(e,t,r){Co.call(this,null==e?"canceled":e,Co.ERR_CANCELED,t,r),this.name="CanceledError"}function di(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Co("Request failed with status code "+r.status,[Co.ERR_BAD_REQUEST,Co.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}ko.inherits(li,Co,{__CANCEL__:!0});const hi=(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,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[s];o||(o=c),r[i]=a,n[i]=c;let f=s,l=0;for(;f!==i;)l+=r[f++],f%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*l/d):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},i-a)))},()=>r&&s(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},pi=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},yi=e=>(...t)=>ko.asap(()=>e(...t));var mi=Zo.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Zo.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Zo.origin),Zo.navigator&&/(msie|trident)/i.test(Zo.navigator.userAgent)):()=>!0,gi=Zo.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];ko.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),ko.isString(n)&&s.push("path="+n),ko.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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 vi(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 bi=e=>e instanceof ci?{...e}:e;function wi(e,t){t=t||{};const r={};function n(e,t,r,n){return ko.isPlainObject(e)&&ko.isPlainObject(t)?ko.merge.call({caseless:n},e,t):ko.isPlainObject(t)?ko.merge({},t):ko.isArray(t)?t.slice():t}function o(e,t,r,o){return ko.isUndefined(t)?ko.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!ko.isUndefined(t))return n(void 0,t)}function s(e,t){return ko.isUndefined(t)?ko.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(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:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(bi(e),bi(t),0,!0)};return ko.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,s=i(e[n],t[n],n);ko.isUndefined(s)&&i!==a||(r[n]=s)}),r}var Si=e=>{const t=wi({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=ci.from(a),t.url=zo(vi(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ko.isFormData(n))if(Zo.hasStandardBrowserEnv||Zo.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Zo.hasStandardBrowserEnv&&(o&&ko.isFunction(o)&&(o=o(t)),o||!1!==o&&mi(t.url))){const e=i&&s&&gi.read(s);e&&a.set(i,e)}return t};var _i="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Si(e);let o=n.data;const i=ci.from(n.headers).normalize();let s,a,c,u,f,{responseType:l,onUploadProgress:d,onDownloadProgress:h}=n;function p(){u&&u(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=ci.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());di(function(e){t(e),p()},function(e){r(e),p()},{data:l&&"text"!==l&&"json"!==l?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 Co("Request aborted",Co.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Co("Network Error",Co.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Jo;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Co(t,o.clarifyTimeoutError?Co.ETIMEDOUT:Co.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&ko.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),ko.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),l&&"json"!==l&&(y.responseType=n.responseType),h&&([c,f]=hi(h,!0),y.addEventListener("progress",c)),d&&y.upload&&([a,u]=hi(d),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(s=t=>{y&&(r(!t||t.type?new li(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===Zo.protocols.indexOf(g)?r(new Co("Unsupported protocol "+g+":",Co.ERR_BAD_REQUEST,e)):y.send(o||null)})};var Oi=(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,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Co?t:new li(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Co(`timeout ${t} of ms exceeded`,Co.ETIMEDOUT))},t);const s=()=>{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:a}=n;return a.unsubscribe=()=>ko.asap(s),a}};const ji=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},Ei=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()}},Ri=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Ei(e))yield*ji(r,t)}(e,t);let i,s=0,a=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 a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Ai="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,xi=Ai&&"function"==typeof ReadableStream,Ti=Ai&&("function"==typeof TextEncoder?(ki=new TextEncoder,e=>ki.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var ki;const Ci=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},$i=xi&&Ci(()=>{let e=!1;const t=new Request(Zo.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Di=xi&&Ci(()=>ko.isReadableStream(new Response("").body)),Ni={stream:Di&&(e=>e.body)};var Pi;Ai&&(Pi=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ni[e]&&(Ni[e]=ko.isFunction(Pi[e])?t=>t[e]():(t,r)=>{throw new Co(`Response type '${e}' is not supported`,Co.ERR_NOT_SUPPORT,r)})}));const Mi=async(e,t)=>{const r=ko.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(ko.isBlob(e))return e.size;if(ko.isSpecCompliantForm(e)){const t=new Request(Zo.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ko.isArrayBufferView(e)||ko.isArrayBuffer(e)?e.byteLength:(ko.isURLSearchParams(e)&&(e+=""),ko.isString(e)?(await Ti(e)).byteLength:void 0)})(t):r};var Li=Ai&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:d}=Si(e);u=u?(u+"").toLowerCase():"text";let h,p=Oi([o,i&&i.toAbortSignal()],s);const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&$i&&"get"!==r&&"head"!==r&&0!==(m=await Mi(f,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(ko.isFormData(n)&&(e=r.headers.get("content-type"))&&f.setContentType(e),r.body){const[e,t]=pi(m,hi(yi(c)));n=Ri(r.body,65536,e,t)}}ko.isString(l)||(l=l?"include":"omit");const o="credentials"in Request.prototype;h=new Request(t,{...d,signal:p,method:r.toUpperCase(),headers:f.normalize().toJSON(),body:n,duplex:"half",credentials:o?l:void 0});let i=await fetch(h,d);const s=Di&&("stream"===u||"response"===u);if(Di&&(a||s&&y)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=ko.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&pi(t,hi(yi(a),!0))||[];i=new Response(Ri(i.body,65536,r,()=>{n&&n(),y&&y()}),e)}u=u||"text";let g=await Ni[ko.findKey(Ni,u)||"text"](i,e);return!s&&y&&y(),await new Promise((t,r)=>{di(t,r,{data:g,headers:ci.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:h})})}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Co("Network Error",Co.ERR_NETWORK,e,h),{cause:t.cause||t});throw Co.from(t,t&&t.code,e,h)}});const Fi={http:null,xhr:_i,fetch:Li};ko.forEach(Fi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ui=e=>`- ${e}`,Bi=e=>ko.isFunction(e)||null===e||!1===e;var qi=e=>{e=ko.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!Bi(r)&&(n=Fi[(t=String(r)).toLowerCase()],void 0===n))throw new Co(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Co("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ui).join("\n"):" "+Ui(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ii(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new li(null,e)}function zi(e){Ii(e),e.headers=ci.from(e.headers),e.data=ui.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return qi(e.adapter||ti.adapter)(e).then(function(t){return Ii(e),t.data=ui.call(e,e.transformResponse,t),t.headers=ci.from(t.headers),t},function(t){return fi(t)||(Ii(e),t&&t.response&&(t.response.data=ui.call(e,e.transformResponse,t.response),t.response.headers=ci.from(t.response.headers))),Promise.reject(t)})}const Hi="1.11.0",Ji={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ji[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wi={};Ji.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Hi+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Co(n(o," has been removed"+(t?" in "+t:"")),Co.ERR_DEPRECATED);return t&&!Wi[o]&&(Wi[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 Yi={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Co("options must be an object",Co.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new Co("option "+i+" must be "+r,Co.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Co("Unknown option "+i,Co.ERR_BAD_OPTION)}},validators:Ji};const Vi=Yi.validators;class Ki{constructor(e){this.defaults=e||{},this.interceptors={request:new Ho,response:new Ho}}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=wi(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Yi.assertOptions(r,{silentJSONParsing:Vi.transitional(Vi.boolean),forcedJSONParsing:Vi.transitional(Vi.boolean),clarifyTimeoutError:Vi.transitional(Vi.boolean)},!1),null!=n&&(ko.isFunction(n)?t.paramsSerializer={serialize:n}:Yi.assertOptions(n,{encode:Vi.function,serialize:Vi.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Yi.assertOptions(t,{baseUrl:Vi.spelling("baseURL"),withXsrfToken:Vi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&ko.merge(o.common,o[t.method]);o&&ko.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ci.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let f,l=0;if(!a){const e=[zi.bind(this),void 0];for(e.unshift(...s),e.push(...c),f=e.length,u=Promise.resolve(t);l<f;)u=u.then(e[l++],e[l++]);return u}f=s.length;let d=t;for(l=0;l<f;){const e=s[l++],t=s[l++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=zi.call(this,d)}catch(e){return Promise.reject(e)}for(l=0,f=c.length;l<f;)u=u.then(c[l++],c[l++]);return u}getUri(e){return zo(vi((e=wi(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}ko.forEach(["delete","get","head","options"],function(e){Ki.prototype[e]=function(t,r){return this.request(wi(r||{},{method:e,url:t,data:(r||{}).data}))}}),ko.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(wi(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ki.prototype[e]=t(),Ki.prototype[e+"Form"]=t(!0)});var Gi=Ki;class Xi{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 li(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 Xi(function(t){e=t}),cancel:e}}}var Zi=Xi;const Qi={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(Qi).forEach(([e,t])=>{Qi[t]=e});var es=Qi;const ts=function e(t){const r=new Gi(t),n=Bn(Gi.prototype.request,r);return ko.extend(n,Gi.prototype,r,{allOwnKeys:!0}),ko.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(wi(t,r))},n}(ti);ts.Axios=Gi,ts.CanceledError=li,ts.CancelToken=Zi,ts.isCancel=fi,ts.VERSION=Hi,ts.toFormData=Fo,ts.AxiosError=Co,ts.Cancel=ts.CanceledError,ts.all=function(e){return Promise.all(e)},ts.spread=function(e){return function(t){return e.apply(null,t)}},ts.isAxiosError=function(e){return ko.isObject(e)&&!0===e.isAxiosError},ts.mergeConfig=wi,ts.AxiosHeaders=ci,ts.formToJSON=e=>Qo(ko.isHTMLForm(e)?new FormData(e):e),ts.getAdapter=qi,ts.HttpStatusCode=es,ts.default=ts;var rs=ts;let ns=async e=>{let t=null,r=await rs.get(`https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001?Authorization=${e}`).catch(e=>{t=e});if(null!==t)return;let n=[...he(r,"data.records.earthquake",[]),...he(r,"data.records.Earthquake",[])];if(!wt(o=n)||0===o.length||1===o.length&&Ln(o[0]))throw console.log("rEqsL",r),new Error("無法取得顯著有感地震之earthquake數據");var o;let i=[];return Ge(n,e=>{let t=he(e,"earthquakeInfo.originTime",""),r=he(e,"EarthquakeInfo.OriginTime",""),n=t||r;if(!et(n))throw console.log("v",e),new Error(`無法取得originTime[${n}]`);let o=he(e,"earthquakeInfo.magnitude.magnitudeType",""),s=he(e,"EarthquakeInfo.EarthquakeMagnitude.MagnitudeType",""),a=o||s;if(!et(a))throw console.log("v",e),new Error(`無法取得magnitudeType[${a}]`);let c=he(e,"earthquakeInfo.magnitude.magnitudeValue",""),u=he(e,"EarthquakeInfo.EarthquakeMagnitude.MagnitudeValue",""),f=c||u;if(!it(f))throw console.log("v",e),new Error(`無法取得magnitudeValue[${f}]`);let l=he(e,"ReportContent",""),d=f;d=mn(d);let h=Pn(n),p=he(e,"EarthquakeNo","");p=mn(p);let y=Un(p,3),m=n,g=h.format("YYYY-MM-DDTHH:mm:ssZ"),v=h.format("YYYYMMDDHHmmss"),b=he(e,"EarthquakeInfo.FocalDepth","");b=mn(b);let w=he(e,"EarthquakeInfo.Epicenter.Location",""),S=he(e,"EarthquakeInfo.Epicenter.EpicenterLongitude","");S=mn(S);let _=he(e,"EarthquakeInfo.Epicenter.EpicenterLatitude","");_=mn(_);let O={id:p,tag:"",number:y,time:g,timeRec:m,timeTag:v,ml:d,depth:b,description:l,location:w,intensity:"",longitude:S,latitude:_,data:e};i.push(O)}),i};return async(t,r={})=>{let n=he(r,"fdDwStorage");et(n)||(n="./_dwStorage"),Ot(n)||kt(n);let o=he(r,"fdDwAttime");et(o)||(o="./_dwAttime"),Ot(o)||kt(o);let i=he(r,"fdDwCurrent");et(i)||(i="./_dwCurrent"),Ot(i)||kt(i);let s=he(r,"fdResult");et(s)||(s="./_result"),Ot(s)||kt(s);let a=he(r,"fdTaskCpSrc");et(a)||(a="./_taskCpSrc"),Ot(a)||kt(a);let c=he(r,"fdLog");et(c)||(c="./_logs"),Ot(c)||kt(c);let u=he(r,"funDownloadEqs"),f=he(r,"funDownload"),l=he(r,"funGetCurrent"),d=he(r,"funAdd"),h=he(r,"funModify"),p=he(r,"funRemove"),y=async()=>{let r=[];var s;tt(u)?(r=u(),rt(r)&&(r=await r)):r=await ns(t),r=null==(s=r)?s:Xe.call(s),Tt(o),wn(i,o);let a=(t=>{let r=$t(t,1),n=[];return Ge(r,t=>{let r=e.readFileSync(t.path,"utf8"),o=JSON.parse(r);n.push(o)}),n})(o),c={};return Ge(a,e=>{c[e.id]=e}),await St(r,async t=>{let r=`${n}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8");let i=await Nt(r);if(st(c,t.id)){if(i!==c[t.id].hash){c[t.id].hash=i;let r=`${o}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(c[t.id]),"utf8")}}else{c[t.id]={id:t.id,hash:i};let r=`${o}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(c[t.id]),"utf8")}}),Ze(c)};tt(f)||(f=y);let m=async()=>{let t=$t(i,1),r=[];return Ge(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};tt(l)||(l=m);let g=async e=>{let t=`${s}/${e.id}`;Ot(t)&&Ct(t)};tt(p)||(p=g);let v=async e=>{let t=`${s}/${e.id}`;Ot(t)&&Tt(t),xt(`${n}/${e.id}.json`,`${t}/${e.id}.json`)};tt(d)||(d=v);let b=async e=>{let t=`${s}/${e.id}`;Ot(t)&&Tt(t),xt(`${n}/${e.id}.json`,`${t}/${e.id}.json`)};tt(h)||(h=b);let w={fdDwAttime:o,fdDwCurrent:i,fdResult:s,fdTaskCpSrc:a,fdLog:c,funDownload:f,funGetCurrent:l,funRemove:p,funAdd:d,funModify:h};return await Mn(w)}});
6
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("xxhash-wasm"),require("events"),require("chokidar"),require("url"),require("pino")):"function"==typeof define&&define.amd?define(["fs","path","xxhash-wasm","events","chokidar","url","pino"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweqod"]=t(e.fs,e.path,e["xxhash-wasm"],e.events,e.chokidar,e.url,e.pino)}(this,function(e,t,r,n,o,i,s){"use strict";var a="undefined"!=typeof document?document.currentScript:null,c=Array.isArray,u="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,l=u||f||Function("return this")(),d=l.Symbol,h=Object.prototype,p=h.hasOwnProperty,y=h.toString,m=d?d.toStringTag:void 0;var g=Object.prototype.toString;var v=d?d.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":v&&v in Object(e)?function(e){var t=p.call(e,m),r=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=y.call(e);return n&&(t?e[m]=r:delete e[m]),o}(e):function(e){return g.call(e)}(e)}function w(e){return null!=e&&"object"==typeof e}function S(e){return"symbol"==typeof e||w(e)&&"[object Symbol]"==b(e)}var _=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;function j(e,t){if(c(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!S(e))||(O.test(e)||!_.test(e)||null!=t&&e in Object(t))}function E(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function R(e){if(!E(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var A,x=l["__core-js_shared__"],T=(A=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"";var k=Function.prototype.toString;function C(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var $=/^\[object .+?Constructor\]$/,D=Function.prototype,N=Object.prototype,P=D.toString,M=N.hasOwnProperty,L=RegExp("^"+P.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function F(e){return!(!E(e)||(t=e,T&&T in t))&&(R(e)?L:$).test(C(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return F(r)?r:void 0}var B=U(Object,"create");var q=Object.prototype.hasOwnProperty;var I=Object.prototype.hasOwnProperty;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])}}function H(e,t){return e===t||e!=e&&t!=t}function J(e,t){for(var r=e.length;r--;)if(H(e[r][0],t))return r;return-1}z.prototype.clear=function(){this.__data__=B?B(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(B){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:I.call(t,e)},z.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};var W=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=J(t,e);return!(r<0)&&(r==t.length-1?t.pop():W.call(t,r,1),--this.size,!0)},Y.prototype.get=function(e){var t=this.__data__,r=J(t,e);return r<0?void 0:t[r][1]},Y.prototype.has=function(e){return J(this.__data__,e)>-1},Y.prototype.set=function(e,t){var r=this.__data__,n=J(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var V=U(l,"Map");function K(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 G(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])}}G.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(V||Y),string:new z}},G.prototype.delete=function(e){var t=K(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return K(this,e).get(e)},G.prototype.has=function(e){return K(this,e).has(e)},G.prototype.set=function(e,t){var r=K(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 s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(X.Cache||G),r}X.Cache=G;var Z,Q,ee,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/\\(\\)?/g,ne=(Z=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,r,n,o){t.push(n?o.replace(re,"$1"):r||e)}),t},Q=X(Z,function(e){return 500===ee.size&&ee.clear(),e}),ee=Q.cache,Q),oe=ne;function ie(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=d?d.prototype:void 0,ae=se?se.toString:void 0;function ce(e){if("string"==typeof e)return e;if(c(e))return ie(e,ce)+"";if(S(e))return ae?ae.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ue(e){return null==e?"":ce(e)}function fe(e,t){return c(e)?e:j(e,t)?[e]:oe(ue(e))}function le(e){if("string"==typeof e||S(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function de(e,t){for(var r=0,n=(t=fe(t,e)).length;null!=e&&r<n;)e=e[le(t[r++])];return r&&r==n?e:void 0}function he(e,t,r){var n=null==e?void 0:de(e,t);return void 0===n?r:n}function pe(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var ye,me=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[ye?s:++n];if(!1===t(o[a],a,o))break}return e};function ge(e){return w(e)&&"[object Arguments]"==b(e)}var ve=Object.prototype,be=ve.hasOwnProperty,we=ve.propertyIsEnumerable,Se=ge(function(){return arguments}())?ge:function(e){return w(e)&&be.call(e,"callee")&&!we.call(e,"callee")},_e=Se;var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,je=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,Ee=je&&je.exports===Oe?l.Buffer:void 0,Re=(Ee?Ee.isBuffer:void 0)||function(){return!1},Ae=/^(?:0|[1-9]\d*)$/;function xe(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Ae.test(e))&&e>-1&&e%1==0&&e<t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var Ce="object"==typeof exports&&exports&&!exports.nodeType&&exports,$e=Ce&&"object"==typeof module&&module&&!module.nodeType&&module,De=$e&&$e.exports===Ce&&u.process,Ne=function(){try{var e=$e&&$e.require&&$e.require("util").types;return e||De&&De.binding&&De.binding("util")}catch(e){}}(),Pe=Ne&&Ne.isTypedArray,Me=Pe?function(e){return function(t){return e(t)}}(Pe):function(e){return w(e)&&Te(e.length)&&!!ke[b(e)]},Le=Me,Fe=Object.prototype.hasOwnProperty;function Ue(e,t){var r=c(e),n=!r&&_e(e),o=!r&&!n&&Re(e),i=!r&&!n&&!o&&Le(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var f in e)!t&&!Fe.call(e,f)||s&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||xe(f,u))||a.push(f);return a}var Be=Object.prototype;function qe(e,t){return function(r){return e(t(r))}}var Ie=qe(Object.keys,Object),ze=Object.prototype.hasOwnProperty;function He(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Be))return Ie(e);var t,r,n=[];for(var o in Object(e))ze.call(e,o)&&"constructor"!=o&&n.push(o);return n}function Je(e){return null!=e&&Te(e.length)&&!R(e)}function We(e){return Je(e)?Ue(e):He(e)}var Ye=function(e,t){return function(r,n){if(null==r)return r;if(!Je(r))return e(r,n);for(var o=r.length,i=t?o:-1,s=Object(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}(function(e,t){return e&&me(e,t,We)}),Ve=Ye;function Ke(e){return e}function Ge(e,t){var r;return(c(e)?pe:Ve)(e,"function"==typeof(r=t)?r:Ke)}var Xe=Array.prototype.reverse;function Ze(e){return null==e?[]:function(e,t){return ie(t,function(t){return e[t]})}(e,We(e))}function Qe(e){return"[object String]"===Object.prototype.toString.call(e)}function et(e){return!(!Qe(e)||""===e)}function tt(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function rt(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 nt(e){return"[object Object]"===Object.prototype.toString.call(e)}function ot(e){return e!=e}function it(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(ot(e))return!1;t=!0}return t}function st(e,t){return!!nt(e)&&(!(!et(t)&&!it(t))&&t in e)}var at=/\s/;var ct=/^\s+/;function ut(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&at.test(e.charAt(t)););return t}(e)+1).replace(ct,""):e}var ft=/^[-+]0x[0-9a-f]+$/i,lt=/^0b[01]+$/i,dt=/^0o[0-7]+$/i,ht=parseInt;function pt(e){if("number"==typeof e)return e;if(S(e))return NaN;if(E(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=E(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ut(e);var r=lt.test(e);return r||dt.test(e)?ht(e.slice(2),r?2:8):ft.test(e)?NaN:+e}var yt=1/0;function mt(e){return e?(e=pt(e))===yt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function gt(e){var t=mt(e),r=t%1;return t==t?r?t-r:t:0}function vt(e,t,r){var n=null==e?0:e.length;return n?function(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}(e,(t=r||void 0===t?1:gt(t))<0?0:t,n):[]}function bt(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function wt(e){return"[object Array]"===Object.prototype.toString.call(e)}function St(e,t){let r=bt();if(!wt(e)&&!nt(e))return r.reject("rs is not an array or object"),r;let n=!1;if(nt(e)){n=!0;let t=[];Ge(e,(e,r)=>{t.push({k:r,v:e})}),e=t}tt(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 s=o,a=r;return n&&(s=r.k,a=r.v),tt(t)?t(a,s):a})},Promise.resolve()).then(function(e){i.push(e),i=vt(i),r.resolve(i)}).catch(function(e){r.reject(e)}),r}function _t(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function Ot(t){return _t(t,{fs:e})}function jt(e){return!0===(t=e)||!1===t||w(t)&&"[object Boolean]"==b(t);var t}function Et(e,t={}){let r=he(t,"fs");return!!r.existsSync(e)&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function Rt(e,t={}){let r=he(t,"fs");if(_t(e,{fs:r}))return{success:"input folder is already exists: "+e};if(r.existsSync(e))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function At(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"useSync","");jt(i)||(i=!0);let s="";return s=i?function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!Et(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};try{Rt(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=he(r,"path"),o=he(r,"fs");if(!Et(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};let i=null;return await(async(e,t)=>{Rt(n.dirname(t),{fs:o}),await new Promise((r,n)=>{let i=o.createReadStream(e),s=o.createWriteStream(t);i.on("error",n),s.on("error",n),s.on("finish",r),i.pipe(s)})})(e,t).then(()=>{i={success:"done: "+t}}).catch(e=>{i={error:e}}),i}(e,t,{path:n,fs:o}),s}function xt(r,n,o={}){return At(r,n,{path:t,fs:e,...o})}function Tt(r){return function(e,t={}){let r=he(t,"path"),n=he(t,"fs");if(!n.existsSync(e)){let t=Rt(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!_t(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 kt(t){return Rt(t,{fs:e})}function Ct(t){return function(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!_t(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}}(t,{fs:e})}function $t(r,n=1){return function(e,t=1,r={}){let n=1,o=he(r,"path"),i=he(r,"fs");if(!_t(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return function e(r){let s=[];return _t(r,{fs:i})?(Ge(i.readdirSync(r),function(a){let c=o.resolve(r,a),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(s.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(s=s.concat(e(c))),n-=1):s.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),s):s}(e)}(r,n,{path:t,fs:e})}function Dt(e){if(!it(e))return 0;return mt(e)}function Nt(t,n={}){return async function(e,t={}){let n=he(t,"fs"),o=he(t,"chunkSize");if(it(o)||(o=67108864),o=Dt(o),!Et(e,{fs:n}))return Promise.reject("fp is not a file");let i=bt();try{let{create64:t}=await r(),s=t(),a=n.createReadStream(e,{highWaterMark:o});a.on("data",e=>{s.update(e)}),a.on("end",()=>{let e=s.digest().toString(16).padStart(16,"0");i.resolve(e)}),a.on("error",i.reject)}catch(e){i.reject(e.toString())}return i}(t,{fs:e,...n})}var Pt=U(l,"DataView"),Mt=U(l,"Promise"),Lt=U(l,"Set"),Ft=U(l,"WeakMap"),Ut="[object Map]",Bt="[object Promise]",qt="[object Set]",It="[object WeakMap]",zt="[object DataView]",Ht=C(Pt),Jt=C(V),Wt=C(Mt),Yt=C(Lt),Vt=C(Ft),Kt=b;(Pt&&Kt(new Pt(new ArrayBuffer(1)))!=zt||V&&Kt(new V)!=Ut||Mt&&Kt(Mt.resolve())!=Bt||Lt&&Kt(new Lt)!=qt||Ft&&Kt(new Ft)!=It)&&(Kt=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?C(r):"";if(n)switch(n){case Ht:return zt;case Jt:return Ut;case Wt:return Bt;case Yt:return qt;case Vt:return It}return t});var Gt=Kt;function Xt(e){return function(t){return null==t?void 0:t[e]}}var Zt=Xt("length"),Qt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var er="\\ud800-\\udfff",tr="["+er+"]",rr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",nr="\\ud83c[\\udffb-\\udfff]",or="[^"+er+"]",ir="(?:\\ud83c[\\udde6-\\uddff]){2}",sr="[\\ud800-\\udbff][\\udc00-\\udfff]",ar="(?:"+rr+"|"+nr+")"+"?",cr="[\\ufe0e\\ufe0f]?",ur=cr+ar+("(?:\\u200d(?:"+[or,ir,sr].join("|")+")"+cr+ar+")*"),fr="(?:"+[or+rr+"?",rr,ir,sr,tr].join("|")+")",lr=RegExp(nr+"(?="+nr+")|"+fr+ur,"g");function dr(e){return function(e){return Qt.test(e)}(e)?function(e){for(var t=lr.lastIndex=0;lr.test(e);)++t;return t}(e):Zt(e)}function hr(e){if(null==e)return 0;if(Je(e))return"string"==typeof(t=e)||!c(t)&&w(t)&&"[object String]"==b(t)?dr(e):e.length;var t,r=Gt(e);return"[object Map]"==r||"[object Set]"==r?e.size:He(e).length}function pr(e){if(nt(e)){for(let t in e)return!0;return!1}return!1}var yr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gr(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 vr={exports:{}};var br,wr={exports:{}},Sr=gr(Object.freeze({__proto__:null,default:{}}));function _r(){return br||(br=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!==yr&&yr.crypto&&(r=yr.crypto),!r)try{r=Sr}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={},s=i.lib={},a=s.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=s.WordArray=a.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||f).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 s=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var a=0;a<o;a+=4)t[n+a>>>2]=r[a>>>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=a.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={},f=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)}},l=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(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},h=s.BufferedBlockAlgorithm=a.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,s=this.blockSize,a=i/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,f=e.min(4*u,i);if(u){for(var l=0;l<u;l+=s)this._doProcessBlock(o,l);r=o.splice(0,u),n.sigBytes-=f}return new c.init(r,f)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=h.extend({cfg:a.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)}(wr)),wr.exports}!function(e){e.exports=_r().enc.Utf8}(vr);var Or=mr(vr.exports),jr={exports:{}};!function(e){var t;e.exports=(t=_r(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=a<<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 s=(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,a=0;a<4&&i+.75*a<r;a++)o.push(n.charAt(s>>>6*(3-a)&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 s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(jr);var Er=mr(jr.exports);function Rr(e){if(!et(e))return"";let t=Or.parse(e);return Er.stringify(t)}function Ar(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function xr(e,t){var r=[];return Ve(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function Tr(e){var t=this.__data__=new Y(e);this.size=t.size}Tr.prototype.clear=function(){this.__data__=new Y,this.size=0},Tr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Tr.prototype.get=function(e){return this.__data__.get(e)},Tr.prototype.has=function(e){return this.__data__.has(e)},Tr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Y){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(e,t),this.size=r.size,this};function kr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new G;++t<r;)this.add(e[t])}function Cr(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 $r(e,t){return e.has(t)}kr.prototype.add=kr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kr.prototype.has=function(e){return this.__data__.has(e)};function Dr(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var l=-1,d=!0,h=2&r?new kr:void 0;for(i.set(e,t),i.set(t,e);++l<a;){var p=e[l],y=t[l];if(n)var m=s?n(y,p,l,t,e,i):n(p,y,l,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!Cr(t,function(e,t){if(!$r(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 Nr=l.Uint8Array;function Pr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Mr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Lr=d?d.prototype:void 0,Fr=Lr?Lr.valueOf:void 0;var Ur=Object.prototype.propertyIsEnumerable,Br=Object.getOwnPropertySymbols,qr=Br?function(e){return null==e?[]:(e=Object(e),Ar(Br(e),function(t){return Ur.call(e,t)}))}:function(){return[]};function Ir(e){return function(e,t,r){var n=t(e);return c(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,We,qr)}var zr=Object.prototype.hasOwnProperty;var Hr="[object Arguments]",Jr="[object Array]",Wr="[object Object]",Yr=Object.prototype.hasOwnProperty;function Vr(e,t,r,n,o,i){var s=c(e),a=c(t),u=s?Jr:Gt(e),f=a?Jr:Gt(t),l=(u=u==Hr?Wr:u)==Wr,d=(f=f==Hr?Wr:f)==Wr,h=u==f;if(h&&Re(e)){if(!Re(t))return!1;s=!0,l=!1}if(h&&!l)return i||(i=new Tr),s||Le(e)?Dr(e,t,r,n,o,i):function(e,t,r,n,o,i,s){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 Nr(e),new Nr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+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 a=Pr;case"[object Set]":var c=1&n;if(a||(a=Mr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var f=Dr(a(e),a(t),n,o,i,s);return s.delete(e),f;case"[object Symbol]":if(Fr)return Fr.call(e)==Fr.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var p=l&&Yr.call(e,"__wrapped__"),y=d&&Yr.call(t,"__wrapped__");if(p||y){var m=p?e.value():e,g=y?t.value():t;return i||(i=new Tr),o(m,g,r,n,i)}}return!!h&&(i||(i=new Tr),function(e,t,r,n,o,i){var s=1&r,a=Ir(e),c=a.length;if(c!=Ir(t).length&&!s)return!1;for(var u=c;u--;){var f=a[u];if(!(s?f in t:zr.call(t,f)))return!1}var l=i.get(e),d=i.get(t);if(l&&d)return l==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=s;++u<c;){var y=e[f=a[u]],m=t[f];if(n)var g=s?n(m,y,f,t,e,i):n(y,m,f,e,t,i);if(!(void 0===g?y===m||o(y,m,r,n,i):g)){h=!1;break}p||(p="constructor"==f)}if(h&&!p){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,n,o,i))}function Kr(e,t,r,n,o){return e===t||(null==e||null==t||!w(e)&&!w(t)?e!=e&&t!=t:Vr(e,t,r,n,Kr,o))}function Gr(e){return e==e&&!E(e)}function Xr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function Zr(e){var t=function(e){for(var t=We(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]?Xr(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var a=r[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var c=(a=r[o])[0],u=e[c],f=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var l=new Tr;if(n)var d=n(u,f,c,e,t,l);if(!(void 0===d?Kr(f,u,3,n,l):d))return!1}}return!0}(r,e,t)}}function Qr(e,t){return null!=e&&t in Object(e)}function en(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=fe(t,e)).length,i=!1;++n<o;){var s=le(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Te(o)&&xe(s,o)&&(c(e)||_e(e))}(e,t,Qr)}function tn(e){return j(e)?Xt(le(e)):function(e){return function(t){return de(t,e)}}(e)}function rn(e){return"function"==typeof e?e:null==e?Ke:"object"==typeof e?c(e)?function(e,t){return j(e)&&Gr(t)?Xr(le(e),t):function(r){var n=he(r,e);return void 0===n&&n===t?en(r,e):Kr(t,n,3)}}(e[0],e[1]):Zr(e):tn(e)}function nn(e,t){return(c(e)?Ar:xr)(e,rn(t))}function on(e,t,r,n={}){let o=he(n,"withInfor");jt(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!et(r))return console.log("invalid key"),o&&(i.infor={}),i;wt(e)||(e=[e]),wt(t)||(t=[t]),e=nn(e,e=>st(e,r)),t=nn(t,e=>st(e,r));let s=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=s.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),s.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(s.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}var sn={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,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.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},a.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,s=new Array(i);o<i;o++)s[o]=n[o].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,o,i,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,f=this._events[a],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(e,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,t),!0;case 3:return f.fn.call(f.context,t,n),!0;case 4:return f.fn.call(f.context,t,n,o),!0;case 5:return f.fn.call(f.context,t,n,o,i),!0;case 6:return f.fn.call(f.context,t,n,o,i,s),!0}for(u=1,c=new Array(l-1);u<l;u++)c[u-1]=arguments[u];f.fn.apply(f.context,c)}else{var d,h=f.length;for(u=0;u<h;u++)switch(f[u].once&&this.removeListener(e,f[u].fn,void 0,!0),l){case 1:f[u].fn.call(f[u].context);break;case 2:f[u].fn.call(f[u].context,t);break;case 3:f[u].fn.call(f[u].context,t,n);break;case 4:f[u].fn.call(f[u].context,t,n,o);break;default:if(!c)for(d=1,c=new Array(l-1);d<l;d++)c[d-1]=arguments[d];f[u].fn.apply(f[u].context,c)}}return!0},a.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||s(this,i);else{for(var c=0,u=[],f=a.length;c<f;c++)(a[c].fn!==t||o&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a}(sn);var an=mr(sn.exports);function cn(){return new an}var un=qe(Object.getPrototypeOf,Object),fn=Function.prototype,ln=Object.prototype,dn=fn.toString,hn=ln.hasOwnProperty,pn=dn.call(Object);function yn(e){if(!w(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(!w(e)||"[object Object]"!=b(e))return!1;var t=un(e);if(null===t)return!0;var r=hn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dn.call(r)==pn}(e)}function mn(e){if(!et(e)&&!it(e)&&!S(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}function gn(e){let t="";if(yn(e))t=e.message;else{if(Qe(e))return e;if(nt(e))return st(e,"message")?e.message:JSON.stringify(e);if(wt(e))return JSON.stringify(e);t=mn(e)}return t}function vn(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!_t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),s=n.resolve(t,r),a=o.lstatSync(i);if(a.isDirectory())Rt(s,{fs:o}),vn(i,s,{path:n,fs:o});else if(a.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,s)}else Rt(n.dirname(s),{fs:o}),o.copyFileSync(i,s)})}catch(e){return{error:e}}return{success:"done: "+t}}function bn(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"useSync","");jt(i)||(i=!0);let s="";return s=i?vn(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!_t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let s of r){let r=n.join(e,s),a=n.join(t,s),c=o.lstatSync(r);if(c.isDirectory())Rt(a,{fs:o}),await i(r,a);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,a)}else Rt(n.dirname(a),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(a);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},s=null;return await i(e,t).then(()=>{s={success:"done: "+t}}).catch(e=>{s={error:e}}),s}(e,t,{path:n,fs:o}),s}function wn(r,n,o={}){return bn(r,n,{path:t,fs:e,...o})}function Sn(e){return"[object Undefined]"===Object.prototype.toString.call(e)}function _n(e){return!!it(e)&&(e=Dt(e),"number"==typeof(t=e)&&t==gt(t));var t}var On=l.isFinite,jn=Math.min;var En=function(e){var t=Math[e];return function(e,r){if(e=pt(e),(r=null==r?0:jn(gt(r),292))&&On(e)){var n=(ue(e)+"e").split("e");return+((n=(ue(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),Rn=En;function An(e){if(!it(e))return 0;e=Dt(e);let t=Rn(e);return"0"===String(t)?0:t}function xn(e){if(!_n(e))return!1;return An(e)>0}function Tn(e=300){return new function(e){let t=[],r=null,n=null;return xn(e)||(e=300),e=An(e),function(o,...i){tt(o)?(n=Date.now(),t.push({func:o,input:i}),null===r&&(r=setInterval(()=>{if(Date.now()-n>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(r),r=null)},10))):console.log("func is not a function")}}(e)}function kn(r,i={}){let s=he(i,"polling");jt(s)||(s=!1);let a=he(i,"timeInterval");xn(a)||(a=100),a=An(a);let c=he(i,"timeBinaryInterval");xn(c)||(c=300),c=An(c);let u=new n.EventEmitter,f=r,l=null,d=setInterval(()=>{null===l&&(Et(f,{fs:e})&&(l=o.watch(f,{usePolling:s,interval:a,binaryInterval:c,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),u.emit("change",{type:e,fp:r,stats:n})})))},a);return u.clear=()=>{(()=>{if(null!==l){try{l.unwatch(f)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(d)},u}function Cn(t,r,n={}){Ot(t)||kt(t),Ot(r)||kt(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,s=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},a=(t,r)=>{try{let n=function(e,t=!1){if(Sn(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>he(s(e),t,""),u=(e,t,r)=>{let n=s(e);n[t]=r,a(e,n)},f=(e,t)=>{let r=s(e);st(r,t)&&delete r[t],a(e,r)},l=()=>s(o),d=e=>a(o,e),h=e=>c(o,e),p=()=>s(i),y=e=>a(i,e),m=e=>c(i,e),g=(e,t)=>u(i,e,t),v=e=>f(i,e),b=e=>{let t=[];return Ge(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=cn();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=>{f(o,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=l,e.writeKp=d,e},buildTar:()=>{let e=cn(),t=Tn(300),r=kn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=bt(),r=l();if(!pr(r))return t.resolve("no src"),t;let n=p(),o=b(r),i=on(b(n),o,"fp",{withInfor:!1}),s=bt();return s.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:s}),t})().catch(()=>{})})}),e.set=g,e.get=m,e.remove=v,e.readKp=p,e.writeKp=y,e.clear=r.clear,e}}}let $n=i.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL($n).href:"undefined"==typeof document?location.href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("w-dwdata-tweqod.umd.js",document.baseURI).href),Dn=t.dirname($n);var Nn={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",a="day",c="week",u="month",f="quarter",l="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=/\[([^\]]+)]|Y{1,4}|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,s=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:l,w:c,d:a,D:d,h:s,m:i,s:o,ms:n,Q:f}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=m;var S="$isDayjsObject",_=function(e){return e instanceof R||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var s=t.split("-");if(!o&&s.length>1)return e(s[0])}else{var a=t.name;w[a]=t,o=a}return!n&&o&&(b=o),o||!n&&b},j=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new R(r)},E=v;E.l=O,E.i=_,E.w=function(e,t){return j(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(E.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 E},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var r=j(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return j(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<j(e)},g.$g=function(e,t,r){return E.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=!!E.u(t)||t,f=E.p(e),h=function(e,t){var o=E.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(a)},p=function(e,t){return E.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(f){case l:return n?h(1,0):h(31,11);case u:return n?h(1,m):h(0,m+1);case c:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return h(n?g-w:g+(6-w),m);case a:case d:return p(v+"Hours",0);case s: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=E.p(e),f="set"+(this.$u?"UTC":""),h=(r={},r[a]=f+"Date",r[d]=f+"Date",r[u]=f+"Month",r[l]=f+"FullYear",r[s]=f+"Hours",r[i]=f+"Minutes",r[o]=f+"Seconds",r[n]=f+"Milliseconds",r)[c],p=c===a?this.$D+(t-this.$W):t;if(c===u||c===l){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[E.p(e)]()},g.add=function(n,f){var d,h=this;n=Number(n);var p=E.p(f),y=function(e){var t=j(h);return E.w(t.date(t.date()+Math.round(e*n)),h)};if(p===u)return this.set(u,this.$M+n);if(p===l)return this.set(l,this.$y+n);if(p===a)return y(1);if(p===c)return y(7);var m=(d={},d[i]=t,d[s]=r,d[o]=e,d)[p]||1,g=this.$d.getTime()+n*m;return E.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=E.z(this),i=this.$H,s=this.$m,a=this.$M,c=r.weekdays,u=r.months,f=r.meridiem,l=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return E.s(i%12||12,e,"0")},p=f||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 E.s(t.$y,4,"0");case"M":return a+1;case"MM":return E.s(a+1,2,"0");case"MMM":return l(r.monthsShort,a,u,3);case"MMMM":return l(u,a);case"D":return t.$D;case"DD":return E.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return l(r.weekdaysMin,t.$W,c,2);case"ddd":return l(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return E.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(i,s,!0);case"A":return p(i,s,!1);case"m":return String(s);case"mm":return E.s(s,2,"0");case"s":return String(t.$s);case"ss":return E.s(t.$s,2,"0");case"SSS":return E.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=E.p(d),g=j(n),v=(g.utcOffset()-this.utcOffset())*t,b=this-g,w=function(){return E.m(y,g)};switch(m){case l:p=w()/12;break;case u:p=w();break;case f:p=w()/3;break;case c:p=(b-v)/6048e5;break;case a:p=(b-v)/864e5;break;case s:p=b/r;break;case i:p=b/t;break;case o:p=b/e;break;default:p=b}return h?p:E.a(p)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return w[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 E.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}(),A=R.prototype;return j.prototype=A,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",a],["$M",u],["$y",l],["$D",d]].forEach(function(e){A[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),j.extend=function(e,t){return e.$i||(e(t,R,j),e.$i=!0),j},j.locale=O,j.isDayjs=_,j.unix=function(e){return j(1e3*e)},j.en=w[b],j.Ls=w,j.p={},j}()}(Nn);var Pn=mr(Nn.exports);let Mn=async(e={})=>{let r=he(e,"keyId");et(r)||(r="id");let n=he(e,"fdDwAttime");et(n)||(n="./_dwAttime"),Ot(n)||kt(n);let o=he(e,"fdDwCurrent");et(o)||(o="./_dwCurrent"),Ot(o)||kt(o);let i=he(e,"fdResult");et(i)||(i="./_result"),Ot(i)||kt(i);let a=he(e,"fdTaskCpSrc");et(a)||(a="./_taskCpSrc"),Ot(a)||kt(a);let c=he(e,"fdLog");et(c)||(c="./_logs"),Ot(c)||kt(c);let u=he(e,"funDownload");if(!tt(u))throw new Error("invalid funDownload");let f=he(e,"funGetCurrent");if(!tt(f))throw new Error("invalid funGetCurrent");let l=he(e,"funAdd");if(!tt(l))throw new Error("invalid funAdd");let d=he(e,"funModify");if(!tt(d))throw new Error("invalid funModify");let h=he(e,"funRemove");if(!tt(h))throw new Error("invalid funRemove");let p=cn(),y=function(e={}){let r=he(e,"fdLog");et(r)||(r="./_logs");let n=he(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let o=s.transport({targets:[{level:"info",target:t.resolve(Dn,"./formatter.mjs"),options:{interval:n,logDir:r}}]});return s(o)}({fdLog:c,interval:"hr"}),m={info:e=>{y.info(e),p.emit("change",{type:"info",...e})},warn:e=>{y.warn(e),p.emit("change",{type:"warn",...e})},error:e=>{y.error(e),p.emit("change",{type:"error",...e})}};return(async()=>{await function(e=10){it(e)||(e=10);let t=bt();return setTimeout(function(){t.resolve()},e),t}(1);let e=Pn(),t=()=>{let t=Pn(),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`}};m.info({event:"start",msg:"running..."});let i="",s=Cn(a,a).buildSrc(),c=[];try{m.info({event:"proc-callfun-download",msg:"start..."});let e=u();rt(e)&&(e=await e),m.info({event:"proc-callfun-download",msg:"done"}),c=e}catch(e){console.log(e),m.error({event:"proc-callfun-download",msg:gn(e)}),i="error at proc-callfun-download"}if(et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});let p=[];try{m.info({event:"proc-callfun-getCurrent",msg:"start..."});let e=f();rt(e)&&(e=await e),m.info({event:"proc-callfun-getCurrent",msg:"done"}),p=e}catch(e){console.log(e),m.error({event:"proc-callfun-getCurrent",msg:gn(e)}),i="error at proc-callfun-getCurrent"}if(et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});if(0===hr(c))return console.log("invalid data, task canceled"),void m.info({event:"cancel",...t(),msg:"can not download data"});if(hr(p)-hr(c)>10)return console.log(`difference between the data before and after is too large, size(itemsCur)[${hr(p)}]-size(itemsAtt)[${hr(c)}]>10`),void m.info({event:"cancel",...t(),msg:"difference between the data before and after is too large"});let y=null;try{m.info({event:"compare",msg:"start..."}),y=on(p,c,r,{withInfor:!1}),m.info({event:"compare",msg:"done"})}catch(e){console.log(e),m.error({event:"compare",msg:gn(e)})}if(!pr(y))return console.log("can not calculate the difference, task canceled"),void m.info({event:"cancel",...t(),msg:"can not calculate the difference between the data before and after"});if(0===hr(y.del)&&0===hr(y.add)&&0===hr(y.diff))return console.log("no difference, task canceled"),void m.info({event:"cancel",...t(),msg:"no difference"});if(await St(y.del,async e=>{if(!et(i)){try{m.info({event:"proc-remove-callfun-remove",[r]:e[r],msg:"start..."});let t=h(e);rt(t)&&(t=await t)}catch(t){console.log(t),m.error({event:"proc-remove-callfun-remove",[r]:e[r],msg:gn(t)}),i="error at proc-remove-callfun-remove"}if(!et(i))try{s.remove(e[r]),m.info({event:"proc-remove-callfun-remove",[r]:e[r],msg:"done"})}catch(t){console.log(t),m.error({event:"proc-remove-otk-remove",[r]:e[r],msg:gn(t)}),i="error at proc-remove-otk-remove"}}}),et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});if(await St(y.add,async e=>{if(!et(i)){try{m.info({event:"proc-add-callfun-add",[r]:e[r],msg:"start..."});let t=l(e);rt(t)&&(t=await t)}catch(t){console.log(t),m.error({event:"proc-add-callfun-add",[r]:e[r],msg:gn(t)}),i="error at proc-add-callfun-add"}if(!et(i))try{let t=Rr(JSON.stringify(e));s.set(e[r],t),m.info({event:"proc-add-callfun-add",[r]:e[r],msg:"done"})}catch(t){console.log(t),m.error({event:"proc-add-otk-set",[r]:e[r],msg:gn(t)}),i="error at proc-add-otk-set"}}}),et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});if(await St(y.diff,async e=>{if(!et(i)){try{m.info({event:"proc-diff-callfun-modify",[r]:e[r],msg:"start..."});let t=d(e);rt(t)&&(t=await t)}catch(t){console.log(t),m.error({event:"proc-diff-callfun-modify",[r]:e[r],msg:gn(t)}),i="error at proc-diff-callfun-modify"}if(!et(i))try{let t=Rr(JSON.stringify(e));s.set(e[r],t),m.info({event:"proc-diff-callfun-modify",[r]:e[r],msg:"done"})}catch(t){console.log(t),m.error({event:"proc-diff-otk-set",[r]:e[r],msg:gn(t)}),i="error at proc-diff-otk-set"}}}),et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});{Tt(o);let e=wn(n,o);if(e.error)return console.log(e.error),m.error({event:"task-update-rawData",msg:e.error}),void(i="error at task-update-rawData")}if(et(i))return console.log("error occurred, task canceled"),void m.info({event:"cancel",...t(),msg:i});m.info({event:"end",...t(),msg:"done"})})().catch(e=>{console.log(e),m.error({event:"proc-core",msg:gn(e)})}),p.srlog=m,p};function Ln(e){return!!Sn(e)||(!!function(e){return"[object Null]"===Object.prototype.toString.call(e)}(e)||(!!function(e){if(nt(e)){for(let t in e)return!1;return!0}return!1}(e)||(!!function(e){return!(!Qe(e)||""!==e)}(e)||(!!function(e){return!!wt(e)&&0===e.length}(e)||!!ot(e)))))}function Fn(e){if(!_n(e))return!1;return An(e)>=0}function Un(e,t){return et(e)&&Fn(t)?0===(t=An(t))?e:function(e,t){if(!et(e))return"";if(!Fn(t))return"";if(0===(t=An(t)))return"";let r=e.length-t;return r<0&&(r=0),e.substring(r,r+t)}(e,e.length-t):""}function Bn(e,t){return function(){return e.apply(t,arguments)}}const{toString:qn}=Object.prototype,{getPrototypeOf:In}=Object,{iterator:zn,toStringTag:Hn}=Symbol,Jn=(e=>t=>{const r=qn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wn=e=>(e=e.toLowerCase(),t=>Jn(t)===e),Yn=e=>t=>typeof t===e,{isArray:Vn}=Array,Kn=Yn("undefined");function Gn(e){return null!==e&&!Kn(e)&&null!==e.constructor&&!Kn(e.constructor)&&Qn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xn=Wn("ArrayBuffer");const Zn=Yn("string"),Qn=Yn("function"),eo=Yn("number"),to=e=>null!==e&&"object"==typeof e,ro=e=>{if("object"!==Jn(e))return!1;const t=In(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Hn in e||zn in e)},no=Wn("Date"),oo=Wn("File"),io=Wn("Blob"),so=Wn("FileList"),ao=Wn("URLSearchParams"),[co,uo,fo,lo]=["ReadableStream","Request","Response","Headers"].map(Wn);function ho(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Vn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Gn(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function po(e,t){if(Gn(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 yo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,mo=e=>!Kn(e)&&e!==yo;const go=(vo="undefined"!=typeof Uint8Array&&In(Uint8Array),e=>vo&&e instanceof vo);var vo;const bo=Wn("HTMLFormElement"),wo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),So=Wn("RegExp"),_o=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ho(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const Oo=Wn("AsyncFunction"),jo=(Eo="function"==typeof setImmediate,Ro=Qn(yo.postMessage),Eo?setImmediate:Ro?(Ao=`axios@${Math.random()}`,xo=[],yo.addEventListener("message",({source:e,data:t})=>{e===yo&&t===Ao&&xo.length&&xo.shift()()},!1),e=>{xo.push(e),yo.postMessage(Ao,"*")}):e=>setTimeout(e));var Eo,Ro,Ao,xo;const To="undefined"!=typeof queueMicrotask?queueMicrotask.bind(yo):"undefined"!=typeof process&&process.nextTick||jo;var ko={isArray:Vn,isArrayBuffer:Xn,isBuffer:Gn,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Qn(e.append)&&("formdata"===(t=Jn(e))||"object"===t&&Qn(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Xn(e.buffer),t},isString:Zn,isNumber:eo,isBoolean:e=>!0===e||!1===e,isObject:to,isPlainObject:ro,isEmptyObject:e=>{if(!to(e)||Gn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:co,isRequest:uo,isResponse:fo,isHeaders:lo,isUndefined:Kn,isDate:no,isFile:oo,isBlob:io,isRegExp:So,isFunction:Qn,isStream:e=>to(e)&&Qn(e.pipe),isURLSearchParams:ao,isTypedArray:go,isFileList:so,forEach:ho,merge:function e(){const{caseless:t}=mo(this)&&this||{},r={},n=(n,o)=>{const i=t&&po(r,o)||o;ro(r[i])&&ro(n)?r[i]=e(r[i],n):ro(n)?r[i]=e({},n):Vn(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&ho(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(ho(t,(t,n)=>{r&&Qn(t)?e[n]=Bn(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,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&In(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Jn,kindOfTest:Wn,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(Vn(e))return e;let t=e.length;if(!eo(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[zn]).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:bo,hasOwnProperty:wo,hasOwnProp:wo,reduceDescriptors:_o,freezeMethods:e=>{_o(e,(t,r)=>{if(Qn(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Qn(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 Vn(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:po,global:yo,isContextDefined:mo,isSpecCompliantForm:function(e){return!!(e&&Qn(e.append)&&"FormData"===e[Hn]&&e[zn])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(to(e)){if(t.indexOf(e)>=0)return;if(Gn(e))return e;if(!("toJSON"in e)){t[n]=e;const o=Vn(e)?[]:{};return ho(e,(e,t)=>{const i=r(e,n+1);!Kn(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Oo,isThenable:e=>e&&(to(e)||Qn(e))&&Qn(e.then)&&Qn(e.catch),setImmediate:jo,asap:To,isIterable:e=>null!=e&&Qn(e[zn])};function Co(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)}ko.inherits(Co,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:ko.toJSONObject(this.config),code:this.code,status:this.status}}});const $o=Co.prototype,Do={};["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=>{Do[e]={value:e}}),Object.defineProperties(Co,Do),Object.defineProperty($o,"isAxiosError",{value:!0}),Co.from=(e,t,r,n,o,i)=>{const s=Object.create($o);return ko.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Co.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function No(e){return ko.isPlainObject(e)||ko.isArray(e)}function Po(e){return ko.endsWith(e,"[]")?e.slice(0,-2):e}function Mo(e,t,r){return e?e.concat(t).map(function(e,t){return e=Po(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Lo=ko.toFlatObject(ko,{},null,function(e){return/^is[A-Z]/.test(e)});function Fo(e,t,r){if(!ko.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=ko.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ko.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ko.isSpecCompliantForm(t);if(!ko.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ko.isDate(e))return e.toISOString();if(ko.isBoolean(e))return e.toString();if(!a&&ko.isBlob(e))throw new Co("Blob is not supported. Use a Buffer instead.");return ko.isArrayBuffer(e)||ko.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(ko.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ko.isArray(e)&&function(e){return ko.isArray(e)&&!e.some(No)}(e)||(ko.isFileList(e)||ko.endsWith(r,"[]"))&&(a=ko.toArray(e)))return r=Po(r),a.forEach(function(e,n){!ko.isUndefined(e)&&null!==e&&t.append(!0===s?Mo([r],n,i):null===s?r:r+"[]",c(e))}),!1;return!!No(e)||(t.append(Mo(o,r,i),c(e)),!1)}const f=[],l=Object.assign(Lo,{defaultVisitor:u,convertValue:c,isVisitable:No});if(!ko.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ko.isUndefined(r)){if(-1!==f.indexOf(r))throw Error("Circular reference detected in "+n.join("."));f.push(r),ko.forEach(r,function(r,i){!0===(!(ko.isUndefined(r)||null===r)&&o.call(t,r,ko.isString(i)?i.trim():i,n,l))&&e(r,n?n.concat(i):[i])}),f.pop()}}(e),t}function Uo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Bo(e,t){this._pairs=[],e&&Fo(e,this,t)}const qo=Bo.prototype;function Io(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zo(e,t,r){if(!t)return e;const n=r&&r.encode||Io;ko.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):ko.isURLSearchParams(t)?t.toString():new Bo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}qo.append=function(e,t){this._pairs.push([e,t])},qo.toString=function(e){const t=e?function(t){return e.call(this,t,Uo)}:Uo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Ho=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){ko.forEach(this.handlers,function(t){null!==t&&e(t)})}},Jo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Wo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Bo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Yo="undefined"!=typeof window&&"undefined"!=typeof document,Vo="object"==typeof navigator&&navigator||void 0,Ko=Yo&&(!Vo||["ReactNative","NativeScript","NS"].indexOf(Vo.product)<0),Go="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Xo=Yo&&window.location.href||"http://localhost";var Zo={...Object.freeze({__proto__:null,hasBrowserEnv:Yo,hasStandardBrowserEnv:Ko,hasStandardBrowserWebWorkerEnv:Go,navigator:Vo,origin:Xo}),...Wo};function Qo(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&ko.isArray(n)?n.length:i,a)return ko.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s;n[i]&&ko.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&ko.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])),!s}if(ko.isFormData(e)&&ko.isFunction(e.entries)){const r={};return ko.forEachEntry(e,(e,n)=>{t(function(e){return ko.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ei={transitional:Jo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=ko.isObject(e);o&&ko.isHTMLForm(e)&&(e=new FormData(e));if(ko.isFormData(e))return n?JSON.stringify(Qo(e)):e;if(ko.isArrayBuffer(e)||ko.isBuffer(e)||ko.isStream(e)||ko.isFile(e)||ko.isBlob(e)||ko.isReadableStream(e))return e;if(ko.isArrayBufferView(e))return e.buffer;if(ko.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 Fo(e,new Zo.classes.URLSearchParams,{visitor:function(e,t,r,n){return Zo.isNode&&ko.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=ko.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Fo(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(ko.isString(e))try{return(t||JSON.parse)(e),ko.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ei.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ko.isResponse(e)||ko.isReadableStream(e))return e;if(e&&ko.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Co.from(e,Co.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:Zo.classes.FormData,Blob:Zo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ko.forEach(["delete","get","head","post","put","patch"],e=>{ei.headers[e]={}});var ti=ei;const ri=ko.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 ni=Symbol("internals");function oi(e){return e&&String(e).trim().toLowerCase()}function ii(e){return!1===e||null==e?e:ko.isArray(e)?e.map(ii):String(e)}function si(e,t,r,n,o){return ko.isFunction(n)?n.call(this,t,r):(o&&(t=r),ko.isString(t)?ko.isString(n)?-1!==t.indexOf(n):ko.isRegExp(n)?n.test(t):void 0:void 0)}class ai{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=oi(t);if(!o)throw new Error("header name must be a non-empty string");const i=ko.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=ii(e))}const i=(e,t)=>ko.forEach(e,(e,r)=>o(e,r,t));if(ko.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ko.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]&&ri[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(ko.isObject(e)&&ko.isIterable(e)){let r,n,o={};for(const t of e){if(!ko.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?ko.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=oi(e)){const r=ko.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(ko.isFunction(t))return t.call(this,e,r);if(ko.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=oi(e)){const r=ko.findKey(this,e);return!(!r||void 0===this[r]||t&&!si(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=oi(e)){const o=ko.findKey(r,e);!o||t&&!si(0,r[o],o,t)||(delete r[o],n=!0)}}return ko.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&&!si(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return ko.forEach(this,(n,o)=>{const i=ko.findKey(r,o);if(i)return t[i]=ii(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();s!==o&&delete t[o],t[s]=ii(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ko.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ko.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[ni]=this[ni]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=oi(e);t[n]||(!function(e,t){const r=ko.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 ko.isArray(e)?e.forEach(n):n(e),this}}ai.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ko.reduceDescriptors(ai.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),ko.freezeMethods(ai);var ci=ai;function ui(e,t){const r=this||ti,n=t||r,o=ci.from(n.headers);let i=n.data;return ko.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function fi(e){return!(!e||!e.__CANCEL__)}function li(e,t,r){Co.call(this,null==e?"canceled":e,Co.ERR_CANCELED,t,r),this.name="CanceledError"}function di(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Co("Request failed with status code "+r.status,[Co.ERR_BAD_REQUEST,Co.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}ko.inherits(li,Co,{__CANCEL__:!0});const hi=(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,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[s];o||(o=c),r[i]=a,n[i]=c;let f=s,l=0;for(;f!==i;)l+=r[f++],f%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*l/d):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},i-a)))},()=>r&&s(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},pi=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},yi=e=>(...t)=>ko.asap(()=>e(...t));var mi=Zo.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Zo.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Zo.origin),Zo.navigator&&/(msie|trident)/i.test(Zo.navigator.userAgent)):()=>!0,gi=Zo.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];ko.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),ko.isString(n)&&s.push("path="+n),ko.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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 vi(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 bi=e=>e instanceof ci?{...e}:e;function wi(e,t){t=t||{};const r={};function n(e,t,r,n){return ko.isPlainObject(e)&&ko.isPlainObject(t)?ko.merge.call({caseless:n},e,t):ko.isPlainObject(t)?ko.merge({},t):ko.isArray(t)?t.slice():t}function o(e,t,r,o){return ko.isUndefined(t)?ko.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!ko.isUndefined(t))return n(void 0,t)}function s(e,t){return ko.isUndefined(t)?ko.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(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:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(bi(e),bi(t),0,!0)};return ko.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,s=i(e[n],t[n],n);ko.isUndefined(s)&&i!==a||(r[n]=s)}),r}var Si=e=>{const t=wi({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=ci.from(a),t.url=zo(vi(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ko.isFormData(n))if(Zo.hasStandardBrowserEnv||Zo.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Zo.hasStandardBrowserEnv&&(o&&ko.isFunction(o)&&(o=o(t)),o||!1!==o&&mi(t.url))){const e=i&&s&&gi.read(s);e&&a.set(i,e)}return t};var _i="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Si(e);let o=n.data;const i=ci.from(n.headers).normalize();let s,a,c,u,f,{responseType:l,onUploadProgress:d,onDownloadProgress:h}=n;function p(){u&&u(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=ci.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());di(function(e){t(e),p()},function(e){r(e),p()},{data:l&&"text"!==l&&"json"!==l?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 Co("Request aborted",Co.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Co("Network Error",Co.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Jo;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Co(t,o.clarifyTimeoutError?Co.ETIMEDOUT:Co.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&ko.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),ko.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),l&&"json"!==l&&(y.responseType=n.responseType),h&&([c,f]=hi(h,!0),y.addEventListener("progress",c)),d&&y.upload&&([a,u]=hi(d),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(s=t=>{y&&(r(!t||t.type?new li(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===Zo.protocols.indexOf(g)?r(new Co("Unsupported protocol "+g+":",Co.ERR_BAD_REQUEST,e)):y.send(o||null)})};var Oi=(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,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Co?t:new li(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Co(`timeout ${t} of ms exceeded`,Co.ETIMEDOUT))},t);const s=()=>{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:a}=n;return a.unsubscribe=()=>ko.asap(s),a}};const ji=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},Ei=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()}},Ri=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Ei(e))yield*ji(r,t)}(e,t);let i,s=0,a=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 a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Ai="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,xi=Ai&&"function"==typeof ReadableStream,Ti=Ai&&("function"==typeof TextEncoder?(ki=new TextEncoder,e=>ki.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var ki;const Ci=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},$i=xi&&Ci(()=>{let e=!1;const t=new Request(Zo.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Di=xi&&Ci(()=>ko.isReadableStream(new Response("").body)),Ni={stream:Di&&(e=>e.body)};var Pi;Ai&&(Pi=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ni[e]&&(Ni[e]=ko.isFunction(Pi[e])?t=>t[e]():(t,r)=>{throw new Co(`Response type '${e}' is not supported`,Co.ERR_NOT_SUPPORT,r)})}));const Mi=async(e,t)=>{const r=ko.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(ko.isBlob(e))return e.size;if(ko.isSpecCompliantForm(e)){const t=new Request(Zo.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ko.isArrayBufferView(e)||ko.isArrayBuffer(e)?e.byteLength:(ko.isURLSearchParams(e)&&(e+=""),ko.isString(e)?(await Ti(e)).byteLength:void 0)})(t):r};var Li=Ai&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:d}=Si(e);u=u?(u+"").toLowerCase():"text";let h,p=Oi([o,i&&i.toAbortSignal()],s);const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&$i&&"get"!==r&&"head"!==r&&0!==(m=await Mi(f,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(ko.isFormData(n)&&(e=r.headers.get("content-type"))&&f.setContentType(e),r.body){const[e,t]=pi(m,hi(yi(c)));n=Ri(r.body,65536,e,t)}}ko.isString(l)||(l=l?"include":"omit");const o="credentials"in Request.prototype;h=new Request(t,{...d,signal:p,method:r.toUpperCase(),headers:f.normalize().toJSON(),body:n,duplex:"half",credentials:o?l:void 0});let i=await fetch(h,d);const s=Di&&("stream"===u||"response"===u);if(Di&&(a||s&&y)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=ko.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&pi(t,hi(yi(a),!0))||[];i=new Response(Ri(i.body,65536,r,()=>{n&&n(),y&&y()}),e)}u=u||"text";let g=await Ni[ko.findKey(Ni,u)||"text"](i,e);return!s&&y&&y(),await new Promise((t,r)=>{di(t,r,{data:g,headers:ci.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:h})})}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Co("Network Error",Co.ERR_NETWORK,e,h),{cause:t.cause||t});throw Co.from(t,t&&t.code,e,h)}});const Fi={http:null,xhr:_i,fetch:Li};ko.forEach(Fi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ui=e=>`- ${e}`,Bi=e=>ko.isFunction(e)||null===e||!1===e;var qi=e=>{e=ko.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!Bi(r)&&(n=Fi[(t=String(r)).toLowerCase()],void 0===n))throw new Co(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Co("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ui).join("\n"):" "+Ui(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ii(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new li(null,e)}function zi(e){Ii(e),e.headers=ci.from(e.headers),e.data=ui.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return qi(e.adapter||ti.adapter)(e).then(function(t){return Ii(e),t.data=ui.call(e,e.transformResponse,t),t.headers=ci.from(t.headers),t},function(t){return fi(t)||(Ii(e),t&&t.response&&(t.response.data=ui.call(e,e.transformResponse,t.response),t.response.headers=ci.from(t.response.headers))),Promise.reject(t)})}const Hi="1.11.0",Ji={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ji[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wi={};Ji.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Hi+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Co(n(o," has been removed"+(t?" in "+t:"")),Co.ERR_DEPRECATED);return t&&!Wi[o]&&(Wi[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 Yi={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Co("options must be an object",Co.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new Co("option "+i+" must be "+r,Co.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Co("Unknown option "+i,Co.ERR_BAD_OPTION)}},validators:Ji};const Vi=Yi.validators;class Ki{constructor(e){this.defaults=e||{},this.interceptors={request:new Ho,response:new Ho}}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=wi(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Yi.assertOptions(r,{silentJSONParsing:Vi.transitional(Vi.boolean),forcedJSONParsing:Vi.transitional(Vi.boolean),clarifyTimeoutError:Vi.transitional(Vi.boolean)},!1),null!=n&&(ko.isFunction(n)?t.paramsSerializer={serialize:n}:Yi.assertOptions(n,{encode:Vi.function,serialize:Vi.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Yi.assertOptions(t,{baseUrl:Vi.spelling("baseURL"),withXsrfToken:Vi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&ko.merge(o.common,o[t.method]);o&&ko.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ci.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let f,l=0;if(!a){const e=[zi.bind(this),void 0];for(e.unshift(...s),e.push(...c),f=e.length,u=Promise.resolve(t);l<f;)u=u.then(e[l++],e[l++]);return u}f=s.length;let d=t;for(l=0;l<f;){const e=s[l++],t=s[l++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=zi.call(this,d)}catch(e){return Promise.reject(e)}for(l=0,f=c.length;l<f;)u=u.then(c[l++],c[l++]);return u}getUri(e){return zo(vi((e=wi(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}ko.forEach(["delete","get","head","options"],function(e){Ki.prototype[e]=function(t,r){return this.request(wi(r||{},{method:e,url:t,data:(r||{}).data}))}}),ko.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(wi(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ki.prototype[e]=t(),Ki.prototype[e+"Form"]=t(!0)});var Gi=Ki;class Xi{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 li(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 Xi(function(t){e=t}),cancel:e}}}var Zi=Xi;const Qi={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(Qi).forEach(([e,t])=>{Qi[t]=e});var es=Qi;const ts=function e(t){const r=new Gi(t),n=Bn(Gi.prototype.request,r);return ko.extend(n,Gi.prototype,r,{allOwnKeys:!0}),ko.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(wi(t,r))},n}(ti);ts.Axios=Gi,ts.CanceledError=li,ts.CancelToken=Zi,ts.isCancel=fi,ts.VERSION=Hi,ts.toFormData=Fo,ts.AxiosError=Co,ts.Cancel=ts.CanceledError,ts.all=function(e){return Promise.all(e)},ts.spread=function(e){return function(t){return e.apply(null,t)}},ts.isAxiosError=function(e){return ko.isObject(e)&&!0===e.isAxiosError},ts.mergeConfig=wi,ts.AxiosHeaders=ci,ts.formToJSON=e=>Qo(ko.isHTMLForm(e)?new FormData(e):e),ts.getAdapter=qi,ts.HttpStatusCode=es,ts.default=ts;var rs=ts;let ns=async e=>{let t=null,r=await rs.get(`https://opendata.cwa.gov.tw/api/v1/rest/datastore/E-A0015-001?Authorization=${e}`).catch(e=>{t=e});if(null!==t)return;let n=[...he(r,"data.records.earthquake",[]),...he(r,"data.records.Earthquake",[])];if(!wt(o=n)||0===o.length||1===o.length&&Ln(o[0]))throw console.log("rEqsL",r),new Error("無法取得顯著有感地震之earthquake數據");var o;let i=[];return Ge(n,e=>{let t=he(e,"earthquakeInfo.originTime",""),r=he(e,"EarthquakeInfo.OriginTime",""),n=t||r;if(!et(n))throw console.log("v",e),new Error(`無法取得originTime[${n}]`);let o=he(e,"earthquakeInfo.magnitude.magnitudeType",""),s=he(e,"EarthquakeInfo.EarthquakeMagnitude.MagnitudeType",""),a=o||s;if(!et(a))throw console.log("v",e),new Error(`無法取得magnitudeType[${a}]`);let c=he(e,"earthquakeInfo.magnitude.magnitudeValue",""),u=he(e,"EarthquakeInfo.EarthquakeMagnitude.MagnitudeValue",""),f=c||u;if(!it(f))throw console.log("v",e),new Error(`無法取得magnitudeValue[${f}]`);let l=he(e,"ReportContent",""),d=f;d=mn(d);let h=Pn(n),p=he(e,"EarthquakeNo","");p=mn(p);let y=Un(p,3),m=n,g=h.format("YYYY-MM-DDTHH:mm:ssZ"),v=h.format("YYYYMMDDHHmmss"),b=he(e,"EarthquakeInfo.FocalDepth","");b=mn(b);let w=he(e,"EarthquakeInfo.Epicenter.Location",""),S=he(e,"EarthquakeInfo.Epicenter.EpicenterLongitude","");S=mn(S);let _=he(e,"EarthquakeInfo.Epicenter.EpicenterLatitude","");_=mn(_);let O={id:p,tag:"",number:y,time:g,timeRec:m,timeTag:v,ml:d,depth:b,description:l,location:w,intensity:"",longitude:S,latitude:_,data:e};i.push(O)}),i};return async(t,r={})=>{let n=he(r,"fdDwStorage");et(n)||(n="./_dwStorage"),Ot(n)||kt(n);let o=he(r,"fdDwAttime");et(o)||(o="./_dwAttime"),Ot(o)||kt(o);let i=he(r,"fdDwCurrent");et(i)||(i="./_dwCurrent"),Ot(i)||kt(i);let s=he(r,"fdResult");et(s)||(s="./_result"),Ot(s)||kt(s);let a=he(r,"fdTaskCpSrc");et(a)||(a="./_taskCpSrc"),Ot(a)||kt(a);let c=he(r,"fdLog");et(c)||(c="./_logs"),Ot(c)||kt(c);let u=he(r,"funDownloadEqs"),f=he(r,"funDownload"),l=he(r,"funGetCurrent"),d=he(r,"funAdd"),h=he(r,"funModify"),p=he(r,"funRemove"),y=async()=>{let r=[];var s;tt(u)?(r=u(),rt(r)&&(r=await r)):r=await ns(t),r=null==(s=r)?s:Xe.call(s),Tt(o),wn(i,o);let a=(t=>{let r=$t(t,1),n=[];return Ge(r,t=>{let r=e.readFileSync(t.path,"utf8"),o=JSON.parse(r);n.push(o)}),n})(o),c={};return Ge(a,e=>{c[e.id]=e}),await St(r,async t=>{let r=`${n}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8");let i=await Nt(r);if(st(c,t.id)){if(i!==c[t.id].hash){c[t.id].hash=i;let r=`${o}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(c[t.id]),"utf8")}}else{c[t.id]={id:t.id,hash:i};let r=`${o}/${t.id}.json`;e.writeFileSync(r,JSON.stringify(c[t.id]),"utf8")}}),Ze(c)};tt(f)||(f=y);let m=async()=>{let t=$t(i,1),r=[];return Ge(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};tt(l)||(l=m);let g=async e=>{let t=`${s}/${e.id}`;Ot(t)&&Ct(t)};tt(p)||(p=g);let v=async e=>{let t=`${s}/${e.id}`;Ot(t)||kt(t),Tt(t),xt(`${n}/${e.id}.json`,`${t}/${e.id}.json`)};tt(d)||(d=v);let b=async e=>{let t=`${s}/${e.id}`;Ot(t)||kt(t),Tt(t),xt(`${n}/${e.id}.json`,`${t}/${e.id}.json`)};tt(h)||(h=b);let w={fdDwAttime:o,fdDwCurrent:i,fdResult:s,fdTaskCpSrc:a,fdLog:c,funDownload:f,funGetCurrent:l,funRemove:p,funAdd:d,funModify:h};return await Mn(w)}});
7
7
  //# sourceMappingURL=w-dwdata-tweqod.umd.js.map