Profectus/assets/lz-string-BZNGtwso.js

1 line
5.3 KiB
JavaScript

var U=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}function b(h){if(h.__esModule)return h;var m=h.default;if(typeof m=="function"){var w=function g(){return this instanceof g?Reflect.construct(m,arguments,this.constructor):m.apply(this,arguments)};w.prototype=m.prototype}else w={};return Object.defineProperty(w,"__esModule",{value:!0}),Object.keys(h).forEach(function(g){var x=Object.getOwnPropertyDescriptor(h,g);Object.defineProperty(w,g,x.get?x:{enumerable:!0,get:function(){return h[g]}})}),w}var O={exports:{}};O.exports;(function(h){var m=function(){var w=String.fromCharCode,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",M={};function j(n,o){if(!M[n]){M[n]={};for(var s=0;s<n.length;s++)M[n][n.charAt(s)]=s}return M[n][o]}var v={compressToBase64:function(n){if(n==null)return"";var o=v._compress(n,6,function(s){return g.charAt(s)});switch(o.length%4){default:case 0:return o;case 1:return o+"===";case 2:return o+"==";case 3:return o+"="}},decompressFromBase64:function(n){return n==null?"":n==""?null:v._decompress(n.length,32,function(o){return j(g,n.charAt(o))})},compressToUTF16:function(n){return n==null?"":v._compress(n,15,function(o){return w(o+32)})+" "},decompressFromUTF16:function(n){return n==null?"":n==""?null:v._decompress(n.length,16384,function(o){return n.charCodeAt(o)-32})},compressToUint8Array:function(n){for(var o=v.compress(n),s=new Uint8Array(o.length*2),t=0,i=o.length;t<i;t++){var p=o.charCodeAt(t);s[t*2]=p>>>8,s[t*2+1]=p%256}return s},decompressFromUint8Array:function(n){if(n==null)return v.decompress(n);for(var o=new Array(n.length/2),s=0,t=o.length;s<t;s++)o[s]=n[s*2]*256+n[s*2+1];var i=[];return o.forEach(function(p){i.push(w(p))}),v.decompress(i.join(""))},compressToEncodedURIComponent:function(n){return n==null?"":v._compress(n,6,function(o){return x.charAt(o)})},decompressFromEncodedURIComponent:function(n){return n==null?"":n==""?null:(n=n.replace(/ /g,"+"),v._decompress(n.length,32,function(o){return j(x,n.charAt(o))}))},compress:function(n){return v._compress(n,16,function(o){return w(o)})},_compress:function(n,o,s){if(n==null)return"";var t,i,p={},_={},y="",A="",u="",d=2,a=3,c=2,l=[],e=0,f=0,r;for(r=0;r<n.length;r+=1)if(y=n.charAt(r),Object.prototype.hasOwnProperty.call(p,y)||(p[y]=a++,_[y]=!0),A=u+y,Object.prototype.hasOwnProperty.call(p,A))u=A;else{if(Object.prototype.hasOwnProperty.call(_,u)){if(u.charCodeAt(0)<256){for(t=0;t<c;t++)e=e<<1,f==o-1?(f=0,l.push(s(e)),e=0):f++;for(i=u.charCodeAt(0),t=0;t<8;t++)e=e<<1|i&1,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=i>>1}else{for(i=1,t=0;t<c;t++)e=e<<1|i,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=0;for(i=u.charCodeAt(0),t=0;t<16;t++)e=e<<1|i&1,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=i>>1}d--,d==0&&(d=Math.pow(2,c),c++),delete _[u]}else for(i=p[u],t=0;t<c;t++)e=e<<1|i&1,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=i>>1;d--,d==0&&(d=Math.pow(2,c),c++),p[A]=a++,u=String(y)}if(u!==""){if(Object.prototype.hasOwnProperty.call(_,u)){if(u.charCodeAt(0)<256){for(t=0;t<c;t++)e=e<<1,f==o-1?(f=0,l.push(s(e)),e=0):f++;for(i=u.charCodeAt(0),t=0;t<8;t++)e=e<<1|i&1,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=i>>1}else{for(i=1,t=0;t<c;t++)e=e<<1|i,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=0;for(i=u.charCodeAt(0),t=0;t<16;t++)e=e<<1|i&1,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=i>>1}d--,d==0&&(d=Math.pow(2,c),c++),delete _[u]}else for(i=p[u],t=0;t<c;t++)e=e<<1|i&1,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=i>>1;d--,d==0&&(d=Math.pow(2,c),c++)}for(i=2,t=0;t<c;t++)e=e<<1|i&1,f==o-1?(f=0,l.push(s(e)),e=0):f++,i=i>>1;for(;;)if(e=e<<1,f==o-1){l.push(s(e));break}else f++;return l.join("")},decompress:function(n){return n==null?"":n==""?null:v._decompress(n.length,32768,function(o){return n.charCodeAt(o)})},_decompress:function(n,o,s){var t=[],i=4,p=4,_=3,y="",A=[],u,d,a,c,l,e,f,r={val:s(0),position:o,index:1};for(u=0;u<3;u+=1)t[u]=u;for(a=0,l=Math.pow(2,2),e=1;e!=l;)c=r.val&r.position,r.position>>=1,r.position==0&&(r.position=o,r.val=s(r.index++)),a|=(c>0?1:0)*e,e<<=1;switch(a){case 0:for(a=0,l=Math.pow(2,8),e=1;e!=l;)c=r.val&r.position,r.position>>=1,r.position==0&&(r.position=o,r.val=s(r.index++)),a|=(c>0?1:0)*e,e<<=1;f=w(a);break;case 1:for(a=0,l=Math.pow(2,16),e=1;e!=l;)c=r.val&r.position,r.position>>=1,r.position==0&&(r.position=o,r.val=s(r.index++)),a|=(c>0?1:0)*e,e<<=1;f=w(a);break;case 2:return""}for(t[3]=f,d=f,A.push(f);;){if(r.index>n)return"";for(a=0,l=Math.pow(2,_),e=1;e!=l;)c=r.val&r.position,r.position>>=1,r.position==0&&(r.position=o,r.val=s(r.index++)),a|=(c>0?1:0)*e,e<<=1;switch(f=a){case 0:for(a=0,l=Math.pow(2,8),e=1;e!=l;)c=r.val&r.position,r.position>>=1,r.position==0&&(r.position=o,r.val=s(r.index++)),a|=(c>0?1:0)*e,e<<=1;t[p++]=w(a),f=p-1,i--;break;case 1:for(a=0,l=Math.pow(2,16),e=1;e!=l;)c=r.val&r.position,r.position>>=1,r.position==0&&(r.position=o,r.val=s(r.index++)),a|=(c>0?1:0)*e,e<<=1;t[p++]=w(a),f=p-1,i--;break;case 2:return A.join("")}if(i==0&&(i=Math.pow(2,_),_++),t[f])y=t[f];else if(f===p)y=d+d.charAt(0);else return null;A.push(y),t[p++]=d+y.charAt(0),i--,d=y,i==0&&(i=Math.pow(2,_),_++)}}};return v}();h!=null?h.exports=m:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return m})})(O);var T=O.exports;const k=S(T);export{k as L,S as a,U as c,b as g};