dphelper 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dphelper.umd.js +4 -4
- package/index.js +3 -3
- package/package.json +3 -2
package/dphelper.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var mr=Object.create;var jt=Object.defineProperty;var vr=Object.getOwnPropertyDescriptor;var br=Object.getOwnPropertyNames;var gr=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty;var Lt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Dr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of br(t))!yr.call(e,o)&&o!==r&&jt(e,o,{get:()=>t[o],enumerable:!(n=vr(t,o))||n.enumerable});return e};var Cr=(e,t,r)=>(r=e!=null?mr(gr(e)):{},Dr(t||!e||!e.__esModule?jt(r,"default",{value:e,enumerable:!0}):r,e));var Ut=R(()=>{});var z=R((Me,Gt)=>{(function(e,t){typeof Me=="object"?Gt.exports=Me=t():typeof define=="function"&&define.amd?define([],t):e.CryptoJS=t()})(Me,function(){var e=e||(function(t,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof Lt=="function")try{n=Ut()}catch{}var o=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||(function(){function u(){}return function(p){var y;return u.prototype=p,y=new u,u.prototype=null,y}})(),c={},a=c.lib={},s=a.Base=(function(){return{extend:function(u){var p=i(this);return u&&p.mixIn(u),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},create:function(){var u=this.extend();return u.init.apply(u,arguments),u},init:function(){},mixIn:function(u){for(var p in u)u.hasOwnProperty(p)&&(this[p]=u[p]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),f=a.WordArray=s.extend({init:function(u,p){u=this.words=u||[],p!=r?this.sigBytes=p:this.sigBytes=u.length*4},toString:function(u){return(u||x).stringify(this)},concat:function(u){var p=this.words,y=u.words,g=this.sigBytes,D=u.sigBytes;if(this.clamp(),g%4)for(var C=0;C<D;C++){var M=y[C>>>2]>>>24-C%4*8&255;p[g+C>>>2]|=M<<24-(g+C)%4*8}else for(var k=0;k<D;k+=4)p[g+k>>>2]=y[k>>>2];return this.sigBytes+=D,this},clamp:function(){var u=this.words,p=this.sigBytes;u[p>>>2]&=4294967295<<32-p%4*8,u.length=t.ceil(p/4)},clone:function(){var u=s.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var p=[],y=0;y<u;y+=4)p.push(o());return new f.init(p,u)}}),l=c.enc={},x=l.Hex={stringify:function(u){for(var p=u.words,y=u.sigBytes,g=[],D=0;D<y;D++){var C=p[D>>>2]>>>24-D%4*8&255;g.push((C>>>4).toString(16)),g.push((C&15).toString(16))}return g.join("")},parse:function(u){for(var p=u.length,y=[],g=0;g<p;g+=2)y[g>>>3]|=parseInt(u.substr(g,2),16)<<24-g%8*4;return new f.init(y,p/2)}},d=l.Latin1={stringify:function(u){for(var p=u.words,y=u.sigBytes,g=[],D=0;D<y;D++){var C=p[D>>>2]>>>24-D%4*8&255;g.push(String.fromCharCode(C))}return g.join("")},parse:function(u){for(var p=u.length,y=[],g=0;g<p;g++)y[g>>>2]|=(u.charCodeAt(g)&255)<<24-g%4*8;return new f.init(y,p)}},m=l.Utf8={stringify:function(u){try{return decodeURIComponent(escape(d.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(u){return d.parse(unescape(encodeURIComponent(u)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=m.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var p,y=this._data,g=y.words,D=y.sigBytes,C=this.blockSize,M=C*4,k=D/M;u?k=t.ceil(k):k=t.max((k|0)-this._minBufferSize,0);var P=k*C,q=t.min(P*4,D);if(P){for(var E=0;E<P;E+=C)this._doProcessBlock(g,E);p=g.splice(0,P),y.sigBytes-=q}return new f.init(p,q)},clone:function(){var u=s.clone.call(this);return u._data=this._data.clone(),u},_minBufferSize:0}),v=a.Hasher=h.extend({cfg:s.extend(),init:function(u){this.cfg=this.cfg.extend(u),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(u){return this._append(u),this._process(),this},finalize:function(u){u&&this._append(u);var p=this._doFinalize();return p},blockSize:512/32,_createHelper:function(u){return function(p,y){return new u.init(y).finalize(p)}},_createHmacHelper:function(u){return function(p,y){return new b.HMAC.init(u,y).finalize(p)}}}),b=c.algo={};return c})(Math);return e})});var Ce=R((Pe,Yt)=>{(function(e,t){typeof Pe=="object"?Yt.exports=Pe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Pe,function(e){return(function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,c=r.x64={},a=c.Word=o.extend({init:function(f,l){this.high=f,this.low=l}}),s=c.WordArray=o.extend({init:function(f,l){f=this.words=f||[],l!=t?this.sigBytes=l:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,l=f.length,x=[],d=0;d<l;d++){var m=f[d];x.push(m.high),x.push(m.low)}return i.create(x,this.sigBytes)},clone:function(){for(var f=o.clone.call(this),l=f.words=this.words.slice(0),x=l.length,d=0;d<x;d++)l[d]=l[d].clone();return f}})})(),e})});var Kt=R((Te,Jt)=>{(function(e,t){typeof Te=="object"?Jt.exports=Te=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Te,function(e){return(function(){if(typeof ArrayBuffer=="function"){var t=e,r=t.lib,n=r.WordArray,o=n.init,i=n.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray<"u"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var a=c.byteLength,s=[],f=0;f<a;f++)s[f>>>2]|=c[f]<<24-f%4*8;o.call(this,s,a)}else o.apply(this,arguments)};i.prototype=n}})(),e.lib.WordArray})});var Xt=R((qe,Zt)=>{(function(e,t){typeof qe=="object"?Zt.exports=qe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(qe,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Utf16=o.Utf16BE={stringify:function(a){for(var s=a.words,f=a.sigBytes,l=[],x=0;x<f;x+=2){var d=s[x>>>2]>>>16-x%4*8&65535;l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,f=[],l=0;l<s;l++)f[l>>>1]|=a.charCodeAt(l)<<16-l%2*16;return n.create(f,s*2)}};o.Utf16LE={stringify:function(a){for(var s=a.words,f=a.sigBytes,l=[],x=0;x<f;x+=2){var d=c(s[x>>>2]>>>16-x%4*8&65535);l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,f=[],l=0;l<s;l++)f[l>>>1]|=c(a.charCodeAt(l)<<16-l%2*16);return n.create(f,s*2)}};function c(a){return a<<8&4278255360|a>>>8&16711935}})(),e.enc.Utf16})});var re=R((He,Vt)=>{(function(e,t){typeof He=="object"?Vt.exports=He=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(He,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Base64={stringify:function(a){var s=a.words,f=a.sigBytes,l=this._map;a.clamp();for(var x=[],d=0;d<f;d+=3)for(var m=s[d>>>2]>>>24-d%4*8&255,h=s[d+1>>>2]>>>24-(d+1)%4*8&255,v=s[d+2>>>2]>>>24-(d+2)%4*8&255,b=m<<16|h<<8|v,u=0;u<4&&d+u*.75<f;u++)x.push(l.charAt(b>>>6*(3-u)&63));var p=l.charAt(64);if(p)for(;x.length%4;)x.push(p);return x.join("")},parse:function(a){var s=a.length,f=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var x=0;x<f.length;x++)l[f.charCodeAt(x)]=x}var d=f.charAt(64);if(d){var m=a.indexOf(d);m!==-1&&(s=m)}return c(a,s,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(a,s,f){for(var l=[],x=0,d=0;d<s;d++)if(d%4){var m=f[a.charCodeAt(d-1)]<<d%4*2,h=f[a.charCodeAt(d)]>>>6-d%4*2,v=m|h;l[x>>>2]|=v<<24-x%4*8,x++}return n.create(l,x)}})(),e.enc.Base64})});var e0=R((Oe,Qt)=>{(function(e,t){typeof Oe=="object"?Qt.exports=Oe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Oe,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Base64url={stringify:function(a,s){s===void 0&&(s=!0);var f=a.words,l=a.sigBytes,x=s?this._safe_map:this._map;a.clamp();for(var d=[],m=0;m<l;m+=3)for(var h=f[m>>>2]>>>24-m%4*8&255,v=f[m+1>>>2]>>>24-(m+1)%4*8&255,b=f[m+2>>>2]>>>24-(m+2)%4*8&255,u=h<<16|v<<8|b,p=0;p<4&&m+p*.75<l;p++)d.push(x.charAt(u>>>6*(3-p)&63));var y=x.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(a,s){s===void 0&&(s=!0);var f=a.length,l=s?this._safe_map:this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var d=0;d<l.length;d++)x[l.charCodeAt(d)]=d}var m=l.charAt(64);if(m){var h=a.indexOf(m);h!==-1&&(f=h)}return c(a,f,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(a,s,f){for(var l=[],x=0,d=0;d<s;d++)if(d%4){var m=f[a.charCodeAt(d-1)]<<d%4*2,h=f[a.charCodeAt(d)]>>>6-d%4*2,v=m|h;l[x>>>2]|=v<<24-x%4*8,x++}return n.create(l,x)}})(),e.enc.Base64url})});var ne=R((je,t0)=>{(function(e,t){typeof je=="object"?t0.exports=je=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(je,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=[];(function(){for(var m=0;m<64;m++)a[m]=t.abs(t.sin(m+1))*4294967296|0})();var s=c.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,h){for(var v=0;v<16;v++){var b=h+v,u=m[b];m[b]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var p=this._hash.words,y=m[h+0],g=m[h+1],D=m[h+2],C=m[h+3],M=m[h+4],k=m[h+5],P=m[h+6],q=m[h+7],E=m[h+8],_=m[h+9],T=m[h+10],F=m[h+11],O=m[h+12],H=m[h+13],j=m[h+14],N=m[h+15],A=p[0],w=p[1],S=p[2],B=p[3];A=f(A,w,S,B,y,7,a[0]),B=f(B,A,w,S,g,12,a[1]),S=f(S,B,A,w,D,17,a[2]),w=f(w,S,B,A,C,22,a[3]),A=f(A,w,S,B,M,7,a[4]),B=f(B,A,w,S,k,12,a[5]),S=f(S,B,A,w,P,17,a[6]),w=f(w,S,B,A,q,22,a[7]),A=f(A,w,S,B,E,7,a[8]),B=f(B,A,w,S,_,12,a[9]),S=f(S,B,A,w,T,17,a[10]),w=f(w,S,B,A,F,22,a[11]),A=f(A,w,S,B,O,7,a[12]),B=f(B,A,w,S,H,12,a[13]),S=f(S,B,A,w,j,17,a[14]),w=f(w,S,B,A,N,22,a[15]),A=l(A,w,S,B,g,5,a[16]),B=l(B,A,w,S,P,9,a[17]),S=l(S,B,A,w,F,14,a[18]),w=l(w,S,B,A,y,20,a[19]),A=l(A,w,S,B,k,5,a[20]),B=l(B,A,w,S,T,9,a[21]),S=l(S,B,A,w,N,14,a[22]),w=l(w,S,B,A,M,20,a[23]),A=l(A,w,S,B,_,5,a[24]),B=l(B,A,w,S,j,9,a[25]),S=l(S,B,A,w,C,14,a[26]),w=l(w,S,B,A,E,20,a[27]),A=l(A,w,S,B,H,5,a[28]),B=l(B,A,w,S,D,9,a[29]),S=l(S,B,A,w,q,14,a[30]),w=l(w,S,B,A,O,20,a[31]),A=x(A,w,S,B,k,4,a[32]),B=x(B,A,w,S,E,11,a[33]),S=x(S,B,A,w,F,16,a[34]),w=x(w,S,B,A,j,23,a[35]),A=x(A,w,S,B,g,4,a[36]),B=x(B,A,w,S,M,11,a[37]),S=x(S,B,A,w,q,16,a[38]),w=x(w,S,B,A,T,23,a[39]),A=x(A,w,S,B,H,4,a[40]),B=x(B,A,w,S,y,11,a[41]),S=x(S,B,A,w,C,16,a[42]),w=x(w,S,B,A,P,23,a[43]),A=x(A,w,S,B,_,4,a[44]),B=x(B,A,w,S,O,11,a[45]),S=x(S,B,A,w,N,16,a[46]),w=x(w,S,B,A,D,23,a[47]),A=d(A,w,S,B,y,6,a[48]),B=d(B,A,w,S,q,10,a[49]),S=d(S,B,A,w,j,15,a[50]),w=d(w,S,B,A,k,21,a[51]),A=d(A,w,S,B,O,6,a[52]),B=d(B,A,w,S,C,10,a[53]),S=d(S,B,A,w,T,15,a[54]),w=d(w,S,B,A,g,21,a[55]),A=d(A,w,S,B,E,6,a[56]),B=d(B,A,w,S,N,10,a[57]),S=d(S,B,A,w,P,15,a[58]),w=d(w,S,B,A,H,21,a[59]),A=d(A,w,S,B,M,6,a[60]),B=d(B,A,w,S,F,10,a[61]),S=d(S,B,A,w,D,15,a[62]),w=d(w,S,B,A,_,21,a[63]),p[0]=p[0]+A|0,p[1]=p[1]+w|0,p[2]=p[2]+S|0,p[3]=p[3]+B|0},_doFinalize:function(){var m=this._data,h=m.words,v=this._nDataBytes*8,b=m.sigBytes*8;h[b>>>5]|=128<<24-b%32;var u=t.floor(v/4294967296),p=v;h[(b+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,h[(b+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,m.sigBytes=(h.length+1)*4,this._process();for(var y=this._hash,g=y.words,D=0;D<4;D++){var C=g[D];g[D]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return y},clone:function(){var m=i.clone.call(this);return m._hash=this._hash.clone(),m}});function f(m,h,v,b,u,p,y){var g=m+(h&v|~h&b)+u+y;return(g<<p|g>>>32-p)+h}function l(m,h,v,b,u,p,y){var g=m+(h&b|v&~b)+u+y;return(g<<p|g>>>32-p)+h}function x(m,h,v,b,u,p,y){var g=m+(h^v^b)+u+y;return(g<<p|g>>>32-p)+h}function d(m,h,v,b,u,p,y){var g=m+(v^(h|~b))+u+y;return(g<<p|g>>>32-p)+h}r.MD5=i._createHelper(s),r.HmacMD5=i._createHmacHelper(s)})(Math),e.MD5})});var Et=R((Le,r0)=>{(function(e,t){typeof Le=="object"?r0.exports=Le=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Le,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,c=[],a=i.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,f){for(var l=this._hash.words,x=l[0],d=l[1],m=l[2],h=l[3],v=l[4],b=0;b<80;b++){if(b<16)c[b]=s[f+b]|0;else{var u=c[b-3]^c[b-8]^c[b-14]^c[b-16];c[b]=u<<1|u>>>31}var p=(x<<5|x>>>27)+v+c[b];b<20?p+=(d&m|~d&h)+1518500249:b<40?p+=(d^m^h)+1859775393:b<60?p+=(d&m|d&h|m&h)-1894007588:p+=(d^m^h)-899497514,v=h,h=m,m=d<<30|d>>>2,d=x,x=p}l[0]=l[0]+x|0,l[1]=l[1]+d|0,l[2]=l[2]+m|0,l[3]=l[3]+h|0,l[4]=l[4]+v|0},_doFinalize:function(){var s=this._data,f=s.words,l=this._nDataBytes*8,x=s.sigBytes*8;return f[x>>>5]|=128<<24-x%32,f[(x+64>>>9<<4)+14]=Math.floor(l/4294967296),f[(x+64>>>9<<4)+15]=l,s.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var s=o.clone.call(this);return s._hash=this._hash.clone(),s}});t.SHA1=o._createHelper(a),t.HmacSHA1=o._createHmacHelper(a)})(),e.SHA1})});var ze=R((Re,n0)=>{(function(e,t){typeof Re=="object"?n0.exports=Re=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Re,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=[],s=[];(function(){function x(v){for(var b=t.sqrt(v),u=2;u<=b;u++)if(!(v%u))return!1;return!0}function d(v){return(v-(v|0))*4294967296|0}for(var m=2,h=0;h<64;)x(m)&&(h<8&&(a[h]=d(t.pow(m,1/2))),s[h]=d(t.pow(m,1/3)),h++),m++})();var f=[],l=c.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(x,d){for(var m=this._hash.words,h=m[0],v=m[1],b=m[2],u=m[3],p=m[4],y=m[5],g=m[6],D=m[7],C=0;C<64;C++){if(C<16)f[C]=x[d+C]|0;else{var M=f[C-15],k=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,P=f[C-2],q=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;f[C]=k+f[C-7]+q+f[C-16]}var E=p&y^~p&g,_=h&v^h&b^v&b,T=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22),F=(p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25),O=D+F+E+s[C]+f[C],H=T+_;D=g,g=y,y=p,p=u+O|0,u=b,b=v,v=h,h=O+H|0}m[0]=m[0]+h|0,m[1]=m[1]+v|0,m[2]=m[2]+b|0,m[3]=m[3]+u|0,m[4]=m[4]+p|0,m[5]=m[5]+y|0,m[6]=m[6]+g|0,m[7]=m[7]+D|0},_doFinalize:function(){var x=this._data,d=x.words,m=this._nDataBytes*8,h=x.sigBytes*8;return d[h>>>5]|=128<<24-h%32,d[(h+64>>>9<<4)+14]=t.floor(m/4294967296),d[(h+64>>>9<<4)+15]=m,x.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var x=i.clone.call(this);return x._hash=this._hash.clone(),x}});r.SHA256=i._createHelper(l),r.HmacSHA256=i._createHmacHelper(l)})(Math),e.SHA256})});var o0=R((Ne,a0)=>{(function(e,t,r){typeof Ne=="object"?a0.exports=Ne=t(z(),ze()):typeof define=="function"&&define.amd?define(["./core","./sha256"],t):t(e.CryptoJS)})(Ne,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.algo,i=o.SHA256,c=o.SHA224=i.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=i._doFinalize.call(this);return a.sigBytes-=4,a}});t.SHA224=i._createHelper(c),t.HmacSHA224=i._createHmacHelper(c)})(),e.SHA224})});var At=R(($e,i0)=>{(function(e,t,r){typeof $e=="object"?i0.exports=$e=t(z(),Ce()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})($e,function(e){return(function(){var t=e,r=t.lib,n=r.Hasher,o=t.x64,i=o.Word,c=o.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var f=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];(function(){for(var d=0;d<80;d++)l[d]=s()})();var x=a.SHA512=n.extend({_doReset:function(){this._hash=new c.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(d,m){for(var h=this._hash.words,v=h[0],b=h[1],u=h[2],p=h[3],y=h[4],g=h[5],D=h[6],C=h[7],M=v.high,k=v.low,P=b.high,q=b.low,E=u.high,_=u.low,T=p.high,F=p.low,O=y.high,H=y.low,j=g.high,N=g.low,A=D.high,w=D.low,S=C.high,B=C.low,I=M,$=k,U=P,L=q,pe=E,le=_,ht=T,xe=F,K=O,G=H,Ee=j,fe=N,Ae=A,he=w,mt=S,me=B,Z=0;Z<80;Z++){var J,ee,Be=l[Z];if(Z<16)ee=Be.high=d[m+Z*2]|0,J=Be.low=d[m+Z*2+1]|0;else{var Bt=l[Z-15],de=Bt.high,ve=Bt.low,nr=(de>>>1|ve<<31)^(de>>>8|ve<<24)^de>>>7,wt=(ve>>>1|de<<31)^(ve>>>8|de<<24)^(ve>>>7|de<<25),Ft=l[Z-2],ue=Ft.high,be=Ft.low,ar=(ue>>>19|be<<13)^(ue<<3|be>>>29)^ue>>>6,St=(be>>>19|ue<<13)^(be<<3|ue>>>29)^(be>>>6|ue<<26),kt=l[Z-7],or=kt.high,ir=kt.low,_t=l[Z-16],sr=_t.high,Mt=_t.low;J=wt+ir,ee=nr+or+(J>>>0<wt>>>0?1:0),J=J+St,ee=ee+ar+(J>>>0<St>>>0?1:0),J=J+Mt,ee=ee+sr+(J>>>0<Mt>>>0?1:0),Be.high=ee,Be.low=J}var cr=K&Ee^~K&Ae,Pt=G&fe^~G&he,lr=I&U^I&pe^U&pe,dr=$&L^$&le^L&le,ur=(I>>>28|$<<4)^(I<<30|$>>>2)^(I<<25|$>>>7),Tt=($>>>28|I<<4)^($<<30|I>>>2)^($<<25|I>>>7),pr=(K>>>14|G<<18)^(K>>>18|G<<14)^(K<<23|G>>>9),xr=(G>>>14|K<<18)^(G>>>18|K<<14)^(G<<23|K>>>9),qt=f[Z],fr=qt.high,Ht=qt.low,Y=me+xr,te=mt+pr+(Y>>>0<me>>>0?1:0),Y=Y+Pt,te=te+cr+(Y>>>0<Pt>>>0?1:0),Y=Y+Ht,te=te+fr+(Y>>>0<Ht>>>0?1:0),Y=Y+J,te=te+ee+(Y>>>0<J>>>0?1:0),Ot=Tt+dr,hr=ur+lr+(Ot>>>0<Tt>>>0?1:0);mt=Ae,me=he,Ae=Ee,he=fe,Ee=K,fe=G,G=xe+Y|0,K=ht+te+(G>>>0<xe>>>0?1:0)|0,ht=pe,xe=le,pe=U,le=L,U=I,L=$,$=Y+Ot|0,I=te+hr+($>>>0<Y>>>0?1:0)|0}k=v.low=k+$,v.high=M+I+(k>>>0<$>>>0?1:0),q=b.low=q+L,b.high=P+U+(q>>>0<L>>>0?1:0),_=u.low=_+le,u.high=E+pe+(_>>>0<le>>>0?1:0),F=p.low=F+xe,p.high=T+ht+(F>>>0<xe>>>0?1:0),H=y.low=H+G,y.high=O+K+(H>>>0<G>>>0?1:0),N=g.low=N+fe,g.high=j+Ee+(N>>>0<fe>>>0?1:0),w=D.low=w+he,D.high=A+Ae+(w>>>0<he>>>0?1:0),B=C.low=B+me,C.high=S+mt+(B>>>0<me>>>0?1:0)},_doFinalize:function(){var d=this._data,m=d.words,h=this._nDataBytes*8,v=d.sigBytes*8;m[v>>>5]|=128<<24-v%32,m[(v+128>>>10<<5)+30]=Math.floor(h/4294967296),m[(v+128>>>10<<5)+31]=h,d.sigBytes=m.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var d=n.clone.call(this);return d._hash=this._hash.clone(),d},blockSize:1024/32});t.SHA512=n._createHelper(x),t.HmacSHA512=n._createHmacHelper(x)})(),e.SHA512})});var c0=R((Ie,s0)=>{(function(e,t,r){typeof Ie=="object"?s0.exports=Ie=t(z(),Ce(),At()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],t):t(e.CryptoJS)})(Ie,function(e){return(function(){var t=e,r=t.x64,n=r.Word,o=r.WordArray,i=t.algo,c=i.SHA512,a=i.SHA384=c.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var s=c._doFinalize.call(this);return s.sigBytes-=16,s}});t.SHA384=c._createHelper(a),t.HmacSHA384=c._createHmacHelper(a)})(),e.SHA384})});var d0=R((We,l0)=>{(function(e,t,r){typeof We=="object"?l0.exports=We=t(z(),Ce()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})(We,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.x64,a=c.Word,s=r.algo,f=[],l=[],x=[];(function(){for(var h=1,v=0,b=0;b<24;b++){f[h+5*v]=(b+1)*(b+2)/2%64;var u=v%5,p=(2*h+3*v)%5;h=u,v=p}for(var h=0;h<5;h++)for(var v=0;v<5;v++)l[h+5*v]=v+(2*h+3*v)%5*5;for(var y=1,g=0;g<24;g++){for(var D=0,C=0,M=0;M<7;M++){if(y&1){var k=(1<<M)-1;k<32?C^=1<<k:D^=1<<k-32}y&128?y=y<<1^113:y<<=1}x[g]=a.create(D,C)}})();var d=[];(function(){for(var h=0;h<25;h++)d[h]=a.create()})();var m=s.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],v=0;v<25;v++)h[v]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,v){for(var b=this._state,u=this.blockSize/2,p=0;p<u;p++){var y=h[v+2*p],g=h[v+2*p+1];y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;var D=b[p];D.high^=g,D.low^=y}for(var C=0;C<24;C++){for(var M=0;M<5;M++){for(var k=0,P=0,q=0;q<5;q++){var D=b[M+5*q];k^=D.high,P^=D.low}var E=d[M];E.high=k,E.low=P}for(var M=0;M<5;M++)for(var _=d[(M+4)%5],T=d[(M+1)%5],F=T.high,O=T.low,k=_.high^(F<<1|O>>>31),P=_.low^(O<<1|F>>>31),q=0;q<5;q++){var D=b[M+5*q];D.high^=k,D.low^=P}for(var H=1;H<25;H++){var k,P,D=b[H],j=D.high,N=D.low,A=f[H];A<32?(k=j<<A|N>>>32-A,P=N<<A|j>>>32-A):(k=N<<A-32|j>>>64-A,P=j<<A-32|N>>>64-A);var w=d[l[H]];w.high=k,w.low=P}var S=d[0],B=b[0];S.high=B.high,S.low=B.low;for(var M=0;M<5;M++)for(var q=0;q<5;q++){var H=M+5*q,D=b[H],I=d[H],$=d[(M+1)%5+5*q],U=d[(M+2)%5+5*q];D.high=I.high^~$.high&U.high,D.low=I.low^~$.low&U.low}var D=b[0],L=x[C];D.high^=L.high,D.low^=L.low}},_doFinalize:function(){var h=this._data,v=h.words,b=this._nDataBytes*8,u=h.sigBytes*8,p=this.blockSize*32;v[u>>>5]|=1<<24-u%32,v[(t.ceil((u+1)/p)*p>>>5)-1]|=128,h.sigBytes=v.length*4,this._process();for(var y=this._state,g=this.cfg.outputLength/8,D=g/8,C=[],M=0;M<D;M++){var k=y[M],P=k.high,q=k.low;P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,q=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360,C.push(q),C.push(P)}return new o.init(C,g)},clone:function(){for(var h=i.clone.call(this),v=h._state=this._state.slice(0),b=0;b<25;b++)v[b]=v[b].clone();return h}});r.SHA3=i._createHelper(m),r.HmacSHA3=i._createHmacHelper(m)})(Math),e.SHA3})});var p0=R((Ue,u0)=>{(function(e,t){typeof Ue=="object"?u0.exports=Ue=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ue,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),x=o.create([0,1518500249,1859775393,2400959708,2840853838]),d=o.create([1352829926,1548603684,1836072691,2053994217,0]),m=c.RIPEMD160=i.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(g,D){for(var C=0;C<16;C++){var M=D+C,k=g[M];g[M]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var P=this._hash.words,q=x.words,E=d.words,_=a.words,T=s.words,F=f.words,O=l.words,H,j,N,A,w,S,B,I,$,U;S=H=P[0],B=j=P[1],I=N=P[2],$=A=P[3],U=w=P[4];for(var L,C=0;C<80;C+=1)L=H+g[D+_[C]]|0,C<16?L+=h(j,N,A)+q[0]:C<32?L+=v(j,N,A)+q[1]:C<48?L+=b(j,N,A)+q[2]:C<64?L+=u(j,N,A)+q[3]:L+=p(j,N,A)+q[4],L=L|0,L=y(L,F[C]),L=L+w|0,H=w,w=A,A=y(N,10),N=j,j=L,L=S+g[D+T[C]]|0,C<16?L+=p(B,I,$)+E[0]:C<32?L+=u(B,I,$)+E[1]:C<48?L+=b(B,I,$)+E[2]:C<64?L+=v(B,I,$)+E[3]:L+=h(B,I,$)+E[4],L=L|0,L=y(L,O[C]),L=L+U|0,S=U,U=$,$=y(I,10),I=B,B=L;L=P[1]+N+$|0,P[1]=P[2]+A+U|0,P[2]=P[3]+w+S|0,P[3]=P[4]+H+B|0,P[4]=P[0]+j+I|0,P[0]=L},_doFinalize:function(){var g=this._data,D=g.words,C=this._nDataBytes*8,M=g.sigBytes*8;D[M>>>5]|=128<<24-M%32,D[(M+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,g.sigBytes=(D.length+1)*4,this._process();for(var k=this._hash,P=k.words,q=0;q<5;q++){var E=P[q];P[q]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return k},clone:function(){var g=i.clone.call(this);return g._hash=this._hash.clone(),g}});function h(g,D,C){return g^D^C}function v(g,D,C){return g&D|~g&C}function b(g,D,C){return(g|~D)^C}function u(g,D,C){return g&C|D&~C}function p(g,D,C){return g^(D|~C)}function y(g,D){return g<<D|g>>>32-D}r.RIPEMD160=i._createHelper(m),r.HmacRIPEMD160=i._createHmacHelper(m)})(Math),e.RIPEMD160})});var Ye=R((Ge,x0)=>{(function(e,t){typeof Ge=="object"?x0.exports=Ge=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ge,function(e){(function(){var t=e,r=t.lib,n=r.Base,o=t.enc,i=o.Utf8,c=t.algo,a=c.HMAC=n.extend({init:function(s,f){s=this._hasher=new s.init,typeof f=="string"&&(f=i.parse(f));var l=s.blockSize,x=l*4;f.sigBytes>x&&(f=s.finalize(f)),f.clamp();for(var d=this._oKey=f.clone(),m=this._iKey=f.clone(),h=d.words,v=m.words,b=0;b<l;b++)h[b]^=1549556828,v[b]^=909522486;d.sigBytes=m.sigBytes=x,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var f=this._hasher,l=f.finalize(s);f.reset();var x=f.finalize(this._oKey.clone().concat(l));return x}})})()})});var h0=R((Je,f0)=>{(function(e,t,r){typeof Je=="object"?f0.exports=Je=t(z(),ze(),Ye()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],t):t(e.CryptoJS)})(Je,function(e){return(function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,c=i.SHA256,a=i.HMAC,s=i.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:25e4}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,l){for(var x=this.cfg,d=a.create(x.hasher,f),m=o.create(),h=o.create([1]),v=m.words,b=h.words,u=x.keySize,p=x.iterations;v.length<u;){var y=d.update(l).finalize(h);d.reset();for(var g=y.words,D=g.length,C=y,M=1;M<p;M++){C=d.finalize(C),d.reset();for(var k=C.words,P=0;P<D;P++)g[P]^=k[P]}m.concat(y),b[0]++}return m.sigBytes=u*4,m}});t.PBKDF2=function(f,l,x){return s.create(x).compute(f,l)}})(),e.PBKDF2})});var V=R((Ke,m0)=>{(function(e,t,r){typeof Ke=="object"?m0.exports=Ke=t(z(),Et(),Ye()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],t):t(e.CryptoJS)})(Ke,function(e){return(function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,c=i.MD5,a=i.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,f){for(var l,x=this.cfg,d=x.hasher.create(),m=o.create(),h=m.words,v=x.keySize,b=x.iterations;h.length<v;){l&&d.update(l),l=d.update(s).finalize(f),d.reset();for(var u=1;u<b;u++)l=d.finalize(l),d.reset();m.concat(l)}return m.sigBytes=v*4,m}});t.EvpKDF=function(s,f,l){return a.create(l).compute(s,f)}})(),e.EvpKDF})});var W=R((Ze,v0)=>{(function(e,t,r){typeof Ze=="object"?v0.exports=Ze=t(z(),V()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],t):t(e.CryptoJS)})(Ze,function(e){e.lib.Cipher||(function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,c=n.BufferedBlockAlgorithm,a=r.enc,s=a.Utf8,f=a.Base64,l=r.algo,x=l.EvpKDF,d=n.Cipher=c.extend({cfg:o.extend(),createEncryptor:function(E,_){return this.create(this._ENC_XFORM_MODE,E,_)},createDecryptor:function(E,_){return this.create(this._DEC_XFORM_MODE,E,_)},init:function(E,_,T){this.cfg=this.cfg.extend(T),this._xformMode=E,this._key=_,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function E(_){return typeof _=="string"?q:M}return function(_){return{encrypt:function(T,F,O){return E(F).encrypt(_,T,F,O)},decrypt:function(T,F,O){return E(F).decrypt(_,T,F,O)}}}})()}),m=n.StreamCipher=d.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),h=r.mode={},v=n.BlockCipherMode=o.extend({createEncryptor:function(E,_){return this.Encryptor.create(E,_)},createDecryptor:function(E,_){return this.Decryptor.create(E,_)},init:function(E,_){this._cipher=E,this._iv=_}}),b=h.CBC=(function(){var E=v.extend();E.Encryptor=E.extend({processBlock:function(T,F){var O=this._cipher,H=O.blockSize;_.call(this,T,F,H),O.encryptBlock(T,F),this._prevBlock=T.slice(F,F+H)}}),E.Decryptor=E.extend({processBlock:function(T,F){var O=this._cipher,H=O.blockSize,j=T.slice(F,F+H);O.decryptBlock(T,F),_.call(this,T,F,H),this._prevBlock=j}});function _(T,F,O){var H,j=this._iv;j?(H=j,this._iv=t):H=this._prevBlock;for(var N=0;N<O;N++)T[F+N]^=H[N]}return E})(),u=r.pad={},p=u.Pkcs7={pad:function(E,_){for(var T=_*4,F=T-E.sigBytes%T,O=F<<24|F<<16|F<<8|F,H=[],j=0;j<F;j+=4)H.push(O);var N=i.create(H,F);E.concat(N)},unpad:function(E){var _=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=_}},y=n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:b,padding:p}),reset:function(){var E;d.reset.call(this);var _=this.cfg,T=_.iv,F=_.mode;this._xformMode==this._ENC_XFORM_MODE?E=F.createEncryptor:(E=F.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,T&&T.words):(this._mode=E.call(F,this,T&&T.words),this._mode.__creator=E)},_doProcessBlock:function(E,_){this._mode.processBlock(E,_)},_doFinalize:function(){var E,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),_.unpad(E)),E},blockSize:128/32}),g=n.CipherParams=o.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),D=r.format={},C=D.OpenSSL={stringify:function(E){var _,T=E.ciphertext,F=E.salt;return F?_=i.create([1398893684,1701076831]).concat(F).concat(T):_=T,_.toString(f)},parse:function(E){var _,T=f.parse(E),F=T.words;return F[0]==1398893684&&F[1]==1701076831&&(_=i.create(F.slice(2,4)),F.splice(0,4),T.sigBytes-=16),g.create({ciphertext:T,salt:_})}},M=n.SerializableCipher=o.extend({cfg:o.extend({format:C}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var O=E.createEncryptor(T,F),H=O.finalize(_),j=O.cfg;return g.create({ciphertext:H,key:T,iv:j.iv,algorithm:E,mode:j.mode,padding:j.padding,blockSize:E.blockSize,formatter:F.format})},decrypt:function(E,_,T,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var O=E.createDecryptor(T,F).finalize(_.ciphertext);return O},_parse:function(E,_){return typeof E=="string"?_.parse(E,this):E}}),k=r.kdf={},P=k.OpenSSL={execute:function(E,_,T,F,O){if(F||(F=i.random(64/8)),O)var H=x.create({keySize:_+T,hasher:O}).compute(E,F);else var H=x.create({keySize:_+T}).compute(E,F);var j=i.create(H.words.slice(_),T*4);return H.sigBytes=_*4,g.create({key:H,iv:j,salt:F})}},q=n.PasswordBasedCipher=M.extend({cfg:M.cfg.extend({kdf:P}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var O=F.kdf.execute(T,E.keySize,E.ivSize,F.salt,F.hasher);F.iv=O.iv;var H=M.encrypt.call(this,E,_,O.key,F);return H.mixIn(O),H},decrypt:function(E,_,T,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var O=F.kdf.execute(T,E.keySize,E.ivSize,_.salt,F.hasher);F.iv=O.iv;var H=M.decrypt.call(this,E,_,O.key,F);return H}})})()})});var g0=R((Xe,b0)=>{(function(e,t,r){typeof Xe=="object"?b0.exports=Xe=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Xe,function(e){return e.mode.CFB=(function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize;r.call(this,n,o,c,i),this._prevBlock=n.slice(o,o+c)}}),t.Decryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=n.slice(o,o+c);r.call(this,n,o,c,i),this._prevBlock=a}});function r(n,o,i,c){var a,s=this._iv;s?(a=s.slice(0),this._iv=void 0):a=this._prevBlock,c.encryptBlock(a,0);for(var f=0;f<i;f++)n[o+f]^=a[f]}return t})(),e.mode.CFB})});var D0=R((Ve,y0)=>{(function(e,t,r){typeof Ve=="object"?y0.exports=Ve=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Ve,function(e){return e.mode.CTR=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=this._iv,s=this._counter;a&&(s=this._counter=a.slice(0),this._iv=void 0);var f=s.slice(0);i.encryptBlock(f,0),s[c-1]=s[c-1]+1|0;for(var l=0;l<c;l++)n[o+l]^=f[l]}});return t.Decryptor=r,t})(),e.mode.CTR})});var E0=R((Qe,C0)=>{(function(e,t,r){typeof Qe=="object"?C0.exports=Qe=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Qe,function(e){return e.mode.CTRGladman=(function(){var t=e.lib.BlockCipherMode.extend();function r(i){if((i>>24&255)===255){var c=i>>16&255,a=i>>8&255,s=i&255;c===255?(c=0,a===255?(a=0,s===255?s=0:++s):++a):++c,i=0,i+=c<<16,i+=a<<8,i+=s}else i+=1<<24;return i}function n(i){return(i[0]=r(i[0]))===0&&(i[1]=r(i[1])),i}var o=t.Encryptor=t.extend({processBlock:function(i,c){var a=this._cipher,s=a.blockSize,f=this._iv,l=this._counter;f&&(l=this._counter=f.slice(0),this._iv=void 0),n(l);var x=l.slice(0);a.encryptBlock(x,0);for(var d=0;d<s;d++)i[c+d]^=x[d]}});return t.Decryptor=o,t})(),e.mode.CTRGladman})});var B0=R((et,A0)=>{(function(e,t,r){typeof et=="object"?A0.exports=et=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(et,function(e){return e.mode.OFB=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=this._iv,s=this._keystream;a&&(s=this._keystream=a.slice(0),this._iv=void 0),i.encryptBlock(s,0);for(var f=0;f<c;f++)n[o+f]^=s[f]}});return t.Decryptor=r,t})(),e.mode.OFB})});var F0=R((tt,w0)=>{(function(e,t,r){typeof tt=="object"?w0.exports=tt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(tt,function(e){return e.mode.ECB=(function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(r,n){this._cipher.encryptBlock(r,n)}}),t.Decryptor=t.extend({processBlock:function(r,n){this._cipher.decryptBlock(r,n)}}),t})(),e.mode.ECB})});var k0=R((rt,S0)=>{(function(e,t,r){typeof rt=="object"?S0.exports=rt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(rt,function(e){return e.pad.AnsiX923={pad:function(t,r){var n=t.sigBytes,o=r*4,i=o-n%o,c=n+i-1;t.clamp(),t.words[c>>>2]|=i<<24-c%4*8,t.sigBytes+=i},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Ansix923})});var M0=R((nt,_0)=>{(function(e,t,r){typeof nt=="object"?_0.exports=nt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(nt,function(e){return e.pad.Iso10126={pad:function(t,r){var n=r*4,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Iso10126})});var T0=R((at,P0)=>{(function(e,t,r){typeof at=="object"?P0.exports=at=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(at,function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})});var H0=R((ot,q0)=>{(function(e,t,r){typeof ot=="object"?q0.exports=ot=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(ot,function(e){return e.pad.ZeroPadding={pad:function(t,r){var n=r*4;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){for(var r=t.words,n=t.sigBytes-1,n=t.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},e.pad.ZeroPadding})});var j0=R((it,O0)=>{(function(e,t,r){typeof it=="object"?O0.exports=it=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(it,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})});var R0=R((st,L0)=>{(function(e,t,r){typeof st=="object"?L0.exports=st=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(st,function(e){return(function(t){var r=e,n=r.lib,o=n.CipherParams,i=r.enc,c=i.Hex,a=r.format,s=a.Hex={stringify:function(f){return f.ciphertext.toString(c)},parse:function(f){var l=c.parse(f);return o.create({ciphertext:l})}}})(),e.format.Hex})});var N0=R((ct,z0)=>{(function(e,t,r){typeof ct=="object"?z0.exports=ct=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ct,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,o=t.algo,i=[],c=[],a=[],s=[],f=[],l=[],x=[],d=[],m=[],h=[];(function(){for(var u=[],p=0;p<256;p++)p<128?u[p]=p<<1:u[p]=p<<1^283;for(var y=0,g=0,p=0;p<256;p++){var D=g^g<<1^g<<2^g<<3^g<<4;D=D>>>8^D&255^99,i[y]=D,c[D]=y;var C=u[y],M=u[C],k=u[M],P=u[D]*257^D*16843008;a[y]=P<<24|P>>>8,s[y]=P<<16|P>>>16,f[y]=P<<8|P>>>24,l[y]=P;var P=k*16843009^M*65537^C*257^y*16843008;x[D]=P<<24|P>>>8,d[D]=P<<16|P>>>16,m[D]=P<<8|P>>>24,h[D]=P,y?(y=C^u[u[u[k^C]]],g^=u[u[g]]):y=g=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],b=o.AES=n.extend({_doReset:function(){var u;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var p=this._keyPriorReset=this._key,y=p.words,g=p.sigBytes/4,D=this._nRounds=g+6,C=(D+1)*4,M=this._keySchedule=[],k=0;k<C;k++)k<g?M[k]=y[k]:(u=M[k-1],k%g?g>6&&k%g==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[u&255]):(u=u<<8|u>>>24,u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[u&255],u^=v[k/g|0]<<24),M[k]=M[k-g]^u);for(var P=this._invKeySchedule=[],q=0;q<C;q++){var k=C-q;if(q%4)var u=M[k];else var u=M[k-4];q<4||k<=4?P[q]=u:P[q]=x[i[u>>>24]]^d[i[u>>>16&255]]^m[i[u>>>8&255]]^h[i[u&255]]}}},encryptBlock:function(u,p){this._doCryptBlock(u,p,this._keySchedule,a,s,f,l,i)},decryptBlock:function(u,p){var y=u[p+1];u[p+1]=u[p+3],u[p+3]=y,this._doCryptBlock(u,p,this._invKeySchedule,x,d,m,h,c);var y=u[p+1];u[p+1]=u[p+3],u[p+3]=y},_doCryptBlock:function(u,p,y,g,D,C,M,k){for(var P=this._nRounds,q=u[p]^y[0],E=u[p+1]^y[1],_=u[p+2]^y[2],T=u[p+3]^y[3],F=4,O=1;O<P;O++){var H=g[q>>>24]^D[E>>>16&255]^C[_>>>8&255]^M[T&255]^y[F++],j=g[E>>>24]^D[_>>>16&255]^C[T>>>8&255]^M[q&255]^y[F++],N=g[_>>>24]^D[T>>>16&255]^C[q>>>8&255]^M[E&255]^y[F++],A=g[T>>>24]^D[q>>>16&255]^C[E>>>8&255]^M[_&255]^y[F++];q=H,E=j,_=N,T=A}var H=(k[q>>>24]<<24|k[E>>>16&255]<<16|k[_>>>8&255]<<8|k[T&255])^y[F++],j=(k[E>>>24]<<24|k[_>>>16&255]<<16|k[T>>>8&255]<<8|k[q&255])^y[F++],N=(k[_>>>24]<<24|k[T>>>16&255]<<16|k[q>>>8&255]<<8|k[E&255])^y[F++],A=(k[T>>>24]<<24|k[q>>>16&255]<<16|k[E>>>8&255]<<8|k[_&255])^y[F++];u[p]=H,u[p+1]=j,u[p+2]=N,u[p+3]=A},keySize:256/32});t.AES=n._createHelper(b)})(),e.AES})});var I0=R((lt,$0)=>{(function(e,t,r){typeof lt=="object"?$0.exports=lt=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(lt,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=r.BlockCipher,i=t.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],x=i.DES=o.extend({_doReset:function(){for(var v=this._key,b=v.words,u=[],p=0;p<56;p++){var y=c[p]-1;u[p]=b[y>>>5]>>>31-y%32&1}for(var g=this._subKeys=[],D=0;D<16;D++){for(var C=g[D]=[],M=s[D],p=0;p<24;p++)C[p/6|0]|=u[(a[p]-1+M)%28]<<31-p%6,C[4+(p/6|0)]|=u[28+(a[p+24]-1+M)%28]<<31-p%6;C[0]=C[0]<<1|C[0]>>>31;for(var p=1;p<7;p++)C[p]=C[p]>>>(p-1)*4+3;C[7]=C[7]<<5|C[7]>>>27}for(var k=this._invSubKeys=[],p=0;p<16;p++)k[p]=g[15-p]},encryptBlock:function(v,b){this._doCryptBlock(v,b,this._subKeys)},decryptBlock:function(v,b){this._doCryptBlock(v,b,this._invSubKeys)},_doCryptBlock:function(v,b,u){this._lBlock=v[b],this._rBlock=v[b+1],d.call(this,4,252645135),d.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),d.call(this,1,1431655765);for(var p=0;p<16;p++){for(var y=u[p],g=this._lBlock,D=this._rBlock,C=0,M=0;M<8;M++)C|=f[M][((D^y[M])&l[M])>>>0];this._lBlock=D,this._rBlock=g^C}var k=this._lBlock;this._lBlock=this._rBlock,this._rBlock=k,d.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),v[b]=this._lBlock,v[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function d(v,b){var u=(this._lBlock>>>v^this._rBlock)&b;this._rBlock^=u,this._lBlock^=u<<v}function m(v,b){var u=(this._rBlock>>>v^this._lBlock)&b;this._lBlock^=u,this._rBlock^=u<<v}t.DES=o._createHelper(x);var h=i.TripleDES=o.extend({_doReset:function(){var v=this._key,b=v.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var u=b.slice(0,2),p=b.length<4?b.slice(0,2):b.slice(2,4),y=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=x.createEncryptor(n.create(u)),this._des2=x.createEncryptor(n.create(p)),this._des3=x.createEncryptor(n.create(y))},encryptBlock:function(v,b){this._des1.encryptBlock(v,b),this._des2.decryptBlock(v,b),this._des3.encryptBlock(v,b)},decryptBlock:function(v,b){this._des3.decryptBlock(v,b),this._des2.encryptBlock(v,b),this._des1.decryptBlock(v,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=o._createHelper(h)})(),e.TripleDES})});var U0=R((dt,W0)=>{(function(e,t,r){typeof dt=="object"?W0.exports=dt=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(dt,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=o.RC4=n.extend({_doReset:function(){for(var s=this._key,f=s.words,l=s.sigBytes,x=this._S=[],d=0;d<256;d++)x[d]=d;for(var d=0,m=0;d<256;d++){var h=d%l,v=f[h>>>2]>>>24-h%4*8&255;m=(m+x[d]+v)%256;var b=x[d];x[d]=x[m],x[m]=b}this._i=this._j=0},_doProcessBlock:function(s,f){s[f]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var s=this._S,f=this._i,l=this._j,x=0,d=0;d<4;d++){f=(f+1)%256,l=(l+s[f])%256;var m=s[f];s[f]=s[l],s[l]=m,x|=s[(s[f]+s[l])%256]<<24-d*8}return this._i=f,this._j=l,x}t.RC4=n._createHelper(i);var a=o.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var s=this.cfg.drop;s>0;s--)c.call(this)}});t.RC4Drop=n._createHelper(a)})(),e.RC4})});var Y0=R((ut,G0)=>{(function(e,t,r){typeof ut=="object"?G0.exports=ut=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ut,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=[],c=[],a=[],s=o.Rabbit=n.extend({_doReset:function(){for(var l=this._key.words,x=this.cfg.iv,d=0;d<4;d++)l[d]=(l[d]<<8|l[d]>>>24)&16711935|(l[d]<<24|l[d]>>>8)&4278255360;var m=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],h=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var d=0;d<4;d++)f.call(this);for(var d=0;d<8;d++)h[d]^=m[d+4&7];if(x){var v=x.words,b=v[0],u=v[1],p=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,g=p>>>16|y&4294901760,D=y<<16|p&65535;h[0]^=p,h[1]^=g,h[2]^=y,h[3]^=D,h[4]^=p,h[5]^=g,h[6]^=y,h[7]^=D;for(var d=0;d<4;d++)f.call(this)}},_doProcessBlock:function(l,x){var d=this._X;f.call(this),i[0]=d[0]^d[5]>>>16^d[3]<<16,i[1]=d[2]^d[7]>>>16^d[5]<<16,i[2]=d[4]^d[1]>>>16^d[7]<<16,i[3]=d[6]^d[3]>>>16^d[1]<<16;for(var m=0;m<4;m++)i[m]=(i[m]<<8|i[m]>>>24)&16711935|(i[m]<<24|i[m]>>>8)&4278255360,l[x+m]^=i[m]},blockSize:128/32,ivSize:64/32});function f(){for(var l=this._X,x=this._C,d=0;d<8;d++)c[d]=x[d];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<c[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<c[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<c[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<c[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<c[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<c[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<c[6]>>>0?1:0)|0,this._b=x[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var m=l[d]+x[d],h=m&65535,v=m>>>16,b=((h*h>>>17)+h*v>>>15)+v*v,u=((m&4294901760)*m|0)+((m&65535)*m|0);a[d]=b^u}l[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,l[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,l[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,l[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,l[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,l[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,l[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,l[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=n._createHelper(s)})(),e.Rabbit})});var K0=R((pt,J0)=>{(function(e,t,r){typeof pt=="object"?J0.exports=pt=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(pt,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=[],c=[],a=[],s=o.RabbitLegacy=n.extend({_doReset:function(){var l=this._key.words,x=this.cfg.iv,d=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],m=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var h=0;h<4;h++)f.call(this);for(var h=0;h<8;h++)m[h]^=d[h+4&7];if(x){var v=x.words,b=v[0],u=v[1],p=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,g=p>>>16|y&4294901760,D=y<<16|p&65535;m[0]^=p,m[1]^=g,m[2]^=y,m[3]^=D,m[4]^=p,m[5]^=g,m[6]^=y,m[7]^=D;for(var h=0;h<4;h++)f.call(this)}},_doProcessBlock:function(l,x){var d=this._X;f.call(this),i[0]=d[0]^d[5]>>>16^d[3]<<16,i[1]=d[2]^d[7]>>>16^d[5]<<16,i[2]=d[4]^d[1]>>>16^d[7]<<16,i[3]=d[6]^d[3]>>>16^d[1]<<16;for(var m=0;m<4;m++)i[m]=(i[m]<<8|i[m]>>>24)&16711935|(i[m]<<24|i[m]>>>8)&4278255360,l[x+m]^=i[m]},blockSize:128/32,ivSize:64/32});function f(){for(var l=this._X,x=this._C,d=0;d<8;d++)c[d]=x[d];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<c[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<c[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<c[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<c[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<c[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<c[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<c[6]>>>0?1:0)|0,this._b=x[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var m=l[d]+x[d],h=m&65535,v=m>>>16,b=((h*h>>>17)+h*v>>>15)+v*v,u=((m&4294901760)*m|0)+((m&65535)*m|0);a[d]=b^u}l[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,l[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,l[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,l[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,l[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,l[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,l[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,l[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=n._createHelper(s)})(),e.RabbitLegacy})});var X0=R((xt,Z0)=>{(function(e,t,r){typeof xt=="object"?Z0.exports=xt=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(xt,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,o=t.algo;let i=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function f(h,v){let b=v>>24&255,u=v>>16&255,p=v>>8&255,y=v&255,g=h.sbox[0][b]+h.sbox[1][u];return g=g^h.sbox[2][p],g=g+h.sbox[3][y],g}function l(h,v,b){let u=v,p=b,y;for(let g=0;g<i;++g)u=u^h.pbox[g],p=f(h,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^h.pbox[i],u=u^h.pbox[i+1],{left:u,right:p}}function x(h,v,b){let u=v,p=b,y;for(let g=i+1;g>1;--g)u=u^h.pbox[g],p=f(h,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^h.pbox[1],u=u^h.pbox[0],{left:u,right:p}}function d(h,v,b){for(let D=0;D<4;D++){h.sbox[D]=[];for(let C=0;C<256;C++)h.sbox[D][C]=a[D][C]}let u=0;for(let D=0;D<i+2;D++)h.pbox[D]=c[D]^v[u],u++,u>=b&&(u=0);let p=0,y=0,g=0;for(let D=0;D<i+2;D+=2)g=l(h,p,y),p=g.left,y=g.right,h.pbox[D]=p,h.pbox[D+1]=y;for(let D=0;D<4;D++)for(let C=0;C<256;C+=2)g=l(h,p,y),p=g.left,y=g.right,h.sbox[D][C]=p,h.sbox[D][C+1]=y;return!0}var m=o.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var h=this._keyPriorReset=this._key,v=h.words,b=h.sigBytes/4;d(s,v,b)}},encryptBlock:function(h,v){var b=l(s,h[v],h[v+1]);h[v]=b.left,h[v+1]=b.right},decryptBlock:function(h,v){var b=x(s,h[v],h[v+1]);h[v]=b.left,h[v+1]=b.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(m)})(),e.Blowfish})});var Q0=R((ft,V0)=>{(function(e,t,r){typeof ft=="object"?V0.exports=ft=t(z(),Ce(),Kt(),Xt(),re(),e0(),ne(),Et(),ze(),o0(),At(),c0(),d0(),p0(),Ye(),h0(),V(),W(),g0(),D0(),E0(),B0(),F0(),k0(),M0(),T0(),H0(),j0(),R0(),N0(),I0(),U0(),Y0(),K0(),X0()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],t):e.CryptoJS=t(e.CryptoJS)})(ft,function(e){return e})});var vt={name:"dphelper",version:"3.1.1",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/dphelper.d.ts",typings:"./types/*",copyright:"Dario Passariello",homepage:"https://a51.gitbook.io/dphelper",author:"Dario Passariello <dariopassariello@gmail.com>",support:{name:"Dario Passariello",url:"https://github.com/passariello/",email:"dariopassariello@gmail.com"},bugs:{url:"https://github.com/a51-dev/a51.dphelper.public/issues"},contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com",url:"https://dario.passariello.ca/"},{name:"Valeria Cala Scaglitta",email:"valeriacalascaglitta@gmail.com"}],keywords:["dphelper","front-end","back-end","framework","helper","utils","tools","uuid","random","window","store","easy","pro","powerful","state","status","dp helper","local","storage","indexdb","idb","devtool"],funding:[{type:"patreon",url:"https://www.patreon.com/passariello"}],typing:["types/*"],exports:{".":{types:"./types/dphelper.d.ts",import:"./index.js",default:"./index.js"},"./types/*":"./types/*"},scripts:{build:"rimraf dist && npm run generate-imports && node esbuild.config.mjs && node node_modules/typescript/bin/tsc -p tsconfig.json --emitDeclarationOnly && node scripts/patch-dist.mjs",dev:"npm run generate-imports && node esbuild.config.mjs --watch-and-serve","npm:pack":"npm run build && cd dist && npm pack","npm:publish":"npm run build && npm publish ./dist --access public",test:"cd tests && npm run test",lint:"cd tests && npm run lint",tsc:"cd tests && tsc --noEmit","generate-imports":"tsx scripts/generate-imports.ts"},devDependencies:{"@types/crypto-js":"4.2.2","@types/node":"^25.3.1","crypto-js":"4.2.0",esbuild:"0.27.3","esbuild-node-externals":"1.20.1","esbuild-plugin-alias":"0.2.1","esbuild-plugin-copy":"2.1.1","esbuild-sass-plugin":"3.6.0","esbuild-scss-modules-plugin":"1.1.1",rimraf:"6.1.3",tslib:"^2.8.1",tsx:"^4.21.0",typescript:"5.9.3"}};var Rt={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var bt=globalThis.dphelper;if(bt&&bt.version&&bt.version<vt.version)try{delete globalThis.dphelper}catch{console.debug("Could not delete existing dphelper (likely non-configurable)")}var gt=Object.getOwnPropertyDescriptor(globalThis,"dphelper");gt&&!gt.configurable?gt.writable?globalThis.dphelper===void 0&&(globalThis.dphelper={}):console.debug("dphelper already defined on globalThis and is not writable/configurable"):Object.defineProperty(globalThis,"dphelper",{value:globalThis.dphelper||{},writable:!0,configurable:!0,enumerable:!1});globalThis.dphelper&&Object.defineProperties(globalThis.dphelper,{_list:{value:{scripts:[],sockets:[],...Rt},configurable:!0,writable:!0},version:{value:vt.version,configurable:!0,writable:!0},isServer:{value:typeof window>"u",configurable:!0,writable:!0},isBrowser:{value:typeof window<"u",configurable:!0,writable:!0}});Object.defineProperty(dphelper,"setProps",{value:(e,t,r)=>{Object.defineProperty(e,t.name,r||{writable:!1,configurable:!1,enumerable:!1}),r?.lock&&Object.freeze(e[t.name])},writable:!1,configurable:!1,enumerable:!1});Object.defineProperty(dphelper,"setDescription",{value:(e,t)=>{Object.defineProperties(dphelper,{[e.name]:{value:t,writable:!1,configurable:!1,enumerable:!1}}),Object.keys(t).map(r=>(Object.defineProperties(dphelper[e.name],{[r]:{writable:!1,configurable:!1,enumerable:!1}}),null)),dphelper.setProps(dphelper,e,{writable:!1,configurable:!1,enumerable:!1}),dphelper._list.scripts.push(e)}});var Br={name:"ai",active:!0,subCommand:[{name:"tokenCount",version:"0.0.3",example:"dphelper.ai.tokenCount({ users: [1,2,3] })",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260221",type:"function",active:!0,description:"Estimate token count for LLMs. If an object is passed, it uses TOON format for calculation.",env:"both",subCommand:[]},{name:"smartSanitize",version:"0.0.2",example:"dphelper.ai.smartSanitize('My email is test@example.com')",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Remove PII (emails, phones, etc) from text for AI privacy",subCommand:[]},{name:"toon",version:"0.0.1",example:"dphelper.ai.toon({ users: [{id: 1, name: 'Ada'}] })",author:"TOON + Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert JSON to TOON format (Token-Oriented Object Notation)",subCommand:[]},{name:"toonToJson",version:"0.0.1",example:"dphelper.ai.toonToJson('users[1]{id,name}:\\n 1,Ada')",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert TOON format back to JSON/Object",subCommand:[]},{name:"chunker",version:"0.0.1",example:"dphelper.ai.chunker(text, { size: 1000, overlap: 200 })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Split long text into chunks for RAG or AI processing.",subCommand:[]},{name:"similarity",version:"0.0.1",example:"dphelper.ai.similarity(vecA, vecB)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Calculate cosine similarity between two embedding vectors.",subCommand:[]},{name:"extractReasoning",version:"0.0.1",example:"dphelper.ai.extractReasoning(aiResponse)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Extract <think> tags or internal reasoning from AI responses.",subCommand:[]},{name:"prompt",version:"0.0.1",example:"dphelper.ai.prompt('Hello {{name}}', { name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Simple prompt template engine with variable injection.",subCommand:[]},{name:"schema",version:"0.0.1",example:"dphelper.ai.schema({ id: 1, name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Generate a TOON-style schema definition for AI instructions.",subCommand:[]},{name:"snapshot",version:"0.0.1",example:"dphelper.ai.snapshot()",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Capture a 'mental snapshot' of the app state (logs/globals) in TOON format for AI debugging.",env:"both",subCommand:[]}]},yt=e=>e===null||typeof e!="object",we=e=>e===null?"null":typeof e=="string"?e.includes(",")||e.includes(":")||e.includes('"')||e.includes(`
|
|
1
|
+
var mr=Object.create;var jt=Object.defineProperty;var vr=Object.getOwnPropertyDescriptor;var br=Object.getOwnPropertyNames;var gr=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty;var Lt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Dr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of br(t))!yr.call(e,o)&&o!==r&&jt(e,o,{get:()=>t[o],enumerable:!(n=vr(t,o))||n.enumerable});return e};var Cr=(e,t,r)=>(r=e!=null?mr(gr(e)):{},Dr(t||!e||!e.__esModule?jt(r,"default",{value:e,enumerable:!0}):r,e));var Ut=R(()=>{});var z=R((Me,Gt)=>{(function(e,t){typeof Me=="object"?Gt.exports=Me=t():typeof define=="function"&&define.amd?define([],t):e.CryptoJS=t()})(Me,function(){var e=e||(function(t,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof Lt=="function")try{n=Ut()}catch{}var o=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||(function(){function u(){}return function(p){var y;return u.prototype=p,y=new u,u.prototype=null,y}})(),c={},a=c.lib={},s=a.Base=(function(){return{extend:function(u){var p=i(this);return u&&p.mixIn(u),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},create:function(){var u=this.extend();return u.init.apply(u,arguments),u},init:function(){},mixIn:function(u){for(var p in u)u.hasOwnProperty(p)&&(this[p]=u[p]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),f=a.WordArray=s.extend({init:function(u,p){u=this.words=u||[],p!=r?this.sigBytes=p:this.sigBytes=u.length*4},toString:function(u){return(u||x).stringify(this)},concat:function(u){var p=this.words,y=u.words,g=this.sigBytes,D=u.sigBytes;if(this.clamp(),g%4)for(var C=0;C<D;C++){var M=y[C>>>2]>>>24-C%4*8&255;p[g+C>>>2]|=M<<24-(g+C)%4*8}else for(var k=0;k<D;k+=4)p[g+k>>>2]=y[k>>>2];return this.sigBytes+=D,this},clamp:function(){var u=this.words,p=this.sigBytes;u[p>>>2]&=4294967295<<32-p%4*8,u.length=t.ceil(p/4)},clone:function(){var u=s.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var p=[],y=0;y<u;y+=4)p.push(o());return new f.init(p,u)}}),l=c.enc={},x=l.Hex={stringify:function(u){for(var p=u.words,y=u.sigBytes,g=[],D=0;D<y;D++){var C=p[D>>>2]>>>24-D%4*8&255;g.push((C>>>4).toString(16)),g.push((C&15).toString(16))}return g.join("")},parse:function(u){for(var p=u.length,y=[],g=0;g<p;g+=2)y[g>>>3]|=parseInt(u.substr(g,2),16)<<24-g%8*4;return new f.init(y,p/2)}},d=l.Latin1={stringify:function(u){for(var p=u.words,y=u.sigBytes,g=[],D=0;D<y;D++){var C=p[D>>>2]>>>24-D%4*8&255;g.push(String.fromCharCode(C))}return g.join("")},parse:function(u){for(var p=u.length,y=[],g=0;g<p;g++)y[g>>>2]|=(u.charCodeAt(g)&255)<<24-g%4*8;return new f.init(y,p)}},m=l.Utf8={stringify:function(u){try{return decodeURIComponent(escape(d.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(u){return d.parse(unescape(encodeURIComponent(u)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=m.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var p,y=this._data,g=y.words,D=y.sigBytes,C=this.blockSize,M=C*4,k=D/M;u?k=t.ceil(k):k=t.max((k|0)-this._minBufferSize,0);var P=k*C,q=t.min(P*4,D);if(P){for(var E=0;E<P;E+=C)this._doProcessBlock(g,E);p=g.splice(0,P),y.sigBytes-=q}return new f.init(p,q)},clone:function(){var u=s.clone.call(this);return u._data=this._data.clone(),u},_minBufferSize:0}),v=a.Hasher=h.extend({cfg:s.extend(),init:function(u){this.cfg=this.cfg.extend(u),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(u){return this._append(u),this._process(),this},finalize:function(u){u&&this._append(u);var p=this._doFinalize();return p},blockSize:512/32,_createHelper:function(u){return function(p,y){return new u.init(y).finalize(p)}},_createHmacHelper:function(u){return function(p,y){return new b.HMAC.init(u,y).finalize(p)}}}),b=c.algo={};return c})(Math);return e})});var Ce=R((Pe,Yt)=>{(function(e,t){typeof Pe=="object"?Yt.exports=Pe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Pe,function(e){return(function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,c=r.x64={},a=c.Word=o.extend({init:function(f,l){this.high=f,this.low=l}}),s=c.WordArray=o.extend({init:function(f,l){f=this.words=f||[],l!=t?this.sigBytes=l:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,l=f.length,x=[],d=0;d<l;d++){var m=f[d];x.push(m.high),x.push(m.low)}return i.create(x,this.sigBytes)},clone:function(){for(var f=o.clone.call(this),l=f.words=this.words.slice(0),x=l.length,d=0;d<x;d++)l[d]=l[d].clone();return f}})})(),e})});var Kt=R((Te,Jt)=>{(function(e,t){typeof Te=="object"?Jt.exports=Te=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Te,function(e){return(function(){if(typeof ArrayBuffer=="function"){var t=e,r=t.lib,n=r.WordArray,o=n.init,i=n.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray<"u"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var a=c.byteLength,s=[],f=0;f<a;f++)s[f>>>2]|=c[f]<<24-f%4*8;o.call(this,s,a)}else o.apply(this,arguments)};i.prototype=n}})(),e.lib.WordArray})});var Xt=R((qe,Zt)=>{(function(e,t){typeof qe=="object"?Zt.exports=qe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(qe,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Utf16=o.Utf16BE={stringify:function(a){for(var s=a.words,f=a.sigBytes,l=[],x=0;x<f;x+=2){var d=s[x>>>2]>>>16-x%4*8&65535;l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,f=[],l=0;l<s;l++)f[l>>>1]|=a.charCodeAt(l)<<16-l%2*16;return n.create(f,s*2)}};o.Utf16LE={stringify:function(a){for(var s=a.words,f=a.sigBytes,l=[],x=0;x<f;x+=2){var d=c(s[x>>>2]>>>16-x%4*8&65535);l.push(String.fromCharCode(d))}return l.join("")},parse:function(a){for(var s=a.length,f=[],l=0;l<s;l++)f[l>>>1]|=c(a.charCodeAt(l)<<16-l%2*16);return n.create(f,s*2)}};function c(a){return a<<8&4278255360|a>>>8&16711935}})(),e.enc.Utf16})});var re=R((He,Vt)=>{(function(e,t){typeof He=="object"?Vt.exports=He=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(He,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Base64={stringify:function(a){var s=a.words,f=a.sigBytes,l=this._map;a.clamp();for(var x=[],d=0;d<f;d+=3)for(var m=s[d>>>2]>>>24-d%4*8&255,h=s[d+1>>>2]>>>24-(d+1)%4*8&255,v=s[d+2>>>2]>>>24-(d+2)%4*8&255,b=m<<16|h<<8|v,u=0;u<4&&d+u*.75<f;u++)x.push(l.charAt(b>>>6*(3-u)&63));var p=l.charAt(64);if(p)for(;x.length%4;)x.push(p);return x.join("")},parse:function(a){var s=a.length,f=this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var x=0;x<f.length;x++)l[f.charCodeAt(x)]=x}var d=f.charAt(64);if(d){var m=a.indexOf(d);m!==-1&&(s=m)}return c(a,s,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(a,s,f){for(var l=[],x=0,d=0;d<s;d++)if(d%4){var m=f[a.charCodeAt(d-1)]<<d%4*2,h=f[a.charCodeAt(d)]>>>6-d%4*2,v=m|h;l[x>>>2]|=v<<24-x%4*8,x++}return n.create(l,x)}})(),e.enc.Base64})});var e0=R((Oe,Qt)=>{(function(e,t){typeof Oe=="object"?Qt.exports=Oe=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Oe,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.enc,i=o.Base64url={stringify:function(a,s){s===void 0&&(s=!0);var f=a.words,l=a.sigBytes,x=s?this._safe_map:this._map;a.clamp();for(var d=[],m=0;m<l;m+=3)for(var h=f[m>>>2]>>>24-m%4*8&255,v=f[m+1>>>2]>>>24-(m+1)%4*8&255,b=f[m+2>>>2]>>>24-(m+2)%4*8&255,u=h<<16|v<<8|b,p=0;p<4&&m+p*.75<l;p++)d.push(x.charAt(u>>>6*(3-p)&63));var y=x.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(a,s){s===void 0&&(s=!0);var f=a.length,l=s?this._safe_map:this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var d=0;d<l.length;d++)x[l.charCodeAt(d)]=d}var m=l.charAt(64);if(m){var h=a.indexOf(m);h!==-1&&(f=h)}return c(a,f,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(a,s,f){for(var l=[],x=0,d=0;d<s;d++)if(d%4){var m=f[a.charCodeAt(d-1)]<<d%4*2,h=f[a.charCodeAt(d)]>>>6-d%4*2,v=m|h;l[x>>>2]|=v<<24-x%4*8,x++}return n.create(l,x)}})(),e.enc.Base64url})});var ne=R((je,t0)=>{(function(e,t){typeof je=="object"?t0.exports=je=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(je,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=[];(function(){for(var m=0;m<64;m++)a[m]=t.abs(t.sin(m+1))*4294967296|0})();var s=c.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,h){for(var v=0;v<16;v++){var b=h+v,u=m[b];m[b]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var p=this._hash.words,y=m[h+0],g=m[h+1],D=m[h+2],C=m[h+3],M=m[h+4],k=m[h+5],P=m[h+6],q=m[h+7],E=m[h+8],_=m[h+9],T=m[h+10],F=m[h+11],O=m[h+12],H=m[h+13],j=m[h+14],N=m[h+15],A=p[0],w=p[1],S=p[2],B=p[3];A=f(A,w,S,B,y,7,a[0]),B=f(B,A,w,S,g,12,a[1]),S=f(S,B,A,w,D,17,a[2]),w=f(w,S,B,A,C,22,a[3]),A=f(A,w,S,B,M,7,a[4]),B=f(B,A,w,S,k,12,a[5]),S=f(S,B,A,w,P,17,a[6]),w=f(w,S,B,A,q,22,a[7]),A=f(A,w,S,B,E,7,a[8]),B=f(B,A,w,S,_,12,a[9]),S=f(S,B,A,w,T,17,a[10]),w=f(w,S,B,A,F,22,a[11]),A=f(A,w,S,B,O,7,a[12]),B=f(B,A,w,S,H,12,a[13]),S=f(S,B,A,w,j,17,a[14]),w=f(w,S,B,A,N,22,a[15]),A=l(A,w,S,B,g,5,a[16]),B=l(B,A,w,S,P,9,a[17]),S=l(S,B,A,w,F,14,a[18]),w=l(w,S,B,A,y,20,a[19]),A=l(A,w,S,B,k,5,a[20]),B=l(B,A,w,S,T,9,a[21]),S=l(S,B,A,w,N,14,a[22]),w=l(w,S,B,A,M,20,a[23]),A=l(A,w,S,B,_,5,a[24]),B=l(B,A,w,S,j,9,a[25]),S=l(S,B,A,w,C,14,a[26]),w=l(w,S,B,A,E,20,a[27]),A=l(A,w,S,B,H,5,a[28]),B=l(B,A,w,S,D,9,a[29]),S=l(S,B,A,w,q,14,a[30]),w=l(w,S,B,A,O,20,a[31]),A=x(A,w,S,B,k,4,a[32]),B=x(B,A,w,S,E,11,a[33]),S=x(S,B,A,w,F,16,a[34]),w=x(w,S,B,A,j,23,a[35]),A=x(A,w,S,B,g,4,a[36]),B=x(B,A,w,S,M,11,a[37]),S=x(S,B,A,w,q,16,a[38]),w=x(w,S,B,A,T,23,a[39]),A=x(A,w,S,B,H,4,a[40]),B=x(B,A,w,S,y,11,a[41]),S=x(S,B,A,w,C,16,a[42]),w=x(w,S,B,A,P,23,a[43]),A=x(A,w,S,B,_,4,a[44]),B=x(B,A,w,S,O,11,a[45]),S=x(S,B,A,w,N,16,a[46]),w=x(w,S,B,A,D,23,a[47]),A=d(A,w,S,B,y,6,a[48]),B=d(B,A,w,S,q,10,a[49]),S=d(S,B,A,w,j,15,a[50]),w=d(w,S,B,A,k,21,a[51]),A=d(A,w,S,B,O,6,a[52]),B=d(B,A,w,S,C,10,a[53]),S=d(S,B,A,w,T,15,a[54]),w=d(w,S,B,A,g,21,a[55]),A=d(A,w,S,B,E,6,a[56]),B=d(B,A,w,S,N,10,a[57]),S=d(S,B,A,w,P,15,a[58]),w=d(w,S,B,A,H,21,a[59]),A=d(A,w,S,B,M,6,a[60]),B=d(B,A,w,S,F,10,a[61]),S=d(S,B,A,w,D,15,a[62]),w=d(w,S,B,A,_,21,a[63]),p[0]=p[0]+A|0,p[1]=p[1]+w|0,p[2]=p[2]+S|0,p[3]=p[3]+B|0},_doFinalize:function(){var m=this._data,h=m.words,v=this._nDataBytes*8,b=m.sigBytes*8;h[b>>>5]|=128<<24-b%32;var u=t.floor(v/4294967296),p=v;h[(b+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,h[(b+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,m.sigBytes=(h.length+1)*4,this._process();for(var y=this._hash,g=y.words,D=0;D<4;D++){var C=g[D];g[D]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return y},clone:function(){var m=i.clone.call(this);return m._hash=this._hash.clone(),m}});function f(m,h,v,b,u,p,y){var g=m+(h&v|~h&b)+u+y;return(g<<p|g>>>32-p)+h}function l(m,h,v,b,u,p,y){var g=m+(h&b|v&~b)+u+y;return(g<<p|g>>>32-p)+h}function x(m,h,v,b,u,p,y){var g=m+(h^v^b)+u+y;return(g<<p|g>>>32-p)+h}function d(m,h,v,b,u,p,y){var g=m+(v^(h|~b))+u+y;return(g<<p|g>>>32-p)+h}r.MD5=i._createHelper(s),r.HmacMD5=i._createHmacHelper(s)})(Math),e.MD5})});var Et=R((Le,r0)=>{(function(e,t){typeof Le=="object"?r0.exports=Le=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Le,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=r.Hasher,i=t.algo,c=[],a=i.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,f){for(var l=this._hash.words,x=l[0],d=l[1],m=l[2],h=l[3],v=l[4],b=0;b<80;b++){if(b<16)c[b]=s[f+b]|0;else{var u=c[b-3]^c[b-8]^c[b-14]^c[b-16];c[b]=u<<1|u>>>31}var p=(x<<5|x>>>27)+v+c[b];b<20?p+=(d&m|~d&h)+1518500249:b<40?p+=(d^m^h)+1859775393:b<60?p+=(d&m|d&h|m&h)-1894007588:p+=(d^m^h)-899497514,v=h,h=m,m=d<<30|d>>>2,d=x,x=p}l[0]=l[0]+x|0,l[1]=l[1]+d|0,l[2]=l[2]+m|0,l[3]=l[3]+h|0,l[4]=l[4]+v|0},_doFinalize:function(){var s=this._data,f=s.words,l=this._nDataBytes*8,x=s.sigBytes*8;return f[x>>>5]|=128<<24-x%32,f[(x+64>>>9<<4)+14]=Math.floor(l/4294967296),f[(x+64>>>9<<4)+15]=l,s.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var s=o.clone.call(this);return s._hash=this._hash.clone(),s}});t.SHA1=o._createHelper(a),t.HmacSHA1=o._createHmacHelper(a)})(),e.SHA1})});var ze=R((Re,n0)=>{(function(e,t){typeof Re=="object"?n0.exports=Re=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Re,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=[],s=[];(function(){function x(v){for(var b=t.sqrt(v),u=2;u<=b;u++)if(!(v%u))return!1;return!0}function d(v){return(v-(v|0))*4294967296|0}for(var m=2,h=0;h<64;)x(m)&&(h<8&&(a[h]=d(t.pow(m,1/2))),s[h]=d(t.pow(m,1/3)),h++),m++})();var f=[],l=c.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(x,d){for(var m=this._hash.words,h=m[0],v=m[1],b=m[2],u=m[3],p=m[4],y=m[5],g=m[6],D=m[7],C=0;C<64;C++){if(C<16)f[C]=x[d+C]|0;else{var M=f[C-15],k=(M<<25|M>>>7)^(M<<14|M>>>18)^M>>>3,P=f[C-2],q=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;f[C]=k+f[C-7]+q+f[C-16]}var E=p&y^~p&g,_=h&v^h&b^v&b,T=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22),F=(p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25),O=D+F+E+s[C]+f[C],H=T+_;D=g,g=y,y=p,p=u+O|0,u=b,b=v,v=h,h=O+H|0}m[0]=m[0]+h|0,m[1]=m[1]+v|0,m[2]=m[2]+b|0,m[3]=m[3]+u|0,m[4]=m[4]+p|0,m[5]=m[5]+y|0,m[6]=m[6]+g|0,m[7]=m[7]+D|0},_doFinalize:function(){var x=this._data,d=x.words,m=this._nDataBytes*8,h=x.sigBytes*8;return d[h>>>5]|=128<<24-h%32,d[(h+64>>>9<<4)+14]=t.floor(m/4294967296),d[(h+64>>>9<<4)+15]=m,x.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var x=i.clone.call(this);return x._hash=this._hash.clone(),x}});r.SHA256=i._createHelper(l),r.HmacSHA256=i._createHmacHelper(l)})(Math),e.SHA256})});var o0=R((Ne,a0)=>{(function(e,t,r){typeof Ne=="object"?a0.exports=Ne=t(z(),ze()):typeof define=="function"&&define.amd?define(["./core","./sha256"],t):t(e.CryptoJS)})(Ne,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=t.algo,i=o.SHA256,c=o.SHA224=i.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=i._doFinalize.call(this);return a.sigBytes-=4,a}});t.SHA224=i._createHelper(c),t.HmacSHA224=i._createHmacHelper(c)})(),e.SHA224})});var At=R(($e,i0)=>{(function(e,t,r){typeof $e=="object"?i0.exports=$e=t(z(),Ce()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})($e,function(e){return(function(){var t=e,r=t.lib,n=r.Hasher,o=t.x64,i=o.Word,c=o.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var f=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],l=[];(function(){for(var d=0;d<80;d++)l[d]=s()})();var x=a.SHA512=n.extend({_doReset:function(){this._hash=new c.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(d,m){for(var h=this._hash.words,v=h[0],b=h[1],u=h[2],p=h[3],y=h[4],g=h[5],D=h[6],C=h[7],M=v.high,k=v.low,P=b.high,q=b.low,E=u.high,_=u.low,T=p.high,F=p.low,O=y.high,H=y.low,j=g.high,N=g.low,A=D.high,w=D.low,S=C.high,B=C.low,I=M,$=k,U=P,L=q,pe=E,le=_,ht=T,xe=F,K=O,G=H,Ee=j,fe=N,Ae=A,he=w,mt=S,me=B,Z=0;Z<80;Z++){var J,ee,Be=l[Z];if(Z<16)ee=Be.high=d[m+Z*2]|0,J=Be.low=d[m+Z*2+1]|0;else{var Bt=l[Z-15],de=Bt.high,ve=Bt.low,nr=(de>>>1|ve<<31)^(de>>>8|ve<<24)^de>>>7,wt=(ve>>>1|de<<31)^(ve>>>8|de<<24)^(ve>>>7|de<<25),Ft=l[Z-2],ue=Ft.high,be=Ft.low,ar=(ue>>>19|be<<13)^(ue<<3|be>>>29)^ue>>>6,St=(be>>>19|ue<<13)^(be<<3|ue>>>29)^(be>>>6|ue<<26),kt=l[Z-7],or=kt.high,ir=kt.low,_t=l[Z-16],sr=_t.high,Mt=_t.low;J=wt+ir,ee=nr+or+(J>>>0<wt>>>0?1:0),J=J+St,ee=ee+ar+(J>>>0<St>>>0?1:0),J=J+Mt,ee=ee+sr+(J>>>0<Mt>>>0?1:0),Be.high=ee,Be.low=J}var cr=K&Ee^~K&Ae,Pt=G&fe^~G&he,lr=I&U^I&pe^U&pe,dr=$&L^$&le^L&le,ur=(I>>>28|$<<4)^(I<<30|$>>>2)^(I<<25|$>>>7),Tt=($>>>28|I<<4)^($<<30|I>>>2)^($<<25|I>>>7),pr=(K>>>14|G<<18)^(K>>>18|G<<14)^(K<<23|G>>>9),xr=(G>>>14|K<<18)^(G>>>18|K<<14)^(G<<23|K>>>9),qt=f[Z],fr=qt.high,Ht=qt.low,Y=me+xr,te=mt+pr+(Y>>>0<me>>>0?1:0),Y=Y+Pt,te=te+cr+(Y>>>0<Pt>>>0?1:0),Y=Y+Ht,te=te+fr+(Y>>>0<Ht>>>0?1:0),Y=Y+J,te=te+ee+(Y>>>0<J>>>0?1:0),Ot=Tt+dr,hr=ur+lr+(Ot>>>0<Tt>>>0?1:0);mt=Ae,me=he,Ae=Ee,he=fe,Ee=K,fe=G,G=xe+Y|0,K=ht+te+(G>>>0<xe>>>0?1:0)|0,ht=pe,xe=le,pe=U,le=L,U=I,L=$,$=Y+Ot|0,I=te+hr+($>>>0<Y>>>0?1:0)|0}k=v.low=k+$,v.high=M+I+(k>>>0<$>>>0?1:0),q=b.low=q+L,b.high=P+U+(q>>>0<L>>>0?1:0),_=u.low=_+le,u.high=E+pe+(_>>>0<le>>>0?1:0),F=p.low=F+xe,p.high=T+ht+(F>>>0<xe>>>0?1:0),H=y.low=H+G,y.high=O+K+(H>>>0<G>>>0?1:0),N=g.low=N+fe,g.high=j+Ee+(N>>>0<fe>>>0?1:0),w=D.low=w+he,D.high=A+Ae+(w>>>0<he>>>0?1:0),B=C.low=B+me,C.high=S+mt+(B>>>0<me>>>0?1:0)},_doFinalize:function(){var d=this._data,m=d.words,h=this._nDataBytes*8,v=d.sigBytes*8;m[v>>>5]|=128<<24-v%32,m[(v+128>>>10<<5)+30]=Math.floor(h/4294967296),m[(v+128>>>10<<5)+31]=h,d.sigBytes=m.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var d=n.clone.call(this);return d._hash=this._hash.clone(),d},blockSize:1024/32});t.SHA512=n._createHelper(x),t.HmacSHA512=n._createHmacHelper(x)})(),e.SHA512})});var c0=R((Ie,s0)=>{(function(e,t,r){typeof Ie=="object"?s0.exports=Ie=t(z(),Ce(),At()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],t):t(e.CryptoJS)})(Ie,function(e){return(function(){var t=e,r=t.x64,n=r.Word,o=r.WordArray,i=t.algo,c=i.SHA512,a=i.SHA384=c.extend({_doReset:function(){this._hash=new o.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var s=c._doFinalize.call(this);return s.sigBytes-=16,s}});t.SHA384=c._createHelper(a),t.HmacSHA384=c._createHmacHelper(a)})(),e.SHA384})});var d0=R((We,l0)=>{(function(e,t,r){typeof We=="object"?l0.exports=We=t(z(),Ce()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],t):t(e.CryptoJS)})(We,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.x64,a=c.Word,s=r.algo,f=[],l=[],x=[];(function(){for(var h=1,v=0,b=0;b<24;b++){f[h+5*v]=(b+1)*(b+2)/2%64;var u=v%5,p=(2*h+3*v)%5;h=u,v=p}for(var h=0;h<5;h++)for(var v=0;v<5;v++)l[h+5*v]=v+(2*h+3*v)%5*5;for(var y=1,g=0;g<24;g++){for(var D=0,C=0,M=0;M<7;M++){if(y&1){var k=(1<<M)-1;k<32?C^=1<<k:D^=1<<k-32}y&128?y=y<<1^113:y<<=1}x[g]=a.create(D,C)}})();var d=[];(function(){for(var h=0;h<25;h++)d[h]=a.create()})();var m=s.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],v=0;v<25;v++)h[v]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,v){for(var b=this._state,u=this.blockSize/2,p=0;p<u;p++){var y=h[v+2*p],g=h[v+2*p+1];y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;var D=b[p];D.high^=g,D.low^=y}for(var C=0;C<24;C++){for(var M=0;M<5;M++){for(var k=0,P=0,q=0;q<5;q++){var D=b[M+5*q];k^=D.high,P^=D.low}var E=d[M];E.high=k,E.low=P}for(var M=0;M<5;M++)for(var _=d[(M+4)%5],T=d[(M+1)%5],F=T.high,O=T.low,k=_.high^(F<<1|O>>>31),P=_.low^(O<<1|F>>>31),q=0;q<5;q++){var D=b[M+5*q];D.high^=k,D.low^=P}for(var H=1;H<25;H++){var k,P,D=b[H],j=D.high,N=D.low,A=f[H];A<32?(k=j<<A|N>>>32-A,P=N<<A|j>>>32-A):(k=N<<A-32|j>>>64-A,P=j<<A-32|N>>>64-A);var w=d[l[H]];w.high=k,w.low=P}var S=d[0],B=b[0];S.high=B.high,S.low=B.low;for(var M=0;M<5;M++)for(var q=0;q<5;q++){var H=M+5*q,D=b[H],I=d[H],$=d[(M+1)%5+5*q],U=d[(M+2)%5+5*q];D.high=I.high^~$.high&U.high,D.low=I.low^~$.low&U.low}var D=b[0],L=x[C];D.high^=L.high,D.low^=L.low}},_doFinalize:function(){var h=this._data,v=h.words,b=this._nDataBytes*8,u=h.sigBytes*8,p=this.blockSize*32;v[u>>>5]|=1<<24-u%32,v[(t.ceil((u+1)/p)*p>>>5)-1]|=128,h.sigBytes=v.length*4,this._process();for(var y=this._state,g=this.cfg.outputLength/8,D=g/8,C=[],M=0;M<D;M++){var k=y[M],P=k.high,q=k.low;P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,q=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360,C.push(q),C.push(P)}return new o.init(C,g)},clone:function(){for(var h=i.clone.call(this),v=h._state=this._state.slice(0),b=0;b<25;b++)v[b]=v[b].clone();return h}});r.SHA3=i._createHelper(m),r.HmacSHA3=i._createHmacHelper(m)})(Math),e.SHA3})});var p0=R((Ue,u0)=>{(function(e,t){typeof Ue=="object"?u0.exports=Ue=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ue,function(e){return(function(t){var r=e,n=r.lib,o=n.WordArray,i=n.Hasher,c=r.algo,a=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),x=o.create([0,1518500249,1859775393,2400959708,2840853838]),d=o.create([1352829926,1548603684,1836072691,2053994217,0]),m=c.RIPEMD160=i.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(g,D){for(var C=0;C<16;C++){var M=D+C,k=g[M];g[M]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var P=this._hash.words,q=x.words,E=d.words,_=a.words,T=s.words,F=f.words,O=l.words,H,j,N,A,w,S,B,I,$,U;S=H=P[0],B=j=P[1],I=N=P[2],$=A=P[3],U=w=P[4];for(var L,C=0;C<80;C+=1)L=H+g[D+_[C]]|0,C<16?L+=h(j,N,A)+q[0]:C<32?L+=v(j,N,A)+q[1]:C<48?L+=b(j,N,A)+q[2]:C<64?L+=u(j,N,A)+q[3]:L+=p(j,N,A)+q[4],L=L|0,L=y(L,F[C]),L=L+w|0,H=w,w=A,A=y(N,10),N=j,j=L,L=S+g[D+T[C]]|0,C<16?L+=p(B,I,$)+E[0]:C<32?L+=u(B,I,$)+E[1]:C<48?L+=b(B,I,$)+E[2]:C<64?L+=v(B,I,$)+E[3]:L+=h(B,I,$)+E[4],L=L|0,L=y(L,O[C]),L=L+U|0,S=U,U=$,$=y(I,10),I=B,B=L;L=P[1]+N+$|0,P[1]=P[2]+A+U|0,P[2]=P[3]+w+S|0,P[3]=P[4]+H+B|0,P[4]=P[0]+j+I|0,P[0]=L},_doFinalize:function(){var g=this._data,D=g.words,C=this._nDataBytes*8,M=g.sigBytes*8;D[M>>>5]|=128<<24-M%32,D[(M+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,g.sigBytes=(D.length+1)*4,this._process();for(var k=this._hash,P=k.words,q=0;q<5;q++){var E=P[q];P[q]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return k},clone:function(){var g=i.clone.call(this);return g._hash=this._hash.clone(),g}});function h(g,D,C){return g^D^C}function v(g,D,C){return g&D|~g&C}function b(g,D,C){return(g|~D)^C}function u(g,D,C){return g&C|D&~C}function p(g,D,C){return g^(D|~C)}function y(g,D){return g<<D|g>>>32-D}r.RIPEMD160=i._createHelper(m),r.HmacRIPEMD160=i._createHmacHelper(m)})(Math),e.RIPEMD160})});var Ye=R((Ge,x0)=>{(function(e,t){typeof Ge=="object"?x0.exports=Ge=t(z()):typeof define=="function"&&define.amd?define(["./core"],t):t(e.CryptoJS)})(Ge,function(e){(function(){var t=e,r=t.lib,n=r.Base,o=t.enc,i=o.Utf8,c=t.algo,a=c.HMAC=n.extend({init:function(s,f){s=this._hasher=new s.init,typeof f=="string"&&(f=i.parse(f));var l=s.blockSize,x=l*4;f.sigBytes>x&&(f=s.finalize(f)),f.clamp();for(var d=this._oKey=f.clone(),m=this._iKey=f.clone(),h=d.words,v=m.words,b=0;b<l;b++)h[b]^=1549556828,v[b]^=909522486;d.sigBytes=m.sigBytes=x,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var f=this._hasher,l=f.finalize(s);f.reset();var x=f.finalize(this._oKey.clone().concat(l));return x}})})()})});var h0=R((Je,f0)=>{(function(e,t,r){typeof Je=="object"?f0.exports=Je=t(z(),ze(),Ye()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],t):t(e.CryptoJS)})(Je,function(e){return(function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,c=i.SHA256,a=i.HMAC,s=i.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:25e4}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,l){for(var x=this.cfg,d=a.create(x.hasher,f),m=o.create(),h=o.create([1]),v=m.words,b=h.words,u=x.keySize,p=x.iterations;v.length<u;){var y=d.update(l).finalize(h);d.reset();for(var g=y.words,D=g.length,C=y,M=1;M<p;M++){C=d.finalize(C),d.reset();for(var k=C.words,P=0;P<D;P++)g[P]^=k[P]}m.concat(y),b[0]++}return m.sigBytes=u*4,m}});t.PBKDF2=function(f,l,x){return s.create(x).compute(f,l)}})(),e.PBKDF2})});var V=R((Ke,m0)=>{(function(e,t,r){typeof Ke=="object"?m0.exports=Ke=t(z(),Et(),Ye()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],t):t(e.CryptoJS)})(Ke,function(e){return(function(){var t=e,r=t.lib,n=r.Base,o=r.WordArray,i=t.algo,c=i.MD5,a=i.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:c,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,f){for(var l,x=this.cfg,d=x.hasher.create(),m=o.create(),h=m.words,v=x.keySize,b=x.iterations;h.length<v;){l&&d.update(l),l=d.update(s).finalize(f),d.reset();for(var u=1;u<b;u++)l=d.finalize(l),d.reset();m.concat(l)}return m.sigBytes=v*4,m}});t.EvpKDF=function(s,f,l){return a.create(l).compute(s,f)}})(),e.EvpKDF})});var W=R((Ze,v0)=>{(function(e,t,r){typeof Ze=="object"?v0.exports=Ze=t(z(),V()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],t):t(e.CryptoJS)})(Ze,function(e){e.lib.Cipher||(function(t){var r=e,n=r.lib,o=n.Base,i=n.WordArray,c=n.BufferedBlockAlgorithm,a=r.enc,s=a.Utf8,f=a.Base64,l=r.algo,x=l.EvpKDF,d=n.Cipher=c.extend({cfg:o.extend(),createEncryptor:function(E,_){return this.create(this._ENC_XFORM_MODE,E,_)},createDecryptor:function(E,_){return this.create(this._DEC_XFORM_MODE,E,_)},init:function(E,_,T){this.cfg=this.cfg.extend(T),this._xformMode=E,this._key=_,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function E(_){return typeof _=="string"?q:M}return function(_){return{encrypt:function(T,F,O){return E(F).encrypt(_,T,F,O)},decrypt:function(T,F,O){return E(F).decrypt(_,T,F,O)}}}})()}),m=n.StreamCipher=d.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),h=r.mode={},v=n.BlockCipherMode=o.extend({createEncryptor:function(E,_){return this.Encryptor.create(E,_)},createDecryptor:function(E,_){return this.Decryptor.create(E,_)},init:function(E,_){this._cipher=E,this._iv=_}}),b=h.CBC=(function(){var E=v.extend();E.Encryptor=E.extend({processBlock:function(T,F){var O=this._cipher,H=O.blockSize;_.call(this,T,F,H),O.encryptBlock(T,F),this._prevBlock=T.slice(F,F+H)}}),E.Decryptor=E.extend({processBlock:function(T,F){var O=this._cipher,H=O.blockSize,j=T.slice(F,F+H);O.decryptBlock(T,F),_.call(this,T,F,H),this._prevBlock=j}});function _(T,F,O){var H,j=this._iv;j?(H=j,this._iv=t):H=this._prevBlock;for(var N=0;N<O;N++)T[F+N]^=H[N]}return E})(),u=r.pad={},p=u.Pkcs7={pad:function(E,_){for(var T=_*4,F=T-E.sigBytes%T,O=F<<24|F<<16|F<<8|F,H=[],j=0;j<F;j+=4)H.push(O);var N=i.create(H,F);E.concat(N)},unpad:function(E){var _=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=_}},y=n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:b,padding:p}),reset:function(){var E;d.reset.call(this);var _=this.cfg,T=_.iv,F=_.mode;this._xformMode==this._ENC_XFORM_MODE?E=F.createEncryptor:(E=F.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,T&&T.words):(this._mode=E.call(F,this,T&&T.words),this._mode.__creator=E)},_doProcessBlock:function(E,_){this._mode.processBlock(E,_)},_doFinalize:function(){var E,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),_.unpad(E)),E},blockSize:128/32}),g=n.CipherParams=o.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),D=r.format={},C=D.OpenSSL={stringify:function(E){var _,T=E.ciphertext,F=E.salt;return F?_=i.create([1398893684,1701076831]).concat(F).concat(T):_=T,_.toString(f)},parse:function(E){var _,T=f.parse(E),F=T.words;return F[0]==1398893684&&F[1]==1701076831&&(_=i.create(F.slice(2,4)),F.splice(0,4),T.sigBytes-=16),g.create({ciphertext:T,salt:_})}},M=n.SerializableCipher=o.extend({cfg:o.extend({format:C}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var O=E.createEncryptor(T,F),H=O.finalize(_),j=O.cfg;return g.create({ciphertext:H,key:T,iv:j.iv,algorithm:E,mode:j.mode,padding:j.padding,blockSize:E.blockSize,formatter:F.format})},decrypt:function(E,_,T,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var O=E.createDecryptor(T,F).finalize(_.ciphertext);return O},_parse:function(E,_){return typeof E=="string"?_.parse(E,this):E}}),k=r.kdf={},P=k.OpenSSL={execute:function(E,_,T,F,O){if(F||(F=i.random(64/8)),O)var H=x.create({keySize:_+T,hasher:O}).compute(E,F);else var H=x.create({keySize:_+T}).compute(E,F);var j=i.create(H.words.slice(_),T*4);return H.sigBytes=_*4,g.create({key:H,iv:j,salt:F})}},q=n.PasswordBasedCipher=M.extend({cfg:M.cfg.extend({kdf:P}),encrypt:function(E,_,T,F){F=this.cfg.extend(F);var O=F.kdf.execute(T,E.keySize,E.ivSize,F.salt,F.hasher);F.iv=O.iv;var H=M.encrypt.call(this,E,_,O.key,F);return H.mixIn(O),H},decrypt:function(E,_,T,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var O=F.kdf.execute(T,E.keySize,E.ivSize,_.salt,F.hasher);F.iv=O.iv;var H=M.decrypt.call(this,E,_,O.key,F);return H}})})()})});var g0=R((Xe,b0)=>{(function(e,t,r){typeof Xe=="object"?b0.exports=Xe=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Xe,function(e){return e.mode.CFB=(function(){var t=e.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize;r.call(this,n,o,c,i),this._prevBlock=n.slice(o,o+c)}}),t.Decryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=n.slice(o,o+c);r.call(this,n,o,c,i),this._prevBlock=a}});function r(n,o,i,c){var a,s=this._iv;s?(a=s.slice(0),this._iv=void 0):a=this._prevBlock,c.encryptBlock(a,0);for(var f=0;f<i;f++)n[o+f]^=a[f]}return t})(),e.mode.CFB})});var D0=R((Ve,y0)=>{(function(e,t,r){typeof Ve=="object"?y0.exports=Ve=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Ve,function(e){return e.mode.CTR=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=this._iv,s=this._counter;a&&(s=this._counter=a.slice(0),this._iv=void 0);var f=s.slice(0);i.encryptBlock(f,0),s[c-1]=s[c-1]+1|0;for(var l=0;l<c;l++)n[o+l]^=f[l]}});return t.Decryptor=r,t})(),e.mode.CTR})});var E0=R((Qe,C0)=>{(function(e,t,r){typeof Qe=="object"?C0.exports=Qe=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(Qe,function(e){return e.mode.CTRGladman=(function(){var t=e.lib.BlockCipherMode.extend();function r(i){if((i>>24&255)===255){var c=i>>16&255,a=i>>8&255,s=i&255;c===255?(c=0,a===255?(a=0,s===255?s=0:++s):++a):++c,i=0,i+=c<<16,i+=a<<8,i+=s}else i+=1<<24;return i}function n(i){return(i[0]=r(i[0]))===0&&(i[1]=r(i[1])),i}var o=t.Encryptor=t.extend({processBlock:function(i,c){var a=this._cipher,s=a.blockSize,f=this._iv,l=this._counter;f&&(l=this._counter=f.slice(0),this._iv=void 0),n(l);var x=l.slice(0);a.encryptBlock(x,0);for(var d=0;d<s;d++)i[c+d]^=x[d]}});return t.Decryptor=o,t})(),e.mode.CTRGladman})});var B0=R((et,A0)=>{(function(e,t,r){typeof et=="object"?A0.exports=et=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(et,function(e){return e.mode.OFB=(function(){var t=e.lib.BlockCipherMode.extend(),r=t.Encryptor=t.extend({processBlock:function(n,o){var i=this._cipher,c=i.blockSize,a=this._iv,s=this._keystream;a&&(s=this._keystream=a.slice(0),this._iv=void 0),i.encryptBlock(s,0);for(var f=0;f<c;f++)n[o+f]^=s[f]}});return t.Decryptor=r,t})(),e.mode.OFB})});var F0=R((tt,w0)=>{(function(e,t,r){typeof tt=="object"?w0.exports=tt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(tt,function(e){return e.mode.ECB=(function(){var t=e.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(r,n){this._cipher.encryptBlock(r,n)}}),t.Decryptor=t.extend({processBlock:function(r,n){this._cipher.decryptBlock(r,n)}}),t})(),e.mode.ECB})});var k0=R((rt,S0)=>{(function(e,t,r){typeof rt=="object"?S0.exports=rt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(rt,function(e){return e.pad.AnsiX923={pad:function(t,r){var n=t.sigBytes,o=r*4,i=o-n%o,c=n+i-1;t.clamp(),t.words[c>>>2]|=i<<24-c%4*8,t.sigBytes+=i},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Ansix923})});var M0=R((nt,_0)=>{(function(e,t,r){typeof nt=="object"?_0.exports=nt=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(nt,function(e){return e.pad.Iso10126={pad:function(t,r){var n=r*4,o=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(o-1)).concat(e.lib.WordArray.create([o<<24],1))},unpad:function(t){var r=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=r}},e.pad.Iso10126})});var T0=R((at,P0)=>{(function(e,t,r){typeof at=="object"?P0.exports=at=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(at,function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})});var H0=R((ot,q0)=>{(function(e,t,r){typeof ot=="object"?q0.exports=ot=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(ot,function(e){return e.pad.ZeroPadding={pad:function(t,r){var n=r*4;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){for(var r=t.words,n=t.sigBytes-1,n=t.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},e.pad.ZeroPadding})});var j0=R((it,O0)=>{(function(e,t,r){typeof it=="object"?O0.exports=it=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(it,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})});var R0=R((st,L0)=>{(function(e,t,r){typeof st=="object"?L0.exports=st=t(z(),W()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],t):t(e.CryptoJS)})(st,function(e){return(function(t){var r=e,n=r.lib,o=n.CipherParams,i=r.enc,c=i.Hex,a=r.format,s=a.Hex={stringify:function(f){return f.ciphertext.toString(c)},parse:function(f){var l=c.parse(f);return o.create({ciphertext:l})}}})(),e.format.Hex})});var N0=R((ct,z0)=>{(function(e,t,r){typeof ct=="object"?z0.exports=ct=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ct,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,o=t.algo,i=[],c=[],a=[],s=[],f=[],l=[],x=[],d=[],m=[],h=[];(function(){for(var u=[],p=0;p<256;p++)p<128?u[p]=p<<1:u[p]=p<<1^283;for(var y=0,g=0,p=0;p<256;p++){var D=g^g<<1^g<<2^g<<3^g<<4;D=D>>>8^D&255^99,i[y]=D,c[D]=y;var C=u[y],M=u[C],k=u[M],P=u[D]*257^D*16843008;a[y]=P<<24|P>>>8,s[y]=P<<16|P>>>16,f[y]=P<<8|P>>>24,l[y]=P;var P=k*16843009^M*65537^C*257^y*16843008;x[D]=P<<24|P>>>8,d[D]=P<<16|P>>>16,m[D]=P<<8|P>>>24,h[D]=P,y?(y=C^u[u[u[k^C]]],g^=u[u[g]]):y=g=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],b=o.AES=n.extend({_doReset:function(){var u;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var p=this._keyPriorReset=this._key,y=p.words,g=p.sigBytes/4,D=this._nRounds=g+6,C=(D+1)*4,M=this._keySchedule=[],k=0;k<C;k++)k<g?M[k]=y[k]:(u=M[k-1],k%g?g>6&&k%g==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[u&255]):(u=u<<8|u>>>24,u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[u&255],u^=v[k/g|0]<<24),M[k]=M[k-g]^u);for(var P=this._invKeySchedule=[],q=0;q<C;q++){var k=C-q;if(q%4)var u=M[k];else var u=M[k-4];q<4||k<=4?P[q]=u:P[q]=x[i[u>>>24]]^d[i[u>>>16&255]]^m[i[u>>>8&255]]^h[i[u&255]]}}},encryptBlock:function(u,p){this._doCryptBlock(u,p,this._keySchedule,a,s,f,l,i)},decryptBlock:function(u,p){var y=u[p+1];u[p+1]=u[p+3],u[p+3]=y,this._doCryptBlock(u,p,this._invKeySchedule,x,d,m,h,c);var y=u[p+1];u[p+1]=u[p+3],u[p+3]=y},_doCryptBlock:function(u,p,y,g,D,C,M,k){for(var P=this._nRounds,q=u[p]^y[0],E=u[p+1]^y[1],_=u[p+2]^y[2],T=u[p+3]^y[3],F=4,O=1;O<P;O++){var H=g[q>>>24]^D[E>>>16&255]^C[_>>>8&255]^M[T&255]^y[F++],j=g[E>>>24]^D[_>>>16&255]^C[T>>>8&255]^M[q&255]^y[F++],N=g[_>>>24]^D[T>>>16&255]^C[q>>>8&255]^M[E&255]^y[F++],A=g[T>>>24]^D[q>>>16&255]^C[E>>>8&255]^M[_&255]^y[F++];q=H,E=j,_=N,T=A}var H=(k[q>>>24]<<24|k[E>>>16&255]<<16|k[_>>>8&255]<<8|k[T&255])^y[F++],j=(k[E>>>24]<<24|k[_>>>16&255]<<16|k[T>>>8&255]<<8|k[q&255])^y[F++],N=(k[_>>>24]<<24|k[T>>>16&255]<<16|k[q>>>8&255]<<8|k[E&255])^y[F++],A=(k[T>>>24]<<24|k[q>>>16&255]<<16|k[E>>>8&255]<<8|k[_&255])^y[F++];u[p]=H,u[p+1]=j,u[p+2]=N,u[p+3]=A},keySize:256/32});t.AES=n._createHelper(b)})(),e.AES})});var I0=R((lt,$0)=>{(function(e,t,r){typeof lt=="object"?$0.exports=lt=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(lt,function(e){return(function(){var t=e,r=t.lib,n=r.WordArray,o=r.BlockCipher,i=t.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],x=i.DES=o.extend({_doReset:function(){for(var v=this._key,b=v.words,u=[],p=0;p<56;p++){var y=c[p]-1;u[p]=b[y>>>5]>>>31-y%32&1}for(var g=this._subKeys=[],D=0;D<16;D++){for(var C=g[D]=[],M=s[D],p=0;p<24;p++)C[p/6|0]|=u[(a[p]-1+M)%28]<<31-p%6,C[4+(p/6|0)]|=u[28+(a[p+24]-1+M)%28]<<31-p%6;C[0]=C[0]<<1|C[0]>>>31;for(var p=1;p<7;p++)C[p]=C[p]>>>(p-1)*4+3;C[7]=C[7]<<5|C[7]>>>27}for(var k=this._invSubKeys=[],p=0;p<16;p++)k[p]=g[15-p]},encryptBlock:function(v,b){this._doCryptBlock(v,b,this._subKeys)},decryptBlock:function(v,b){this._doCryptBlock(v,b,this._invSubKeys)},_doCryptBlock:function(v,b,u){this._lBlock=v[b],this._rBlock=v[b+1],d.call(this,4,252645135),d.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),d.call(this,1,1431655765);for(var p=0;p<16;p++){for(var y=u[p],g=this._lBlock,D=this._rBlock,C=0,M=0;M<8;M++)C|=f[M][((D^y[M])&l[M])>>>0];this._lBlock=D,this._rBlock=g^C}var k=this._lBlock;this._lBlock=this._rBlock,this._rBlock=k,d.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),v[b]=this._lBlock,v[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function d(v,b){var u=(this._lBlock>>>v^this._rBlock)&b;this._rBlock^=u,this._lBlock^=u<<v}function m(v,b){var u=(this._rBlock>>>v^this._lBlock)&b;this._lBlock^=u,this._rBlock^=u<<v}t.DES=o._createHelper(x);var h=i.TripleDES=o.extend({_doReset:function(){var v=this._key,b=v.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var u=b.slice(0,2),p=b.length<4?b.slice(0,2):b.slice(2,4),y=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=x.createEncryptor(n.create(u)),this._des2=x.createEncryptor(n.create(p)),this._des3=x.createEncryptor(n.create(y))},encryptBlock:function(v,b){this._des1.encryptBlock(v,b),this._des2.decryptBlock(v,b),this._des3.encryptBlock(v,b)},decryptBlock:function(v,b){this._des3.decryptBlock(v,b),this._des2.encryptBlock(v,b),this._des1.decryptBlock(v,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=o._createHelper(h)})(),e.TripleDES})});var U0=R((dt,W0)=>{(function(e,t,r){typeof dt=="object"?W0.exports=dt=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(dt,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=o.RC4=n.extend({_doReset:function(){for(var s=this._key,f=s.words,l=s.sigBytes,x=this._S=[],d=0;d<256;d++)x[d]=d;for(var d=0,m=0;d<256;d++){var h=d%l,v=f[h>>>2]>>>24-h%4*8&255;m=(m+x[d]+v)%256;var b=x[d];x[d]=x[m],x[m]=b}this._i=this._j=0},_doProcessBlock:function(s,f){s[f]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var s=this._S,f=this._i,l=this._j,x=0,d=0;d<4;d++){f=(f+1)%256,l=(l+s[f])%256;var m=s[f];s[f]=s[l],s[l]=m,x|=s[(s[f]+s[l])%256]<<24-d*8}return this._i=f,this._j=l,x}t.RC4=n._createHelper(i);var a=o.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var s=this.cfg.drop;s>0;s--)c.call(this)}});t.RC4Drop=n._createHelper(a)})(),e.RC4})});var Y0=R((ut,G0)=>{(function(e,t,r){typeof ut=="object"?G0.exports=ut=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(ut,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=[],c=[],a=[],s=o.Rabbit=n.extend({_doReset:function(){for(var l=this._key.words,x=this.cfg.iv,d=0;d<4;d++)l[d]=(l[d]<<8|l[d]>>>24)&16711935|(l[d]<<24|l[d]>>>8)&4278255360;var m=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],h=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var d=0;d<4;d++)f.call(this);for(var d=0;d<8;d++)h[d]^=m[d+4&7];if(x){var v=x.words,b=v[0],u=v[1],p=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,g=p>>>16|y&4294901760,D=y<<16|p&65535;h[0]^=p,h[1]^=g,h[2]^=y,h[3]^=D,h[4]^=p,h[5]^=g,h[6]^=y,h[7]^=D;for(var d=0;d<4;d++)f.call(this)}},_doProcessBlock:function(l,x){var d=this._X;f.call(this),i[0]=d[0]^d[5]>>>16^d[3]<<16,i[1]=d[2]^d[7]>>>16^d[5]<<16,i[2]=d[4]^d[1]>>>16^d[7]<<16,i[3]=d[6]^d[3]>>>16^d[1]<<16;for(var m=0;m<4;m++)i[m]=(i[m]<<8|i[m]>>>24)&16711935|(i[m]<<24|i[m]>>>8)&4278255360,l[x+m]^=i[m]},blockSize:128/32,ivSize:64/32});function f(){for(var l=this._X,x=this._C,d=0;d<8;d++)c[d]=x[d];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<c[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<c[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<c[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<c[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<c[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<c[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<c[6]>>>0?1:0)|0,this._b=x[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var m=l[d]+x[d],h=m&65535,v=m>>>16,b=((h*h>>>17)+h*v>>>15)+v*v,u=((m&4294901760)*m|0)+((m&65535)*m|0);a[d]=b^u}l[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,l[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,l[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,l[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,l[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,l[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,l[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,l[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=n._createHelper(s)})(),e.Rabbit})});var K0=R((pt,J0)=>{(function(e,t,r){typeof pt=="object"?J0.exports=pt=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(pt,function(e){return(function(){var t=e,r=t.lib,n=r.StreamCipher,o=t.algo,i=[],c=[],a=[],s=o.RabbitLegacy=n.extend({_doReset:function(){var l=this._key.words,x=this.cfg.iv,d=this._X=[l[0],l[3]<<16|l[2]>>>16,l[1],l[0]<<16|l[3]>>>16,l[2],l[1]<<16|l[0]>>>16,l[3],l[2]<<16|l[1]>>>16],m=this._C=[l[2]<<16|l[2]>>>16,l[0]&4294901760|l[1]&65535,l[3]<<16|l[3]>>>16,l[1]&4294901760|l[2]&65535,l[0]<<16|l[0]>>>16,l[2]&4294901760|l[3]&65535,l[1]<<16|l[1]>>>16,l[3]&4294901760|l[0]&65535];this._b=0;for(var h=0;h<4;h++)f.call(this);for(var h=0;h<8;h++)m[h]^=d[h+4&7];if(x){var v=x.words,b=v[0],u=v[1],p=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,y=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,g=p>>>16|y&4294901760,D=y<<16|p&65535;m[0]^=p,m[1]^=g,m[2]^=y,m[3]^=D,m[4]^=p,m[5]^=g,m[6]^=y,m[7]^=D;for(var h=0;h<4;h++)f.call(this)}},_doProcessBlock:function(l,x){var d=this._X;f.call(this),i[0]=d[0]^d[5]>>>16^d[3]<<16,i[1]=d[2]^d[7]>>>16^d[5]<<16,i[2]=d[4]^d[1]>>>16^d[7]<<16,i[3]=d[6]^d[3]>>>16^d[1]<<16;for(var m=0;m<4;m++)i[m]=(i[m]<<8|i[m]>>>24)&16711935|(i[m]<<24|i[m]>>>8)&4278255360,l[x+m]^=i[m]},blockSize:128/32,ivSize:64/32});function f(){for(var l=this._X,x=this._C,d=0;d<8;d++)c[d]=x[d];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<c[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<c[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<c[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<c[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<c[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<c[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<c[6]>>>0?1:0)|0,this._b=x[7]>>>0<c[7]>>>0?1:0;for(var d=0;d<8;d++){var m=l[d]+x[d],h=m&65535,v=m>>>16,b=((h*h>>>17)+h*v>>>15)+v*v,u=((m&4294901760)*m|0)+((m&65535)*m|0);a[d]=b^u}l[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,l[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,l[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,l[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,l[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,l[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,l[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,l[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=n._createHelper(s)})(),e.RabbitLegacy})});var X0=R((xt,Z0)=>{(function(e,t,r){typeof xt=="object"?Z0.exports=xt=t(z(),re(),ne(),V(),W()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)})(xt,function(e){return(function(){var t=e,r=t.lib,n=r.BlockCipher,o=t.algo;let i=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function f(h,v){let b=v>>24&255,u=v>>16&255,p=v>>8&255,y=v&255,g=h.sbox[0][b]+h.sbox[1][u];return g=g^h.sbox[2][p],g=g+h.sbox[3][y],g}function l(h,v,b){let u=v,p=b,y;for(let g=0;g<i;++g)u=u^h.pbox[g],p=f(h,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^h.pbox[i],u=u^h.pbox[i+1],{left:u,right:p}}function x(h,v,b){let u=v,p=b,y;for(let g=i+1;g>1;--g)u=u^h.pbox[g],p=f(h,u)^p,y=u,u=p,p=y;return y=u,u=p,p=y,p=p^h.pbox[1],u=u^h.pbox[0],{left:u,right:p}}function d(h,v,b){for(let D=0;D<4;D++){h.sbox[D]=[];for(let C=0;C<256;C++)h.sbox[D][C]=a[D][C]}let u=0;for(let D=0;D<i+2;D++)h.pbox[D]=c[D]^v[u],u++,u>=b&&(u=0);let p=0,y=0,g=0;for(let D=0;D<i+2;D+=2)g=l(h,p,y),p=g.left,y=g.right,h.pbox[D]=p,h.pbox[D+1]=y;for(let D=0;D<4;D++)for(let C=0;C<256;C+=2)g=l(h,p,y),p=g.left,y=g.right,h.sbox[D][C]=p,h.sbox[D][C+1]=y;return!0}var m=o.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var h=this._keyPriorReset=this._key,v=h.words,b=h.sigBytes/4;d(s,v,b)}},encryptBlock:function(h,v){var b=l(s,h[v],h[v+1]);h[v]=b.left,h[v+1]=b.right},decryptBlock:function(h,v){var b=x(s,h[v],h[v+1]);h[v]=b.left,h[v+1]=b.right},blockSize:64/32,keySize:128/32,ivSize:64/32});t.Blowfish=n._createHelper(m)})(),e.Blowfish})});var Q0=R((ft,V0)=>{(function(e,t,r){typeof ft=="object"?V0.exports=ft=t(z(),Ce(),Kt(),Xt(),re(),e0(),ne(),Et(),ze(),o0(),At(),c0(),d0(),p0(),Ye(),h0(),V(),W(),g0(),D0(),E0(),B0(),F0(),k0(),M0(),T0(),H0(),j0(),R0(),N0(),I0(),U0(),Y0(),K0(),X0()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],t):e.CryptoJS=t(e.CryptoJS)})(ft,function(e){return e})});var vt={name:"dphelper",version:"3.1.2",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/dphelper.d.ts",typings:"./types/*",copyright:"Dario Passariello",homepage:"https://a51.gitbook.io/dphelper",author:"Dario Passariello <dariopassariello@gmail.com>",support:{name:"Dario Passariello",url:"https://github.com/passariello/",email:"dariopassariello@gmail.com"},bugs:{url:"https://github.com/a51-dev/a51.dphelper.public/issues"},contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com",url:"https://dario.passariello.ca/"},{name:"Valeria Cala Scaglitta",email:"valeriacalascaglitta@gmail.com"}],keywords:["dphelper","front-end","back-end","framework","helper","utils","tools","uuid","random","window","store","easy","pro","powerful","state","status","dp helper","local","storage","indexdb","idb","devtool"],funding:[{type:"patreon",url:"https://www.patreon.com/passariello"}],typing:["types/*"],exports:{".":{types:"./types/dphelper.d.ts",import:"./index.js",default:"./index.js"},"./types/*":"./types/*"},scripts:{build:"rimraf dist && npm run generate-imports && node esbuild.config.mjs && node node_modules/typescript/bin/tsc -p tsconfig.json --emitDeclarationOnly && node scripts/patch-dist.mjs",dev:"npm run generate-imports && node esbuild.config.mjs --watch-and-serve","npm:pack":"npm run build && cd dist && npm pack","npm:publish":"npm run build && npm publish ./dist --access public",test:"cd tests && npm run test",lint:"cd tests && npm run lint",tsc:"cd tests && tsc --noEmit","generate-imports":"tsx scripts/generate-imports.ts"},devDependencies:{"crypto-js":"4.2.0","@jest/globals":"^30.2.0","@types/crypto-js":"4.2.2","@types/node":"^25.3.1",esbuild:"0.27.3","esbuild-node-externals":"1.20.1","esbuild-plugin-alias":"0.2.1","esbuild-plugin-copy":"2.1.1","esbuild-sass-plugin":"3.6.0","esbuild-scss-modules-plugin":"1.1.1",rimraf:"6.1.3",tslib:"^2.8.1",tsx:"^4.21.0",typescript:"5.9.3"}};var Rt={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var bt=globalThis.dphelper;if(bt&&bt.version&&bt.version<vt.version)try{delete globalThis.dphelper}catch{console.debug("Could not delete existing dphelper (likely non-configurable)")}var gt=Object.getOwnPropertyDescriptor(globalThis,"dphelper");gt&&!gt.configurable?gt.writable?globalThis.dphelper===void 0&&(globalThis.dphelper={}):console.debug("dphelper already defined on globalThis and is not writable/configurable"):Object.defineProperty(globalThis,"dphelper",{value:globalThis.dphelper||{},writable:!0,configurable:!0,enumerable:!1});globalThis.dphelper&&Object.defineProperties(globalThis.dphelper,{_list:{value:{scripts:[],sockets:[],...Rt},configurable:!0,writable:!0},version:{value:vt.version,configurable:!0,writable:!0},isServer:{value:typeof window>"u",configurable:!0,writable:!0},isBrowser:{value:typeof window<"u",configurable:!0,writable:!0}});Object.defineProperty(dphelper,"setProps",{value:(e,t,r)=>{Object.defineProperty(e,t.name,r||{writable:!1,configurable:!1,enumerable:!1}),r?.lock&&Object.freeze(e[t.name])},writable:!1,configurable:!1,enumerable:!1});Object.defineProperty(dphelper,"setDescription",{value:(e,t)=>{Object.defineProperties(dphelper,{[e.name]:{value:t,writable:!1,configurable:!1,enumerable:!1}}),Object.keys(t).map(r=>(Object.defineProperties(dphelper[e.name],{[r]:{writable:!1,configurable:!1,enumerable:!1}}),null)),dphelper.setProps(dphelper,e,{writable:!1,configurable:!1,enumerable:!1}),dphelper._list.scripts.push(e)}});var Br={name:"ai",active:!0,subCommand:[{name:"tokenCount",version:"0.0.3",example:"dphelper.ai.tokenCount({ users: [1,2,3] })",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260221",type:"function",active:!0,description:"Estimate token count for LLMs. If an object is passed, it uses TOON format for calculation.",env:"both",subCommand:[]},{name:"smartSanitize",version:"0.0.2",example:"dphelper.ai.smartSanitize('My email is test@example.com')",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Remove PII (emails, phones, etc) from text for AI privacy",subCommand:[]},{name:"toon",version:"0.0.1",example:"dphelper.ai.toon({ users: [{id: 1, name: 'Ada'}] })",author:"TOON + Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert JSON to TOON format (Token-Oriented Object Notation)",subCommand:[]},{name:"toonToJson",version:"0.0.1",example:"dphelper.ai.toonToJson('users[1]{id,name}:\\n 1,Ada')",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert TOON format back to JSON/Object",subCommand:[]},{name:"chunker",version:"0.0.1",example:"dphelper.ai.chunker(text, { size: 1000, overlap: 200 })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Split long text into chunks for RAG or AI processing.",subCommand:[]},{name:"similarity",version:"0.0.1",example:"dphelper.ai.similarity(vecA, vecB)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Calculate cosine similarity between two embedding vectors.",subCommand:[]},{name:"extractReasoning",version:"0.0.1",example:"dphelper.ai.extractReasoning(aiResponse)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Extract <think> tags or internal reasoning from AI responses.",subCommand:[]},{name:"prompt",version:"0.0.1",example:"dphelper.ai.prompt('Hello {{name}}', { name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Simple prompt template engine with variable injection.",subCommand:[]},{name:"schema",version:"0.0.1",example:"dphelper.ai.schema({ id: 1, name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Generate a TOON-style schema definition for AI instructions.",subCommand:[]},{name:"snapshot",version:"0.0.1",example:"dphelper.ai.snapshot()",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Capture a 'mental snapshot' of the app state (logs/globals) in TOON format for AI debugging.",env:"both",subCommand:[]}]},yt=e=>e===null||typeof e!="object",we=e=>e===null?"null":typeof e=="string"?e.includes(",")||e.includes(":")||e.includes('"')||e.includes(`
|
|
2
2
|
`)||e.trim()!==e?`"${e.replace(/"/g,'\\"')}"`:e||'""':String(e),ge=(e,t=0)=>{let r=" ".repeat(t);if(yt(e))return we(e);if(Array.isArray(e)){if(e.length===0)return"[0]:";let n=e[0];if(!yt(n)&&!Array.isArray(n)){let o=Object.keys(n),i=`[${e.length}]{${o.join(",")}}:`;for(let c of e){let a=o.map(s=>we(c[s])).join(",");i+=`
|
|
3
3
|
${r} ${a}`}return i}else return`[${e.length}]: `+e.map(we).join(",")}else return Object.entries(e).map(([n,o])=>{let i=n.includes(" ")||n.includes(":")?`"${n}"`:n;if(!yt(o)){let c=ge(o,t+1);return c.startsWith("[")?`${i}${c}`:`${i}:
|
|
4
4
|
${r}${c}`}return`${i}: ${we(o)}`}).join(`
|
|
@@ -49,7 +49,7 @@ ${r}`)},zt={tokenCount:e=>{let t=typeof e=="string"?e:ge(e);if(!t)return 0;let r
|
|
|
49
49
|
d = R \u22C5 c
|
|
50
50
|
where \u03C6 is latitude, \u03BB is longitude, R is earth's radius (mean radius = 6,371km);
|
|
51
51
|
note that angles need to be in radians to pass to trig functions!
|
|
52
|
-
`,env:"client",subCommand:[]},{name:"polarToCartesian",version:"0.0.2",example:"dphelper.coords.polarToCartesian([centerX, centerY, radius, angleInDegrees])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Convert polar coordinates to Cartesian coordinates",env:"client",subCommand:[]},{name:"mapDegreesToPixels",version:"0.0.2",example:"dphelper.coords.mapDegreesToPixels([degree, minDegree, maxDegree, minPixel, maxPixel, padding])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Map degrees to pixels",env:"client",subCommand:[]}]},ye=6371e3,Wr={degreesToRadians:e=>e*Math.PI/180,latToMeters:e=>Array.isArray(e)?ye*Math.cos(e[0])*Math.cos(e[1])/1e3:void 0,toVector:e=>{if(!Array.isArray(e))return;let t=ye*Math.cos(e[1]*Math.PI/180)*Math.cos(e[0]*Math.PI/180),r=ye*Math.cos(e[1]*Math.PI/180)*Math.sin(e[0]*Math.PI/180),n=ye*Math.sin(e[2]*Math.PI/180);return[t,r,n]},convertToDecDegrees:(e,t,r,n)=>{let o=e+t/60+r/3600;return(n==="S"||n==="W")&&(o*=-1),o},distance:(e,t)=>{if(!(Array.isArray(e)&&Array.isArray(t)))return;let r=e[0]*Math.PI/180,n=t[0]*Math.PI/180,o=(t[0]-e[0])*Math.PI/180,i=(t[1]-e[1])*Math.PI/180,c=Math.sin(o/2)*Math.sin(o/2)+Math.cos(r)*Math.cos(n)*Math.sin(i/2)*Math.sin(i/2),a=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),s=ye*a;return{km:Number((s/1e3).toFixed(2)),mi:Number((s/1e3*.621371).toFixed(2)),nMi:Number((s/1e3/1.852).toFixed(2))}},polarToCartesian:(e,t,r,n)=>{let o=(n-90)*Math.PI/180;return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}},mapDegreesToPixels:(e,t,r,n,o,i)=>{let c=(e-t)/(r-t),a=n+c*(o-n),s=i/20,f=o-(a-i)-s;return f<i?i:f}};dphelper?.setDescription(Ir,Wr);var $t={version:"3.0.0",contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com"}],app:{folder:"src",type:"library",port:3e3,code:"dphelper",host:{dev:"http://localhost",prod:"https://biglogic.ca/dphelper"},socket:{url:{tst:"http://localhost:5000/",dev:"http://localhost:5000/",pro:"wss://ws.a51.dev/"}},events:{url:{tst:"http://localhost:5002/",dev:"http://localhost:5002/",pro:"wss://ws.a51.dev/"}},proxy:{api:{tst:"http://localhost:5003/",dev:"http://localhost:5003/",pro:"https://api.a51.dev/"}},url:{dev:"http://localhost/"},cdn:{}}};dphelper.credits=()=>{let e=$t;console.groupCollapsed(`%c${e.app.code} v${e.version}%c`,"color:orange",""),console.debug(`%c${e.app.code} v${e.version}%c by Dario Passariello started`,"color:orange",""),console.debug(`name: %c${e.app.code}`,"color:orange",""),console.debug(`version: %c${e.version}`,"color:orange",""),console.groupEnd()};Object.defineProperty(dphelper,"credits",{writable:!1,enumerable:!1,configurable:!1});var It={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]};var Yr={name:"date",active:!0,subCommand:[{name:"toIso",version:"0.0.2",example:"dphelper.date.toIso(value, 'en')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to ISO format.",env:"both",subCommand:[]},{name:"toMMDDYYYY",version:"0.0.2",example:"dphelper.date.toMMDDYYYY(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to MMDDYYYY format.",env:"both",subCommand:[]},{name:"toYYYYMMDD",version:"0.0.2",example:"dphelper.date.toYYYYMMDD(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to YYYYMMDD format.",env:"both",subCommand:[]},{name:"toHuman",version:"0.0.2",example:"dphelper.date.toHuman(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a human-readable format.",env:"both",subCommand:[]},{name:"convert",version:"0.0.2",example:"dphelper.date.convert(value, format)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a specified format.",env:"both",subCommand:[]},{name:"iso2Epoch",version:"0.0.2",example:"dphelper.date.iso2Epoch(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to epoch time.",env:"both",subCommand:[]},{name:"localIsoTime",version:"0.0.2",example:"dphelper.date.localIsoTime(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the local ISO time for a given date value.",env:"both",subCommand:[]},{name:"utc",version:"0.0.2",example:"dphelper.date.utc()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current UTC time.",env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.date.parse(value, '/')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Parses a date value with a specified separator.",env:"both",subCommand:[]},{name:"year",version:"0.0.2",example:"dphelper.date.year()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current year.",env:"both",subCommand:[]},{name:"addDays",version:"0.0.2",example:"dphelper.date.addDays(date, days)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Adds a specified number of days to a date.",env:"both",subCommand:[]},{name:"dateTimeToString",version:"0.0.2",example:"dphelper.date.dateTimeToString(dateObject)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date object to a string.",env:"both",subCommand:[]},{name:"isoToHuman",version:"0.0.2",example:"dphelper.date.isoToHuman(value, '@')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to a human-readable format with a specified symbol.",env:"both",subCommand:[]},{name:"fullDate",version:"0.0.2",example:"dphelper.date.fullDate()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the full date and time in the format DD-MM-YYYY HH:MM:SS.",env:"both",subCommand:[]},{name:"epoch",version:"0.0.2",example:"dphelper.date.epoch()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current epoch time.",env:"both",subCommand:[]},{name:"diffInDays",version:"0.0.2",example:"dphelper.date.diffInDays(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in days between two dates.",env:"both",subCommand:[]},{name:"diffInWeeks",version:"0.0.2",example:"dphelper.date.diffInWeeks(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in weeks between two dates.",env:"both",subCommand:[]},{name:"diffInMonths",version:"0.0.2",example:"dphelper.date.diffInMonths(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in months between two dates.",env:"both",subCommand:[]},{name:"diffInYears",version:"0.0.2",example:"dphelper.date.diffInYears(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in years between two dates.",env:"both",subCommand:[]},{name:"dateToYMD",version:"0.0.2",example:"dphelper.date.dateToYMD(date)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date to the format YYYY-MM-DD.",env:"both",subCommand:[]},{name:"collection",version:"0.0.2",example:"dphelper.date.collection()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets various date representations based on the type and locale.",env:"both",subCommand:[]},{name:"timeZones",version:"0.0.2",example:"dphelper.date.timeZones()",author:"Dario Passariello",creationDate:"20240901",lastMod:"20260220",type:"function",active:!0,description:"Returns an array of all supported timezones.",env:"both",subCommand:[]}]},Jr={days:(e="en")=>({en:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],it:["luned\xEC","marted\xEC","mercoled\xEC","gioved\xEC","venerd\xEC","sabato","domenica"]})[e],months:(e="en")=>It[e],year:()=>new Date().getFullYear(),toIso:(e,t="en")=>{e||(e="");let r=new Date(e);return String(r)==="Invalid Date"?null:new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(r)},toMMDDYYYY:e=>{try{let t=new Date(e);return`0${t.getMonth()+1}`.slice(-2)+""+`0${t.getDate()}`.slice(-2)+t.getFullYear()}catch{return""}},toYYYYMMDD:e=>{if(e)return e.toISOString().split("T")[0].replaceAll("-","")},toHuman:e=>{let t={weekday:"long",year:"numeric",month:"long",day:"numeric"};return e.toLocaleDateString(void 0,t)},convert:(e,t)=>{if(!e)return null;t||(t=dphelper.date.months("en"));let r=e.substring(0,2).replace("0",""),n=e.substring(2,4),o=e.substring(e.length-4);return`${n} ${t[Number(r)-1]} ${o}`},iso2Epoch:e=>(e||(e=""),new Date(e).getTime()),localIsoTime:e=>{e||(e=new Date);let t=new Date(e);if(isNaN(t.getTime()))return"";let r=t.getTimezoneOffset()*6e4;return new Date(Date.now()-r).toISOString().slice(0,-1)},utc:()=>new Date().toUTCString(),parse:(e,t="/")=>{if(!e)return null;let r=e.substring(0,2),n=e.substring(2,4),o=e.substring(4,8);return r+t+n+t+o},addDays:(e,t)=>{let r=new Date(Number(e));return r.setDate(e.getDate()+t),r},dateTimeToString:e=>{try{return`${e.getFullYear()}${e.getMonth().toString().length>1?e.getMonth()+1:`0${e.getMonth()+1}`}
|
|
52
|
+
`,env:"client",subCommand:[]},{name:"polarToCartesian",version:"0.0.2",example:"dphelper.coords.polarToCartesian([centerX, centerY, radius, angleInDegrees])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Convert polar coordinates to Cartesian coordinates",env:"client",subCommand:[]},{name:"mapDegreesToPixels",version:"0.0.2",example:"dphelper.coords.mapDegreesToPixels([degree, minDegree, maxDegree, minPixel, maxPixel, padding])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Map degrees to pixels",env:"client",subCommand:[]}]},ye=6371e3,Wr={degreesToRadians:e=>e*Math.PI/180,latToMeters:e=>Array.isArray(e)?ye*Math.cos(e[0])*Math.cos(e[1])/1e3:void 0,toVector:e=>{if(!Array.isArray(e))return;let t=ye*Math.cos(e[1]*Math.PI/180)*Math.cos(e[0]*Math.PI/180),r=ye*Math.cos(e[1]*Math.PI/180)*Math.sin(e[0]*Math.PI/180),n=ye*Math.sin(e[2]*Math.PI/180);return[t,r,n]},convertToDecDegrees:(e,t,r,n)=>{let o=e+t/60+r/3600;return(n==="S"||n==="W")&&(o*=-1),o},distance:(e,t)=>{if(!(Array.isArray(e)&&Array.isArray(t)))return;let r=e[0]*Math.PI/180,n=t[0]*Math.PI/180,o=(t[0]-e[0])*Math.PI/180,i=(t[1]-e[1])*Math.PI/180,c=Math.sin(o/2)*Math.sin(o/2)+Math.cos(r)*Math.cos(n)*Math.sin(i/2)*Math.sin(i/2),a=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),s=ye*a;return{km:Number((s/1e3).toFixed(2)),mi:Number((s/1e3*.621371).toFixed(2)),nMi:Number((s/1e3/1.852).toFixed(2))}},polarToCartesian:(e,t,r,n)=>{let o=(n-90)*Math.PI/180;return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}},mapDegreesToPixels:(e,t,r,n,o,i)=>{let c=(e-t)/(r-t),a=n+c*(o-n),s=i/20,f=o-(a-i)-s;return f<i?i:f}};dphelper?.setDescription(Ir,Wr);var $t={version:"3.0.0",contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com"}],app:{folder:"src",type:"library",port:3e3,code:"dphelper",host:{dev:"http://localhost",prod:"https://biglogic.ca/dphelper"},socket:{url:{tst:"http://localhost:5000/",dev:"http://localhost:5000/",pro:"wss://ws.a51.dev/"}},events:{url:{tst:"http://localhost:5002/",dev:"http://localhost:5002/",pro:"wss://ws.a51.dev/"}},proxy:{api:{tst:"http://localhost:5003/",dev:"http://localhost:5003/",pro:"https://api.a51.dev/"}},url:{dev:"http://localhost/"},cdn:{}}};dphelper.credits=()=>{let e=$t;console.groupCollapsed(`%c${e.app.code} v${e.version}%c`,"color:orange",""),console.debug(`%c${e.app.code} v${e.version}%c by Dario Passariello started`,"color:orange",""),console.debug(`name: %c${e.app.code}`,"color:orange",""),console.debug(`version: %c${e.version}`,"color:orange",""),console.groupEnd()};Object.defineProperty(dphelper,"credits",{writable:!1,enumerable:!1,configurable:!1});var It={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]};var Yr={name:"date",active:!0,subCommand:[{name:"toIso",version:"0.0.2",example:"dphelper.date.toIso(value, 'en')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to ISO format.",env:"both",subCommand:[]},{name:"toMMDDYYYY",version:"0.0.2",example:"dphelper.date.toMMDDYYYY(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to MMDDYYYY format.",env:"both",subCommand:[]},{name:"toYYYYMMDD",version:"0.0.2",example:"dphelper.date.toYYYYMMDD(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to YYYYMMDD format.",env:"both",subCommand:[]},{name:"toHuman",version:"0.0.2",example:"dphelper.date.toHuman(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a human-readable format.",env:"both",subCommand:[]},{name:"convert",version:"0.0.2",example:"dphelper.date.convert(value, format)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a specified format.",env:"both",subCommand:[]},{name:"iso2Epoch",version:"0.0.2",example:"dphelper.date.iso2Epoch(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to epoch time.",env:"both",subCommand:[]},{name:"localIsoTime",version:"0.0.2",example:"dphelper.date.localIsoTime(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the local ISO time for a given date value.",env:"both",subCommand:[]},{name:"utc",version:"0.0.2",example:"dphelper.date.utc()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current UTC time.",env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.date.parse(value, '/')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Parses a date value with a specified separator.",env:"both",subCommand:[]},{name:"year",version:"0.0.2",example:"dphelper.date.year()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current year.",env:"both",subCommand:[]},{name:"addDays",version:"0.0.2",example:"dphelper.date.addDays(date, days)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Adds a specified number of days to a date.",env:"both",subCommand:[]},{name:"dateTimeToString",version:"0.0.2",example:"dphelper.date.dateTimeToString(dateObject)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date object to a string.",env:"both",subCommand:[]},{name:"isoToHuman",version:"0.0.2",example:"dphelper.date.isoToHuman(value, '@')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to a human-readable format with a specified symbol.",env:"both",subCommand:[]},{name:"fullDate",version:"0.0.2",example:"dphelper.date.fullDate()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the full date and time in the format DD-MM-YYYY HH:MM:SS.",env:"both",subCommand:[]},{name:"epoch",version:"0.0.2",example:"dphelper.date.epoch()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current epoch time.",env:"both",subCommand:[]},{name:"diffInDays",version:"0.0.2",example:"dphelper.date.diffInDays(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in days between two dates.",env:"both",subCommand:[]},{name:"diffInWeeks",version:"0.0.2",example:"dphelper.date.diffInWeeks(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in weeks between two dates.",env:"both",subCommand:[]},{name:"diffInMonths",version:"0.0.2",example:"dphelper.date.diffInMonths(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in months between two dates.",env:"both",subCommand:[]},{name:"diffInYears",version:"0.0.2",example:"dphelper.date.diffInYears(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in years between two dates.",env:"both",subCommand:[]},{name:"dateToYMD",version:"0.0.2",example:"dphelper.date.dateToYMD(date)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date to the format YYYY-MM-DD.",env:"both",subCommand:[]},{name:"collection",version:"0.0.2",example:"dphelper.date.collection()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets various date representations based on the type and locale.",env:"both",subCommand:[]},{name:"timeZones",version:"0.0.2",example:"dphelper.date.timeZones()",author:"Dario Passariello",creationDate:"20240901",lastMod:"20260220",type:"function",active:!0,description:"Returns an array of all supported timezones.",env:"both",subCommand:[]}]},Jr={days:(e="en")=>({en:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],it:["luned\xEC","marted\xEC","mercoled\xEC","gioved\xEC","venerd\xEC","sabato","domenica"]})[e],months:(e="en")=>It[e],year:()=>new Date().getFullYear(),toIso:(e,t="en")=>{e||(e="");let r=new Date(e);return String(r)==="Invalid Date"?null:new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(r)},toMMDDYYYY:e=>{try{let t=new Date(e);return isNaN(t.getTime())?"":`0${t.getMonth()+1}`.slice(-2)+""+`0${t.getDate()}`.slice(-2)+t.getFullYear()}catch{return""}},toYYYYMMDD:e=>{if(e)return e.toISOString().split("T")[0].replaceAll("-","")},toHuman:e=>{let t={weekday:"long",year:"numeric",month:"long",day:"numeric"};return e.toLocaleDateString(void 0,t)},convert:(e,t)=>{if(!e)return null;t||(t=dphelper.date.months("en"));let r=e.substring(0,2).replace("0",""),n=e.substring(2,4),o=e.substring(e.length-4);return`${n} ${t[Number(r)-1]} ${o}`},iso2Epoch:e=>(e||(e=""),new Date(e).getTime()),localIsoTime:e=>{e||(e=new Date);let t=new Date(e);if(isNaN(t.getTime()))return"";let r=t.getTimezoneOffset()*6e4;return new Date(Date.now()-r).toISOString().slice(0,-1)},utc:()=>new Date().toUTCString(),parse:(e,t="/")=>{if(!e)return null;let r=e.substring(0,2),n=e.substring(2,4),o=e.substring(4,8);return r+t+n+t+o},addDays:(e,t)=>{let r=new Date(Number(e));return r.setDate(e.getDate()+t),r},dateTimeToString:e=>{try{return`${e.getFullYear()}${e.getMonth().toString().length>1?e.getMonth()+1:`0${e.getMonth()+1}`}
|
|
53
53
|
${e.getDate().toString().length>1?e.getDate():`0${e.getDate()}`}_${e.getHours()}${e.getMinutes()}${e.getSeconds()}`}catch(t){return console.error(t),e}},isoToHuman:(e,t="@")=>{if(!e)return null;let r=dphelper.date.months("en"),n=new Date(e),o=n.getFullYear(),i=e.split("T")[1].split(":").slice(0,2).join(":"),c=(n.getMonth()+1).toString(),a=n.getDate().toString();return a.length<2&&(a=`0${a}`),c.length<2&&(c=`0${c}`),`${a} ${r[Number(c)-1]} ${o} ${t} ${i}`},fullDate:()=>{let e=new Date,t=Number(e.getDate()),r=Number(e.getMonth()+1),n=Number(e.getFullYear()),o=Number(e.getHours()),i=Number(e.getMinutes()),c=Number(e.getSeconds());return(t<10?`0${t}`:t)+"-"+(r<10?`0${r}`:r)+"-"+n+" "+(o<10?`0${o}`:o)+":"+(i<10?`0${i}`:i)+":"+(c<10?`0${c}`:c)},epoch:()=>Date.now(),diffInDays:(e,t)=>{let r=t.getTime(),n=e.getTime();return Math.floor((r-n)/(24*3600*1e3))},diffInWeeks:(e,t)=>{let r=t.getTime(),n=e.getTime();return Number(Number.parseInt(String((r-n)/(24*3600*1e3*7)),10))},diffInMonths:(e,t)=>{let r=e.getFullYear(),n=t.getFullYear(),o=e.getMonth();return t.getMonth()+12*n-(o+12*r)},diffInYears:(e,t)=>t.getFullYear()-e.getFullYear(),dateToYMD:e=>{let t=e.getDate(),r=e.getMonth()+1;return`${e.getFullYear()}-${r<=9?`0${r}`:r}-${t<=9?`0${t}`:t}`},collection:({date:e=new Date,type:t="",locale:r="en-US"})=>{!e&&t&&r&&console.debug(`
|
|
54
54
|
"toDateString" -> Tue Jan 02 2024
|
|
55
55
|
"toISOString" -> 2024-01-02T18:44:43.590Z
|
|
@@ -64,7 +64,7 @@ ${r}`)},zt={tokenCount:e=>{let t=typeof e=="string"?e:ge(e);if(!t)return 0;let r
|
|
|
64
64
|
`)},saveCsvAs:(e,t)=>{let r=new Blob([e],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a"),o=dphelper.date.dateTimeToString(new Date(Date.now())),i=`${t}_${o}.csv`,c=URL.createObjectURL(r);n.setAttribute("href",c),n.setAttribute("download",i),n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n)},is:e=>{try{JSON.parse(e)}catch(t){return console.warn(t),!1}return!0},parse:e=>{try{return JSON.parse(e)}catch(t){return console.warn(t),"Json not parsable"}},sanitize:e=>e?"{"+e.trim().replace(/^\{/,"").replace(/\}$/,"").split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(o=>{let[i,...c]=o.split(":"),a=dphelper.json.sanitizeJsonValue(i?.trim()??"");if(!i)return"";let s=c.join(":");return s?(s=s.trim(),s==="null"?s='""':s==="true"||s==="false"?s=`"${s}"`:/^\d+$/.test(s)?s=`"${s}"`:s=dphelper.json.sanitizeJsonValue(s)):s='""',`${a}:${s}`}).filter(o=>o!=="").join(",")+"}":"{}",sanitizeJsonValue:e=>e?`"${e.replace(/^"(.*)"$/,"$1").replace(/\\/g,"").replace(/\//g,"/").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/"/g,'\\"').replace(/\t/g," ").trim()}"`:'""'};dphelper?.setDescription(ln,dn);var un={name:"load",active:!0,subCommand:[{name:"all",version:"0.0.2",example:"dphelper.load.all(require['context']('Scripts', true, /.(js|ts)$/) [, 'cacheName'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Load all files from a specific folder based on a specific extension. If you add a 'cacheName', the list is stored in cache.",env:"client",subCommand:[]},{name:"file",version:"0.0.2",example:"dphelper.load.file(filePath)",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Load a specific file.",env:"client",subCommand:[]},{name:"fileToElement",version:"0.0.2",example:"dphelper.load.fileToElement(filePath, elementSelector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Load a file and insert its content into an element.",env:"client",subCommand:[]},{name:"script",version:"0.0.2",example:"dphelper.load.script(scripts, elementSelector)",author:"Dario Passariello",creationDate:"20240525",lastMod:"20240525",type:"function",active:!0,description:"Append script tags to an element.",env:"client",subCommand:[]},{name:"toJson",version:"0.0.2",example:"dphelper.load.toJson(require.context('./src/router', true, /.(ts)$/), 'router')",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,description:"Create JSON from folder recursion.",env:"client",subCommand:[]}]},pn={all:(e,t="")=>{if(e){t&&!window[t]&&(window[t]=[]);for(let r of e.keys()){if(!r)return;t&&window[t].push(r),e(r)}}},file:()=>null,fileToElement:async(e,t)=>{try{let r=await dphelper.load.file(t),n=document.querySelector(e);n?n.innerHTML=dphelper.sanitize.html(r):console.error(`Element not found: ${e}`)}catch(r){console.error("Error loading file to element:",r)}},script:(e,t="html")=>{let r=document.querySelector(t);if(!r){console.error(`Element not found: ${t}`);return}for(let n of e){let o=document.createElement("script");o.src=n,o.async=!0,o.defer=!0,r.appendChild(o)}},toJson:(e,t="")=>{let r={};if(e){t&&(r[t]=[]);for(let n of e.keys()){if(!n)return;t&&r[t]&&r[t].push(n),e(n)}!t||!r[t]||Object.defineProperty(window,t,{value:dphelper.array.pathToJson(r[t]),writable:!1,enumerable:!1,configurable:!1})}}};dphelper?.setDescription(un,pn);var xn={name:"logging",active:!0,subCommand:[{name:"list",version:"0.0.2",example:"dphelper.log.list()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"List all log entries.",env:"both",subCommand:[]},{name:"reg",version:"0.0.2",example:"dphelper.log.reg('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log a regular message.",env:"both",subCommand:[]},{name:"debug",version:"0.0.2",example:"dphelper.log.debug('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log a debug message.",env:"both",subCommand:[]},{name:"error",version:"0.0.2",example:"dphelper.log.error('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log an error message.",env:"both",subCommand:[]}]},De={log:[]},fn={list:()=>De.log,reg:e=>De.log.push({type:"reg",message:e}),debug:e=>De.log.push({type:"debug",message:e}),error:e=>De.log.push({type:"error",message:e})};Object.defineProperty(De,"log",{writable:!1,enumerable:!1,configurable:!1});dphelper?.setDescription(xn,fn);var hn={name:"math",active:!0,subCommand:[{name:"rnd",version:"0.0.2",example:"dphelper.math.rnd()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Generate a random number.",env:"both",subCommand:[]},{name:"tmr",version:"0.0.2",example:"dphelper.math.tmr()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Measure the time taken by a function.",env:"both",subCommand:[]},{name:"isOdd",version:"0.0.2",example:"dphelper.math.isOdd(a)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a number is odd.",env:"both",subCommand:[]},{name:"percent",version:"0.0.2",example:"dphelper.math.percent([n, tot])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculate the percentage of a number relative to a total. Example: total: 100, number: 25 -> 25%",env:"both",subCommand:[]},{name:"isPrime",version:"0.0.2",example:"dphelper.math.isPrime(a)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a number is prime.",env:"both",subCommand:[]}]},mn={rnd:()=>Math.floor(1e5+Math.random()*dphelper.math.tmr()),tmr:()=>Math.round(dphelper.date.epoch()/1e3),isOdd:e=>Number(e)%2!==0,percent:(e,t)=>{if(t===0)throw new Error("Total cannot be zero");return Number(e)/Number(t)*100},isPrime:e=>{if(Number(e)<=1)return!1;for(let t=2;t<=Math.sqrt(Number(e));t++)if(Number(e)%t===0)return!1;return!0}};dphelper?.setDescription(hn,mn);var vn={name:"memory",active:!0,subCommand:[{name:"lock",version:"0.0.2",example:"dphelper.memory.lock('state[key]')",author:"Dario Passariello",creationDate:"20230101",lastMod:"20230111",type:"function",active:!0,description:"Lock a state",env:"client",subCommand:[]},{name:"unlock",version:"0.0.2",example:"dphelper.memory.unlock('state[key]')",author:"Dario Passariello",creationDate:"20230101",lastMod:"20230111",type:"function",active:!0,description:"Unlock a state",env:"client",subCommand:[]}]},bn={lock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],o=r[1];if(!n||!o)return;let i=t[n];i&&Object.defineProperty(i,o,{writable:!1,configurable:!1})},unlock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],o=r[1];if(!n||!o)return;let i=t[n];if(i)try{Object.defineProperty(i,o,{writable:!0,configurable:!0})}catch{}}};dphelper?.setDescription(vn,bn);var gn={name:"navigation",active:!0,subCommand:[{name:"ajax",version:"0.0.2",example:"dphelper.navigation.ajax()",author:"Dario Passariello",creationDate:"20260223",lastMod:"20260223",type:"function",active:!0,description:"Vanilla AJAX Single Page Application (SPA) navigation engine.",env:"client",subCommand:[]},{name:"load",version:"0.0.1",example:"dphelper.navigation.load('/home')",author:"Dario Passariello",creationDate:"20260223",lastMod:"20260223",type:"function",active:!0,description:"Loads a page via AJAX and injects it into the body.",env:"client",subCommand:[]}]},yn={load:async e=>{let r=document.body,n=e.startsWith("/")?e.split("/")[1]||"home":e;if((!n||n==="")&&(n="home"),!document.querySelector(".loader")){let o=document.createElement("div");o.className="loader",o.innerHTML="<i></i>",o.style.opacity="0",o.style.transition="opacity 1000ms",r.appendChild(o),setTimeout(()=>o.style.opacity="1",10)}try{let o=await fetch(`${n}/`);if(!o.ok)throw new Error("Page not found");let i=await o.text(),c=i.match(/<body[^>]*>([\s\S]*)<\/body>/i),a=c?c[1]:i;r.innerHTML=a||"",window.scrollTo({top:0,behavior:"smooth"}),document.title=n.charAt(0).toUpperCase()+n.slice(1);let s=dphelper.path.rail();s&&s.length>0&&(r.className=r.className.replace(/path-\w+/g,"").trim(),r.classList.add(`path-${s[s.length-1]}`)),globalThis.dphelper.navigation.ajax_running&&dphelper.navigation.ajax()}catch(o){console.error("Navigation error:",o),e.startsWith("/")&&(window.location.href=e)}},_bind:e=>{document.querySelectorAll(e).forEach(r=>{let n=r.getAttribute("href");if(!n||!n.startsWith("/")||n.includes("#"))return;let o=r.cloneNode(!0);r.parentNode?.replaceChild(o,r),o.addEventListener("mouseup",i=>{let c=o.getAttribute("data-href")||n;history.pushState({href:c},"",c),dphelper.navigation.load(c),o.removeAttribute("href"),i.stopPropagation()})})},ajax:()=>{if(globalThis.dphelper.navigation.ajax_running){dphelper.navigation._bind("a");return}globalThis.dphelper.navigation.ajax_running=!0,window.onpopstate=()=>dphelper.navigation.load(window.location.pathname),dphelper.navigation._bind("a"),globalThis.dp_hash_listener_set||(window.addEventListener("hashchange",()=>{let e=window.location.hash.substring(1);e&&document.getElementById(e)?.scrollIntoView({behavior:"smooth"})}),globalThis.dp_hash_listener_set=!0)}};dphelper?.setDescription(gn,yn);var Dn={name:"obj",active:!0,subCommand:[{name:"replaceNullObjects",version:"0.0.2",example:"dphelper.obj.replaceNullObjects([obj])",description:"Replace null values in an object with empty objects.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"serialize",version:"0.0.2",example:"dphelper.obj.serialize([obj])",description:"Serialize an object to a JSON string.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"deSerialize",version:"0.0.2",example:"dphelper.obj.deSerialize([obj])",description:"Deserialize a JSON string to an object.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"toXML",version:"0.0.2",example:"dphelper.obj.toXML([obj])",description:"Convert an object to an XML string.",author:"Dario Passariello",creationDate:"20240315",lastMod:"20240315",type:"function",active:!0,env:"both",subCommand:[]},{name:"updateByKey",version:"0.0.2",example:"dphelper.obj.updateByKey([obj, key, newValue])",description:"Update an object's property by key.",author:"Dario Passariello",creationDate:"20240929",lastMod:"20240929",type:"function",active:!0,env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.obj.parse(val)",description:"Check if value is an object or another type. Return object after parse or a different type. Used instead of JSON.parse to avoid crash.",author:"Dario Passariello",creationDate:"20241027",lastMod:"20240927",type:"function",active:!0,env:"both",subCommand:[]},{name:"diff",version:"0.0.2",example:"dphelper.obj.diff([obj1, obj2])",description:"Show the differences between two objects.",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,env:"both",subCommand:[]},{name:"setProps",version:"0.0.2",example:"dphelper.obj.setProps( [object], {options} )",author:"Dario Passariello",creationDate:"20251224",lastMod:"20251224",type:"function",active:!0,description:"Set properties of an object.",env:"both",subCommand:[]}]},Cn={replaceNullObjects:e=>{let t={...e};for(let r of Object.keys(e))t[r]===null&&(t[r]="")},serialize:e=>{if(typeof e=="function")return e.toString();if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=dphelper.obj.serialize(n);return t}return e},deSerialize:e=>{if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=dphelper.obj.deSerialize(n);return t}return e},sort:e=>Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}),toXML:e=>{let t=(r,n="")=>{let o="";for(let i in r)if(Object.hasOwn(r,i)){let c=r[i];typeof c=="object"&&c!==null?o+=`${n}<${i}>
|
|
65
65
|
${t(c,`${n} `)}${n}</${i}>
|
|
66
66
|
`:o+=`${n}<${i}>${c}</${i}>
|
|
67
|
-
`}return o};return t(e)},updateByKey:(e,t,r)=>(Object.hasOwn(e,t)&&(e[t]=r),e),parse:e=>{try{return JSON.parse(e)}catch(t){return console.error(t),e}},isObject:e=>typeof e=="object"&&e!==null,diff:(e,t)=>{let r={};for(let n in e)Object.hasOwn(e,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});for(let n in t)Object.hasOwn(t,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});return r},path:(e,t,r=".")=>t.concat(e).join(r),setProps:(e,t)=>{Reflect.ownKeys(e).forEach(n=>{let o=Object.getOwnPropertyDescriptor(e,n);o&&(o.enumerable=t?.enumerable??!0,o.configurable=t?.configurable??!0,o.writable=t?.writable??!0,Object.defineProperty(e,n,o)),typeof e[n]=="object"&&e[n]!==null&&dphelper.obj.setProps(e[n],t)})}};dphelper?.setDescription(Dn,Cn);var En={name:"path",active:!0,subCommand:[{name:"rail",version:"0.0.2",example:"dphelper.path.rail()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the path segments from the current URL.",env:"both",subCommand:[]},{name:"hash",version:"0.0.2",example:"dphelper.path.hash([hashUrl])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the hash from a URL.",env:"both",subCommand:[]},{name:"query",version:"0.0.2",example:"dphelper.path.query([queryString])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20250513",type:"function",active:!0,description:"Extract the query parameters from a URL.",env:"both",subCommand:[]}]},An={rail:()=>(location.href.split("?")[0]||"").replace(location.protocol,"").replace(location.host,"").replace(location.hash,"").split("/").filter(t=>t),hash:()=>{let e=location.hash.replace("#","").split("/");return e.length?e.filter(t=>t):["empty"]},query:()=>{let e=location.search.substring(1);return JSON.parse(`{"${decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')}"}`)}};dphelper?.setDescription(En,An);var Bn={name:"promise",active:!0,subCommand:[{name:"check",version:"0.0.2",example:"dphelper.promise.check(promise)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is a Promise.",env:"both",subCommand:[]}]},wn={check:e=>e&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]"||typeof e=="object"&&e!==null&&typeof e.then=="function")};dphelper?.setDescription(Bn,wn);var Fn={name:"sanitize",active:!0,subCommand:[{name:"html",version:"0.0.2",example:"dphelper.sanitize.html([html])",author:"Dario Passariello",creationDate:"20241204",lastMod:"20241204",type:"function",active:!0,description:"Sanitize HTML by escaping special characters.",env:"both",subCommand:[]}]},Sn={html:e=>typeof e!="string"?"":e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};dphelper?.setDescription(Fn,Sn);var Se="dphelper_popup_positions",Wt=(e,t,r,n)=>`${e}x${t}@${r},${n}`,ke=()=>{let e=[];return e.push({id:"primary",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0}),window.screenLeft!==void 0&&window.screenTop!==void 0&&(window.screenLeft>0||window.screenTop>0)&&e.push({id:`secondary_${Date.now()}`,width:window.innerWidth,height:window.innerHeight,left:window.screenLeft,top:window.screenTop,isPrimary:!1}),e},Ct=(e,t)=>{let r=ke();for(let i of r)if(e>=i.left&&e<i.left+i.width&&t>=i.top&&t<i.top+i.height)return i;if(!r.length)return{id:"default",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0};let n=r[0],o=1/0;for(let i of r){let c=i.left+i.width/2,a=i.top+i.height/2,s=Math.sqrt(Math.pow(c-e,2)+Math.pow(a-t,2));s<o&&(o=s,n=i)}return n},kn=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),_n=(e,t,r)=>({left:r.left+e,top:r.top+t}),Mn=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,o=r.screenY||r.screenTop||0,i=r.outerWidth||800,c=r.outerHeight||600,a=ke(),s=Ct(n,o),{relX:f,relY:l}=kn(n,o,s),x=Wt(s.width,s.height,s.left,s.top),d=_e();d.monitors=a,d.popups[e]={id:e,monitorId:s.id,left:f,top:l,width:i,height:c,monitorFingerprint:x},localStorage.setItem(Se,JSON.stringify(d))},Pn=e=>{if(typeof window>"u")return null;let t=_e(),r=t.popups[e];if(!r)return null;let n=ke(),o=n.find(s=>Wt(s.width,s.height,s.left,s.top)===r.monitorFingerprint),i;o?i=o:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),i=Ct(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:c,top:a}=_n(r.left,r.top,i);return{left:c,top:a,width:r.width,height:r.height}},Tn=e=>{let t=_e();delete t.popups[e],localStorage.setItem(Se,JSON.stringify(t))},qn=()=>_e().popups,Hn=()=>Ct(window.screenX||0,window.screenY||0),On=()=>{localStorage.removeItem(Se)},_e=()=>{try{let e=localStorage.getItem(Se);if(e)return JSON.parse(e)}catch(e){console.warn("[dphelper] Failed to parse popup storage:",e)}return{monitors:[],popups:{}}},se={save:Mn,restore:Pn,remove:Tn,list:qn,clear:On,getMonitors:ke,getCurrentMonitor:Hn};var jn={name:"screen",active:!0,subCommand:[{name:"popup",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Manage popup windows positions across monitor changes.",env:"client",subCommand:[{name:"save",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Save popup position with monitor fingerprint",env:"client",subCommand:[]},{name:"restore",version:"0.0.1",example:"dphelper.screen.popup.restore('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Restore popup position (auto-adjusts if monitor changed)",env:"client",subCommand:[]},{name:"remove",version:"0.0.1",example:"dphelper.screen.popup.remove('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Remove saved popup position",env:"client",subCommand:[]},{name:"list",version:"0.0.1",example:"dphelper.screen.popup.list()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"List all saved popup positions",env:"client",subCommand:[]},{name:"getCurrentMonitor",version:"0.0.1",example:"dphelper.screen.popup.getCurrentMonitor()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Get current monitor info",env:"client",subCommand:[]},{name:"clear",version:"0.0.1",example:"dphelper.screen.popup.clear()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Clear all saved popup positions",env:"client",subCommand:[]}]},{name:"fullScreen",version:"0.0.2",example:"dphelper.screen.fullScreen([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Enter full screen mode for a given element.",env:"client",subCommand:[]},{name:"toggle",version:"0.0.2",example:"dphelper.screen.toggle([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Toggle full screen mode for a given element.",env:"client",subCommand:[]}]},Ln={fullScreen:e=>{let t=document.querySelector(e);t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},toggle:e=>{let t=document,r=t.querySelector(e);r?t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement?t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.msExitFullscreen&&t.msExitFullscreen():r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen():console.error(`Element not found: ${e}`)},info:()=>({width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth}),popup:{save:(e,t)=>{se.save(e,t)},restore:e=>se.restore(e),remove:e=>{se.remove(e)},list:()=>se.list(),getCurrentMonitor:()=>se.getCurrentMonitor(),clear:()=>{se.clear()}}};dphelper?.setDescription(jn,Ln);var Rn={name:"scrollbar",active:!0,subCommand:[{name:"custom",version:"0.0.2",example:"dphelper.scrollbar.custom(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Apply custom styles to the scrollbar for the selected elements.",env:"client",subCommand:[]},{name:"indicator",version:"0.0.2",example:"dphelper.scrollbar.indicator(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Add a scroll indicator to the selected elements.",env:"client",subCommand:[]},{name:"position.get",version:"0.0.2",example:"dphelper.scrollbar.position.get(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Get the current scroll position of the selected elements.",env:"client",subCommand:[]},{name:"position.set",version:"0.0.2",example:"dphelper.scrollbar.position.set(selector, position)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Set the scroll position of the selected elements.",env:"client",subCommand:[]},{name:"smooth",version:"0.0.2",example:"dphelper.scrollbar.smooth(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Smoothly scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]},{name:"scrollTo",version:"0.0.2",example:"dphelper.scrollbar.scrollTo(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]}]},zn={custom:(e,t)=>{t.color_1=t?.color_1||"black",t.color_1_hover=t?.color_1_hover||"black",t.color_2=t?.color_2||"transparent",t.color_3=t?.color_3||"rgba(30,150,255,.5)",t.type=t?.type||"thin",t.behavior=t?.behavior||"smooth",t.width=t?.width||"16px",t.height=t?.height||"16px",t.rounded=t?.rounded||"10px",t.margin=t?.margin||0,t.border=t?.border||"5px",t.opacity=t?.opacity||1;let r=` ${e}::-webkit-scrollbar {
|
|
67
|
+
`}return o};return t(e)},updateByKey:(e,t,r)=>(Object.hasOwn(e,t)&&(e[t]=r),e),parse:e=>{try{return JSON.parse(e)}catch(t){return console.error(t),e}},isObject:e=>typeof e=="object"&&e!==null,diff:(e,t)=>{let r={};for(let n in e)Object.hasOwn(e,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});for(let n in t)Object.hasOwn(t,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});return r},path:(e,t,r=".")=>t.concat(e).join(r),setProps:(e,t)=>{Reflect.ownKeys(e).forEach(n=>{let o=Object.getOwnPropertyDescriptor(e,n);o&&(o.enumerable=t?.enumerable??!0,o.configurable=t?.configurable??!0,o.writable=t?.writable??!0,Object.defineProperty(e,n,o)),typeof e[n]=="object"&&e[n]!==null&&dphelper.obj.setProps(e[n],t)})}};dphelper?.setDescription(Dn,Cn);var En={name:"path",active:!0,subCommand:[{name:"rail",version:"0.0.2",example:"dphelper.path.rail()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the path segments from the current URL.",env:"both",subCommand:[]},{name:"hash",version:"0.0.2",example:"dphelper.path.hash([hashUrl])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the hash from a URL.",env:"both",subCommand:[]},{name:"query",version:"0.0.2",example:"dphelper.path.query([queryString])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20250513",type:"function",active:!0,description:"Extract the query parameters from a URL.",env:"both",subCommand:[]}]},An={rail:()=>(location.href.split("?")[0]||"").replace(location.protocol,"").replace(location.host,"").replace(location.hash,"").split("/").filter(t=>t),hash:()=>{let e=location.hash.replace("#","").split("/");return e.length?e.filter(t=>t):["empty"]},query:()=>{let e=location.search.substring(1);return JSON.parse(`{"${decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')}"}`)}};dphelper?.setDescription(En,An);var Bn={name:"promise",active:!0,subCommand:[{name:"check",version:"0.0.2",example:"dphelper.promise.check(promise)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is a Promise.",env:"both",subCommand:[]}]},wn={check:e=>e!=null&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]"||typeof e=="object"&&typeof e.then=="function")};dphelper?.setDescription(Bn,wn);var Fn={name:"sanitize",active:!0,subCommand:[{name:"html",version:"0.0.2",example:"dphelper.sanitize.html([html])",author:"Dario Passariello",creationDate:"20241204",lastMod:"20241204",type:"function",active:!0,description:"Sanitize HTML by escaping special characters.",env:"both",subCommand:[]}]},Sn={html:e=>typeof e!="string"?"":e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};dphelper?.setDescription(Fn,Sn);var Se="dphelper_popup_positions",Wt=(e,t,r,n)=>`${e}x${t}@${r},${n}`,ke=()=>{let e=[];return e.push({id:"primary",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0}),window.screenLeft!==void 0&&window.screenTop!==void 0&&(window.screenLeft>0||window.screenTop>0)&&e.push({id:`secondary_${Date.now()}`,width:window.innerWidth,height:window.innerHeight,left:window.screenLeft,top:window.screenTop,isPrimary:!1}),e},Ct=(e,t)=>{let r=ke();for(let i of r)if(e>=i.left&&e<i.left+i.width&&t>=i.top&&t<i.top+i.height)return i;if(!r.length)return{id:"default",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0};let n=r[0],o=1/0;for(let i of r){let c=i.left+i.width/2,a=i.top+i.height/2,s=Math.sqrt(Math.pow(c-e,2)+Math.pow(a-t,2));s<o&&(o=s,n=i)}return n},kn=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),_n=(e,t,r)=>({left:r.left+e,top:r.top+t}),Mn=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,o=r.screenY||r.screenTop||0,i=r.outerWidth||800,c=r.outerHeight||600,a=ke(),s=Ct(n,o),{relX:f,relY:l}=kn(n,o,s),x=Wt(s.width,s.height,s.left,s.top),d=_e();d.monitors=a,d.popups[e]={id:e,monitorId:s.id,left:f,top:l,width:i,height:c,monitorFingerprint:x},localStorage.setItem(Se,JSON.stringify(d))},Pn=e=>{if(typeof window>"u")return null;let t=_e(),r=t.popups[e];if(!r)return null;let n=ke(),o=n.find(s=>Wt(s.width,s.height,s.left,s.top)===r.monitorFingerprint),i;o?i=o:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),i=Ct(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:c,top:a}=_n(r.left,r.top,i);return{left:c,top:a,width:r.width,height:r.height}},Tn=e=>{let t=_e();delete t.popups[e],localStorage.setItem(Se,JSON.stringify(t))},qn=()=>_e().popups,Hn=()=>Ct(window.screenX||0,window.screenY||0),On=()=>{localStorage.removeItem(Se)},_e=()=>{try{let e=localStorage.getItem(Se);if(e)return JSON.parse(e)}catch(e){console.warn("[dphelper] Failed to parse popup storage:",e)}return{monitors:[],popups:{}}},se={save:Mn,restore:Pn,remove:Tn,list:qn,clear:On,getMonitors:ke,getCurrentMonitor:Hn};var jn={name:"screen",active:!0,subCommand:[{name:"popup",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Manage popup windows positions across monitor changes.",env:"client",subCommand:[{name:"save",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Save popup position with monitor fingerprint",env:"client",subCommand:[]},{name:"restore",version:"0.0.1",example:"dphelper.screen.popup.restore('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Restore popup position (auto-adjusts if monitor changed)",env:"client",subCommand:[]},{name:"remove",version:"0.0.1",example:"dphelper.screen.popup.remove('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Remove saved popup position",env:"client",subCommand:[]},{name:"list",version:"0.0.1",example:"dphelper.screen.popup.list()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"List all saved popup positions",env:"client",subCommand:[]},{name:"getCurrentMonitor",version:"0.0.1",example:"dphelper.screen.popup.getCurrentMonitor()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Get current monitor info",env:"client",subCommand:[]},{name:"clear",version:"0.0.1",example:"dphelper.screen.popup.clear()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Clear all saved popup positions",env:"client",subCommand:[]}]},{name:"fullScreen",version:"0.0.2",example:"dphelper.screen.fullScreen([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Enter full screen mode for a given element.",env:"client",subCommand:[]},{name:"toggle",version:"0.0.2",example:"dphelper.screen.toggle([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Toggle full screen mode for a given element.",env:"client",subCommand:[]}]},Ln={fullScreen:e=>{let t=document.querySelector(e);t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},toggle:e=>{let t=document,r=t.querySelector(e);r?t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement?t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.msExitFullscreen&&t.msExitFullscreen():r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen():console.error(`Element not found: ${e}`)},info:()=>({width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth}),popup:{save:(e,t)=>{se.save(e,t)},restore:e=>se.restore(e),remove:e=>{se.remove(e)},list:()=>se.list(),getCurrentMonitor:()=>se.getCurrentMonitor(),clear:()=>{se.clear()}}};dphelper?.setDescription(jn,Ln);var Rn={name:"scrollbar",active:!0,subCommand:[{name:"custom",version:"0.0.2",example:"dphelper.scrollbar.custom(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Apply custom styles to the scrollbar for the selected elements.",env:"client",subCommand:[]},{name:"indicator",version:"0.0.2",example:"dphelper.scrollbar.indicator(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Add a scroll indicator to the selected elements.",env:"client",subCommand:[]},{name:"position.get",version:"0.0.2",example:"dphelper.scrollbar.position.get(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Get the current scroll position of the selected elements.",env:"client",subCommand:[]},{name:"position.set",version:"0.0.2",example:"dphelper.scrollbar.position.set(selector, position)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Set the scroll position of the selected elements.",env:"client",subCommand:[]},{name:"smooth",version:"0.0.2",example:"dphelper.scrollbar.smooth(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Smoothly scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]},{name:"scrollTo",version:"0.0.2",example:"dphelper.scrollbar.scrollTo(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]}]},zn={custom:(e,t)=>{t.color_1=t?.color_1||"black",t.color_1_hover=t?.color_1_hover||"black",t.color_2=t?.color_2||"transparent",t.color_3=t?.color_3||"rgba(30,150,255,.5)",t.type=t?.type||"thin",t.behavior=t?.behavior||"smooth",t.width=t?.width||"16px",t.height=t?.height||"16px",t.rounded=t?.rounded||"10px",t.margin=t?.margin||0,t.border=t?.border||"5px",t.opacity=t?.opacity||1;let r=` ${e}::-webkit-scrollbar {
|
|
68
68
|
scroll-behavior: ${t.behavior};
|
|
69
69
|
width: ${t.width};
|
|
70
70
|
height: ${t.height};
|
|
@@ -170,4 +170,4 @@ ${t(c,`${n} `)}${n}</${i}>
|
|
|
170
170
|
height=${o/f},
|
|
171
171
|
top=${x},
|
|
172
172
|
left=${l}
|
|
173
|
-
`);onfocus=()=>d?.focus()},onBeforeUnLoad:e=>{let t="You have made some changes which you might want to save.",r=o=>(o.preventDefault(),t),n=e?document.querySelector(e):null;n&&n.addEventListener("input",()=>{n.value!==""?(ce=!0,addEventListener("beforeunload",r,{capture:!0})):(ce=!1,removeEventListener("beforeunload",r,{capture:!0}))}),rr===!1&&(document.body.addEventListener("click",o=>{let i=o.target;if(i&&i.tagName.toLowerCase()==="img"&&ce===!0){if(confirm(t)===!0){ce=!1;return}o.preventDefault()}}),rr=!0),addEventListener("popstate",o=>{if(ce===!0){if(confirm(t)===!0){ce=!1;return}o.stopImmediatePropagation(),o.preventDefault();return}}),onbeforeunload=o=>{if(ce===!0)return o.preventDefault(),o.returnValue=t}},purge:(e=document,t=1e4)=>{setTimeout(()=>{if(!e)return;let r=e.attributes;if(r){let n=r.length;for(let o=0;o<n;o+=1){let i=r[o].name;typeof e[i]=="function"&&(e[i]=null),typeof e[i]>"u"&&(e[i]=null)}}if(r=e.childNodes,r){let n=r.length;for(let o=0;o<n;o+=1)dphelper.purge(e.childNodes[o])}},t)},stopZoomWheel:()=>{addEventListener("wheel",e=>{e.ctrlKey&&e.preventDefault()},{passive:!1}),addEventListener("keydown",e=>{let t=dphelper.event.keys(e);["+","-","="].includes(t.key)&&t.ctrl&&e.preventDefault()})},setZoom:(e="html",t=1)=>{t<0&&(t=1);let r=document.querySelector(e);return r&&(r.style.zoom=String(t)),`New zoom value: ${t*100}% (css: ${t})`},getZoom:(e="html")=>{let t=document.querySelector(e);return Number(t?.style.zoom||1)}};dphelper?.setDescription(fa,ha);var ma=setInterval(()=>{let e=dphelper?.socket?.list(),t=[];e&&(e.map(r=>(t.push(r.url),!1)),dphelper._list.sockets=t,t&&clearInterval(ma))},1e3);Object.preventExtensions(dphelper);Object.seal(dphelper);var So=dphelper;}
|
|
173
|
+
`);onfocus=()=>d?.focus()},onBeforeUnLoad:e=>{let t="You have made some changes which you might want to save.",r=o=>(o.preventDefault(),t),n=e?document.querySelector(e):null;n&&n.addEventListener("input",()=>{n.value!==""?(ce=!0,addEventListener("beforeunload",r,{capture:!0})):(ce=!1,removeEventListener("beforeunload",r,{capture:!0}))}),rr===!1&&(document.body.addEventListener("click",o=>{let i=o.target;if(i&&i.tagName.toLowerCase()==="img"&&ce===!0){if(confirm(t)===!0){ce=!1;return}o.preventDefault()}}),rr=!0),addEventListener("popstate",o=>{if(ce===!0){if(confirm(t)===!0){ce=!1;return}o.stopImmediatePropagation(),o.preventDefault();return}}),onbeforeunload=o=>{if(ce===!0)return o.preventDefault(),o.returnValue=t}},purge:(e=document,t=1e4)=>{setTimeout(()=>{if(!e)return;let r=e.attributes;if(r){let n=r.length;for(let o=0;o<n;o+=1){let i=r[o].name;typeof e[i]=="function"&&(e[i]=null),typeof e[i]>"u"&&(e[i]=null)}}if(r=e.childNodes,r){let n=r.length;for(let o=0;o<n;o+=1)dphelper.purge(e.childNodes[o])}},t)},stopZoomWheel:()=>{addEventListener("wheel",e=>{e.ctrlKey&&e.preventDefault()},{passive:!1}),addEventListener("keydown",e=>{let t=dphelper.event.keys(e);["+","-","="].includes(t.key)&&t.ctrl&&e.preventDefault()})},setZoom:(e="html",t=1)=>{t<0&&(t=1);let r=document.querySelector(e);return r&&(r.style.zoom=String(t)),`New zoom value: ${t*100}% (css: ${t})`},getZoom:(e="html")=>{let t=document.querySelector(e);return Number(t?.style.zoom||1)}};dphelper?.setDescription(fa,ha);var ma=setInterval(()=>{let e=dphelper?.socket?.list(),t=[];e&&(e.map(r=>(t.push(r.url),!1)),dphelper._list.sockets=t,t&&clearInterval(ma))},1e3);Object.preventExtensions(dphelper);Object.seal(dphelper);var So=dphelper;export{So as default};
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var I={name:"dphelper",version:"3.1.
|
|
1
|
+
var I={name:"dphelper",version:"3.1.2",type:"module",main:"index.js",browser:"./dist/dphelper.umd.js",description:"dphelper devtools for developers",license:"MIT",types:"./types/dphelper.d.ts",typings:"./types/*",copyright:"Dario Passariello",homepage:"https://a51.gitbook.io/dphelper",author:"Dario Passariello <dariopassariello@gmail.com>",support:{name:"Dario Passariello",url:"https://github.com/passariello/",email:"dariopassariello@gmail.com"},bugs:{url:"https://github.com/a51-dev/a51.dphelper.public/issues"},contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com",url:"https://dario.passariello.ca/"},{name:"Valeria Cala Scaglitta",email:"valeriacalascaglitta@gmail.com"}],keywords:["dphelper","front-end","back-end","framework","helper","utils","tools","uuid","random","window","store","easy","pro","powerful","state","status","dp helper","local","storage","indexdb","idb","devtool"],funding:[{type:"patreon",url:"https://www.patreon.com/passariello"}],typing:["types/*"],exports:{".":{types:"./types/dphelper.d.ts",import:"./index.js",default:"./index.js"},"./types/*":"./types/*"},scripts:{build:"rimraf dist && npm run generate-imports && node esbuild.config.mjs && node node_modules/typescript/bin/tsc -p tsconfig.json --emitDeclarationOnly && node scripts/patch-dist.mjs",dev:"npm run generate-imports && node esbuild.config.mjs --watch-and-serve","npm:pack":"npm run build && cd dist && npm pack","npm:publish":"npm run build && npm publish ./dist --access public",test:"cd tests && npm run test",lint:"cd tests && npm run lint",tsc:"cd tests && tsc --noEmit","generate-imports":"tsx scripts/generate-imports.ts"},devDependencies:{"crypto-js":"4.2.0","@jest/globals":"^30.2.0","@types/crypto-js":"4.2.2","@types/node":"^25.3.1",esbuild:"0.27.3","esbuild-node-externals":"1.20.1","esbuild-plugin-alias":"0.2.1","esbuild-plugin-copy":"2.1.1","esbuild-sass-plugin":"3.6.0","esbuild-scss-modules-plugin":"1.1.1",rimraf:"6.1.3",tslib:"^2.8.1",tsx:"^4.21.0",typescript:"5.9.3"}};var U={info:{title:"List",description:"Complete list of tools"},categories:["3party","system","financial","memory","numbers","time","path","file","forms","ui","other","development"]};var R=globalThis.dphelper;if(R&&R.version&&R.version<I.version)try{delete globalThis.dphelper}catch{console.debug("Could not delete existing dphelper (likely non-configurable)")}var z=Object.getOwnPropertyDescriptor(globalThis,"dphelper");z&&!z.configurable?z.writable?globalThis.dphelper===void 0&&(globalThis.dphelper={}):console.debug("dphelper already defined on globalThis and is not writable/configurable"):Object.defineProperty(globalThis,"dphelper",{value:globalThis.dphelper||{},writable:!0,configurable:!0,enumerable:!1});globalThis.dphelper&&Object.defineProperties(globalThis.dphelper,{_list:{value:{scripts:[],sockets:[],...U},configurable:!0,writable:!0},version:{value:I.version,configurable:!0,writable:!0},isServer:{value:typeof window>"u",configurable:!0,writable:!0},isBrowser:{value:typeof window<"u",configurable:!0,writable:!0}});Object.defineProperty(dphelper,"setProps",{value:(e,t,r)=>{Object.defineProperty(e,t.name,r||{writable:!1,configurable:!1,enumerable:!1}),r?.lock&&Object.freeze(e[t.name])},writable:!1,configurable:!1,enumerable:!1});Object.defineProperty(dphelper,"setDescription",{value:(e,t)=>{Object.defineProperties(dphelper,{[e.name]:{value:t,writable:!1,configurable:!1,enumerable:!1}}),Object.keys(t).map(r=>(Object.defineProperties(dphelper[e.name],{[r]:{writable:!1,configurable:!1,enumerable:!1}}),null)),dphelper.setProps(dphelper,e,{writable:!1,configurable:!1,enumerable:!1}),dphelper._list.scripts.push(e)}});var ee={name:"ai",active:!0,subCommand:[{name:"tokenCount",version:"0.0.3",example:"dphelper.ai.tokenCount({ users: [1,2,3] })",author:"Dario Passariello",creationDate:"20260220",lastMod:"20260221",type:"function",active:!0,description:"Estimate token count for LLMs. If an object is passed, it uses TOON format for calculation.",env:"both",subCommand:[]},{name:"smartSanitize",version:"0.0.2",example:"dphelper.ai.smartSanitize('My email is test@example.com')",author:"Dario Passariello & Jo",creationDate:"20260220",lastMod:"20260220",type:"function",active:!0,description:"Remove PII (emails, phones, etc) from text for AI privacy",subCommand:[]},{name:"toon",version:"0.0.1",example:"dphelper.ai.toon({ users: [{id: 1, name: 'Ada'}] })",author:"TOON + Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert JSON to TOON format (Token-Oriented Object Notation)",subCommand:[]},{name:"toonToJson",version:"0.0.1",example:"dphelper.ai.toonToJson('users[1]{id,name}:\\n 1,Ada')",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Convert TOON format back to JSON/Object",subCommand:[]},{name:"chunker",version:"0.0.1",example:"dphelper.ai.chunker(text, { size: 1000, overlap: 200 })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Split long text into chunks for RAG or AI processing.",subCommand:[]},{name:"similarity",version:"0.0.1",example:"dphelper.ai.similarity(vecA, vecB)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Calculate cosine similarity between two embedding vectors.",subCommand:[]},{name:"extractReasoning",version:"0.0.1",example:"dphelper.ai.extractReasoning(aiResponse)",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Extract <think> tags or internal reasoning from AI responses.",subCommand:[]},{name:"prompt",version:"0.0.1",example:"dphelper.ai.prompt('Hello {{name}}', { name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Simple prompt template engine with variable injection.",subCommand:[]},{name:"schema",version:"0.0.1",example:"dphelper.ai.schema({ id: 1, name: 'Ada' })",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Generate a TOON-style schema definition for AI instructions.",subCommand:[]},{name:"snapshot",version:"0.0.1",example:"dphelper.ai.snapshot()",author:"Dario Passariello",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Capture a 'mental snapshot' of the app state (logs/globals) in TOON format for AI debugging.",env:"both",subCommand:[]}]},H=e=>e===null||typeof e!="object",j=e=>e===null?"null":typeof e=="string"?e.includes(",")||e.includes(":")||e.includes('"')||e.includes(`
|
|
2
2
|
`)||e.trim()!==e?`"${e.replace(/"/g,'\\"')}"`:e||'""':String(e),E=(e,t=0)=>{let r=" ".repeat(t);if(H(e))return j(e);if(Array.isArray(e)){if(e.length===0)return"[0]:";let n=e[0];if(!H(n)&&!Array.isArray(n)){let o=Object.keys(n),a=`[${e.length}]{${o.join(",")}}:`;for(let i of e){let s=o.map(l=>j(i[l])).join(",");a+=`
|
|
3
3
|
${r} ${s}`}return a}else return`[${e.length}]: `+e.map(j).join(",")}else return Object.entries(e).map(([n,o])=>{let a=n.includes(" ")||n.includes(":")?`"${n}"`:n;if(!H(o)){let i=E(o,t+1);return i.startsWith("[")?`${a}${i}`:`${a}:
|
|
4
4
|
${r}${i}`}return`${a}: ${j(o)}`}).join(`
|
|
@@ -49,7 +49,7 @@ ${r}`)},Y={tokenCount:e=>{let t=typeof e=="string"?e:E(e);if(!t)return 0;let r=t
|
|
|
49
49
|
d = R \u22C5 c
|
|
50
50
|
where \u03C6 is latitude, \u03BB is longitude, R is earth's radius (mean radius = 6,371km);
|
|
51
51
|
note that angles need to be in radians to pass to trig functions!
|
|
52
|
-
`,env:"client",subCommand:[]},{name:"polarToCartesian",version:"0.0.2",example:"dphelper.coords.polarToCartesian([centerX, centerY, radius, angleInDegrees])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Convert polar coordinates to Cartesian coordinates",env:"client",subCommand:[]},{name:"mapDegreesToPixels",version:"0.0.2",example:"dphelper.coords.mapDegreesToPixels([degree, minDegree, maxDegree, minPixel, maxPixel, padding])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Map degrees to pixels",env:"client",subCommand:[]}]},A=6371e3,ye={degreesToRadians:e=>e*Math.PI/180,latToMeters:e=>Array.isArray(e)?A*Math.cos(e[0])*Math.cos(e[1])/1e3:void 0,toVector:e=>{if(!Array.isArray(e))return;let t=A*Math.cos(e[1]*Math.PI/180)*Math.cos(e[0]*Math.PI/180),r=A*Math.cos(e[1]*Math.PI/180)*Math.sin(e[0]*Math.PI/180),n=A*Math.sin(e[2]*Math.PI/180);return[t,r,n]},convertToDecDegrees:(e,t,r,n)=>{let o=e+t/60+r/3600;return(n==="S"||n==="W")&&(o*=-1),o},distance:(e,t)=>{if(!(Array.isArray(e)&&Array.isArray(t)))return;let r=e[0]*Math.PI/180,n=t[0]*Math.PI/180,o=(t[0]-e[0])*Math.PI/180,a=(t[1]-e[1])*Math.PI/180,i=Math.sin(o/2)*Math.sin(o/2)+Math.cos(r)*Math.cos(n)*Math.sin(a/2)*Math.sin(a/2),s=2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i)),l=A*s;return{km:Number((l/1e3).toFixed(2)),mi:Number((l/1e3*.621371).toFixed(2)),nMi:Number((l/1e3/1.852).toFixed(2))}},polarToCartesian:(e,t,r,n)=>{let o=(n-90)*Math.PI/180;return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}},mapDegreesToPixels:(e,t,r,n,o,a)=>{let i=(e-t)/(r-t),s=n+i*(o-n),l=a/20,d=o-(s-a)-l;return d<a?a:d}};dphelper?.setDescription(ve,ye);var J={version:"3.0.0",contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com"}],app:{folder:"src",type:"library",port:3e3,code:"dphelper",host:{dev:"http://localhost",prod:"https://biglogic.ca/dphelper"},socket:{url:{tst:"http://localhost:5000/",dev:"http://localhost:5000/",pro:"wss://ws.a51.dev/"}},events:{url:{tst:"http://localhost:5002/",dev:"http://localhost:5002/",pro:"wss://ws.a51.dev/"}},proxy:{api:{tst:"http://localhost:5003/",dev:"http://localhost:5003/",pro:"https://api.a51.dev/"}},url:{dev:"http://localhost/"},cdn:{}}};dphelper.credits=()=>{let e=J;console.groupCollapsed(`%c${e.app.code} v${e.version}%c`,"color:orange",""),console.debug(`%c${e.app.code} v${e.version}%c by Dario Passariello started`,"color:orange",""),console.debug(`name: %c${e.app.code}`,"color:orange",""),console.debug(`version: %c${e.version}`,"color:orange",""),console.groupEnd()};Object.defineProperty(dphelper,"credits",{writable:!1,enumerable:!1,configurable:!1});var G={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]};var xe={name:"date",active:!0,subCommand:[{name:"toIso",version:"0.0.2",example:"dphelper.date.toIso(value, 'en')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to ISO format.",env:"both",subCommand:[]},{name:"toMMDDYYYY",version:"0.0.2",example:"dphelper.date.toMMDDYYYY(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to MMDDYYYY format.",env:"both",subCommand:[]},{name:"toYYYYMMDD",version:"0.0.2",example:"dphelper.date.toYYYYMMDD(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to YYYYMMDD format.",env:"both",subCommand:[]},{name:"toHuman",version:"0.0.2",example:"dphelper.date.toHuman(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a human-readable format.",env:"both",subCommand:[]},{name:"convert",version:"0.0.2",example:"dphelper.date.convert(value, format)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a specified format.",env:"both",subCommand:[]},{name:"iso2Epoch",version:"0.0.2",example:"dphelper.date.iso2Epoch(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to epoch time.",env:"both",subCommand:[]},{name:"localIsoTime",version:"0.0.2",example:"dphelper.date.localIsoTime(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the local ISO time for a given date value.",env:"both",subCommand:[]},{name:"utc",version:"0.0.2",example:"dphelper.date.utc()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current UTC time.",env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.date.parse(value, '/')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Parses a date value with a specified separator.",env:"both",subCommand:[]},{name:"year",version:"0.0.2",example:"dphelper.date.year()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current year.",env:"both",subCommand:[]},{name:"addDays",version:"0.0.2",example:"dphelper.date.addDays(date, days)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Adds a specified number of days to a date.",env:"both",subCommand:[]},{name:"dateTimeToString",version:"0.0.2",example:"dphelper.date.dateTimeToString(dateObject)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date object to a string.",env:"both",subCommand:[]},{name:"isoToHuman",version:"0.0.2",example:"dphelper.date.isoToHuman(value, '@')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to a human-readable format with a specified symbol.",env:"both",subCommand:[]},{name:"fullDate",version:"0.0.2",example:"dphelper.date.fullDate()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the full date and time in the format DD-MM-YYYY HH:MM:SS.",env:"both",subCommand:[]},{name:"epoch",version:"0.0.2",example:"dphelper.date.epoch()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current epoch time.",env:"both",subCommand:[]},{name:"diffInDays",version:"0.0.2",example:"dphelper.date.diffInDays(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in days between two dates.",env:"both",subCommand:[]},{name:"diffInWeeks",version:"0.0.2",example:"dphelper.date.diffInWeeks(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in weeks between two dates.",env:"both",subCommand:[]},{name:"diffInMonths",version:"0.0.2",example:"dphelper.date.diffInMonths(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in months between two dates.",env:"both",subCommand:[]},{name:"diffInYears",version:"0.0.2",example:"dphelper.date.diffInYears(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in years between two dates.",env:"both",subCommand:[]},{name:"dateToYMD",version:"0.0.2",example:"dphelper.date.dateToYMD(date)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date to the format YYYY-MM-DD.",env:"both",subCommand:[]},{name:"collection",version:"0.0.2",example:"dphelper.date.collection()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets various date representations based on the type and locale.",env:"both",subCommand:[]},{name:"timeZones",version:"0.0.2",example:"dphelper.date.timeZones()",author:"Dario Passariello",creationDate:"20240901",lastMod:"20260220",type:"function",active:!0,description:"Returns an array of all supported timezones.",env:"both",subCommand:[]}]},Ce={days:(e="en")=>({en:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],it:["luned\xEC","marted\xEC","mercoled\xEC","gioved\xEC","venerd\xEC","sabato","domenica"]})[e],months:(e="en")=>G[e],year:()=>new Date().getFullYear(),toIso:(e,t="en")=>{e||(e="");let r=new Date(e);return String(r)==="Invalid Date"?null:new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(r)},toMMDDYYYY:e=>{try{let t=new Date(e);return`0${t.getMonth()+1}`.slice(-2)+""+`0${t.getDate()}`.slice(-2)+t.getFullYear()}catch{return""}},toYYYYMMDD:e=>{if(e)return e.toISOString().split("T")[0].replaceAll("-","")},toHuman:e=>{let t={weekday:"long",year:"numeric",month:"long",day:"numeric"};return e.toLocaleDateString(void 0,t)},convert:(e,t)=>{if(!e)return null;t||(t=dphelper.date.months("en"));let r=e.substring(0,2).replace("0",""),n=e.substring(2,4),o=e.substring(e.length-4);return`${n} ${t[Number(r)-1]} ${o}`},iso2Epoch:e=>(e||(e=""),new Date(e).getTime()),localIsoTime:e=>{e||(e=new Date);let t=new Date(e);if(isNaN(t.getTime()))return"";let r=t.getTimezoneOffset()*6e4;return new Date(Date.now()-r).toISOString().slice(0,-1)},utc:()=>new Date().toUTCString(),parse:(e,t="/")=>{if(!e)return null;let r=e.substring(0,2),n=e.substring(2,4),o=e.substring(4,8);return r+t+n+t+o},addDays:(e,t)=>{let r=new Date(Number(e));return r.setDate(e.getDate()+t),r},dateTimeToString:e=>{try{return`${e.getFullYear()}${e.getMonth().toString().length>1?e.getMonth()+1:`0${e.getMonth()+1}`}
|
|
52
|
+
`,env:"client",subCommand:[]},{name:"polarToCartesian",version:"0.0.2",example:"dphelper.coords.polarToCartesian([centerX, centerY, radius, angleInDegrees])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Convert polar coordinates to Cartesian coordinates",env:"client",subCommand:[]},{name:"mapDegreesToPixels",version:"0.0.2",example:"dphelper.coords.mapDegreesToPixels([degree, minDegree, maxDegree, minPixel, maxPixel, padding])",author:"Dario Passariello",creationDate:"2024-09-28",lastMod:"2024-09-28",type:"function",active:!0,description:"Map degrees to pixels",env:"client",subCommand:[]}]},A=6371e3,ye={degreesToRadians:e=>e*Math.PI/180,latToMeters:e=>Array.isArray(e)?A*Math.cos(e[0])*Math.cos(e[1])/1e3:void 0,toVector:e=>{if(!Array.isArray(e))return;let t=A*Math.cos(e[1]*Math.PI/180)*Math.cos(e[0]*Math.PI/180),r=A*Math.cos(e[1]*Math.PI/180)*Math.sin(e[0]*Math.PI/180),n=A*Math.sin(e[2]*Math.PI/180);return[t,r,n]},convertToDecDegrees:(e,t,r,n)=>{let o=e+t/60+r/3600;return(n==="S"||n==="W")&&(o*=-1),o},distance:(e,t)=>{if(!(Array.isArray(e)&&Array.isArray(t)))return;let r=e[0]*Math.PI/180,n=t[0]*Math.PI/180,o=(t[0]-e[0])*Math.PI/180,a=(t[1]-e[1])*Math.PI/180,i=Math.sin(o/2)*Math.sin(o/2)+Math.cos(r)*Math.cos(n)*Math.sin(a/2)*Math.sin(a/2),s=2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i)),l=A*s;return{km:Number((l/1e3).toFixed(2)),mi:Number((l/1e3*.621371).toFixed(2)),nMi:Number((l/1e3/1.852).toFixed(2))}},polarToCartesian:(e,t,r,n)=>{let o=(n-90)*Math.PI/180;return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}},mapDegreesToPixels:(e,t,r,n,o,a)=>{let i=(e-t)/(r-t),s=n+i*(o-n),l=a/20,d=o-(s-a)-l;return d<a?a:d}};dphelper?.setDescription(ve,ye);var J={version:"3.0.0",contributors:[{name:"Dario Passariello",email:"dariopassariello@gmail.com"}],app:{folder:"src",type:"library",port:3e3,code:"dphelper",host:{dev:"http://localhost",prod:"https://biglogic.ca/dphelper"},socket:{url:{tst:"http://localhost:5000/",dev:"http://localhost:5000/",pro:"wss://ws.a51.dev/"}},events:{url:{tst:"http://localhost:5002/",dev:"http://localhost:5002/",pro:"wss://ws.a51.dev/"}},proxy:{api:{tst:"http://localhost:5003/",dev:"http://localhost:5003/",pro:"https://api.a51.dev/"}},url:{dev:"http://localhost/"},cdn:{}}};dphelper.credits=()=>{let e=J;console.groupCollapsed(`%c${e.app.code} v${e.version}%c`,"color:orange",""),console.debug(`%c${e.app.code} v${e.version}%c by Dario Passariello started`,"color:orange",""),console.debug(`name: %c${e.app.code}`,"color:orange",""),console.debug(`version: %c${e.version}`,"color:orange",""),console.groupEnd()};Object.defineProperty(dphelper,"credits",{writable:!1,enumerable:!1,configurable:!1});var G={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]};var xe={name:"date",active:!0,subCommand:[{name:"toIso",version:"0.0.2",example:"dphelper.date.toIso(value, 'en')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to ISO format.",env:"both",subCommand:[]},{name:"toMMDDYYYY",version:"0.0.2",example:"dphelper.date.toMMDDYYYY(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to MMDDYYYY format.",env:"both",subCommand:[]},{name:"toYYYYMMDD",version:"0.0.2",example:"dphelper.date.toYYYYMMDD(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to YYYYMMDD format.",env:"both",subCommand:[]},{name:"toHuman",version:"0.0.2",example:"dphelper.date.toHuman(value)",author:"Dario Passariello",creationDate:"20230101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a human-readable format.",env:"both",subCommand:[]},{name:"convert",version:"0.0.2",example:"dphelper.date.convert(value, format)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date value to a specified format.",env:"both",subCommand:[]},{name:"iso2Epoch",version:"0.0.2",example:"dphelper.date.iso2Epoch(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to epoch time.",env:"both",subCommand:[]},{name:"localIsoTime",version:"0.0.2",example:"dphelper.date.localIsoTime(value)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the local ISO time for a given date value.",env:"both",subCommand:[]},{name:"utc",version:"0.0.2",example:"dphelper.date.utc()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current UTC time.",env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.date.parse(value, '/')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Parses a date value with a specified separator.",env:"both",subCommand:[]},{name:"year",version:"0.0.2",example:"dphelper.date.year()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current year.",env:"both",subCommand:[]},{name:"addDays",version:"0.0.2",example:"dphelper.date.addDays(date, days)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Adds a specified number of days to a date.",env:"both",subCommand:[]},{name:"dateTimeToString",version:"0.0.2",example:"dphelper.date.dateTimeToString(dateObject)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date object to a string.",env:"both",subCommand:[]},{name:"isoToHuman",version:"0.0.2",example:"dphelper.date.isoToHuman(value, '@')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts an ISO date value to a human-readable format with a specified symbol.",env:"both",subCommand:[]},{name:"fullDate",version:"0.0.2",example:"dphelper.date.fullDate()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the full date and time in the format DD-MM-YYYY HH:MM:SS.",env:"both",subCommand:[]},{name:"epoch",version:"0.0.2",example:"dphelper.date.epoch()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets the current epoch time.",env:"both",subCommand:[]},{name:"diffInDays",version:"0.0.2",example:"dphelper.date.diffInDays(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in days between two dates.",env:"both",subCommand:[]},{name:"diffInWeeks",version:"0.0.2",example:"dphelper.date.diffInWeeks(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in weeks between two dates.",env:"both",subCommand:[]},{name:"diffInMonths",version:"0.0.2",example:"dphelper.date.diffInMonths(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in months between two dates.",env:"both",subCommand:[]},{name:"diffInYears",version:"0.0.2",example:"dphelper.date.diffInYears(d1, d2)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculates the difference in years between two dates.",env:"both",subCommand:[]},{name:"dateToYMD",version:"0.0.2",example:"dphelper.date.dateToYMD(date)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Converts a date to the format YYYY-MM-DD.",env:"both",subCommand:[]},{name:"collection",version:"0.0.2",example:"dphelper.date.collection()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Gets various date representations based on the type and locale.",env:"both",subCommand:[]},{name:"timeZones",version:"0.0.2",example:"dphelper.date.timeZones()",author:"Dario Passariello",creationDate:"20240901",lastMod:"20260220",type:"function",active:!0,description:"Returns an array of all supported timezones.",env:"both",subCommand:[]}]},Ce={days:(e="en")=>({en:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],it:["luned\xEC","marted\xEC","mercoled\xEC","gioved\xEC","venerd\xEC","sabato","domenica"]})[e],months:(e="en")=>G[e],year:()=>new Date().getFullYear(),toIso:(e,t="en")=>{e||(e="");let r=new Date(e);return String(r)==="Invalid Date"?null:new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(r)},toMMDDYYYY:e=>{try{let t=new Date(e);return isNaN(t.getTime())?"":`0${t.getMonth()+1}`.slice(-2)+""+`0${t.getDate()}`.slice(-2)+t.getFullYear()}catch{return""}},toYYYYMMDD:e=>{if(e)return e.toISOString().split("T")[0].replaceAll("-","")},toHuman:e=>{let t={weekday:"long",year:"numeric",month:"long",day:"numeric"};return e.toLocaleDateString(void 0,t)},convert:(e,t)=>{if(!e)return null;t||(t=dphelper.date.months("en"));let r=e.substring(0,2).replace("0",""),n=e.substring(2,4),o=e.substring(e.length-4);return`${n} ${t[Number(r)-1]} ${o}`},iso2Epoch:e=>(e||(e=""),new Date(e).getTime()),localIsoTime:e=>{e||(e=new Date);let t=new Date(e);if(isNaN(t.getTime()))return"";let r=t.getTimezoneOffset()*6e4;return new Date(Date.now()-r).toISOString().slice(0,-1)},utc:()=>new Date().toUTCString(),parse:(e,t="/")=>{if(!e)return null;let r=e.substring(0,2),n=e.substring(2,4),o=e.substring(4,8);return r+t+n+t+o},addDays:(e,t)=>{let r=new Date(Number(e));return r.setDate(e.getDate()+t),r},dateTimeToString:e=>{try{return`${e.getFullYear()}${e.getMonth().toString().length>1?e.getMonth()+1:`0${e.getMonth()+1}`}
|
|
53
53
|
${e.getDate().toString().length>1?e.getDate():`0${e.getDate()}`}_${e.getHours()}${e.getMinutes()}${e.getSeconds()}`}catch(t){return console.error(t),e}},isoToHuman:(e,t="@")=>{if(!e)return null;let r=dphelper.date.months("en"),n=new Date(e),o=n.getFullYear(),a=e.split("T")[1].split(":").slice(0,2).join(":"),i=(n.getMonth()+1).toString(),s=n.getDate().toString();return s.length<2&&(s=`0${s}`),i.length<2&&(i=`0${i}`),`${s} ${r[Number(i)-1]} ${o} ${t} ${a}`},fullDate:()=>{let e=new Date,t=Number(e.getDate()),r=Number(e.getMonth()+1),n=Number(e.getFullYear()),o=Number(e.getHours()),a=Number(e.getMinutes()),i=Number(e.getSeconds());return(t<10?`0${t}`:t)+"-"+(r<10?`0${r}`:r)+"-"+n+" "+(o<10?`0${o}`:o)+":"+(a<10?`0${a}`:a)+":"+(i<10?`0${i}`:i)},epoch:()=>Date.now(),diffInDays:(e,t)=>{let r=t.getTime(),n=e.getTime();return Math.floor((r-n)/(24*3600*1e3))},diffInWeeks:(e,t)=>{let r=t.getTime(),n=e.getTime();return Number(Number.parseInt(String((r-n)/(24*3600*1e3*7)),10))},diffInMonths:(e,t)=>{let r=e.getFullYear(),n=t.getFullYear(),o=e.getMonth();return t.getMonth()+12*n-(o+12*r)},diffInYears:(e,t)=>t.getFullYear()-e.getFullYear(),dateToYMD:e=>{let t=e.getDate(),r=e.getMonth()+1;return`${e.getFullYear()}-${r<=9?`0${r}`:r}-${t<=9?`0${t}`:t}`},collection:({date:e=new Date,type:t="",locale:r="en-US"})=>{!e&&t&&r&&console.debug(`
|
|
54
54
|
"toDateString" -> Tue Jan 02 2024
|
|
55
55
|
"toISOString" -> 2024-01-02T18:44:43.590Z
|
|
@@ -64,7 +64,7 @@ ${r}`)},Y={tokenCount:e=>{let t=typeof e=="string"?e:E(e);if(!t)return 0;let r=t
|
|
|
64
64
|
`)},saveCsvAs:(e,t)=>{let r=new Blob([e],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a"),o=dphelper.date.dateTimeToString(new Date(Date.now())),a=`${t}_${o}.csv`,i=URL.createObjectURL(r);n.setAttribute("href",i),n.setAttribute("download",a),n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n)},is:e=>{try{JSON.parse(e)}catch(t){return console.warn(t),!1}return!0},parse:e=>{try{return JSON.parse(e)}catch(t){return console.warn(t),"Json not parsable"}},sanitize:e=>e?"{"+e.trim().replace(/^\{/,"").replace(/\}$/,"").split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(o=>{let[a,...i]=o.split(":"),s=dphelper.json.sanitizeJsonValue(a?.trim()??"");if(!a)return"";let l=i.join(":");return l?(l=l.trim(),l==="null"?l='""':l==="true"||l==="false"?l=`"${l}"`:/^\d+$/.test(l)?l=`"${l}"`:l=dphelper.json.sanitizeJsonValue(l)):l='""',`${s}:${l}`}).filter(o=>o!=="").join(",")+"}":"{}",sanitizeJsonValue:e=>e?`"${e.replace(/^"(.*)"$/,"$1").replace(/\\/g,"").replace(/\//g,"/").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/"/g,'\\"').replace(/\t/g," ").trim()}"`:'""'};dphelper?.setDescription(Ie,Re);var ze={name:"load",active:!0,subCommand:[{name:"all",version:"0.0.2",example:"dphelper.load.all(require['context']('Scripts', true, /.(js|ts)$/) [, 'cacheName'])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Load all files from a specific folder based on a specific extension. If you add a 'cacheName', the list is stored in cache.",env:"client",subCommand:[]},{name:"file",version:"0.0.2",example:"dphelper.load.file(filePath)",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Load a specific file.",env:"client",subCommand:[]},{name:"fileToElement",version:"0.0.2",example:"dphelper.load.fileToElement(filePath, elementSelector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Load a file and insert its content into an element.",env:"client",subCommand:[]},{name:"script",version:"0.0.2",example:"dphelper.load.script(scripts, elementSelector)",author:"Dario Passariello",creationDate:"20240525",lastMod:"20240525",type:"function",active:!0,description:"Append script tags to an element.",env:"client",subCommand:[]},{name:"toJson",version:"0.0.2",example:"dphelper.load.toJson(require.context('./src/router', true, /.(ts)$/), 'router')",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,description:"Create JSON from folder recursion.",env:"client",subCommand:[]}]},He={all:(e,t="")=>{if(e){t&&!window[t]&&(window[t]=[]);for(let r of e.keys()){if(!r)return;t&&window[t].push(r),e(r)}}},file:()=>null,fileToElement:async(e,t)=>{try{let r=await dphelper.load.file(t),n=document.querySelector(e);n?n.innerHTML=dphelper.sanitize.html(r):console.error(`Element not found: ${e}`)}catch(r){console.error("Error loading file to element:",r)}},script:(e,t="html")=>{let r=document.querySelector(t);if(!r){console.error(`Element not found: ${t}`);return}for(let n of e){let o=document.createElement("script");o.src=n,o.async=!0,o.defer=!0,r.appendChild(o)}},toJson:(e,t="")=>{let r={};if(e){t&&(r[t]=[]);for(let n of e.keys()){if(!n)return;t&&r[t]&&r[t].push(n),e(n)}!t||!r[t]||Object.defineProperty(window,t,{value:dphelper.array.pathToJson(r[t]),writable:!1,enumerable:!1,configurable:!1})}}};dphelper?.setDescription(ze,He);var Fe={name:"logging",active:!0,subCommand:[{name:"list",version:"0.0.2",example:"dphelper.log.list()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"List all log entries.",env:"both",subCommand:[]},{name:"reg",version:"0.0.2",example:"dphelper.log.reg('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log a regular message.",env:"both",subCommand:[]},{name:"debug",version:"0.0.2",example:"dphelper.log.debug('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log a debug message.",env:"both",subCommand:[]},{name:"error",version:"0.0.2",example:"dphelper.log.error('message')",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Log an error message.",env:"both",subCommand:[]}]},O={log:[]},_e={list:()=>O.log,reg:e=>O.log.push({type:"reg",message:e}),debug:e=>O.log.push({type:"debug",message:e}),error:e=>O.log.push({type:"error",message:e})};Object.defineProperty(O,"log",{writable:!1,enumerable:!1,configurable:!1});dphelper?.setDescription(Fe,_e);var Ue={name:"math",active:!0,subCommand:[{name:"rnd",version:"0.0.2",example:"dphelper.math.rnd()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Generate a random number.",env:"both",subCommand:[]},{name:"tmr",version:"0.0.2",example:"dphelper.math.tmr()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Measure the time taken by a function.",env:"both",subCommand:[]},{name:"isOdd",version:"0.0.2",example:"dphelper.math.isOdd(a)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a number is odd.",env:"both",subCommand:[]},{name:"percent",version:"0.0.2",example:"dphelper.math.percent([n, tot])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Calculate the percentage of a number relative to a total. Example: total: 100, number: 25 -> 25%",env:"both",subCommand:[]},{name:"isPrime",version:"0.0.2",example:"dphelper.math.isPrime(a)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a number is prime.",env:"both",subCommand:[]}]},Ye={rnd:()=>Math.floor(1e5+Math.random()*dphelper.math.tmr()),tmr:()=>Math.round(dphelper.date.epoch()/1e3),isOdd:e=>Number(e)%2!==0,percent:(e,t)=>{if(t===0)throw new Error("Total cannot be zero");return Number(e)/Number(t)*100},isPrime:e=>{if(Number(e)<=1)return!1;for(let t=2;t<=Math.sqrt(Number(e));t++)if(Number(e)%t===0)return!1;return!0}};dphelper?.setDescription(Ue,Ye);var Be={name:"memory",active:!0,subCommand:[{name:"lock",version:"0.0.2",example:"dphelper.memory.lock('state[key]')",author:"Dario Passariello",creationDate:"20230101",lastMod:"20230111",type:"function",active:!0,description:"Lock a state",env:"client",subCommand:[]},{name:"unlock",version:"0.0.2",example:"dphelper.memory.unlock('state[key]')",author:"Dario Passariello",creationDate:"20230101",lastMod:"20230111",type:"function",active:!0,description:"Unlock a state",env:"client",subCommand:[]}]},Je={lock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],o=r[1];if(!n||!o)return;let a=t[n];a&&Object.defineProperty(a,o,{writable:!1,configurable:!1})},unlock:e=>{if(!e)return;let t=window,r=e.split(".");if(r.length<2)return;let n=r[0],o=r[1];if(!n||!o)return;let a=t[n];if(a)try{Object.defineProperty(a,o,{writable:!0,configurable:!0})}catch{}}};dphelper?.setDescription(Be,Je);var Ge={name:"navigation",active:!0,subCommand:[{name:"ajax",version:"0.0.2",example:"dphelper.navigation.ajax()",author:"Dario Passariello",creationDate:"20260223",lastMod:"20260223",type:"function",active:!0,description:"Vanilla AJAX Single Page Application (SPA) navigation engine.",env:"client",subCommand:[]},{name:"load",version:"0.0.1",example:"dphelper.navigation.load('/home')",author:"Dario Passariello",creationDate:"20260223",lastMod:"20260223",type:"function",active:!0,description:"Loads a page via AJAX and injects it into the body.",env:"client",subCommand:[]}]},We={load:async e=>{let r=document.body,n=e.startsWith("/")?e.split("/")[1]||"home":e;if((!n||n==="")&&(n="home"),!document.querySelector(".loader")){let o=document.createElement("div");o.className="loader",o.innerHTML="<i></i>",o.style.opacity="0",o.style.transition="opacity 1000ms",r.appendChild(o),setTimeout(()=>o.style.opacity="1",10)}try{let o=await fetch(`${n}/`);if(!o.ok)throw new Error("Page not found");let a=await o.text(),i=a.match(/<body[^>]*>([\s\S]*)<\/body>/i),s=i?i[1]:a;r.innerHTML=s||"",window.scrollTo({top:0,behavior:"smooth"}),document.title=n.charAt(0).toUpperCase()+n.slice(1);let l=dphelper.path.rail();l&&l.length>0&&(r.className=r.className.replace(/path-\w+/g,"").trim(),r.classList.add(`path-${l[l.length-1]}`)),globalThis.dphelper.navigation.ajax_running&&dphelper.navigation.ajax()}catch(o){console.error("Navigation error:",o),e.startsWith("/")&&(window.location.href=e)}},_bind:e=>{document.querySelectorAll(e).forEach(r=>{let n=r.getAttribute("href");if(!n||!n.startsWith("/")||n.includes("#"))return;let o=r.cloneNode(!0);r.parentNode?.replaceChild(o,r),o.addEventListener("mouseup",a=>{let i=o.getAttribute("data-href")||n;history.pushState({href:i},"",i),dphelper.navigation.load(i),o.removeAttribute("href"),a.stopPropagation()})})},ajax:()=>{if(globalThis.dphelper.navigation.ajax_running){dphelper.navigation._bind("a");return}globalThis.dphelper.navigation.ajax_running=!0,window.onpopstate=()=>dphelper.navigation.load(window.location.pathname),dphelper.navigation._bind("a"),globalThis.dp_hash_listener_set||(window.addEventListener("hashchange",()=>{let e=window.location.hash.substring(1);e&&document.getElementById(e)?.scrollIntoView({behavior:"smooth"})}),globalThis.dp_hash_listener_set=!0)}};dphelper?.setDescription(Ge,We);var Ve={name:"obj",active:!0,subCommand:[{name:"replaceNullObjects",version:"0.0.2",example:"dphelper.obj.replaceNullObjects([obj])",description:"Replace null values in an object with empty objects.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"serialize",version:"0.0.2",example:"dphelper.obj.serialize([obj])",description:"Serialize an object to a JSON string.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"deSerialize",version:"0.0.2",example:"dphelper.obj.deSerialize([obj])",description:"Deserialize a JSON string to an object.",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,env:"both",subCommand:[]},{name:"toXML",version:"0.0.2",example:"dphelper.obj.toXML([obj])",description:"Convert an object to an XML string.",author:"Dario Passariello",creationDate:"20240315",lastMod:"20240315",type:"function",active:!0,env:"both",subCommand:[]},{name:"updateByKey",version:"0.0.2",example:"dphelper.obj.updateByKey([obj, key, newValue])",description:"Update an object's property by key.",author:"Dario Passariello",creationDate:"20240929",lastMod:"20240929",type:"function",active:!0,env:"both",subCommand:[]},{name:"parse",version:"0.0.2",example:"dphelper.obj.parse(val)",description:"Check if value is an object or another type. Return object after parse or a different type. Used instead of JSON.parse to avoid crash.",author:"Dario Passariello",creationDate:"20241027",lastMod:"20240927",type:"function",active:!0,env:"both",subCommand:[]},{name:"diff",version:"0.0.2",example:"dphelper.obj.diff([obj1, obj2])",description:"Show the differences between two objects.",author:"Dario Passariello",creationDate:"20250101",lastMod:"20250101",type:"function",active:!0,env:"both",subCommand:[]},{name:"setProps",version:"0.0.2",example:"dphelper.obj.setProps( [object], {options} )",author:"Dario Passariello",creationDate:"20251224",lastMod:"20251224",type:"function",active:!0,description:"Set properties of an object.",env:"both",subCommand:[]}]},Ze={replaceNullObjects:e=>{let t={...e};for(let r of Object.keys(e))t[r]===null&&(t[r]="")},serialize:e=>{if(typeof e=="function")return e.toString();if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=dphelper.obj.serialize(n);return t}return e},deSerialize:e=>{if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e))t[r]=dphelper.obj.deSerialize(n);return t}return e},sort:e=>Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}),toXML:e=>{let t=(r,n="")=>{let o="";for(let a in r)if(Object.hasOwn(r,a)){let i=r[a];typeof i=="object"&&i!==null?o+=`${n}<${a}>
|
|
65
65
|
${t(i,`${n} `)}${n}</${a}>
|
|
66
66
|
`:o+=`${n}<${a}>${i}</${a}>
|
|
67
|
-
`}return o};return t(e)},updateByKey:(e,t,r)=>(Object.hasOwn(e,t)&&(e[t]=r),e),parse:e=>{try{return JSON.parse(e)}catch(t){return console.error(t),e}},isObject:e=>typeof e=="object"&&e!==null,diff:(e,t)=>{let r={};for(let n in e)Object.hasOwn(e,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});for(let n in t)Object.hasOwn(t,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});return r},path:(e,t,r=".")=>t.concat(e).join(r),setProps:(e,t)=>{Reflect.ownKeys(e).forEach(n=>{let o=Object.getOwnPropertyDescriptor(e,n);o&&(o.enumerable=t?.enumerable??!0,o.configurable=t?.configurable??!0,o.writable=t?.writable??!0,Object.defineProperty(e,n,o)),typeof e[n]=="object"&&e[n]!==null&&dphelper.obj.setProps(e[n],t)})}};dphelper?.setDescription(Ve,Ze);var Ke={name:"path",active:!0,subCommand:[{name:"rail",version:"0.0.2",example:"dphelper.path.rail()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the path segments from the current URL.",env:"both",subCommand:[]},{name:"hash",version:"0.0.2",example:"dphelper.path.hash([hashUrl])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the hash from a URL.",env:"both",subCommand:[]},{name:"query",version:"0.0.2",example:"dphelper.path.query([queryString])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20250513",type:"function",active:!0,description:"Extract the query parameters from a URL.",env:"both",subCommand:[]}]},Xe={rail:()=>(location.href.split("?")[0]||"").replace(location.protocol,"").replace(location.host,"").replace(location.hash,"").split("/").filter(t=>t),hash:()=>{let e=location.hash.replace("#","").split("/");return e.length?e.filter(t=>t):["empty"]},query:()=>{let e=location.search.substring(1);return JSON.parse(`{"${decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')}"}`)}};dphelper?.setDescription(Ke,Xe);var Qe={name:"promise",active:!0,subCommand:[{name:"check",version:"0.0.2",example:"dphelper.promise.check(promise)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is a Promise.",env:"both",subCommand:[]}]},et={check:e=>e&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]"||typeof e=="object"&&e!==null&&typeof e.then=="function")};dphelper?.setDescription(Qe,et);var tt={name:"sanitize",active:!0,subCommand:[{name:"html",version:"0.0.2",example:"dphelper.sanitize.html([html])",author:"Dario Passariello",creationDate:"20241204",lastMod:"20241204",type:"function",active:!0,description:"Sanitize HTML by escaping special characters.",env:"both",subCommand:[]}]},rt={html:e=>typeof e!="string"?"":e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};dphelper?.setDescription(tt,rt);var L="dphelper_popup_positions",W=(e,t,r,n)=>`${e}x${t}@${r},${n}`,$=()=>{let e=[];return e.push({id:"primary",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0}),window.screenLeft!==void 0&&window.screenTop!==void 0&&(window.screenLeft>0||window.screenTop>0)&&e.push({id:`secondary_${Date.now()}`,width:window.innerWidth,height:window.innerHeight,left:window.screenLeft,top:window.screenTop,isPrimary:!1}),e},_=(e,t)=>{let r=$();for(let a of r)if(e>=a.left&&e<a.left+a.width&&t>=a.top&&t<a.top+a.height)return a;if(!r.length)return{id:"default",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0};let n=r[0],o=1/0;for(let a of r){let i=a.left+a.width/2,s=a.top+a.height/2,l=Math.sqrt(Math.pow(i-e,2)+Math.pow(s-t,2));l<o&&(o=l,n=a)}return n},nt=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),ot=(e,t,r)=>({left:r.left+e,top:r.top+t}),at=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,o=r.screenY||r.screenTop||0,a=r.outerWidth||800,i=r.outerHeight||600,s=$(),l=_(n,o),{relX:d,relY:c}=nt(n,o,l),p=W(l.width,l.height,l.left,l.top),m=q();m.monitors=s,m.popups[e]={id:e,monitorId:l.id,left:d,top:c,width:a,height:i,monitorFingerprint:p},localStorage.setItem(L,JSON.stringify(m))},it=e=>{if(typeof window>"u")return null;let t=q(),r=t.popups[e];if(!r)return null;let n=$(),o=n.find(l=>W(l.width,l.height,l.left,l.top)===r.monitorFingerprint),a;o?a=o:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),a=_(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:i,top:s}=ot(r.left,r.top,a);return{left:i,top:s,width:r.width,height:r.height}},st=e=>{let t=q();delete t.popups[e],localStorage.setItem(L,JSON.stringify(t))},lt=()=>q().popups,ct=()=>_(window.screenX||0,window.screenY||0),dt=()=>{localStorage.removeItem(L)},q=()=>{try{let e=localStorage.getItem(L);if(e)return JSON.parse(e)}catch(e){console.warn("[dphelper] Failed to parse popup storage:",e)}return{monitors:[],popups:{}}},M={save:at,restore:it,remove:st,list:lt,clear:dt,getMonitors:$,getCurrentMonitor:ct};var ut={name:"screen",active:!0,subCommand:[{name:"popup",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Manage popup windows positions across monitor changes.",env:"client",subCommand:[{name:"save",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Save popup position with monitor fingerprint",env:"client",subCommand:[]},{name:"restore",version:"0.0.1",example:"dphelper.screen.popup.restore('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Restore popup position (auto-adjusts if monitor changed)",env:"client",subCommand:[]},{name:"remove",version:"0.0.1",example:"dphelper.screen.popup.remove('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Remove saved popup position",env:"client",subCommand:[]},{name:"list",version:"0.0.1",example:"dphelper.screen.popup.list()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"List all saved popup positions",env:"client",subCommand:[]},{name:"getCurrentMonitor",version:"0.0.1",example:"dphelper.screen.popup.getCurrentMonitor()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Get current monitor info",env:"client",subCommand:[]},{name:"clear",version:"0.0.1",example:"dphelper.screen.popup.clear()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Clear all saved popup positions",env:"client",subCommand:[]}]},{name:"fullScreen",version:"0.0.2",example:"dphelper.screen.fullScreen([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Enter full screen mode for a given element.",env:"client",subCommand:[]},{name:"toggle",version:"0.0.2",example:"dphelper.screen.toggle([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Toggle full screen mode for a given element.",env:"client",subCommand:[]}]},pt={fullScreen:e=>{let t=document.querySelector(e);t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},toggle:e=>{let t=document,r=t.querySelector(e);r?t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement?t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.msExitFullscreen&&t.msExitFullscreen():r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen():console.error(`Element not found: ${e}`)},info:()=>({width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth}),popup:{save:(e,t)=>{M.save(e,t)},restore:e=>M.restore(e),remove:e=>{M.remove(e)},list:()=>M.list(),getCurrentMonitor:()=>M.getCurrentMonitor(),clear:()=>{M.clear()}}};dphelper?.setDescription(ut,pt);var mt={name:"scrollbar",active:!0,subCommand:[{name:"custom",version:"0.0.2",example:"dphelper.scrollbar.custom(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Apply custom styles to the scrollbar for the selected elements.",env:"client",subCommand:[]},{name:"indicator",version:"0.0.2",example:"dphelper.scrollbar.indicator(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Add a scroll indicator to the selected elements.",env:"client",subCommand:[]},{name:"position.get",version:"0.0.2",example:"dphelper.scrollbar.position.get(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Get the current scroll position of the selected elements.",env:"client",subCommand:[]},{name:"position.set",version:"0.0.2",example:"dphelper.scrollbar.position.set(selector, position)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Set the scroll position of the selected elements.",env:"client",subCommand:[]},{name:"smooth",version:"0.0.2",example:"dphelper.scrollbar.smooth(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Smoothly scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]},{name:"scrollTo",version:"0.0.2",example:"dphelper.scrollbar.scrollTo(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]}]},ht={custom:(e,t)=>{t.color_1=t?.color_1||"black",t.color_1_hover=t?.color_1_hover||"black",t.color_2=t?.color_2||"transparent",t.color_3=t?.color_3||"rgba(30,150,255,.5)",t.type=t?.type||"thin",t.behavior=t?.behavior||"smooth",t.width=t?.width||"16px",t.height=t?.height||"16px",t.rounded=t?.rounded||"10px",t.margin=t?.margin||0,t.border=t?.border||"5px",t.opacity=t?.opacity||1;let r=` ${e}::-webkit-scrollbar {
|
|
67
|
+
`}return o};return t(e)},updateByKey:(e,t,r)=>(Object.hasOwn(e,t)&&(e[t]=r),e),parse:e=>{try{return JSON.parse(e)}catch(t){return console.error(t),e}},isObject:e=>typeof e=="object"&&e!==null,diff:(e,t)=>{let r={};for(let n in e)Object.hasOwn(e,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});for(let n in t)Object.hasOwn(t,n)&&e[n]!==t[n]&&(r[n]={obj1:e[n],obj2:t[n]});return r},path:(e,t,r=".")=>t.concat(e).join(r),setProps:(e,t)=>{Reflect.ownKeys(e).forEach(n=>{let o=Object.getOwnPropertyDescriptor(e,n);o&&(o.enumerable=t?.enumerable??!0,o.configurable=t?.configurable??!0,o.writable=t?.writable??!0,Object.defineProperty(e,n,o)),typeof e[n]=="object"&&e[n]!==null&&dphelper.obj.setProps(e[n],t)})}};dphelper?.setDescription(Ve,Ze);var Ke={name:"path",active:!0,subCommand:[{name:"rail",version:"0.0.2",example:"dphelper.path.rail()",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the path segments from the current URL.",env:"both",subCommand:[]},{name:"hash",version:"0.0.2",example:"dphelper.path.hash([hashUrl])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Extract the hash from a URL.",env:"both",subCommand:[]},{name:"query",version:"0.0.2",example:"dphelper.path.query([queryString])",author:"Dario Passariello",creationDate:"20210101",lastMod:"20250513",type:"function",active:!0,description:"Extract the query parameters from a URL.",env:"both",subCommand:[]}]},Xe={rail:()=>(location.href.split("?")[0]||"").replace(location.protocol,"").replace(location.host,"").replace(location.hash,"").split("/").filter(t=>t),hash:()=>{let e=location.hash.replace("#","").split("/");return e.length?e.filter(t=>t):["empty"]},query:()=>{let e=location.search.substring(1);return JSON.parse(`{"${decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')}"}`)}};dphelper?.setDescription(Ke,Xe);var Qe={name:"promise",active:!0,subCommand:[{name:"check",version:"0.0.2",example:"dphelper.promise.check(promise)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Check if a value is a Promise.",env:"both",subCommand:[]}]},et={check:e=>e!=null&&(e instanceof Promise||Object.prototype.toString.call(e)==="[object Promise]"||typeof e=="object"&&typeof e.then=="function")};dphelper?.setDescription(Qe,et);var tt={name:"sanitize",active:!0,subCommand:[{name:"html",version:"0.0.2",example:"dphelper.sanitize.html([html])",author:"Dario Passariello",creationDate:"20241204",lastMod:"20241204",type:"function",active:!0,description:"Sanitize HTML by escaping special characters.",env:"both",subCommand:[]}]},rt={html:e=>typeof e!="string"?"":e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};dphelper?.setDescription(tt,rt);var L="dphelper_popup_positions",W=(e,t,r,n)=>`${e}x${t}@${r},${n}`,$=()=>{let e=[];return e.push({id:"primary",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0}),window.screenLeft!==void 0&&window.screenTop!==void 0&&(window.screenLeft>0||window.screenTop>0)&&e.push({id:`secondary_${Date.now()}`,width:window.innerWidth,height:window.innerHeight,left:window.screenLeft,top:window.screenTop,isPrimary:!1}),e},_=(e,t)=>{let r=$();for(let a of r)if(e>=a.left&&e<a.left+a.width&&t>=a.top&&t<a.top+a.height)return a;if(!r.length)return{id:"default",width:screen.width,height:screen.height,left:0,top:0,isPrimary:!0};let n=r[0],o=1/0;for(let a of r){let i=a.left+a.width/2,s=a.top+a.height/2,l=Math.sqrt(Math.pow(i-e,2)+Math.pow(s-t,2));l<o&&(o=l,n=a)}return n},nt=(e,t,r)=>({relX:e-r.left,relY:t-r.top}),ot=(e,t,r)=>({left:r.left+e,top:r.top+t}),at=(e,t)=>{if(typeof window>"u")return;let r=t||window,n=r.screenX||r.screenLeft||0,o=r.screenY||r.screenTop||0,a=r.outerWidth||800,i=r.outerHeight||600,s=$(),l=_(n,o),{relX:d,relY:c}=nt(n,o,l),p=W(l.width,l.height,l.left,l.top),m=q();m.monitors=s,m.popups[e]={id:e,monitorId:l.id,left:d,top:c,width:a,height:i,monitorFingerprint:p},localStorage.setItem(L,JSON.stringify(m))},it=e=>{if(typeof window>"u")return null;let t=q(),r=t.popups[e];if(!r)return null;let n=$(),o=n.find(l=>W(l.width,l.height,l.left,l.top)===r.monitorFingerprint),a;o?a=o:(console.warn(`[dphelper] Monitor changed, restoring popup "${e}" on closest available monitor`),a=_(r.left+(n[0]?.left||0),r.top+(n[0]?.top||0)));let{left:i,top:s}=ot(r.left,r.top,a);return{left:i,top:s,width:r.width,height:r.height}},st=e=>{let t=q();delete t.popups[e],localStorage.setItem(L,JSON.stringify(t))},lt=()=>q().popups,ct=()=>_(window.screenX||0,window.screenY||0),dt=()=>{localStorage.removeItem(L)},q=()=>{try{let e=localStorage.getItem(L);if(e)return JSON.parse(e)}catch(e){console.warn("[dphelper] Failed to parse popup storage:",e)}return{monitors:[],popups:{}}},M={save:at,restore:it,remove:st,list:lt,clear:dt,getMonitors:$,getCurrentMonitor:ct};var ut={name:"screen",active:!0,subCommand:[{name:"popup",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Manage popup windows positions across monitor changes.",env:"client",subCommand:[{name:"save",version:"0.0.1",example:"dphelper.screen.popup.save('myPopup', window)",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Save popup position with monitor fingerprint",env:"client",subCommand:[]},{name:"restore",version:"0.0.1",example:"dphelper.screen.popup.restore('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Restore popup position (auto-adjusts if monitor changed)",env:"client",subCommand:[]},{name:"remove",version:"0.0.1",example:"dphelper.screen.popup.remove('myPopup')",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Remove saved popup position",env:"client",subCommand:[]},{name:"list",version:"0.0.1",example:"dphelper.screen.popup.list()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"List all saved popup positions",env:"client",subCommand:[]},{name:"getCurrentMonitor",version:"0.0.1",example:"dphelper.screen.popup.getCurrentMonitor()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Get current monitor info",env:"client",subCommand:[]},{name:"clear",version:"0.0.1",example:"dphelper.screen.popup.clear()",author:"Dario Passariello & Jo",creationDate:"20260221",lastMod:"20260221",type:"function",active:!0,description:"Clear all saved popup positions",env:"client",subCommand:[]}]},{name:"fullScreen",version:"0.0.2",example:"dphelper.screen.fullScreen([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Enter full screen mode for a given element.",env:"client",subCommand:[]},{name:"toggle",version:"0.0.2",example:"dphelper.screen.toggle([element])",author:"Dario Passariello",creationDate:"20240101",lastMod:"20240101",type:"function",active:!0,description:"Toggle full screen mode for a given element.",env:"client",subCommand:[]}]},pt={fullScreen:e=>{let t=document.querySelector(e);t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()},toggle:e=>{let t=document,r=t.querySelector(e);r?t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement?t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.msExitFullscreen&&t.msExitFullscreen():r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen():console.error(`Element not found: ${e}`)},info:()=>({width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth}),popup:{save:(e,t)=>{M.save(e,t)},restore:e=>M.restore(e),remove:e=>{M.remove(e)},list:()=>M.list(),getCurrentMonitor:()=>M.getCurrentMonitor(),clear:()=>{M.clear()}}};dphelper?.setDescription(ut,pt);var mt={name:"scrollbar",active:!0,subCommand:[{name:"custom",version:"0.0.2",example:"dphelper.scrollbar.custom(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Apply custom styles to the scrollbar for the selected elements.",env:"client",subCommand:[]},{name:"indicator",version:"0.0.2",example:"dphelper.scrollbar.indicator(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Add a scroll indicator to the selected elements.",env:"client",subCommand:[]},{name:"position.get",version:"0.0.2",example:"dphelper.scrollbar.position.get(selector)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Get the current scroll position of the selected elements.",env:"client",subCommand:[]},{name:"position.set",version:"0.0.2",example:"dphelper.scrollbar.position.set(selector, position)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Set the scroll position of the selected elements.",env:"client",subCommand:[]},{name:"smooth",version:"0.0.2",example:"dphelper.scrollbar.smooth(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Smoothly scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]},{name:"scrollTo",version:"0.0.2",example:"dphelper.scrollbar.scrollTo(container, element, gap)",author:"Dario Passariello",creationDate:"20210101",lastMod:"20260220",type:"function",active:!0,description:"Scroll to a specific element within a container with an optional gap.",env:"client",subCommand:[]}]},ht={custom:(e,t)=>{t.color_1=t?.color_1||"black",t.color_1_hover=t?.color_1_hover||"black",t.color_2=t?.color_2||"transparent",t.color_3=t?.color_3||"rgba(30,150,255,.5)",t.type=t?.type||"thin",t.behavior=t?.behavior||"smooth",t.width=t?.width||"16px",t.height=t?.height||"16px",t.rounded=t?.rounded||"10px",t.margin=t?.margin||0,t.border=t?.border||"5px",t.opacity=t?.opacity||1;let r=` ${e}::-webkit-scrollbar {
|
|
68
68
|
scroll-behavior: ${t.behavior};
|
|
69
69
|
width: ${t.width};
|
|
70
70
|
height: ${t.height};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dphelper",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"browser": "./dist/dphelper.umd.js",
|
|
@@ -82,9 +82,10 @@
|
|
|
82
82
|
"generate-imports": "tsx scripts/generate-imports.ts"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
+
"crypto-js": "4.2.0",
|
|
86
|
+
"@jest/globals": "^30.2.0",
|
|
85
87
|
"@types/crypto-js": "4.2.2",
|
|
86
88
|
"@types/node": "^25.3.1",
|
|
87
|
-
"crypto-js": "4.2.0",
|
|
88
89
|
"esbuild": "0.27.3",
|
|
89
90
|
"esbuild-node-externals": "1.20.1",
|
|
90
91
|
"esbuild-plugin-alias": "0.2.1",
|