@guihz/trading-vue-editor-tes 0.0.119 → 0.0.120

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,13 +25,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
25
25
  * Jan Hruby jhruby.web@gmail.com
26
26
  */return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function a(p){if((p>>24&255)===255){var E=p>>16&255,b=p>>8&255,T=p&255;E===255?(E=0,b===255?(b=0,T===255?T=0:++T):++b):++E,p=0,p+=E<<16,p+=b<<8,p+=T}else p+=1<<24;return p}function c(p){return(p[0]=a(p[0]))===0&&(p[1]=a(p[1])),p}var f=r.Encryptor=r.extend({processBlock:function(p,E){var b=this._cipher,T=b.blockSize,x=this._iv,w=this._counter;x&&(w=this._counter=x.slice(0),this._iv=void 0),c(w);var F=w.slice(0);b.encryptBlock(F,0);for(var R=0;R<T;R++)p[E+R]^=F[R]}});return r.Decryptor=f,r}(),n.mode.CTRGladman})}(ef)),ef.exports}var tf={exports:{}},Yp;function Ry(){return Yp||(Yp=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),Xn())})(Tt,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),a=r.Encryptor=r.extend({processBlock:function(c,f){var p=this._cipher,E=p.blockSize,b=this._iv,T=this._keystream;b&&(T=this._keystream=b.slice(0),this._iv=void 0),p.encryptBlock(T,0);for(var x=0;x<E;x++)c[f+x]^=T[x]}});return r.Decryptor=a,r}(),n.mode.OFB})}(tf)),tf.exports}var nf={exports:{}},Zp;function Fy(){return Zp||(Zp=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),Xn())})(Tt,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(a,c){this._cipher.encryptBlock(a,c)}}),r.Decryptor=r.extend({processBlock:function(a,c){this._cipher.decryptBlock(a,c)}}),r}(),n.mode.ECB})}(nf)),nf.exports}var rf={exports:{}},Qp;function Ny(){return Qp||(Qp=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),Xn())})(Tt,function(n){return n.pad.AnsiX923={pad:function(r,a){var c=r.sigBytes,f=a*4,p=f-c%f,E=c+p-1;r.clamp(),r.words[E>>>2]|=p<<24-E%4*8,r.sigBytes+=p},unpad:function(r){var a=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=a}},n.pad.Ansix923})}(rf)),rf.exports}var of={exports:{}},Jp;function Iy(){return Jp||(Jp=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),Xn())})(Tt,function(n){return n.pad.Iso10126={pad:function(r,a){var c=a*4,f=c-r.sigBytes%c;r.concat(n.lib.WordArray.random(f-1)).concat(n.lib.WordArray.create([f<<24],1))},unpad:function(r){var a=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=a}},n.pad.Iso10126})}(of)),of.exports}var af={exports:{}},ed;function Py(){return ed||(ed=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),Xn())})(Tt,function(n){return n.pad.Iso97971={pad:function(r,a){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,a)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(af)),af.exports}var sf={exports:{}},td;function By(){return td||(td=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),Xn())})(Tt,function(n){return n.pad.ZeroPadding={pad:function(r,a){var c=a*4;r.clamp(),r.sigBytes+=c-(r.sigBytes%c||c)},unpad:function(r){for(var a=r.words,c=r.sigBytes-1,c=r.sigBytes-1;c>=0;c--)if(a[c>>>2]>>>24-c%4*8&255){r.sigBytes=c+1;break}}},n.pad.ZeroPadding})}(sf)),sf.exports}var uf={exports:{}},nd;function Ly(){return nd||(nd=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),Xn())})(Tt,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(uf)),uf.exports}var cf={exports:{}},rd;function My(){return rd||(rd=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),Xn())})(Tt,function(n){return function(r){var a=n,c=a.lib,f=c.CipherParams,p=a.enc,E=p.Hex,b=a.format;b.Hex={stringify:function(T){return T.ciphertext.toString(E)},parse:function(T){var x=E.parse(T);return f.create({ciphertext:x})}}}(),n.format.Hex})}(cf)),cf.exports}var lf={exports:{}},id;function Uy(){return id||(id=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),xo(),So(),uo(),Xn())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.BlockCipher,f=r.algo,p=[],E=[],b=[],T=[],x=[],w=[],F=[],R=[],v=[],d=[];(function(){for(var O=[],D=0;D<256;D++)D<128?O[D]=D<<1:O[D]=D<<1^283;for(var P=0,L=0,D=0;D<256;D++){var H=L^L<<1^L<<2^L<<3^L<<4;H=H>>>8^H&255^99,p[P]=H,E[H]=P;var M=O[P],G=O[M],N=O[G],K=O[H]*257^H*16843008;b[P]=K<<24|K>>>8,T[P]=K<<16|K>>>16,x[P]=K<<8|K>>>24,w[P]=K;var K=N*16843009^G*65537^M*257^P*16843008;F[H]=K<<24|K>>>8,R[H]=K<<16|K>>>16,v[H]=K<<8|K>>>24,d[H]=K,P?(P=M^O[O[O[N^M]]],L^=O[O[L]]):P=L=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],A=f.AES=c.extend({_doReset:function(){var O;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var D=this._keyPriorReset=this._key,P=D.words,L=D.sigBytes/4,H=this._nRounds=L+6,M=(H+1)*4,G=this._keySchedule=[],N=0;N<M;N++)N<L?G[N]=P[N]:(O=G[N-1],N%L?L>6&&N%L==4&&(O=p[O>>>24]<<24|p[O>>>16&255]<<16|p[O>>>8&255]<<8|p[O&255]):(O=O<<8|O>>>24,O=p[O>>>24]<<24|p[O>>>16&255]<<16|p[O>>>8&255]<<8|p[O&255],O^=g[N/L|0]<<24),G[N]=G[N-L]^O);for(var K=this._invKeySchedule=[],Y=0;Y<M;Y++){var N=M-Y;if(Y%4)var O=G[N];else var O=G[N-4];Y<4||N<=4?K[Y]=O:K[Y]=F[p[O>>>24]]^R[p[O>>>16&255]]^v[p[O>>>8&255]]^d[p[O&255]]}}},encryptBlock:function(O,D){this._doCryptBlock(O,D,this._keySchedule,b,T,x,w,p)},decryptBlock:function(O,D){var P=O[D+1];O[D+1]=O[D+3],O[D+3]=P,this._doCryptBlock(O,D,this._invKeySchedule,F,R,v,d,E);var P=O[D+1];O[D+1]=O[D+3],O[D+3]=P},_doCryptBlock:function(O,D,P,L,H,M,G,N){for(var K=this._nRounds,Y=O[D]^P[0],ne=O[D+1]^P[1],se=O[D+2]^P[2],re=O[D+3]^P[3],ue=4,ce=1;ce<K;ce++){var Ee=L[Y>>>24]^H[ne>>>16&255]^M[se>>>8&255]^G[re&255]^P[ue++],Te=L[ne>>>24]^H[se>>>16&255]^M[re>>>8&255]^G[Y&255]^P[ue++],_e=L[se>>>24]^H[re>>>16&255]^M[Y>>>8&255]^G[ne&255]^P[ue++],oe=L[re>>>24]^H[Y>>>16&255]^M[ne>>>8&255]^G[se&255]^P[ue++];Y=Ee,ne=Te,se=_e,re=oe}var Ee=(N[Y>>>24]<<24|N[ne>>>16&255]<<16|N[se>>>8&255]<<8|N[re&255])^P[ue++],Te=(N[ne>>>24]<<24|N[se>>>16&255]<<16|N[re>>>8&255]<<8|N[Y&255])^P[ue++],_e=(N[se>>>24]<<24|N[re>>>16&255]<<16|N[Y>>>8&255]<<8|N[ne&255])^P[ue++],oe=(N[re>>>24]<<24|N[Y>>>16&255]<<16|N[ne>>>8&255]<<8|N[se&255])^P[ue++];O[D]=Ee,O[D+1]=Te,O[D+2]=_e,O[D+3]=oe},keySize:256/32});r.AES=c._createHelper(A)}(),n.AES})}(lf)),lf.exports}var ff={exports:{}},od;function Vy(){return od||(od=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),xo(),So(),uo(),Xn())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.WordArray,f=a.BlockCipher,p=r.algo,E=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],b=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],T=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],x=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],w=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],F=p.DES=f.extend({_doReset:function(){for(var g=this._key,A=g.words,O=[],D=0;D<56;D++){var P=E[D]-1;O[D]=A[P>>>5]>>>31-P%32&1}for(var L=this._subKeys=[],H=0;H<16;H++){for(var M=L[H]=[],G=T[H],D=0;D<24;D++)M[D/6|0]|=O[(b[D]-1+G)%28]<<31-D%6,M[4+(D/6|0)]|=O[28+(b[D+24]-1+G)%28]<<31-D%6;M[0]=M[0]<<1|M[0]>>>31;for(var D=1;D<7;D++)M[D]=M[D]>>>(D-1)*4+3;M[7]=M[7]<<5|M[7]>>>27}for(var N=this._invSubKeys=[],D=0;D<16;D++)N[D]=L[15-D]},encryptBlock:function(g,A){this._doCryptBlock(g,A,this._subKeys)},decryptBlock:function(g,A){this._doCryptBlock(g,A,this._invSubKeys)},_doCryptBlock:function(g,A,O){this._lBlock=g[A],this._rBlock=g[A+1],R.call(this,4,252645135),R.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),R.call(this,1,1431655765);for(var D=0;D<16;D++){for(var P=O[D],L=this._lBlock,H=this._rBlock,M=0,G=0;G<8;G++)M|=x[G][((H^P[G])&w[G])>>>0];this._lBlock=H,this._rBlock=L^M}var N=this._lBlock;this._lBlock=this._rBlock,this._rBlock=N,R.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),R.call(this,16,65535),R.call(this,4,252645135),g[A]=this._lBlock,g[A+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function R(g,A){var O=(this._lBlock>>>g^this._rBlock)&A;this._rBlock^=O,this._lBlock^=O<<g}function v(g,A){var O=(this._rBlock>>>g^this._lBlock)&A;this._lBlock^=O,this._rBlock^=O<<g}r.DES=f._createHelper(F);var d=p.TripleDES=f.extend({_doReset:function(){var g=this._key,A=g.words;if(A.length!==2&&A.length!==4&&A.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var O=A.slice(0,2),D=A.length<4?A.slice(0,2):A.slice(2,4),P=A.length<6?A.slice(0,2):A.slice(4,6);this._des1=F.createEncryptor(c.create(O)),this._des2=F.createEncryptor(c.create(D)),this._des3=F.createEncryptor(c.create(P))},encryptBlock:function(g,A){this._des1.encryptBlock(g,A),this._des2.decryptBlock(g,A),this._des3.encryptBlock(g,A)},decryptBlock:function(g,A){this._des3.decryptBlock(g,A),this._des2.encryptBlock(g,A),this._des1.decryptBlock(g,A)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=f._createHelper(d)}(),n.TripleDES})}(ff)),ff.exports}var hf={exports:{}},ad;function jy(){return ad||(ad=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),xo(),So(),uo(),Xn())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.StreamCipher,f=r.algo,p=f.RC4=c.extend({_doReset:function(){for(var T=this._key,x=T.words,w=T.sigBytes,F=this._S=[],R=0;R<256;R++)F[R]=R;for(var R=0,v=0;R<256;R++){var d=R%w,g=x[d>>>2]>>>24-d%4*8&255;v=(v+F[R]+g)%256;var A=F[R];F[R]=F[v],F[v]=A}this._i=this._j=0},_doProcessBlock:function(T,x){T[x]^=E.call(this)},keySize:256/32,ivSize:0});function E(){for(var T=this._S,x=this._i,w=this._j,F=0,R=0;R<4;R++){x=(x+1)%256,w=(w+T[x])%256;var v=T[x];T[x]=T[w],T[w]=v,F|=T[(T[x]+T[w])%256]<<24-R*8}return this._i=x,this._j=w,F}r.RC4=c._createHelper(p);var b=f.RC4Drop=p.extend({cfg:p.cfg.extend({drop:192}),_doReset:function(){p._doReset.call(this);for(var T=this.cfg.drop;T>0;T--)E.call(this)}});r.RC4Drop=c._createHelper(b)}(),n.RC4})}(hf)),hf.exports}var pf={exports:{}},sd;function $y(){return sd||(sd=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),xo(),So(),uo(),Xn())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.StreamCipher,f=r.algo,p=[],E=[],b=[],T=f.Rabbit=c.extend({_doReset:function(){for(var w=this._key.words,F=this.cfg.iv,R=0;R<4;R++)w[R]=(w[R]<<8|w[R]>>>24)&16711935|(w[R]<<24|w[R]>>>8)&4278255360;var v=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],d=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var R=0;R<4;R++)x.call(this);for(var R=0;R<8;R++)d[R]^=v[R+4&7];if(F){var g=F.words,A=g[0],O=g[1],D=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,P=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,L=D>>>16|P&4294901760,H=P<<16|D&65535;d[0]^=D,d[1]^=L,d[2]^=P,d[3]^=H,d[4]^=D,d[5]^=L,d[6]^=P,d[7]^=H;for(var R=0;R<4;R++)x.call(this)}},_doProcessBlock:function(w,F){var R=this._X;x.call(this),p[0]=R[0]^R[5]>>>16^R[3]<<16,p[1]=R[2]^R[7]>>>16^R[5]<<16,p[2]=R[4]^R[1]>>>16^R[7]<<16,p[3]=R[6]^R[3]>>>16^R[1]<<16;for(var v=0;v<4;v++)p[v]=(p[v]<<8|p[v]>>>24)&16711935|(p[v]<<24|p[v]>>>8)&4278255360,w[F+v]^=p[v]},blockSize:128/32,ivSize:64/32});function x(){for(var w=this._X,F=this._C,R=0;R<8;R++)E[R]=F[R];F[0]=F[0]+1295307597+this._b|0,F[1]=F[1]+3545052371+(F[0]>>>0<E[0]>>>0?1:0)|0,F[2]=F[2]+886263092+(F[1]>>>0<E[1]>>>0?1:0)|0,F[3]=F[3]+1295307597+(F[2]>>>0<E[2]>>>0?1:0)|0,F[4]=F[4]+3545052371+(F[3]>>>0<E[3]>>>0?1:0)|0,F[5]=F[5]+886263092+(F[4]>>>0<E[4]>>>0?1:0)|0,F[6]=F[6]+1295307597+(F[5]>>>0<E[5]>>>0?1:0)|0,F[7]=F[7]+3545052371+(F[6]>>>0<E[6]>>>0?1:0)|0,this._b=F[7]>>>0<E[7]>>>0?1:0;for(var R=0;R<8;R++){var v=w[R]+F[R],d=v&65535,g=v>>>16,A=((d*d>>>17)+d*g>>>15)+g*g,O=((v&4294901760)*v|0)+((v&65535)*v|0);b[R]=A^O}w[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,w[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,w[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,w[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,w[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,w[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,w[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,w[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}r.Rabbit=c._createHelper(T)}(),n.Rabbit})}(pf)),pf.exports}var df={exports:{}},ud;function Hy(){return ud||(ud=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),xo(),So(),uo(),Xn())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.StreamCipher,f=r.algo,p=[],E=[],b=[],T=f.RabbitLegacy=c.extend({_doReset:function(){var w=this._key.words,F=this.cfg.iv,R=this._X=[w[0],w[3]<<16|w[2]>>>16,w[1],w[0]<<16|w[3]>>>16,w[2],w[1]<<16|w[0]>>>16,w[3],w[2]<<16|w[1]>>>16],v=this._C=[w[2]<<16|w[2]>>>16,w[0]&4294901760|w[1]&65535,w[3]<<16|w[3]>>>16,w[1]&4294901760|w[2]&65535,w[0]<<16|w[0]>>>16,w[2]&4294901760|w[3]&65535,w[1]<<16|w[1]>>>16,w[3]&4294901760|w[0]&65535];this._b=0;for(var d=0;d<4;d++)x.call(this);for(var d=0;d<8;d++)v[d]^=R[d+4&7];if(F){var g=F.words,A=g[0],O=g[1],D=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,P=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,L=D>>>16|P&4294901760,H=P<<16|D&65535;v[0]^=D,v[1]^=L,v[2]^=P,v[3]^=H,v[4]^=D,v[5]^=L,v[6]^=P,v[7]^=H;for(var d=0;d<4;d++)x.call(this)}},_doProcessBlock:function(w,F){var R=this._X;x.call(this),p[0]=R[0]^R[5]>>>16^R[3]<<16,p[1]=R[2]^R[7]>>>16^R[5]<<16,p[2]=R[4]^R[1]>>>16^R[7]<<16,p[3]=R[6]^R[3]>>>16^R[1]<<16;for(var v=0;v<4;v++)p[v]=(p[v]<<8|p[v]>>>24)&16711935|(p[v]<<24|p[v]>>>8)&4278255360,w[F+v]^=p[v]},blockSize:128/32,ivSize:64/32});function x(){for(var w=this._X,F=this._C,R=0;R<8;R++)E[R]=F[R];F[0]=F[0]+1295307597+this._b|0,F[1]=F[1]+3545052371+(F[0]>>>0<E[0]>>>0?1:0)|0,F[2]=F[2]+886263092+(F[1]>>>0<E[1]>>>0?1:0)|0,F[3]=F[3]+1295307597+(F[2]>>>0<E[2]>>>0?1:0)|0,F[4]=F[4]+3545052371+(F[3]>>>0<E[3]>>>0?1:0)|0,F[5]=F[5]+886263092+(F[4]>>>0<E[4]>>>0?1:0)|0,F[6]=F[6]+1295307597+(F[5]>>>0<E[5]>>>0?1:0)|0,F[7]=F[7]+3545052371+(F[6]>>>0<E[6]>>>0?1:0)|0,this._b=F[7]>>>0<E[7]>>>0?1:0;for(var R=0;R<8;R++){var v=w[R]+F[R],d=v&65535,g=v>>>16,A=((d*d>>>17)+d*g>>>15)+g*g,O=((v&4294901760)*v|0)+((v&65535)*v|0);b[R]=A^O}w[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,w[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,w[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,w[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,w[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,w[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,w[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,w[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}r.RabbitLegacy=c._createHelper(T)}(),n.RabbitLegacy})}(df)),df.exports}var _f={exports:{}},cd;function Gy(){return cd||(cd=1,function(t,e){(function(n,r,a){t.exports=r(Lt(),xo(),So(),uo(),Xn())})(Tt,function(n){return function(){var r=n,a=r.lib,c=a.BlockCipher,f=r.algo;const p=16,E=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],b=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var T={pbox:[],sbox:[]};function x(d,g){let A=g>>24&255,O=g>>16&255,D=g>>8&255,P=g&255,L=d.sbox[0][A]+d.sbox[1][O];return L=L^d.sbox[2][D],L=L+d.sbox[3][P],L}function w(d,g,A){let O=g,D=A,P;for(let L=0;L<p;++L)O=O^d.pbox[L],D=x(d,O)^D,P=O,O=D,D=P;return P=O,O=D,D=P,D=D^d.pbox[p],O=O^d.pbox[p+1],{left:O,right:D}}function F(d,g,A){let O=g,D=A,P;for(let L=p+1;L>1;--L)O=O^d.pbox[L],D=x(d,O)^D,P=O,O=D,D=P;return P=O,O=D,D=P,D=D^d.pbox[1],O=O^d.pbox[0],{left:O,right:D}}function R(d,g,A){for(let H=0;H<4;H++){d.sbox[H]=[];for(let M=0;M<256;M++)d.sbox[H][M]=b[H][M]}let O=0;for(let H=0;H<p+2;H++)d.pbox[H]=E[H]^g[O],O++,O>=A&&(O=0);let D=0,P=0,L=0;for(let H=0;H<p+2;H+=2)L=w(d,D,P),D=L.left,P=L.right,d.pbox[H]=D,d.pbox[H+1]=P;for(let H=0;H<4;H++)for(let M=0;M<256;M+=2)L=w(d,D,P),D=L.left,P=L.right,d.sbox[H][M]=D,d.sbox[H][M+1]=P;return!0}var v=f.Blowfish=c.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var d=this._keyPriorReset=this._key,g=d.words,A=d.sigBytes/4;R(T,g,A)}},encryptBlock:function(d,g){var A=w(T,d[g],d[g+1]);d[g]=A.left,d[g+1]=A.right},decryptBlock:function(d,g){var A=F(T,d[g],d[g+1]);d[g]=A.left,d[g+1]=A.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=c._createHelper(v)}(),n.Blowfish})}(_f)),_f.exports}(function(t,e){(function(n,r,a){t.exports=r(Lt(),yu(),by(),Ey(),xo(),xy(),So(),Pp(),jl(),Sy(),Up(),Ty(),Ay(),Cy(),ql(),Dy(),uo(),Xn(),ky(),Oy(),wy(),Ry(),Fy(),Ny(),Iy(),Py(),By(),Ly(),My(),Uy(),Vy(),jy(),$y(),Hy(),Gy())})(Tt,function(n){return n})})(Cp);var ld=Cp.exports;class Ky{constructor(e){I(this,"_nameMap");I(this,"_prefixNameVar");I(this,"_prefixNameFunc");I(this,"_prefixNameConst");I(this,"_userTypes");I(this,"_isInFunc");I(this,"_currentFuncName");I(this,"_varlist");I(this,"_memberIndexList");I(this,"_blockCount");I(this,"_inputCount");I(this,"_count");I(this,"_isSwitch",!1);I(this,"_isInLoop",!1);I(this,"_codesCol");I(this,"_dependsObj");I(this,"_enums");I(this,"_preRunMembers");I(this,"_isInConditionalStmt",!1);I(this,"_preRunMembersFuncs");I(this,"_preRunMemberFuncsCount",0);this._nameMap=new Map,this._prefixNameVar=`${e}_var`,this._prefixNameFunc=`${e}_func`,this._prefixNameConst=`${e}_const`,this._userTypes=[],this._isInFunc=!1,this._varlist=[{}],this._memberIndexList=[{}],this._blockCount=0,this._inputCount=0,this._count=0,this._codesCol=[[]],this._dependsObj={},this._enums=new Map,this._preRunMembers=[],this._preRunMembersFuncs=[]}preParser(e){var r,a;const n=[];for(const c of e){if(!c)return;if(Array.isArray(c)){for(const f of c)if(n.push(this._parserStmt(f)),Ol.includes((a=(r=f.exprs)==null?void 0:r[0])==null?void 0:a.name))return n.join(`;
27
27
  `).replace(/;+/g,";")}else n.push(this._parserStmt(c))}return""}parser(e){const n=[];for(const a of e){if(!a)return;if(Array.isArray(a))for(const c of a)n.push(this._parserStmt(c));else n.push(this._parserStmt(a))}const r=this._memberIndexList[this._blockCount]||{};return n.push(...Object.values(r)),n.join(`;
28
- `).replace(/;+/g,";")}_parserStmt(e,n=!1,r=!1){let a="";switch(e==null?void 0:e.ruleType){case ye.DeclareAssign:a=this._parserDeclareAssign(e);break;case ye.MethodExpression:a=`${this._parserMethodExpression(e)}`;break;case ye.ArrowFunction:a=this._parserArrowFunction(e);break;case ye.ArrowMethod:a=this._parserArrowMethod(e);break;case ye.IfStatement:a=this._parserIfStatement(e,n);break;case ye.WhileStatement:a=this._parserWhileStatement(e,n);break;case ye.SwitchStatement:a=this._parserSwitchStatement(e,n);break;case ye.ForInStatement:a=this._parserForInStatement(e,n);break;case ye.ForToStatement:a=this._parserForToStatement(e,n);break;case ye.AgainAssign:a=this._parserAgainAssign(e);break;case ye.ImportElement:a=e.code||"";break;case ye.TypeStatement:a=this._parserTypeStatement(e);break;case ye.VarBlockStmt:a=this._parserVarBlockStmt(e);break;case ye.FlowStmt:if(this._isSwitch&&e.value==="break"){if(this._isInLoop){a="$$isBreak = true;";break}a="";break}a=`${e.value};`;break;case ye.Brackethesized:a=this._parserBrackethesized(e);break;case ye.EnumStatement:a=this._parserEnumStatement(e);break;default:a=this._parserSingleExpression(e);break}let c="";const f=this._preRunMembersFuncs[this._blockCount];f!=null&&f.length&&(c=f.join(`;
29
- `),this._preRunMembersFuncs[this._blockCount]=[]);const p=this._preRunMembers[this._blockCount];return p!=null&&p.length&&(c=`${c}
30
- ${p.join(`;
31
- `)}`,this._preRunMembers[this._blockCount]=[]),c&&(a=`${c}${n&&r?`
28
+ `).replace(/;+/g,";")}_parserStmt(e,n=!1){let r="";switch(e==null?void 0:e.ruleType){case ye.DeclareAssign:r=this._parserDeclareAssign(e);break;case ye.MethodExpression:r=`${this._parserMethodExpression(e)}`;break;case ye.ArrowFunction:r=this._parserArrowFunction(e);break;case ye.ArrowMethod:r=this._parserArrowMethod(e);break;case ye.IfStatement:r=this._parserIfStatement(e,n);break;case ye.WhileStatement:r=this._parserWhileStatement(e,n);break;case ye.SwitchStatement:r=this._parserSwitchStatement(e,n);break;case ye.ForInStatement:r=this._parserForInStatement(e,n);break;case ye.ForToStatement:r=this._parserForToStatement(e,n);break;case ye.AgainAssign:r=this._parserAgainAssign(e);break;case ye.ImportElement:r=e.code||"";break;case ye.TypeStatement:r=this._parserTypeStatement(e);break;case ye.VarBlockStmt:r=this._parserVarBlockStmt(e);break;case ye.FlowStmt:if(this._isSwitch&&e.value==="break"){if(this._isInLoop){r="$$isBreak = true;";break}r="";break}r=`${e.value};`;break;case ye.Brackethesized:r=this._parserBrackethesized(e);break;case ye.EnumStatement:r=this._parserEnumStatement(e);break;default:r=this._parserSingleExpression(e);break}let a="";const c=this._preRunMembersFuncs[this._blockCount];c!=null&&c.length&&(a=c.join(`;
29
+ `),this._preRunMembersFuncs[this._blockCount]=[]);const f=this._preRunMembers[this._blockCount];return f!=null&&f.length&&(a=`${a}
30
+ ${f.join(`;
31
+ `)}`,this._preRunMembers[this._blockCount]=[]),a&&(r=`${a}${n?`
32
32
  /****/
33
33
  `:`;
34
- `}${a}`),a}_parserEnumStatement(e){let{name:n,fields:r}=e;const a=[],c=[];for(const p of r){const{name:E,value:b}=p,T=b===void 0?`"${E}"`:b;c.push(T),a.push(`${E}: ${T}`)}Nn.includes(n)&&(n=`$${n}`),this._enums.set(n,c);const f=`const ${n} = {${a.join(", ")}}`;return this._codesCol[this._blockCount].push({code:f,varNames:[n],depends:[]}),f}_parserTypeStatement(e){const n=[],r=[];for(const f of e.fields){const{name:p,value:E}=f;f.isVarip&&r.push(`"${p}"`),n.push(`${p}: ${E?this._parserSingleExpression(E):"undefined"}`)}this._userTypes.push(e.name);let a=e.name;Nn.includes(a)&&(a=`$${a}`);const c=`const ${a} = ${this._prefixNameVar}.getTypeInstance({${n.join(", ")}}, [${r.join()}])`;return this._codesCol[this._blockCount].push({code:c,varNames:[a],depends:[]}),c}_parserVarBlockStmt(e){const{nameList:n,value:r}=e;this._addVarList(n);const a=this._parserDeclareAssignNames(n);this._dependsObj[a]=new Map;const c=this._parserStmt(r,!0,!0),f=c.split(`
34
+ `}${r}`),r}_parserEnumStatement(e){let{name:n,fields:r}=e;const a=[],c=[];for(const p of r){const{name:E,value:b}=p,T=b===void 0?`"${E}"`:b;c.push(T),a.push(`${E}: ${T}`)}Nn.includes(n)&&(n=`$${n}`),this._enums.set(n,c);const f=`const ${n} = {${a.join(", ")}}`;return this._codesCol[this._blockCount].push({code:f,varNames:[n],depends:[]}),f}_parserTypeStatement(e){const n=[],r=[];for(const f of e.fields){const{name:p,value:E}=f;f.isVarip&&r.push(`"${p}"`),n.push(`${p}: ${E?this._parserSingleExpression(E):"undefined"}`)}this._userTypes.push(e.name);let a=e.name;Nn.includes(a)&&(a=`$${a}`);const c=`const ${a} = ${this._prefixNameVar}.getTypeInstance({${n.join(", ")}}, [${r.join()}])`;return this._codesCol[this._blockCount].push({code:c,varNames:[a],depends:[]}),c}_parserVarBlockStmt(e){const{nameList:n,value:r}=e;this._addVarList(n);const a=this._parserDeclareAssignNames(n);this._dependsObj[a]=new Map;const c=this._parserStmt(r,!0),f=c.split(`
35
35
  /****/
36
36
  `);let p="";f.length>1?p=`${f[0]}
37
37
  let ${a} = ${f[1]}
@@ -67,7 +67,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
67
67
  ${b}
68
68
  }`),this._isInLoop=f,T=`${F};
69
69
  let ${E} = 0;
70
- ${T}`,n?this._functionalProcess(T):T}_parserAgainAssign(e){const{operator:n,name:r,value:a}=e,{varPos:c,declare:f}=r,p=`$againAssign${this._blockCount}`;this._dependsObj[p]=new Map;const E=this._parserName(r,!0);let b="",T=this._parserStmt(a,!0,!0);const x=T.split(`
70
+ ${T}`,n?this._functionalProcess(T):T}_parserAgainAssign(e){const{operator:n,name:r,value:a}=e,{varPos:c,declare:f}=r,p=`$againAssign${this._blockCount}`;this._dependsObj[p]=new Map;const E=this._parserName(r,!0);let b="",T=this._parserStmt(a,!0);const x=T.split(`
71
71
  /****/
72
72
  `);let w="";x.length>1&&(w=x[0],T=x[1]);const F=`$_tmp_${E.split(".").pop()}`;n===":="&&(w=`${w}
73
73
  var ${F} = ${T}`);let R=`${E} ${n===":="?`= ${F}`:`${n} ${T}`}`;const v=`${c==null?void 0:c.column}_${c==null?void 0:c.lineNumber}`;if(f){const g=this._isInFunc?`$posStr + "_${v}"`:`"${v}"`;b=`;
@@ -114,12 +114,11 @@ ${this._prefixNameVar}.againAssignParse(${E}, ${F});
114
114
  ${a}
115
115
  $$_result = ${this._parserName(e.name,!0)}`;case ye.DeclareAssign:c=this._parserStmt(e),a=`${c}
116
116
  ${this._getMembersCode()}`,r=this._parserDeclareAssignNames(e.nameList);break;case ye.FlowStmt:return this._getMembersCode();case ye.VarBlockStmt:c=this._parserStmt(e),a=`${c}
117
- ${this._getMembersCode()}`,r=this._parserDeclareAssignNames(e.nameList);break;default:r=this._parserStmt(e,!0,n),a=this._getMembersCode()}if(n){const f=r.split(`
117
+ ${this._getMembersCode()}`,r=this._parserDeclareAssignNames(e.nameList);break;default:r=this._parserStmt(e,!0),a=this._getMembersCode();const f=r.split(`
118
118
  /****/
119
- `);return f.length>1?`${a}
120
- ${f[0]}
121
- return ${f[1]}`:`${a}
122
- return ${r}`}return`${a}
119
+ `);f.length>1&&(a=`${a}
120
+ ${f[0]}`,r=f[1]);break}return n?`${a}
121
+ return ${r}`:`${a}
123
122
  $$_result = ${r}`}_getMembersCode(){const e=this._memberIndexList[this._blockCount]||{};return Object.values(e).join(`;
124
123
  `)}_parserArrowMethod(e){let n=`$_${e.name}`;this._nameMap.set(e.name,n);const r=[...e.params],a=e.index?`$${e.index}`:"";e.hasMemberIndex&&r.push({name:`${this._prefixNameVar}_position`}),n=`${n}${a}`,this._currentFuncName=n,this._dependsObj[n]=new Map;const c=this._parserBlock(e.block,!0,!0),f=e.hasRequest?", $paramsExpr":"";let p=`const ${n} = (${this._parserParameters(r)}$posStr${f}) => {
125
124
  ${c}
@@ -130,7 +129,8 @@ ${this._prefixNameVar}.againAssignParse(${E}, ${F});
130
129
  })
131
130
  `}return this._isInFunc=!1,this._currentFuncName="",this._codesCol[this._blockCount].push({funcName:n,depends:this._getDepends(n),hasRequest:e.hasRequest,code:p}),p}_parserArrowFunction(e){let n=`$_${e.name}`;this._nameMap.set(e.name,n);const r=[...e.params];e.hasMemberIndex&&r.push({name:`${this._prefixNameVar}_position`}),n=`${n}${e.index?`$${e.index}`:""}`,this._currentFuncName=n,this._dependsObj[n]=new Map;const a=e.hasRequest?", $paramsExpr":"",c=`const ${n} = (${this._parserParameters(r)}$posStr${a}) => {
132
131
  ${this._parserBlock(e.block,!0,!0)}
133
- }`;return this._isInFunc=!1,this._currentFuncName="",this._codesCol[this._blockCount].push({funcName:n,depends:this._getDepends(n),hasRequest:e.hasRequest,code:c}),c}_parserParameters(e){return e.length?`{${e.map(n=>{const{name:r,defaultValue:a}=n;let c=r;if(a){const f=this._parserSingleExpression(a);c=`${c} = ${f}`}return c}).join(", ")}},`:""}_parserBlock(e,n=!1,r=!1){return r&&(this._isInFunc=!0),this._parserBlockLine(Array.isArray(e)?e:[e],n,r)}_addVarList(e){const n=this._varlist[this._blockCount]||{};if(e.names)for(const[r,a]of e.names.entries())n[a]=e.posList[r];else n[e.name]=e.pos;this._varlist[this._blockCount]=n}_parserDeclareAssign(e){var E;const{nameList:n,value:r}=e;if(n.name==="_")return"";const a=this._parserDeclareAssignNames(n);this._addVarList(n);const c={code:"",varNames:a.replace(/[\[\]]/g,"").split(", "),depends:[]};this._dependsObj[a]=new Map;const f=this._parserSingleExpression(r);let p=`let ${a} = ${f}`;if(n.declare){const b=`${n.pos.column}_${n.pos.lineNumber}`,T=this._isInFunc?`$posStr + "_${b}"`:`"${b}"`;p=`let ${a} = ${this._prefixNameVar}.getVarValue("${a}", ${T}, "${n.declare}") || ${this._prefixNameVar}.setVarValue("${a}", ${T}, ${f}, "${n.declare}")`}return c.code=p,c.depends=this._getDepends(a),(E=this._codesCol[this._blockCount])==null||E.push(c),p}_parserDeclareAssignNames(e){switch(e==null?void 0:e.ruleType){case"VarMultiple":return`[${e.names.map(n=>Nn.includes(n)?`$${n}`:n).join(", ")}]`;case"VarSingle":return Nn.includes(e.name)?`$${e.name}`:e.name}return""}_parserSingleExpression(e){if(!e)return"";const{exprs:n,operator:r}=e;let a="",c=this._isInConditionalStmt;switch(e.ruleType){case ye.MemberIndexExpression:return this._parserMemberIndexExpression(e);case ye.MethodExpression:return this._parserMethodExpression(e);case ye.UnaryExpression:return`${r}${this._parserSingleExpression(n[0])}`;case ye.NotExpression:return`!${this._parserSingleExpression(n[0])}`;case ye.AdditiveExpression:return this._parserAdditiveExpression(e);case ye.MultiplicativeExpression:case ye.RelationalExpression:case ye.EqualityExpression:return`${this._parserSingleExpression(n[0])} ${r} ${this._parserSingleExpression(n[1])}`;case ye.LogicalAndExpression:return this._isInConditionalStmt=!0,a=`${this._parserSingleExpression(n[0])} && ${this._parserSingleExpression(n[1])}`,this._isInConditionalStmt=c,a;case ye.LogicalOrExpression:return this._isInConditionalStmt=!0,a=`${this._parserSingleExpression(n[0])} || ${this._parserSingleExpression(n[1])}`,this._isInConditionalStmt=c,a;case ye.TernaryExpression:return this._isInConditionalStmt=!0,a=`${this._parserSingleExpression(n[0])} ? ${this._parserSingleExpression(n[1])} : ${this._parserSingleExpression(n[2])}`,this._isInConditionalStmt=c,a;case ye.Name:return this._parserName(e);case ye.Literal:return this._parseLiteral(e);case ye.ParenthesizedExpression:return`(${this._parserSingleExpression(e.exprs)})`;default:return e.name||""}}_parserAdditiveExpression(e){const{exprs:n,operator:r}=e,a=this._parserSingleExpression(n[0]),c=this._parserSingleExpression(n[1]);return r==="-"?`${this._prefixNameVar}.sub(${a}, ${c})`:`${this._prefixNameVar}.add(${a}, ${c})`}_parserMemberIndexExpression(e){const{exprs:n,isInFunc:r,ctx:a}=e,c=n[0],f=this._parserSingleExpression(n[1]),p=this._parserSingleExpression(c),E=a.start.tokenIndex,b=r?`${this._prefixNameVar}_position`:E;if(c.ruleType===ye.Name&&!c.hasMethod){let T=this._blockCount;const x=c.name;for(c.isBuiltIn||this._setDepend({name:x,scope:c.varScope});T>=0;){const w=this._varlist[T]||{},F=w[x];if(F)return this._getUserVarMemberIndexs(F,x,T,f,r);if(c.isBuiltIn){const R=this._memberIndexList[0]||{};return R[x]=`${this._prefixNameVar}.setCacheData("${x}", ${p})`,`${this._prefixNameVar}.getCacheData("${x}", ${f}, ${p})`}if(x.includes(".")){const R=x.split(".")[0],v=w[R];if(v)return this._getUserVarMemberIndexs(v,x,T,f,r)}T--}return this._getOtherVarMemberIndexs(`${x}_${c.varScope||c.scope}`,x,c.varScope||c.scope,f,r)}else{const T=this._preRunMembers[this._blockCount]||[];T.push(`${this._prefixNameVar}.setCacheData("m${E}_" + ${b}, ${p})`),this._preRunMembers[this._blockCount]=T}return`${this._prefixNameVar}.getCacheData("m${E}_" + ${b}, ${f}, ${p})`}_getOtherVarMemberIndexs(e,n,r,a,c){const f=this._memberIndexList[r]||{};return e=c&&r!==0?`"${e}_" + $posStr`:`"${e}"`,f[e]=`${this._prefixNameVar}.setCacheData(${e}, ${n})`,this._memberIndexList[r]=f,`${this._prefixNameVar}.getCacheData(${e}, ${a}, ${n})`}_getUserVarMemberIndexs(e,n,r,a,c){return this._getOtherVarMemberIndexs(`${n}_${e.lineNumber}_${e.column}`,n,r,a,c)}_parseLiteral(e){return e.type.endsWith(z.COLOR)?`"${this._colorToRgba(e.value)}"`:e.value}_colorToRgba(e){if(e.startsWith("#")){let n;const r=parseInt(e.substring(1,3),16),a=parseInt(e.substring(3,5),16),c=parseInt(e.substring(5,7),16),f=e.substring(7);return f?n=(255-parseInt(f,16))/255:n=1,`rgba(${Math.round(r)}, ${Math.round(a)}, ${Math.round(c)}, ${n.toFixed(2)})`}return e}_parserName(e,n=!1){const{exprs:r,varScope:a,hasMethod:c,arg:f}=e,p=r.map(E=>{var w;if(typeof E=="string")return E;const{column:b,line:T}=((w=E==null?void 0:E.ctx)==null?void 0:w.start)||{},x=`${T}_${b}`;return this._parserMethodElement(E,x)});if(e.expr&&p.unshift(`(${this._parserSingleExpression(e.expr)})`),e.isBuiltIn)p.join(".")==="strategy.opentrades"&&p.push("opentrades"),p.unshift(e.isConst?this._prefixNameConst:this._prefixNameVar);else if(Nn.includes(p[0])&&(p[0]=`$${p[0]}`),!c){const E={name:p[0],scope:a||(f==null?void 0:f.varScope)||0,isAgainAssign:n,isArg:f==null?void 0:f.isArg,functionName:this._currentFuncName};this._setDepend(E)}return p.join(".")}_setDepend(e){const n=e.name;for(const r of Object.values(this._dependsObj)){const a=r.get(n),c={...e};a&&a.isAgainAssign&&(c.isAgainAssign=!0),r.set(n,c)}}_parserMethodExpression(e){const{exprs:n,ctx:r}=e,{column:a,line:c}=r.start,f=`${c}_${a}`;let p=this._isInFunc?`$posStr + "__${f}"`:`"${f}"`;p=this._isInLoop?`$$count${this._count} + ${p}`:p;let E=!1;const T=n.map(x=>(x.hasMemberIndex&&(E=!0),this._parserMethodElement(x,p))).join(".");if(this._isInConditionalStmt&&E){const x=`$$result_${this._preRunMemberFuncsCount}`;this._preRunMemberFuncsCount++;const w=this._preRunMembersFuncs[this._blockCount]||[];return w.push(`const ${x} = ${T}`),this._preRunMembersFuncs[this._blockCount]=w,x}return T}_parserMethodElement(e,n){let r="",a="";const c={...e.args};e.hasMemberIndex&&(a=`${this._prefixNameVar}_position: ${e.position}`),e.expr&&(r=`(${this._parserSingleExpression(e.expr)})`),r=r?`${r}.${e.name}`:this._nameMap.get(e.name)||e.name;let f=!1;if(e.isBuiltIn){if(Sp.includes(r))r=`${r}.${r}`;else if(r==="max_bars_back"){const{name:E,varPos:b}=c.var||c.params[0];a=`var_name: "${b?`${E}_${b.lineNumber}_${b.column}`:E}"`}r.startsWith(z.INPUT)?(a=`index: ${this._inputCount}`,this._inputCount++):r.startsWith("request.")&&(f=!0),r=`${this._prefixNameFunc}.${r}`}else{const E=r.split(".");let b=E[0];Nn.includes(b)&&(b=`$${b}`,r=E.join("."))}if(e.selfArg){const E=r.split("."),b=E.length;Object.assign(c,{[e.selfArg.name]:{name:E.slice(0,b-1).join(".")}}),r=E[b-1],r=this._nameMap.get(r)||r,this._setDepend({name:E[0],scope:e.varScope||0})}r=`${r}${e.index?`$${e.index}`:""}`;const p=this._parserArguments(c,a,n,f,e.hasRequest,r);if(!e.isBuiltIn){const E=r.split(".");if(E.length>1?this._setDepend({name:E[0],scope:e.varScope||0}):this._setDepend({name:r,scope:0,hasRequest:e.hasRequest,isFunc:!0}),e.funcName){const b=this._nameMap.get(e.funcName)||e.funcName;this._setDepend({name:b,originName:r,scope:0,hasRequest:e.hasRequest,isFunc:!0})}}return r+p}_parserArguments(e,n,r,a=!1,c=!1,f){const p=e.params||[];delete e.params;const E=[],b=[];let T=[],x;const w=(R,v)=>{c&&(this._dependsObj[r]=new Map),a&&v==="expression"&&(this._dependsObj[`$arg_${v}${r}`]=new Map);let d=R.ruleType===ye.Brackethesized?this._parserBrackethesized(R):this._parserSingleExpression(R);if(v&&!["arg0, arg1, ...","number0, number1, ..."].includes(v)){R.isSourceType?E.push(`sourceTypeName: "${R.name}"`):v==="defval"&&f===`${this._prefixNameFunc}.input.enum`&&(x=this._enums.get(R.enumName));const g=this._requestParamsHandle(a,v,r,c,d,f);d=(g==null?void 0:g.code)||d,g!=null&&g.paramsExpr&&T.push(g==null?void 0:g.paramsExpr),E.push(`${v}: ${d}`)}else b.push(d)};for(const R of p)w(R,R.originName);for(const R of Object.keys(e))w(e[R],R);a&&this._isInFunc&&E.push("paramsExpr: $paramsExpr"),n&&E.push(n),x&&E.unshift(`options: [${x.join(", ")}]`);const F=T.length?`, [${this._isInFunc?"...$paramsExpr, ":""}${T.join(", ")}]`:"";return b.length?`({${E.join(", ")}}, [${b.join(", ")}], ${r}${F})`:E.length?`({${E.join(", ")}}, ${r}${F})`:`(${r}${F})`}_requestParamsHandle(e,n,r,a,c,f){if(e&&n==="expression"){const p=this._getDepends(`$arg_${n}${r}`),E=this._getExpressionContext(p);return E.push({scope:1,depends:p.map(b=>(b.isArg&&(b.functionName=this._currentFuncName),b)),code:c}),{code:`'${ld.AES.encrypt(JSON.stringify(E),"1234").toString()}'`}}else if(a){const p=this._getDepends(r),E=this._getExpressionContext(p);return E.push({scope:2,varNames:n,methodName:f,depends:p,dependSelf:p.some(b=>b.name===n),code:`${n} = ${c}`}),{paramsExpr:`'${ld.AES.encrypt(JSON.stringify(E),"1234").toString()}'`}}}_getExpressionContext(e){const n=[],r=[];return this._getDependsCode(e,n,r),n}_getDependsCode(e,n,r){var a,c;for(const f of e)if(!f.isArg){const p=this._codesCol[f.scope||0],E=p.find(T=>{var x;return((x=T.varNames)==null?void 0:x.includes(f.name))||T.funcName===f.name});E&&(r.includes(E)||(r.push(E),E.depends.length&&this._getDependsCode(E.depends,n,r),n.push({scope:f.scope||0,code:E.code,depends:E.depends,funcName:E.funcName,varNames:(a=E.varNames)==null?void 0:a.join(", ")})));const b=p.filter(T=>T.depends.some(x=>x.name===f.name&&x.scope===f.scope&&x.isAgainAssign));for(const T of b)r.includes(T)||(r.push(T),T.depends.length&&this._getDependsCode(T.depends,n,r),n.push({scope:f.scope||0,code:T.code,depends:T.depends,funcName:T.funcName,varNames:(c=T.varNames)==null?void 0:c.join(", ")}))}}_parserBrackethesized(e){return`[${e.exprs.map(r=>this._parserSingleExpression(r)).join(", ")}]`}_functionalProcess(e){return`(function () {
132
+ }`;return this._isInFunc=!1,this._currentFuncName="",this._codesCol[this._blockCount].push({funcName:n,depends:this._getDepends(n),hasRequest:e.hasRequest,code:c}),c}_parserParameters(e){return e.length?`{${e.map(n=>{const{name:r,defaultValue:a}=n;let c=r;if(a){const f=this._parserSingleExpression(a);c=`${c} = ${f}`}return c}).join(", ")}},`:""}_parserBlock(e,n=!1,r=!1){return r&&(this._isInFunc=!0),this._parserBlockLine(Array.isArray(e)?e:[e],n,r)}_addVarList(e){const n=this._varlist[this._blockCount]||{};if(e.names)for(const[r,a]of e.names.entries())n[a]=e.posList[r];else n[e.name]=e.pos;this._varlist[this._blockCount]=n}_parserDeclareAssign(e){var E;const{nameList:n,value:r}=e;if(n.name==="_")return"";const a=this._parserDeclareAssignNames(n);this._addVarList(n);const c={code:"",varNames:a.replace(/[\[\]]/g,"").split(", "),depends:[]};this._dependsObj[a]=new Map;const f=this._parserSingleExpression(r);let p=`let ${a} = ${f}`;if(n.declare){const b=`${n.pos.column}_${n.pos.lineNumber}`,T=this._isInFunc?`$posStr + "_${b}"`:`"${b}"`;p=`let ${a} = ${this._prefixNameVar}.getVarValue("${a}", ${T}, "${n.declare}") || ${this._prefixNameVar}.setVarValue("${a}", ${T}, ${f}, "${n.declare}")`}return c.code=p,c.depends=this._getDepends(a),(E=this._codesCol[this._blockCount])==null||E.push(c),p}_parserDeclareAssignNames(e){switch(e==null?void 0:e.ruleType){case"VarMultiple":return`[${e.names.map(n=>Nn.includes(n)?`$${n}`:n).join(", ")}]`;case"VarSingle":return Nn.includes(e.name)?`$${e.name}`:e.name}return""}_parserSingleExpression(e){if(!e)return"";const{exprs:n,operator:r}=e;let a="",c=this._isInConditionalStmt;switch(e.ruleType){case ye.MemberIndexExpression:return this._parserMemberIndexExpression(e);case ye.MethodExpression:return this._parserMethodExpression(e);case ye.UnaryExpression:return`${r}${this._parserSingleExpression(n[0])}`;case ye.NotExpression:return`!${this._parserSingleExpression(n[0])}`;case ye.AdditiveExpression:return this._parserAdditiveExpression(e);case ye.MultiplicativeExpression:case ye.RelationalExpression:case ye.EqualityExpression:return`${this._parserSingleExpression(n[0])} ${r} ${this._parserSingleExpression(n[1])}`;case ye.LogicalAndExpression:return this._isInConditionalStmt=!0,a=`${this._parserSingleExpression(n[0])} && ${this._parserSingleExpression(n[1])}`,this._isInConditionalStmt=c,a;case ye.LogicalOrExpression:return this._isInConditionalStmt=!0,a=`${this._parserSingleExpression(n[0])} || ${this._parserSingleExpression(n[1])}`,this._isInConditionalStmt=c,a;case ye.TernaryExpression:return this._isInConditionalStmt=!0,a=`${this._parserSingleExpression(n[0])} ? ${this._parserSingleExpression(n[1])} : ${this._parserSingleExpression(n[2])}`,this._isInConditionalStmt=c,a;case ye.Name:return this._parserName(e);case ye.Literal:return this._parseLiteral(e);case ye.ParenthesizedExpression:return`(${this._parserSingleExpression(e.exprs)})`;default:return e.name||""}}_parserAdditiveExpression(e){const{exprs:n,operator:r}=e,a=this._parserSingleExpression(n[0]),c=this._parserSingleExpression(n[1]);return r==="-"?`${this._prefixNameVar}.sub(${a}, ${c})`:`${this._prefixNameVar}.add(${a}, ${c})`}_parserMemberIndexExpression(e){const{exprs:n,isInFunc:r,ctx:a}=e,c=n[0],f=this._parserSingleExpression(n[1]);let p=this._parserSingleExpression(c);const E=a.start.tokenIndex,b=r?`${this._prefixNameVar}_position`:E;if(c.ruleType===ye.Name&&!c.hasMethod){let T=this._blockCount;const x=c.name;for(c.isBuiltIn||this._setDepend({name:x,scope:c.varScope});T>=0;){const w=this._varlist[T]||{},F=w[x];if(F)return this._getUserVarMemberIndexs(F,x,T,f,r);if(c.isBuiltIn){const R=this._memberIndexList[0]||{};return R[x]=`${this._prefixNameVar}.setCacheData("${x}", ${p})`,`${this._prefixNameVar}.getCacheData("${x}", ${f}, ${p})`}if(x.includes(".")){const R=x.split(".")[0],v=w[R];if(v)return this._getUserVarMemberIndexs(v,x,T,f,r)}T--}return this._getOtherVarMemberIndexs(`${x}_${c.varScope||c.scope}`,x,c.varScope||c.scope,f,r)}else{const T=this._preRunMembers[this._blockCount]||[],x=`m${E}_${b}`;T.push(`const m${E}_${b} = ${p};
133
+ ${this._prefixNameVar}.setCacheData("m${E}_" + ${b}, ${x})`),p=x,this._preRunMembers[this._blockCount]=T}return`${this._prefixNameVar}.getCacheData("m${E}_" + ${b}, ${f}, ${p})`}_getOtherVarMemberIndexs(e,n,r,a,c){const f=this._memberIndexList[r]||{};return e=c&&r!==0?`"${e}_" + $posStr`:`"${e}"`,f[e]=`${this._prefixNameVar}.setCacheData(${e}, ${n})`,this._memberIndexList[r]=f,`${this._prefixNameVar}.getCacheData(${e}, ${a}, ${n})`}_getUserVarMemberIndexs(e,n,r,a,c){return this._getOtherVarMemberIndexs(`${n}_${e.lineNumber}_${e.column}`,n,r,a,c)}_parseLiteral(e){return e.type.endsWith(z.COLOR)?`"${this._colorToRgba(e.value)}"`:e.value}_colorToRgba(e){if(e.startsWith("#")){let n;const r=parseInt(e.substring(1,3),16),a=parseInt(e.substring(3,5),16),c=parseInt(e.substring(5,7),16),f=e.substring(7);return f?n=(255-parseInt(f,16))/255:n=1,`rgba(${Math.round(r)}, ${Math.round(a)}, ${Math.round(c)}, ${n.toFixed(2)})`}return e}_parserName(e,n=!1){const{exprs:r,varScope:a,hasMethod:c,arg:f}=e,p=r.map(E=>{var w;if(typeof E=="string")return E;const{column:b,line:T}=((w=E==null?void 0:E.ctx)==null?void 0:w.start)||{},x=`${T}_${b}`;return this._parserMethodElement(E,x)});if(e.expr&&p.unshift(`(${this._parserSingleExpression(e.expr)})`),e.isBuiltIn)p.join(".")==="strategy.opentrades"&&p.push("opentrades"),p.unshift(e.isConst?this._prefixNameConst:this._prefixNameVar);else if(Nn.includes(p[0])&&(p[0]=`$${p[0]}`),!c){const E={name:p[0],scope:a||(f==null?void 0:f.varScope)||0,isAgainAssign:n,isArg:f==null?void 0:f.isArg,functionName:this._currentFuncName};this._setDepend(E)}return p.join(".")}_setDepend(e){const n=e.name;for(const r of Object.values(this._dependsObj)){const a=r.get(n),c={...e};a&&a.isAgainAssign&&(c.isAgainAssign=!0),r.set(n,c)}}_parserMethodExpression(e){const{exprs:n,ctx:r}=e,{column:a,line:c}=r.start,f=`${c}_${a}`;let p=this._isInFunc?`$posStr + "__${f}"`:`"${f}"`;p=this._isInLoop?`$$count${this._count} + ${p}`:p;let E=!1;const T=n.map(x=>(x.hasMemberIndex&&(E=!0),this._parserMethodElement(x,p))).join(".");if(this._isInConditionalStmt&&E){const x=`$$result_${this._preRunMemberFuncsCount}`;this._preRunMemberFuncsCount++;const w=this._preRunMembersFuncs[this._blockCount]||[];return w.push(`const ${x} = ${T}`),this._preRunMembersFuncs[this._blockCount]=w,x}return T}_parserMethodElement(e,n){let r="",a="";const c={...e.args};e.hasMemberIndex&&(a=`${this._prefixNameVar}_position: ${e.position}`),e.expr&&(r=`(${this._parserSingleExpression(e.expr)})`),r=r?`${r}.${e.name}`:this._nameMap.get(e.name)||e.name;let f=!1;if(e.isBuiltIn){if(Sp.includes(r))r=`${r}.${r}`;else if(r==="max_bars_back"){const{name:E,varPos:b}=c.var||c.params[0];a=`var_name: "${b?`${E}_${b.lineNumber}_${b.column}`:E}"`}r.startsWith(z.INPUT)?(a=`index: ${this._inputCount}`,this._inputCount++):r.startsWith("request.")&&(f=!0),r=`${this._prefixNameFunc}.${r}`}else{const E=r.split(".");let b=E[0];Nn.includes(b)&&(b=`$${b}`,r=E.join("."))}if(e.selfArg){const E=r.split("."),b=E.length;Object.assign(c,{[e.selfArg.name]:{name:E.slice(0,b-1).join(".")}}),r=E[b-1],r=this._nameMap.get(r)||r,this._setDepend({name:E[0],scope:e.varScope||0})}r=`${r}${e.index?`$${e.index}`:""}`;const p=this._parserArguments(c,a,n,f,e.hasRequest,r);if(!e.isBuiltIn){const E=r.split(".");if(E.length>1?this._setDepend({name:E[0],scope:e.varScope||0}):this._setDepend({name:r,scope:0,hasRequest:e.hasRequest,isFunc:!0}),e.funcName){const b=this._nameMap.get(e.funcName)||e.funcName;this._setDepend({name:b,originName:r,scope:0,hasRequest:e.hasRequest,isFunc:!0})}}return r+p}_parserArguments(e,n,r,a=!1,c=!1,f){const p=e.params||[];delete e.params;const E=[],b=[];let T=[],x;const w=(R,v)=>{c&&(this._dependsObj[r]=new Map),a&&v==="expression"&&(this._dependsObj[`$arg_${v}${r}`]=new Map);let d=R.ruleType===ye.Brackethesized?this._parserBrackethesized(R):this._parserSingleExpression(R);if(v&&!["arg0, arg1, ...","number0, number1, ..."].includes(v)){R.isSourceType?E.push(`sourceTypeName: "${R.name}"`):v==="defval"&&f===`${this._prefixNameFunc}.input.enum`&&(x=this._enums.get(R.enumName));const g=this._requestParamsHandle(a,v,r,c,d,f);d=(g==null?void 0:g.code)||d,g!=null&&g.paramsExpr&&T.push(g==null?void 0:g.paramsExpr),E.push(`${v}: ${d}`)}else b.push(d)};for(const R of p)w(R,R.originName);for(const R of Object.keys(e))w(e[R],R);a&&this._isInFunc&&E.push("paramsExpr: $paramsExpr"),n&&E.push(n),x&&E.unshift(`options: [${x.join(", ")}]`);const F=T.length?`, [${this._isInFunc?"...$paramsExpr, ":""}${T.join(", ")}]`:"";return b.length?`({${E.join(", ")}}, [${b.join(", ")}], ${r}${F})`:E.length?`({${E.join(", ")}}, ${r}${F})`:`(${r}${F})`}_requestParamsHandle(e,n,r,a,c,f){if(e&&n==="expression"){const p=this._getDepends(`$arg_${n}${r}`),E=this._getExpressionContext(p);return E.push({scope:1,depends:p.map(b=>(b.isArg&&(b.functionName=this._currentFuncName),b)),code:c}),{code:`'${ld.AES.encrypt(JSON.stringify(E),"1234").toString()}'`}}else if(a){const p=this._getDepends(r),E=this._getExpressionContext(p);return E.push({scope:2,varNames:n,methodName:f,depends:p,dependSelf:p.some(b=>b.name===n),code:`${n} = ${c}`}),{paramsExpr:`'${ld.AES.encrypt(JSON.stringify(E),"1234").toString()}'`}}}_getExpressionContext(e){const n=[],r=[];return this._getDependsCode(e,n,r),n}_getDependsCode(e,n,r){var a,c;for(const f of e)if(!f.isArg){const p=this._codesCol[f.scope||0],E=p.find(T=>{var x;return((x=T.varNames)==null?void 0:x.includes(f.name))||T.funcName===f.name});E&&(r.includes(E)||(r.push(E),E.depends.length&&this._getDependsCode(E.depends,n,r),n.push({scope:f.scope||0,code:E.code,depends:E.depends,funcName:E.funcName,varNames:(a=E.varNames)==null?void 0:a.join(", ")})));const b=p.filter(T=>T.depends.some(x=>x.name===f.name&&x.scope===f.scope&&x.isAgainAssign));for(const T of b)r.includes(T)||(r.push(T),T.depends.length&&this._getDependsCode(T.depends,n,r),n.push({scope:f.scope||0,code:T.code,depends:T.depends,funcName:T.funcName,varNames:(c=T.varNames)==null?void 0:c.join(", ")}))}}_parserBrackethesized(e){return`[${e.exprs.map(r=>this._parserSingleExpression(r)).join(", ")}]`}_functionalProcess(e){return`(function () {
134
134
  let $$_result=undefined;
135
135
  ${e}
136
136
  return $$_result
@@ -67526,7 +67526,7 @@ Fp.onerror = (a) => {
67526
67526
  async function Rp(a) {
67527
67527
  return await Ja.setInlayHints(a);
67528
67528
  }
67529
- const Bp = Hi(Fp), Kp = Hi(new Worker(new URL("" + new URL("assets/parserTccWorker-Dm4K7reM.js", import.meta.url).href, import.meta.url), { type: "module", name: "Parser TccScript Server" }));
67529
+ const Bp = Hi(Fp), Kp = Hi(new Worker(new URL("" + new URL("assets/parserTccWorker-DhJ8omfR.js", import.meta.url).href, import.meta.url), { type: "module", name: "Parser TccScript Server" }));
67530
67530
  async function ch(a, n = !1) {
67531
67531
  const { functions: r, types: o, constants: l, variables: c, methods: m } = bt;
67532
67532
  return await Kp.parseTcc(a, n, ji(Rp), { functions: Object.fromEntries(r), methods: Object.fromEntries(m), types: Object.fromEntries(o), constants: Object.fromEntries(l), variables: Object.fromEntries(c) });
@@ -141,7 +141,7 @@ function print() { __p += __j.call(arguments, '') }
141
141
  * @license
142
142
  * Copyright 2019 Google LLC
143
143
  * SPDX-License-Identifier: Apache-2.0
144
- */const _o=Symbol("Comlink.proxy"),nm=Symbol("Comlink.endpoint"),im=Symbol("Comlink.releaseProxy"),yn=Symbol("Comlink.finalizer"),Ys=Symbol("Comlink.thrown"),fo=a=>typeof a=="object"&&a!==null||typeof a=="function",om={canHandle:a=>fo(a)&&a[_o],serialize(a){const{port1:n,port2:s}=new MessageChannel;return bo(a,n),[s,[s]]},deserialize(a){return a.start(),_n(a)}},lm={canHandle:a=>fo(a)&&Ys in a,serialize({value:a}){let n;return a instanceof Error?n={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:n={isError:!1,value:a},[n,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},go=new Map([["proxy",om],["throw",lm]]);function cm(a,n){for(const s of a)if(n===s||s==="*"||s instanceof RegExp&&s.test(n))return!0;return!1}function bo(a,n=globalThis,s=["*"]){n.addEventListener("message",function o(l){if(!l||!l.data)return;if(!cm(s,l.origin)){console.warn(`Invalid origin '${l.origin}' for comlink proxy`);return}const{id:c,type:m,path:_}=Object.assign({path:[]},l.data),g=(l.data.argumentList||[]).map(gr);let b;try{const h=_.slice(0,-1).reduce((P,B)=>P[B],a),T=_.reduce((P,B)=>P[B],a);switch(m){case"GET":b=T;break;case"SET":h[_.slice(-1)[0]]=gr(l.data.value),b=!0;break;case"APPLY":b=T.apply(h,g);break;case"CONSTRUCT":{const P=new T(...g);b=gn(P)}break;case"ENDPOINT":{const{port1:P,port2:B}=new MessageChannel;bo(a,B),b=ym(P,[P])}break;case"RELEASE":b=void 0;break;default:return}}catch(h){b={value:h,[Ys]:0}}Promise.resolve(b).catch(h=>({value:h,[Ys]:0})).then(h=>{const[T,P]=ea(h);n.postMessage(Object.assign(Object.assign({},T),{id:c}),P),m==="RELEASE"&&(n.removeEventListener("message",o),xo(n),yn in a&&typeof a[yn]=="function"&&a[yn]())}).catch(h=>{const[T,P]=ea({value:new TypeError("Unserializable return value"),[Ys]:0});n.postMessage(Object.assign(Object.assign({},T),{id:c}),P)})}),n.start&&n.start()}function pm(a){return a.constructor.name==="MessagePort"}function xo(a){pm(a)&&a.close()}function _n(a,n){return fn(a,[],n)}function Qs(a){if(a)throw new Error("Proxy has been released and is not useable")}function ho(a){return Lr(a,{type:"RELEASE"}).then(()=>{xo(a)})}const Zs=new WeakMap,Js="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const n=(Zs.get(a)||0)-1;Zs.set(a,n),n===0&&ho(a)});function dm(a,n){const s=(Zs.get(n)||0)+1;Zs.set(n,s),Js&&Js.register(a,n,a)}function mm(a){Js&&Js.unregister(a)}function fn(a,n=[],s=function(){}){let o=!1;const l=new Proxy(s,{get(c,m){if(Qs(o),m===im)return()=>{mm(l),ho(a),o=!0};if(m==="then"){if(n.length===0)return{then:()=>l};const _=Lr(a,{type:"GET",path:n.map(g=>g.toString())}).then(gr);return _.then.bind(_)}return fn(a,[...n,m])},set(c,m,_){Qs(o);const[g,b]=ea(_);return Lr(a,{type:"SET",path:[...n,m].map(h=>h.toString()),value:g},b).then(gr)},apply(c,m,_){Qs(o);const g=n[n.length-1];if(g===nm)return Lr(a,{type:"ENDPOINT"}).then(gr);if(g==="bind")return fn(a,n.slice(0,-1));const[b,h]=wo(_);return Lr(a,{type:"APPLY",path:n.map(T=>T.toString()),argumentList:b},h).then(gr)},construct(c,m){Qs(o);const[_,g]=wo(m);return Lr(a,{type:"CONSTRUCT",path:n.map(b=>b.toString()),argumentList:_},g).then(gr)}});return dm(l,a),l}function um(a){return Array.prototype.concat.apply([],a)}function wo(a){const n=a.map(ea);return[n.map(s=>s[0]),um(n.map(s=>s[1]))]}const vo=new WeakMap;function ym(a,n){return vo.set(a,n),a}function gn(a){return Object.assign(a,{[_o]:!0})}function ea(a){for(const[n,s]of go)if(s.canHandle(a)){const[o,l]=s.serialize(a);return[{type:"HANDLER",name:n,value:o},l]}return[{type:"RAW",value:a},vo.get(a)||[]]}function gr(a){switch(a.type){case"HANDLER":return go.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Lr(a,n,s){return new Promise(o=>{const l=_m();a.addEventListener("message",function c(m){!m.data||!m.data.id||m.data.id!==l||(a.removeEventListener("message",c),o(m.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:l},n),s)})}function _m(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const To=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-D9ObnG9j.js").href:new URL("assets/scriptsRunWorker-D9ObnG9j.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});To.onerror=a=>{console.error(a)};async function Do(a){return await Gs.setInlayHints(a)}const ko=_n(To),Io=_n(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-Dm4K7reM.js").href:new URL("assets/parserTccWorker-Dm4K7reM.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function Ao(a,n=!1){const{functions:s,types:o,constants:l,variables:c,methods:m}=lt;return await Io.parseTcc(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(l),variables:Object.fromEntries(c)})}async function fm(a,n){const{functions:s,types:o,constants:l,variables:c,methods:m}=lt;return await Io.parseLibraryCode(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(l),variables:Object.fromEntries(c)})}async function qo(a,n,s=!0){return await ko.runScript(a,n,s)}async function gm(a){return await ko.removeScript(a)}function bm(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}self.MonacoEnvironment={getWorker(){return new bm({name:"Editor Worker"})}},sn.config({monaco:pp});let Co={};const xm=(a,n)=>{const{height:s,width:o,theme:l,options:c,hasDiff:m,readOnly:_,defaultValue:g,onChange:b,onLinkOpen:h,onDeclareConfigChange:T,onCursorPositionChange:P,onActionTrigger:B,onEditorDidMount:R}=a,N=O.useRef(null),W=O.useRef(null);O.useImperativeHandle(n,()=>({setOriginalScript(q){var U;(U=N.current)==null||U.setOriginalScript(q)},setScript(q){var U;(U=N.current)==null||U.setValue(q)},gotoLine(){var q;(q=N.current)==null||q.gotoLine()},getEditorLayout(){var q;return(q=N.current)==null?void 0:q.getEditorLayout()},setPosition(q,U){var j;(j=N.current)==null||j.setPosition({column:q,lineNumber:U})},setModelMarkers(q){var U;(U=N.current)==null||U.setModelMarkers(q)}})),O.useEffect(()=>{var q,U;m?(U=N.current)==null||U.addDiffDecorations():(q=N.current)==null||q.removeDiffDecorations()},[m]),O.useEffect(()=>{var q;(q=N.current)==null||q.updateActionTrigger(B)},[B]),O.useEffect(()=>{var q;h&&((q=N.current)==null||q.addLinkOpenFunc(h))},[h]);function V(q,U){var ae,ye,le;zt.initBuiltinsTrees(),Gs.setEditor(q),N.current=new am(q,U,B),h&&((ae=N.current)==null||ae.addLinkOpenFunc(h)),m&&((ye=N.current)==null||ye.addDiffDecorations()),zd(q),(le=N.current)==null||le.setEditorLayout(Number(s));const j=q.getValue();N.current.onChangeCursorPosition(P),b&&b(j),!_&&G(j),R&&R()}const G=O.useCallback(async q=>{var ht;const U=Date.now(),{errors:j,functions:ae,methods:ye,types:le,variables:xt,overloadsFuncs:St,imports:$e,preParserCode:Be,enums:Q}=await Ao(q),ge=new Map(Object.entries(ae)),Ne=new Map(Object.entries(ye)),Pe=new Map(Object.entries(le)),ct=new Map(Object.entries(xt)),Et=new Map(Object.entries($e)),te=new Map(Object.entries(Q));Er.setUserDefined({functions:ge,methods:Ne,types:Pe,variables:ct,imports:Et,enums:te},St),zt.setUserDefind(ge,Pe,ct,Ne,te);const he=j.map(Ae=>({...Ae,severity:Ae.type||ke.MarkerSeverity.Error}));if(_)return;try{if(!j.length&&Be){const Ae=await qo(Be,{isPreParser:!0});io.isEqual(Ae,Co)||(Co=Ae,T&&T(Ae))}}catch(Ae){console.log(Ae),j.push({message:Ae.message,startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:0})}(ht=N.current)==null||ht.setModelMarkers(he);const Fe=Date.now();console.log((Fe-U)/1e3)},[T,_]),F=O.useMemo(()=>io.debounce(G,1500),[G]);function k(q){var U;if(_){G(q||"");return}Gs.clearInlayHints(),(U=N.current)==null||U.setModelMarkers([]),q!==void 0&&(b&&b(q),F(q))}return O.useEffect(()=>{const q=()=>{window.requestAnimationFrame(()=>{var ae,ye;const j=(ae=W.current)==null?void 0:ae.getBoundingClientRect();(ye=N.current)==null||ye.setEditorLayout((j==null?void 0:j.height)||0,j==null?void 0:j.width)})},U=new ResizeObserver(q);return W.current&&U.observe(W.current),()=>{W.current&&U.unobserve(W.current),U.disconnect()}},[]),L.jsx("div",{ref:W,children:L.jsx(xd,{height:s,width:o||"100%",defaultLanguage:Ee,defaultValue:g||`indicator("我的脚本")
144
+ */const _o=Symbol("Comlink.proxy"),nm=Symbol("Comlink.endpoint"),im=Symbol("Comlink.releaseProxy"),yn=Symbol("Comlink.finalizer"),Ys=Symbol("Comlink.thrown"),fo=a=>typeof a=="object"&&a!==null||typeof a=="function",om={canHandle:a=>fo(a)&&a[_o],serialize(a){const{port1:n,port2:s}=new MessageChannel;return bo(a,n),[s,[s]]},deserialize(a){return a.start(),_n(a)}},lm={canHandle:a=>fo(a)&&Ys in a,serialize({value:a}){let n;return a instanceof Error?n={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:n={isError:!1,value:a},[n,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},go=new Map([["proxy",om],["throw",lm]]);function cm(a,n){for(const s of a)if(n===s||s==="*"||s instanceof RegExp&&s.test(n))return!0;return!1}function bo(a,n=globalThis,s=["*"]){n.addEventListener("message",function o(l){if(!l||!l.data)return;if(!cm(s,l.origin)){console.warn(`Invalid origin '${l.origin}' for comlink proxy`);return}const{id:c,type:m,path:_}=Object.assign({path:[]},l.data),g=(l.data.argumentList||[]).map(gr);let b;try{const h=_.slice(0,-1).reduce((P,B)=>P[B],a),T=_.reduce((P,B)=>P[B],a);switch(m){case"GET":b=T;break;case"SET":h[_.slice(-1)[0]]=gr(l.data.value),b=!0;break;case"APPLY":b=T.apply(h,g);break;case"CONSTRUCT":{const P=new T(...g);b=gn(P)}break;case"ENDPOINT":{const{port1:P,port2:B}=new MessageChannel;bo(a,B),b=ym(P,[P])}break;case"RELEASE":b=void 0;break;default:return}}catch(h){b={value:h,[Ys]:0}}Promise.resolve(b).catch(h=>({value:h,[Ys]:0})).then(h=>{const[T,P]=ea(h);n.postMessage(Object.assign(Object.assign({},T),{id:c}),P),m==="RELEASE"&&(n.removeEventListener("message",o),xo(n),yn in a&&typeof a[yn]=="function"&&a[yn]())}).catch(h=>{const[T,P]=ea({value:new TypeError("Unserializable return value"),[Ys]:0});n.postMessage(Object.assign(Object.assign({},T),{id:c}),P)})}),n.start&&n.start()}function pm(a){return a.constructor.name==="MessagePort"}function xo(a){pm(a)&&a.close()}function _n(a,n){return fn(a,[],n)}function Qs(a){if(a)throw new Error("Proxy has been released and is not useable")}function ho(a){return Lr(a,{type:"RELEASE"}).then(()=>{xo(a)})}const Zs=new WeakMap,Js="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const n=(Zs.get(a)||0)-1;Zs.set(a,n),n===0&&ho(a)});function dm(a,n){const s=(Zs.get(n)||0)+1;Zs.set(n,s),Js&&Js.register(a,n,a)}function mm(a){Js&&Js.unregister(a)}function fn(a,n=[],s=function(){}){let o=!1;const l=new Proxy(s,{get(c,m){if(Qs(o),m===im)return()=>{mm(l),ho(a),o=!0};if(m==="then"){if(n.length===0)return{then:()=>l};const _=Lr(a,{type:"GET",path:n.map(g=>g.toString())}).then(gr);return _.then.bind(_)}return fn(a,[...n,m])},set(c,m,_){Qs(o);const[g,b]=ea(_);return Lr(a,{type:"SET",path:[...n,m].map(h=>h.toString()),value:g},b).then(gr)},apply(c,m,_){Qs(o);const g=n[n.length-1];if(g===nm)return Lr(a,{type:"ENDPOINT"}).then(gr);if(g==="bind")return fn(a,n.slice(0,-1));const[b,h]=wo(_);return Lr(a,{type:"APPLY",path:n.map(T=>T.toString()),argumentList:b},h).then(gr)},construct(c,m){Qs(o);const[_,g]=wo(m);return Lr(a,{type:"CONSTRUCT",path:n.map(b=>b.toString()),argumentList:_},g).then(gr)}});return dm(l,a),l}function um(a){return Array.prototype.concat.apply([],a)}function wo(a){const n=a.map(ea);return[n.map(s=>s[0]),um(n.map(s=>s[1]))]}const vo=new WeakMap;function ym(a,n){return vo.set(a,n),a}function gn(a){return Object.assign(a,{[_o]:!0})}function ea(a){for(const[n,s]of go)if(s.canHandle(a)){const[o,l]=s.serialize(a);return[{type:"HANDLER",name:n,value:o},l]}return[{type:"RAW",value:a},vo.get(a)||[]]}function gr(a){switch(a.type){case"HANDLER":return go.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Lr(a,n,s){return new Promise(o=>{const l=_m();a.addEventListener("message",function c(m){!m.data||!m.data.id||m.data.id!==l||(a.removeEventListener("message",c),o(m.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:l},n),s)})}function _m(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const To=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-D9ObnG9j.js").href:new URL("assets/scriptsRunWorker-D9ObnG9j.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});To.onerror=a=>{console.error(a)};async function Do(a){return await Gs.setInlayHints(a)}const ko=_n(To),Io=_n(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-DhJ8omfR.js").href:new URL("assets/parserTccWorker-DhJ8omfR.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function Ao(a,n=!1){const{functions:s,types:o,constants:l,variables:c,methods:m}=lt;return await Io.parseTcc(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(l),variables:Object.fromEntries(c)})}async function fm(a,n){const{functions:s,types:o,constants:l,variables:c,methods:m}=lt;return await Io.parseLibraryCode(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(l),variables:Object.fromEntries(c)})}async function qo(a,n,s=!0){return await ko.runScript(a,n,s)}async function gm(a){return await ko.removeScript(a)}function bm(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}self.MonacoEnvironment={getWorker(){return new bm({name:"Editor Worker"})}},sn.config({monaco:pp});let Co={};const xm=(a,n)=>{const{height:s,width:o,theme:l,options:c,hasDiff:m,readOnly:_,defaultValue:g,onChange:b,onLinkOpen:h,onDeclareConfigChange:T,onCursorPositionChange:P,onActionTrigger:B,onEditorDidMount:R}=a,N=O.useRef(null),W=O.useRef(null);O.useImperativeHandle(n,()=>({setOriginalScript(q){var U;(U=N.current)==null||U.setOriginalScript(q)},setScript(q){var U;(U=N.current)==null||U.setValue(q)},gotoLine(){var q;(q=N.current)==null||q.gotoLine()},getEditorLayout(){var q;return(q=N.current)==null?void 0:q.getEditorLayout()},setPosition(q,U){var j;(j=N.current)==null||j.setPosition({column:q,lineNumber:U})},setModelMarkers(q){var U;(U=N.current)==null||U.setModelMarkers(q)}})),O.useEffect(()=>{var q,U;m?(U=N.current)==null||U.addDiffDecorations():(q=N.current)==null||q.removeDiffDecorations()},[m]),O.useEffect(()=>{var q;(q=N.current)==null||q.updateActionTrigger(B)},[B]),O.useEffect(()=>{var q;h&&((q=N.current)==null||q.addLinkOpenFunc(h))},[h]);function V(q,U){var ae,ye,le;zt.initBuiltinsTrees(),Gs.setEditor(q),N.current=new am(q,U,B),h&&((ae=N.current)==null||ae.addLinkOpenFunc(h)),m&&((ye=N.current)==null||ye.addDiffDecorations()),zd(q),(le=N.current)==null||le.setEditorLayout(Number(s));const j=q.getValue();N.current.onChangeCursorPosition(P),b&&b(j),!_&&G(j),R&&R()}const G=O.useCallback(async q=>{var ht;const U=Date.now(),{errors:j,functions:ae,methods:ye,types:le,variables:xt,overloadsFuncs:St,imports:$e,preParserCode:Be,enums:Q}=await Ao(q),ge=new Map(Object.entries(ae)),Ne=new Map(Object.entries(ye)),Pe=new Map(Object.entries(le)),ct=new Map(Object.entries(xt)),Et=new Map(Object.entries($e)),te=new Map(Object.entries(Q));Er.setUserDefined({functions:ge,methods:Ne,types:Pe,variables:ct,imports:Et,enums:te},St),zt.setUserDefind(ge,Pe,ct,Ne,te);const he=j.map(Ae=>({...Ae,severity:Ae.type||ke.MarkerSeverity.Error}));if(_)return;try{if(!j.length&&Be){const Ae=await qo(Be,{isPreParser:!0});io.isEqual(Ae,Co)||(Co=Ae,T&&T(Ae))}}catch(Ae){console.log(Ae),j.push({message:Ae.message,startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:0})}(ht=N.current)==null||ht.setModelMarkers(he);const Fe=Date.now();console.log((Fe-U)/1e3)},[T,_]),F=O.useMemo(()=>io.debounce(G,1500),[G]);function k(q){var U;if(_){G(q||"");return}Gs.clearInlayHints(),(U=N.current)==null||U.setModelMarkers([]),q!==void 0&&(b&&b(q),F(q))}return O.useEffect(()=>{const q=()=>{window.requestAnimationFrame(()=>{var ae,ye;const j=(ae=W.current)==null?void 0:ae.getBoundingClientRect();(ye=N.current)==null||ye.setEditorLayout((j==null?void 0:j.height)||0,j==null?void 0:j.width)})},U=new ResizeObserver(q);return W.current&&U.observe(W.current),()=>{W.current&&U.unobserve(W.current),U.disconnect()}},[]),L.jsx("div",{ref:W,children:L.jsx(xd,{height:s,width:o||"100%",defaultLanguage:Ee,defaultValue:g||`indicator("我的脚本")
145
145
  plot(close)
146
146
  `,theme:l||"vs-dark",className:`tvue-script ${l||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,suggest:{filterGraceful:!0},fontSize:13,..._?Rd:{},readOnlyMessage:{value:"该脚本是只读的。它无法被编辑。"},...c},onMount:V,onChange:k})})},hm=O.forwardRef(xm),wm=a=>{const{theme:n,modified:s,original:o,height:l,width:c,renderSideBySide:m=!0}=a,_=O.useCallback((g,b)=>{b.languages.register({id:Ee}),b.editor.defineTheme("vs-dark",cn),b.editor.defineTheme("vs",ln),b.languages.setMonarchTokensProvider(Ee,Nr),b.languages.setLanguageConfiguration(Ee,on)},[]);return L.jsx(yd,{height:l||"90vh",width:c||"100%",theme:n||"vs-dark",options:{readOnly:!0,renderSideBySide:m,scrollBeyondLastLine:!1},language:Ee,modified:s,original:o,onMount:_})};A.VMarkerSeverity=void 0,function(a){a[a.Hint=1]="Hint",a[a.Info=2]="Info",a[a.Warning=4]="Warning",a[a.Error=8]="Error"}(A.VMarkerSeverity||(A.VMarkerSeverity={}));var ta={},vm=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var n=document.activeElement,s=[],o=0;o<a.rangeCount;o++)s.push(a.getRangeAt(o));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||s.forEach(function(l){a.addRange(l)}),n&&n.focus()}},Tm=vm,zo={"text/plain":"Text","text/html":"Url",default:"Text"},Dm="Copy to clipboard: #{key}, Enter";function km(a){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,n)}function Im(a,n){var s,o,l,c,m,_,g=!1;n||(n={}),s=n.debug||!1;try{l=Tm(),c=document.createRange(),m=document.getSelection(),_=document.createElement("span"),_.textContent=a,_.ariaHidden="true",_.style.all="unset",_.style.position="fixed",_.style.top=0,_.style.clip="rect(0, 0, 0, 0)",_.style.whiteSpace="pre",_.style.webkitUserSelect="text",_.style.MozUserSelect="text",_.style.msUserSelect="text",_.style.userSelect="text",_.addEventListener("copy",function(h){if(h.stopPropagation(),n.format)if(h.preventDefault(),typeof h.clipboardData>"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var T=zo[n.format]||zo.default;window.clipboardData.setData(T,a)}else h.clipboardData.clearData(),h.clipboardData.setData(n.format,a);n.onCopy&&(h.preventDefault(),n.onCopy(h.clipboardData))}),document.body.appendChild(_),c.selectNodeContents(_),m.addRange(c);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");g=!0}catch(h){s&&console.error("unable to copy using execCommand: ",h),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",a),n.onCopy&&n.onCopy(window.clipboardData),g=!0}catch(T){s&&console.error("unable to copy using clipboardData: ",T),s&&console.error("falling back to prompt"),o=km("message"in n?n.message:Dm),window.prompt(o,a)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(c):m.removeAllRanges()),_&&document.body.removeChild(_),l()}return g}var Am=Im;function bn(a){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bn(a)}Object.defineProperty(ta,"__esModule",{value:!0}),ta.CopyToClipboard=void 0;var ra=So(O),qm=So(Am),Cm=["text","onCopy","options","children"];function So(a){return a&&a.__esModule?a:{default:a}}function Eo(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(a,l).enumerable})),s.push.apply(s,o)}return s}function No(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Eo(Object(s),!0).forEach(function(o){hn(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Eo(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function zm(a,n){if(a==null)return{};var s=Sm(a,n),o,l;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(a);for(l=0;l<c.length;l++)o=c[l],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function Sm(a,n){if(a==null)return{};var s={},o=Object.keys(a),l,c;for(c=0;c<o.length;c++)l=o[c],!(n.indexOf(l)>=0)&&(s[l]=a[l]);return s}function Em(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Lo(a,n){for(var s=0;s<n.length;s++){var o=n[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(a,o.key,o)}}function Nm(a,n,s){return n&&Lo(a.prototype,n),s&&Lo(a,s),Object.defineProperty(a,"prototype",{writable:!1}),a}function Lm(a,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(n&&n.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),n&&xn(a,n)}function xn(a,n){return xn=Object.setPrototypeOf||function(o,l){return o.__proto__=l,o},xn(a,n)}function Mm(a){var n=Om();return function(){var o=sa(a),l;if(n){var c=sa(this).constructor;l=Reflect.construct(o,arguments,c)}else l=o.apply(this,arguments);return Pm(this,l)}}function Pm(a,n){if(n&&(bn(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mo(a)}function Mo(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Om(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sa(a){return sa=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},sa(a)}function hn(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}var Po=function(a){Lm(s,a);var n=Mm(s);function s(){var o;Em(this,s);for(var l=arguments.length,c=new Array(l),m=0;m<l;m++)c[m]=arguments[m];return o=n.call.apply(n,[this].concat(c)),hn(Mo(o),"onClick",function(_){var g=o.props,b=g.text,h=g.onCopy,T=g.children,P=g.options,B=ra.default.Children.only(T),R=(0,qm.default)(b,P);h&&h(b,R),B&&B.props&&typeof B.props.onClick=="function"&&B.props.onClick(_)}),o}return Nm(s,[{key:"render",value:function(){var l=this.props;l.text,l.onCopy,l.options;var c=l.children,m=zm(l,Cm),_=ra.default.Children.only(c);return ra.default.cloneElement(_,No(No({},m),{},{onClick:this.onClick}))}}]),s}(ra.default.PureComponent);ta.CopyToClipboard=Po,hn(Po,"defaultProps",{onCopy:void 0,options:void 0});var Rm=ta,wn=Rm.CopyToClipboard;wn.CopyToClipboard=wn;var Fm=wn;const vn=dp(Fm);async function Bm(a,n=0){const s=a[n];if(!s)return;const{name:o,args:l,type:c,desc:m,examples:_,remarks:g,seeAlso:b,syntax:h,detailedDesc:T,fields:P,returns:B}=s,R={name:o};if(a.length>1&&(R.overloads=`${a.length} overloads`),c&&(R.type=c),l&&(R.name=`${o}()`,R.args=l.map(N=>{const{name:W,desc:V,displayType:G}=N;return{label:`${W} (${G})`,desc:V&&br(V)}})),m&&(R.desc=m.map(N=>br(N))),_&&(R.originalExample=_.join(`
147
147
  `),R.examples=await ke.editor.colorize(R.originalExample,Ee,{tabSize:4})),T){R.detailedDesc=[];for(const N of T){const{desc:W,examples:V}=N;let G=W.map(q=>br(q)),F,k;V&&(k=V.join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guihz/trading-vue-editor-tes",
3
- "version": "0.0.119",
3
+ "version": "0.0.120",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "lib"