You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
12 KiB
1 line
12 KiB
|
2 years ago
|
var CLOUD=CLOUD||{};!function(){"use strict";function e(e,t,n){return t<=e&&e<=n}function t(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function n(e){this.tokens=[].slice.call(e)}n.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var r=-1;function o(e,t){if(e)throw TypeError("Decoder error");return t||65533}var i="utf-8";function s(e,n){if(!(this instanceof s))return new s(e,n);if((e=void 0!==e?String(e).toLowerCase():i)!==i)throw new Error("Encoding not supported. Only utf-8 is supported");n=t(n),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(n.fatal),this._ignoreBOM=Boolean(n.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function a(e,n){if(!(this instanceof a))return new a(e,n);if((e=void 0!==e?String(e).toLowerCase():i)!==i)throw new Error("Encoding not supported. Only utf-8 is supported");n=t(n),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(n.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function l(t){var n=t.fatal,i=0,s=0,a=0,l=128,d=191;this.handler=function(t,f){if(-1===f&&0!==a)return a=0,o(n);if(-1===f)return r;if(0===a){if(e(f,0,127))return f;if(e(f,194,223))a=1,i=f-192;else if(e(f,224,239))224===f&&(l=160),237===f&&(d=159),a=2,i=f-224;else{if(!e(f,240,244))return o(n);240===f&&(l=144),244===f&&(d=143),a=3,i=f-240}return i<<=6*a,null}if(!e(f,l,d))return i=a=s=0,l=128,d=191,t.prepend(f),o(n);if(l=128,d=191,i+=f-128<<6*(a-(s+=1)),s!==a)return null;var u=i;return i=a=s=0,u}}function d(t){t.fatal;this.handler=function(t,n){if(-1===n)return r;if(e(n,0,127))return n;var o,i;e(n,128,2047)?(o=1,i=192):e(n,2048,65535)?(o=2,i=224):e(n,65536,1114111)&&(o=3,i=240);for(var s=[(n>>6*o)+i];o>0;){var a=n>>6*(o-1);s.push(128|63&a),o-=1}return s}}function f(){if("undefined"!=typeof self)return self;if("undefined"!=typeof global)return global;throw new Error("No global found")}s.prototype={decode:function(e,o){var i;i="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),o=t(o),this._streaming||(this._decoder=new l({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(o.stream);for(var s,a=new n(i),d=[];!a.endOfStream()&&(s=this._decoder.handler(a,a.read()))!==r;)null!==s&&(Array.isArray(s)?d.push.apply(d,s):d.push(s));if(!this._streaming){do{if((s=this._decoder.handler(a,a.read()))===r)break;null!==s&&(Array.isArray(s)?d.push.apply(d,s):d.push(s))}while(!a.endOfStream());this._decoder=null}return d.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===d[0]?(this._BOMseen=!0,d.shift()):this._BOMseen=!0)),function(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t}(d)}},a.prototype={encode:function(e,o){e=e?String(e):"",o=t(o),this._streaming||(this._encoder=new d(this._options)),this._streaming=Boolean(o.stream);for(var i,s=[],a=new n(function(e){for(var t=String(e),n=t.length,r=0,o=[];r<n;){var i=t.charCodeAt(r);if(i<55296||i>57343)o.push(i);else if(56320<=i&&i<=57343)o.push(65533);else if(55296<=i&&i<=56319)if(r===n-1)o.push(65533);else{var s=e.charCodeAt(r+1);if(56320<=s&&s<=57343){var a=1023&i,l=1023&s;o.push(65536+(a<<10)+l),r+=1}else o.push(65533)}r+=1}return o}(e));!a.endOfStream()&&(i=this._encoder.handler(a,a.read()))!==r;)Array.isArray(i)?s.push.apply(s,i):s.push(i);if(!this._streaming){for(;(i=this._encoder.handler(a,a.read()))!==r;)Array.isArray(i)?s.push.
|