// Copyright (c) 2013 Pieroxy // This work is free. You can redistribute it and/or modify it // under the terms of the WTFPL, Version 2 // For more information see LICENSE.txt or http://www.wtfpl.net/ // // For more information, the home page: // http://pieroxy.net/blog/pages/lz-string/testing.html // // LZ-based compression algorithm, version 1.4.4 var LZString=function(){var o=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-.",e={};function t(o,r){if(!e[o]){e[o]={};for(var n=0;n>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(r){if(null==r)return i.decompress(r);for(var n=Array(r.length/2),e=0,t=n.length;e$.charCodeAt(0)){for(e=0;e>=1}else{for(e=0,t=1;e>=1}0==--_&&(_=Math.pow(2,a),a++),delete u[$]}else for(e=0,t=s[$];e>=1;0==--_&&(_=Math.pow(2,a),a++),s[c]=l++,$=String(p)}if(""!==$){if(Object.prototype.hasOwnProperty.call(u,$)){if(256>$.charCodeAt(0)){for(e=0;e>=1}else{for(e=0,t=1;e>=1}0==--_&&(_=Math.pow(2,a),a++),delete u[$]}else for(e=0,t=s[$];e>=1;0==--_&&(_=Math.pow(2,a),a++)}for(e=0,t=2;e>=1;for(;;){if(h<<=1,d==r-1){f.push(n(h));break}d++}return f.join("")},decompress:function(o){return null==o?"":""==o?null:i._decompress(o.length,32768,function(r){return o.charCodeAt(r)})},_decompress:function(r,n,e){var t,i,s,u,p,c,$,_,l=[],a=4,f=4,h=3,d="",m=[],v={val:e(0),position:n,index:1};for(i=0;i<3;i+=1)l[i]=i;for(u=0,c=4,$=1;$!=c;)p=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=e(v.index++)),u|=(p>0?1:0)*$,$<<=1;switch(t=u){case 0:for(u=0,c=256,$=1;$!=c;)p=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=e(v.index++)),u|=(p>0?1:0)*$,$<<=1;_=o(u);break;case 1:for(u=0,c=65536,$=1;$!=c;)p=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=e(v.index++)),u|=(p>0?1:0)*$,$<<=1;_=o(u);break;case 2:return""}for(l[3]=_,s=_,m.push(_);;){if(v.index>r)return"";for(u=0,c=Math.pow(2,h),$=1;$!=c;)p=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=e(v.index++)),u|=(p>0?1:0)*$,$<<=1;switch(_=u){case 0:for(u=0,c=256,$=1;$!=c;)p=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=e(v.index++)),u|=(p>0?1:0)*$,$<<=1;l[f++]=o(u),_=f-1,a--;break;case 1:for(u=0,c=65536,$=1;$!=c;)p=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=e(v.index++)),u|=(p>0?1:0)*$,$<<=1;l[f++]=o(u),_=f-1,a--;break;case 2:return m.join("")}if(0==a&&(a=Math.pow(2,h),h++),l[_])d=l[_];else{if(_!==f)return null;d=s+s.charAt(0)}m.push(d),l[f++]=s+d.charAt(0),a--,s=d,0==a&&(a=Math.pow(2,h),h++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module?module.exports=LZString:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return LZString});