>>=y=v>>>24,p-=y,0===(y=v>>>16&255))E[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(_&(1<>>=y,p-=y),p<15&&(_+=A[i++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=g[(65535&v)+(_&(1<>>=y,p-=y,(y=s-o)>3,_&=(1<<(p-=k<<3))-1,e.next_in=i,e.next_out=s,e.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function n(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new O.Buf16(320),this.work=new O.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function i(t){var e;if(!t||!t.state)return V;return e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=J,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new O.Buf32(f),e.distcode=e.distdyn=new O.Buf32(c),e.sane=1,e.back=-1,H}function a(t){var e;if(!t||!t.state)return V;return(e=t.state).wsize=0,e.whave=0,e.wnext=0,i(t)}function s(t,e){var r,n;if(!t||!t.state)return V;if(n=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||15=i.wsize?(O.arraySet(i.window,e,r-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(n<(t=i.wsize-i.wnext)&&(t=n),O.arraySet(i.window,e,r-n,t,i.wnext),(n-=t)?(O.arraySet(i.window,e,r-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=t,i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,r.check=L(r.check,C,2,0),l=d=0,r.mode=Q;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&d)<<8)+(d>>8))%31){t.msg="incorrect header check",r.mode=At;break}if((15&d)!=G){t.msg="unknown compression method",r.mode=At;break}if(l-=4,x=(15&(d>>>=4))+8,0===r.wbits)r.wbits=x;else if(x>r.wbits){t.msg="invalid window size",r.mode=At;break}r.dmax=1<>8&1),512&r.flags&&(C[0]=255&d,C[1]=d>>>8&255,r.check=L(r.check,C,2,0)),l=d=0,r.mode=$;case $:while(l<32){if(0===o)break t;o--,d+=n[a++]<>>8&255,C[2]=d>>>16&255,C[3]=d>>>24&255,r.check=L(r.check,C,4,0)),l=d=0,r.mode=tt;case tt:while(l<16){if(0===o)break t;o--,d+=n[a++]<>8),512&r.flags&&(C[0]=255&d,C[1]=d>>>8&255,r.check=L(r.check,C,2,0)),l=d=0,r.mode=et;case et:if(1024&r.flags){while(l<16){if(0===o)break t;o--,d+=n[a++]<>>8&255,r.check=L(r.check,C,2,0)),l=d=0}else r.head&&(r.head.extra=null);r.mode=rt;case rt:if(1024&r.flags&&(o<(c=r.length)&&(c=o),c&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),O.arraySet(r.head.extra,n,a,c,x)),512&r.flags&&(r.check=L(r.check,n,c,a)),o-=c,a+=c,r.length-=c),r.length))break t;r.length=0,r.mode=nt;case nt:if(2048&r.flags){if(0===o)break t;c=0;do{x=n[a+c++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&c>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=ht;break;case st:while(l<32){if(0===o)break t;o--,d+=n[a++]<>>=7&l,l-=7&l,r.mode=xt;break}while(l<3){if(0===o)break t;o--,d+=n[a++]<>>=1)){case 0:r.mode=lt;break;case 1:if(I(r),r.mode=mt,e===j){d>>>=2,l-=2;break t}break;case 2:r.mode=ct;break;case 3:t.msg="invalid block type",r.mode=At}d>>>=2,l-=2;break;case lt:d>>>=7&l,l-=7&l;while(l<32){if(0===o)break t;o--,d+=n[a++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=At;break}if(r.length=65535&d,l=d=0,r.mode=ut,e===j)break t;case ut:r.mode=ft;case ft:if(c=r.length){if(o>>=5,l-=5,r.ndist=(31&d)+1,d>>>=5,l-=5,r.ncode=(15&d)+4,d>>>=4,l-=4,286>>=3,l-=3}while(r.have<19)r.lens[S[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},z=N(U,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,z){t.msg="invalid code lengths set",r.mode=At;break}r.have=0,r.mode=pt;case pt:while(r.have>>16&255,w=65535&m,(g=m>>>24)<=l)break;if(0===o)break t;o--,d+=n[a++]<>>=g,l-=g,r.lens[r.have++]=w;else{if(16===w){E=g+2;while(l>>=g,l-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=At;break}x=r.lens[r.have-1],c=3+(3&d),d>>>=2,l-=2}else if(17===w){E=g+3;while(l>>=g)),d>>>=3,l-=3}else{E=g+7;while(l>>=g)),d>>>=7,l-=7}if(r.have+c>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=At;break}while(c--)r.lens[r.have++]=x}}if(r.mode===At)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=At;break}if(r.lenbits=9,A={bits:r.lenbits},z=N(F,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,z){t.msg="invalid literal/lengths set",r.mode=At;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},z=N(Z,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,z){t.msg="invalid distances set",r.mode=At;break}if(r.mode=mt,e===j)break t;case mt:r.mode=gt;case gt:if(6<=o&&258<=h){t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=o,r.hold=d,r.bits=l,D(t,f),s=t.next_out,i=t.output,h=t.avail_out,a=t.next_in,n=t.input,o=t.avail_in,d=r.hold,l=r.bits,r.mode===ht&&(r.back=-1);break}for(r.back=0;;){if(b=(m=r.lencode[d&(1<>>16&255,w=65535&m,(g=m>>>24)<=l)break;if(0===o)break t;o--,d+=n[a++]<>v)])>>>16&255,w=65535&m,v+(g=m>>>24)<=l)break;if(0===o)break t;o--,d+=n[a++]<>>=v,l-=v,r.back+=v}if(d>>>=g,l-=g,r.back+=g,r.length=w,0===b){r.mode=kt;break}if(32&b){r.back=-1,r.mode=ht;break}if(64&b){t.msg="invalid literal/length code",r.mode=At;break}r.extra=15&b,r.mode=bt;case bt:if(r.extra){E=r.extra;while(l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=wt;case wt:for(;;){if(b=(m=r.distcode[d&(1<>>16&255,w=65535&m,(g=m>>>24)<=l)break;if(0===o)break t;o--,d+=n[a++]<>v)])>>>16&255,w=65535&m,v+(g=m>>>24)<=l)break;if(0===o)break t;o--,d+=n[a++]<>>=v,l-=v,r.back+=v}if(d>>>=g,l-=g,r.back+=g,64&b){t.msg="invalid distance code",r.mode=At;break}r.offset=w,r.extra=15&b,r.mode=vt;case vt:if(r.extra){E=r.extra;while(l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=At;break}r.mode=yt;case yt:if(0===h)break t;if(c=f-h,r.offset>c){if(c=r.offset-c,c>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=At;break}_=c>r.wnext?(c-=r.wnext,r.wsize-c):r.wnext-c,c>r.length&&(c=r.length),p=r.window}else p=i,_=s-r.offset,c=r.length;hE?(R=I[T+o[u]],C[A+o[u]]):(R=32+64,0),v=1<>m)+(y-=v)]=O<<24|R<<16|L|0}while(0!==y);v=1<>=1;if(0!==v?(w&=v-1,w+=v):w=0,u++,0==--S[l]){if(l===c)break;l=r[n+o[u]]}if(_>>7)]}function i(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function l(t,e,r){t.bi_valid>Y-r?(t.bi_buf|=e<>Y-t.bi_valid,t.bi_valid+=r-Y):(t.bi_buf|=e<>>=1,r<<=1}while(0<--e);return r>>>1}function a(t){16===t.bi_valid?(i(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function f(t,e){for(var r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length,d,l,u,f,c,_,p=0,f=0;f<=V;f++)t.bl_count[f]=0;for(r[2*t.heap[t.heap_max]+1]=0,d=t.heap_max+1;d>=7;n>1;1<=s;s--)g(t,r,s);d=a;do{s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],g(t,r,1),o=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=o,r[2*d]=r[2*s]+r[2*o],t.depth[d]=(t.depth[s]>=t.depth[o]?t.depth[s]:t.depth[o])+1,r[2*s+1]=r[2*o+1]=d,t.heap[1]=d++,g(t,r,1)}while(2<=t.heap_len);t.heap[--t.heap_max]=t.heap[1],f(t,e),c(r,h,t.bl_count)}function v(t,e,r){var n,i=-1,a,s=e[0*2+1],o=0,h=7,d=4;for(0===s&&(h=138,d=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++){if(a=s,s=e[2*(n+1)+1],++o>>=1)if(1&e&&0!==t.dyn_ltree[2*r])return O;if(0!==t.dyn_ltree[9*2]||0!==t.dyn_ltree[10*2]||0!==t.dyn_ltree[13*2])return R;for(r=32;r>>3,(a=t.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==e?A(t,e,r,n):t.strategy===T||a===i?(l(t,(N<<1)+(n?1:0),3),b(t,nt,it)):(l(t,(U<<1)+(n?1:0),3),x(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),b(t,t.dyn_ltree,t.dyn_dtree)),o(t),n&&_(t)}function B(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(st[r]+M+1)]++,t.dyn_dtree[2*h(e)]++),t.last_lit===t.lit_bufsize-1}var I=t("../utils/common"),T=4,O=0,R=1,L=2,D=0,N=1,U=2,F=3,Z=258,P=29,M=256,j=M+1+P,H=30,X=19,K=2*j+1,V=15,Y=16,W=7,q=256,G=16,J=17,Q=18,$=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],tt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],et=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],t=512,nt=new Array(2*(j+2));n(nt);var it=new Array(2*H);n(it);var at=new Array(t);n(at);var st=new Array(Z-F+1);n(st);var ot=new Array(P);n(ot);var ht=new Array(H);n(ht);var dt=function(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length},lt,ut,ft,ct=function(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e},_t=!1;r._tr_init=C,r._tr_stored_block=A,r._tr_flush_block=S,r._tr_tally=B,r._tr_align=E},{"../utils/common":27}],39:[function(t,e,r){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=n},{}]},{},[9])(9)}(),"object"==typeof module&&(module.exports=Stimulsoft);;
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||"undefined"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if("function"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype["catch"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype["finally"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var u=n.then;if("function"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError("Promise.race accepts an array"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=o});
;
var __values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__extends=this&&this.__extends||function(){var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};return function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{while((void 0===t||0t?e[t]=o:e.push(o),t++}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},Object.defineProperty(i.prototype,"count",{get:function(){return this.keys.length},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var e=new i;return this.keys.copyTo(e.keys),this.values.copyTo(e.values),e},e=i,n.Hashtable=e}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,e,i;function a(){return null!==i&&i.apply(this,arguments)||this}r=t=e.System||(e.System={}),e=n=r.Collections||(r.Collections={}),i=e.Hashtable,__extends(a,i),Object.defineProperty(a.prototype,"pairs",{get:function(){var r=this;return this.keys.map(function(e,t){return{key:e,value:r.values[t]}})},enumerable:!1,configurable:!0}),a.prototype.tryGetValue=function(e,t){var e=this.keys.indexOf(e);return t.ref=0<=e?this.values[e]:null,0<=e},r=a,e.Dictionary=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,e,r,n,i;function a(){}e=t=e.System||(e.System={}),(n=r=e.Collections||(e.Collections={})).DictionaryEntry=a}(Stimulsoft=Stimulsoft||{}),function(I){var e;!function(e){function t(n){return function(e,t,r){r.enumerable=n}}function r(n){return function(e,t,r){var e=I.System.Type.getType(e);e.enumTypes||(e.enumTypes={}),e.enumTypes[t]||(e.enumTypes[t]=n)}}e.enumerable=t,e.enumType=r;var n=(m.prototype.is=function(e){if("is"in this.value)return this.value.is(e);if(e instanceof I.System.Interface&&"implements"in this.value)return-1!=this.value.implements().indexOf(e);if(!I.System.TypeHelper.getTypes().stimulsoft.contains(e)&&"function"==typeof this.value&&"function"==typeof e)return this.value==e||null==this.value.__proto__||"object"==typeof this.value.__proto__||this.value.__proto__.stimulsoft.is(e);if("function"==typeof e)return this.value instanceof e;return!1},m.prototype.is2=function(e){return this.is(e)},m.prototype.as=function(e){if(this.is(e))return this.value;return null},m.prototype.memberwiseClone=function(e){var t,r;if(void 0===e&&(e=!1),!e&&this.value["memberwiseClone"])return this.value.memberwiseClone();var n=m.getOwnPropertyNames(this.value),i=new(this.value.stimulsoft.getType());try{for(var a=__values(n),o=a.next();!o.done;o=a.next()){var s=o.value;i[s]=this.value[s]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i},m.prototype.equals=function(){for(var e,t,r,n=[],i=0;ie?1:0},o.prototype.toShort=function(){if(32767=y&&o(u)}))}}else o(u)})},d.getSetting=function(e,t){return t},d.setSetting=function(e,t){},d.isInitialize=!1,d.convert=function(n,t){void 0===t&&(t=!1);var i=new y.StiPromise;try{var e=this.data[n.toString()],r,e,a;if(null!=e)return i.callTry(this),i;null==e&&(e=this.data[Stimulsoft.System.Drawing.Imaging.ImageFormat.Png.toString()]),null==e&&(e=this.data[Stimulsoft.System.Drawing.Imaging.ImageFormat.Bmp.toString()]),null==e&&(e=this.data[Stimulsoft.System.Drawing.Imaging.ImageFormat.Jpeg.toString()]),null==e&&(e=this.data[Stimulsoft.System.Drawing.Imaging.ImageFormat.Gif.toString()]),null!=e?(this._isConverting=!0,r=h("jimp"),e=Buffer.from(e.base64.replace(/^data:image\/\w+;base64,/,""),"base64"),a=this,r.read(e,function(e,r){if(e)return void i.callCatch(e);r.background(4294967295),t?r.getBuffer(n.mimeType,function(e,t){if(e)return void i.callCatch(e);a.imageData=t,r.getBase64(n.mimeType,function(e,t){if(e)return void i.callCatch(e);a.base64=t,a.isConverting=!1,i.callTry(a)})}):r.getBase64(n.mimeType,function(e,t){if(e)return void i.callCatch(e);a.base64=t,a.isConverting=!1,i.callTry(a)})})):i.callCatch("No Image")}catch(e){return i.callCatch(e.message),i}return i},d.processFirebird=function(e,t){var l=function(e){try{y&&y.detach(),t(e)}catch(e){throw Stimulsoft.System.StiError.showError(e,!1),e}},a=function(e){l({success:!1,notice:e})};try{var r=function(){u.attach(m,function(e,t){y=t,e?a(e.message):i()})},n=function(e){y.query(e,void 0,function(e,t){e?a(e.message):o(t),y.detach()})},i=function(){e.queryString?n(e.queryString):l({success:!0})},o=function(e){var t=[],r=[],n=[],i=!1,a;for(a in e){var o=[],s;for(s in e[a]){i||t.push(s);var u=t.indexOf(s);n[u]=typeof e[a][s],e[a][s]instanceof Uint8Array&&(e[a][s]=e[a][s].toString(),n[u]="string"),null!=e[a][s]&&"function"==typeof e[a][s].toISOString&&(e[a][s]=e[a][s].toISOString(),n[u]="datetime"),o[u]=e[a][s]}i=!0,r.push(o)}l({success:!0,columns:t,rows:r,types:n})},s=function(e){var t={host:"localhost",port:"3050"},r=!1,n;for(n in e.split(";")){var i=e.split(";")[n];if(i){var i=i.split("=");if(i&&2<=i.length)switch(i[0]=i[0].trim().toLowerCase(),i[1]=i[1].trim(),i[0]){case"server":case"host":case"location":case"datasource":case"data source":t["host"]=i[1];break;case"port":t["port"]=i[1];break;case"database":t["database"]=i[1],r=!0;break;case"uid":case"user":case"user id":t["userId"]=i[1];break;case"pwd":case"password":t["password"]=i[1];break;case"charset":t["charset"]=i[1];break}}}if(!r)return a("Connection String parse error"),null;return t},u=h("node-firebird"),m,y;e.connectionStringInfo=s(e.connectionString),e.connectionStringInfo&&(m={host:e.connectionStringInfo.host,port:e.connectionStringInfo.port,database:e.connectionStringInfo.database,user:e.connectionStringInfo.userId,password:e.connectionStringInfo.password,charset:e.connectionStringInfo.charset},r())}catch(e){Stimulsoft.System.StiError.showError(e,!1),a(e.stack)}},d.processMsSql=function(e,t){var l=function(e){try{d&&d.close(),t(e)}catch(e){throw Stimulsoft.System.StiError.showError(e,!1),e}},r=function(e){l({success:!1,notice:e})};try{var n=function(){d=new m.ConnectionPool(y,function(e){e?r(e.message):a()})},i=function(e){var t;d.request().query(e,function(e,t){e?r(e.message):o(t)})},a=function(){e.queryString?i(e.queryString):l({success:!0})},o=function(e){var t=[],r=[],n=[],i,a;for(i in 0<(e=e.recordset).length&&Array.isArray(e[0])&&(e=e[0]),e.columns){var o=e.columns[i],s=o.index;switch(t.push(o.name),o.type){case m.Bit:case m.SmallInt:case m.Int:case m.BigInt:n[s]="int";break;case m.Decimal:case m.Float:case m.Money:case m.Numeric:case m.SmallMoney:case m.Real:n[s]="number";break;case m.TinyInt:n[s]="boolean";break;case m.Char:case m.NChar:case m.Text:case m.NText:case m.VarChar:case m.NVarChar:case m.Xml:n[s]="string";break;case m.Time:case m.Date:case m.DateTime:case m.DateTime2:case m.DateTimeOffset:case m.SmallDateTime:n[s]="datetime";break;case m.UniqueIdentifier:n[s]="string";break;case m.Variant:n[s]="string";break;case m.Binary:case m.VarBinary:case m.Image:n[s]="string";break;case m.UDT:case m.Geography:case m.Geometry:n[s]="string";break}}for(a in 0t.ticks)return 1;return 0},o.doubleDateToTicks=function(e){if(e>=this.oADateMaxAsDouble||e<=this.oADateMinAsDouble)return null;var e=e*this.millisPerDay+(0<=e?.5:-.5);if(e<0&&(e-=e%this.millisPerDay*2),(e+=this.doubleDateOffset/this.ticksPerMillisecond)<0||e>=this.maxMillis)return null;return e*this.ticksPerMillisecond},o.ticksToOADate=function(e){if(0==e)return 0;ee.ticks)return 1;return 0},o.prototype.subtract=function(e){return new a.TimeSpan(this.ticks-e.ticks)},Object.defineProperty(o.prototype,"date",{get:function(){return this.innerDate},enumerable:!1,configurable:!0}),o.prototype.toString=function(e){void 0===e&&(e="G");var t=i.ExternalLibrary.Moment(this.innerDate);if(!t.isValid())return"";switch(t.locale("sti_"+r.currentCulture.name),e){case"t":e=r.currentCulture.dateTimeFormat.shortTimePattern;break;case"T":e=r.currentCulture.dateTimeFormat.longTimePattern;break;case"d":e=r.currentCulture.dateTimeFormat.shortDatePattern;break;case"D":e=r.currentCulture.dateTimeFormat.longDatePattern;break;case"f":e=r.currentCulture.dateTimeFormat.longDatePattern+" "+r.currentCulture.dateTimeFormat.shortTimePattern;break;case"F":e=r.currentCulture.dateTimeFormat.fullDateTimePattern;break;case"g":e=r.currentCulture.dateTimeFormat.shortDatePattern+" "+r.currentCulture.dateTimeFormat.shortTimePattern;break;case"G":e=r.currentCulture.dateTimeFormat.shortDatePattern+" "+r.currentCulture.dateTimeFormat.longTimePattern;break;case"y":case"Y":e=r.currentCulture.dateTimeFormat.yearMonthPattern;break;case"s":e="yyyy-MM-dd\\THH:mm:ss";break;case"u":e="yyyy-MM-dd HH:mm:ss\\Z";break;case"m":case"M":e=r.currentCulture.name.stimulsoft.contains("en")||r.currentCulture.name.stimulsoft.contains("us")?"MMMM d":"d MMMM";break;case"r":case"R":e="ddd, dd MMM yyyy HH\\:mm\\:ss \\G\\M\\T";break}return e=(e=(e=(e=(e=e.replace(/d/gm,"D").replace(/DDDD/gm,"dddd").replace(/DDD/gm,"ddd")).replace(/y/gm,"Y")).replace(/f/gm,"S").replace(/F/gm,"S")).replace(/tt/gm,"A").replace(/t/gm,"A")).replace(/zzz/gm,"Z").replace(/zz/gm,"Z").replace(/z/gm,"Z"),t.format(e)},o.oaDateToTicks0=function(e){var t=864e5*(e-25569),e;return e<0&&(0!=(e=864e5*(e-Math.trunc(e)))&&(t-=2*e)),t},o.ticksToOADate0=function(e){var t=e/864e5+25569,e;return t<0&&(0!=(e=t-Math.trunc(t))&&(t=Math.ceil(t)-e-2)),t},o.prototype.toOADate=function(){return o.ticksToOADate0(this.ticks)},o.prototype.toOADate2=function(e){var t=o.ticksToOADate(this.ticks);if(e)return Math.round(t);return t},o.prototype.toNetJsonString=function(){return"\\/Date("+this.ticks.toString()+")\\/"},o.tryParseExact=function(e,t){void 0===e&&(e="2015-12-31");try{var r=i.ExternalLibrary.Moment(e,t);if(0==r.isValid()||0this.length&&(t=this.length-e),new v(this.slice(e,e+t))},v.prototype.add=function(e){this.push(e)},v.prototype.insert=function(e,t){this.splice(e,0,t)},v.prototype.getKeys=function(){return n.StiObject.keys(this).sort(function(e,t){return e.stimulsoft.toNumber().stimulsoft.compareTo(t.stimulsoft.toNumber())})},v.prototype.getByIndex=function(e,t){return void 0===t&&(t=null),null==t&&(t=this.getKeys()),this[t[e]]},v.prototype.setByIndex=function(e,t){var r;this[n.StiObject.keys(this)[e]]=t},v.prototype.removeByIndex=function(e){var e=this.indexOf(this.getByIndex(e,null));return delete this[e],this},v.prototype.copyTo=function(e,t){void 0===t&&(t=0);for(var r=t,n=0;nthis.length&&(e=this.length);for(var r=0;r>>24]<<24|this.SBOX[n>>>16&255]<<16|this.SBOX[n>>>8&255]<<8|this.SBOX[255&n]):(n=n<<8|n>>>24,n=this.SBOX[n>>>24]<<24|this.SBOX[n>>>16&255]<<16|this.SBOX[n>>>8&255]<<8|this.SBOX[255&n],n^=this.RCON[r/e|0]<<24),this.keySchedule[r]=this.keySchedule[r-e]^n)}this.invKeySchedule=[];for(var i=0;i>>24]]^this.INV_SUB_MIX_1[this.SBOX[n>>>16&255]]^this.INV_SUB_MIX_2[this.SBOX[n>>>8&255]]^this.INV_SUB_MIX_3[this.SBOX[255&n]]}},r.prototype.process=function(){var e=this.data.sigBytes/this.blockSize*4,e,t=(e=Math.ceil(e))*this.blockSize,e=Math.min(4*t,this.data.sigBytes),r;if(t){for(var n=0;n>>2];e.sigBytes-=t},r.prototype.encryptBlock=function(e,t){this.doCryptBlock(e,t,this.keySchedule,this.SUB_MIX_0,this.SUB_MIX_1,this.SUB_MIX_2,this.SUB_MIX_3,this.SBOX)},r.prototype.decryptBlock=function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this.doCryptBlock(e,t,this.invKeySchedule,this.INV_SUB_MIX_0,this.INV_SUB_MIX_1,this.INV_SUB_MIX_2,this.INV_SUB_MIX_3,this.INV_SBOX),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},r.prototype.doCryptBlock=function(e,t,r,n,i,a,o,s){for(var u=e[t]^r[0],l=e[t+1]^r[1],m=e[t+2]^r[2],y=e[t+3]^r[3],d=4,h=1;h>>24]^i[l>>>16&255]^a[m>>>8&255]^o[255&y]^r[d++],f=n[l>>>24]^i[m>>>16&255]^a[y>>>8&255]^o[255&u]^r[d++],p=n[m>>>24]^i[y>>>16&255]^a[u>>>8&255]^o[255&l]^r[d++],M=n[y>>>24]^i[u>>>16&255]^a[l>>>8&255]^o[255&m]^r[d++],u=c,l=f,m=p,y=M;var b=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[m>>>8&255]<<8|s[255&y])^r[d++],g=(s[l>>>24]<<24|s[m>>>16&255]<<16|s[y>>>8&255]<<8|s[255&u])^r[d++],v=(s[m>>>24]<<24|s[y>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[d++],s=(s[y>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&m])^r[d++];e[t]=b,e[t+1]=g,e[t+2]=v,e[t+3]=s},r.encrypt=function(e,t){return(new r).encrypt(o.parse(e),o.parse(t)).toString()},r.prototype.encrypt=function(e,t){this.key=t,this.data=new u,this.nDataBytes=0,this.doReset();var t=i.parse("0000000000000000"),r;return this.iv=t&&t.words,this.data.concat(e),this.nDataBytes+=e.sigBytes,this.pkcs7pad(this.data),this.process()},r.decrypt=function(e,t){return(new r).decrypt(o.parse(e),o.parse(t)).toString()},r.prototype.decrypt=function(e,t){this.key=t,this.data=new u,this.nDataBytes=0,this.doReset();var t=i.parse("0000000000000000");this.iv=t&&t.words,this.data.concat(e),this.nDataBytes+=e.sigBytes;var e=this.process();return this.pkcs7Unpad(e),e},r);function r(){this.blockSize=128/32,this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX_0=[],this.SUB_MIX_1=[],this.SUB_MIX_2=[],this.SUB_MIX_3=[],this.INV_SUB_MIX_0=[],this.INV_SUB_MIX_1=[],this.INV_SUB_MIX_2=[],this.INV_SUB_MIX_3=[],this.RCON=[0,1,2,4,8,16,32,64,128,27,54];for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=0,n=0,t=0;t<256;t++){var i,i=(i=n^n<<1^n<<2^n<<3^n<<4)>>>8^255&i^99;this.SBOX[r]=i;var a=e[this.INV_SBOX[i]=r],o=e[a],s=e[o],u=257*e[i]^16843008*i;this.SUB_MIX_0[r]=u<<24|u>>>8,this.SUB_MIX_1[r]=u<<16|u>>>16,this.SUB_MIX_2[r]=u<<8|u>>>24,this.SUB_MIX_3[r]=u,u=16843009*s^65537*o^257*a^16843008*r,this.INV_SUB_MIX_0[i]=u<<24|u>>>8,this.INV_SUB_MIX_1[i]=u<<16|u>>>16,this.INV_SUB_MIX_2[i]=u<<8|u>>>24,this.INV_SUB_MIX_3[i]=u,r?(r=a^e[e[e[s^a]]],n^=e[e[n]]):r=n=1}}e.AES=t;var u=(n.prototype.toString=function(){for(var e=[],t=0;t>>2]>>>24-t%4*8&255;e.push(String.fromCharCode(r))}return e.join("").stimulsoft.fromUnicodeString()},n.prototype.concat=function(e){var t;if(this.clamp(),this.sigBytes%4)for(var r=0;r>>2]>>>24-r%4*8&255;this.words[this.sigBytes+r>>>2]|=n<<24-(this.sigBytes+r)%4*8}else if(65535>>2]=e.words[r>>>2];else(t=this.words.push).call.apply(t,__spread([this.words],e.words));return this.sigBytes+=e.sigBytes,this},n.prototype.clamp=function(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)},n);function n(e,t){void 0===e&&(e=null),void 0===t&&(t=null),e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length}var i=(a.parse=function(e){for(var t=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u(t,e.length/2)},a);function a(){}var o=(l.parse=function(e){var t=e.length,r=l.map.charAt(64),r;!r||-1!=(r=e.indexOf(r))&&(t=r);for(var n=[],i=0,a=0,o,s;a>>6-a%4*2,n[i>>>2]|=(o|s)<<24-i%4*8,i++)}return new u(n,i)},l.map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l);function l(){}}(r=e.Crypt||(e.Crypt={}))}(Stimulsoft=Stimulsoft||{}),function(e){var t,e,r;e=t=e.System||(e.System={}),function(e){var r=(M.staticConstructor=function(){for(var e="0".charCodeAt(0),t=0;t<=9;++t)M.BI_RC[e++]=t;e="a".charCodeAt(0);for(var t=10;t<36;++t)M.BI_RC[e++]=t;e="A".charCodeAt(0);for(var t=10;t<36;++t)M.BI_RC[e++]=t},M.fromInt=function(e){var t=new M;return t.fromInt(e),t},Object.defineProperty(M.prototype,"DV",{get:function(){return 1<>14;while(0<=--a){var u=16383&this[e],l=this[e++]>>14,m=s*u+l*o,u;i=((u=o*u+((16383&m)<<14)+r[n]+i)>>28)+(m>>14)+s*l,r[n++]=268435455&u}return i},M.int2char=function(e){return(new M).int2char(e)},M.prototype.int2char=function(e){return M.BI_RM.charAt(e)},M.prototype.intAt=function(e,t){var t=M.BI_RC[e.charCodeAt(t)];return null==t?-1:t},M.prototype.copyTo=function(e){for(var t=this.t-1;0<=t;--t)e[t]=this[t];e.t=this.t,e.s=this.s},M.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,0this.DB?(this[this.t-1]|=(o&(1<>this.DB-a):this[this.t-1]|=o<=this.DB&&(a-=this.DB)}8==r&&0!=(128&Number(e[0]))&&(this.s=-1,0>s)&&(i=!0,a=this.int2char(n));while(0<=o)s>(s+=this.DB-t)):(n=this[o]>>(s-=t)&r,s<=0&&(s+=this.DB,--o)),0>>16)&&(e=r,t+=16),0!=(r=e>>8)&&(e=r,t+=8),0!=(r=e>>4)&&(e=r,t+=4),0!=(r=e>>2)&&(e=r,t+=2),0!=(r=e>>1)&&(e=r,t+=1),t},M.prototype.bitLength=function(){if(this.t<=0)return 0;return this.DB*(this.t-1)+this.nbits(this[this.t-1]^this.s&this.DM)},M.prototype.dlShiftTo=function(e,t){for(var r=this.t-1;0<=r;--r)t[r+e]=this[r];for(var r=e-1;0<=r;--r)t[r]=0;t.t=this.t+e,t.s=this.s},M.prototype.drShiftTo=function(e,t){for(var r=e;r>n|o,o=(this[s]&i)<=this.t)return void(t.t=0);var n=e%this.DB,i=this.DB-n,a=(1<>n;for(var o=r+1;o>n;0>=this.DB;if(e.t>=this.DB;n+=this.s}else{n+=this.s;while(r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:0=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}0>this.F2:0),m=this.FV/i,y=(1<>24},M.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},M.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},M.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},M.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||36=r&&(this.multiply2(n),this.addOffset2(o,0),o=a=0)}0e&&this.subTo(M.ONE.shiftLeft(e-1),this)}},M.prototype.fromNumber2=function(e,t){var r=[],n=7&e;r.length=(e>>3)+1,t.nextBytes(r),0>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(0>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t},M.prototype.getLowestSetBit=function(){for(var e=0;e=this.t)return 0!=this.s;return 0!=(this[t]&1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{n+=this.s;while(r>=this.DB;n+=e.s}t.s=n<0?-1:0,0=this.DV)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]},M.prototype.multiplyLowerTo=function(e,t,r){var n=Math.min(this.t+e.t,t);r.s=0,r.t=n;while(0>r-u&l:(d=(e[y]&(1<>this.DB+r-u)),s=n;while(0==(1&d))d>>=1,--s;if((r-=s)<0&&(r+=this.DB,--y),h)o[d].copyTo(i),h=!1;else{while(1>1)>M.lowprimes.length&&(e=M.lowprimes.length);for(var i=new M,a=0;a2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=new r;return e.copyTo(t),this.reduce(t),t},i.prototype.revert=function(e){return e},i.prototype.reduce=function(e){e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(e.compareTo(this.r2)<0)e.addOffset2(1,this.m.t+1);e.subTo(this.r2,e);while(0<=e.compareTo(this.m))e.subTo(this.m,e)},i.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},i.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},i),n;function i(e){var t=n.call(this,e)||this;return t.r2=new r,t.q3=new r,t.r2=new r,t.q3=new r,r.ONE.dlShiftTo(2*e.t,t.r2),t.mu=t.r2.divide(e),t}var g=(__extends(o,a=p),o.prototype.convert=function(e){var t=new r;return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&0>15)*this.mpl&this.um)<<15)&e.DM,r;e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);while(e[r]>=e.DV)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),0<=e.compareTo(this.m)&&e.subTo(this.m,e)},o.prototype.montSqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.montMulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},o),a;function o(e){var t=a.call(this,e)||this;return t.mp=e.invDigit(),t.mpl=32767&t.mp,t.mph=t.mp>>15,t.um=(1<>2),a=3&s,1):1==i?(n+=u.BigInteger.int2char(a<<2|s>>4),a=15&s,2):2==i?(n+=u.BigInteger.int2char(a),n+=u.BigInteger.int2char(s>>2),a=3&s,3):(n+=u.BigInteger.int2char(a<<2|s>>4),n+=u.BigInteger.int2char(15&s),0)}return 1==i&&(n+=u.BigInteger.int2char(a<<2)),n},n.prototype.parseBigInt=function(e,t){return u.BigInteger.fromString(e,t)},n.prototype.pkcs1pad2=function(e,t){if(t>6|192):(r[--t]=63&i|128,r[--t]=i>>6&63|128,r[--t]=i>>12|224)}r[--t]=0;var a=new u.SecureRandom,o=[];while(2=r.length)return null;var i="";while(++n>1;this.e=parseInt(t,16);for(var i=u.BigInteger.fromString(t,16),a;;){for(;;)if(this.p=u.BigInteger.fromNumber(e-n,1,r),0==this.p.subtract(u.BigInteger.ONE).gcd(i).compareTo(u.BigInteger.ONE)&&this.p.isProbablePrime(10))break;for(;;)if(this.q=u.BigInteger.fromNumber(n,1,r),0==this.q.subtract(u.BigInteger.ONE).gcd(i).compareTo(u.BigInteger.ONE)&&this.q.isProbablePrime(10))break;this.p.compareTo(this.q)<=0&&(a=this.p,this.p=this.q,this.q=a);var o=this.p.subtract(u.BigInteger.ONE),s=this.q.subtract(u.BigInteger.ONE),a=o.multiply(s);if(0==a.gcd(i).compareTo(u.BigInteger.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(a),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},n.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},n.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);while(t.compareTo(r)<0)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},n.prototype.encrypt=function(e){var e=this.pkcs1pad2(e,this.n.bitLength()+7>>3);if(null==e)return null;var e=this.doPublic(e);if(null==e)return null;var e=e.toString(16);return 0==(1&e.length)?e:"0"+e},n.prototype.decrypt=function(e){var e=this.parseBigInt(e,16),e=this.doPrivate(e);if(null==e)return null;return this.pkcs1unpad2(e,this.n.bitLength()+7>>3)},e=n,u.RSAKey=e}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,e;function i(){this.blockLength=64,this.state=[1732584193,4023233417,2562383102,271733878,3285377520],this.K=[1518500249,1859775393,2400959708,3395469782]}r=t=e.System||(e.System={}),e=n=r.Crypt||(r.Crypt={}),i.hex=function(e){return(new i).hex(e)},i.prototype.hex=function(e){return this.toHex(this.getMD(e))},i.prototype.getMD=function(e){var t=[],t=this.unpack(e);return t=this.paddingData(t),this.round(t)},i.prototype.rotl=function(e,t){return e<>>32-t},i.prototype.round=function(e){for(var t=[],r=[],n,i=[],a=0;a>>24&255,t[r++]=e[n]>>>16&255,t[r++]=e[n]>>>8&255,t[r++]=255&e[n];return t},i.prototype.toBigEndian32=function(e){for(var t=[],r=0,n=0;n>>8,t[r++]=255&n);return t},i.prototype.pack=function(e){var t="",r;for(r in e)t+=String.fromCharCode(e[r]);return t},i.signature="3021300906052b0e03021a05000414",r=i,e.SHA1=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,e;function k(){}r=t=e.System||(e.System={}),e=n=r.Crypt||(r.Crypt={}),k.prototype.rotate=function(e,t){return e>>>t|e<<32-t},k.prototype.sigma=function(e,t,r,n){return this.rotate(e,t)^this.rotate(e,r)^e>>>n},k.prototype.sum=function(e,t){return e[15&t]+=this.sigma(e[t+14&15],17,19,10)+e[t+9&15]+this.sigma(e[t+1&15],7,18,3)},k.prototype.aggregate=function(e,t){var r=(65535&e)+(65535&t);return(t=(e>>16)+(t>>16)+(r>>16))<<16|65535&r},k.prototype.conglomerate=function(e,t){for(var r=[],n=2;n>>16;for(s+=o>>>16,e[t+1]=s<<16|65535&o,o=s>>>16,s=0;i>>16;s+=o>>>16,e[t]=s<<16|65535&o},k.prototype.compress=function(e,t){var r=[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]],n=[],i=0;while(i<16)n[i]=t[(i<<2)+3]|t[(i<<2)+2]<<8|t[(i<<2)+1]<<16|t[i<<2]<<24,i++;for(i=0;i<64;i++)for(var a=r[0],o=r[1],s=r[2],u=r[4],l=r[7]+(this.rotate(u,6)^this.rotate(u,11)^this.rotate(u,25))+(u&r[5]^~u&r[6])+k.ROUNDS_256[i]+(i<16?n[i]:this.sum(n,i)),m=7;0<=m;m--)r[m]=4===m?this.aggregate(r[3],l):0===m?this.aggregate(l,(this.rotate(a,2)^this.rotate(a,13)^this.rotate(a,22))+(a&o^a&s^o&s)):r[m-1];for(i=0;i<8;i++)e[i]+=r[i]},k.prototype.hash=function(e,t,r){var n="",i=(t?224===r?k.HASH_512_224:256===r?k.HASH_512_256:384===r?k.HASH_384:k.HASH_512:224===r?k.HASH_224:k.HASH_256).slice(),a=e.length,o=[],s=0,u=!0,l=0,m=0,y=0,d=0,h=0,c,f;if(t){var p=[0,0,0,0,0,0,0,0],M=[24,16,8,0],b=void 0;do{for(o[0]=s,c=1;c<=32;c++)o[c]=0;if("string"==typeof e)for(c=y;l>2]|=g<>2]|=(192|g>>6)<>2]|=(224|g>>12)<>2]|=(240|g>>18)<>2]|=(128|g>>12&63)<>2]|=(128|g>>6&63)<>2]|=(128|63&g)<>2]|=e[l]<>2]|=[-2147483648,8388608,32768,128][3&c],++l),s=o[32],a>>1|v<<31)^(S>>>8|v<<24)^(S>>>7|v<<25),(N>>>19|w<<13)^(w>>>29|N<<3)^(N>>>6|w<<26),o[f-14],o[f-32],(v>>>1|S<<31)^(v>>>8|S<<24)^v>>>7,(w>>>19|N<<13)^(N>>>29|w<<3)^w>>>6)}for(b=i.slice(),p[6]=b[2]&b[4],p[7]=b[3]&b[5],c=0;c<160;c+=8)for(f=0;f<8;f+=2){var I=0>>14|b[8+I]<<18)^(b[9+I]>>>18|b[8+I]<<14)^(b[8+I]>>>9|b[9+I]<<23),b[15-f],k.ROUNDS_512[c+f],o[c+f],b[8+I]&b[2===f?8:10+I]^~b[8+I]&b[6===f?14:12-f],(b[8+I]>>>14|b[9+I]<<18)^(b[8+I]>>>18|b[9+I]<<14)^(b[9+I]>>>9|b[8+I]<<23),b[14-f]),this.conglomerate(j,2,(p[f+1]=b[1+I]&b[2===f?1:3+I])^b[1+I]&b[(6===f?f:4-f)+1]^p[7-I],(b[1+I]>>>28|b[I]<<4)^(b[I]>>>2|b[1+I]<<30)^(b[I]>>>7|b[1+I]<<25),(p[f]=b[I]&b[2===f?0:2+I])^b[I]&b[6===f?f:4-f]^p[6-I],(b[I]>>>28|b[1+I]<<4)^(b[1+I]>>>2|b[I]<<30)^(b[1+I]>>>7|b[I]<<25)),this.conglomerate(b,14-f,b[7-f],j[1],b[6-f],j[0]),this.conglomerate(b,6-f,j[3],j[1],j[2],j[0])}for(c=0;c<16;c+=2)this.conglomerate(i,c,i[c+1],b[c+1],i[c],b[c])}while(u)}else{for(l=d>>3&63,y=63&a,(d+=a<<3)>29,c=0;c+63>3&63,o[l++]=128,c=l;c<(56>>f&255;this.compress(i,o)}if("string"==typeof e){for(c=0;c<(512===r?16:384===r?12:256===r?8:7);c++)for(f=28;0<=f;f-=4)n+=k.HEX_DIGITS.charAt(i[c]>>>f&15);return n}for(var T=[],c=0;c<(512===r?16:384===r?12:256===r?8:7);c++)for(f=24;0<=f;f-=8)T.push(i[c]>>>f&255);return T},k.prototype.SHA2_224=function(e){return this.hash(e,!1,224)},k.prototype.SHA2_256=function(e){return this.hash(e,!1,256)},k.prototype.SHA2_384=function(e){return this.hash(e,!0,384)},k.prototype.SHA2_512=function(e){return this.hash(e,!0,512)},k.prototype.SHA2_512_224=function(e){return this.hash(e,!0,224)},k.prototype.SHA2_512_256=function(e){return this.hash(e,!0,256)},k.SHA256=function(e){var t;return(new k).hash(e,!1,256)},k.HASH_224=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],k.HASH_256=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],k.HASH_384=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428],k.HASH_512=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],k.HASH_512_224=[2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561],k.HASH_512_256=[573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882],k.ROUNDS_256=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],k.ROUNDS_512=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],k.HEX_DIGITS="0123456789abcdef",r=k,e.SHA2=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,e,r;e=t=e.System||(e.System={}),function(e){var t=(r.prototype.seedInteger=function(e){this.pool[this.position++]^=255&e,this.pool[this.position++]^=e>>8&255,this.pool[this.position++]^=e>>16&255,this.pool[this.position++]^=e>>24&255,this.position>=n.poolSize&&(this.position-=n.poolSize)},r.prototype.seedTime=function(){this.seedInteger((new Date).getTime())},r.prototype.getByte=function(){if(null==this.state){for(this.seedTime(),this.state=new n,this.state.init(this.pool),this.position=0;this.position>>8,this.pool[this.position++]=255&e;this.position=0,this.seedTime()}}e.SecureRandom=t;var n=(i.prototype.init=function(e){for(var t=0;t<256;++t)this.s[t]=t;for(var r=0,t=0;t<256;++t){r=r+this.s[t]+e[t%e.length]&255;var n=this.s[t];this.s[t]=this.s[r],this.s[r]=n}this.i=0,this.j=0},i.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.s[this.i]&255,e=this.s[this.i],this.s[this.i]=this.s[this.j],this.s[this.j]=e,this.s[e+this.s[this.i]&255]},i.poolSize=256,i);function i(){this.i=0,this.j=0,this.s=[]}}(r=e.Crypt||(e.Crypt={}))}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,i,e;function a(e){this._column=e}r=t=e.System||(e.System={}),i=n=r.Data||(r.Data={}),a.createStorage=function(e,t){switch(t){case String:case r.Char:return new i.StringStorage(e);case Number:case r.SByte:case r.Byte:case r.Int:case r.Int16:case r.Int32:case r.Int64:case r.UInt16:case r.UInt32:case r.UInt64:case r.Decimal:case r.Double:case r.Single:return new i.NumberStorage(e);case Object.stimulsoft.getType():return new i.ObjectStorage(e);case Boolean:return new i.BooleanStorage(e);case r.ByteArray:return new i.ByteArrayStorage(e);case r.DateTime:return new i.DateTimeStorage(e);default:return new i.ObjectStorage(e)}},a.prototype.getValue=function(e){return this.values[e]},a.prototype.setValue=function(e,t){this.values[e]=t},a.prototype.setStorage=function(){this.values=[]},e=a,i.DataStorage=e}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,e,i;function a(){return null!==i&&i.apply(this,arguments)||this}r=t=e.System||(e.System={}),e=n=r.Data||(r.Data={}),i=e.DataStorage,__extends(a,i),a.prototype.setValue=function(e,t){this.values[e]=null!=t&&t.stimulsoft.toBoolean()},r=a,e.BooleanStorage=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,e,i;function a(){return null!==i&&i.apply(this,arguments)||this}r=t=e.System||(e.System={}),e=n=r.Data||(r.Data={}),i=e.DataStorage,__extends(a,i),r=a,e.ByteArrayStorage=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,e,i;function a(){return null!==i&&i.apply(this,arguments)||this}r=t=e.System||(e.System={}),e=n=r.Data||(r.Data={}),i=e.DataStorage,__extends(a,i),a.prototype.setValue=function(e,t){this.values[e]=null!=t?t.toString().charAt(0):""},r=a,e.CharStorage=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,e,r,n,i;function a(){}e=t=e.System||(e.System={}),(n=r=e.Data||(e.Data={})).DBNull=a}(Stimulsoft=Stimulsoft||{}),function(e){var t,e,r,n;function i(e,t,r){void 0===t&&(t=String),void 0===r&&(r=null),this._caption=null,this.columnName="",this.dataType=String,this.columnName=null==e?"":e,this.dataType=t,this._caption=r,this.insureStorage(),this.storage.setStorage()}e=t=e.System||(e.System={}),n=r=e.Data||(e.Data={}),i.prototype.clone=function(){var e=new i(this.columnName,this.dataType);return e._caption=this._caption,e.table=this.table,e},Object.defineProperty(i.prototype,"caption",{get:function(){if(null==this._caption||""==this._caption)return this.columnName;return this._caption},set:function(e){null==e&&(e=""),this._caption=e},enumerable:!1,configurable:!0}),i.prototype.getRecord=function(e){return this.storage.getValue(e)},i.prototype.setRecord=function(e,t){this.storage.setValue(e,t)},i.prototype.setTable=function(e){this.table=e},i.prototype.delete=function(){this.table.columns.remove(this)},i.prototype.insureStorage=function(){null==this.storage&&(this.storage=n.DataStorage.createStorage(this,this.dataType))},i.prototype.changeType=function(e){this.dataType=e;var t=n.DataStorage.createStorage(this,e),r;for(r in t.setStorage(),this.storage.values)t.setValue(r,this.storage.values[r]);this.storage=t},e=i,n.DataColumn=e}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,i,a;function o(e){var t=a.call(this)||this;return t.table=e,t}r=t=e.System||(e.System={}),i=n=r.Data||(r.Data={}),r=e.System.Collections.CollectionBase,__extends(o,a=r),o.prototype.baseAdd=function(e){e.setTable(this.table)},o.prototype.baseRemove=function(e){e.setTable(null)},o.prototype.add=function(e){this.list.push(e),this.baseAdd(e)},o.prototype.contains=function(e){if("string"==typeof e)return null!=this.getByName(e);return a.prototype.contains.call(this,e)},o.prototype.remove=function(e){var t=this.list.lastIndexOf(e);-1!=t&&this.list.splice(t,1),this.baseRemove(e)},o.prototype.getByName=function(e){var t,r;e=e.toLowerCase();try{for(var n=__values(this.list),i=n.next();!i.done;i=n.next()){var a=i.value;if(a.columnName.toLowerCase()==e)return a}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return null},o.prototype.getIndexByName=function(e){var e=this.getByName(e),t;return this.list.indexOf(e)},r=o,i.DataColumnCollection=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,d,r,n,e;function i(e,t){if(t){this.columns=d.StiArray.create(n.DataColumn,e.length);for(var r=0;rt.ticks)return 1*i;return 0};break}this.quickSort(r,0,this.list.length-1)}},o.prototype.gett=function(e,t){return this.getByIndex(e).gett(t)},r=o,a.DataRowCollection=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,n,e;function i(){}r=t=e.System||(e.System={}),e=n=r.Text||(r.Text={}),i.encodeName=function(e){if(null==e||0==e.length)return"";var t="",r=/_[Xx]([0-9a-fA-F]{4})_/g,n=0,i=0,a=r.exec(e);while(a)t+=e.substring(i,a.index),t+="_x005F_x",i=a.index+2,a=r.exec(e);for(e=t+=e.substring(i,e.length),t="",48<=e.charCodeAt(0)&&e.charCodeAt(0)<=57&&(t+="_",t+=this.toHex(e.charCodeAt(0)),t+="_",n++);nthis.columns.length)throw new Error("The array is larger than the number of columns in the table.");for(var r=this.addNewRow(),n=0;n(null==h?void 0:h.ticks)||"GreaterThanOrEqualToDate"==d&&(null==f?void 0:f.ticks)>=(null==h?void 0:h.ticks)||"LessThanOrEqualToDate"==d&&(null==f?void 0:f.ticks)<=(null==h?void 0:h.ticks)||"LessThanDate"==d&&(null==f?void 0:f.ticks)<(null==h?void 0:h.ticks))&&(l=!0)}catch(e){}m++}a=l,s++}a&&n.loadDataRow(o.itemArray)}if(!S.StiString.isNullOrEmpty(this.sort)){var p=this.sort.split(",");try{for(var M=__values(this.sort.split(",")),b=M.next();!b.done;b=M.next()){var g=b.value,v=this.sort.split(" ");n.rows.sort(v[0].trim(),"asc"==v[1].trim().toLowerCase())}}catch(e){t={error:e}}finally{try{b&&!b.done&&(r=M.return)&&r.call(M)}finally{if(t)throw t.error}}}return n},i.prototype.parseConditions=function(e){this.ands=[];for(var t=0;t"?(a["operator"]="NotEqualTo",a["value1"]=i.substr(3)):i[0]+i[1]==">="?(a["operator"]="GreaterThanOrEqualTo",a["value1"]=i.substr(3)):i[0]+i[1]=="<="?(a["operator"]="LessThanOrEqualTo",a["value1"]=i.substr(3)):">"==i[0]?(a["operator"]="GreaterThan",a["value1"]=i.substr(2)):"<"==i[0]?(a["operator"]="LessThan",a["value1"]=i.substr(2)):0==i.indexOf("LIKE '*")&&i.lastIndexOf("*'")==i.length-2?(a["operator"]="Containing",a["value1"]=i.substr(7,i.lastIndexOf("'")-8)):0==i.indexOf("LIKE '")&&i.lastIndexOf("*'")==i.length-2?(a["operator"]="BeginningWith",a["value1"]=i.substr(6,i.lastIndexOf("'")-7)):0==i.indexOf("LIKE '*")&&i.lastIndexOf("'")==i.length-1?(a["operator"]="EndingWith",a["value1"]=i.substr(7,i.lastIndexOf("'")-7)):0==i.indexOf("IS NULL")?a["operator"]="IsNull":0==i.indexOf("IS NOT NULL")&&(a["operator"]="IsNotNull")):0==i.indexOf("Convert([")?(a["operator"]="EqualTo",a["field"]=i.substr(9,i.indexOf("]")-9),i=i.substr(i.indexOf("LIKE '")+6),a["value1"]=i.substr(0,i.length-2)):0==i.indexOf("NOT (Convert([")?(a["operator"]="NotEqualTo",a["field"]=i.substr(14,i.indexOf("]")-14),i=i.substr(i.indexOf("LIKE '")+6),a["value1"]=i.substr(0,i.length-3)):0==i.indexOf("NOT ([")?(a["operator"]="NotContaining",a["field"]=i.substr(6,i.indexOf("]")-6),i=i.substr(i.indexOf("LIKE '*")+7),a["value1"]=i.substr(0,i.length-3)):0==i.indexOf("TRIM([")&&i.indexOf(") = ''")==i.length-6?(a["operator"]="IsBlank",a["field"]=i.substr(6,i.indexOf("]")-6)):0==i.indexOf("TRIM([")&&i.indexOf(") <> ''")==i.length-7&&(a["operator"]="IsNotBlank",a["field"]=i.substr(6,i.indexOf("]")-6)),a["operator"]&&(null!=(i=a["value1"])&&(2c.maxMilliSeconds)return c.maxMilliSeconds;if(e"==String.fromCharCode(e[a])&&(1E)if(F[A]!=F[A-1])while(A<_.length&&B.Char.isWhitespace(T,A)&&"\t"!=T.charAt(A))A++;else while(0").join(">").split("\n").join("
"):e.split("\n").join("")).split("\r").join(""),h=new L.Size(p.scrollWidth/i*M,p.scrollHeight/i*M),n&&1y&&(h.width=y),p.style.height="0px",p.style.width="0px",p.style.display="none",p.style.overflow="hidden",p.innerHTML="")}return n&&((d=R.measureHash[l])||(d={},R.measureHash[l]=d),d[e]=h),this.rotate(h,a,n)},R.isWordWrapSymbol=function(e,t){var r=e.charCodeAt(t),n=e.charAt(t);if(12288<=r&&r<=55215||B.Char.isWhitespace(e,t)&&160!=r||"("==n||"{"==n)return!0;if(0e.left&&(this.width+=this.left-e.left,this.x=e.left),this.top>e.top&&(this.height+=this.top-e.top,this.y=e.top),this.rightthis.length)return n-t;e[n]=this._buffer[this._position++]}return r},a.prototype.seek=function(e,t){if(a.memStreamMaxLengthg&&0this.surLowEnd||t.charCodeAt(0)/g,">").replace(/"/g,""").replace(/'/g,"'"))},o.prototype.writeRawWithSurrogateChecking=function(e){if(null==e)return;this.cacheAttrValue&&this.attrValue.append(e);var t=e.length,r=0,n=0;this.textWriter.write(e)},o.prototype.writeStringFragment=function(e,t,r,n){var i=n.length;while(0"));var t=this.stack[this.top].prevNsTop;this.useNsHashtable&&tthis.stack[this.top].prevNsTop;t--)this.nsStack[t].declared||(this.textWriter.write(" xmlns"),this.textWriter.write(":"),this.textWriter.write(this.nsStack[t].prefix),this.textWriter.write("="),this.textWriter.write(this.quoteChar),this.xmlEncoder.write(this.nsStack[t].ns),this.textWriter.write(this.quoteChar));this.stack[this.top].defaultNs!=this.stack[this.top-1].defaultNs&&this.stack[this.top].defaultNsState==a.DeclaredButNotWrittenOut&&(this.textWriter.write(" xmlns"),this.textWriter.write("="),this.textWriter.write(this.quoteChar),this.xmlEncoder.write(this.stack[this.top].defaultNs),this.textWriter.write(this.quoteChar),this.stack[this.top].defaultNsState=a.DeclaredAndWrittenOut),this.xmlEncoder.endAttribute(),e&&this.textWriter.write(" /"),this.textWriter.write(">")},c.prototype.writeEndAttributeQuote=function(){this.specialAttr!=m.None&&this.handleSpecialAttribute(),this.xmlEncoder.endAttribute(),this.textWriter.write(this.curQuoteChar)},c.prototype.indent=function(e){if(0==this.top)this.textWriter.writeLine();else if(!this.stack[this.top].mixed){this.textWriter.writeLine();var t=e?this.top-1:this.top;for(t*=this.indentation;0this.stack[this.top].prevNsTop&&(this.nsStack[n].declared=!0),this.addNamespace(e,t,r))}},c.prototype.addNamespace=function(e,t,r){var n=++this.nsTop,i;if(n==this.nsStack.length&&(i=p.StiArray.create(l,2*n,!0),p.StiArray.copy(this.nsStack,0,i,n),this.nsStack=i),this.nsStack[n].set(e,t,r),this.useNsHashtable)this.addToNamespaceHashtable(n);else if(n==this.maxNamespacesWalkCount){this.nsHashtable=new s;for(var a=0;a<=n;a++)this.addToNamespaceHashtable(a);this.useNsHashtable=!0}},c.prototype.addToNamespaceHashtable=function(e){var t=this.nsStack[e].prefix,r=this.nsHashtable.get(t);null!=r&&(this.nsStack[e].prevNsIndex=r),this.nsHashtable.set(t,e)},c.prototype.popNamespaces=function(e,t){for(var r=t;e<=r;r--)-1==this.nsStack[r].prevNsIndex?this.nsHashtable.remove(this.nsStack[r].prefix):this.nsHashtable.set(this.nsStack[r].prefix,this.nsStack[r].prevNsIndex)},c.prototype.generatePrefix=function(){var e=this.stack[this.top].prefixCount+++1;return"d"+this.top.toString()+"p"+e.toString()},c.prototype.internalWriteProcessingInstruction=function(e,t){this.textWriter.write(""),this.validateName(e,!1),this.textWriter.write(e),this.textWriter.write(" "),null!=t&&this.xmlEncoder.writeRawWithSurrogateChecking(t),this.textWriter.write("?>")},c.prototype.lookupNamespace=function(e){if(this.useNsHashtable){var t=this.nsHashtable.get(e);if(null!=t)return t}else for(var r=this.nsTop;0<=r;r--)if(this.nsStack[r].prefix==e)return r;return-1},c.prototype.lookupNamespaceInCurrentScope=function(e){if(this.useNsHashtable){var t=this.nsHashtable.get(e);if(null!=t&&t>this.stack[this.top].prevNsTop)return t}else for(var r=this.nsTop;r>this.stack[this.top].prevNsTop;r--)if(this.nsStack[r].prefix==e)return r;return-1},c.prototype.findPrefix=function(e){for(var t=this.nsTop;0<=t;t--)if(this.nsStack[t].ns==e&&this.lookupNamespace(this.nsStack[t].prefix)==t)return this.nsStack[t].prefix;return null},c.prototype.internalWriteName=function(e,t){this.validateName(e,t),this.textWriter.write(e)},c.prototype.validateName=function(e,t){null==e||e.length;var r=e.length,n=0,i=-1;if(this.namespaces){if(0!=(this.xmlCharType.charProperties[e.charCodeAt(n)]&o.XmlCharType.fNCStartName)){var a=!0;while(a){n++;while(n>2,o=(3&r)<<4|(n=e.charCodeAt(u++))>>4,s=(15&n)<<2|(i=e.charCodeAt(u++))>>6,r=63&i,isNaN(n)?s=r=64:isNaN(i)&&(r=64),t=t+l.keyStr.charAt(a)+l.keyStr.charAt(o)+l.keyStr.charAt(s)+l.keyStr.charAt(r);return t},l.decode=function(e){var t="",r,n,i,a,i,o,s,u=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(u>4,n=(15&i)<<4|(o=this.keyStr.indexOf(e.charAt(u++)))>>2,i=(3&o)<<6|(s=this.keyStr.indexOf(e.charAt(u++))),t+=String.fromCharCode(r),64!=o&&(t+=String.fromCharCode(n)),64!=s&&(t+=String.fromCharCode(i));return t=l.utf8_decode(t)},l.utf8_encode=function(e){var t="";e=e.replace(/\r\n/g,"\n");for(var r=0;r>6|192):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128)),t+=String.fromCharCode(63&n|128))}return t},l.utf8_decode=function(e){var t="",r=0,n,i,a,o=0;while(r=e},o),a;function o(e,t){var r=a.call(this)||this;return r.from="A",r.to="Z",null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.CharRange=i;var s=(__extends(l,u=t),Object.defineProperty(l.prototype,"rangeName",{get:function(){return"DateTimeRange"},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"rangeType",{get:function(){return R.System.DateTime},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"fromObject",{get:function(){return this.from},set:function(e){e instanceof R.System.DateTime&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"toObject",{get:function(){return this.to},set:function(e){e instanceof R.System.DateTime&&(this.to=e)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"fromDate",{get:function(){if(null==this.from)return R.System.DateTime.minValue;return this.from},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"toDate",{get:function(){if(null==this.to)return R.System.DateTime.maxValue;return this.to},enumerable:!1,configurable:!0}),l.prototype.contains=function(e){if(null==this.from&&null==this.to)return!0;if(null==e)return!1;if(null==this.from&&null!=this.to)return this.to>=e;if(null!=this.from&&null==this.to)return this.from<=e;return this.from<=e&&this.to>=e},l.prototype.toString=function(){var e=null!=this.from?r.format("{0:d}",this.from):"-",t=null!=this.to?r.format("{0:d}",this.to):"-";return r.format("{0} {1} {2} {3}",this.fromStrLoc,e,this.toStrLoc.toLowerCase(),t)},l),u;function l(e,t){var r=u.call(this)||this;return r.from=null,(r.to=null)!=e&&(r.from=e),null!=t&&(r.to=t),r}e.DateTimeRange=s;var m=(__extends(d,y=t),Object.defineProperty(d.prototype,"rangeName",{get:function(){return"TimeSpanRange"},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"rangeType",{get:function(){return R.System.TimeSpan},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fromObject",{get:function(){return this.from},set:function(e){e instanceof R.System.TimeSpan&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"toObject",{get:function(){return this.to},set:function(e){e instanceof R.System.TimeSpan&&(this.to=e)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"fromTime",{get:function(){if(null==this.from)return R.System.TimeSpan.minValue;return this.from},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"toTime",{get:function(){if(null==this.to)return R.System.TimeSpan.maxValue;return this.to},enumerable:!1,configurable:!0}),d.prototype.contains=function(e){if(null==this.from&&null==this.to)return!0;if(null==e)return!1;if(null==this.from&&null!=this.to)return this.to>=e;if(null!=this.from&&null==this.to)return this.from<=e;return this.from<=e&&this.to>=e},d.prototype.toString=function(){var e=null!=this.from?r.format("{0}",this.from):"-",t=null!=this.to?r.format("{0}",this.to):"-";return r.format("{0} {1} {2} {3}",this.fromStrLoc,e,this.toStrLoc.toLowerCase(),t)},d),y;function d(e,t){var r=y.call(this)||this;return r.from=null,(r.to=null)!=e&&(r.from=e),null!=t&&(r.to=t),r}e.TimeSpanRange=m;var h=(__extends(f,c=t),Object.defineProperty(f.prototype,"rangeName",{get:function(){return"DecimalRange"},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"rangeType",{get:function(){return R.System.Decimal},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"fromObject",{get:function(){return this.from},set:function(e){"number"==typeof e&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"toObject",{get:function(){return this.to},set:function(e){"number"==typeof e&&(this.to=e)},enumerable:!1,configurable:!0}),f.prototype.contains=function(e){return this.from<=e&&this.to>=e},f),c;function f(e,t){var r=c.call(this)||this;return r.from=0,r.to=0,null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.DecimalRange=h;var p=(__extends(b,M=t),Object.defineProperty(b.prototype,"rangeName",{get:function(){return"FloatRange"},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"rangeType",{get:function(){return R.System.Single},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"fromObject",{get:function(){return this.from},set:function(e){"number"==typeof e&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"toObject",{get:function(){return this.to},set:function(e){"number"==typeof e&&(this.to=e)},enumerable:!1,configurable:!0}),b.prototype.contains=function(e){return this.from<=e&&this.to>=e},b),M;function b(e,t){var r=M.call(this)||this;return r.from=0,r.to=0,null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.FloatRange=p;var g=(__extends(S,v=t),Object.defineProperty(S.prototype,"rangeName",{get:function(){return"DoubleRange"},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"rangeType",{get:function(){return R.System.Double},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"fromObject",{get:function(){return this.from},set:function(e){"number"==typeof e&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"toObject",{get:function(){return this.to},set:function(e){"number"==typeof e&&(this.to=e)},enumerable:!1,configurable:!0}),S.prototype.contains=function(e){return this.from<=e&&this.to>=e},S),v;function S(e,t){var r=v.call(this)||this;return r.from=0,r.to=0,null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.DoubleRange=g;var w=(__extends(I,N=t),Object.defineProperty(I.prototype,"rangeName",{get:function(){return"ByteRange"},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"rangeType",{get:function(){return R.System.Byte},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"fromObject",{get:function(){return this.from},set:function(e){"number"==typeof e&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"toObject",{get:function(){return this.to},set:function(e){"number"==typeof e&&(this.to=e)},enumerable:!1,configurable:!0}),I.prototype.contains=function(e){return this.from<=e&&this.to>=e},I),N;function I(e,t){var r=N.call(this)||this;return r.from=0,r.to=0,null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.ByteRange=w;var j=(__extends(k,T=t),Object.defineProperty(k.prototype,"rangeName",{get:function(){return"ShortRange"},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rangeType",{get:function(){return R.System.Int16},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"fromObject",{get:function(){return this.from},set:function(e){"number"==typeof e&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"toObject",{get:function(){return this.to},set:function(e){"number"==typeof e&&(this.to=e)},enumerable:!1,configurable:!0}),k.prototype.contains=function(e){return this.from<=e&&this.to>=e},k),T;function k(e,t){var r=T.call(this)||this;return r.from=0,r.to=0,null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.ShortRange=j;var _=(__extends(F,D=t),Object.defineProperty(F.prototype,"rangeName",{get:function(){return"IntRange"},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"rangeType",{get:function(){return R.System.Int32},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"fromObject",{get:function(){return this.from},set:function(e){"number"==typeof e&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"toObject",{get:function(){return this.to},set:function(e){"number"==typeof e&&(this.to=e)},enumerable:!1,configurable:!0}),F.prototype.contains=function(e){return this.from<=e&&this.to>=e},F),D;function F(e,t){var r=D.call(this)||this;return r.from=0,r.to=0,null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.IntRange=_;var P=(__extends(C,O=t),Object.defineProperty(C.prototype,"rangeName",{get:function(){return"LongRange"},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"rangeType",{get:function(){return R.System.Int64},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"fromObject",{get:function(){return this.from},set:function(e){"number"==typeof e&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"toObject",{get:function(){return this.to},set:function(e){"number"==typeof e&&(this.to=e)},enumerable:!1,configurable:!0}),C.prototype.contains=function(e){return this.from<=e&&this.to>=e},C),O;function C(e,t){var r=O.call(this)||this;return r.from=0,r.to=0,null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.LongRange=P;var H=(__extends(E,A=t),Object.defineProperty(E.prototype,"rangeName",{get:function(){return"GuidRange"},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"rangeType",{get:function(){return R.System.Guid},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"fromObject",{get:function(){return this.from},set:function(e){e instanceof R.System.Guid&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"toObject",{get:function(){return this.to},set:function(e){e instanceof R.System.Guid&&(this.to=e)},enumerable:!1,configurable:!0}),E.prototype.contains=function(e){return this.from.stimulsoft.compareTo(e)<=0&&0<=this.to.stimulsoft.compareTo(e)},E),A;function E(e,t){var r=A.call(this)||this;return r.from=R.System.Guid.empty,r.to=R.System.Guid.empty,null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.GuidRange=H;var x=(__extends(L,B=t),Object.defineProperty(L.prototype,"rangeName",{get:function(){return"StringRange"},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"rangeType",{get:function(){return String},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"fromObject",{get:function(){return this.from},set:function(e){"string"==typeof e&&(this.from=e)},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"toObject",{get:function(){return this.to},set:function(e){"string"==typeof e&&(this.to=e)},enumerable:!1,configurable:!0}),L.prototype.contains=function(e){if(null==this.from&&null==this.to)return!0;if(null==e)return!0;if(null==this.from&&null!=this.to)return 0<=this.to.stimulsoft.compareTo(e.toString());if(null!=this.from&&null==this.to)return this.from.stimulsoft.compareTo(e.toString())<=0;return this.from.stimulsoft.compareTo(e.toString())<=0&&0<=this.to.stimulsoft.compareTo(e.toString())},L),B;function L(e,t){var r=B.call(this)||this;return r.from="",r.to="",null!=e&&(r.from=e),null!=t&&(r.to=t),r}e.StringRange=x}(e=R.Report||(R.Report={}))}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,e;function n(){this.resource=[{name:"DHSBigSeparator",value:"dirhams",comment:"Separator for big numbers"},{name:"DHSCentGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"DHSCentPlural",value:"centimes"},{name:"DHSCentSingle",value:"centime"},{name:"DHSGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"DHSPlural",value:"dirhams"},{name:"DHSSingle",value:"dirham"},{name:"EURBigSeparator",value:"euros",comment:"Separator for big numbers"},{name:"EURCentGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"EURCentPlural",value:"cents"},{name:"EURCentSingle",value:"cent"},{name:"EURGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"EURPlural",value:"euros"},{name:"EURSingle",value:"euro"},{name:"GBPBigSeparator",value:"pounds",comment:"Separator for big numbers"},{name:"GBPCentGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"GBPCentPlural",value:"pence"},{name:"GBPCentSingle",value:"penny"},{name:"GBPGender",value:"2",comment:"0 : neutral - 1 : male - 2 : female"},{name:"GBPPlural",value:"pounds"},{name:"GBPSingle",value:"pound"},{name:"MXNBigSeparator",value:"pesos",comment:"Separator for big numbers"},{name:"MXNCentGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"MXNCentPlural",value:"centavos"},{name:"MXNCentSingle",value:"centavo"},{name:"MXNGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"MXNPlural",value:"pesos"},{name:"MXNSingle",value:"peso"},{name:"TooLongError",value:"the number is too big"},{name:"USDBigSeparator",value:"dollars\tSeparator for big numbers"},{name:"USDCentGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"USDCentPlural",value:"cents"},{name:"USDCentSingle",value:"cent"},{name:"USDGender",value:"1",comment:"0 : neutral - 1 : male - 2 : female"},{name:"USDPlural",value:"dollars"},{name:"USDSingle",value:"dollar"}]}r=t=e.System||(e.System={}),n.prototype.getString=function(e,t){var r,n;try{for(var i=__values(this.resource),a=i.next();!a.done;a=i.next()){var o=a.value;if(o.name==e)return o.value}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return""},e=n,r.ResourceManager=e}(Stimulsoft=Stimulsoft||{}),function(n){var e,t,r;function i(){}t=e=n.System||(n.System={}),i.showError=function(e,t){void 0===t&&(t=!0);var r=e;null!=e&&null!=e["message"]&&(r=e.message),t&&this.lastErrorMessage!=r&&i.errorMessageForm&&(i.errorMessageForm.show(r,!1),this.lastErrorMessage=r),n.System.NodeJs.consoleLog&&console.log(r)},i.lastErrorMessage="",r=i,t.StiError=r}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,e;function n(){this._timeout=-1,this._callTry=!1,this._callCatch=!1,this._callFinaly=!1,this._callTimeout=!0,this.assignFunction=!1,this._catchFunctions=[],this.nextPromises=[],this._startTime=Date.now(),this._tryFunctions=[]}r=t=e.System||(e.System={}),n.prototype.try=function(e,t){return void 0===t&&(t=null),null!=t&&(this._this=t),this.assignFunction=!0,this._tryFunctions.push(e),this._callTry&&this.callTry(this.returnValue),this},n.prototype.catch=function(e,t){return void 0===t&&(t=null),null!=t&&(this._this=t),this.assignFunction=!0,this._catchFunctions.push(e),this._callCatch&&this.callCatch(this._catchArgument),this},n.prototype.finally=function(e,t){return void 0===t&&(t=null),null!=t&&(this._this=t),this._finallyFunction=e,this._callFinaly&&this.callFinally(this._finalyArgument),this},n.prototype.this=function(e){return this._this=e,this},n.prototype.timeout=function(e){var t=this;return this._callTimeout&&(this._timeout=e,this.timeoutHanderId=setTimeout(function(){t.callCatch("Timeout response from the server.")},this._timeout)),this},n.prototype.callTry=function(e){var t,r;if(void 0===e&&(e=null),this.returnValue=e,0this._timeout)throw new Error("")},n.prototype.abort=function(e){var t,r;if(void 0===e&&(e=null),null!=e)e.nextPromises.push(this);else{try{for(var n=__values(this.nextPromises),i=n.next(),a;!i.done;i=n.next()){i.value.abort()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}null!=this.abortFunction&&this.abortFunction(),clearTimeout(this.timeoutHanderId)}return this},n.prototype.onAbort=function(e){this.abortFunction=e},e=n,r.StiPromise=e}(Stimulsoft=Stimulsoft||{}),function(e){var t,e,r;e=t=e.System||(e.System={}),(e=r=e.StringComparison||(e.StringComparison={}))[e["CurrentCulture"]=0]="CurrentCulture",e[e["CurrentCultureIgnoreCase"]=1]="CurrentCultureIgnoreCase",e[e["InvariantCulture"]=2]="InvariantCulture",e[e["InvariantCultureIgnoreCase"]=3]="InvariantCultureIgnoreCase",e[e["Ordinal"]=4]="Ordinal",e[e["OrdinalIgnoreCase"]=5]="OrdinalIgnoreCase"}(Stimulsoft=Stimulsoft||{}),function(e){var t,r,e;function n(e){void 0===e&&(e="#"),this.numberSymbol=e,this.isValid=!0}r=t=e.System||(e.System={}),n.prototype.formatValue=function(e,t){for(var r="",n=0,i=e.length,a=0,o;a=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__extends=this&&this.__extends||function(){var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};return function(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),o,n=[],a;try{while((void 0===t||0;Database=