@guihz/trading-vue-editor-tes 0.0.110 → 0.0.111

Sign up to get free protection for your applications and to get access to all the features.
@@ -236,6 +236,6 @@ Input files:
236
236
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,`+gv(x)}else e.sourceMap.url&&(E.code+=`
237
237
  //# sourceMappingURL=`+e.sourceMap.url)}return e.nameCache&&e.mangle&&(e.mangle.cache&&(e.nameCache.vars=a_(e.mangle.cache)),e.mangle.properties&&e.mangle.properties.cache&&(e.nameCache.props=a_(e.mangle.properties.cache))),b&&b.source_map&&b.source_map.destroy(),r&&(r.end=Date.now(),E.timings={parse:.001*(r.rename-r.parse),rename:.001*(r.compress-r.rename),compress:.001*(r.scope-r.compress),scope:.001*(r.mangle-r.scope),mangle:.001*(r.properties-r.mangle),properties:.001*(r.format-r.properties),format:.001*(r.end-r.format),total:.001*(r.end-r.start)}),E}async function s_(t,e,n){const r=Ev(t,e,n);let a,c;do c=r.next(await a),a=c.value;while(!c.done);return c.value}function u_(t){const e=new Nm(t),n=new kl(e);n.removeErrorListeners();const r=new wm(n),a=new j(r);a._interp.predictionMode=Um.SLL,a.removeErrorListeners();const c=new Tv;n.addErrorListener(c),a.addErrorListener(c),a.buildParseTrees=!0;const h=a.program(),p=r.tokens.filter(E=>E.channel===2);return{errors:c.errors,ast:h,comments:p}}async function xv(t,e,n,r){const{errors:a,ast:c,comments:h}=u_(t+`
238
238
 
239
- `),p=new Ap(r,h,n),E=await p.visit(c);let b=a.splice(0,1);b.length||(b=p.errors);let T="";const x=new Ky("$"),w=e?"":x.preParser(E);if(console.log(w),e&&!b.some(F=>F.type===Vn.Error)){const F=x.parser(E)||"";T=(await s_(F,{compress:!0,mangle:!0})).code||"";const v={message:xe.indiRunErr,type:Vn.Error,startColumn:0,startLineNumber:0,endColumn:0,endLineNumber:0};if(p.hasUseDrawFunc){if(p.scriptType===Ui.library)p.exportPositions.length||(v.message=xe.libraryExportErr,b.push(v));else if(p.exportPositions.length){const d=p.exportPositions.map(g=>{const{type:A,...O}=g;return{message:Se(xe.exportUseErr,{type:A}),type:Vn.Error,...O}});b.push(...d)}}else switch(p.scriptType){case Ui.indicator:b.push(v);break;case Ui.strategy:p.hasUseCreateOrderFunc||(v.message=xe.strategyRunErr,b.push(v));break}}return{errors:b,functions:Object.fromEntries(p.userFunctions),variables:Object.fromEntries(p.userVariables),types:Object.fromEntries(p.userTypes),methods:Object.fromEntries(p.userMethods),overloadsFuncs:p.overloadsFuncs,imports:Object.fromEntries(p.imports),enums:Object.fromEntries(p.userEnums),codeStr:T,preParserCode:w}}async function Sv(t,e,n,r){const{ast:a,comments:c}=u_(t+`
239
+ `),p=new Ap(r,h,n),E=await p.visit(c);let b=a.splice(0,1);b.length||(b=p.errors);let T="";const x=new Ky("$"),w=e?"":x.preParser(E);if(e&&!b.some(F=>F.type===Vn.Error)){const F=x.parser(E)||"";T=(await s_(F,{compress:!0,mangle:!0})).code||"";const v={message:xe.indiRunErr,type:Vn.Error,startColumn:0,startLineNumber:0,endColumn:0,endLineNumber:0};if(p.hasUseDrawFunc){if(p.scriptType===Ui.library)p.exportPositions.length||(v.message=xe.libraryExportErr,b.push(v));else if(p.exportPositions.length){const d=p.exportPositions.map(g=>{const{type:A,...O}=g;return{message:Se(xe.exportUseErr,{type:A}),type:Vn.Error,...O}});b.push(...d)}}else switch(p.scriptType){case Ui.indicator:b.push(v);break;case Ui.strategy:p.hasUseCreateOrderFunc||(v.message=xe.strategyRunErr,b.push(v));break}}return{errors:b,functions:Object.fromEntries(p.userFunctions),variables:Object.fromEntries(p.userVariables),types:Object.fromEntries(p.userTypes),methods:Object.fromEntries(p.userMethods),overloadsFuncs:p.overloadsFuncs,imports:Object.fromEntries(p.imports),enums:Object.fromEntries(p.userEnums),codeStr:T,preParserCode:w}}async function Sv(t,e,n,r){const{ast:a,comments:c}=u_(t+`
240
240
 
241
241
  `),h=new Ap(r,c,n),p=await h.visit(a),{name:E,index:b}=h.endExport,T=p.findIndex(v=>v.name===E&&v.index===b),x=p.slice(0,T+1),F=new zy("$",e).parser(x)||"",R=await s_(F,{compress:!0,mangle:!0});return{...h.exportLibs,description:h.description,codeStr:R.code||""}}class Tv extends Rm{constructor(){super(...arguments);I(this,"errors",[])}syntaxError(n,r,a,c,h){this.errors.push({message:`syntax error: ${h.replace(/expecting.+/,"")}`,type:Vn.Error,startColumn:c,startLineNumber:a,endColumn:c,endLineNumber:a})}}yf({parseTcc:xv,parseLibraryCode:Sv})})();
@@ -73,7 +73,7 @@ ${Ff}`)}function oy(s,e,t){return(s>=0&&t?` ${Mf(s,e-1)}`:Mf(s,e)).padEnd(e)}fun
73
73
  * derived from CryptoJS.mode.CTR
74
74
  * Jan Hruby jhruby.web@gmail.com
