forked from hprose/hprose-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hprose.js
10 lines (9 loc) · 96 KB
/
hprose.js
1
2
3
4
5
6
7
8
9
10
// Hprose for JavaScript v2.0.31
// Copyright (c) 2008-2016 http://hprose.com
// Hprose is freely distributable under the MIT license.
// For all details and documentation:
// https://github.com/hprose/hprose-js
var hprose={};hprose.global="object"==typeof global?global:"object"==typeof window?window:"object"==typeof self?self:this,function(e){"use strict";if("undefined"==typeof e.setTimeout&&"function"==typeof e.require){var t;try{t=e.require("deviceone")}catch(r){return}t&&(e.setTimeout=function(e,r){r<=0&&(r=1);var n=t.mm("do_Timer");return n.delay=r,n.interval=r,n.on("tick",function(){n.stop(),e()}),n.start(),n},e.clearTimeout=function(e){e.isStart()&&e.stop()})}}(hprose.global),function(e){"use strict";"undefined"==typeof e.btoa&&(e.btoa=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return function(t){var r,n,i,o,a,u,s;for(n=i=0,o=t.length,a=o%3,o-=a,u=o/3<<2,a>0&&(u+=4),r=new Array(u);n<o;)s=t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<8|t.charCodeAt(n++),r[i++]=e[s>>18]+e[s>>12&63]+e[s>>6&63]+e[63&s];return 1===a?(s=t.charCodeAt(n++),r[i++]=e[s>>2]+e[(3&s)<<4]+"=="):2===a&&(s=t.charCodeAt(n++)<<8|t.charCodeAt(n++),r[i++]=e[s>>10]+e[s>>4&63]+e[(15&s)<<2]+"="),r.join("")}}()),"undefined"==typeof e.atob&&(e.atob=function(){var e=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];return function(t){var r,n,i,o,a,u,s,c,f,l;if(s=t.length,s%4!==0)return"";if(/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+\/\=]/.test(t))return"";for(c="="===t.charAt(s-2)?1:"="===t.charAt(s-1)?2:0,f=s,c>0&&(f-=4),f=3*(f>>2)+c,l=new Array(f),a=u=0;a<s&&(r=e[t.charCodeAt(a++)],r!==-1)&&(n=e[t.charCodeAt(a++)],n!==-1)&&(l[u++]=String.fromCharCode(r<<2|(48&n)>>4),i=e[t.charCodeAt(a++)],i!==-1)&&(l[u++]=String.fromCharCode((15&n)<<4|(60&i)>>2),o=e[t.charCodeAt(a++)],o!==-1);)l[u++]=String.fromCharCode((3&i)<<6|o);return l.join("")}}())}(hprose.global),function(e,t){"use strict";var r=function(e){return"get"in e&&"set"in e?function(){return 0===arguments.length?e.get():void e.set(arguments[0])}:"get"in e?e.get:"set"in e?e.set:void 0},n="function"!=typeof Object.defineProperties?function(e,n){var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];i.forEach(function(t){var r=n[t];"value"in r&&(e[t]=r.value)});for(var o in n){var a=n[o];e[o]=t,"value"in a?e[o]=a.value:("get"in a||"set"in a)&&(e[o]=r(a))}}:function(e,t){for(var n in t){var i=t[n];("get"in i||"set"in i)&&(t[n]={value:r(i)})}Object.defineProperties(e,t)},i=function(){},o="function"!=typeof Object.create?function(e,t){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("prototype must be an object or function");i.prototype=e;var r=new i;return i.prototype=null,t&&n(r,t),r}:function(e,t){if(t){for(var n in t){var i=t[n];("get"in i||"set"in i)&&(t[n]={value:r(i)})}return Object.create(e,t)}return Object.create(e)},a=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return function(t){return e.apply(t,Array.prototype.slice.call(arguments,1))}},u=function(e){for(var t=e.length,r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r},s=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t=e.length;if(t<65535)return String.fromCharCode.apply(String,u(e));for(var r=32767&t,n=t>>15,i=new Array(r?n+1:n),o=0;o<n;++o)i[o]=String.fromCharCode.apply(String,u(e.subarray(o<<15,o+1<<15)));return r&&(i[n]=String.fromCharCode.apply(String,u(e.subarray(n<<15,t)))),i.join("")},c=function(e){for(var t=e.length,r=new Uint8Array(t),n=0;n<t;n++)r[n]=255&e.charCodeAt(n);return r},f=function(e){var t=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=e.match(t),n=r[4].split(":",2);return{protocol:r[1],host:r[4],hostname:n[0],port:parseInt(n[1],10)||0,path:r[5],query:r[7],fragment:r[9]}},l=function(e){if(e){var t;for(t in e)return!1}return!0};e.defineProperties=n,e.createObject=o,e.generic=a,e.toBinaryString=s,e.toUint8Array=c,e.toArray=u,e.parseuri=f,e.isObjectEmpty=l}(hprose),function(e,t){"use strict";function r(t,r){for(var n=t.prototype,i=0,o=r.length;i<o;i++){var a=r[i],u=n[a];"function"==typeof u&&"undefined"==typeof t[a]&&(t[a]=e(u))}}if(Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),r=this,n=function(){},i=function(){return r.apply(this instanceof n?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),i.prototype=new n,i}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null===this||this===t)throw new TypeError('"this" is null or not defined');var r=Object(this),n=r.length>>>0;if(0===n)return-1;var i=+Number(arguments[1])||0;if(Math.abs(i)===1/0&&(i=0),i>=n)return-1;for(var o=Math.max(i>=0?i:n-Math.abs(i),0);o<n;){if(o in r&&r[o]===e)return o;o++}return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(e){if(null===this||this===t)throw new TypeError('"this" is null or not defined');var r=Object(this),n=r.length>>>0;if(0===n)return-1;var i=+Number(arguments[1])||0;Math.abs(i)===1/0&&(i=0);for(var o=i>=0?Math.min(i,n-1):n-Math.abs(i);o>=0;o--)if(o in r&&r[o]===e)return o;return-1}),Array.prototype.filter||(Array.prototype.filter=function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");var r=Object(this),n=r.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(var i=[],o=arguments[1],a=0;a<n;a++)if(a in r){var u=r[a];e.call(o,u,a,r)&&i.push(u)}return i}),Array.prototype.forEach||(Array.prototype.forEach=function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");var r=Object(this),n=r.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(var i=arguments[1],o=0;o<n;o++)o in r&&e.call(i,r[o],o,r)}),Array.prototype.every||(Array.prototype.every=function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");var r=Object(this),n=r.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(var i=arguments[1],o=0;o<n;o++)if(o in r&&!e.call(i,r[o],o,r))return!1;return!0}),Array.prototype.map||(Array.prototype.map=function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");var r=Object(this),n=r.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(var i=arguments[1],o=new Array(n),a=0;a<n;a++)a in r&&(o[a]=e.call(i,r[a],a,r));return o}),Array.prototype.some||(Array.prototype.some=function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");var r=Object(this),n=r.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(var i=arguments[1],o=0;o<n;o++)if(o in r&&e.call(i,r[o],o,r))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");var r=Object(this),n=r.length>>>0;if("function"!=typeof e)throw new TypeError("First argument is not callable");if(0===n&&1===arguments.length)throw new TypeError("Array length is 0 and no second argument");var i,o=0;for(arguments.length>=2?i=arguments[1]:(i=r[0],o=1);o<n;++o)o in r&&(i=e.call(t,i,r[o],o,r));return i}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");var r=Object(this),n=r.length>>>0;if("function"!=typeof e)throw new TypeError("First argument is not callable");if(0===n&&1===arguments.length)throw new TypeError("Array length is 0 and no second argument");var i,o=n-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(o in r){i=r[o--];break}if(--o<0)throw new TypeError("Array contains no values")}for(;o>=0;)o in r&&(i=e.call(t,i,r[o],o,r)),o--;return i}),Array.prototype.includes||(Array.prototype.includes=function(e){var t=Object(this),r=parseInt(t.length,10)||0;if(0===r)return!1;var n,i=parseInt(arguments[1],10)||0;i>=0?n=i:(n=r+i,n<0&&(n=0));for(var o;n<r;){if(o=t[n],e===o||e!==e&&o!==o)return!0;n++}return!1}),Array.prototype.find||(Array.prototype.find=function(e){if(null===this||this===t)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r,n=Object(this),i=n.length>>>0,o=arguments[1],a=0;a<i;a++)if(r=n[a],e.call(o,r,a,n))return r;return t}),Array.prototype.findIndex||(Array.prototype.findIndex=function(e){if(null===this||this===t)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r,n=Object(this),i=n.length>>>0,o=arguments[1],a=0;a<i;a++)if(r=n[a],e.call(o,r,a,n))return a;return-1}),Array.prototype.fill||(Array.prototype.fill=function(e){if(null===this||this===t)throw new TypeError("this is null or not defined");for(var r=Object(this),n=r.length>>>0,i=arguments[1],o=i>>0,a=o<0?Math.max(n+o,0):Math.min(o,n),u=arguments[2],s=u===t?n:u>>0,c=s<0?Math.max(n+s,0):Math.min(s,n);a<c;)r[a]=e,a++;return r}),Array.prototype.copyWithin||(Array.prototype.copyWithin=function(e,r){if(null===this||this===t)throw new TypeError("this is null or not defined");var n=Object(this),i=n.length>>>0,o=e>>0,a=o<0?Math.max(i+o,0):Math.min(o,i),u=r>>0,s=u<0?Math.max(i+u,0):Math.min(u,i),c=arguments[2],f=c===t?i:c>>0,l=f<0?Math.max(i+f,0):Math.min(f,i),h=Math.min(l-s,i-a),p=1;for(s<a&&a<s+h&&(p=-1,s+=h-1,a+=h-1);h>0;)s in n?n[a]=n[s]:delete n[a],s+=p,a+=p,h--;return n}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.from||(Array.from=function(){var e=Object.prototype.toString,r=function(t){return"function"==typeof t||"[object Function]"===e.call(t)},n=function(e){var t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t},i=Math.pow(2,53)-1,o=function(e){var t=n(e);return Math.min(Math.max(t,0),i)};return function(e){var n=this,i=Object(e);if(null===e||e===t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var a,u=arguments.length>1?arguments[1]:void t;if("undefined"!=typeof u){if(!r(u))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(a=arguments[2])}for(var s,c=o(i.length),f=r(n)?Object(new n(c)):new Array(c),l=0;l<c;)s=i[l],u?f[l]="undefined"==typeof a?u(s,l):u.call(a,s,l):f[l]=s,l+=1;return f.length=c,f}}()),Array.of||(Array.of=function(){return Array.prototype.slice.call(arguments)}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var r=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>r.length)&&(t=r.length),t-=e.length;var n=r.indexOf(e,t);return n!==-1&&n===t}),String.prototype.includes||(String.prototype.includes=function(){return"number"==typeof arguments[1]?!(this.length<arguments[0].length+arguments[1].length)&&this.substr(arguments[1],arguments[0].length)===arguments[0]:String.prototype.indexOf.apply(this,arguments)!==-1}),String.prototype.repeat||(String.prototype.repeat=function(e){var t=this.toString();if(e=+e,e!==e&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e===1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===t.length||0===e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var r="";1===(1&e)&&(r+=t),e>>>=1,0!==e;)t+=t;return r}),String.prototype.trim||(String.prototype.trim=function(){return this.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.toString().replace(/^[\s\xa0]+/,"")}),String.prototype.trimRight||(String.prototype.trimRight=function(){return this.toString().replace(/[\s\xa0]+$/,"")}),Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=r.length;return function(i){if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Object.keys called on non-object");var o=[];for(var a in i)e.call(i,a)&&o.push(a);if(t)for(var u=0;u<n;u++)e.call(i,r[u])&&o.push(r[u]);return o}}()),Date.now||(Date.now=function(){return+new Date}),!Date.prototype.toISOString){var n=function(e){return e<10?"0"+e:e};Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+n(this.getUTCMonth()+1)+"-"+n(this.getUTCDate())+"T"+n(this.getUTCHours())+":"+n(this.getUTCMinutes())+":"+n(this.getUTCSeconds())+"Z"}}r(Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","indexOf","lastIndexOf","filter","forEach","every","map","some","reduce","reduceRight","includes","find","findIndex","fill","copyWithin"]),r(String,["quote","substring","toLowerCase","toUpperCase","charAt","charCodeAt","indexOf","lastIndexOf","include","startsWith","endsWith","repeat","trim","trimLeft","trimRight","toLocaleLowerCase","toLocaleUpperCase","match","search","replace","split","substr","concat","slice"])}(hprose.generic),function(e){"use strict";var t="WeakMap"in e,r="Map"in e,n=!0;if(r&&(n="forEach"in new e.Map),!(t&&r&&n)){var i="create"in Object,o=function(){return i?Object.create(null):{}},a=o(),u=0,s=function(e){var t=o(),r=e.valueOf,n=function(n,i){return this===e&&i in a&&a[i]===n?(i in t||(t[i]=o()),t[i]):r.apply(this,arguments)};i&&"defineProperty"in Object?Object.defineProperty(e,"valueOf",{value:n,writable:!0,configurable:!0,enumerable:!1}):e.valueOf=n};if(t||(e.WeakMap=function v(){var e=o(),t=u++;a[t]=e;var r=function(r){if(r!==Object(r))throw new Error("value is not a non-null object");var n=r.valueOf(e,t);return n!==r.valueOf()?n:(s(r),r.valueOf(e,t))},n=this;if(i?n=Object.create(v.prototype,{get:{value:function(e){return r(e).value},writable:!1,configurable:!1,enumerable:!1},set:{value:function(e,t){r(e).value=t},writable:!1,configurable:!1,enumerable:!1},has:{value:function(e){return"value"in r(e)},writable:!1,configurable:!1,enumerable:!1},"delete":{value:function(e){return delete r(e).value},writable:!1,configurable:!1,enumerable:!1},clear:{value:function(){delete a[t],t=u++,a[t]=e},writable:!1,configurable:!1,enumerable:!1}}):(n.get=function(e){return r(e).value},n.set=function(e,t){r(e).value=t},n.has=function(e){return"value"in r(e)},n["delete"]=function(e){return delete r(e).value},n.clear=function(){delete a[t],t=u++,a[t]=e}),arguments.length>0&&Array.isArray(arguments[0]))for(var c=arguments[0],f=0,l=c.length;f<l;f++)n.set(c[f][0],c[f][1]);return n}),!r){var c=function(){var e=o(),t=u++,r=o();a[t]=e;var n=function(n){if(null===n)return r;var i=n.valueOf(e,t);return i!==n.valueOf()?i:(s(n),n.valueOf(e,t))};return{get:function(e){return n(e).value},set:function(e,t){n(e).value=t},has:function(e){return"value"in n(e)},"delete":function(e){return delete n(e).value},clear:function(){delete a[t],t=u++,a[t]=e}}},f=function(){var e=o();return{get:function(){return e.value},set:function(t,r){e.value=r},has:function(){return"value"in e},"delete":function(){return delete e.value},clear:function(){e=o()}}},l=function(){var e=o();return{get:function(t){return e[t]},set:function(t,r){e[t]=r},has:function(t){return t in e},"delete":function(t){return delete e[t]},clear:function(){e=o()}}};if(!i)var h=function(){var e={};return{get:function(t){return e["!"+t]},set:function(t,r){e["!"+t]=r},has:function(t){return"!"+t in e},"delete":function(t){return delete e["!"+t]},clear:function(){e={}}}};e.Map=function d(){var e={number:l(),string:i?l():h(),"boolean":l(),object:c(),"function":c(),unknown:c(),undefined:f(),"null":f()},t=0,r=[],n=this;if(i?n=Object.create(d.prototype,{size:{get:function(){return t},configurable:!1,enumerable:!1},get:{value:function(t){return e[typeof t].get(t)},writable:!1,configurable:!1,enumerable:!1},set:{value:function(n,i){this.has(n)||(r.push(n),t++),e[typeof n].set(n,i)},writable:!1,configurable:!1,enumerable:!1},has:{value:function(t){return e[typeof t].has(t)},writable:!1,configurable:!1,enumerable:!1},"delete":{value:function(n){return!!this.has(n)&&(t--,r.splice(r.indexOf(n),1),e[typeof n]["delete"](n))},writable:!1,configurable:!1,enumerable:!1},clear:{value:function(){r.length=0;for(var n in e)e[n].clear();t=0},writable:!1,configurable:!1,enumerable:!1},forEach:{value:function(e,t){for(var n=0,i=r.length;n<i;n++)e.call(t,this.get(r[n]),r[n],this)},writable:!1,configurable:!1,enumerable:!1}}):(n.size=t,n.get=function(t){return e[typeof t].get(t)},n.set=function(n,i){this.has(n)||(r.push(n),this.size=++t),e[typeof n].set(n,i)},n.has=function(t){return e[typeof t].has(t)},n["delete"]=function(n){return!!this.has(n)&&(this.size=--t,r.splice(r.indexOf(n),1),e[typeof n]["delete"](n))},n.clear=function(){r.length=0;for(var n in e)e[n].clear();this.size=t=0},n.forEach=function(e,t){for(var n=0,i=r.length;n<i;n++)e.call(t,this.get(r[n]),r[n],this)}),arguments.length>0&&Array.isArray(arguments[0]))for(var o=arguments[0],a=0,u=o.length;a<u;a++)n.set(o[a][0],o[a][1]);return n}}if(!n){var p=e.Map;e.Map=function g(){var e=new p,t=0,r=[],n=Object.create(g.prototype,{size:{get:function(){return t},configurable:!1,enumerable:!1},get:{value:function(t){return e.get(t)},writable:!1,configurable:!1,enumerable:!1},set:{value:function(n,i){e.has(n)||(r.push(n),t++),e.set(n,i)},writable:!1,configurable:!1,enumerable:!1},has:{value:function(t){return e.has(t)},writable:!1,configurable:!1,enumerable:!1},"delete":{value:function(n){return!!e.has(n)&&(t--,r.splice(r.indexOf(n),1),e["delete"](n))},writable:!1,configurable:!1,enumerable:!1},clear:{value:function(){if("clear"in e)e.clear();else for(var n=0,i=r.length;n<i;n++)e["delete"](r[n]);r.length=0,t=0},writable:!1,configurable:!1,enumerable:!1},forEach:{value:function(e,t){for(var n=0,i=r.length;n<i;n++)e.call(t,this.get(r[n]),r[n],this)},writable:!1,configurable:!1,enumerable:!1}});if(arguments.length>0&&Array.isArray(arguments[0]))for(var i=arguments[0],o=0,a=i.length;o<a;o++)n.set(i[o][0],i[o][1]);return n}}}}(hprose.global),function(e,t){function r(e){Error.call(this),this.message=e,this.name=r.name,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}r.prototype=e.createObject(Error.prototype),r.prototype.constructor=r,t.TimeoutError=r}(hprose,hprose.global),function(e,t){"use strict";function r(e){var r=Array.prototype.slice.call(arguments,1);return function(){e.apply(t,r)}}function n(e){delete f[e]}function i(e){var t=f[e];if(t)try{t()}finally{n(e)}}function o(e){return f[c]=r.apply(t,e),c++}if(!e.setImmediate){var a=e.document,u=e.MutationObserver||e.WebKitMutationObserver||e.MozMutationOvserver,s={},c=1,f={};s.mutationObserver=function(){var e=[],t=a.createTextNode(""),r=new u(function(){for(;e.length>0;)i(e.shift())});return r.observe(t,{characterData:!0}),function(){var r=o(arguments);return e.push(r),t.data=1&r,r}},s.messageChannel=function(){var t=new e.MessageChannel;return t.port1.onmessage=function(e){i(Number(e.data))},function(){var e=o(arguments);return t.port2.postMessage(e),e}},s.nextTick=function(){return function(){var t=o(arguments);return e.process.nextTick(r(i,t)),t}},s.postMessage=function(){var e=a.createElement("iframe");e.style.display="none",a.documentElement.appendChild(e);var t=e.contentWindow;t.document.write('<script>window.onmessage=function(){parent.postMessage(1, "*");};</script>'),t.document.close();var r=[];return window.addEventListener("message",function(){for(;r.length>0;)i(r.shift())}),function(){var e=o(arguments);return r.push(e),t.postMessage(1,"*"),e}},s.readyStateChange=function(){var e=a.documentElement;return function(){var t=o(arguments),r=a.createElement("script");return r.onreadystatechange=function(){i(t),r.onreadystatechange=null,e.removeChild(r),r=null},e.appendChild(r),t}};var l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,s.setTimeout=function(){return function(){var e=o(arguments);return l.setTimeout(r(i,e),0),e}},"undefined"==typeof e.process||"[object process]"!==Object.prototype.toString.call(e.process)||e.process.browser?a&&"onreadystatechange"in a.createElement("script")?l.setImmediate=s.readyStateChange():a&&u?l.setImmediate=s.mutationObserver():e.MessageChannel?l.setImmediate=s.messageChannel():a&&"postMessage"in e&&"addEventListener"in e?l.setImmediate=s.postMessage():l.setImmediate=s.setTimeout():l.setImmediate=s.nextTick(),l.clearImmediate=n}}(hprose.global),function(e,t,r){"use strict";function n(e){var t=this;$(this,{_subscribers:{value:[]},resolve:{value:this.resolve.bind(this)},reject:{value:this.reject.bind(this)}}),"function"==typeof e&&K(function(){try{t.resolve(e())}catch(r){t.reject(r)}})}function i(e){return e instanceof n}function o(e){return i(e)?e:c(e)}function a(e){return"function"==typeof e.then}function u(e,t){var r="function"==typeof t?t:function(){return t},i=new n;return Z(function(){try{i.resolve(r())}catch(e){i.reject(e)}},e),i}function s(e){var t=new n;return t.reject(e),t}function c(e){var t=new n;return t.resolve(e),t}function f(e){try{var t=e();return c(t)}catch(r){return s(r)}}function l(e){var t=new n;return e(t.resolve,t.reject),t}function h(e){var t=0;return re.call(e,function(){++t}),t}function p(e){return o(e).then(function(e){var t=e.length,r=h(e),i=new Array(t);if(0===r)return i;var a=new n;return re.call(e,function(e,t){o(e).then(function(e){i[t]=e,0===--r&&a.resolve(i)},a.reject)}),a})}function v(){return p(arguments)}function d(e){return o(e).then(function(e){var t=new n;return re.call(e,function(e){o(e).fill(t)}),t})}function g(e){return o(e).then(function(e){var t=e.length,r=h(e);if(0===r)throw new RangeError("any(): array must not be empty");var i=new Array(t),a=new n;return re.call(e,function(e,t){o(e).then(a.resolve,function(e){i[t]=e,0===--r&&a.reject(i)})}),a})}function w(e){return o(e).then(function(e){var t=e.length,r=h(e),i=new Array(t);if(0===r)return i;var a=new n;return re.call(e,function(e,t){var n=o(e);n.complete(function(){i[t]=n.inspect(),0===--r&&a.resolve(i)})}),a})}function y(e){var t=function(){return this}(),r=ne.call(arguments,1);return p(r).then(function(r){return e.apply(t,r)})}function m(e,t){var r=ne.call(arguments,2);return p(r).then(function(r){return e.apply(t,r)})}function b(e){return!!e&&("function"==typeof e.next&&"function"==typeof e["throw"])}function T(e){if(!e)return!1;var t=e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName||b(t.prototype))}function C(e){return function(t,n){return t instanceof Error?e.reject(t):arguments.length<2?e.resolve(t):(n=null===t||t===r?ne.call(arguments,1):ne.call(arguments,0),void(1==n.length?e.resolve(n[0]):e.resolve(n)))}}function E(e){if(T(e)||b(e))return O(e);var t=function(){return this}(),r=new n;return e.call(t,C(r)),r}function A(e){return function(){var t=ne.call(arguments,0),r=this,i=new n;t.push(function(){r=this,i.resolve(arguments)});try{e.apply(this,t)}catch(o){i.resolve([o])}return function(e){i.then(function(t){e.apply(r,t)})}}}function k(e){return function(){var t=ne.call(arguments,0),r=new n;t.push(C(r));try{e.apply(this,t)}catch(i){r.reject(i)}return r}}function S(e){return T(e)||b(e)?O(e):o(e)}function O(e){function t(t){try{i(e.next(t))}catch(r){s.reject(r)}}function r(t){try{i(e["throw"](t))}catch(r){s.reject(r)}}function i(e){e.done?s.resolve(e.value):("function"==typeof e.value?E(e.value):S(e.value)).then(t,r)}var a=function(){return this}();if("function"==typeof e){var u=ne.call(arguments,1);e=e.apply(a,u)}if(!e||"function"!=typeof e.next)return o(e);var s=new n;return t(),s}function j(e,t){return function(){return t=t||this,p(arguments).then(function(r){var n=e.apply(t,r);return T(n)||b(n)?O.call(t,n):n})}}function I(e,t,r){return r=r||function(){return this}(),p(e).then(function(e){return e.forEach(t,r)})}function _(e,t,r){return r=r||function(){return this}(),p(e).then(function(e){return e.every(t,r)})}function x(e,t,r){return r=r||function(){return this}(),p(e).then(function(e){return e.some(t,r)})}function M(e,t,r){return r=r||function(){return this}(),p(e).then(function(e){return e.filter(t,r)})}function R(e,t,r){return r=r||function(){return this}(),p(e).then(function(e){return e.map(t,r)})}function U(e,t,r){return arguments.length>2?p(e).then(function(e){return o(r).then(function(r){return e.reduce(t,r)})}):p(e).then(function(e){return e.reduce(t)})}function L(e,t,r){return arguments.length>2?p(e).then(function(e){return o(r).then(function(r){return e.reduceRight(t,r)})}):p(e).then(function(e){return e.reduceRight(t)})}function F(e,t,r){return p(e).then(function(e){return o(t).then(function(t){return e.indexOf(t,r)})})}function P(e,t,n){return p(e).then(function(e){return o(t).then(function(t){return n===r&&(n=e.length-1),e.lastIndexOf(t,n)})})}function N(e,t,r){return p(e).then(function(e){return o(t).then(function(t){return e.includes(t,r)})})}function H(e,t,r){return r=r||function(){return this}(),p(e).then(function(e){return e.find(t,r)})}function D(e,t,r){return r=r||function(){return this}(),p(e).then(function(e){return e.findIndex(t,r)})}function W(e,t,r){K(function(){try{var n=e(r);t.resolve(n)}catch(i){t.reject(i)}})}function B(e,t,r){e?W(e,t,r):t.resolve(r)}function q(e,t,r){e?W(e,t,r):t.reject(r)}function z(){var e=new n;$(this,{future:{value:e},complete:{value:e.resolve},completeError:{value:e.reject},isCompleted:{get:function(){return e._state!==G}}})}function X(e){n.call(this),e(this.resolve,this.reject)}var G=0,Q=1,Y=2,$=e.defineProperties,J=e.createObject,V="Promise"in t,K=t.setImmediate,Z=t.setTimeout,ee=t.clearTimeout,te=t.TimeoutError,re=Array.prototype.forEach,ne=Array.prototype.slice;O.wrap=j,$(n,{delayed:{value:u},error:{value:s},sync:{value:f},value:{value:c},all:{value:p},race:{value:d},resolve:{value:c},reject:{value:s},promise:{value:l},isFuture:{value:i},toFuture:{value:o},isPromise:{value:a},toPromise:{value:S},join:{value:v},any:{value:g},settle:{value:w},attempt:{value:y},run:{value:m},thunkify:{value:A},promisify:{value:k},co:{value:O},wrap:{value:j},forEach:{value:I},every:{value:_},some:{value:x},filter:{value:M},map:{value:R},reduce:{value:U},reduceRight:{value:L},indexOf:{value:F},lastIndexOf:{value:P},includes:{value:N},find:{value:H},findIndex:{value:D}}),$(n.prototype,{_value:{writable:!0},_reason:{writable:!0},_state:{value:G,writable:!0},resolve:{value:function(e){if(e===this)return void this.reject(new TypeError("Self resolution"));if(i(e))return void e.fill(this);if(null!==e&&"object"==typeof e||"function"==typeof e){var t;try{t=e.then}catch(r){return void this.reject(r)}if("function"==typeof t){var n=!0;try{var o=this;return void t.call(e,function(e){n&&(n=!1,o.resolve(e))},function(e){n&&(n=!1,o.reject(e))})}catch(r){n&&(n=!1,this.reject(r))}return}}if(this._state===G){this._state=Q,this._value=e;for(var a=this._subscribers;a.length>0;){var u=a.shift();B(u.onfulfill,u.next,e)}}}},reject:{value:function(e){if(this._state===G){this._state=Y,this._reason=e;for(var t=this._subscribers;t.length>0;){var r=t.shift();q(r.onreject,r.next,e)}}}},then:{value:function(e,t){"function"!=typeof e&&(e=null),"function"!=typeof t&&(t=null);var r=new n;return this._state===Q?B(e,r,this._value):this._state===Y?q(t,r,this._reason):this._subscribers.push({onfulfill:e,onreject:t,next:r}),r}},done:{value:function(e,t){this.then(e,t).then(null,function(e){K(function(){throw e})})}},inspect:{value:function(){switch(this._state){case G:return{state:"pending"};case Q:return{state:"fulfilled",value:this._value};case Y:return{state:"rejected",reason:this._reason}}}},catchError:{value:function(e,t){if("function"==typeof t){var r=this;return this["catch"](function(n){if(t(n))return r["catch"](e);throw n})}return this["catch"](e)}},"catch":{value:function(e){return this.then(null,e)}},fail:{value:function(e){this.done(null,e)}},whenComplete:{value:function(e){return this.then(function(t){return e(),t},function(t){throw e(),t})}},complete:{value:function(e){return e=e||function(e){return e},this.then(e,e)}},always:{value:function(e){this.done(e,e)}},fill:{value:function(e){this.then(e.resolve,e.reject)}},timeout:{value:function(e,t){var r=new n,i=Z(function(){r.reject(t||new te("timeout"))},e);return this.whenComplete(function(){ee(i)}).fill(r),r}},delay:{value:function(e){var t=new n;return this.then(function(r){Z(function(){t.resolve(r)},e)},t.reject),t}},tap:{value:function(e,t){return this.then(function(r){return e.call(t,r),r})}},spread:{value:function(e,t){return this.then(function(r){return e.apply(t,r)})}},get:{value:function(e){return this.then(function(t){return t[e]})}},set:{value:function(e,t){return this.then(function(r){return r[e]=t,r})}},apply:{value:function(e,t){return t=t||[],this.then(function(r){return p(t).then(function(t){return r[e].apply(r,t)})})}},call:{value:function(e){var t=ne.call(arguments,1);return this.then(function(r){return p(t).then(function(t){return r[e].apply(r,t)})})}},bind:{value:function(e){var t=ne.call(arguments);{if(!Array.isArray(e)){t.shift();var r=this;return $(this,{method:{value:function(){var n=ne.call(arguments);return r.then(function(r){return p(t.concat(n)).then(function(t){return r[e].apply(r,t)})})}}}),this}for(var n=0,i=e.length;n<i;++n)t[0]=e[n],this.bind.apply(this,t)}}},forEach:{value:function(e,t){return I(this,e,t)}},every:{value:function(e,t){return _(this,e,t)}},some:{value:function(e,t){return x(this,e,t)}},filter:{value:function(e,t){return M(this,e,t)}},map:{value:function(e,t){return R(this,e,t)}},reduce:{value:function(e,t){return arguments.length>1?U(this,e,t):U(this,e)}},reduceRight:{value:function(e,t){return arguments.length>1?L(this,e,t):L(this,e)}},indexOf:{value:function(e,t){return F(this,e,t)}},lastIndexOf:{value:function(e,t){return P(this,e,t)}},includes:{value:function(e,t){return N(this,e,t)}},find:{value:function(e,t){return H(this,e,t)}},findIndex:{value:function(e,t){return D(this,e,t)}}}),e.Future=n,e.thunkify=A,e.promisify=k,e.co=O,e.co.wrap=e.wrap=j,e.Completer=z,e.resolved=c,e.rejected=s,e.deferred=function(){var e=new n;return J(null,{promise:{value:e},resolve:{value:e.resolve},reject:{value:e.reject}})},V||(X.prototype=J(n.prototype),X.prototype.constructor=n,$(X,{all:{value:p},race:{value:d},resolve:{value:c},reject:{value:s}}),t.Promise=X)}(hprose,hprose.global),function(e){"use strict";function t(e,t){if(t&&!/^[\x00-\xff]*$/.test(e))throw new Error("argument is not a binary string.");r(this,{length:{value:e.length},toString:{value:function(){return e}},valueOf:{value:function(){return e},writable:!0,configurable:!0,enumerable:!1}})}var r=e.defineProperties,n=e.createObject,i={};["quote","substring","toLowerCase","toUpperCase","charAt","charCodeAt","indexOf","lastIndexOf","include","startsWith","endsWith","repeat","trim","trimLeft","trimRight","toLocaleLowerCase","toLocaleUpperCase","match","search","replace","split","substr","concat","slice"].forEach(function(e){i[e]={value:String.prototype[e]}}),t.prototype=n(null,i),t.prototype.constructor=t,e.BinaryString=t,e.binary=function(e){return new t(e,(!0))}}(hprose),function(e,t){"use strict";function r(e){return String.fromCharCode(e>>>24&255,e>>>16&255,e>>>8&255,255&e)}function n(e){return String.fromCharCode(255&e,e>>>8&255,e>>>16&255,e>>>24&255)}function i(e){for(var t=[],r=e.length,n=0,i=0;n<r;++n,++i){var o=e.charCodeAt(n);if(o<128)t[i]=e.charAt(n);else if(o<2048)t[i]=String.fromCharCode(192|o>>6,128|63&o);else{if(!(o<55296||o>57343)){if(n+1<r){
var a=e.charCodeAt(n+1);if(o<56320&&56320<=a&&a<=57343){var u=((1023&o)<<10|1023&a)+65536;t[i]=String.fromCharCode(240|u>>18&63,128|u>>12&63,128|u>>6&63,128|63&u),++n;continue}}throw new Error("Malformed string")}t[i]=String.fromCharCode(224|o>>12,128|o>>6&63,128|63&o)}}return t.join("")}function o(e,t){for(var r=new Array(t),n=0,i=0,o=e.length;n<t&&i<o;n++){var a=e.charCodeAt(i++);switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[n]=a;break;case 12:case 13:if(i<o){r[n]=(31&a)<<6|63&e.charCodeAt(i++);break}throw new Error("Unfinished UTF-8 octet sequence");case 14:if(i+1<o){r[n]=(15&a)<<12|(63&e.charCodeAt(i++))<<6|63&e.charCodeAt(i++);break}throw new Error("Unfinished UTF-8 octet sequence");case 15:if(i+2<o){var u=((7&a)<<18|(63&e.charCodeAt(i++))<<12|(63&e.charCodeAt(i++))<<6|63&e.charCodeAt(i++))-65536;if(0<=u&&u<=1048575){r[n++]=u>>10&1023|55296,r[n]=1023&u|56320;break}throw new Error("Character outside valid Unicode range: 0x"+u.toString(16))}throw new Error("Unfinished UTF-8 octet sequence");default:throw new Error("Bad UTF-8 encoding 0x"+a.toString(16))}}return n<t&&(r.length=n),[String.fromCharCode.apply(String,r),i]}function a(e,t){for(var r=[],n=new Array(32768),i=0,o=0,a=e.length;i<t&&o<a;i++){var u=e.charCodeAt(o++);switch(u>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[i]=u;break;case 12:case 13:if(o<a){n[i]=(31&u)<<6|63&e.charCodeAt(o++);break}throw new Error("Unfinished UTF-8 octet sequence");case 14:if(o+1<a){n[i]=(15&u)<<12|(63&e.charCodeAt(o++))<<6|63&e.charCodeAt(o++);break}throw new Error("Unfinished UTF-8 octet sequence");case 15:if(o+2<a){var s=((7&u)<<18|(63&e.charCodeAt(o++))<<12|(63&e.charCodeAt(o++))<<6|63&e.charCodeAt(o++))-65536;if(0<=s&&s<=1048575){n[i++]=s>>10&1023|55296,n[i]=1023&s|56320;break}throw new Error("Character outside valid Unicode range: 0x"+s.toString(16))}throw new Error("Unfinished UTF-8 octet sequence");default:throw new Error("Bad UTF-8 encoding 0x"+u.toString(16))}if(i>=32766){var c=i+1;n.length=c,r[r.length]=String.fromCharCode.apply(String,n),t-=c,i=-1}}return i>0&&(n.length=i,r[r.length]=String.fromCharCode.apply(String,n)),[r.join(""),o]}function u(e,r){return(r===t||null===r||r<0)&&(r=e.length),0===r?["",0]:r<65535?o(e,r):a(e,r)}function s(e,r){if((r===t||null===r||r<0)&&(r=e.length),0===r)return"";for(var n=0,i=0,o=e.length;n<r&&i<o;n++){var a=e.charCodeAt(i++);switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:break;case 12:case 13:if(i<o){++i;break}throw new Error("Unfinished UTF-8 octet sequence");case 14:if(i+1<o){i+=2;break}throw new Error("Unfinished UTF-8 octet sequence");case 15:if(i+2<o){var u=((7&a)<<18|(63&e.charCodeAt(i++))<<12|(63&e.charCodeAt(i++))<<6|63&e.charCodeAt(i++))-65536;if(0<=u&&u<=1048575)break;throw new Error("Character outside valid Unicode range: 0x"+u.toString(16))}throw new Error("Unfinished UTF-8 octet sequence");default:throw new Error("Bad UTF-8 encoding 0x"+a.toString(16))}}return e.substr(0,i)}function c(e){return u(e)[0]}function f(e){for(var t=e.length,r=0,n=0;n<t;++n){var i=e.charCodeAt(n);if(i<128)++r;else if(i<2048)r+=2;else{if(!(i<55296||i>57343)){if(n+1<t){var o=e.charCodeAt(n+1);if(i<56320&&56320<=o&&o<=57343){++n,r+=4;continue}}throw new Error("Malformed string")}r+=3}}return r}function l(e){for(var t=e.length,r=0,n=0;n<t;++n,++r){var i=e.charCodeAt(n);switch(i>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:break;case 12:case 13:if(n<t){++n;break}throw new Error("Unfinished UTF-8 octet sequence");case 14:if(n+1<t){n+=2;break}throw new Error("Unfinished UTF-8 octet sequence");case 15:if(n+2<t){var o=((7&i)<<18|(63&e.charCodeAt(n++))<<12|(63&e.charCodeAt(n++))<<6|63&e.charCodeAt(n++))-65536;if(0<=o&&o<=1048575){++r;break}throw new Error("Character outside valid Unicode range: 0x"+o.toString(16))}throw new Error("Unfinished UTF-8 octet sequence");default:throw new Error("Bad UTF-8 encoding 0x"+i.toString(16))}}return r}function h(e){for(var t=0,r=e.length;t<r;++t){var n=e.charCodeAt(t);switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:break;case 12:case 13:if(t<r){++t;break}return!1;case 14:if(t+1<r){t+=2;break}return!1;case 15:if(t+2<r){var i=((7&n)<<18|(63&e.charCodeAt(t++))<<12|(63&e.charCodeAt(t++))<<6|63&e.charCodeAt(t++))-65536;if(0<=i&&i<=1048575)break}return!1;default:return!1}}return!0}function p(){var e=arguments;switch(e.length){case 1:this._buffer=[e[0].toString()];break;case 2:this._buffer=[e[0].toString().substr(e[1])];break;case 3:this._buffer=[e[0].toString().substr(e[1],e[2])];break;default:this._buffer=[""]}this.mark()}var v=e.defineProperties;v(p.prototype,{_buffer:{writable:!0},_off:{value:0,writable:!0},_wmark:{writable:!0},_rmark:{writable:!0},toString:{value:function(){return this._buffer.length>1&&(this._buffer=[this._buffer.join("")]),this._buffer[0]}},length:{get:function(){return this.toString().length}},position:{get:function(){return this._off}},mark:{value:function(){this._wmark=this.length(),this._rmark=this._off}},reset:{value:function(){this._buffer=[this.toString().substr(0,this._wmark)],this._off=this._rmark}},clear:{value:function(){this._buffer=[""],this._wmark=0,this._off=0,this._rmark=0}},writeByte:{value:function(e){this._buffer.push(String.fromCharCode(255&e))}},writeInt32BE:{value:function(e){if(e===(0|e)&&e<=2147483647)return void this._buffer.push(r(e));throw new TypeError("value is out of bounds")}},writeUInt32BE:{value:function(e){if((2147483647&e)+2147483648===e&&e>=0)return void this._buffer.push(r(0|e));throw new TypeError("value is out of bounds")}},writeInt32LE:{value:function(e){if(e===(0|e)&&e<=2147483647)return void this._buffer.push(n(e));throw new TypeError("value is out of bounds")}},writeUInt32LE:{value:function(e){if((2147483647&e)+2147483648===e&&e>=0)return void this._buffer.push(n(0|e));throw new TypeError("value is out of bounds")}},writeUTF16AsUTF8:{value:function(e){this._buffer.push(i(e))}},writeUTF8AsUTF16:{value:function(e){this._buffer.push(c(e))}},write:{value:function(e){this._buffer.push(e)}},readByte:{value:function(){return this._off<this.length()?this._buffer[0].charCodeAt(this._off++):-1}},readChar:{value:function(){return this._off<this.length()?this._buffer[0].charAt(this._off++):""}},readInt32BE:{value:function(){var e=this.length(),t=this._buffer[0],r=this._off;if(r+3<e){var n=t.charCodeAt(r++)<<24|t.charCodeAt(r++)<<16|t.charCodeAt(r++)<<8|t.charCodeAt(r++);return this._off=r,n}throw new Error("EOF")}},readUInt32BE:{value:function(){var e=this.readInt32BE();return e<0?(2147483647&e)+2147483648:e}},readInt32LE:{value:function(){var e=this.length(),t=this._buffer[0],r=this._off;if(r+3<e){var n=t.charCodeAt(r++)|t.charCodeAt(r++)<<8|t.charCodeAt(r++)<<16|t.charCodeAt(r++)<<24;return this._off=r,n}throw new Error("EOF")}},readUInt32LE:{value:function(){var e=this.readInt32LE();return e<0?(2147483647&e)+2147483648:e}},read:{value:function(e){var t=this._off,r=this.length();return t+e>r&&(e=r-t),0===e?"":(this._off=t+e,this._buffer[0].substring(t,this._off))}},skip:{value:function(e){var t=this.length();return this._off+e>t?(e=t-this._off,this._off=t):this._off+=e,e}},readString:{value:function(e){var t=this.length(),r=this._off,n=this._buffer[0],i=n.indexOf(e,r);return i===-1?(n=n.substr(r),this._off=t):(n=n.substring(r,i+1),this._off=i+1),n}},readUntil:{value:function(e){var t=this.length(),r=this._off,n=this._buffer[0],i=n.indexOf(e,r);return i===this._off?(n="",this._off++):i===-1?(n=n.substr(r),this._off=t):(n=n.substring(r,i),this._off=i+1),n}},readUTF8:{value:function(e){var t=this.length(),r=s(this._buffer[0].substring(this._off,Math.min(this._off+3*e,t)),e);return this._off+=r.length,r}},readUTF8AsUTF16:{value:function(e){var t=this.length(),r=u(this._buffer[0].substring(this._off,Math.min(this._off+3*e,t)),e);return this._off+=r[1],r[0]}},readUTF16AsUTF8:{value:function(e){return i(this.read(e))}},take:{value:function(){var e=this.toString();return this.clear(),e}},clone:{value:function(){return new p(this.toString())}},trunc:{value:function(){var e=this.toString().substring(this._off,this._length);this._buffer[0]=e,this._off=0,this._wmark=0,this._rmark=0}}}),v(p,{utf8Encode:{value:i},utf8Decode:{value:c},utf8Length:{value:f},utf16Length:{value:l},isUTF8:{value:h}}),e.StringIO=p}(hprose),function(e,t){"use strict";t.HproseTags=e.Tags={TagInteger:"i",TagLong:"l",TagDouble:"d",TagNull:"n",TagEmpty:"e",TagTrue:"t",TagFalse:"f",TagNaN:"N",TagInfinity:"I",TagDate:"D",TagTime:"T",TagUTC:"Z",TagBytes:"b",TagUTF8Char:"u",TagString:"s",TagGuid:"g",TagList:"a",TagMap:"m",TagClass:"c",TagObject:"o",TagRef:"r",TagPos:"+",TagNeg:"-",TagSemicolon:";",TagOpenbrace:"{",TagClosebrace:"}",TagQuote:'"',TagPoint:".",TagFunctions:"F",TagCall:"C",TagResult:"R",TagArgument:"A",TagError:"E",TagEnd:"z"}}(hprose,hprose.global),function(e,t){"use strict";function r(e,t){s.set(e,t),u[t]=e}function n(e){return s.get(e)}function i(e){return u[e]}var o=t.WeakMap,a=e.createObject,u=a(null),s=new o;t.HproseClassManager=e.ClassManager=a(null,{register:{value:r},getClassAlias:{value:n},getClass:{value:i}}),e.register=r,r(Object,"Object")}(hprose,hprose.global),function(e,t,r){"use strict";function n(e){var t=e.constructor;if(!t)return"Object";var r=S.getClassAlias(t);if(r)return r;if(t.name)r=t.name;else{var n=t.toString();if(r=n.substr(0,n.indexOf("(")).replace(/(^\s*function\s*)|(\s*$)/gi,""),""===r||"Object"===r)return"function"==typeof e.getClassName?e.getClassName():"Object"}return"Object"!==r&&S.register(t,r),r}function i(e){O(this,{_stream:{value:e},_ref:{value:new C,writable:!0}})}function o(e){return new i(e)}function a(e,t,r){this.binary=!!r,O(this,{stream:{value:e},_classref:{value:j(null),writable:!0},_fieldsref:{value:[],writable:!0},_refer:{value:t?_:o(e)}})}function u(e,t){var i=e.stream;if(t===r||null===t||t.constructor===Function)return void i.write(k.TagNull);if(""===t)return void i.write(k.TagEmpty);switch(t.constructor){case Number:s(e,t);break;case Boolean:l(e,t);break;case String:1===t.length?(i.write(k.TagUTF8Char),i.write(e.binary?I(t):t)):e.writeStringWithRef(t);break;case A:if(!e.binary)throw new Error("The binary string does not support serialization in text mode.");e.writeBinaryWithRef(t);break;case Date:e.writeDateWithRef(t);break;case C:e.writeMapWithRef(t);break;default:if(Array.isArray(t))e.writeListWithRef(t);else{var o=n(t);"Object"===o?e.writeMapWithRef(t):e.writeObjectWithRef(t)}}}function s(e,t){var r=e.stream;t=t.valueOf(),t===(0|t)?0<=t&&t<=9?r.write(t):(r.write(k.TagInteger),r.write(t),r.write(k.TagSemicolon)):f(e,t)}function c(e,t){var r=e.stream;0<=t&&t<=9?r.write(t):(t<-2147483648||t>2147483647?r.write(k.TagLong):r.write(k.TagInteger),r.write(t),r.write(k.TagSemicolon))}function f(e,t){var r=e.stream;t!==t?r.write(k.TagNaN):t!==1/0&&t!==-(1/0)?(r.write(k.TagDouble),r.write(t),r.write(k.TagSemicolon)):(r.write(k.TagInfinity),r.write(t>0?k.TagPos:k.TagNeg))}function l(e,t){e.stream.write(t.valueOf()?k.TagTrue:k.TagFalse)}function h(e,t){e._refer.set(t);var r=e.stream;r.write(k.TagDate),r.write(("0000"+t.getUTCFullYear()).slice(-4)),r.write(("00"+(t.getUTCMonth()+1)).slice(-2)),r.write(("00"+t.getUTCDate()).slice(-2)),r.write(k.TagTime),r.write(("00"+t.getUTCHours()).slice(-2)),r.write(("00"+t.getUTCMinutes()).slice(-2)),r.write(("00"+t.getUTCSeconds()).slice(-2));var n=t.getUTCMilliseconds();0!==n&&(r.write(k.TagPoint),r.write(("000"+n).slice(-3))),r.write(k.TagUTC)}function p(e,t){e._refer.set(t);var r=e.stream,n=("0000"+t.getFullYear()).slice(-4),i=("00"+(t.getMonth()+1)).slice(-2),o=("00"+t.getDate()).slice(-2),a=("00"+t.getHours()).slice(-2),u=("00"+t.getMinutes()).slice(-2),s=("00"+t.getSeconds()).slice(-2),c=("000"+t.getMilliseconds()).slice(-3);"00"===a&&"00"===u&&"00"===s&&"000"===c?(r.write(k.TagDate),r.write(n),r.write(i),r.write(o)):"1970"===n&&"01"===i&&"01"===o?(r.write(k.TagTime),r.write(a),r.write(u),r.write(s),"000"!==c&&(r.write(k.TagPoint),r.write(c))):(r.write(k.TagDate),r.write(n),r.write(i),r.write(o),r.write(k.TagTime),r.write(a),r.write(u),r.write(s),"000"!==c&&(r.write(k.TagPoint),r.write(c))),r.write(k.TagSemicolon)}function v(e,t){e._refer.set(t);var r=e.stream,n=("00"+t.getHours()).slice(-2),i=("00"+t.getMinutes()).slice(-2),o=("00"+t.getSeconds()).slice(-2),a=("000"+t.getMilliseconds()).slice(-3);r.write(k.TagTime),r.write(n),r.write(i),r.write(o),"000"!==a&&(r.write(k.TagPoint),r.write(a)),r.write(k.TagSemicolon)}function d(e,t){e._refer.set(t);var r=e.stream;r.write(k.TagBytes);var n=t.length;n>0?(r.write(n),r.write(k.TagQuote),r.write(t)):r.write(k.TagQuote),r.write(k.TagQuote)}function g(e,t){e._refer.set(t);var r=e.stream,n=t.length;r.write(k.TagString),n>0?(r.write(n),r.write(k.TagQuote),r.write(e.binary?I(t):t)):r.write(k.TagQuote),r.write(k.TagQuote)}function w(e,t){e._refer.set(t);var r=e.stream,n=t.length;if(r.write(k.TagList),n>0){r.write(n),r.write(k.TagOpenbrace);for(var i=0;i<n;i++)u(e,t[i])}else r.write(k.TagOpenbrace);r.write(k.TagClosebrace)}function y(e,t){e._refer.set(t);var r=e.stream,n=[];for(var i in t)t.hasOwnProperty(i)&&"function"!=typeof t[i]&&(n[n.length]=i);var o=n.length;if(r.write(k.TagMap),o>0){r.write(o),r.write(k.TagOpenbrace);for(var a=0;a<o;a++)u(e,n[a]),u(e,t[n[a]])}else r.write(k.TagOpenbrace);r.write(k.TagClosebrace)}function m(e,t){e._refer.set(t);var r=e.stream,n=t.size;r.write(k.TagMap),n>0?(r.write(n),r.write(k.TagOpenbrace),t.forEach(function(t,r){u(e,r),u(e,t)})):r.write(k.TagOpenbrace),r.write(k.TagClosebrace)}function b(e,t){var r,i,o=e.stream,a=n(t);if(a in e._classref)i=e._classref[a],r=e._fieldsref[i];else{r=[];for(var s in t)t.hasOwnProperty(s)&&"function"!=typeof t[s]&&(r[r.length]=s.toString());i=T(e,a,r)}o.write(k.TagObject),o.write(i),o.write(k.TagOpenbrace),e._refer.set(t);for(var c=r.length,f=0;f<c;f++)u(e,t[r[f]]);o.write(k.TagClosebrace)}function T(e,t,r){var n=e.stream,i=r.length;if(n.write(k.TagClass),n.write(t.length),n.write(k.TagQuote),n.write(e.binary?I(t):t),n.write(k.TagQuote),i>0){n.write(i),n.write(k.TagOpenbrace);for(var o=0;o<i;o++)g(e,r[o])}else n.write(k.TagOpenbrace);n.write(k.TagClosebrace);var a=e._fieldsref.length;return e._classref[t]=a,e._fieldsref[a]=r,a}var C=t.Map,E=e.StringIO,A=e.BinaryString,k=e.Tags,S=e.ClassManager,O=e.defineProperties,j=e.createObject,I=E.utf8Encode,_=j(null,{set:{value:function(){}},write:{value:function(){return!1}},reset:{value:function(){}}});O(i.prototype,{_refcount:{value:0,writable:!0},set:{value:function(e){this._ref.set(e,this._refcount++)}},write:{value:function(e){var t=this._ref.get(e);return t!==r&&(this._stream.write(k.TagRef),this._stream.write(t),this._stream.write(k.TagSemicolon),!0)}},reset:{value:function(){this._ref=new C,this._refcount=0}}}),O(a.prototype,{binary:{value:!1,writable:!0},serialize:{value:function(e){u(this,e)}},writeInteger:{value:function(e){c(this,e)}},writeDouble:{value:function(e){f(this,e)}},writeBoolean:{value:function(e){l(this,e)}},writeUTCDate:{value:function(e){h(this,e)}},writeUTCDateWithRef:{value:function(e){this._refer.write(e)||h(this,e)}},writeDate:{value:function(e){p(this,e)}},writeDateWithRef:{value:function(e){this._refer.write(e)||p(this,e)}},writeTime:{value:function(e){v(this,e)}},writeTimeWithRef:{value:function(e){this._refer.write(e)||v(this,e)}},writeBinary:{value:function(e){d(this,e)}},writeBinaryWithRef:{value:function(e){this._refer.write(e)||d(this,e)}},writeString:{value:function(e){g(this,e)}},writeStringWithRef:{value:function(e){this._refer.write(e)||g(this,e)}},writeList:{value:function(e){w(this,e)}},writeListWithRef:{value:function(e){this._refer.write(e)||w(this,e)}},writeMap:{value:function(e){e instanceof C?m(this,e):y(this,e)}},writeMapWithRef:{value:function(e){this._refer.write(e)||this.writeMap(e)}},writeObject:{value:function(e){b(this,e)}},writeObjectWithRef:{value:function(e){this._refer.write(e)||b(this,e)}},reset:{value:function(){this._classref=j(null),this._fieldsref.length=0,this._refer.reset()}}}),t.HproseWriter=e.Writer=a}(hprose,hprose.global),function(e,t,r){"use strict";function n(e,t){if(e&&t)throw new Error('Tag "'+t+'" expected, but "'+e+'" found in stream');if(e)throw new Error('Unexpected serialize tag "'+e+'" in stream');throw new Error("No byte found in stream")}function i(e,t){var r=new ee;return o(e,r,t),r.take()}function o(e,t,r){a(e,t,e.readChar(),r)}function a(e,t,r,i){switch(t.write(r),r){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case re.TagNull:case re.TagEmpty:case re.TagTrue:case re.TagFalse:case re.TagNaN:break;case re.TagInfinity:t.write(e.read());break;case re.TagInteger:case re.TagLong:case re.TagDouble:case re.TagRef:u(e,t);break;case re.TagDate:case re.TagTime:s(e,t);break;case re.TagUTF8Char:c(e,t,i);break;case re.TagBytes:f(e,t,i);break;case re.TagString:l(e,t,i);break;case re.TagGuid:h(e,t);break;case re.TagList:case re.TagMap:case re.TagObject:p(e,t,i);break;case re.TagClass:p(e,t,i),o(e,t,i);break;case re.TagError:o(e,t,i);break;default:n(r)}}function u(e,t){var r;do r=e.read(),t.write(r);while(r!==re.TagSemicolon)}function s(e,t){var r;do r=e.read(),t.write(r);while(r!==re.TagSemicolon&&r!==re.TagUTC)}function c(e,t,r){r?t.write(e.readUTF8(1)):t.write(e.readChar())}function f(e,t,r){if(!r)throw new Error("The binary string does not support to unserialize in text mode.");var n=e.readUntil(re.TagQuote);t.write(n),t.write(re.TagQuote);var i=0;n.length>0&&(i=parseInt(n,10)),t.write(e.read(i+1))}function l(e,t,r){var n=e.readUntil(re.TagQuote);t.write(n),t.write(re.TagQuote);var i=0;n.length>0&&(i=parseInt(n,10)),r?t.write(e.readUTF8(i+1)):t.write(e.read(i+1))}function h(e,t){t.write(e.read(38))}function p(e,t,r){var n;do n=e.readChar(),t.write(n);while(n!==re.TagOpenbrace);for(;(n=e.readChar())!==re.TagClosebrace;)a(e,t,n,r);t.write(n)}function v(e,t){ie(this,{stream:{value:e},binary:{value:!!t,writable:!0},readRaw:{value:function(){return i(e,this.binary)}}})}function d(){ie(this,{ref:{value:[]}})}function g(){return new d}function w(e){var n,i=t,o=e.split(".");for(n=0;n<o.length;n++)if(i=i[o[n]],i===r)return null;return i}function y(e,t,r,n){if(r<t.length){var i=t[r];e[i]=n;var o=y(e,t,r+1,".");return r+1<t.length&&null===o&&(o=y(e,t,r+1,"_")),o}var a=e.join("");try{var u=w(a);return"function"==typeof u?u:null}catch(s){return null}}function m(e){var t=ne.getClass(e);if(t)return t;if(t=w(e),"function"==typeof t)return ne.register(t,e),t;for(var r=[],n=e.indexOf("_");n>=0;)r[r.length]=n,n=e.indexOf("_",n+1);if(r.length>0){var i=e.split("");if(t=y(i,r,0,"."),null===t&&(t=y(i,r,0,"_")),"function"==typeof t)return ne.register(t,e),t}return t=function(){},ie(t.prototype,{getClassName:{value:function(){return e}}}),ne.register(t,e),t}function b(e,t){var r=e.readUntil(t);return 0===r.length?0:parseInt(r,10)}function T(e){var t=e.stream,r=t.readChar();switch(r){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case re.TagInteger:return C(t);case re.TagLong:return A(t);case re.TagDouble:return S(t);case re.TagNull:return null;case re.TagEmpty:return"";case re.TagTrue:return!0;case re.TagFalse:return!1;case re.TagNaN:return NaN;case re.TagInfinity:return j(t);case re.TagDate:return _(e);case re.TagTime:return M(e);case re.TagBytes:return U(e);case re.TagUTF8Char:return F(e);case re.TagString:return N(e);case re.TagGuid:return D(e);case re.TagList:return B(e);case re.TagMap:return e.useHarmonyMap?G(e):z(e);case re.TagClass:return J(e),$(e);case re.TagObject:return Y(e);case re.TagRef:return V(e);case re.TagError:throw new Error(H(e));default:n(r)}}function C(e){return b(e,re.TagSemicolon)}function E(e){var t=e.readChar();switch(t){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case re.TagInteger:return C(e);default:n(t)}}function A(e){var t=e.readUntil(re.TagSemicolon),r=parseInt(t,10);return r.toString()===t?r:t}function k(e){var t=e.readChar();switch(t){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case re.TagInteger:case re.TagLong:return A(e);default:n(t)}}function S(e){return parseFloat(e.readUntil(re.TagSemicolon))}function O(e){var t=e.readChar();switch(t){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case re.TagInteger:case re.TagLong:case re.TagDouble:return S(e);case re.TagNaN:return NaN;case re.TagInfinity:return j(e);default:n(t)}}function j(e){return e.readChar()===re.TagNeg?-(1/0):1/0}function I(e){var t=e.readChar();switch(t){case re.TagTrue:return!0;case re.TagFalse:return!1;default:n(t)}}function _(e){var t,r=e.stream,n=parseInt(r.read(4),10),i=parseInt(r.read(2),10)-1,o=parseInt(r.read(2),10),a=r.readChar();if(a===re.TagTime){var u=parseInt(r.read(2),10),s=parseInt(r.read(2),10),c=parseInt(r.read(2),10),f=0;a=r.readChar(),a===re.TagPoint&&(f=parseInt(r.read(3),10),a=r.readChar(),a>="0"&&a<="9"&&(r.skip(2),a=r.readChar(),a>="0"&&a<="9"&&(r.skip(2),a=r.readChar()))),t=a===re.TagUTC?new Date(Date.UTC(n,i,o,u,s,c,f)):new Date(n,i,o,u,s,c,f)}else t=a===re.TagUTC?new Date(Date.UTC(n,i,o)):new Date(n,i,o);return e.refer.set(t),t}function x(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagDate:return _(e);case re.TagRef:return V(e);default:n(t)}}function M(e){var t,r=e.stream,n=parseInt(r.read(2),10),i=parseInt(r.read(2),10),o=parseInt(r.read(2),10),a=0,u=r.readChar();return u===re.TagPoint&&(a=parseInt(r.read(3),10),u=r.readChar(),u>="0"&&u<="9"&&(r.skip(2),u=r.readChar(),u>="0"&&u<="9"&&(r.skip(2),u=r.readChar()))),t=u===re.TagUTC?new Date(Date.UTC(1970,0,1,n,i,o,a)):new Date(1970,0,1,n,i,o,a),e.refer.set(t),t}function R(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagTime:return M(e);case re.TagRef:return V(e);default:n(t)}}function U(e){if(!e.binary)throw new Error("The binary string does not support to unserialize in text mode.");var t=e.stream,r=b(t,re.TagQuote),n=new te(t.read(r));return t.skip(1),e.refer.set(n),n}function L(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagEmpty:return new te("");case re.TagBytes:return U(e);case re.TagRef:return V(e);default:n(t)}}function F(e){return e.binary?e.stream.readUTF8AsUTF16(1):e.stream.read(1)}function P(e){var t,r=e.stream,n=b(r,re.TagQuote);return t=e.binary?r.readUTF8AsUTF16(n):r.read(n),r.skip(1),t}function N(e){var t=P(e);return e.refer.set(t),t}function H(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagEmpty:return"";case re.TagUTF8Char:return F(e);case re.TagString:return N(e);case re.TagRef:return V(e);default:n(t)}}function D(e){var t=e.stream;t.skip(1);var r=t.read(36);return t.skip(1),e.refer.set(r),r}function W(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagGuid:return D(e);case re.TagRef:return V(e);default:n(t)}}function B(e){var t=e.stream,r=[];e.refer.set(r);for(var n=b(t,re.TagOpenbrace),i=0;i<n;i++)r[i]=T(e);return t.skip(1),r}function q(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagList:return B(e);case re.TagRef:return V(e);default:n(t)}}function z(e){var t=e.stream,r={};e.refer.set(r);for(var n=b(t,re.TagOpenbrace),i=0;i<n;i++){var o=T(e),a=T(e);r[o]=a}return t.skip(1),r}function X(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagMap:return z(e);case re.TagRef:return V(e);default:n(t)}}function G(e){var t=e.stream,r=new Z;e.refer.set(r);for(var n=b(t,re.TagOpenbrace),i=0;i<n;i++){var o=T(e),a=T(e);r.set(o,a)}return t.skip(1),r}function Q(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagMap:return G(e);case re.TagRef:return V(e);default:n(t)}}function Y(e){var t=e.stream,r=e.classref[b(t,re.TagOpenbrace)],n=new r.classname;e.refer.set(n);for(var i=0;i<r.count;i++)n[r.fields[i]]=T(e);return t.skip(1),n}function $(e){var t=e.stream.readChar();switch(t){case re.TagNull:return null;case re.TagClass:return J(e),$(e);case re.TagObject:return Y(e);case re.TagRef:return V(e);default:n(t)}}function J(e){for(var t=e.stream,r=P(e),n=b(t,re.TagOpenbrace),i=[],o=0;o<n;o++)i[o]=H(e);t.skip(1),r=m(r),e.classref.push({classname:r,count:n,fields:i})}function V(e){return e.refer.read(b(e.stream,re.TagSemicolon))}function K(e,t,r,n){v.call(this,e,n),this.useHarmonyMap=!!r,ie(this,{classref:{value:[]},refer:{value:t?ae:g()}})}var Z=t.Map,ee=e.StringIO,te=e.BinaryString,re=e.Tags,ne=e.ClassManager,ie=e.defineProperties,oe=e.createObject;e.RawReader=v;var ae=oe(null,{set:{value:function(){}},read:{value:function(){n(re.TagRef)}},reset:{value:function(){}}});ie(d.prototype,{set:{value:function(e){this.ref.push(e)}},read:{value:function(e){return this.ref[e]}},reset:{value:function(){this.ref.length=0}}}),K.prototype=oe(v.prototype),K.prototype.constructor=K,ie(K.prototype,{useHarmonyMap:{value:!1,writable:!0},checkTag:{value:function(e,t){t===r&&(t=this.stream.readChar()),t!==e&&n(t,e)}},checkTags:{value:function(e,t){return t===r&&(t=this.stream.readChar()),e.indexOf(t)>=0?t:void n(t,e)}},unserialize:{value:function(){return T(this)}},readInteger:{value:function(){return E(this.stream)}},readLong:{value:function(){return k(this.stream)}},readDouble:{value:function(){return O(this.stream)}},readBoolean:{value:function(){return I(this.stream)}},readDateWithoutTag:{value:function(){return _(this)}},readDate:{value:function(){return x(this)}},readTimeWithoutTag:{value:function(){return M(this)}},readTime:{value:function(){return R(this)}},readBinaryWithoutTag:{value:function(){return U(this)}},readBinary:{value:function(){return L(this)}},readStringWithoutTag:{value:function(){return N(this)}},readString:{value:function(){return H(this)}},readGuidWithoutTag:{value:function(){return D(this)}},readGuid:{value:function(){return W(this)}},readListWithoutTag:{value:function(){return B(this)}},readList:{value:function(){return q(this)}},readMapWithoutTag:{value:function(){return this.useHarmonyMap?G(this):z(this)}},readMap:{value:function(){return this.useHarmonyMap?Q(this):X(this)}},readObjectWithoutTag:{value:function(){return Y(this)}},readObject:{value:function(){return $(this)}},reset:{value:function(){this.classref.length=0,this.refer.reset()}}}),t.HproseReader=e.Reader=K}(hprose,hprose.global),function(e){"use strict";function t(e,t,r){var o=new n,a=new i(o,t,r);return a.serialize(e),o.take()}function r(e,t,r,i){return e instanceof n||(e=new n(e)),new o(e,t,r,i).unserialize()}var n=e.StringIO,i=e.Writer,o=e.Reader,a=e.createObject;e.Formatter=a(null,{serialize:{value:t},unserialize:{value:r}}),e.serialize=t,e.unserialize=r}(hprose),function(e,t){"use strict";t.HproseResultMode=e.ResultMode={Normal:0,Serialized:1,Raw:2,RawWithEndTag:3},e.Normal=e.ResultMode.Normal,e.Serialized=e.ResultMode.Serialized,e.Raw=e.ResultMode.Raw,e.RawWithEndTag=e.ResultMode.RawWithEndTag}(hprose,hprose.global),function(e,t,r){"use strict";function n(){}function i(e,t,i){function o(e,t){for(var r=0,n=Je.length;r<n;r++)e=Je[r].outputFilter(e,t);return e}function a(e,t){for(var r=Je.length-1;r>=0;r--)e=Je[r].inputFilter(e,t);return e}function g(e,t){return e=o(e,t),at(e,t).then(function(e){if(!t.oneway)return a(e,t)})}function A(e,t){return lt.sendAndReceive(e,t).catchError(function(r){var n=O(e,t);if(null!==n)return n;throw r})}function k(e,t,r,n){ot(e,t).then(r,n)}function S(){var e=Pe.length;if(e>1){var t=Ne+1;t>=e&&(t=0,Ge++),Ne=t,Fe=Pe[Ne]}else Ge++;typeof lt.onfailswitch===C&<.onfailswitch(lt)}function O(e,t){if(t.failswitch&&S(),t.idempotent&&t.retried<t.retry){var r=500*++t.retried;return t.failswitch&&(r-=500*(Pe.length-1)),r>5e3&&(r=5e3),r>0?p.delayed(r,function(){return A(e,t)}):A(e,t)}return null}function j(e){var t={retry:qe,retried:0,idempotent:!0,failswitch:!0,timeout:Be,client:lt,userdata:{}},r=function(t){var r=null;try{var n=new f(t),i=new h(n,(!0)),o=n.readChar();switch(o){case s.TagError:r=new Error(i.readString());break;case s.TagFunctions:var a=i.readList();i.checkTag(s.TagEnd),x(e,a);break;default:r=new Error("Wrong Response:\r\n"+t)}}catch(u){r=u}null!==r?Ze.reject(r):Ze.resolve(e)};k(y,t,r,Ze.reject)}function I(e,t){return function(){return Ve?P(e,t,Array.slice(arguments),!0):p.all(arguments).then(function(r){return P(e,t,r,!1)})}}function _(e,t,n,i,o){if(t[i]===r&&(t[i]={},typeof o!==b&&o.constructor!==Object||(o=[o]),Array.isArray(o)))for(var a=0;a<o.length;a++){var u=o[a];if(typeof u===b)t[i][u]=I(e,n+i+"_"+u);else for(var s in u)_(e,t[i],n+i+"_",s,u[s])}}function x(e,t){for(var n=0;n<t.length;n++){var i=t[n];if(typeof i===b)e[i]===r&&(e[i]=I(e,i));else for(var o in i)_(e,e,"",o,i[o])}}function M(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;++n)t[n]=e[n]}function R(e){return e?{mode:c.Normal,binary:He,byref:De,simple:We,onsuccess:r,onerror:r,useHarmonyMap:$e,client:lt,userdata:{}}:{mode:c.Normal,binary:He,byref:De,simple:We,timeout:Be,retry:qe,retried:0,idempotent:ze,failswitch:Xe,oneway:!1,sync:!1,onsuccess:r,onerror:r,useHarmonyMap:$e,client:lt,userdata:{}}}function U(e,t,r,n){var i=R(n);if(t in e){var o=e[t];for(var a in o)a in i&&(i[a]=o[a])}for(var u=0,s=r.length;u<s&&typeof r[u]!==C;++u);if(u===s)return i;var c=r.splice(u,s-u);for(i.onsuccess=c[0],s=c.length,u=1;u<s;++u){var f=c[u];switch(typeof f){case C:i.onerror=f;break;case m:i.byref=f;break;case T:i.mode=f;break;case E:for(var l in f)l in i&&(i[l]=f[l])}}return i}function L(e,t,r){var n=new f;n.write(s.TagCall);var i=new l(n,r.simple,r.binary);return i.writeString(e),(t.length>0||r.byref)&&(i.reset(),i.writeList(t),r.byref&&i.writeBoolean(!0)),n}function F(e,t,r,n){return Qe?p.promise(function(i,o){Ye.push({batch:n,name:e,args:t,context:r,resolve:i,reject:o})}):n?B(e,t,r):W(e,t,r)}function P(e,t,r,n){return F(t,r,U(e,t,r,n),n)}function N(e,t,r,n){try{r.onerror?r.onerror(e,t):lt.onerror&<.onerror(e,t),n(t)}catch(i){n(i)}}function H(e,t,r){var n=L(e,t,r);return n.write(s.TagEnd),p.promise(function(e,i){k(n.toString(),r,function(n){if(r.oneway)return void e();var o=null,a=null;try{if(r.mode===c.RawWithEndTag)o=n;else if(r.mode===c.Raw)o=n.substring(0,n.length-1);else{var u=new f(n),l=new h(u,(!1),r.useHarmonyMap,r.binary),p=u.readChar();if(p===s.TagResult){if(o=r.mode===c.Serialized?l.readRaw():l.unserialize(),p=u.readChar(),p===s.TagArgument){l.reset();var v=l.readList();M(v,t),p=u.readChar()}}else p===s.TagError&&(a=new Error(l.readString()),p=u.readChar());p!==s.TagEnd&&(a=new Error("Wrong Response:\r\n"+n))}}catch(d){a=d}a?i(a):e(o)},i)})}function D(e){return function(){e&&(Qe=!1,u(function(e){e.forEach(function(e){"settings"in e?G(e.settings).then(e.resolve,e.reject):F(e.name,e.args,e.context,e.batch).then(e.resolve,e.reject)})},Ye),Ye=[])}}function W(e,t,r){r.sync&&(Qe=!0);var n=p.promise(function(n,i){nt(e,t,r).then(function(o){try{if(r.onsuccess)try{r.onsuccess(o,t)}catch(a){r.onerror&&r.onerror(e,a),i(a)}n(o)}catch(a){i(a)}},function(t){N(e,t,r,i)})});return n.whenComplete(D(r.sync)),n}function B(e,t,r){return p.promise(function(n,i){Ke.push({args:t,name:e,context:r,resolve:n,reject:i})})}function q(e){var t={timeout:Be,binary:He,retry:qe,retried:0,idempotent:ze,failswitch:Xe,oneway:!1,sync:!1,client:lt,userdata:{}};for(var r in e)r in t&&(t[r]=e[r]);return t}function z(e,t){var r=e.reduce(function(e,r){return r.context.binary=t.binary,e.write(L(r.name,r.args,r.context)),e},new f);return r.write(s.TagEnd),p.promise(function(n,i){k(r.toString(),t,function(r){if(t.oneway)return void n(e);var o=-1,a=new f(r),u=new h(a,(!1),(!1),t.binary),l=a.readChar();try{for(;l!==s.TagEnd;){var p=null,v=null,d=e[++o].context.mode;if(d>=c.Raw&&(p=new f),l===s.TagResult){if(d===c.Serialized?p=u.readRaw():d>=c.Raw?(p.write(s.TagResult),
p.write(u.readRaw())):(u.useHarmonyMap=e[o].context.useHarmonyMap,u.reset(),p=u.unserialize()),l=a.readChar(),l===s.TagArgument){if(d>=c.Raw)p.write(s.TagArgument),p.write(u.readRaw());else{u.reset();var g=u.readList();M(g,e[o].args)}l=a.readChar()}}else l===s.TagError&&(d>=c.Raw?(p.write(s.TagError),p.write(u.readRaw())):(u.reset(),v=new Error(u.readString())),l=a.readChar());if([s.TagEnd,s.TagResult,s.TagError].indexOf(l)<0)return void i(new Error("Wrong Response:\r\n"+r));d>=c.Raw?(d===c.RawWithEndTag&&p.write(s.TagEnd),e[o].result=p.toString()):e[o].result=p,e[o].error=v}}catch(w){return void i(w)}n(e)},i)})}function X(){Ve=!0}function G(e){if(e=e||{},Ve=!1,Qe)return p.promise(function(t,r){Ye.push({batch:!0,settings:e,resolve:t,reject:r})});var t=Ke.length;if(0===t)return p.value([]);var r=q(e);r.sync&&(Qe=!0);var n=Ke;Ke=[];var i=p.promise(function(e,t){it(n,r).then(function(t){t.forEach(function(e){if(e.error)N(e.name,e.error,e.context,e.reject);else try{if(e.context.onsuccess)try{e.context.onsuccess(e.result,e.args)}catch(t){e.context.onerror&&e.context.onerror(e.name,t),e.reject(t)}e.resolve(e.result)}catch(t){e.reject(t)}delete e.context,delete e.resolve,delete e.reject}),e(t)},function(e){n.forEach(function(t){"reject"in t&&N(t.name,e,t.context,t.reject)}),t(e)})});return i.whenComplete(D(r.sync)),i}function Q(){return Fe}function Y(){return Pe}function $(e){if(typeof e===b)Pe=[e];else{if(!Array.isArray(e))return;Pe=e.slice(0),Pe.sort(function(){return Math.random()-.5})}Ne=0,Fe=Pe[Ne]}function J(){return He}function V(e){He=!!e}function K(){return Xe}function Z(e){Xe=!!e}function ee(){return Ge}function te(){return Be}function re(e){Be="number"==typeof e?0|e:0}function ne(){return qe}function ie(e){qe="number"==typeof e?0|e:0}function oe(){return ze}function ae(e){ze=!!e}function ue(e){rt=!!e}function se(){return rt}function ce(){return De}function fe(e){De=!!e}function le(){return We}function he(e){We=!!e}function pe(){return $e}function ve(e){$e=!!e}function de(){return 0===Je.length?null:1===Je.length?Je[0]:Je.slice()}function ge(e){Je.length=0,Array.isArray(e)?e.forEach(function(e){we(e)}):we(e)}function we(e){e&&"function"==typeof e.inputFilter&&"function"==typeof e.outputFilter&&Je.push(e)}function ye(e){var t=Je.indexOf(e);return t!==-1&&(Je.splice(t,1),!0)}function me(){return Je}function be(e,t,n){n===r&&(typeof t===m&&(n=t,t=!1),t||(typeof e===m?(n=e,e=!1):(e&&e.constructor===Object||Array.isArray(e))&&(t=e,e=!1)));var i=lt;return n&&(i={}),e||Fe?(e&&(Fe=e),(typeof t===b||t&&t.constructor===Object)&&(t=[t]),Array.isArray(t)?(x(i,t),Ze.resolve(i),i):(u(j,i),Ze)):new Error("You should set server uri first!")}function Te(e,t,r){var i=arguments.length;if(i<1||typeof e!==b)throw new Error("name must be a string");if(1===i&&(t=[]),2===i&&!Array.isArray(t)){var o=[];typeof t!==C&&o.push(n),o.push(t),t=o}if(i>2){typeof r!==C&&t.push(n);for(var a=2;a<i;a++)t.push(arguments[a])}return P(lt,e,t,Ve)}function Ce(e,t){return Ze.then(e,t)}function Ee(e,t){if(et[e]){var r=et[e];if(r[t])return r[t]}return null}function Ae(e,t,n,i,o){if(typeof e!==b)throw new TypeError("topic name must be a string.");if(t===r||null===t){if(typeof n!==C)throw new TypeError("callback must be a function.");t=n}if(et[e]||(et[e]=d(null)),typeof t===C)return i=n,n=t,void _e().then(function(t){Ae(e,t,n,i,o)});if(typeof n!==C)throw new TypeError("callback must be a function.");if(p.isPromise(t))return void t.then(function(t){Ae(e,t,n,i,o)});i===r&&(i=Be);var a=Ee(e,t);if(null===a){var u=function(){P(lt,e,[t,a.handler,u,{idempotent:!0,failswitch:o,timeout:i}],!1)};a={handler:function(r){var n=Ee(e,t);if(n){if(null!==r)for(var i=n.callbacks,o=0,a=i.length;o<a;++o)try{i[o](r)}catch(s){}null!==Ee(e,t)&&u()}},callbacks:[n]},et[e][t]=a,u()}else a.callbacks.indexOf(n)<0&&a.callbacks.push(n)}function ke(e,t,r){if(e)if(typeof r===C){var n=e[t];if(n){var i=n.callbacks,o=i.indexOf(r);o>=0&&(i[o]=i[i.length-1],i.length--),0===i.length&&delete e[t]}}else delete e[t]}function Se(e,t,n){if(typeof e!==b)throw new TypeError("topic name must be a string.");if(t===r||null===t){if(typeof n!==C)return void delete et[e];t=n}if(typeof t===C&&(n=t,t=null),null===t)if(null===tt){if(et[e]){var i=et[e];for(t in i)ke(i,t,n)}}else tt.then(function(t){Se(e,t,n)});else p.isPromise(t)?t.then(function(t){Se(e,t,n)}):ke(et[e],t,n);w(et[e])&&delete et[e]}function Oe(e){return!!et[e]}function je(){var e=[];for(var t in et)e.push(t);return e}function Ie(){return tt}function _e(){return null===tt&&(tt=P(lt,"#",[],!1)),tt}function xe(e){ut.push(e),nt=ut.reduceRight(function(e,t){return function(r,n,i){return p.toPromise(t(r,n,i,e))}},H)}function Me(e){st.push(e),it=st.reduceRight(function(e,t){return function(r,n){return p.toPromise(t(r,n,e))}},z)}function Re(e){ct.push(e),ot=ct.reduceRight(function(e,t){return function(r,n){return p.toPromise(t(r,n,e))}},g)}function Ue(e){ft.push(e),at=ft.reduceRight(function(e,t){return function(r,n){return p.toPromise(t(r,n,e))}},A)}function Le(e){return xe(e),lt}var Fe,Pe=[],Ne=-1,He=!1,De=!1,We=!1,Be=3e4,qe=10,ze=!1,Xe=!1,Ge=0,Qe=!1,Ye=[],$e=!1,Je=[],Ve=!1,Ke=[],Ze=new p,et=d(null),tt=null,rt=!0,nt=H,it=z,ot=g,at=A,ut=[],st=[],ct=[],ft=[],lt=this;_e.sync=!0,_e.idempotent=!0,_e.failswitch=!0;var ht=d(null,{begin:{value:X},end:{value:G},use:{value:function(e){return Me(e),ht}}}),pt=d(null,{use:{value:function(e){return Re(e),pt}}}),vt=d(null,{use:{value:function(e){return Ue(e),vt}}});v(this,{"#":{value:_e},onerror:{value:null,writable:!0},onfailswitch:{value:null,writable:!0},uri:{get:Q},uriList:{get:Y,set:$},id:{get:Ie},binary:{get:J,set:V},failswitch:{get:K,set:Z},failround:{get:ee},timeout:{get:te,set:re},retry:{get:ne,set:ie},idempotent:{get:oe,set:ae},keepAlive:{get:se,set:ue},byref:{get:ce,set:fe},simple:{get:le,set:he},useHarmonyMap:{get:pe,set:ve},filter:{get:de,set:ge},addFilter:{value:we},removeFilter:{value:ye},filters:{get:me},useService:{value:be},invoke:{value:Te},ready:{value:Ce},subscribe:{value:Ae},unsubscribe:{value:Se},isSubscribed:{value:Oe},subscribedList:{value:je},use:{value:Le},batch:{value:ht},beforeFilter:{value:pt},afterFilter:{value:vt}}),i&&typeof i===E&&["failswitch","timeout","retry","idempotent","keepAlive","byref","simple","useHarmonyMap","filter","binary"].forEach(function(e){e in i&<[e](i[e])}),e&&($(e),be(t))}function o(e){var t=g(e),r=t.protocol;if("http:"!==r&&"https:"!==r&&"tcp:"!==r&&"tcp4:"!==r&&"tcp6:"!==r&&"tcps:"!==r&&"tcp4s:"!==r&&"tcp6s:"!==r&&"tls:"!==r&&"ws:"!==r&&"wss:"!==r)throw new Error("The "+r+" client isn't implemented.")}function a(t,r,n){try{return e.HttpClient.create(t,r,n)}catch(i){}try{return e.TcpClient.create(t,r,n)}catch(i){}try{return e.WebSocketClient.create(t,r,n)}catch(i){}if("string"==typeof t)o(t);else if(Array.isArray(t))throw t.forEach(function(e){o(e)}),new Error("Not support multiple protocol.");throw new Error("You should set server uri first!")}var u=t.setImmediate,s=e.Tags,c=e.ResultMode,f=e.StringIO,l=e.Writer,h=e.Reader,p=e.Future,v=e.defineProperties,d=e.createObject,g=e.parseuri,w=e.isObjectEmpty,y=s.TagEnd,m="boolean",b="string",T="number",C="function",E="object";v(i,{create:{value:a}}),t.HproseClient=e.Client=i}(hprose,hprose.global),function(e){"use strict";function t(){if(!navigator)return 0;var t="Shockwave Flash",r="application/x-shockwave-flash",n="ShockwaveFlash.ShockwaveFlash",i=navigator.plugins,o=navigator.mimeTypes,a=0,u=!1;if(i&&i[t])a=i[t].description,!a||o&&o[r]&&!o[r].enabledPlugin||(a=a.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),a=parseInt(a.replace(/^(.*)\..*$/,"$1"),10));else if(e.ActiveXObject)try{u=!0;var s=new e.ActiveXObject(n);s&&(a=s.GetVariable("$version"),a&&(a=a.split(" ")[1].split(","),a=parseInt(a[0],10)))}catch(c){}return a<10?0:u?1:2}function r(){var e=t();if(p=e>0){var r=o.createElement("div");r.style.width=0,r.style.height=0,1===e?r.innerHTML=["<object ",'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ','type="application/x-shockwave-flash" ','width="0" height="0" id="',h,'" name="',h,'">','<param name="movie" value="',u,"FlashHttpRequest.swf?",+new Date,'" />','<param name="allowScriptAccess" value="always" />','<param name="quality" value="high" />','<param name="wmode" value="opaque" />',"</object>"].join(""):r.innerHTML='<embed id="'+h+'" src="'+u+"FlashHttpRequest.swf?"+ +new Date+'" type="application/x-shockwave-flash" width="0" height="0" name="'+h+'" allowScriptAccess="always" />',o.documentElement.appendChild(r)}}function n(){if(!y)for(s||l||r(),y=!0;g.length>0;){var e=g.shift();"function"==typeof e&&e()}}function i(e,t,r,n,i,o){r=encodeURIComponent(r),m?v.post(e,t,r,n,i,o):w.push(function(){v.post(e,t,r,n,i,o)})}if("undefined"==typeof e.document)return void(e.FlashHttpRequest={flashSupport:function(){return!1}});var o=e.document,a=o.getElementsByTagName("script"),u=a.length>0&&a[a.length-1].getAttribute("flashpath")||e.hproseFlashPath||"";a=null;var s=void 0!==e.location&&"file:"===e.location.protocol,c=e.XMLHttpRequest,f="undefined"!=typeof c,l=!s&&f&&"withCredentials"in new c,h="flashhttprequest_as3",p=!1,v=null,d=[],g=[],w=[],y=!1,m=!1,b={};b.flashSupport=function(){return p},b.post=function(e,t,r,n,o,a){var u=-1;n&&(u=d.length,d[u]=n),y?i(e,t,r,u,o,a):g.push(function(){i(e,t,r,u,o,a)})},b.__callback=function(e,t,r){t=null!==t?decodeURIComponent(t):null,r=null!==r?decodeURIComponent(r):null,"function"==typeof d[e]&&d[e](t,r),delete d[e]},b.__jsReady=function(){return y},b.__setSwfReady=function(){for(v=navigator.appName.indexOf("Microsoft")!==-1?e[h]:o[h],m=!0,e.__flash__removeCallback=function(e,t){try{e&&(e[t]=null)}catch(r){}};w.length>0;){var t=w.shift();"function"==typeof t&&t()}},e.FlashHttpRequest=b,n()}(hprose.global),function(e){"use strict";function t(e,t){function r(e){var t,r,n;for(t=e.replace(/(^\s*)|(\s*$)/g,"").split(";"),r={},e=t[0].replace(/(^\s*)|(\s*$)/g,"").split("=",2),void 0===e[1]&&(e[1]=null),r.name=e[0],r.value=e[1],n=1;n<t.length;n++)e=t[n].replace(/(^\s*)|(\s*$)/g,"").split("=",2),void 0===e[1]&&(e[1]=null),r[e[0].toUpperCase()]=e[1];r.PATH?('"'===r.PATH.charAt(0)&&(r.PATH=r.PATH.substr(1)),'"'===r.PATH.charAt(r.PATH.length-1)&&(r.PATH=r.PATH.substr(0,r.PATH.length-1))):r.PATH="/",r.EXPIRES&&(r.EXPIRES=Date.parse(r.EXPIRES)),r.DOMAIN?r.DOMAIN=r.DOMAIN.toLowerCase():r.DOMAIN=s,r.SECURE=void 0!==r.SECURE,void 0===i[r.DOMAIN]&&(i[r.DOMAIN]={}),i[r.DOMAIN][r.name]=r}var o,a,u=n(t),s=u.host;for(o in e)a=e[o],o=o.toLowerCase(),"set-cookie"!==o&&"set-cookie2"!==o||("string"==typeof a&&(a=[a]),a.forEach(r))}function r(e){var t=n(e),r=t.host,o=t.path,a="https:"===t.protocol,u=[];for(var s in i)if(r.indexOf(s)>-1){var c=[];for(var f in i[s]){var l=i[s][f];l.EXPIRES&&(new Date).getTime()>l.EXPIRES?c.push(f):0===o.indexOf(l.PATH)&&(a&&l.SECURE||!l.SECURE)&&null!==l.value&&u.push(l.name+"="+l.value)}for(var h in c)delete i[s][c[h]]}return u.length>0?u.join("; "):""}var n=e.parseuri,i={};e.cookieManager={setCookie:t,getCookie:r}}(hprose),function(e,t,r){"use strict";function n(){if(null!==O)return new S(O);for(var e=["MSXML2.XMLHTTP","MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MsXML2.XMLHTTP.2.6","Microsoft.XMLHTTP","Microsoft.XMLHTTP.1.0","Microsoft.XMLHTTP.1"],t=e.length,r=0;r<t;r++)try{var n=new S(e[r]);return O=e[r],n}catch(i){}throw new Error("Could not find an installed XML parser")}function i(){if(A)return new b;if(S)return n();throw new Error("XMLHttpRequest is not supported by this browser.")}function o(){}function a(e){var t=h(null);if(e){e=e.split("\r\n");for(var r=0,n=e.length;r<n;r++)if(""!==e[r]){var i=e[r].split(": ",2),o=i[0].trim(),a=i[1].trim();o in t?Array.isArray(t[o])?t[o].push(a):t[o]=[t[o],a]:t[o]=a}}return t}function u(e,n,s){function c(e){var t,r,n=h(null);for(t in I)n[t]=I[t];if(e)for(t in e)r=e[t],Array.isArray(r)?n[t]=r.join(", "):n[t]=r;return n}function d(e,t){var r=new l,n=i();n.open("POST",_.uri(),!0),k&&(n.withCredentials="true");var u=c(t.httpHeader);for(var s in u)n.setRequestHeader(s,u[s]);return t.binary||n.setRequestHeader("Content-Type","text/plain; charset=UTF-8"),n.onreadystatechange=function(){if(4===n.readyState&&(n.onreadystatechange=o,n.status)){var e=n.getAllResponseHeaders();t.httpHeader=a(e),200===n.status?t.binary?r.resolve(v(n.response)):r.resolve(n.responseText):r.reject(new Error(n.status+":"+n.statusText))}},n.onerror=function(){r.reject(new Error("error"))},t.timeout>0&&(r=r.timeout(t.timeout).catchError(function(e){throw n.onreadystatechange=o,n.onerror=o,n.abort(),e},function(e){return e instanceof y})),t.binary?(n.responseType="arraybuffer",n.sendAsBinary(e)):n.send(e),r}function b(e,t){var r=new l,n=function(e,n){t.httpHeader=h(null),null===n?r.resolve(e):r.reject(new Error(n))},i=c(t.httpHeader);return m.post(_.uri(),i,e,n,t.timeout,t.binary),r}function C(e,r){var n=new l,i=c(r.httpHeader),o=w.getCookie(_.uri());return""!==o&&(i.Cookie=o),t.api.ajax({url:_.uri(),method:"post",data:{body:e},timeout:r.timeout,dataType:"text",headers:i,returnAll:!0,certificate:_.certificate},function(e,t){e?(r.httpHeader=e.headers,200===e.statusCode?(w.setCookie(e.headers,_.uri()),n.resolve(e.body)):n.reject(new Error(e.statusCode+":"+e.body))):n.reject(new Error(t.msg))}),n}function A(e,t){var r=new l,n=T.mm("do_Http");n.method="POST",n.timeout=t.timeout,n.contentType="text/plain; charset=UTF-8",n.url=_.uri(),n.body=e;var i=c(t.httpHeader);for(var o in i)n.setRequestHeader(o,i[o]);var a=w.getCookie(_.uri());return""!==a&&n.setRequestHeader("Cookie",a),n.on("success",function(e){var t=n.getResponseHeader("set-cookie");t&&w.setCookie({"set-cookie":t},_.uri()),r.resolve(e)}),n.on("fail",function(e){r.reject(new Error(e.status+":"+e.data))}),n.request(),t.httpHeader=h(null),r}function S(){if(t.location===r)return!0;var e=g(_.uri());return e.protocol!==t.location.protocol||e.host!==t.location.host}function O(e,r){var n=m.flashSupport()&&!E&&!k&&(r.binary||S()),i="undefined"!=typeof t.api&&"undefined"!=typeof t.api.ajax,o=n?b(e,r):i?C(e,r):T?A(e,r):d(e,r);return r.oneway&&o.resolve(),o}function j(e,t){"content-type"!==e.toLowerCase()&&(t?I[e]=t:delete I[e])}if(this.constructor!==u)return new u(e,n,s);f.call(this,e,n,s);var I=h(null),_=this;p(this,{certificate:{value:null,writable:!0},setHeader:{value:j},sendAndReceive:{value:O}})}function s(e){var t=g(e);if("http:"!==t.protocol&&"https:"!==t.protocol)throw new Error("This client desn't support "+t.protocol+" scheme.")}function c(e,t,r){if("string"==typeof e)s(e);else{if(!Array.isArray(e))throw new Error("You should set server uri first!");e.forEach(function(e){s(e)})}return new u(e,t,r)}var f=e.Client,l=e.Future,h=e.createObject,p=e.defineProperties,v=e.toBinaryString,d=e.toUint8Array,g=e.parseuri,w=e.cookieManager,y=t.TimeoutError,m=t.FlashHttpRequest,b=t.XMLHttpRequest;t.plus&&t.plus.net&&t.plus.net.XMLHttpRequest?b=t.plus.net.XMLHttpRequest:t.document&&t.document.addEventListener&&t.document.addEventListener("plusready",function(){b=t.plus.net.XMLHttpRequest},!1);var T;try{T=t.require("deviceone")}catch(C){}var E=t.location!==r&&"file:"===t.location.protocol,A="undefined"!=typeof b,k=!E&&A&&"withCredentials"in new b,S=t.ActiveXObject,O=null;A&&"undefined"!=typeof Uint8Array&&!b.prototype.sendAsBinary&&(b.prototype.sendAsBinary=function(e){var t=d(e);this.send(ArrayBuffer.isView?t:t.buffer)}),p(u,{create:{value:c}}),t.HproseHttpClient=e.HttpClient=u}(hprose,hprose.global),function(e,t,r){"use strict";function n(){}function i(e,t,o){function a(){return C<2147483647?++C:C=0}function v(e,t){var r=new u;r.writeInt32BE(e),k[e].binary?r.write(t):r.writeUTF16AsUTF8(t);var n=p(r.take());ArrayBuffer.isView?j.send(n):j.send(n.buffer)}function g(e){O.resolve(e)}function w(e){var t;t=new u("string"==typeof e.data?u.utf8Encode(e.data):h(e.data));var n=t.readInt32BE(),i=A[n],o=k[n];if(delete A[n],delete k[n],i!==r){--E;var a=t.read(t.length()-4);o.binary||(a=u.utf8Decode(a)),i.resolve(a)}if(E<100&&S.length>0){++E;var s=S.pop();O.then(function(){v(s[0],s[1])})}0!==E||I.keepAlive()||T()}function y(e){A.forEach(function(t,r){t.reject(new Error(e.code+":"+e.reason)),delete A[r]}),E=0,j=null}function m(){O=new c,j=new d(I.uri()),j.binaryType="arraybuffer",j.onopen=g,j.onmessage=w,j.onerror=n,j.onclose=y}function b(e,t){var r=a(),n=new c;return A[r]=n,k[r]=t,t.timeout>0&&(n=n.timeout(t.timeout).catchError(function(e){throw delete A[r],--E,e},function(e){return e instanceof f})),null!==j&&j.readyState!==d.CLOSING&&j.readyState!==d.CLOSED||m(),E<100?(++E,O.then(function(){v(r,e)})):S.push([r,e]),t.oneway&&n.resolve(),n}function T(){null!==j&&(j.onopen=n,j.onmessage=n,j.onclose=n,j.close())}if("undefined"==typeof d)throw new Error("WebSocket is not supported by this browser.");if(this.constructor!==i)return new i(e,t,o);s.call(this,e,t,o);var C=0,E=0,A=[],k=[],S=[],O=null,j=null,I=this;l(this,{sendAndReceive:{value:b},close:{value:T}})}function o(e){var t=v(e);if("ws:"!==t.protocol&&"wss:"!==t.protocol)throw new Error("This client desn't support "+t.protocol+" scheme.")}function a(e,t,r){if("string"==typeof e)o(e);else{if(!Array.isArray(e))throw new Error("You should set server uri first!");e.forEach(function(e){o(e)})}return new i(e,t,r)}var u=e.StringIO,s=e.Client,c=e.Future,f=t.TimeoutError,l=e.defineProperties,h=e.toBinaryString,p=e.toUint8Array,v=e.parseuri,d=t.WebSocket||t.MozWebSocket;l(i,{create:{value:a}}),t.HproseWebSocketClient=e.WebSocketClient=i}(hprose,hprose.global),function(e,t,r){"use strict";function n(){}function i(e){var t=l[e.socketId];t.onreceive(f(e.data))}function o(e){var t=l[e.socketId];t.onerror(e.resultCode),t.destroy()}function a(){null===h&&(h=t.chrome.sockets.tcp,h.onReceive.addListener(i),h.onReceiveError.addListener(o)),this.socketId=new u,this.connected=!1,this.timeid=r,this.onclose=n,this.onconnect=n,this.onreceive=n,this.onerror=n}var u=e.Future,s=e.defineProperties,c=e.toUint8Array,f=e.toBinaryString,l={},h=null;s(a.prototype,{connect:{value:function(e,t,r){var n=this;h.create({persistent:r&&r.persistent},function(i){r&&("noDelay"in r&&h.setNoDelay(i.socketId,r.noDelay,function(e){e<0&&(n.socketId.reject(e),h.disconnect(i.socketId),h.close(i.socketId),n.onclose())}),"keepAlive"in r&&h.setKeepAlive(i.socketId,r.keepAlive,function(e){e<0&&(n.socketId.reject(e),h.disconnect(i.socketId),h.close(i.socketId),n.onclose())})),r&&r.tls?h.setPaused(i.socketId,!0,function(){h.connect(i.socketId,e,t,function(e){e<0?(n.socketId.reject(e),h.disconnect(i.socketId),h.close(i.socketId),n.onclose()):h.secure(i.socketId,function(t){0!==t?(n.socketId.reject(e),h.disconnect(i.socketId),h.close(i.socketId),n.onclose()):h.setPaused(i.socketId,!1,function(){n.socketId.resolve(i.socketId)})})})}):h.connect(i.socketId,e,t,function(e){e<0?(n.socketId.reject(e),h.disconnect(i.socketId),h.close(i.socketId),n.onclose()):n.socketId.resolve(i.socketId)})}),this.socketId.then(function(e){l[e]=n,n.connected=!0,n.onconnect(e)},function(e){n.onerror(e)})}},send:{value:function(e){e=c(e).buffer;var t=this,r=new u;return this.socketId.then(function(n){h.send(n,e,function(e){e.resultCode<0?(t.onerror(e.resultCode),r.reject(e.resultCode),t.destroy()):r.resolve(e.bytesSent)})}),r}},destroy:{value:function(){var e=this;this.connected=!1,this.socketId.then(function(t){h.disconnect(t),h.close(t),delete l[t],e.onclose()})}},ref:{value:function(){this.socketId.then(function(e){h.setPaused(e,!1)})}},unref:{value:function(){this.socketId.then(function(e){h.setPaused(e,!0)})}},clearTimeout:{value:function(){this.timeid!==r&&t.clearTimeout(this.timeid)}},setTimeout:{value:function(e,r){this.clearTimeout(),this.timeid=t.setTimeout(r,e)}}}),e.ChromeTcpSocket=a}(hprose,hprose.global),function(e,t,r){"use strict";function n(){}function i(){null===f&&(f=t.api.require("socketManager")),this.socketId=new o,this.connected=!1,this.timeid=r,this.onclose=n,this.onconnect=n,this.onreceive=n,this.onerror=n}var o=e.Future,a=e.defineProperties,u=t.atob,s=t.btoa,c={},f=null;a(i.prototype,{connect:{value:function(e,t,r){var n=this;f.createSocket({type:"tcp",host:e,port:t,timeout:r.timeout,returnBase64:!0},function(e){if(e)switch(e.state){case 101:break;case 102:n.socketId.resolve(e.sid);break;case 103:n.onreceive(u(e.data.replace(/\s+/g,"")));break;case 201:n.socketId.reject(new Error("Create TCP socket failed"));break;case 202:n.socketId.reject(new Error("TCP connection failed"));break;case 203:n.onclose(),n.onerror(new Error("Abnormal disconnect connection"));break;case 204:n.onclose();break;case 205:n.onclose(),n.onerror(new Error("Unknown error"))}}),this.socketId.then(function(e){c[e]=n,n.connected=!0,n.onconnect(e)},function(e){n.onerror(e)})}},send:{value:function(e){var t=this,r=new o;return this.socketId.then(function(n){f.write({sid:n,data:s(e),base64:!0},function(e,n){e.status?r.resolve():(t.onerror(new Error(n.msg)),r.reject(n.msg),t.destroy())})}),r}},destroy:{value:function(){var e=this;this.connected=!1,this.socketId.then(function(t){f.closeSocket({sid:t},function(t,r){t.status||e.onerror(new Error(r.msg))}),delete c[t]})}},ref:{value:n},unref:{value:n},clearTimeout:{value:function(){this.timeid!==r&&t.clearTimeout(this.timeid)}},setTimeout:{value:function(e,r){this.clearTimeout(),this.timeid=t.setTimeout(r,e)}}}),e.APICloudTcpSocket=i}(hprose,hprose.global),function(e,t,r){"use strict";function n(){}function i(e,t){e.onreceive=function(r){"receiveEntry"in e||(e.receiveEntry={stream:new d,headerLength:4,dataLength:-1,id:null});var n=e.receiveEntry,i=n.stream,o=n.headerLength,a=n.dataLength,u=n.id;for(i.write(r);;){if(a<0&&i.length()>=o&&(a=i.readInt32BE(),0!==(2147483648&a)&&(a&=2147483647,o=8)),8===o&&null===u&&i.length()>=o&&(u=i.readInt32BE()),!(a>=0&&i.length()-o>=a))break;t(i.read(a),u),o=4,u=null,i.trunc(),a=-1}n.stream=i,n.headerLength=o,n.dataLength=a,n.id=u}}function o(e){e&&(this.client=e,this.uri=this.client.uri(),this.size=0,this.pool=[],this.requests=[])}function a(e){o.call(this,e)}function u(e){o.call(this,e)}function s(e,t,r){function n(){return m}function i(e){m=!!e}function o(){return b}function c(e){b=!!e}function f(){return T}function l(e){"number"==typeof e?(T=0|e,T<1&&(T=10)):T=10}function h(){return C}function p(e){C="number"==typeof e?0|e:0}function d(e,t){var r=new g;return b?(null!==E&&E.uri===w.uri||(E=new a(w)),E.sendAndReceive(e,r,t)):(null!==A&&A.uri===w.uri||(A=new u(w)),A.sendAndReceive(e,r,t)),t.oneway&&r.resolve(),r}if(this.constructor!==s)return new s(e,t,r);v.call(this,e,t,r);var w=this,m=!0,b=!1,T=10,C=3e4,E=null,A=null;y(this,{noDelay:{get:n,set:i},fullDuplex:{get:o,set:c},maxPoolSize:{get:f,set:l},poolTimeout:{get:h,set:p},sendAndReceive:{value:d}})}function c(e){var t=m(e),r=t.protocol;if("tcp:"!==r&&"tcp4:"!==r&&"tcp6:"!==r&&"tcps:"!==r&&"tcp4s:"!==r&&"tcp6s:"!==r&&"tls:"!==r)throw new Error("This client desn't support "+r+" scheme.")}function f(e,t,r){if("string"==typeof e)c(e);else{if(!Array.isArray(e))throw new Error("You should set server uri first!");e.forEach(function(e){c(e)})}return new s(e,t,r)}var l=t.TimeoutError,h=e.ChromeTcpSocket,p=e.APICloudTcpSocket,v=e.Client,d=e.StringIO,g=e.Future,w=e.createObject,y=e.defineProperties,m=e.parseuri;y(o.prototype,{create:{value:function(){var e,r=m(this.uri),n=r.protocol,i=r.hostname,o=parseInt(r.port,10);if("tcp:"===n||"tcp4:"===n||"tcp6:"===n)e=!1;else{if("tcps:"!==n&&"tcp4s:"!==n&&"tcp6s:"!==n&&"tls:"!==n)throw new Error("Unsupported "+n+" protocol!");e=!0}var a;if(t.chrome&&t.chrome.sockets&&t.chrome.sockets.tcp)a=new h;else{if(!t.api||!t.api.require)throw new Error("TCP Socket is not supported by this browser or platform.");a=new p}var u=this;return a.connect(i,o,{persistent:!0,tls:e,timeout:this.client.timeout(),noDelay:this.client.noDelay(),keepAlive:this.client.keepAlive()}),a.onclose=function(){--u.size},++this.size,a}}}),a.prototype=w(o.prototype,{fetch:{value:function(){for(var e=this.pool;e.length>0;){var t=e.pop();if(t.connected)return 0===t.count&&(t.clearTimeout(),t.ref()),t}return null}},init:{value:function(e){var t=this;e.count=0,e.futures={},e.contexts={},e.timeoutIds={},i(e,function(r,n){var i=e.futures[n],o=e.contexts[n];i&&(t.clean(e,n),0===e.count&&t.recycle(e),o.binary||(r=d.utf8Decode(r)),i.resolve(r))}),e.onerror=function(r){var n=e.futures;for(var i in n){var o=n[i];t.clean(e,i),o.reject(r)}}}},recycle:{value:function(e){e.unref(),e.setTimeout(this.client.poolTimeout(),function(){e.destroy()})}},clean:{value:function(e,n){e.timeoutIds[n]!==r&&(t.clearTimeout(e.timeoutIds[n]),delete e.timeoutIds[n]),delete e.futures[n],delete e.contexts[n],--e.count,this.sendNext(e)}},sendNext:{value:function(e){if(e.count<10)if(this.requests.length>0){var t=this.requests.pop();t.push(e),this.send.apply(this,t)}else this.pool.lastIndexOf(e)<0&&this.pool.push(e)}},send:{value:function(e,r,n,i,o){var a=this,u=i.timeout;u>0&&(o.timeoutIds[n]=t.setTimeout(function(){a.clean(o,n),0===o.count&&a.recycle(o),r.reject(new l("timeout"))},u)),o.count++,o.futures[n]=r,o.contexts[n]=i;var s=e.length,c=new d;c.writeInt32BE(2147483648|s),c.writeInt32BE(n),i.binary?c.write(e):c.writeUTF16AsUTF8(e),o.send(c.take()).then(function(){a.sendNext(o)})}},getNextId:{value:function(){return this.nextid<2147483647?++this.nextid:this.nextid=0}},sendAndReceive:{value:function(e,t,r){var n=this.fetch(),i=this.getNextId();if(n)this.send(e,t,i,r,n);else if(this.size<this.client.maxPoolSize()){n=this.create(),n.onerror=function(e){t.reject(e)};var o=this;n.onconnect=function(){o.init(n),o.send(e,t,i,r,n)}}else this.requests.push([e,t,i,r])}}}),a.prototype.constructor=o,u.prototype=w(o.prototype,{fetch:{value:function(){for(var e=this.pool;e.length>0;){var t=e.pop();if(t.connected)return t.clearTimeout(),t.ref(),t}return null}},recycle:{value:function(e){this.pool.lastIndexOf(e)<0&&(e.unref(),e.setTimeout(this.client.poolTimeout(),function(){e.destroy()}),this.pool.push(e))}},clean:{value:function(e){e.onreceive=n,e.onerror=n,e.timeoutId!==r&&(t.clearTimeout(e.timeoutId),delete e.timeoutId)}},sendNext:{value:function(e){if(this.requests.length>0){var t=this.requests.pop();t.push(e),this.send.apply(this,t)}else this.recycle(e)}},send:{value:function(e,r,n,o){var a=this,u=n.timeout;u>0&&(o.timeoutId=t.setTimeout(function(){a.clean(o),o.destroy(),r.reject(new l("timeout"))},u)),i(o,function(e){a.clean(o),a.sendNext(o),n.binary||(e=d.utf8Decode(e)),r.resolve(e)}),o.onerror=function(e){a.clean(o),r.reject(e)};var s=e.length,c=new d;c.writeInt32BE(s),n.binary?c.write(e):c.writeUTF16AsUTF8(e),o.send(c.take())}},sendAndReceive:{value:function(e,t,r){var n=this.fetch();if(n)this.send(e,t,r,n);else if(this.size<this.client.maxPoolSize()){n=this.create();var i=this;n.onerror=function(e){t.reject(e)},n.onconnect=function(){i.send(e,t,r,n)}}else this.requests.push([e,t,r])}}}),u.prototype.constructor=o,y(s,{create:{value:f}}),t.HproseTcpClient=e.TcpClient=s}(hprose,hprose.global),function(e){"use strict";function t(e){this.version=e||"2.0"}var r=e.Tags,n=e.StringIO,i=e.Writer,o=e.Reader,a=1;t.prototype.inputFilter=function(e){"{"===e.charAt(0)&&(e="["+e+"]");for(var t=JSON.parse(e),o=new n,a=new i(o,(!0)),u=0,s=t.length;u<s;++u){var c=t[u];c.error?(o.write(r.TagError),a.writeString(c.error.message)):(o.write(r.TagResult),a.serialize(c.result))}return o.write(r.TagEnd),o.take()},t.prototype.outputFilter=function(e){var t=[],i=new n(e),u=new o(i,(!1),(!1)),s=i.readChar();do{var c={};s===r.TagCall&&(c.method=u.readString(),s=i.readChar(),s===r.TagList&&(c.params=u.readListWithoutTag(),s=i.readChar()),s===r.TagTrue&&(s=i.readChar())),"1.1"===this.version?c.version="1.1":"2.0"===this.version&&(c.jsonrpc="2.0"),c.id=a++,t.push(c)}while(s===r.TagCall);return t.length>1?JSON.stringify(t):JSON.stringify(t[0])},e.JSONRPCClientFilter=t}(hprose),function(e){"use strict";e.common={Completer:e.Completer,Future:e.Future,ResultMode:e.ResultMode},e.io={StringIO:e.StringIO,ClassManager:e.ClassManager,Tags:e.Tags,RawReader:e.RawReader,Reader:e.Reader,Writer:e.Writer,Formatter:e.Formatter},e.client={Client:e.Client,HttpClient:e.HttpClient,TcpClient:e.TcpClient,WebSocketClient:e.WebSocketClient},e.filter={JSONRPCClientFilter:e.JSONRPCClientFilter},"function"==typeof define&&(define.cmd?define("hprose",[],e):define.amd&&define("hprose",[],function(){return e})),"object"==typeof module&&(module.exports=e)}(hprose),!function(e){"use strict";function t(e,t,r,i){var o=t&&t.prototype instanceof n?t:n,a=Object.create(o.prototype),u=new h(i||[]);return a._invoke=c(e,r,u),a}function r(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}function n(){}function i(){}function o(){}function a(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){this.arg=e}function s(e){function t(n,i,o,a){var s=r(e[n],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f instanceof u?Promise.resolve(f.arg).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(f).then(function(e){c.value=e,o(c)},a)}a(s.arg)}function n(e,r){function n(){return new Promise(function(n,i){t(e,r,n,i)})}return i=i?i.then(n,n):n()}"object"==typeof process&&process.domain&&(t=process.domain.bind(t));var i;this._invoke=n}function c(e,t,n){var i=C;return function(o,a){if(i===A)throw new Error("Generator is already running");if(i===k){if("throw"===o)throw a;return v()}for(;;){var u=n.delegate;if(u){if("return"===o||"throw"===o&&u.iterator[o]===d){n.delegate=null;var s=u.iterator["return"];if(s){var c=r(s,u.iterator,a);if("throw"===c.type){o="throw",a=c.arg;continue}}if("return"===o)continue}var c=r(u.iterator[o],u.iterator,a);if("throw"===c.type){n.delegate=null,o="throw",a=c.arg;continue}o="next",a=d;var f=c.arg;if(!f.done)return i=E,f;n[u.resultName]=f.value,n.next=u.nextLoc,n.delegate=null}if("next"===o)n.sent=n._sent=a;else if("throw"===o){if(i===C)throw i=k,a;n.dispatchException(a)&&(o="next",a=d)}else"return"===o&&n.abrupt("return",a);i=A;var c=r(e,t,n);if("normal"===c.type){i=n.done?k:E;var f={value:c.arg,done:n.done};if(c.arg!==S)return f;n.delegate&&"next"===o&&(a=d)}else"throw"===c.type&&(i=k,o="throw",a=c.arg)}}}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function l(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function p(e){if(e){var t=e[y];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function i(){for(;++r<e.length;)if(g.call(e,r))return i.value=e[r],i.done=!1,i;return i.value=d,i.done=!0,i};return n.next=n}}return{next:v}}function v(){return{value:d,done:!0}}var d,g=Object.prototype.hasOwnProperty,w="function"==typeof Symbol?Symbol:{},y=w.iterator||"@@iterator",m=w.toStringTag||"@@toStringTag",b="object"==typeof module,T=e.regeneratorRuntime;if(T)return void(b&&(module.exports=T));T=e.regeneratorRuntime=b?module.exports:{},T.wrap=t;var C="suspendedStart",E="suspendedYield",A="executing",k="completed",S={},O=o.prototype=n.prototype;i.prototype=O.constructor=o,o.constructor=i,o[m]=i.displayName="GeneratorFunction",T.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},T.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,m in e||(e[m]="GeneratorFunction")),e.prototype=Object.create(O),e},T.awrap=function(e){return new u(e)},a(s.prototype),T.async=function(e,r,n,i){var o=new s(t(e,r,n,i));return T.isGeneratorFunction(r)?o:o.next().then(function(e){return e.done?e.value:o.next()})},a(O),O[y]=function(){return this},O[m]="Generator",O.toString=function(){return"[object Generator]"},T.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},T.values=p,h.prototype={constructor:h,reset:function(e){if(this.prev=0,
this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.tryEntries.forEach(l),!e)for(var t in this)"t"===t.charAt(0)&&g.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,n){return o.type="throw",o.arg=e,r.next=t,!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),u=g.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?this.next=i.finallyLoc:this.complete(o),S},complete:function(e,t){if("throw"===e.type)throw e.arg;"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),l(r),S}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;l(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:p(e),resultName:t,nextLoc:r},S}}}("object"==typeof global?global:"object"==typeof window?window:"object"==typeof self?self:this);