var LZStringUnsafe=function(){for(var n,r,e,t,u,o=0,l={},f=String.fromCharCode,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+",c=(i+"/=").split(""),s=(i+"-$").split("");o<65;)o>62&&(l[s[o].charCodeAt(0)]=o),l[c[o].charCodeAt(0)]=o++;function a(o,l){for(var f=0;l>>=1;f++)r=o>>f&1|r<<1,++e===t&&(e=0,n.push(u(r)),r=0)}function h(n){return c[n]}function d(n){return s[n]}function g(n){return f(n+32)}function p(o,l,f){if(n=[],null!=o){r=0,e=0,t=l,u=f;var i=0,c=0,s=0,h=[3],d=[2,2,h],g=!0,p=0,m=3,A=4;if(o.length){a(s=(p=o.charCodeAt(0))<256?0:1,A),a(p,s?65536:256),d[1]=p;n:for(i=1;i=A&&(A<<=1),a(s=p<256?0:1,A),a(p,s?65536:256),d.push(p),d.push([m]),g=!0),h.push(p),h.push([++m]),m>=A&&(A<<=1),h=d[c+1]}for(g?g=!1:a(h[0],A),c=1;d[c]!=p&&c=A&&(A<<=1),a(s=p<256?0:1,A),a(p,s?65536:256)),++m>=A&&(A<<=1)}a(2,A),r<<=t-e,n.push(u(r))}return n}function m(n,r,e){for(var t,u=[0,1,2],o=4,l=4,i=3,c="",s=[],a="",h=0,d=2,g=0,p=e(0),m=r,A=1;g!=d;)h+=(p>>--m&1)<>--m&1)<>--m&1)<>--m&1)<u.length)return null;c=h>>8,e[2*t+1]=255&o}return e},decompressFromUint8Array:function(n){return null===n||void 0===n?C(n):0==n.length?null:m(n.length,8,function(r){return n[r]})},compressToEncodedURIComponent:function(n){return null==n?"":p(n,6,d).join("")},decompressFromEncodedURIComponent:function(n){return null==n?"":""==n?null:m((n=n.replace(/ /g,"+")).length,6,function(r){return l[n.charCodeAt(r)]})},compress:function(n){return A(n).join("")},compressToArray:A,decompress:function(n){return null==n?"":""==n?null:m(n.length,16,function(r){return n.charCodeAt(r)})},decompressFromArray:C}}();"function"==typeof define&&define.amd?define(function(){return LZStringUnsafe}):"undefined"!=typeof module&&null!=module?module.exports=LZStringUnsafe:"undefined"!=typeof angular&&null!=angular&&angular.module("LZStringUnsafe",[]).factory("LZStringUnsafe",function(){return LZStringUnsafe});