75
75
  */return t.mode.CTRGladman=function(){var r=t.lib.BlockCipherMode.extend();function n(u){if((u>>24&255)===255){var f=u>>16&255,c=u>>8&255,h=u&255;f===255?(f=0,c===255?(c=0,h===255?h=0:++h):++c):++f,u=0,u+=f<<16,u+=c<<8,u+=h}else u+=1<<24;return u}function i(u){return(u[0]=n(u[0]))===0&&(u[1]=n(u[1])),u}var a=r.Encryptor=r.extend({processBlock:function(u,f){var c=this._cipher,h=c.blockSize,d=this._iv,p=this._counter;d&&(p=this._counter=d.slice(0),this._iv=void 0),i(p);var v=p.slice(0);c.encryptBlock(v,0);for(var x=0;x<h;x++)u[f+x]^=v[x]}});return r.Decryptor=a,r}(),t.mode.CTRGladman})}(Fu)),Fu.exports}var Bu={exports:{}},mh;function ZD(){return mh||(mh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),jt())})(ye,function(t){return t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(i,a){var u=this._cipher,f=u.blockSize,c=this._iv,h=this._keystream;c&&(h=this._keystream=c.slice(0),this._iv=void 0),u.encryptBlock(h,0);for(var d=0;d<f;d++)i[a+d]^=h[d]}});return r.Decryptor=n,r}(),t.mode.OFB})}(Bu)),Bu.exports}var Mu={exports:{}},xh;function VD(){return xh||(xh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),jt())})(ye,function(t){return t.mode.ECB=function(){var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(n,i){this._cipher.encryptBlock(n,i)}}),r.Decryptor=r.extend({processBlock:function(n,i){this._cipher.decryptBlock(n,i)}}),r}(),t.mode.ECB})}(Mu)),Mu.exports}var Nu={exports:{}},yh;function GD(){return yh||(yh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),jt())})(ye,function(t){return t.pad.AnsiX923={pad:function(r,n){var i=r.sigBytes,a=n*4,u=a-i%a,f=i+u-1;r.clamp(),r.words[f>>>2]|=u<<24-f%4*8,r.sigBytes+=u},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}},t.pad.Ansix923})}(Nu)),Nu.exports}var Su={exports:{}},Dh;function KD(){return Dh||(Dh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),jt())})(ye,function(t){return t.pad.Iso10126={pad:function(r,n){var i=n*4,a=i-r.sigBytes%i;r.concat(t.lib.WordArray.random(a-1)).concat(t.lib.WordArray.create([a<<24],1))},unpad:function(r){var n=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=n}},t.pad.Iso10126})}(Su)),Su.exports}var Ou={exports:{}},wh;function XD(){return wh||(wh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),jt())})(ye,function(t){return t.pad.Iso97971={pad:function(r,n){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,n)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.pad.Iso97971})}(Ou)),Ou.exports}var Tu={exports:{}},bh;function QD(){return bh||(bh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),jt())})(ye,function(t){return t.pad.ZeroPadding={pad:function(r,n){var i=n*4;r.clamp(),r.sigBytes+=i-(r.sigBytes%i||i)},unpad:function(r){for(var n=r.words,i=r.sigBytes-1,i=r.sigBytes-1;i>=0;i--)if(n[i>>>2]>>>24-i%4*8&255){r.sigBytes=i+1;break}}},t.pad.ZeroPadding})}(Tu)),Tu.exports}var Iu={exports:{}},Eh;function JD(){return Eh||(Eh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),jt())})(ye,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})}(Iu)),Iu.exports}var $u={exports:{}},Ah;function ew(){return Ah||(Ah=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),jt())})(ye,function(t){return function(r){var n=t,i=n.lib,a=i.CipherParams,u=n.enc,f=u.Hex,c=n.format;c.Hex={stringify:function(h){return h.ciphertext.toString(f)},parse:function(h){var d=f.parse(h);return a.create({ciphertext:d})}}}(),t.format.Hex})}($u)),$u.exports}var Ru={exports:{}},Ch;function tw(){return Ch||(Ch=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),oi(),ai(),kn(),jt())})(ye,function(t){return function(){var r=t,n=r.lib,i=n.BlockCipher,a=r.algo,u=[],f=[],c=[],h=[],d=[],p=[],v=[],x=[],_=[],y=[];(function(){for(var D=[],C=0;C<256;C++)C<128?D[C]=C<<1:D[C]=C<<1^283;for(var b=0,F=0,C=0;C<256;C++){var B=F^F<<1^F<<2^F<<3^F<<4;B=B>>>8^B&255^99,u[b]=B,f[B]=b;var M=D[b],O=D[M],A=D[O],N=D[B]*257^B*16843008;c[b]=N<<24|N>>>8,h[b]=N<<16|N>>>16,d[b]=N<<8|N>>>24,p[b]=N;var N=A*16843009^O*65537^M*257^b*16843008;v[B]=N<<24|N>>>8,x[B]=N<<16|N>>>16,_[B]=N<<8|N>>>24,y[B]=N,b?(b=M^D[D[D[A^M]]],F^=D[D[F]]):b=F=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],w=a.AES=i.extend({_doReset:function(){var D;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var C=this._keyPriorReset=this._key,b=C.words,F=C.sigBytes/4,B=this._nRounds=F+6,M=(B+1)*4,O=this._keySchedule=[],A=0;A<M;A++)A<F?O[A]=b[A]:(D=O[A-1],A%F?F>6&&A%F==4&&(D=u[D>>>24]<<24|u[D>>>16&255]<<16|u[D>>>8&255]<<8|u[D&255]):(D=D<<8|D>>>24,D=u[D>>>24]<<24|u[D>>>16&255]<<16|u[D>>>8&255]<<8|u[D&255],D^=m[A/F|0]<<24),O[A]=O[A-F]^D);for(var N=this._invKeySchedule=[],T=0;T<M;T++){var A=M-T;if(T%4)var D=O[A];else var D=O[A-4];T<4||A<=4?N[T]=D:N[T]=v[u[D>>>24]]^x[u[D>>>16&255]]^_[u[D>>>8&255]]^y[u[D&255]]}}},encryptBlock:function(D,C){this._doCryptBlock(D,C,this._keySchedule,c,h,d,p,u)},decryptBlock:function(D,C){var b=D[C+1];D[C+1]=D[C+3],D[C+3]=b,this._doCryptBlock(D,C,this._invKeySchedule,v,x,_,y,f);var b=D[C+1];D[C+1]=D[C+3],D[C+3]=b},_doCryptBlock:function(D,C,b,F,B,M,O,A){for(var N=this._nRounds,T=D[C]^b[0],R=D[C+1]^b[1],k=D[C+2]^b[2],z=D[C+3]^b[3],L=4,G=1;G<N;G++){var H=F[T>>>24]^B[R>>>16&255]^M[k>>>8&255]^O[z&255]^b[L++],ee=F[R>>>24]^B[k>>>16&255]^M[z>>>8&255]^O[T&255]^b[L++],te=F[k>>>24]^B[z>>>16&255]^M[T>>>8&255]^O[R&255]^b[L++],j=F[z>>>24]^B[T>>>16&255]^M[R>>>8&255]^O[k&255]^b[L++];T=H,R=ee,k=te,z=j}var H=(A[T>>>24]<<24|A[R>>>16&255]<<16|A[k>>>8&255]<<8|A[z&255])^b[L++],ee=(A[R>>>24]<<24|A[k>>>16&255]<<16|A[z>>>8&255]<<8|A[T&255])^b[L++],te=(A[k>>>24]<<24|A[z>>>16&255]<<16|A[T>>>8&255]<<8|A[R&255])^b[L++],j=(A[z>>>24]<<24|A[T>>>16&255]<<16|A[R>>>8&255]<<8|A[k&255])^b[L++];D[C]=H,D[C+1]=ee,D[C+2]=te,D[C+3]=j},keySize:256/32});r.AES=i._createHelper(w)}(),t.AES})}(Ru)),Ru.exports}var Lu={exports:{}},Fh;function rw(){return Fh||(Fh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),oi(),ai(),kn(),jt())})(ye,function(t){return function(){var r=t,n=r.lib,i=n.WordArray,a=n.BlockCipher,u=r.algo,f=[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],c=[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],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{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}],p=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],v=u.DES=a.extend({_doReset:function(){for(var m=this._key,w=m.words,D=[],C=0;C<56;C++){var b=f[C]-1;D[C]=w[b>>>5]>>>31-b%32&1}for(var F=this._subKeys=[],B=0;B<16;B++){for(var M=F[B]=[],O=h[B],C=0;C<24;C++)M[C/6|0]|=D[(c[C]-1+O)%28]<<31-C%6,M[4+(C/6|0)]|=D[28+(c[C+24]-1+O)%28]<<31-C%6;M[0]=M[0]<<1|M[0]>>>31;for(var C=1;C<7;C++)M[C]=M[C]>>>(C-1)*4+3;M[7]=M[7]<<5|M[7]>>>27}for(var A=this._invSubKeys=[],C=0;C<16;C++)A[C]=F[15-C]},encryptBlock:function(m,w){this._doCryptBlock(m,w,this._subKeys)},decryptBlock:function(m,w){this._doCryptBlock(m,w,this._invSubKeys)},_doCryptBlock:function(m,w,D){this._lBlock=m[w],this._rBlock=m[w+1],x.call(this,4,252645135),x.call(this,16,65535),_.call(this,2,858993459),_.call(this,8,16711935),x.call(this,1,1431655765);for(var C=0;C<16;C++){for(var b=D[C],F=this._lBlock,B=this._rBlock,M=0,O=0;O<8;O++)M|=d[O][((B^b[O])&p[O])>>>0];this._lBlock=B,this._rBlock=F^M}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,x.call(this,1,1431655765),_.call(this,8,16711935),_.call(this,2,858993459),x.call(this,16,65535),x.call(this,4,252645135),m[w]=this._lBlock,m[w+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function x(m,w){var D=(this._lBlock>>>m^this._rBlock)&w;this._rBlock^=D,this._lBlock^=D<<m}function _(m,w){var D=(this._rBlock>>>m^this._lBlock)&w;this._lBlock^=D,this._rBlock^=D<<m}r.DES=a._createHelper(v);var y=u.TripleDES=a.extend({_doReset:function(){var m=this._key,w=m.words;if(w.length!==2&&w.length!==4&&w.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var D=w.slice(0,2),C=w.length<4?w.slice(0,2):w.slice(2,4),b=w.length<6?w.slice(0,2):w.slice(4,6);this._des1=v.createEncryptor(i.create(D)),this._des2=v.createEncryptor(i.create(C)),this._des3=v.createEncryptor(i.create(b))},encryptBlock:function(m,w){this._des1.encryptBlock(m,w),this._des2.decryptBlock(m,w),this._des3.encryptBlock(m,w)},decryptBlock:function(m,w){this._des3.decryptBlock(m,w),this._des2.encryptBlock(m,w),this._des1.decryptBlock(m,w)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=a._createHelper(y)}(),t.TripleDES})}(Lu)),Lu.exports}var Pu={exports:{}},Bh;function nw(){return Bh||(Bh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),oi(),ai(),kn(),jt())})(ye,function(t){return function(){var r=t,n=r.lib,i=n.StreamCipher,a=r.algo,u=a.RC4=i.extend({_doReset:function(){for(var h=this._key,d=h.words,p=h.sigBytes,v=this._S=[],x=0;x<256;x++)v[x]=x;for(var x=0,_=0;x<256;x++){var y=x%p,m=d[y>>>2]>>>24-y%4*8&255;_=(_+v[x]+m)%256;var w=v[x];v[x]=v[_],v[_]=w}this._i=this._j=0},_doProcessBlock:function(h,d){h[d]^=f.call(this)},keySize:256/32,ivSize:0});function f(){for(var h=this._S,d=this._i,p=this._j,v=0,x=0;x<4;x++){d=(d+1)%256,p=(p+h[d])%256;var _=h[d];h[d]=h[p],h[p]=_,v|=h[(h[d]+h[p])%256]<<24-x*8}return this._i=d,this._j=p,v}r.RC4=i._createHelper(u);var c=a.RC4Drop=u.extend({cfg:u.cfg.extend({drop:192}),_doReset:function(){u._doReset.call(this);for(var h=this.cfg.drop;h>0;h--)f.call(this)}});r.RC4Drop=i._createHelper(c)}(),t.RC4})}(Pu)),Pu.exports}var ku={exports:{}},Mh;function iw(){return Mh||(Mh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),oi(),ai(),kn(),jt())})(ye,function(t){return function(){var r=t,n=r.lib,i=n.StreamCipher,a=r.algo,u=[],f=[],c=[],h=a.Rabbit=i.extend({_doReset:function(){for(var p=this._key.words,v=this.cfg.iv,x=0;x<4;x++)p[x]=(p[x]<<8|p[x]>>>24)&16711935|(p[x]<<24|p[x]>>>8)&4278255360;var _=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],y=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var x=0;x<4;x++)d.call(this);for(var x=0;x<8;x++)y[x]^=_[x+4&7];if(v){var m=v.words,w=m[0],D=m[1],C=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,b=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,F=C>>>16|b&4294901760,B=b<<16|C&65535;y[0]^=C,y[1]^=F,y[2]^=b,y[3]^=B,y[4]^=C,y[5]^=F,y[6]^=b,y[7]^=B;for(var x=0;x<4;x++)d.call(this)}},_doProcessBlock:function(p,v){var x=this._X;d.call(this),u[0]=x[0]^x[5]>>>16^x[3]<<16,u[1]=x[2]^x[7]>>>16^x[5]<<16,u[2]=x[4]^x[1]>>>16^x[7]<<16,u[3]=x[6]^x[3]>>>16^x[1]<<16;for(var _=0;_<4;_++)u[_]=(u[_]<<8|u[_]>>>24)&16711935|(u[_]<<24|u[_]>>>8)&4278255360,p[v+_]^=u[_]},blockSize:128/32,ivSize:64/32});function d(){for(var p=this._X,v=this._C,x=0;x<8;x++)f[x]=v[x];v[0]=v[0]+1295307597+this._b|0,v[1]=v[1]+3545052371+(v[0]>>>0<f[0]>>>0?1:0)|0,v[2]=v[2]+886263092+(v[1]>>>0<f[1]>>>0?1:0)|0,v[3]=v[3]+1295307597+(v[2]>>>0<f[2]>>>0?1:0)|0,v[4]=v[4]+3545052371+(v[3]>>>0<f[3]>>>0?1:0)|0,v[5]=v[5]+886263092+(v[4]>>>0<f[4]>>>0?1:0)|0,v[6]=v[6]+1295307597+(v[5]>>>0<f[5]>>>0?1:0)|0,v[7]=v[7]+3545052371+(v[6]>>>0<f[6]>>>0?1:0)|0,this._b=v[7]>>>0<f[7]>>>0?1:0;for(var x=0;x<8;x++){var _=p[x]+v[x],y=_&65535,m=_>>>16,w=((y*y>>>17)+y*m>>>15)+m*m,D=((_&4294901760)*_|0)+((_&65535)*_|0);c[x]=w^D}p[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,p[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,p[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,p[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,p[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,p[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,p[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,p[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.Rabbit=i._createHelper(h)}(),t.Rabbit})}(ku)),ku.exports}var zu={exports:{}},Nh;function sw(){return Nh||(Nh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),oi(),ai(),kn(),jt())})(ye,function(t){return function(){var r=t,n=r.lib,i=n.StreamCipher,a=r.algo,u=[],f=[],c=[],h=a.RabbitLegacy=i.extend({_doReset:function(){var p=this._key.words,v=this.cfg.iv,x=this._X=[p[0],p[3]<<16|p[2]>>>16,p[1],p[0]<<16|p[3]>>>16,p[2],p[1]<<16|p[0]>>>16,p[3],p[2]<<16|p[1]>>>16],_=this._C=[p[2]<<16|p[2]>>>16,p[0]&4294901760|p[1]&65535,p[3]<<16|p[3]>>>16,p[1]&4294901760|p[2]&65535,p[0]<<16|p[0]>>>16,p[2]&4294901760|p[3]&65535,p[1]<<16|p[1]>>>16,p[3]&4294901760|p[0]&65535];this._b=0;for(var y=0;y<4;y++)d.call(this);for(var y=0;y<8;y++)_[y]^=x[y+4&7];if(v){var m=v.words,w=m[0],D=m[1],C=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,b=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,F=C>>>16|b&4294901760,B=b<<16|C&65535;_[0]^=C,_[1]^=F,_[2]^=b,_[3]^=B,_[4]^=C,_[5]^=F,_[6]^=b,_[7]^=B;for(var y=0;y<4;y++)d.call(this)}},_doProcessBlock:function(p,v){var x=this._X;d.call(this),u[0]=x[0]^x[5]>>>16^x[3]<<16,u[1]=x[2]^x[7]>>>16^x[5]<<16,u[2]=x[4]^x[1]>>>16^x[7]<<16,u[3]=x[6]^x[3]>>>16^x[1]<<16;for(var _=0;_<4;_++)u[_]=(u[_]<<8|u[_]>>>24)&16711935|(u[_]<<24|u[_]>>>8)&4278255360,p[v+_]^=u[_]},blockSize:128/32,ivSize:64/32});function d(){for(var p=this._X,v=this._C,x=0;x<8;x++)f[x]=v[x];v[0]=v[0]+1295307597+this._b|0,v[1]=v[1]+3545052371+(v[0]>>>0<f[0]>>>0?1:0)|0,v[2]=v[2]+886263092+(v[1]>>>0<f[1]>>>0?1:0)|0,v[3]=v[3]+1295307597+(v[2]>>>0<f[2]>>>0?1:0)|0,v[4]=v[4]+3545052371+(v[3]>>>0<f[3]>>>0?1:0)|0,v[5]=v[5]+886263092+(v[4]>>>0<f[4]>>>0?1:0)|0,v[6]=v[6]+1295307597+(v[5]>>>0<f[5]>>>0?1:0)|0,v[7]=v[7]+3545052371+(v[6]>>>0<f[6]>>>0?1:0)|0,this._b=v[7]>>>0<f[7]>>>0?1:0;for(var x=0;x<8;x++){var _=p[x]+v[x],y=_&65535,m=_>>>16,w=((y*y>>>17)+y*m>>>15)+m*m,D=((_&4294901760)*_|0)+((_&65535)*_|0);c[x]=w^D}p[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,p[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,p[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,p[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,p[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,p[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,p[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,p[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}r.RabbitLegacy=i._createHelper(h)}(),t.RabbitLegacy})}(zu)),zu.exports}var qu={exports:{}},Sh;function ow(){return Sh||(Sh=1,function(s,e){(function(t,r,n){s.exports=r(Ge(),oi(),ai(),kn(),jt())})(ye,function(t){return function(){var r=t,n=r.lib,i=n.BlockCipher,a=r.algo;const u=16,f=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[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 h={pbox:[],sbox:[]};function d(y,m){let w=m>>24&255,D=m>>16&255,C=m>>8&255,b=m&255,F=y.sbox[0][w]+y.sbox[1][D];return F=F^y.sbox[2][C],F=F+y.sbox[3][b],F}function p(y,m,w){let D=m,C=w,b;for(let F=0;F<u;++F)D=D^y.pbox[F],C=d(y,D)^C,b=D,D=C,C=b;return b=D,D=C,C=b,C=C^y.pbox[u],D=D^y.pbox[u+1],{left:D,right:C}}function v(y,m,w){let D=m,C=w,b;for(let F=u+1;F>1;--F)D=D^y.pbox[F],C=d(y,D)^C,b=D,D=C,C=b;return b=D,D=C,C=b,C=C^y.pbox[1],D=D^y.pbox[0],{left:D,right:C}}function x(y,m,w){for(let B=0;B<4;B++){y.sbox[B]=[];for(let M=0;M<256;M++)y.sbox[B][M]=c[B][M]}let D=0;for(let B=0;B<u+2;B++)y.pbox[B]=f[B]^m[D],D++,D>=w&&(D=0);let C=0,b=0,F=0;for(let B=0;B<u+2;B+=2)F=p(y,C,b),C=F.left,b=F.right,y.pbox[B]=C,y.pbox[B+1]=b;for(let B=0;B<4;B++)for(let M=0;M<256;M+=2)F=p(y,C,b),C=F.left,b=F.right,y.sbox[B][M]=C,y.sbox[B][M+1]=b;return!0}var _=a.Blowfish=i.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var y=this._keyPriorReset=this._key,m=y.words,w=y.sigBytes/4;x(h,m,w)}},encryptBlock:function(y,m){var w=p(h,y[m],y[m+1]);y[m]=w.left,y[m+1]=w.right},decryptBlock:function(y,m){var w=v(h,y[m],y[m+1]);y[m]=w.left,y[m+1]=w.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=i._createHelper(_)}(),t.Blowfish})}(qu)),qu.exports}(function(s,e){(function(t,r,n){s.exports=r(Ge(),Bo(),RD(),LD(),oi(),PD(),ai(),nh(),pu(),kD(),ah(),zD(),qD(),UD(),Du(),WD(),kn(),jt(),HD(),jD(),YD(),ZD(),VD(),GD(),KD(),XD(),QD(),JD(),ew(),tw(),rw(),nw(),iw(),sw(),ow())})(ye,function(t){return t})})(Vf);var Mo=Vf.exports;class aw{constructor(e,t){U(this,"_variables");U(this,"_scriptId");this._variables=e,this._scriptId=t}security(e,t){const r=self.workerStorage.get(`request_${this._scriptId}`);let{expression:n,paramsExpr:i=[]}=e;if(r!=null&&r.has(t)){const _=r.get(t);return this._runScripts(_,t,!0,i)}let a=[],u=1;n=Mo.AES.decrypt(n,"1234").toString(Mo.enc.Utf8);const f=JSON.parse(n),c=f.pop();let h=(c==null?void 0:c.depends)||[];if(!h.length)return this._runScripts((c==null?void 0:c.code)||"",t,!0,i);let d=[],p=[];if(this._getDependCodes(h,f,a,d,p),p.length){const _=i.length;let y=[];for(let m=_-1;m>=0;m--){const w=i[m];let D=JSON.parse(Mo.AES.decrypt(w,"1234").toString(Mo.enc.Utf8));const C=[];u!==0&&y.unshift("{"),u++,D=D.map(F=>{const{scope:B,code:M,varNames:O,dependSelf:A}=F;return B===2&&!C.includes(O)&&!A&&(F.code=`let ${M}`),O&&C.push(...O.split(",")),F});let b=p.map(F=>({...F,isArg:!1,isPreArg:!0}));p=[],this._getDependCodes(b,D,y,d,p),a=y.concat(a),y=[]}}for(a.push(`return ${c==null?void 0:c.code}`);u>1;)a.push("}"),u--;a=d.concat(a);const v=a.join(`
76
- `),x=this._runScripts(v,t,!0,i);return r==null||r.set(t,v),x}_getDependCodes(e,t,r,n,i){for(const a of e){if(!a.isArg){const u=t.filter(c=>{var h;return(h=c==null?void 0:c.depends)==null?void 0:h.some(d=>d.name===a.name&&d.scope===a.scope&&d.isAgainAssign)});for(const c of u){const{code:h,depends:d}=c;r.includes(h)||(r.unshift(h),d!=null&&d.length&&this._getDependCodes(d,t,r,n,i))}const f=t.find(c=>{var h;return((h=c.varNames)==null?void 0:h.split(",").includes(a.name))&&(!a.isPreArg||a.isPreArg&&c.methodName===a.functionName)||c.funcName===a.name});if(f){const{code:c,depends:h}=f,d=r.findIndex(p=>p===c);d!==-1&&r.splice(d,1),r.unshift(c),h!=null&&h.length&&this._getDependCodes(h,t,r,n,i);continue}}i.some(u=>u.name===a.name)||i.push(a)}}_runScripts(e,t,r,n,i){const a=`${this._scriptId}_${t}`;let{builtInGather:u,buildinConstants:f,buildInFunctions:c,tradingvueFunc:h}=self.workerStorage.get(a)||{};return r&&(u=new Oh(a),f=new Uf,c=new Zf(this._variables.mintick||1e-4,u,this._scriptId),h=new Function("$_var","$_const","$_func","$paramsExpr","$posStr",e),self.workerStorage.set(a,{builtInGather:u,buildinConstants:f,buildInFunctions:c,tradingvueFunc:h})),h(u,f,c,n||[],t)}}let uw=class{constructor(){}prefix(e){var r;const{symbol:t}=e;return((r=t==null?void 0:t.split("."))==null?void 0:r[0])||""}ticker(e){var r;const{symbol:t}=e;return((r=t==null?void 0:t.split("."))==null?void 0:r[1])||""}};class lw{constructor(e){U(this,"_logs");U(this,"_variables");U(this,"_intlFormat");this._variables=e,this._logs=[],this._intlFormat=new Intl.NumberFormat("en-US")}get logs(){return this._logs}clearLogs(){this._logs=[]}info(e,t,r){this._addLog(e,t,"info",r)}error(e,t,r){this._addLog(e,t,"error",r)}warning(e,t,r){this._addLog(e,t,"warning",r)}_addLog(e,t,r,n){if(typeof t=="string"&&(n=t),n.startsWith("export"))return;const{message:i,formatString:a}=e,{time:u,bar_index:f}=this._variables;let c=i;a&&Array.isArray(t)&&t.length&&(c=a.replace(/{(\d+)}/g,(h,d)=>{let p=t[d];return typeof p=="number"&&(p=this._intlFormat.format(parseFloat(p.toFixed(3)))),p!==void 0?p:h})),c&&this._logs.push({message:`[${ot(u).format()}]: ${c}`,time:u,barIndex:f,type:r})}}class cw{constructor(e){U(this,"_errorListener");this._errorListener=e}error({message:e},t){t.startsWith("export")||this._errorListener.addError(e,t,Ve.Error)}}class fw{constructor(){U(this,"_errors");this._errors=new Map}clear(){this._errors.clear()}get errors(){return Yr.flatMap([...this._errors.values()])}addError(e,t,r,n=0){const[i,a]=t.split("_").slice(-2),u=this._errors.get(t),f={message:e,endLineNumber:Number(i),startColumn:Number(a)+1,endColumn:Number(a)+n+1,startLineNumber:Number(i),type:r};u?u.push(f):this._errors.set(t,[f])}}class hw{constructor(){U(this,"_isMarketOpen");U(this,"_currentBarIndex");U(this,"_totalBarIndex");U(this,"_isRealTimeBar");U(this,"_preBarIndex");this._currentBarIndex=0,this._totalBarIndex=0,this._isRealTimeBar=!1,this._preBarIndex=0,this._isMarketOpen=!0}update(e,t,r,n){this._preBarIndex=this._currentBarIndex,this._currentBarIndex=e,this._totalBarIndex=t,this._isRealTimeBar=r,this._isMarketOpen=n}get isnew(){return!this._isRealTimeBar||this._preBarIndex!==this._currentBarIndex}get islast(){return this._currentBarIndex===this._totalBarIndex}get isfirst(){return this._currentBarIndex===0}get ishistory(){return!this._isRealTimeBar}get isrealtime(){return this._isRealTimeBar}get isconfirmed(){return!this._isRealTimeBar}get islastconfirmedhistory(){return this._isMarketOpen?this._currentBarIndex===this._totalBarIndex-1:this._currentBarIndex===this._totalBarIndex}}class dw{constructor(e){U(this,"_variables");this._variables=e}get isfirstbar(){return this._variables.timeframe.isdwm?!0:this._variables.time===this._variables.time_tradingday}get isfirstbar_regular(){return this._variables.timeframe.isdwm?!0:this._variables.time===this._variables.time_tradingday}get islastbar(){if(this._variables.timeframe.isdwm)return!0;const e=pn(this._variables.timeframe.period);return this._variables.time+e===this._variables.time_tradingday+24*60*60*1e3}get islastbar_regular(){if(this._variables.timeframe.isdwm)return!0;const e=pn(this._variables.timeframe.period);return this._variables.time+e===this._variables.time_tradingday+24*60*60*1e3}get ismarket(){return!0}get ispostmarket(){return!1}get ispremarket(){return!1}}class pw{constructor(e){U(this,"_orders");U(this,"_historyOrders");U(this,"_options");U(this,"_max_contracts_held_all",0);U(this,"_max_contracts_held_long",0);U(this,"_max_contracts_held_short",0);U(this,"_max_drawdown",0);U(this,"_max_runup",0);U(this,"_max_runup_percent",0);U(this,"_max_drawdown_percent",0);U(this,"_variables");U(this,"_netprofit",0);U(this,"_eventrades",0);U(this,"_avg_trade_percent");U(this,"_closedtrades",0);U(this,"_losstrades",0);U(this,"_grossloss",0);U(this,"_grossloss_percent",0);U(this,"_grossprofit",0);U(this,"_grossprofit_percent",0);U(this,"_wintrades",0);U(this,"_opentrades_capital_held",0);U(this,"_position_avg_price",0);U(this,"_position_size",0);this._orders=[],this._historyOrders=[],this._variables=e}update(){this._calcMaxDrawdownAndMaxRunup()}_calcMaxDrawdownAndMaxRunup(){let e=0,t=0;const{high:r,low:n}=this._variables;for(const c of this._orders){const{in_price:h,qty:d=0,commission:p=0,original_qty:v=0,direction:x}=c,_=x===gt.long?1:-1,y=(r-h)*d,m=(n-h)*d,w=_===1?y:-m,D=_===1?-m:y;e+=D+p*d/v,t+=w+p*d/v}const[i,a]=this._historyOrders.reduce((c,h)=>{let[d,p]=c;const{profit:v=0,commission:x=0}=h;return d+=v,p+=v-x,[d,p]},[0,0]);e-=i,t+=a;const u=e/(this.initial_capital+this.netprofit)*100;this._max_drawdown<e&&(this._max_drawdown=e),u>this._max_drawdown_percent&&(this._max_drawdown_percent=u);const f=t/(this.initial_capital+this.netprofit)*100;t>this._max_runup&&(this._max_runup=t),f>this._max_runup_percent&&(this._max_runup_percent=f)}updateOrders(e){this._orders=e,this._calcMaxContracts()}_calcMaxContracts(){const e=this._orders.length;if(!e)return;const[t,r,n,i,a,u]=this._orders.reduce(([f,c,h,d,p,v],x)=>{const{direction:_,qty:y=0,in_price:m}=x;return _===gt.long?(f+=y,c+=y,v+=y):(f+=y,h+=y,v-=y),d+=y*m,p+=m,[f,c,h,d,p,v]},[0,0,0,0,0,0]);this._position_size=u,this._position_avg_price=a/e,this._opentrades_capital_held=i,this._max_contracts_held_all=Math.max(t,this._max_contracts_held_all),this._max_contracts_held_long=Math.max(r,this._max_contracts_held_long),this._max_contracts_held_short=Math.max(n,this._max_contracts_held_short)}updateHistoryOrders(e){this._historyOrders=e;const t=this._historyOrders.length;this._closedtrades=t;const[r,n,i,a,u,f]=this._historyOrders.reduce((c,h)=>{let[d,p,v,x,_,y]=c;const{profit:m=0,profit_percent:w=0}=h;return d+=m,p+=w,m<0?(v+=m,x+=w):(_+=m,y+=w),[d,p,v,x,_,y]},[0,0,0,0,0,0]);this._avg_trade_percent=t?n/t:void 0,this._netprofit=r,this._grossloss=i,this._grossloss_percent=a,this._grossprofit=u,this._grossprofit_percent=f,this._eventrades=this._historyOrders.filter(c=>c.profit===0).length,this._losstrades=this._historyOrders.filter(c=>(c.profit||0)<0).length,this._wintrades=this._historyOrders.filter(c=>(c.profit||0)>0).length}updateStrategyOptions(e){this._options=e}get long(){return"long"}get short(){return"short"}get account_currency(){return"USD"}get closedtrades(){return this._closedtrades}get opentrades(){return{opentrades:this._orders.length,capital_held:this._opentrades_capital_held}}get avg_losing_trade(){const e=this.losstrades;return e?Math.abs(this.grossloss/e):void 0}get avg_losing_trade_percent(){const e=this.losstrades;return e?Math.abs(this.grossloss_percent/e):void 0}get avg_trade(){if(this.closedtrades)return Math.abs(this.netprofit/this.closedtrades)}get equity(){return this.initial_capital+this.netprofit+this.openprofit}get netprofit(){return this._netprofit}get eventrades(){return this._eventrades}get openprofit(){return this._orders.reduce((e,t)=>{const{profit:r=0}=t;return e+r},0)}get avg_trade_percent(){return this._avg_trade_percent}get avg_winning_trade(){const e=this.wintrades;return e?Math.abs(this.grossprofit/e):void 0}get avg_winning_trade_percent(){const e=this.wintrades;return e?Math.abs(this.grossprofit_percent/e):void 0}get initial_capital(){var e;return((e=this._options)==null?void 0:e.initial_capital)||0}get losstrades(){return this._losstrades}get grossloss(){return this._grossloss}get grossloss_percent(){return this._grossloss_percent}get grossprofit(){return this._grossprofit}get grossprofit_percent(){return this._grossprofit_percent}get wintrades(){return this._wintrades}get margin_liquidation_price(){if(!this._options)return;const{initial_capital:e,margin_long:t=0,margin_short:r=0,commission_type:n,commission_value:i=0}=this._options,a=this._orders[0].direction===gt.long?1:-1,u=(a===1?t:r)/100;if(u<=0)return;const{close:f}=this._variables,[c,h]=this._orders.reduce((d,p)=>{let[v,x]=d;const{in_price:_,qty:y=0,original_qty:m=0}=p,w=_*y;if(v+=w,i){let D=0;switch(n){case Tr.percent:D=(w+y*f)*i/100;break;case Tr.cashPerContract:D=y*i*2;break;case Tr.cashPerOrder:D=y/m*i+i;break}x+=D}return[v,x]},[0,0]);return(c-(e+this.netprofit-h))*a/this.position_size/(1-a*u)}get max_contracts_held_all(){return this._max_contracts_held_all}get max_contracts_held_long(){return this._max_contracts_held_long}get max_contracts_held_short(){return this._max_contracts_held_short}get max_drawdown(){return this._max_drawdown}get max_runup(){return this._max_runup}get max_runup_percent(){return this._max_runup_percent}get max_drawdown_percent(){return this._max_drawdown_percent}get netprofit_percent(){return this.netprofit/this.initial_capital*100}get openprofit_percent(){return this.openprofit/(this.initial_capital+this.netprofit)*100}get position_avg_price(){return this._position_avg_price}get position_entry_name(){if(this._orders.length)return this._orders[0].id}get position_size(){return this._position_size}}class _w{constructor(e){U(this,"_preAccdist");U(this,"_preNvi");U(this,"_prePvi");U(this,"_preObv");U(this,"_prePvt");U(this,"_preWad");U(this,"_preVwap");U(this,"_preValue");U(this,"_currentData");U(this,"_preData");U(this,"_id");this._preAccdist=0,this._preNvi=0,this._prePvi=0,this._preObv=0,this._prePvt=0,this._preWad=0,this._preVwap={},this._preValue={},this._currentData={},this._preData={},this._id=e}update(e){this._preValue={},e.barIndex!==this._currentData.barIndex&&(this._preData={...this._currentData}),this._currentData={...e}}get isRealTime(){return this._preData.barIndex===this._currentData.barIndex}get accdist(){if(this._preValue.accdist)return this._preValue.accdist;const{close:e,low:t,high:r,volume:n}=this._currentData;if(r===t)return this._preAccdist;const i=(e-t-(r-e))/(r-t)*n+this._preAccdist;return!this.isRealTime&&(this._preAccdist=i),this._preValue.accdist=i,i}get iii(){if(this._preValue.iii)return this._preValue.iii;const{close:e,low:t,high:r,volume:n}=this._currentData,i=(2*e-r-t)/((r-t)*n);return this._preValue.iii=i,i}get nvi(){return this._preValue.nvi?this._preValue.nvi:this._getNvi()}get wvad(){if(this._preValue.wvad)return this._preValue.wvad;const{close:e,low:t,high:r,volume:n,open:i}=this._currentData,a=(e-i)/(r-t)*n;return this._preValue.wvad=a,a}get obv(){if(this._preValue.obv)return this._preValue.obv;const{close:e,volume:t}=this._currentData,{close:r}=this._preData;if(r===void 0){this._preObv=0;return}const n=Math.sign(e-r)*t+this._preObv;return!this.isRealTime&&(this._preObv=n),this._preValue.obv=n,n}get pvi(){return this._preValue.pvi?this._preValue.pvi:this._getPvi()}get tr(){if(this._preValue.tr)return this._preValue.tr;const{low:e,high:t}=this._currentData,{close:r}=this._preData;if(r===void 0)return;const n=Math.max(t-e,Math.abs(t-r),Math.abs(e-r));return this._preValue.tr=n,n}get pvt(){if(this._preValue.pvt)return this._preValue.pvt;const{close:e,volume:t}=this._currentData,{close:r}=this._preData;if(r===void 0){this._prePvt=0;return}const n=(e-r)/r*t+this._prePvt;return!this.isRealTime&&(this._prePvt=n),this._preValue.pvt=n,n}get wad(){if(this._preValue.wad)return this._preValue.wad;const{close:e,high:t,low:r}=this._currentData,{close:n}=this._preData;if(n===void 0)return this._preWad=0,0;const i=Math.max(t,n),a=Math.min(r,n),u=e-n,c=(u>0?e-a:u<0?e-i:0)+this._preWad;return!this.isRealTime&&(this._preWad=c),this._preValue.wad=c,c}get vwap(){var h,d;if(this._preValue.vwap)return this._preValue.vwap;const{hlc3:e,volume:t}=this._currentData;let{sum:r=0,sumV:n=0,isReset:i}=this._preVwap;if(((d=(h=self.workerStorage)==null?void 0:h.get(this._id))==null?void 0:d.buildInFunctions.timeframe.change({timeframe:"1D"},"vwap_buildin"))&&(i=!0,r=n=0),!i)return;const u=e*t+r,f=t+n;!this.isRealTime&&(this._preVwap={sum:u,sumV:f,isReset:i});const c=u/f;return this._preValue.vwap=c,c}_getNvi(){const e=this._preNvi||1,{close:t=0,volume:r=0}=this._preData,{close:n,volume:i}=this._currentData;let a=1;const u=e||1;return n&&t?a=i<r?u+(n-t)/t*u:u:a=u,!this.isRealTime&&(this._preNvi=a),this._preValue.nvi=a,a}_getPvi(){const e=this._prePvi||1,{close:t=0,volume:r=0}=this._preData,{close:n,volume:i}=this._currentData;let a=1;const u=e||1;return n&&t?a=i>r?u+(n-t)/t*u:u:a=u,!this.isRealTime&&(this._prePvi=a),this._preValue.pvi=a,a}}class vw{constructor(){U(this,"_period");U(this,"_multiplier");U(this,"_unit");this._period="1",this._multiplier=1,this._unit="m"}update(e){if(!e)return;this._period=e;const[t,r]=Ls(e);this._multiplier=t,this._unit=r}get isdaily(){return this._unit==="d"}get isdwm(){return["d","w","M"].includes(this._unit)}get isintraday(){return["s","m","h"].includes(this._unit)}get isminutes(){return this._unit==="m"}get ismonthly(){return this._unit==="M"}get isseconds(){return this._unit==="s"}get isweekly(){return this._unit==="w"}get multiplier(){return this._multiplier}get period(){return this._period}}class gw{constructor(e){U(this,"_variables");this._variables=e}get bg_color(){}get fg_color(){}get is_heikinashi(){return!1}get is_kagi(){return!1}get is_linebreak(){return!1}get is_pnf(){return!1}get is_range(){return!1}get is_renko(){return!1}get is_standard(){return!1}get left_visible_bar_time(){return this._variables.time}get right_visible_bar_time(){return this._variables.time}}class mw{constructor(e){U(this,"_variables");this._variables=e}get basecurrency(){return""}get country(){}get currency(){return"CNY"}get description(){return""}get employees(){return 100}get expiration_date(){}get industry(){}get minmove(){}get mintick(){}get pointvalue(){}get prefix(){}get pricescale(){}get recommendations_buy(){}get recommendations_buy_strong(){}get recommendations_date(){}get recommendations_hold(){}get recommendations_sell(){}get recommendations_sell_strong(){}get recommendations_total(){}get root(){return""}get sector(){}get session(){return qs.regular}get shareholders(){}get shares_outstanding_float(){}get shares_outstanding_total(){}get target_price_average(){}get target_price_date(){}get target_price_estimates(){}get target_price_high(){}get target_price_low(){}get target_price_median(){}get ticker(){}get tickerid(){}get timezone(){}get type(){}get volumetype(){return"n/a"}}class xw{constructor(e){U(this,"_variables");this._variables=e}get future_amount(){}get future_ex_date(){}get future_pay_date(){}}class yw{constructor(e){U(this,"_variables");this._variables=e}get future_eps(){}get future_period_end_time(){}get future_revenue(){}get future_time(){}}ot.extend(_1),ot.extend(yl),ot.extend(d1);class Oh{constructor(e){U(this,"_cacheData");U(this,"_barIndex");U(this,"_isRealTimeBar");U(this,"_barstate");U(this,"_priceVariables");U(this,"_lastBarIndex");U(this,"_currentBarTime");U(this,"_lastBarTime");U(this,"_period");U(this,"_offsetTime");U(this,"_timeframe");U(this,"_ta");U(this,"_polyline");U(this,"_label");U(this,"_line");U(this,"_linefill");U(this,"_box");U(this,"_table");U(this,"_strategy");U(this,"_session");U(this,"syminfo");U(this,"chart");U(this,"earnings");U(this,"dividends");U(this,"_timeTradingday");U(this,"_mintick");this._cacheData={varData:{},varNewData:{},varipData:{}},this._barIndex=0,this._lastBarIndex=0,this._currentBarTime=0,this._lastBarTime=0,this._offsetTime=0,this._period="",this._isRealTimeBar=!1,this._barstate=new hw,this._timeframe=new vw,this._priceVariables={close:0,open:0,low:0,high:0,volume:0},this._ta=new _w(e),this._polyline=new Ii,this._label=new Ii,this._line=new Ii,this._linefill=new Ii,this._box=new Ii,this._table=new Ii(1),this._strategy=new pw(this),this._session=new dw(this),this.syminfo=new mw(this),this.chart=new gw(this),this.earnings=new yw(this),this.dividends=new xw(this)}get table(){return this._table}get box(){return this._box}get linefill(){return this._linefill}get line(){return this._line}get polyline(){return this._polyline}get label(){return this._label}get ta(){return this._ta}get strategy(){return this._strategy}get session(){return this._session}get na(){}get last_bar_index(){return this._lastBarIndex}get bar_index(){return this._barIndex}get barstate(){return this._barstate}get close(){return this._priceVariables.close}get low(){return this._priceVariables.low}get open(){return this._priceVariables.open}get high(){return this._priceVariables.high}get volume(){return this._priceVariables.volume}get ohlc4(){const{close:e,open:t,high:r,low:n}=this._priceVariables;return(e+t+r+n)/4}get hl2(){const{high:e,low:t}=this._priceVariables;return(e+t)/2}get hlc3(){const{close:e,high:t,low:r}=this._priceVariables;return(e+t+r)/3}get hlcc4(){const{close:e,high:t,low:r}=this._priceVariables;return(e*2+t+r)/4}get hour(){return ot(this._currentBarTime).subtract(this._offsetTime,"hour").hour()}get minute(){return ot(this._currentBarTime).minute()}get second(){return ot(this._currentBarTime).second()}get month(){return ot(this._currentBarTime).month()+1}get year(){return ot(this._currentBarTime).year()}get dayofweek(){return ot(this._currentBarTime).day()+1}get dayofmonth(){return ot(this._currentBarTime).date()}get weekofyear(){return ot(this._currentBarTime).week()}get last_bar_time(){return this._lastBarTime}get time(){return this._currentBarTime}get time_close(){const[e,t]=Ls(this._period);return this._isRealTimeBar?void 0:ot(this._currentBarTime).add(e,t).valueOf()}get timenow(){return Date.now()}get time_tradingday(){return this._timeTradingday||this.getTimeTradingday(this._currentBarTime,this._period)}get timeframe(){return this._timeframe}get mintick(){return this._mintick}updateMaxLength(e){const{max_lines_count:t,max_labels_count:r,max_boxes_count:n,max_polylines_count:i}=e;n&&this._box.setMaxLen(n),r&&this._label.setMaxLen(r),t&&this._line.setMaxLen(t),i&&this._polyline.setMaxLen(i)}getTimeTradingday(e,t){const[r,n]=Ls(t),i=ot(e);return["M","w","y","d"].includes(n)?i.valueOf():(i.subtract(this._offsetTime,"h"),i.startOf("d").add(this._offsetTime,"h").valueOf())}updateOptions(e){const{interval:t="1D",offsetTime:r=5,mintick:n}=e;this._period=t,this._mintick=n,this._offsetTime=r,this._timeframe.update(t)}updateData(e){const{barIndex:t,c:r,o:n,h:i,l:a,volume:u,time:f,lastBarIndex:c,lastBarTime:h,complete:d,time_tradingday:p}=e;this._priceVariables={close:Number(r),open:Number(n),high:Number(i),low:Number(a),volume:Number(u)},this._isRealTimeBar=d,t>this._barIndex&&this._isRealTimeBar&&(this._cacheData.varData=this._cacheData.varNewData,this._cacheData.varNewData={}),this._timeTradingday=p,this._currentBarTime=f*1e3,this._lastBarIndex=c,this._barIndex=t,this._lastBarTime=h*1e3,this._barstate.update(t,c,d,!1),this.ta.update({...this._priceVariables,hlc3:this.hlc3,barIndex:t})}getCacheData(e,t,r){let n=this._cacheData[e]||[];n[this._barIndex]=r,n=n.filter(()=>!0);const i=n[n.length-1-t];return this._cacheData[e]=n,i}setCacheData(e,t){const r=this._cacheData[e]||[];r[this._barIndex]=t,this._cacheData[e]=r}getTypeInstance(e,t){return new l1(e,t)}getVarValue(e,t,r){const n=`${e}_${t}`,i=r==="var"?this._cacheData.varData[n]:this._cacheData.varipData[n];if(i)return i}setVarValue(e,t,r,n){const i=`${e}_${t}`;let a;switch(typeof r=="object"&&r&&(n="var",a=r.varipKeys),n){case"var":if(this._isRealTimeBar){const u=Yr.cloneDeep(r);if(this._cacheData.varNewData[i]=u,a&&a.length)for(const f of a)this._cacheData.varData[i][f]=u[f]}else this._cacheData.varData[i]=r;break;case"varip":this._cacheData.varipData[i]=r;break}return r}add(e,t){return Array.isArray(e)&&Array.isArray(t)?Yr.uniq([...e,...t]):typeof e=="number"||typeof t=="number"?Number(e)+Number(t):e+t}sub(e,t){return Array.isArray(e)&&Array.isArray(t)?e.filter(r=>!t.includes(r)):Number(e)-Number(t)}againAssignParse(e,t){var n;if(t)return;const r=(n=e==null?void 0:e.constructor)==null?void 0:n.name;if(r)switch(r){case hs.name:case Wf.name:case ps.name:case iu.name:case ds.name:case Fo.name:e==null||e.delete();break}}}class Ii{constructor(e=50){U(this,"_all");U(this,"_allInstance");U(this,"_pseudoArrayAll");U(this,"_maxLength");this._all=new Map,this._allInstance=new Map,this._pseudoArrayAll=new it,this._maxLength=e}setMaxLen(e){this._maxLength=e}get data(){return[...this._all.values()]}get all(){return this._pseudoArrayAll._value=[...this._allInstance.values()],this._pseudoArrayAll}add(e,t,r){this._all.set(e,t),this._allInstance.set(e,r);const n=[...this._all.keys()];if(n.length>this._maxLength){const i=n.shift();i&&this.delete(i)}}getValOfBarIndex(e){let t=[];const r=[...this._all.keys()];for(const n of e){const i=r.filter(a=>a.endsWith(`_${n}`));for(const a of i){const u=this._all.get(a);u&&t.push(u)}}return t.length?t:void 0}get(e){return this._all.get(e)}getInstance(e){return this._allInstance.get(e)}delete(e){this._all.delete(e),this._allInstance.delete(e)}}/**
76
+ `),x=this._runScripts(v,t,!0,i);return r==null||r.set(t,v),x}_getDependCodes(e,t,r,n,i){for(const a of e){if(!a.isArg){const u=t.filter(c=>{var h;return(h=c==null?void 0:c.depends)==null?void 0:h.some(d=>d.name===a.name&&d.scope===a.scope&&d.isAgainAssign)});for(const c of u){const{code:h,depends:d}=c;r.includes(h)||(r.unshift(h),d!=null&&d.length&&this._getDependCodes(d,t,r,n,i))}const f=t.find(c=>{var h;return((h=c.varNames)==null?void 0:h.split(", ").includes(a.name))&&(!a.isPreArg||a.isPreArg&&c.methodName===a.functionName)||c.funcName===a.name});if(f){const{code:c,depends:h}=f,d=r.findIndex(p=>p===c);d!==-1&&r.splice(d,1),r.unshift(c),h!=null&&h.length&&this._getDependCodes(h,t,r,n,i);continue}}i.some(u=>u.name===a.name)||i.push(a)}}_runScripts(e,t,r,n,i){const a=`${this._scriptId}_${t}`;let{builtInGather:u,buildinConstants:f,buildInFunctions:c,tradingvueFunc:h}=self.workerStorage.get(a)||{};return r&&(u=new Oh(a),f=new Uf,c=new Zf(this._variables.mintick||1e-4,u,this._scriptId),h=new Function("$_var","$_const","$_func","$paramsExpr","$posStr",e),self.workerStorage.set(a,{builtInGather:u,buildinConstants:f,buildInFunctions:c,tradingvueFunc:h})),h(u,f,c,n||[],t)}}let uw=class{constructor(){}prefix(e){var r;const{symbol:t}=e;return((r=t==null?void 0:t.split("."))==null?void 0:r[0])||""}ticker(e){var r;const{symbol:t}=e;return((r=t==null?void 0:t.split("."))==null?void 0:r[1])||""}};class lw{constructor(e){U(this,"_logs");U(this,"_variables");U(this,"_intlFormat");this._variables=e,this._logs=[],this._intlFormat=new Intl.NumberFormat("en-US")}get logs(){return this._logs}clearLogs(){this._logs=[]}info(e,t,r){this._addLog(e,t,"info",r)}error(e,t,r){this._addLog(e,t,"error",r)}warning(e,t,r){this._addLog(e,t,"warning",r)}_addLog(e,t,r,n){if(typeof t=="string"&&(n=t),n.startsWith("export"))return;const{message:i,formatString:a}=e,{time:u,bar_index:f}=this._variables;let c=i;a&&Array.isArray(t)&&t.length&&(c=a.replace(/{(\d+)}/g,(h,d)=>{let p=t[d];return typeof p=="number"&&(p=this._intlFormat.format(parseFloat(p.toFixed(3)))),p!==void 0?p:h})),c&&this._logs.push({message:`[${ot(u).format()}]: ${c}`,time:u,barIndex:f,type:r})}}class cw{constructor(e){U(this,"_errorListener");this._errorListener=e}error({message:e},t){t.startsWith("export")||this._errorListener.addError(e,t,Ve.Error)}}class fw{constructor(){U(this,"_errors");this._errors=new Map}clear(){this._errors.clear()}get errors(){return Yr.flatMap([...this._errors.values()])}addError(e,t,r,n=0){const[i,a]=t.split("_").slice(-2),u=this._errors.get(t),f={message:e,endLineNumber:Number(i),startColumn:Number(a)+1,endColumn:Number(a)+n+1,startLineNumber:Number(i),type:r};u?u.push(f):this._errors.set(t,[f])}}class hw{constructor(){U(this,"_isMarketOpen");U(this,"_currentBarIndex");U(this,"_totalBarIndex");U(this,"_isRealTimeBar");U(this,"_preBarIndex");this._currentBarIndex=0,this._totalBarIndex=0,this._isRealTimeBar=!1,this._preBarIndex=0,this._isMarketOpen=!0}update(e,t,r,n){this._preBarIndex=this._currentBarIndex,this._currentBarIndex=e,this._totalBarIndex=t,this._isRealTimeBar=r,this._isMarketOpen=n}get isnew(){return!this._isRealTimeBar||this._preBarIndex!==this._currentBarIndex}get islast(){return this._currentBarIndex===this._totalBarIndex}get isfirst(){return this._currentBarIndex===0}get ishistory(){return!this._isRealTimeBar}get isrealtime(){return this._isRealTimeBar}get isconfirmed(){return!this._isRealTimeBar}get islastconfirmedhistory(){return this._isMarketOpen?this._currentBarIndex===this._totalBarIndex-1:this._currentBarIndex===this._totalBarIndex}}class dw{constructor(e){U(this,"_variables");this._variables=e}get isfirstbar(){return this._variables.timeframe.isdwm?!0:this._variables.time===this._variables.time_tradingday}get isfirstbar_regular(){return this._variables.timeframe.isdwm?!0:this._variables.time===this._variables.time_tradingday}get islastbar(){if(this._variables.timeframe.isdwm)return!0;const e=pn(this._variables.timeframe.period);return this._variables.time+e===this._variables.time_tradingday+24*60*60*1e3}get islastbar_regular(){if(this._variables.timeframe.isdwm)return!0;const e=pn(this._variables.timeframe.period);return this._variables.time+e===this._variables.time_tradingday+24*60*60*1e3}get ismarket(){return!0}get ispostmarket(){return!1}get ispremarket(){return!1}}class pw{constructor(e){U(this,"_orders");U(this,"_historyOrders");U(this,"_options");U(this,"_max_contracts_held_all",0);U(this,"_max_contracts_held_long",0);U(this,"_max_contracts_held_short",0);U(this,"_max_drawdown",0);U(this,"_max_runup",0);U(this,"_max_runup_percent",0);U(this,"_max_drawdown_percent",0);U(this,"_variables");U(this,"_netprofit",0);U(this,"_eventrades",0);U(this,"_avg_trade_percent");U(this,"_closedtrades",0);U(this,"_losstrades",0);U(this,"_grossloss",0);U(this,"_grossloss_percent",0);U(this,"_grossprofit",0);U(this,"_grossprofit_percent",0);U(this,"_wintrades",0);U(this,"_opentrades_capital_held",0);U(this,"_position_avg_price",0);U(this,"_position_size",0);this._orders=[],this._historyOrders=[],this._variables=e}update(){this._calcMaxDrawdownAndMaxRunup()}_calcMaxDrawdownAndMaxRunup(){let e=0,t=0;const{high:r,low:n}=this._variables;for(const c of this._orders){const{in_price:h,qty:d=0,commission:p=0,original_qty:v=0,direction:x}=c,_=x===gt.long?1:-1,y=(r-h)*d,m=(n-h)*d,w=_===1?y:-m,D=_===1?-m:y;e+=D+p*d/v,t+=w+p*d/v}const[i,a]=this._historyOrders.reduce((c,h)=>{let[d,p]=c;const{profit:v=0,commission:x=0}=h;return d+=v,p+=v-x,[d,p]},[0,0]);e-=i,t+=a;const u=e/(this.initial_capital+this.netprofit)*100;this._max_drawdown<e&&(this._max_drawdown=e),u>this._max_drawdown_percent&&(this._max_drawdown_percent=u);const f=t/(this.initial_capital+this.netprofit)*100;t>this._max_runup&&(this._max_runup=t),f>this._max_runup_percent&&(this._max_runup_percent=f)}updateOrders(e){this._orders=e,this._calcMaxContracts()}_calcMaxContracts(){const e=this._orders.length;if(!e)return;const[t,r,n,i,a,u]=this._orders.reduce(([f,c,h,d,p,v],x)=>{const{direction:_,qty:y=0,in_price:m}=x;return _===gt.long?(f+=y,c+=y,v+=y):(f+=y,h+=y,v-=y),d+=y*m,p+=m,[f,c,h,d,p,v]},[0,0,0,0,0,0]);this._position_size=u,this._position_avg_price=a/e,this._opentrades_capital_held=i,this._max_contracts_held_all=Math.max(t,this._max_contracts_held_all),this._max_contracts_held_long=Math.max(r,this._max_contracts_held_long),this._max_contracts_held_short=Math.max(n,this._max_contracts_held_short)}updateHistoryOrders(e){this._historyOrders=e;const t=this._historyOrders.length;this._closedtrades=t;const[r,n,i,a,u,f]=this._historyOrders.reduce((c,h)=>{let[d,p,v,x,_,y]=c;const{profit:m=0,profit_percent:w=0}=h;return d+=m,p+=w,m<0?(v+=m,x+=w):(_+=m,y+=w),[d,p,v,x,_,y]},[0,0,0,0,0,0]);this._avg_trade_percent=t?n/t:void 0,this._netprofit=r,this._grossloss=i,this._grossloss_percent=a,this._grossprofit=u,this._grossprofit_percent=f,this._eventrades=this._historyOrders.filter(c=>c.profit===0).length,this._losstrades=this._historyOrders.filter(c=>(c.profit||0)<0).length,this._wintrades=this._historyOrders.filter(c=>(c.profit||0)>0).length}updateStrategyOptions(e){this._options=e}get long(){return"long"}get short(){return"short"}get account_currency(){return"USD"}get closedtrades(){return this._closedtrades}get opentrades(){return{opentrades:this._orders.length,capital_held:this._opentrades_capital_held}}get avg_losing_trade(){const e=this.losstrades;return e?Math.abs(this.grossloss/e):void 0}get avg_losing_trade_percent(){const e=this.losstrades;return e?Math.abs(this.grossloss_percent/e):void 0}get avg_trade(){if(this.closedtrades)return Math.abs(this.netprofit/this.closedtrades)}get equity(){return this.initial_capital+this.netprofit+this.openprofit}get netprofit(){return this._netprofit}get eventrades(){return this._eventrades}get openprofit(){return this._orders.reduce((e,t)=>{const{profit:r=0}=t;return e+r},0)}get avg_trade_percent(){return this._avg_trade_percent}get avg_winning_trade(){const e=this.wintrades;return e?Math.abs(this.grossprofit/e):void 0}get avg_winning_trade_percent(){const e=this.wintrades;return e?Math.abs(this.grossprofit_percent/e):void 0}get initial_capital(){var e;return((e=this._options)==null?void 0:e.initial_capital)||0}get losstrades(){return this._losstrades}get grossloss(){return this._grossloss}get grossloss_percent(){return this._grossloss_percent}get grossprofit(){return this._grossprofit}get grossprofit_percent(){return this._grossprofit_percent}get wintrades(){return this._wintrades}get margin_liquidation_price(){if(!this._options)return;const{initial_capital:e,margin_long:t=0,margin_short:r=0,commission_type:n,commission_value:i=0}=this._options,a=this._orders[0].direction===gt.long?1:-1,u=(a===1?t:r)/100;if(u<=0)return;const{close:f}=this._variables,[c,h]=this._orders.reduce((d,p)=>{let[v,x]=d;const{in_price:_,qty:y=0,original_qty:m=0}=p,w=_*y;if(v+=w,i){let D=0;switch(n){case Tr.percent:D=(w+y*f)*i/100;break;case Tr.cashPerContract:D=y*i*2;break;case Tr.cashPerOrder:D=y/m*i+i;break}x+=D}return[v,x]},[0,0]);return(c-(e+this.netprofit-h))*a/this.position_size/(1-a*u)}get max_contracts_held_all(){return this._max_contracts_held_all}get max_contracts_held_long(){return this._max_contracts_held_long}get max_contracts_held_short(){return this._max_contracts_held_short}get max_drawdown(){return this._max_drawdown}get max_runup(){return this._max_runup}get max_runup_percent(){return this._max_runup_percent}get max_drawdown_percent(){return this._max_drawdown_percent}get netprofit_percent(){return this.netprofit/this.initial_capital*100}get openprofit_percent(){return this.openprofit/(this.initial_capital+this.netprofit)*100}get position_avg_price(){return this._position_avg_price}get position_entry_name(){if(this._orders.length)return this._orders[0].id}get position_size(){return this._position_size}}class _w{constructor(e){U(this,"_preAccdist");U(this,"_preNvi");U(this,"_prePvi");U(this,"_preObv");U(this,"_prePvt");U(this,"_preWad");U(this,"_preVwap");U(this,"_preValue");U(this,"_currentData");U(this,"_preData");U(this,"_id");this._preAccdist=0,this._preNvi=0,this._prePvi=0,this._preObv=0,this._prePvt=0,this._preWad=0,this._preVwap={},this._preValue={},this._currentData={},this._preData={},this._id=e}update(e){this._preValue={},e.barIndex!==this._currentData.barIndex&&(this._preData={...this._currentData}),this._currentData={...e}}get isRealTime(){return this._preData.barIndex===this._currentData.barIndex}get accdist(){if(this._preValue.accdist)return this._preValue.accdist;const{close:e,low:t,high:r,volume:n}=this._currentData;if(r===t)return this._preAccdist;const i=(e-t-(r-e))/(r-t)*n+this._preAccdist;return!this.isRealTime&&(this._preAccdist=i),this._preValue.accdist=i,i}get iii(){if(this._preValue.iii)return this._preValue.iii;const{close:e,low:t,high:r,volume:n}=this._currentData,i=(2*e-r-t)/((r-t)*n);return this._preValue.iii=i,i}get nvi(){return this._preValue.nvi?this._preValue.nvi:this._getNvi()}get wvad(){if(this._preValue.wvad)return this._preValue.wvad;const{close:e,low:t,high:r,volume:n,open:i}=this._currentData,a=(e-i)/(r-t)*n;return this._preValue.wvad=a,a}get obv(){if(this._preValue.obv)return this._preValue.obv;const{close:e,volume:t}=this._currentData,{close:r}=this._preData;if(r===void 0){this._preObv=0;return}const n=Math.sign(e-r)*t+this._preObv;return!this.isRealTime&&(this._preObv=n),this._preValue.obv=n,n}get pvi(){return this._preValue.pvi?this._preValue.pvi:this._getPvi()}get tr(){if(this._preValue.tr)return this._preValue.tr;const{low:e,high:t}=this._currentData,{close:r}=this._preData;if(r===void 0)return;const n=Math.max(t-e,Math.abs(t-r),Math.abs(e-r));return this._preValue.tr=n,n}get pvt(){if(this._preValue.pvt)return this._preValue.pvt;const{close:e,volume:t}=this._currentData,{close:r}=this._preData;if(r===void 0){this._prePvt=0;return}const n=(e-r)/r*t+this._prePvt;return!this.isRealTime&&(this._prePvt=n),this._preValue.pvt=n,n}get wad(){if(this._preValue.wad)return this._preValue.wad;const{close:e,high:t,low:r}=this._currentData,{close:n}=this._preData;if(n===void 0)return this._preWad=0,0;const i=Math.max(t,n),a=Math.min(r,n),u=e-n,c=(u>0?e-a:u<0?e-i:0)+this._preWad;return!this.isRealTime&&(this._preWad=c),this._preValue.wad=c,c}get vwap(){var h,d;if(this._preValue.vwap)return this._preValue.vwap;const{hlc3:e,volume:t}=this._currentData;let{sum:r=0,sumV:n=0,isReset:i}=this._preVwap;if(((d=(h=self.workerStorage)==null?void 0:h.get(this._id))==null?void 0:d.buildInFunctions.timeframe.change({timeframe:"1D"},"vwap_buildin"))&&(i=!0,r=n=0),!i)return;const u=e*t+r,f=t+n;!this.isRealTime&&(this._preVwap={sum:u,sumV:f,isReset:i});const c=u/f;return this._preValue.vwap=c,c}_getNvi(){const e=this._preNvi||1,{close:t=0,volume:r=0}=this._preData,{close:n,volume:i}=this._currentData;let a=1;const u=e||1;return n&&t?a=i<r?u+(n-t)/t*u:u:a=u,!this.isRealTime&&(this._preNvi=a),this._preValue.nvi=a,a}_getPvi(){const e=this._prePvi||1,{close:t=0,volume:r=0}=this._preData,{close:n,volume:i}=this._currentData;let a=1;const u=e||1;return n&&t?a=i>r?u+(n-t)/t*u:u:a=u,!this.isRealTime&&(this._prePvi=a),this._preValue.pvi=a,a}}class vw{constructor(){U(this,"_period");U(this,"_multiplier");U(this,"_unit");this._period="1",this._multiplier=1,this._unit="m"}update(e){if(!e)return;this._period=e;const[t,r]=Ls(e);this._multiplier=t,this._unit=r}get isdaily(){return this._unit==="d"}get isdwm(){return["d","w","M"].includes(this._unit)}get isintraday(){return["s","m","h"].includes(this._unit)}get isminutes(){return this._unit==="m"}get ismonthly(){return this._unit==="M"}get isseconds(){return this._unit==="s"}get isweekly(){return this._unit==="w"}get multiplier(){return this._multiplier}get period(){return this._period}}class gw{constructor(e){U(this,"_variables");this._variables=e}get bg_color(){}get fg_color(){}get is_heikinashi(){return!1}get is_kagi(){return!1}get is_linebreak(){return!1}get is_pnf(){return!1}get is_range(){return!1}get is_renko(){return!1}get is_standard(){return!1}get left_visible_bar_time(){return this._variables.time}get right_visible_bar_time(){return this._variables.time}}class mw{constructor(e){U(this,"_variables");this._variables=e}get basecurrency(){return""}get country(){}get currency(){return"CNY"}get description(){return""}get employees(){return 100}get expiration_date(){}get industry(){}get minmove(){}get mintick(){}get pointvalue(){}get prefix(){}get pricescale(){}get recommendations_buy(){}get recommendations_buy_strong(){}get recommendations_date(){}get recommendations_hold(){}get recommendations_sell(){}get recommendations_sell_strong(){}get recommendations_total(){}get root(){return""}get sector(){}get session(){return qs.regular}get shareholders(){}get shares_outstanding_float(){}get shares_outstanding_total(){}get target_price_average(){}get target_price_date(){}get target_price_estimates(){}get target_price_high(){}get target_price_low(){}get target_price_median(){}get ticker(){}get tickerid(){}get timezone(){}get type(){}get volumetype(){return"n/a"}}class xw{constructor(e){U(this,"_variables");this._variables=e}get future_amount(){}get future_ex_date(){}get future_pay_date(){}}class yw{constructor(e){U(this,"_variables");this._variables=e}get future_eps(){}get future_period_end_time(){}get future_revenue(){}get future_time(){}}ot.extend(_1),ot.extend(yl),ot.extend(d1);class Oh{constructor(e){U(this,"_cacheData");U(this,"_barIndex");U(this,"_isRealTimeBar");U(this,"_barstate");U(this,"_priceVariables");U(this,"_lastBarIndex");U(this,"_currentBarTime");U(this,"_lastBarTime");U(this,"_period");U(this,"_offsetTime");U(this,"_timeframe");U(this,"_ta");U(this,"_polyline");U(this,"_label");U(this,"_line");U(this,"_linefill");U(this,"_box");U(this,"_table");U(this,"_strategy");U(this,"_session");U(this,"syminfo");U(this,"chart");U(this,"earnings");U(this,"dividends");U(this,"_timeTradingday");U(this,"_mintick");this._cacheData={varData:{},varNewData:{},varipData:{}},this._barIndex=0,this._lastBarIndex=0,this._currentBarTime=0,this._lastBarTime=0,this._offsetTime=0,this._period="",this._isRealTimeBar=!1,this._barstate=new hw,this._timeframe=new vw,this._priceVariables={close:0,open:0,low:0,high:0,volume:0},this._ta=new _w(e),this._polyline=new Ii,this._label=new Ii,this._line=new Ii,this._linefill=new Ii,this._box=new Ii,this._table=new Ii(1),this._strategy=new pw(this),this._session=new dw(this),this.syminfo=new mw(this),this.chart=new gw(this),this.earnings=new yw(this),this.dividends=new xw(this)}get table(){return this._table}get box(){return this._box}get linefill(){return this._linefill}get line(){return this._line}get polyline(){return this._polyline}get label(){return this._label}get ta(){return this._ta}get strategy(){return this._strategy}get session(){return this._session}get na(){}get last_bar_index(){return this._lastBarIndex}get bar_index(){return this._barIndex}get barstate(){return this._barstate}get close(){return this._priceVariables.close}get low(){return this._priceVariables.low}get open(){return this._priceVariables.open}get high(){return this._priceVariables.high}get volume(){return this._priceVariables.volume}get ohlc4(){const{close:e,open:t,high:r,low:n}=this._priceVariables;return(e+t+r+n)/4}get hl2(){const{high:e,low:t}=this._priceVariables;return(e+t)/2}get hlc3(){const{close:e,high:t,low:r}=this._priceVariables;return(e+t+r)/3}get hlcc4(){const{close:e,high:t,low:r}=this._priceVariables;return(e*2+t+r)/4}get hour(){return ot(this._currentBarTime).subtract(this._offsetTime,"hour").hour()}get minute(){return ot(this._currentBarTime).minute()}get second(){return ot(this._currentBarTime).second()}get month(){return ot(this._currentBarTime).month()+1}get year(){return ot(this._currentBarTime).year()}get dayofweek(){return ot(this._currentBarTime).day()+1}get dayofmonth(){return ot(this._currentBarTime).date()}get weekofyear(){return ot(this._currentBarTime).week()}get last_bar_time(){return this._lastBarTime}get time(){return this._currentBarTime}get time_close(){const[e,t]=Ls(this._period);return this._isRealTimeBar?void 0:ot(this._currentBarTime).add(e,t).valueOf()}get timenow(){return Date.now()}get time_tradingday(){return this._timeTradingday||this.getTimeTradingday(this._currentBarTime,this._period)}get timeframe(){return this._timeframe}get mintick(){return this._mintick}updateMaxLength(e){const{max_lines_count:t,max_labels_count:r,max_boxes_count:n,max_polylines_count:i}=e;n&&this._box.setMaxLen(n),r&&this._label.setMaxLen(r),t&&this._line.setMaxLen(t),i&&this._polyline.setMaxLen(i)}getTimeTradingday(e,t){const[r,n]=Ls(t),i=ot(e);return["M","w","y","d"].includes(n)?i.valueOf():(i.subtract(this._offsetTime,"h"),i.startOf("d").add(this._offsetTime,"h").valueOf())}updateOptions(e){const{interval:t="1D",offsetTime:r=5,mintick:n}=e;this._period=t,this._mintick=n,this._offsetTime=r,this._timeframe.update(t)}updateData(e){const{barIndex:t,c:r,o:n,h:i,l:a,volume:u,time:f,lastBarIndex:c,lastBarTime:h,complete:d,time_tradingday:p}=e;this._priceVariables={close:Number(r),open:Number(n),high:Number(i),low:Number(a),volume:Number(u)},this._isRealTimeBar=d,t>this._barIndex&&this._isRealTimeBar&&(this._cacheData.varData=this._cacheData.varNewData,this._cacheData.varNewData={}),this._timeTradingday=p,this._currentBarTime=f*1e3,this._lastBarIndex=c,this._barIndex=t,this._lastBarTime=h*1e3,this._barstate.update(t,c,d,!1),this.ta.update({...this._priceVariables,hlc3:this.hlc3,barIndex:t})}getCacheData(e,t,r){let n=this._cacheData[e]||[];n[this._barIndex]=r,n=n.filter(()=>!0);const i=n[n.length-1-t];return this._cacheData[e]=n,i}setCacheData(e,t){const r=this._cacheData[e]||[];r[this._barIndex]=t,this._cacheData[e]=r}getTypeInstance(e,t){return new l1(e,t)}getVarValue(e,t,r){const n=`${e}_${t}`,i=r==="var"?this._cacheData.varData[n]:this._cacheData.varipData[n];if(i)return i}setVarValue(e,t,r,n){const i=`${e}_${t}`;let a;switch(typeof r=="object"&&r&&(n="var",a=r.varipKeys),n){case"var":if(this._isRealTimeBar){const u=Yr.cloneDeep(r);if(this._cacheData.varNewData[i]=u,a&&a.length)for(const f of a)this._cacheData.varData[i][f]=u[f]}else this._cacheData.varData[i]=r;break;case"varip":this._cacheData.varipData[i]=r;break}return r}add(e,t){return Array.isArray(e)&&Array.isArray(t)?Yr.uniq([...e,...t]):typeof e=="number"||typeof t=="number"?Number(e)+Number(t):e+t}sub(e,t){return Array.isArray(e)&&Array.isArray(t)?e.filter(r=>!t.includes(r)):Number(e)-Number(t)}againAssignParse(e,t){var n;if(t)return;const r=(n=e==null?void 0:e.constructor)==null?void 0:n.name;if(r)switch(r){case hs.name:case Wf.name:case ps.name:case iu.name:case ds.name:case Fo.name:e==null||e.delete();break}}}class Ii{constructor(e=50){U(this,"_all");U(this,"_allInstance");U(this,"_pseudoArrayAll");U(this,"_maxLength");this._all=new Map,this._allInstance=new Map,this._pseudoArrayAll=new it,this._maxLength=e}setMaxLen(e){this._maxLength=e}get data(){return[...this._all.values()]}get all(){return this._pseudoArrayAll._value=[...this._allInstance.values()],this._pseudoArrayAll}add(e,t,r){this._all.set(e,t),this._allInstance.set(e,r);const n=[...this._all.keys()];if(n.length>this._maxLength){const i=n.shift();i&&this.delete(i)}}getValOfBarIndex(e){let t=[];const r=[...this._all.keys()];for(const n of e){const i=r.filter(a=>a.endsWith(`_${n}`));for(const a of i){const u=this._all.get(a);u&&t.push(u)}}return t.length?t:void 0}get(e){return this._all.get(e)}getInstance(e){return this._allInstance.get(e)}delete(e){this._all.delete(e),this._allInstance.delete(e)}}/**
77
77
  * @license
78
78
  * Copyright 2019 Google LLC
79
79
  * SPDX-License-Identifier: Apache-2.0
@@ -67519,14 +67519,14 @@ function ar(a, n, r) {
67519
67519
  function lh() {
67520
67520
  return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
67521
67521
  }
67522
- const Fp = new Worker(new URL("" + new URL("assets/scriptsRunWorker-BVhOx7VR.js", import.meta.url).href, import.meta.url), { type: "module", name: "Run TccScript Server" });
67522
+ const Fp = new Worker(new URL("" + new URL("assets/scriptsRunWorker-BkABSL0t.js", import.meta.url).href, import.meta.url), { type: "module", name: "Run TccScript Server" });
67523
67523
  Fp.onerror = (a) => {
67524
67524
  console.error(a);
67525
67525
  };
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-ono7xCBD.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-QI8fZVSI.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-BVhOx7VR.js").href:new URL("assets/scriptsRunWorker-BVhOx7VR.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-ono7xCBD.js").href:new URL("assets/parserTccWorker-ono7xCBD.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-BkABSL0t.js").href:new URL("assets/scriptsRunWorker-BkABSL0t.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-QI8fZVSI.js").href:new URL("assets/parserTccWorker-QI8fZVSI.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.110",
3
+ "version": "0.0.111",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "lib"