@guihz/trading-vue-editor-tes 0.0.277 → 0.0.278
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/assets/{parserTccWorker-BCVw4E3z.js → parserTccWorker-Dyt1RfsF.js} +58 -63
- package/lib/assets/{scriptsRunWorker-CsFlwqZT.js → scriptsRunWorker-DL1JWcP8.js} +25 -25
- package/lib/{type-B7TbDTjv.js → comlink-CgsQ4LSo.js} +46 -46
- package/lib/{type-CsI9kzgl.cjs → comlink-LPC9l24C.cjs} +2 -2
- package/lib/components/editor/parseScript/buildInFuncNamespace/array.d.ts +5 -2
- package/lib/components/editor/parseScript/buildInFuncNamespace/math.d.ts +1 -1
- package/lib/components/editor/parseScript/buildInFuncNamespace/matrix.d.ts +6 -3
- package/lib/components/editor/parseScript/buildInFuncNamespace/timeframe.d.ts +1 -1
- package/lib/components/editor/parseScript/buildInFunction.d.ts +1 -1
- package/lib/components/editor/parseScript/userTypeClass.d.ts +1 -3
- package/lib/components/editor/parseScript/utils.d.ts +1 -0
- package/lib/components/editor/parseScript/visitorParser.d.ts +1 -0
- package/lib/tccParser/tccScriptParserVisitor.d.ts +7 -0
- package/lib/trading-vue-editor.cjs.methods.mjs +19 -20
- package/lib/trading-vue-editor.cjs.packages.mjs +4 -3
- package/lib/trading-vue-editor.es.methods.js +6372 -6330
- package/lib/trading-vue-editor.es.packages.js +6 -5
- package/package.json +1 -1
@@ -4303,6 +4303,10 @@ const v_ = [
|
|
4303
4303
|
"or",
|
4304
4304
|
"to"
|
4305
4305
|
];
|
4306
|
+
var Xo;
|
4307
|
+
(function(a) {
|
4308
|
+
a[a.Hint = 1] = "Hint", a[a.Info = 2] = "Info", a[a.Warning = 4] = "Warning", a[a.Error = 8] = "Error";
|
4309
|
+
})(Xo || (Xo = {}));
|
4306
4310
|
/**
|
4307
4311
|
* @license
|
4308
4312
|
* Copyright 2019 Google LLC
|
@@ -4467,7 +4471,7 @@ function Di(a, b = [], s = function() {
|
|
4467
4471
|
}).then(xe);
|
4468
4472
|
if (rn === "bind")
|
4469
4473
|
return Di(a, b.slice(0, -1));
|
4470
|
-
const [nn, J] =
|
4474
|
+
const [nn, J] = Jo(fn);
|
4471
4475
|
return He(a, {
|
4472
4476
|
type: "APPLY",
|
4473
4477
|
path: b.map((k) => k.toString()),
|
@@ -4476,7 +4480,7 @@ function Di(a, b = [], s = function() {
|
|
4476
4480
|
},
|
4477
4481
|
construct(Wn, N) {
|
4478
4482
|
or(Y);
|
4479
|
-
const [fn, rn] =
|
4483
|
+
const [fn, rn] = Jo(N);
|
4480
4484
|
return He(a, {
|
4481
4485
|
type: "CONSTRUCT",
|
4482
4486
|
path: b.map((nn) => nn.toString()),
|
@@ -4489,7 +4493,7 @@ function Di(a, b = [], s = function() {
|
|
4489
4493
|
function s_(a) {
|
4490
4494
|
return Array.prototype.concat.apply([], a);
|
4491
4495
|
}
|
4492
|
-
function
|
4496
|
+
function Jo(a) {
|
4493
4497
|
const b = a.map(hr);
|
4494
4498
|
return [b.map((s) => s[0]), s_(b.map((s) => s[1]))];
|
4495
4499
|
}
|
@@ -4540,55 +4544,51 @@ function He(a, b, s) {
|
|
4540
4544
|
function c_() {
|
4541
4545
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
4542
4546
|
}
|
4543
|
-
var Jo;
|
4544
|
-
(function(a) {
|
4545
|
-
a[a.Hint = 1] = "Hint", a[a.Info = 2] = "Info", a[a.Warning = 4] = "Warning", a[a.Error = 8] = "Error";
|
4546
|
-
})(Jo || (Jo = {}));
|
4547
4547
|
export {
|
4548
4548
|
Do as A,
|
4549
|
-
|
4550
|
-
|
4551
|
-
|
4552
|
-
|
4553
|
-
|
4554
|
-
|
4555
|
-
|
4556
|
-
|
4557
|
-
|
4558
|
-
|
4559
|
-
|
4560
|
-
|
4561
|
-
|
4562
|
-
|
4549
|
+
Wo as B,
|
4550
|
+
Po as C,
|
4551
|
+
Fo as D,
|
4552
|
+
d_ as E,
|
4553
|
+
Go as F,
|
4554
|
+
mo as G,
|
4555
|
+
$o as H,
|
4556
|
+
Vo as I,
|
4557
|
+
w_ as J,
|
4558
|
+
Zo as K,
|
4559
|
+
y_ as L,
|
4560
|
+
a_ as M,
|
4561
|
+
l_ as N,
|
4562
|
+
vo as O,
|
4563
4563
|
m_ as R,
|
4564
4564
|
v_ as S,
|
4565
4565
|
b_ as T,
|
4566
|
-
|
4566
|
+
Xo as V,
|
4567
4567
|
__ as W,
|
4568
|
-
|
4569
|
-
|
4570
|
-
|
4571
|
-
|
4572
|
-
|
4573
|
-
|
4574
|
-
|
4575
|
-
|
4568
|
+
h_ as a,
|
4569
|
+
Dn as b,
|
4570
|
+
ht as c,
|
4571
|
+
So as d,
|
4572
|
+
zo as e,
|
4573
|
+
Ko as f,
|
4574
|
+
p_ as g,
|
4575
|
+
bo as h,
|
4576
4576
|
Eo as i,
|
4577
|
-
|
4578
|
-
|
4577
|
+
qo as j,
|
4578
|
+
Ho as k,
|
4579
4579
|
g_ as l,
|
4580
|
-
|
4581
|
-
|
4582
|
-
|
4583
|
-
|
4584
|
-
|
4585
|
-
|
4586
|
-
|
4587
|
-
|
4588
|
-
|
4589
|
-
|
4590
|
-
|
4591
|
-
|
4592
|
-
|
4593
|
-
|
4580
|
+
Mo as m,
|
4581
|
+
Io as n,
|
4582
|
+
Uo as o,
|
4583
|
+
No as p,
|
4584
|
+
yo as q,
|
4585
|
+
wo as r,
|
4586
|
+
xo as s,
|
4587
|
+
Ao as t,
|
4588
|
+
To as u,
|
4589
|
+
Co as v,
|
4590
|
+
Oo as w,
|
4591
|
+
Lo as x,
|
4592
|
+
Ro as y,
|
4593
|
+
Bo as z
|
4594
4594
|
};
|
@@ -24,8 +24,8 @@ __p += '`),$&&(v+=`' +
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
25
25
|
`:`;
|
26
26
|
`)+v+`return __p
|
27
|
-
}`;var C=po(function(){return B(o,w+"return "+v).apply(s,l)});if(C.source=v,Ei(C))throw C;return C}function Lg(n){return N(n).toLowerCase()}function Rg(n){return N(n).toUpperCase()}function $g(n,e,t){if(n=N(n),n&&(t||e===s))return xa(n);if(!n||!(e=_n(e)))return n;var r=$n(n),i=$n(e),o=Ea(r,i),l=Aa(r,i)+1;return se(r,o,l).join("")}function Bg(n,e,t){if(n=N(n),n&&(t||e===s))return n.slice(0,Ia(n)+1);if(!n||!(e=_n(e)))return n;var r=$n(n),i=Aa(r,$n(e))+1;return se(r,0,i).join("")}function Ng(n,e,t){if(n=N(n),n&&(t||e===s))return n.replace(Er,"");if(!n||!(e=_n(e)))return n;var r=$n(n),i=Ea(r,$n(e));return se(r,i).join("")}function Pg(n,e){var t=So,r=Co;if(H(e)){var i="separator"in e?e.separator:i;t="length"in e?S(e.length):t,r="omission"in e?_n(e.omission):r}n=N(n);var o=n.length;if(Oe(n)){var l=$n(n);o=l.length}if(t>=o)return n;var f=t-Le(r);if(f<1)return r;var h=l?se(l,0,f).join(""):n.slice(0,f);if(i===s)return h+r;if(l&&(f+=h.length-f),Ai(i)){if(n.slice(f).search(i)){var d,_=h;for(i.global||(i=Ur(i.source,N(zi.exec(i))+"g")),i.lastIndex=0;d=i.exec(_);)var v=d.index;h=h.slice(0,v===s?f:v)}}else if(n.indexOf(_n(i),f)!=f){var m=h.lastIndexOf(i);m>-1&&(h=h.slice(0,m))}return h+r}function Mg(n){return n=N(n),n&&Yo.test(n)?n.replace(qi,fl):n}var Dg=De(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Si=gu("toUpperCase");function ho(n,e,t){return n=N(n),e=t?s:e,e===s?al(n)?pl(n):ks(n):n.match(e)||[]}var po=O(function(n,e){try{return gn(n,s,e)}catch(t){return Ei(t)?t:new T(t)}}),Wg=Jn(function(n,e){return En(e,function(t){t=Hn(t),Xn(n,t,bi(n[t],n))}),n});function Fg(n){var e=n==null?0:n.length,t=x();return n=e?q(n,function(r){if(typeof r[1]!="function")throw new An(P);return[t(r[0]),r[1]]}):[],O(function(r){for(var i=-1;++i<e;){var o=n[i];if(gn(o[0],this,r))return gn(o[1],this,r)}})}function Ug(n){return cf(In(n,k))}function Ci(n){return function(){return n}}function qg(n,e){return n==null||n!==n?e:n}var Hg=_u(),Gg=_u(!0);function pn(n){return n}function Oi(n){return Ya(typeof n=="function"?n:In(n,k))}function zg(n){return Za(In(n,k))}function Kg(n,e){return Ja(n,In(e,k))}var Yg=O(function(n,e){return function(t){return at(t,n,e)}}),Xg=O(function(n,e){return function(t){return at(n,t,e)}});function Li(n,e,t){var r=Q(e),i=Ut(e,r);t==null&&!(H(e)&&(i.length||!r.length))&&(t=e,e=n,n=this,i=Ut(e,Q(e)));var o=!(H(t)&&"chain"in t)||!!t.chain,l=Qn(n);return En(i,function(f){var h=e[f];n[f]=h,l&&(n.prototype[f]=function(){var d=this.__chain__;if(o||d){var _=n(this.__wrapped__),v=_.__actions__=fn(this.__actions__);return v.push({func:h,args:arguments,thisArg:n}),_.__chain__=d,_}return h.apply(n,te([this.value()],arguments))})}),n}function Zg(){return V._===this&&(V._=yl),this}function Ri(){}function Jg(n){return n=S(n),O(function(e){return ka(e,n)})}var kg=si(q),Qg=si(va),Vg=si(Br);function go(n){return di(n)?Nr(Hn(n)):Cf(n)}function jg(n){return function(e){return n==null?s:ve(n,e)}}var nd=mu(),ed=mu(!0);function $i(){return[]}function Bi(){return!1}function td(){return{}}function rd(){return""}function id(){return!0}function ad(n,e){if(n=S(n),n<1||n>ne)return[];var t=Fn,r=en(n,Fn);e=x(e),n-=Fn;for(var i=Dr(r,e);++t<n;)e(t);return i}function ud(n){return I(n)?q(n,Hn):vn(n)?[n]:fn(Nu(N(n)))}function od(n){var e=++vl;return N(n)+e}var sd=Yt(function(n,e){return n+e},0),ld=li("ceil"),fd=Yt(function(n,e){return n/e},1),cd=li("floor");function hd(n){return n&&n.length?Ft(n,pn,Zr):s}function pd(n,e){return n&&n.length?Ft(n,x(e,2),Zr):s}function gd(n){return wa(n,pn)}function dd(n,e){return wa(n,x(e,2))}function _d(n){return n&&n.length?Ft(n,pn,Vr):s}function vd(n,e){return n&&n.length?Ft(n,x(e,2),Vr):s}var md=Yt(function(n,e){return n*e},1),yd=li("round"),wd=Yt(function(n,e){return n-e},0);function bd(n){return n&&n.length?Mr(n,pn):0}function xd(n,e){return n&&n.length?Mr(n,x(e,2)):0}return u.after=zh,u.ary=Ku,u.assign=Rp,u.assignIn=ao,u.assignInWith=ar,u.assignWith=$p,u.at=Bp,u.before=Yu,u.bind=bi,u.bindAll=Wg,u.bindKey=Xu,u.castArray=tp,u.chain=Hu,u.chunk=cc,u.compact=hc,u.concat=pc,u.cond=Fg,u.conforms=Ug,u.constant=Ci,u.countBy=bh,u.create=Np,u.curry=Zu,u.curryRight=Ju,u.debounce=ku,u.defaults=Pp,u.defaultsDeep=Mp,u.defer=Kh,u.delay=Yh,u.difference=gc,u.differenceBy=dc,u.differenceWith=_c,u.drop=vc,u.dropRight=mc,u.dropRightWhile=yc,u.dropWhile=wc,u.fill=bc,u.filter=Eh,u.flatMap=Ih,u.flatMapDeep=Sh,u.flatMapDepth=Ch,u.flatten=Wu,u.flattenDeep=xc,u.flattenDepth=Ec,u.flip=Xh,u.flow=Hg,u.flowRight=Gg,u.fromPairs=Ac,u.functions=Gp,u.functionsIn=zp,u.groupBy=Oh,u.initial=Ic,u.intersection=Sc,u.intersectionBy=Cc,u.intersectionWith=Oc,u.invert=Yp,u.invertBy=Xp,u.invokeMap=Rh,u.iteratee=Oi,u.keyBy=$h,u.keys=Q,u.keysIn=hn,u.map=jt,u.mapKeys=Jp,u.mapValues=kp,u.matches=zg,u.matchesProperty=Kg,u.memoize=er,u.merge=Qp,u.mergeWith=uo,u.method=Yg,u.methodOf=Xg,u.mixin=Li,u.negate=tr,u.nthArg=Jg,u.omit=Vp,u.omitBy=jp,u.once=Zh,u.orderBy=Bh,u.over=kg,u.overArgs=Jh,u.overEvery=Qg,u.overSome=Vg,u.partial=xi,u.partialRight=Qu,u.partition=Nh,u.pick=ng,u.pickBy=oo,u.property=go,u.propertyOf=jg,u.pull=Bc,u.pullAll=Uu,u.pullAllBy=Nc,u.pullAllWith=Pc,u.pullAt=Mc,u.range=nd,u.rangeRight=ed,u.rearg=kh,u.reject=Dh,u.remove=Dc,u.rest=Qh,u.reverse=yi,u.sampleSize=Fh,u.set=tg,u.setWith=rg,u.shuffle=Uh,u.slice=Wc,u.sortBy=Gh,u.sortedUniq=Kc,u.sortedUniqBy=Yc,u.split=Ig,u.spread=Vh,u.tail=Xc,u.take=Zc,u.takeRight=Jc,u.takeRightWhile=kc,u.takeWhile=Qc,u.tap=hh,u.throttle=jh,u.thru=Vt,u.toArray=to,u.toPairs=so,u.toPairsIn=lo,u.toPath=ud,u.toPlainObject=io,u.transform=ig,u.unary=np,u.union=Vc,u.unionBy=jc,u.unionWith=nh,u.uniq=eh,u.uniqBy=th,u.uniqWith=rh,u.unset=ag,u.unzip=wi,u.unzipWith=qu,u.update=ug,u.updateWith=og,u.values=Ue,u.valuesIn=sg,u.without=ih,u.words=ho,u.wrap=ep,u.xor=ah,u.xorBy=uh,u.xorWith=oh,u.zip=sh,u.zipObject=lh,u.zipObjectDeep=fh,u.zipWith=ch,u.entries=so,u.entriesIn=lo,u.extend=ao,u.extendWith=ar,Li(u,u),u.add=sd,u.attempt=po,u.camelCase=hg,u.capitalize=fo,u.ceil=ld,u.clamp=lg,u.clone=rp,u.cloneDeep=ap,u.cloneDeepWith=up,u.cloneWith=ip,u.conformsTo=op,u.deburr=co,u.defaultTo=qg,u.divide=fd,u.endsWith=pg,u.eq=Nn,u.escape=gg,u.escapeRegExp=dg,u.every=xh,u.find=Ah,u.findIndex=Mu,u.findKey=Dp,u.findLast=Th,u.findLastIndex=Du,u.findLastKey=Wp,u.floor=cd,u.forEach=Gu,u.forEachRight=zu,u.forIn=Fp,u.forInRight=Up,u.forOwn=qp,u.forOwnRight=Hp,u.get=Ti,u.gt=sp,u.gte=lp,u.has=Kp,u.hasIn=Ii,u.head=Fu,u.identity=pn,u.includes=Lh,u.indexOf=Tc,u.inRange=fg,u.invoke=Zp,u.isArguments=we,u.isArray=I,u.isArrayBuffer=fp,u.isArrayLike=cn,u.isArrayLikeObject=z,u.isBoolean=cp,u.isBuffer=le,u.isDate=hp,u.isElement=pp,u.isEmpty=gp,u.isEqual=dp,u.isEqualWith=_p,u.isError=Ei,u.isFinite=vp,u.isFunction=Qn,u.isInteger=Vu,u.isLength=rr,u.isMap=ju,u.isMatch=mp,u.isMatchWith=yp,u.isNaN=wp,u.isNative=bp,u.isNil=Ep,u.isNull=xp,u.isNumber=no,u.isObject=H,u.isObjectLike=G,u.isPlainObject=ct,u.isRegExp=Ai,u.isSafeInteger=Ap,u.isSet=eo,u.isString=ir,u.isSymbol=vn,u.isTypedArray=Fe,u.isUndefined=Tp,u.isWeakMap=Ip,u.isWeakSet=Sp,u.join=Lc,u.kebabCase=_g,u.last=Cn,u.lastIndexOf=Rc,u.lowerCase=vg,u.lowerFirst=mg,u.lt=Cp,u.lte=Op,u.max=hd,u.maxBy=pd,u.mean=gd,u.meanBy=dd,u.min=_d,u.minBy=vd,u.stubArray=$i,u.stubFalse=Bi,u.stubObject=td,u.stubString=rd,u.stubTrue=id,u.multiply=md,u.nth=$c,u.noConflict=Zg,u.noop=Ri,u.now=nr,u.pad=yg,u.padEnd=wg,u.padStart=bg,u.parseInt=xg,u.random=cg,u.reduce=Ph,u.reduceRight=Mh,u.repeat=Eg,u.replace=Ag,u.result=eg,u.round=yd,u.runInContext=c,u.sample=Wh,u.size=qh,u.snakeCase=Tg,u.some=Hh,u.sortedIndex=Fc,u.sortedIndexBy=Uc,u.sortedIndexOf=qc,u.sortedLastIndex=Hc,u.sortedLastIndexBy=Gc,u.sortedLastIndexOf=zc,u.startCase=Sg,u.startsWith=Cg,u.subtract=wd,u.sum=bd,u.sumBy=xd,u.template=Og,u.times=ad,u.toFinite=Vn,u.toInteger=S,u.toLength=ro,u.toLower=Lg,u.toNumber=On,u.toSafeInteger=Lp,u.toString=N,u.toUpper=Rg,u.trim=$g,u.trimEnd=Bg,u.trimStart=Ng,u.truncate=Pg,u.unescape=Mg,u.uniqueId=od,u.upperCase=Dg,u.upperFirst=Si,u.each=Gu,u.eachRight=zu,u.first=Fu,Li(u,function(){var n={};return Un(u,function(e,t){M.call(u.prototype,t)||(n[t]=e)}),n}(),{chain:!1}),u.VERSION=Y,En(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){u[n].placeholder=u}),En(["drop","take"],function(n,e){R.prototype[n]=function(t){t=t===s?1:Z(S(t),0);var r=this.__filtered__&&!e?new R(this):this.clone();return r.__filtered__?r.__takeCount__=en(t,r.__takeCount__):r.__views__.push({size:en(t,Fn),type:n+(r.__dir__<0?"Right":"")}),r},R.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),En(["filter","map","takeWhile"],function(n,e){var t=e+1,r=t==Wi||t==$o;R.prototype[n]=function(i){var o=this.clone();return o.__iteratees__.push({iteratee:x(i,3),type:t}),o.__filtered__=o.__filtered__||r,o}}),En(["head","last"],function(n,e){var t="take"+(e?"Right":"");R.prototype[n]=function(){return this[t](1).value()[0]}}),En(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");R.prototype[n]=function(){return this.__filtered__?new R(this):this[t](1)}}),R.prototype.compact=function(){return this.filter(pn)},R.prototype.find=function(n){return this.filter(n).head()},R.prototype.findLast=function(n){return this.reverse().find(n)},R.prototype.invokeMap=O(function(n,e){return typeof n=="function"?new R(this):this.map(function(t){return at(t,n,e)})}),R.prototype.reject=function(n){return this.filter(tr(x(n)))},R.prototype.slice=function(n,e){n=S(n);var t=this;return t.__filtered__&&(n>0||e<0)?new R(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==s&&(e=S(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},R.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},R.prototype.toArray=function(){return this.take(Fn)},Un(R.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,h=l instanceof R,d=f[0],_=h||I(l),v=function(L){var $=i.apply(u,te([L],f));return r&&m?$[0]:$};_&&t&&typeof d=="function"&&d.length!=1&&(h=_=!1);var m=this.__chain__,w=!!this.__actions__.length,E=o&&!m,C=h&&!w;if(!o&&_){l=C?l:new R(this);var A=n.apply(l,f);return A.__actions__.push({func:Vt,args:[v],thisArg:s}),new Tn(A,m)}return E&&C?n.apply(this,f):(A=this.thru(v),E?r?A.value()[0]:A.value():A)})}),En(["pop","push","shift","sort","splice","unshift"],function(n){var e=At[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(I(o)?o:[],i)}return this[t](function(l){return e.apply(I(l)?l:[],i)})}}),Un(R.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";M.call(Ne,r)||(Ne[r]=[]),Ne[r].push({name:e,func:t})}}),Ne[Kt(s,fe).name]=[{name:"wrapper",func:s}],R.prototype.clone=Pl,R.prototype.reverse=Ml,R.prototype.value=Dl,u.prototype.at=ph,u.prototype.chain=gh,u.prototype.commit=dh,u.prototype.next=_h,u.prototype.plant=mh,u.prototype.reverse=yh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=wh,u.prototype.first=u.prototype.head,Ve&&(u.prototype[Ve]=vh),u},Re=gl();he?((he.exports=Re)._=Re,Or._=Re):V._=Re}).call(qe)})(sr,sr.exports);var Td=sr.exports;exports.VType=void 0;(function(a){a.BOOL="bool",a.INT="int",a.FLOAT="float",a.ARRAY="array",a.BOX="box",a.CHART_POINT="chart.point",a.COLOR="color",a.CONST="const",a.LABEL="label",a.LINE="line",a.LINEFILL="linefill",a.MAP="map",a.MATRIX="matrix",a.POLYLINE="polyline",a.SERIES="series",a.SIMPLE="simple",a.STRING="string",a.TABLE="table",a.UNDETERMINED="undetermined type",a.INPUT="input",a.NA="na",a.VOID="void",a.ENUM="enum"})(exports.VType||(exports.VType={}));exports.VRuleType=void 0;(function(a){a.FlowStmt="FlowStmt",a.DeclareAssign="DeclareAssign",a.VarBlockStmt="VarBlockStmt",a.VarSingle="VarSingle",a.VarMultiple="VarMultiple",a.ParenthesizedExpression="ParenthesizedExpression",a.AdditiveExpression="AdditiveExpression",a.RelationalExpression="RelationalExpression",a.EqualityExpression="EqualityExpression",a.TernaryExpression="TernaryExpression",a.UnaryExpression="UnaryExpression",a.NotExpression="NotExpression",a.MemberIndexExpression="MemberIndexExpression",a.MethodExpression="MethodExpression",a.LogicalAndExpression="LogicalAndExpression",a.LogicalOrExpression="LogicalOrExpression",a.MultiplicativeExpression="MultiplicativeExpression",a.Brackethesized="Brackethesized",a.IfStatement="IfStatement",a.ForToStatement="ForToStatement",a.ForInStatement="ForInStatement",a.SwitchStatement="SwitchStatement",a.CaseClause="CaseClause",a.DefaultCaluse="DefaultCaluse",a.WhileStatement="WhileStatement",a.ImportElement="ImportElement",a.Literal="Literal",a.ArrowFunction="ArrowFunction",a.ArrowMethod="ArrowMethod",a.TypeStatement="TypeStatement",a.Name="Name",a.AgainAssign="AgainAssign",a.EnumStatement="EnumStatement"})(exports.VRuleType||(exports.VRuleType={}));exports.VAdjustment=void 0;(function(a){a.dividends="dividends",a.none="none",a.splits="splits"})(exports.VAdjustment||(exports.VAdjustment={}));exports.VAlert=void 0;(function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"})(exports.VAlert||(exports.VAlert={}));exports.VBarmergeGaps=void 0;(function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"})(exports.VBarmergeGaps||(exports.VBarmergeGaps={}));exports.VPlotDisplay=void 0;(function(a){a.all="all",a.dataWindow="data_window",a.none="none",a.pane="pane",a.priceScale="price_scale",a.statusLine="status_line"})(exports.VPlotDisplay||(exports.VPlotDisplay={}));exports.VExtend=void 0;(function(a){a.both="both",a.left="left",a.none="none",a.right="right"})(exports.VExtend||(exports.VExtend={}));exports.VFormatType=void 0;(function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"})(exports.VFormatType||(exports.VFormatType={}));exports.VHlineStyle=void 0;(function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"})(exports.VHlineStyle||(exports.VHlineStyle={}));exports.VLabelStyle=void 0;(function(a){a.styleArrowdown="style_arrowdown",a.styleArrowup="style_arrowup",a.styleCircle="style_circle",a.styleCross="style_cross",a.styleDiamond="style_diamond",a.styleFlag="style_flag",a.styleLabelCenter="style_label_center",a.styleLabelDown="style_label_down",a.styleLabelLeft="style_label_left",a.styleLabelLowerLeft="style_label_lower_left",a.styleLabelLowerRight="style_label_lower_right",a.styleLabelRight="style_label_right",a.styleLabelUp="style_label_up",a.styleLabelUpperLeft="style_label_upper_left",a.styleLabelUpperRight="style_label_upper_right",a.styleNone="style_none",a.styleSquare="style_square",a.styleTextOutline="style_text_outline",a.styleTriangledown="style_triangledown",a.styleTriangleup="style_triangleup",a.styleXcross="style_xcross"})(exports.VLabelStyle||(exports.VLabelStyle={}));exports.VLineStyle=void 0;(function(a){a.styleArrowBoth="style_arrow_both",a.styleArrowLeft="style_arrow_left",a.styleArrowRight="style_arrow_right",a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"})(exports.VLineStyle||(exports.VLineStyle={}));exports.VLocation=void 0;(function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"})(exports.VLocation||(exports.VLocation={}));exports.VSortOrder=void 0;(function(a){a.ascending="ascending",a.descending="descending"})(exports.VSortOrder||(exports.VSortOrder={}));exports.VPlotStyle=void 0;(function(a){a.styleArea="Area",a.styleAreabr="Area With Breaks",a.styleCircles="Circles",a.styleColumns="Columns",a.styleCross="Cross",a.styleHistogram="Histogram",a.styleLine="Line",a.styleLinebr="Line With Breaks",a.styleStepline="Step Line",a.styleSteplineDiamond="Step Line With Diamonds",a.styleSteplinebr="Step line with Breaks"})(exports.VPlotStyle||(exports.VPlotStyle={}));exports.VPosition=void 0;(function(a){a.bottomCenter="bottom_center",a.bottomLeft="bottom_left",a.bottomRight="bottom_right",a.middleCenter="middle_center",a.middleLeft="middle_left",a.middleRight="middle_right",a.topCenter="top_center",a.topLeft="top_left",a.topRight="top_right"})(exports.VPosition||(exports.VPosition={}));exports.VScale=void 0;(function(a){a.left="left",a.none="none",a.right="right"})(exports.VScale||(exports.VScale={}));exports.VSession=void 0;(function(a){a.extended="extended",a.regular="regular"})(exports.VSession||(exports.VSession={}));exports.VShape=void 0;(function(a){a.arrowdown="arrowdown",a.arrowup="arrowup",a.circle="circle",a.cross="cross",a.diamond="diamond",a.flag="flag",a.labeldown="labeldown",a.labelup="labelup",a.square="square",a.triangledown="triangledown",a.triangleup="triangleup",a.xcross="xcross"})(exports.VShape||(exports.VShape={}));exports.VSize=void 0;(function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"})(exports.VSize||(exports.VSize={}));exports.VFont=void 0;(function(a){a.familyDefault="default",a.familyMonospace="monospace"})(exports.VFont||(exports.VFont={}));exports.VStrategy=void 0;(function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"})(exports.VStrategy||(exports.VStrategy={}));exports.VCommission=void 0;(function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"})(exports.VCommission||(exports.VCommission={}));exports.VDirection=void 0;(function(a){a.all="all",a.long="long",a.short="short"})(exports.VDirection||(exports.VDirection={}));exports.VOca=void 0;(function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"})(exports.VOca||(exports.VOca={}));exports.VText=void 0;(function(a){a.alignBottom="align_bottom",a.alignCenter="align_center",a.alignLeft="align_left",a.alignRight="align_right",a.alignTop="align_top",a.wrapAuto="wrap_auto",a.wrapNone="wrap_none"})(exports.VText||(exports.VText={}));exports.VXloc=void 0;(function(a){a.bar_index="bar_index",a.bar_time="bar_time"})(exports.VXloc||(exports.VXloc={}));exports.VYloc=void 0;(function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"})(exports.VYloc||(exports.VYloc={}));exports.VEarnings=void 0;(function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"})(exports.VEarnings||(exports.VEarnings={}));exports.VPivotType=void 0;(function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"})(exports.VPivotType||(exports.VPivotType={}));exports.VInputType=void 0;(function(a){a.INT="int",a.BOOL="bool",a.TIME="time",a.COLOR="color",a.FLOAT="float",a.PRICE="price",a.SOURCE="source",a.STRING="string",a.SYMBOL="symbol",a.SESSION="session",a.TEXT_AREA="text_area",a.TIMEFRAME="timeframe",a.ENUM="enum"})(exports.VInputType||(exports.VInputType={}));var vo;(function(a){a.description="description",a.field="field",a.function="function",a.param="param",a.returns="returns",a.type="type",a.variable="variable",a.enum="enum"})(vo||(vo={}));exports.VScriptType=void 0;(function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"})(exports.VScriptType||(exports.VScriptType={}));const Id={onlyInLoop:"'$text' is only allowed inside loops",invalidType:"Invalid argument 'expr$index' in 'operator SQBR' call",typeUseError:"Cannot specify a type form '$text' without also specifying the type.",notTypeKeyword:"'$text' is not a valid type keyword in variable declaration",undeclared:"Undeclared identifier '$name'",repeatVar:"'$name' is already defined",typeRepeatErr:"$keyword '$name' is already defined.",typeMismatch:"Cannot call '$operator' with argument '$index'. An argument of '$typeE' type was used but a '$typeR' is expected.",assignTypeMismatch:"Cannot assign a value of the `$typeE` type to the '$name' variable. The variable is declared with the `$typeR` type.",voidNotVar:"Void expression cannot be assigned to a variable",declareTypeErr:"Declared type '$type' is not compatible with assigned type '$valueType'",mapKeyValErr:"Cannot put <$typeA, $typeB> pairs into a map containing `$typeC` keys and `$typeD` values. The maps passed into the `$name()` function must have the same key types and value types.",inputSourceErr:"Invalid value for the '$name' parameter of the '$funcName' function. Possible values: [open, high, low, close, hl2, hlc3, ohlc4, hlcc4, volume].",buildInUseErr:"Cannot use '$name' as the default value of a type's field. The default value cannot be a function, variable or calculation.",argsLenErr:"Too many arguments passed into the `$name()` function call. Passed $lenA arguments but expected $lenB.",requiredParamErr:"No value assigned to the `$argName` parameter in $name()",argsSyntaxErr:"Syntax error after the argument for `$argName`. Arguments without their parameter name cannot be used after arguments with parameter names.",requestArgsErr:"Type $type cannot be used in $name '$argName' argument",mapKeyErr:"Incorrect `key` type `$type` in the variable. The `key` type must be one of the following: int, float, string, bool, color.",templateErr:"Incorrect number of arguments for the template: $countA expected, $countB passed.",templateNoSupportErr:"The '$name()' function does not support templates",ifOrSwitchTypeErr:"Return type of one of the '$keyword' blocks is not compatible with return type of other block(s) ($types)",argsNameErr:"The '$name' function does not have an argument with the name '$argName'",noFiledErr:"Object has no field $name",methodNotExistErr:"Could not find method or method reference '$methodName' for '$name'",tupleVarErr:"Syntax error: The quantities of tuple elements on each side of the assignment operator do not match. The right side has $indexA but the left side has $indexB.",tupleLeftVarErr:"Invalid assignment. Cannot assign a tuple to a variable '$name'.",tupleRightVarErr:"Cannot assign a variable to a tuple. The right side must be a function call or structure ('if', 'switch', 'for', 'while') returning a tuple with the same number of elements.",tempateTypeErr:"Syntax error: Only templates for arrays and matrices consist of a single type identifier enclosed in angle brackets.",qualifierErr:"'$name' is not a valid type qualifier. Possible values: 'const', 'simple', 'series'",notFindFuncErr:"Could not find function or function reference '$name'",naVarErr:"Value with NA type cannot be assigned to a variable that was defined without type keyword",notHistoryErr:"Variable '$name' doesn't have history values",defaultValueErr:"The default value cannot be a function, variable or calculation.",defaultValueTypeErr:"Default value of type $typeE can not be assigned to an argument of type $typeR",typeFieldErr:"In a type declaration, all fields without a default value must be explicitly typified.",unaryErr:"Syntax error at input '$sign'",funcArgAssignErr:"Function arguments cannot be mutable ('$name')",declaredErr:"A variable declared with the '$prefix' keyword cannot accept values of the '$type' form. Assign a '$prefix' value to this variable or remove the '$prefix' keyword from its declaration.",globalFuncErr:"Cannot use '$name' in local scope",onlyStatementErr:"Scripts must contain one declaration statement: `indicator()`, `strategy()` or `library()`, Your script has $count.",modifyGlobalVarErr:"Cannot modify global variable '$name' in function",inputDefvalErr:"Arguments of input function must be of constant type, or 'source' builtin variables.",objectIsNaErr:"Cannot access the '$name' $type of an na object. The object is 'na'.",buidinAssignErr:"Cannot assign a new value to the built-in variable '$name'.",buidinVarErr:"Cannot shadow the built-in variable `$name` because it has already been used as a built-in.",useNaErr:"Cannot use an `na` value of an unspecified type in the `$name` function.",libraryTitleErr:"Invalid argument 'title' in 'library' call. It cannot contain spaces, special characters or begin with a digit.",exportFuncArgErr:"All exported functions args should be typified",indiRunErr:"An indicator must contain at least one of the following: any `plot*()` function, `barcolor()`, `bgcolor()`, `hline()`, `alertcondition()`, or any drawing (line, label, box, table, polyline).",libraryExportErr:"A library must contain at least one exported function, method, or type.",strategyRunErr:"A strategy must contain at least one of the following: any `strategy.*()` function that creates orders, any `plot*()` function, `barcolor()`, `bgcolor()`, `hline()`, or any drawing (line, label, box, table, polyline).",exportUseErr:"Only libraries can contain exported $type.",funcRepeatErr:"The '$name' function has overloads with the same parameters. The type of parameters must be different in overloaded versions of functions.",importMultipleErr:"Cannot import a library more than once",importNotExitErr:"The user '$username' does not have a published library titled '$libraryName'",importNameRepeatErr:"More than one import uses the same alias: $name. Previous usage at line: $line",exportFuncHasInputErr:"The exported function '$func' depends on the '$name' input variable, which is not allowed.",libraryTitleIsKeywordErr:"Invalid argument 'title' in 'library' call. Token: '$name' can't be used as library title.",exportFuncUseGlobalVarErr:"Cannot use global variables in exported functions. Function: $func",loopRuntimeErr:"Loop takes too long to execute (> 500 ms)",paramsErr:"Invalid value '$value' for '$param' parameter of the '$func' function. Possible values: $targetVal",displayErr:"Invalid argument 'display' in '$func' call. Possible values: $values",exportFuncUseReqErr:"Cannot use `request.*()` call in exported function `$name()`",requestExprErr:"Type series $type cannot be used in $name 'expression' argument",argDefaultErr:"The default value assigned to a parameter must be either a literal value (e.g., `5`) or a built-in variable (e.g., `close`)",overloadFuncErr:"Cannot use global variables or any values qualified as 'input' in the local scopes of overloaded functions or methods. Remove any global variables or inputs from the scopes of all '$name()' overloads.",againAssignErr:"Unable to determine the object for the field assignment. Try putting the object into a separate variable before assigning values to its fields.",requestUserInLoopErr:"Cannot use `request.*()` call within loops or conditional structures.",enumVarNameErr:"Invalid enum name '$name': `bool`, `int`, `float`, `string`, and `color` are not allowed.",enumVarNameBuiltinErr:"Invalid object name: $name. Namespaces of built-ins cannot be used.",typeNameErr:"Invalid user-defined type name '$name': `bool`, `int`, `float`, `string`, and `color` are not allowed.",enumUseErr:"Cannot use the '$name' as a value. Use one of the enum's fields instead.",conditionalErr:"'$name' conditional expression must be of a bool type!",fortoErr:'The value of the "for" loop must be a number.',indicatorUseStrategyFuncErr:"You cannot use strategy $type ($name) in indicator script.",arrEmptyErr:"Array must not be empty",arrLengthDiffErr:"Arrays have different lengths",arrTypeErr:"Array type error, the 'array.$name' method can only use $type type array.",inputOptErr:"input's defval should be in options, but '$defval' is not in [$args]",mathRandomErr:"min must be less than max",matrixRehapeErr:"New matrix must be of same area as original matrix",strategyExitErr:"strategy.exit must have at least one of the following parameters: 'profit', 'limit', 'loss', 'stop' or one of the following pairs: 'trail_offset' and 'trail_price' / 'trail_points'. To close the position at market price, use 'strategy.close'",arrLenErr:"Invalid array length",mergeCellErr:"error: start_column > end_column or start_row > end_row",minOrMaxErr:"Input's `defval` value must be between `minval` and `maxval`",requestsNumErr:"Exceeded the maximum number of requests 40",undeterminedTypeMethodErr:"Method calls must specify the type, please add the type to '$name'",requestUseFuncErr:"built-in '$func' cannot be used with any parameter of the `$name()` function.",requestLowerTfPeriodErr:"The chart's timeframe must be greater or equal to the `$period` timeframe used with `request.security_lower_tf()`.",optionsRepeatErr:"options have to be unique, but there is at least one duplicate in options. Duplicated values: $option",scriptLongTimeErr:"Script execution takes too long, the limit is 40 seconds",plotFillForceOverlayErr:"Cannot call `fill()` with two plots that may not show in the same pane. Both plots must have the same `force_overlay` value."},Sd={repeatVar:"Shadowing variable '$name' which exists in parent scope. Did you want to use the ':=' operator instead of '=' ?",typeMismatch:"The `$index` parameter of the `$operator` function accepts a '$type' argument. To avoid potential unexpected results, pass a '$type' value or expression to this parameter.",moreSameArg:"More than one '$arg' arguments are supplied. Only the first one will be used.",localScopeGetHistory:"The variable '$name' is declared in local scope, which may not be executed at every update. So, obtaining its historical values may lead to unexpected results",localScopeWarning:"The function '$name' should be called on each calculation for consistency. It is recommended to extract the call from this scope",strategyCalcTickWarn:"Strategies without `calc_on_every_tick = true` only calculate on confirmed chart bars. In this case, `barstate.islast` may not initially return `true` on realtime bars, as the last bar is unconfirmed until it closes. If you need to check whether a bar is the latest before it closes, enable `calc_on_every_tick` in the `strategy()` function.",conditionWarning:"The `condition` parameter of the `$name` accepts a 'bool' argument. To avoid potential unexpected results, pass a 'bool' value or expression to this parameter.",lineWidthWarning:"Passing a value below 1 to `linewidth` will be replaced with 1 during compilation.",boolVarNumWarning:"The `$name` variable casts a numeric value to the 'bool' type. To avoid potential unexpected results, assign a 'bool' value to this variable."};exports.VType.SERIES,exports.VType.SIMPLE,exports.VType.INPUT,exports.VType.CONST;exports.VType.INT,exports.VType.FLOAT,exports.VType.BOOL,exports.VType.COLOR,exports.VType.STRING;const Cd=["close","open","high","low","hl2","hlc3","hlcc4","ohlc4","volume"],Od={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},Ld={functions:[{name:"calcBB",desc:["Computes Bollinger Band values from an array of data."],args:[{name:"srcArray",desc:"(array<float>) The array where the queue is maintained.",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series float mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"srcArray",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series int mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],index:1},{name:"Scanner.new",args:[{name:"enabled",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"},{name:"ticker",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"},{name:"timeframe",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.new(series bool enabled, series string ticker, series string timeframe) → Scanner"]},{name:"Scanner.copy",args:[{name:"object",required:!0,allowedTypeIDs:["Scanner"],displayType:"Scanner"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},info:"The identifier of the object to be copied.",syntax:["Scanner.copy(Scanner object) → Scanner"]}],methods:[{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],desc:["Computes Bollinger Band values from an array of data."],originalName:"array.calcBB",syntax:["calcBB(series float mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},thisType:["float[]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],originalName:"array.calcBB",syntax:["calcBB(series int mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},thisType:["float[]"],index:1},{name:"Scanner.copy",args:[],returnedTypes:["Scanner"],thisType:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.copy() → Scanner"]}],types:[{fields:[{name:"enabled",type:"series bool"},{name:"ticker",type:"series string"},{name:"timeframe",type:"series string"}],name:"Scanner",pos:{lineNumber:30,column:12}}],description:"Provides a tool to quickly output a label on the chart.",codeStr:'const $name={calcBB:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_12","var")||$_var.setVarValue("mean",e+"_14_12",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_13","var")||$_var.setVarValue("dev",e+"_14_13",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_16_16")),v=a.avg(e+"_16_16"),$_var.setVarValue("mean",e+"_14_12",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_17_16")*r),s=a.stdev(e+"_17_16")*r,$_var.setVarValue("dev",e+"_14_13",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},calcBB$1:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_21","var")||$_var.setVarValue("mean",e+"_14_21",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_22","var")||$_var.setVarValue("dev",e+"_14_22",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_25_16")),v=a.avg(e+"_25_16"),$_var.setVarValue("mean",e+"_14_21",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_26_16")*r),s=a.stdev(e+"_26_16")*r,$_var.setVarValue("dev",e+"_14_22",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},Scanner:$_var.getTypeInstance({enabled:void 0,ticker:void 0,timeframe:void 0},[])};'},Rd=["case","catch","default","delete","do","finally","function","instanceof","new","return","this","throw","try","typeof","void","with","const"],$d=["linefill","polyline","matrix","series","simple","string","array","color","const","float","label","table","bool","line","box","int","map","continue","for","varip","var","in","export","import","method","switch","break","while","else","type","and","for","not","as","by","if","in","or","to"];/**
|
27
|
+
}`;var C=po(function(){return B(o,w+"return "+v).apply(s,l)});if(C.source=v,Ei(C))throw C;return C}function Lg(n){return N(n).toLowerCase()}function Rg(n){return N(n).toUpperCase()}function $g(n,e,t){if(n=N(n),n&&(t||e===s))return xa(n);if(!n||!(e=_n(e)))return n;var r=$n(n),i=$n(e),o=Ea(r,i),l=Aa(r,i)+1;return se(r,o,l).join("")}function Bg(n,e,t){if(n=N(n),n&&(t||e===s))return n.slice(0,Ia(n)+1);if(!n||!(e=_n(e)))return n;var r=$n(n),i=Aa(r,$n(e))+1;return se(r,0,i).join("")}function Ng(n,e,t){if(n=N(n),n&&(t||e===s))return n.replace(Er,"");if(!n||!(e=_n(e)))return n;var r=$n(n),i=Ea(r,$n(e));return se(r,i).join("")}function Pg(n,e){var t=So,r=Co;if(H(e)){var i="separator"in e?e.separator:i;t="length"in e?S(e.length):t,r="omission"in e?_n(e.omission):r}n=N(n);var o=n.length;if(Oe(n)){var l=$n(n);o=l.length}if(t>=o)return n;var f=t-Le(r);if(f<1)return r;var h=l?se(l,0,f).join(""):n.slice(0,f);if(i===s)return h+r;if(l&&(f+=h.length-f),Ai(i)){if(n.slice(f).search(i)){var d,_=h;for(i.global||(i=Ur(i.source,N(zi.exec(i))+"g")),i.lastIndex=0;d=i.exec(_);)var v=d.index;h=h.slice(0,v===s?f:v)}}else if(n.indexOf(_n(i),f)!=f){var m=h.lastIndexOf(i);m>-1&&(h=h.slice(0,m))}return h+r}function Mg(n){return n=N(n),n&&Yo.test(n)?n.replace(qi,fl):n}var Dg=De(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Si=gu("toUpperCase");function ho(n,e,t){return n=N(n),e=t?s:e,e===s?al(n)?pl(n):ks(n):n.match(e)||[]}var po=O(function(n,e){try{return gn(n,s,e)}catch(t){return Ei(t)?t:new T(t)}}),Wg=Jn(function(n,e){return En(e,function(t){t=Hn(t),Xn(n,t,bi(n[t],n))}),n});function Fg(n){var e=n==null?0:n.length,t=x();return n=e?q(n,function(r){if(typeof r[1]!="function")throw new An(P);return[t(r[0]),r[1]]}):[],O(function(r){for(var i=-1;++i<e;){var o=n[i];if(gn(o[0],this,r))return gn(o[1],this,r)}})}function Ug(n){return cf(In(n,k))}function Ci(n){return function(){return n}}function qg(n,e){return n==null||n!==n?e:n}var Hg=_u(),Gg=_u(!0);function pn(n){return n}function Oi(n){return Ya(typeof n=="function"?n:In(n,k))}function zg(n){return Za(In(n,k))}function Kg(n,e){return Ja(n,In(e,k))}var Yg=O(function(n,e){return function(t){return at(t,n,e)}}),Xg=O(function(n,e){return function(t){return at(n,t,e)}});function Li(n,e,t){var r=Q(e),i=Ut(e,r);t==null&&!(H(e)&&(i.length||!r.length))&&(t=e,e=n,n=this,i=Ut(e,Q(e)));var o=!(H(t)&&"chain"in t)||!!t.chain,l=Qn(n);return En(i,function(f){var h=e[f];n[f]=h,l&&(n.prototype[f]=function(){var d=this.__chain__;if(o||d){var _=n(this.__wrapped__),v=_.__actions__=fn(this.__actions__);return v.push({func:h,args:arguments,thisArg:n}),_.__chain__=d,_}return h.apply(n,te([this.value()],arguments))})}),n}function Zg(){return V._===this&&(V._=yl),this}function Ri(){}function Jg(n){return n=S(n),O(function(e){return ka(e,n)})}var kg=si(q),Qg=si(va),Vg=si(Br);function go(n){return di(n)?Nr(Hn(n)):Cf(n)}function jg(n){return function(e){return n==null?s:ve(n,e)}}var nd=mu(),ed=mu(!0);function $i(){return[]}function Bi(){return!1}function td(){return{}}function rd(){return""}function id(){return!0}function ad(n,e){if(n=S(n),n<1||n>ne)return[];var t=Fn,r=en(n,Fn);e=x(e),n-=Fn;for(var i=Dr(r,e);++t<n;)e(t);return i}function ud(n){return I(n)?q(n,Hn):vn(n)?[n]:fn(Nu(N(n)))}function od(n){var e=++vl;return N(n)+e}var sd=Yt(function(n,e){return n+e},0),ld=li("ceil"),fd=Yt(function(n,e){return n/e},1),cd=li("floor");function hd(n){return n&&n.length?Ft(n,pn,Zr):s}function pd(n,e){return n&&n.length?Ft(n,x(e,2),Zr):s}function gd(n){return wa(n,pn)}function dd(n,e){return wa(n,x(e,2))}function _d(n){return n&&n.length?Ft(n,pn,Vr):s}function vd(n,e){return n&&n.length?Ft(n,x(e,2),Vr):s}var md=Yt(function(n,e){return n*e},1),yd=li("round"),wd=Yt(function(n,e){return n-e},0);function bd(n){return n&&n.length?Mr(n,pn):0}function xd(n,e){return n&&n.length?Mr(n,x(e,2)):0}return u.after=zh,u.ary=Ku,u.assign=Rp,u.assignIn=ao,u.assignInWith=ar,u.assignWith=$p,u.at=Bp,u.before=Yu,u.bind=bi,u.bindAll=Wg,u.bindKey=Xu,u.castArray=tp,u.chain=Hu,u.chunk=cc,u.compact=hc,u.concat=pc,u.cond=Fg,u.conforms=Ug,u.constant=Ci,u.countBy=bh,u.create=Np,u.curry=Zu,u.curryRight=Ju,u.debounce=ku,u.defaults=Pp,u.defaultsDeep=Mp,u.defer=Kh,u.delay=Yh,u.difference=gc,u.differenceBy=dc,u.differenceWith=_c,u.drop=vc,u.dropRight=mc,u.dropRightWhile=yc,u.dropWhile=wc,u.fill=bc,u.filter=Eh,u.flatMap=Ih,u.flatMapDeep=Sh,u.flatMapDepth=Ch,u.flatten=Wu,u.flattenDeep=xc,u.flattenDepth=Ec,u.flip=Xh,u.flow=Hg,u.flowRight=Gg,u.fromPairs=Ac,u.functions=Gp,u.functionsIn=zp,u.groupBy=Oh,u.initial=Ic,u.intersection=Sc,u.intersectionBy=Cc,u.intersectionWith=Oc,u.invert=Yp,u.invertBy=Xp,u.invokeMap=Rh,u.iteratee=Oi,u.keyBy=$h,u.keys=Q,u.keysIn=hn,u.map=jt,u.mapKeys=Jp,u.mapValues=kp,u.matches=zg,u.matchesProperty=Kg,u.memoize=er,u.merge=Qp,u.mergeWith=uo,u.method=Yg,u.methodOf=Xg,u.mixin=Li,u.negate=tr,u.nthArg=Jg,u.omit=Vp,u.omitBy=jp,u.once=Zh,u.orderBy=Bh,u.over=kg,u.overArgs=Jh,u.overEvery=Qg,u.overSome=Vg,u.partial=xi,u.partialRight=Qu,u.partition=Nh,u.pick=ng,u.pickBy=oo,u.property=go,u.propertyOf=jg,u.pull=Bc,u.pullAll=Uu,u.pullAllBy=Nc,u.pullAllWith=Pc,u.pullAt=Mc,u.range=nd,u.rangeRight=ed,u.rearg=kh,u.reject=Dh,u.remove=Dc,u.rest=Qh,u.reverse=yi,u.sampleSize=Fh,u.set=tg,u.setWith=rg,u.shuffle=Uh,u.slice=Wc,u.sortBy=Gh,u.sortedUniq=Kc,u.sortedUniqBy=Yc,u.split=Ig,u.spread=Vh,u.tail=Xc,u.take=Zc,u.takeRight=Jc,u.takeRightWhile=kc,u.takeWhile=Qc,u.tap=hh,u.throttle=jh,u.thru=Vt,u.toArray=to,u.toPairs=so,u.toPairsIn=lo,u.toPath=ud,u.toPlainObject=io,u.transform=ig,u.unary=np,u.union=Vc,u.unionBy=jc,u.unionWith=nh,u.uniq=eh,u.uniqBy=th,u.uniqWith=rh,u.unset=ag,u.unzip=wi,u.unzipWith=qu,u.update=ug,u.updateWith=og,u.values=Ue,u.valuesIn=sg,u.without=ih,u.words=ho,u.wrap=ep,u.xor=ah,u.xorBy=uh,u.xorWith=oh,u.zip=sh,u.zipObject=lh,u.zipObjectDeep=fh,u.zipWith=ch,u.entries=so,u.entriesIn=lo,u.extend=ao,u.extendWith=ar,Li(u,u),u.add=sd,u.attempt=po,u.camelCase=hg,u.capitalize=fo,u.ceil=ld,u.clamp=lg,u.clone=rp,u.cloneDeep=ap,u.cloneDeepWith=up,u.cloneWith=ip,u.conformsTo=op,u.deburr=co,u.defaultTo=qg,u.divide=fd,u.endsWith=pg,u.eq=Nn,u.escape=gg,u.escapeRegExp=dg,u.every=xh,u.find=Ah,u.findIndex=Mu,u.findKey=Dp,u.findLast=Th,u.findLastIndex=Du,u.findLastKey=Wp,u.floor=cd,u.forEach=Gu,u.forEachRight=zu,u.forIn=Fp,u.forInRight=Up,u.forOwn=qp,u.forOwnRight=Hp,u.get=Ti,u.gt=sp,u.gte=lp,u.has=Kp,u.hasIn=Ii,u.head=Fu,u.identity=pn,u.includes=Lh,u.indexOf=Tc,u.inRange=fg,u.invoke=Zp,u.isArguments=we,u.isArray=I,u.isArrayBuffer=fp,u.isArrayLike=cn,u.isArrayLikeObject=z,u.isBoolean=cp,u.isBuffer=le,u.isDate=hp,u.isElement=pp,u.isEmpty=gp,u.isEqual=dp,u.isEqualWith=_p,u.isError=Ei,u.isFinite=vp,u.isFunction=Qn,u.isInteger=Vu,u.isLength=rr,u.isMap=ju,u.isMatch=mp,u.isMatchWith=yp,u.isNaN=wp,u.isNative=bp,u.isNil=Ep,u.isNull=xp,u.isNumber=no,u.isObject=H,u.isObjectLike=G,u.isPlainObject=ct,u.isRegExp=Ai,u.isSafeInteger=Ap,u.isSet=eo,u.isString=ir,u.isSymbol=vn,u.isTypedArray=Fe,u.isUndefined=Tp,u.isWeakMap=Ip,u.isWeakSet=Sp,u.join=Lc,u.kebabCase=_g,u.last=Cn,u.lastIndexOf=Rc,u.lowerCase=vg,u.lowerFirst=mg,u.lt=Cp,u.lte=Op,u.max=hd,u.maxBy=pd,u.mean=gd,u.meanBy=dd,u.min=_d,u.minBy=vd,u.stubArray=$i,u.stubFalse=Bi,u.stubObject=td,u.stubString=rd,u.stubTrue=id,u.multiply=md,u.nth=$c,u.noConflict=Zg,u.noop=Ri,u.now=nr,u.pad=yg,u.padEnd=wg,u.padStart=bg,u.parseInt=xg,u.random=cg,u.reduce=Ph,u.reduceRight=Mh,u.repeat=Eg,u.replace=Ag,u.result=eg,u.round=yd,u.runInContext=c,u.sample=Wh,u.size=qh,u.snakeCase=Tg,u.some=Hh,u.sortedIndex=Fc,u.sortedIndexBy=Uc,u.sortedIndexOf=qc,u.sortedLastIndex=Hc,u.sortedLastIndexBy=Gc,u.sortedLastIndexOf=zc,u.startCase=Sg,u.startsWith=Cg,u.subtract=wd,u.sum=bd,u.sumBy=xd,u.template=Og,u.times=ad,u.toFinite=Vn,u.toInteger=S,u.toLength=ro,u.toLower=Lg,u.toNumber=On,u.toSafeInteger=Lp,u.toString=N,u.toUpper=Rg,u.trim=$g,u.trimEnd=Bg,u.trimStart=Ng,u.truncate=Pg,u.unescape=Mg,u.uniqueId=od,u.upperCase=Dg,u.upperFirst=Si,u.each=Gu,u.eachRight=zu,u.first=Fu,Li(u,function(){var n={};return Un(u,function(e,t){M.call(u.prototype,t)||(n[t]=e)}),n}(),{chain:!1}),u.VERSION=Y,En(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){u[n].placeholder=u}),En(["drop","take"],function(n,e){R.prototype[n]=function(t){t=t===s?1:Z(S(t),0);var r=this.__filtered__&&!e?new R(this):this.clone();return r.__filtered__?r.__takeCount__=en(t,r.__takeCount__):r.__views__.push({size:en(t,Fn),type:n+(r.__dir__<0?"Right":"")}),r},R.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),En(["filter","map","takeWhile"],function(n,e){var t=e+1,r=t==Wi||t==$o;R.prototype[n]=function(i){var o=this.clone();return o.__iteratees__.push({iteratee:x(i,3),type:t}),o.__filtered__=o.__filtered__||r,o}}),En(["head","last"],function(n,e){var t="take"+(e?"Right":"");R.prototype[n]=function(){return this[t](1).value()[0]}}),En(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");R.prototype[n]=function(){return this.__filtered__?new R(this):this[t](1)}}),R.prototype.compact=function(){return this.filter(pn)},R.prototype.find=function(n){return this.filter(n).head()},R.prototype.findLast=function(n){return this.reverse().find(n)},R.prototype.invokeMap=O(function(n,e){return typeof n=="function"?new R(this):this.map(function(t){return at(t,n,e)})}),R.prototype.reject=function(n){return this.filter(tr(x(n)))},R.prototype.slice=function(n,e){n=S(n);var t=this;return t.__filtered__&&(n>0||e<0)?new R(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==s&&(e=S(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},R.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},R.prototype.toArray=function(){return this.take(Fn)},Un(R.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);i&&(u.prototype[e]=function(){var l=this.__wrapped__,f=r?[1]:arguments,h=l instanceof R,d=f[0],_=h||I(l),v=function(L){var $=i.apply(u,te([L],f));return r&&m?$[0]:$};_&&t&&typeof d=="function"&&d.length!=1&&(h=_=!1);var m=this.__chain__,w=!!this.__actions__.length,E=o&&!m,C=h&&!w;if(!o&&_){l=C?l:new R(this);var A=n.apply(l,f);return A.__actions__.push({func:Vt,args:[v],thisArg:s}),new Tn(A,m)}return E&&C?n.apply(this,f):(A=this.thru(v),E?r?A.value()[0]:A.value():A)})}),En(["pop","push","shift","sort","splice","unshift"],function(n){var e=At[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(I(o)?o:[],i)}return this[t](function(l){return e.apply(I(l)?l:[],i)})}}),Un(R.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";M.call(Ne,r)||(Ne[r]=[]),Ne[r].push({name:e,func:t})}}),Ne[Kt(s,fe).name]=[{name:"wrapper",func:s}],R.prototype.clone=Pl,R.prototype.reverse=Ml,R.prototype.value=Dl,u.prototype.at=ph,u.prototype.chain=gh,u.prototype.commit=dh,u.prototype.next=_h,u.prototype.plant=mh,u.prototype.reverse=yh,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=wh,u.prototype.first=u.prototype.head,Ve&&(u.prototype[Ve]=vh),u},Re=gl();he?((he.exports=Re)._=Re,Or._=Re):V._=Re}).call(qe)})(sr,sr.exports);var Td=sr.exports;exports.VType=void 0;(function(a){a.BOOL="bool",a.INT="int",a.FLOAT="float",a.ARRAY="array",a.BOX="box",a.CHART_POINT="chart.point",a.COLOR="color",a.CONST="const",a.LABEL="label",a.LINE="line",a.LINEFILL="linefill",a.MAP="map",a.MATRIX="matrix",a.POLYLINE="polyline",a.SERIES="series",a.SIMPLE="simple",a.STRING="string",a.TABLE="table",a.UNDETERMINED="undetermined type",a.INPUT="input",a.NA="na",a.VOID="void",a.ENUM="enum"})(exports.VType||(exports.VType={}));exports.VRuleType=void 0;(function(a){a.FlowStmt="FlowStmt",a.DeclareAssign="DeclareAssign",a.VarBlockStmt="VarBlockStmt",a.VarSingle="VarSingle",a.VarMultiple="VarMultiple",a.ParenthesizedExpression="ParenthesizedExpression",a.AdditiveExpression="AdditiveExpression",a.RelationalExpression="RelationalExpression",a.EqualityExpression="EqualityExpression",a.TernaryExpression="TernaryExpression",a.UnaryExpression="UnaryExpression",a.NotExpression="NotExpression",a.MemberIndexExpression="MemberIndexExpression",a.MethodExpression="MethodExpression",a.LogicalAndExpression="LogicalAndExpression",a.LogicalOrExpression="LogicalOrExpression",a.MultiplicativeExpression="MultiplicativeExpression",a.Brackethesized="Brackethesized",a.IfStatement="IfStatement",a.ForToStatement="ForToStatement",a.ForInStatement="ForInStatement",a.SwitchStatement="SwitchStatement",a.CaseClause="CaseClause",a.DefaultCaluse="DefaultCaluse",a.WhileStatement="WhileStatement",a.ImportElement="ImportElement",a.Literal="Literal",a.ArrowFunction="ArrowFunction",a.ArrowMethod="ArrowMethod",a.TypeStatement="TypeStatement",a.Name="Name",a.AgainAssign="AgainAssign",a.EnumStatement="EnumStatement"})(exports.VRuleType||(exports.VRuleType={}));exports.VAdjustment=void 0;(function(a){a.dividends="dividends",a.none="none",a.splits="splits"})(exports.VAdjustment||(exports.VAdjustment={}));exports.VAlert=void 0;(function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"})(exports.VAlert||(exports.VAlert={}));exports.VBarmergeGaps=void 0;(function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"})(exports.VBarmergeGaps||(exports.VBarmergeGaps={}));exports.VPlotDisplay=void 0;(function(a){a.all="all",a.dataWindow="data_window",a.none="none",a.pane="pane",a.priceScale="price_scale",a.statusLine="status_line"})(exports.VPlotDisplay||(exports.VPlotDisplay={}));exports.VExtend=void 0;(function(a){a.both="both",a.left="left",a.none="none",a.right="right"})(exports.VExtend||(exports.VExtend={}));exports.VFormatType=void 0;(function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"})(exports.VFormatType||(exports.VFormatType={}));exports.VHlineStyle=void 0;(function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"})(exports.VHlineStyle||(exports.VHlineStyle={}));exports.VLabelStyle=void 0;(function(a){a.styleArrowdown="style_arrowdown",a.styleArrowup="style_arrowup",a.styleCircle="style_circle",a.styleCross="style_cross",a.styleDiamond="style_diamond",a.styleFlag="style_flag",a.styleLabelCenter="style_label_center",a.styleLabelDown="style_label_down",a.styleLabelLeft="style_label_left",a.styleLabelLowerLeft="style_label_lower_left",a.styleLabelLowerRight="style_label_lower_right",a.styleLabelRight="style_label_right",a.styleLabelUp="style_label_up",a.styleLabelUpperLeft="style_label_upper_left",a.styleLabelUpperRight="style_label_upper_right",a.styleNone="style_none",a.styleSquare="style_square",a.styleTextOutline="style_text_outline",a.styleTriangledown="style_triangledown",a.styleTriangleup="style_triangleup",a.styleXcross="style_xcross"})(exports.VLabelStyle||(exports.VLabelStyle={}));exports.VLineStyle=void 0;(function(a){a.styleArrowBoth="style_arrow_both",a.styleArrowLeft="style_arrow_left",a.styleArrowRight="style_arrow_right",a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"})(exports.VLineStyle||(exports.VLineStyle={}));exports.VLocation=void 0;(function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"})(exports.VLocation||(exports.VLocation={}));exports.VSortOrder=void 0;(function(a){a.ascending="ascending",a.descending="descending"})(exports.VSortOrder||(exports.VSortOrder={}));exports.VPlotStyle=void 0;(function(a){a.styleArea="Area",a.styleAreabr="Area With Breaks",a.styleCircles="Circles",a.styleColumns="Columns",a.styleCross="Cross",a.styleHistogram="Histogram",a.styleLine="Line",a.styleLinebr="Line With Breaks",a.styleStepline="Step Line",a.styleSteplineDiamond="Step Line With Diamonds",a.styleSteplinebr="Step line with Breaks"})(exports.VPlotStyle||(exports.VPlotStyle={}));exports.VPosition=void 0;(function(a){a.bottomCenter="bottom_center",a.bottomLeft="bottom_left",a.bottomRight="bottom_right",a.middleCenter="middle_center",a.middleLeft="middle_left",a.middleRight="middle_right",a.topCenter="top_center",a.topLeft="top_left",a.topRight="top_right"})(exports.VPosition||(exports.VPosition={}));exports.VScale=void 0;(function(a){a.left="left",a.none="none",a.right="right"})(exports.VScale||(exports.VScale={}));exports.VSession=void 0;(function(a){a.extended="extended",a.regular="regular"})(exports.VSession||(exports.VSession={}));exports.VShape=void 0;(function(a){a.arrowdown="arrowdown",a.arrowup="arrowup",a.circle="circle",a.cross="cross",a.diamond="diamond",a.flag="flag",a.labeldown="labeldown",a.labelup="labelup",a.square="square",a.triangledown="triangledown",a.triangleup="triangleup",a.xcross="xcross"})(exports.VShape||(exports.VShape={}));exports.VSize=void 0;(function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"})(exports.VSize||(exports.VSize={}));exports.VFont=void 0;(function(a){a.familyDefault="default",a.familyMonospace="monospace"})(exports.VFont||(exports.VFont={}));exports.VStrategy=void 0;(function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"})(exports.VStrategy||(exports.VStrategy={}));exports.VCommission=void 0;(function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"})(exports.VCommission||(exports.VCommission={}));exports.VDirection=void 0;(function(a){a.all="all",a.long="long",a.short="short"})(exports.VDirection||(exports.VDirection={}));exports.VOca=void 0;(function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"})(exports.VOca||(exports.VOca={}));exports.VText=void 0;(function(a){a.alignBottom="align_bottom",a.alignCenter="align_center",a.alignLeft="align_left",a.alignRight="align_right",a.alignTop="align_top",a.wrapAuto="wrap_auto",a.wrapNone="wrap_none"})(exports.VText||(exports.VText={}));exports.VXloc=void 0;(function(a){a.bar_index="bar_index",a.bar_time="bar_time"})(exports.VXloc||(exports.VXloc={}));exports.VYloc=void 0;(function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"})(exports.VYloc||(exports.VYloc={}));exports.VEarnings=void 0;(function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"})(exports.VEarnings||(exports.VEarnings={}));exports.VPivotType=void 0;(function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"})(exports.VPivotType||(exports.VPivotType={}));exports.VInputType=void 0;(function(a){a.INT="int",a.BOOL="bool",a.TIME="time",a.COLOR="color",a.FLOAT="float",a.PRICE="price",a.SOURCE="source",a.STRING="string",a.SYMBOL="symbol",a.SESSION="session",a.TEXT_AREA="text_area",a.TIMEFRAME="timeframe",a.ENUM="enum"})(exports.VInputType||(exports.VInputType={}));var vo;(function(a){a.description="description",a.field="field",a.function="function",a.param="param",a.returns="returns",a.type="type",a.variable="variable",a.enum="enum"})(vo||(vo={}));exports.VScriptType=void 0;(function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"})(exports.VScriptType||(exports.VScriptType={}));const Id={onlyInLoop:"'$text' is only allowed inside loops",invalidType:"Invalid argument 'expr$index' in 'operator SQBR' call",typeUseError:"Cannot specify a type form '$text' without also specifying the type.",notTypeKeyword:"'$text' is not a valid type keyword in variable declaration",undeclared:"Undeclared identifier '$name'",repeatVar:"'$name' is already defined",typeRepeatErr:"$keyword '$name' is already defined.",typeMismatch:"Cannot call '$operator' with argument '$index'. An argument of '$typeE' type was used but a '$typeR' is expected.",assignTypeMismatch:"Cannot assign a value of the `$typeE` type to the '$name' variable. The variable is declared with the `$typeR` type.",voidNotVar:"Void expression cannot be assigned to a variable",declareTypeErr:"Declared type '$type' is not compatible with assigned type '$valueType'",mapKeyValErr:"Cannot put <$typeA, $typeB> pairs into a map containing `$typeC` keys and `$typeD` values. The maps passed into the `$name()` function must have the same key types and value types.",inputSourceErr:"Invalid value for the '$name' parameter of the '$funcName' function. Possible values: [open, high, low, close, hl2, hlc3, ohlc4, hlcc4, volume].",buildInUseErr:"Cannot use '$name' as the default value of a type's field. The default value cannot be a function, variable or calculation.",argsLenErr:"Too many arguments passed into the `$name()` function call. Passed $lenA arguments but expected $lenB.",requiredParamErr:"No value assigned to the `$argName` parameter in $name()",argsSyntaxErr:"Syntax error after the argument for `$argName`. Arguments without their parameter name cannot be used after arguments with parameter names.",requestArgsErr:"Type $type cannot be used in $name '$argName' argument",mapKeyErr:"Incorrect `key` type `$type` in the variable. The `key` type must be one of the following: int, float, string, bool, color.",templateErr:"Incorrect number of arguments for the template: $countA expected, $countB passed.",templateNoSupportErr:"The '$name()' function does not support templates",ifOrSwitchTypeErr:"Return type of one of the '$keyword' blocks is not compatible with return type of other block(s) ($types)",argsNameErr:"The '$name' function does not have an argument with the name '$argName'",noFiledErr:"Object has no field $name",methodNotExistErr:"Could not find method or method reference '$methodName' for '$name'",tupleVarErr:"Syntax error: The quantities of tuple elements on each side of the assignment operator do not match. The right side has $indexA but the left side has $indexB.",tupleLeftVarErr:"Invalid assignment. Cannot assign a tuple to a variable '$name'.",tupleRightVarErr:"Cannot assign a variable to a tuple. The right side must be a function call or structure ('if', 'switch', 'for', 'while') returning a tuple with the same number of elements.",tempateTypeErr:"Syntax error: Only templates for arrays and matrices consist of a single type identifier enclosed in angle brackets.",qualifierErr:"'$name' is not a valid type qualifier. Possible values: 'const', 'simple', 'series'",notFindFuncErr:"Could not find function or function reference '$name'",naVarErr:"Value with NA type cannot be assigned to a variable that was defined without type keyword",notHistoryErr:"Variable '$name' doesn't have history values",defaultValueErr:"The default value cannot be a function, variable or calculation.",defaultValueTypeErr:"Default value of type $typeE can not be assigned to an argument of type $typeR",typeFieldErr:"In a type declaration, all fields without a default value must be explicitly typified.",unaryErr:"Syntax error at input '$sign'",funcArgAssignErr:"Function arguments cannot be mutable ('$name')",declaredErr:"A variable declared with the '$prefix' keyword cannot accept values of the '$type' form. Assign a '$prefix' value to this variable or remove the '$prefix' keyword from its declaration.",globalFuncErr:"Cannot use '$name' in local scope",onlyStatementErr:"Scripts must contain one declaration statement: `indicator()`, `strategy()` or `library()`, Your script has $count.",modifyGlobalVarErr:"Cannot modify global variable '$name' in function",inputDefvalErr:"Arguments of input function must be of constant type, or 'source' builtin variables.",objectIsNaErr:"Cannot access the '$name' $type of an na object. The object is 'na'.",buidinAssignErr:"Cannot assign a new value to the built-in variable '$name'.",buidinVarErr:"Cannot shadow the built-in variable `$name` because it has already been used as a built-in.",useNaErr:"Cannot use an `na` value of an unspecified type in the `$name` function.",libraryTitleErr:"Invalid argument 'title' in 'library' call. It cannot contain spaces, special characters or begin with a digit.",exportFuncArgErr:"All exported functions args should be typified",indiRunErr:"An indicator must contain at least one of the following: any `plot*()` function, `barcolor()`, `bgcolor()`, `hline()`, `alertcondition()`, or any drawing (line, label, box, table, polyline).",libraryExportErr:"A library must contain at least one exported function, method, or type.",strategyRunErr:"A strategy must contain at least one of the following: any `strategy.*()` function that creates orders, any `plot*()` function, `barcolor()`, `bgcolor()`, `hline()`, or any drawing (line, label, box, table, polyline).",exportUseErr:"Only libraries can contain exported $type.",funcRepeatErr:"The '$name' function has overloads with the same parameters. The type of parameters must be different in overloaded versions of functions.",importMultipleErr:"Cannot import a library more than once",importNotExitErr:"The user '$username' does not have a published library titled '$libraryName'",importNameRepeatErr:"More than one import uses the same alias: $name. Previous usage at line: $line",exportFuncHasInputErr:"The exported function '$func' depends on the '$name' input variable, which is not allowed.",libraryTitleIsKeywordErr:"Invalid argument 'title' in 'library' call. Token: '$name' can't be used as library title.",exportFuncUseGlobalVarErr:"Cannot use global variables in exported functions. Function: $func",loopRuntimeErr:"Loop takes too long to execute (> 500 ms)",paramsErr:"Invalid value '$value' for '$param' parameter of the '$func' function. Possible values: $targetVal",displayErr:"Invalid argument 'display' in '$func' call. Possible values: $values",exportFuncUseReqErr:"Cannot use `request.*()` call in exported function `$name()`",requestExprErr:"Type series $type cannot be used in $name 'expression' argument",argDefaultErr:"The default value assigned to a parameter must be either a literal value (e.g., `5`) or a built-in variable (e.g., `close`)",overloadFuncErr:"Cannot use global variables or any values qualified as 'input' in the local scopes of overloaded functions or methods. Remove any global variables or inputs from the scopes of all '$name()' overloads.",againAssignErr:"Unable to determine the object for the field assignment. Try putting the object into a separate variable before assigning values to its fields.",requestUserInLoopErr:"Cannot use `request.*()` call within loops or conditional structures.",enumVarNameErr:"Invalid enum name '$name': `bool`, `int`, `float`, `string`, and `color` are not allowed.",enumVarNameBuiltinErr:"Invalid object name: $name. Namespaces of built-ins cannot be used.",typeNameErr:"Invalid user-defined type name '$name': `bool`, `int`, `float`, `string`, and `color` are not allowed.",enumUseErr:"Cannot use the '$name' as a value. Use one of the enum's fields instead.",conditionalErr:"'$name' conditional expression must be of a bool type!",fortoErr:'The value of the "for" loop must be a number.',indicatorUseStrategyFuncErr:"You cannot use strategy $type ($name) in indicator script.",arrEmptyErr:"Array must not be empty",arrLengthDiffErr:"Arrays have different lengths",arrTypeErr:"Array type error, the 'array.$name' method can only use $type type array.",inputOptErr:"input's defval should be in options, but '$defval' is not in [$args]",mathRandomErr:"min must be less than max",matrixRehapeErr:"New matrix must be of same area as original matrix",strategyExitErr:"strategy.exit must have at least one of the following parameters: 'profit', 'limit', 'loss', 'stop' or one of the following pairs: 'trail_offset' and 'trail_price' / 'trail_points'. To close the position at market price, use 'strategy.close'",arrLenErr:"Invalid array length",mergeCellErr:"error: start_column > end_column or start_row > end_row",minOrMaxErr:"Input's `defval` value must be between `minval` and `maxval`",requestsNumErr:"Exceeded the maximum number of requests 40",undeterminedTypeMethodErr:"Method calls must specify the type, please add the type to '$name'",requestUseFuncErr:"built-in '$func' cannot be used with any parameter of the `$name()` function.",requestLowerTfPeriodErr:"The chart's timeframe must be greater or equal to the `$period` timeframe used with `request.security_lower_tf()`.",optionsRepeatErr:"options have to be unique, but there is at least one duplicate in options. Duplicated values: $option",scriptLongTimeErr:"Script execution takes too long, the limit is 40 seconds",plotFillForceOverlayErr:"Cannot call `fill()` with two plots that may not show in the same pane. Both plots must have the same `force_overlay` value."},Sd={repeatVar:"Shadowing variable '$name' which exists in parent scope. Did you want to use the ':=' operator instead of '=' ?",typeMismatch:"The `$index` parameter of the `$operator` function accepts a '$type' argument. To avoid potential unexpected results, pass a '$type' value or expression to this parameter.",moreSameArg:"More than one '$arg' arguments are supplied. Only the first one will be used.",localScopeGetHistory:"The variable '$name' is declared in local scope, which may not be executed at every update. So, obtaining its historical values may lead to unexpected results",localScopeWarning:"The function '$name' should be called on each calculation for consistency. It is recommended to extract the call from this scope",strategyCalcTickWarn:"Strategies without `calc_on_every_tick = true` only calculate on confirmed chart bars. In this case, `barstate.islast` may not initially return `true` on realtime bars, as the last bar is unconfirmed until it closes. If you need to check whether a bar is the latest before it closes, enable `calc_on_every_tick` in the `strategy()` function.",conditionWarning:"The `condition` parameter of the `$name` accepts a 'bool' argument. To avoid potential unexpected results, pass a 'bool' value or expression to this parameter.",lineWidthWarning:"Passing a value below 1 to `linewidth` will be replaced with 1 during compilation.",boolVarNumWarning:"The `$name` variable casts a numeric value to the 'bool' type. To avoid potential unexpected results, assign a 'bool' value to this variable."};exports.VType.SERIES,exports.VType.SIMPLE,exports.VType.INPUT,exports.VType.CONST;exports.VType.INT,exports.VType.FLOAT,exports.VType.BOOL,exports.VType.COLOR,exports.VType.STRING;const Cd=["close","open","high","low","hl2","hlc3","hlcc4","ohlc4","volume"],Od={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},Ld={functions:[{name:"calcBB",desc:["Computes Bollinger Band values from an array of data."],args:[{name:"srcArray",desc:"(array<float>) The array where the queue is maintained.",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series float mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"srcArray",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series int mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],index:1},{name:"Scanner.new",args:[{name:"enabled",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"},{name:"ticker",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"},{name:"timeframe",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.new(series bool enabled, series string ticker, series string timeframe) → Scanner"]},{name:"Scanner.copy",args:[{name:"object",required:!0,allowedTypeIDs:["Scanner"],displayType:"Scanner"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},info:"The identifier of the object to be copied.",syntax:["Scanner.copy(Scanner object) → Scanner"]}],methods:[{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],desc:["Computes Bollinger Band values from an array of data."],originalName:"array.calcBB",syntax:["calcBB(series float mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},thisType:["float[]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],originalName:"array.calcBB",syntax:["calcBB(series int mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},thisType:["float[]"],index:1},{name:"Scanner.copy",args:[],returnedTypes:["Scanner"],thisType:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.copy() → Scanner"]}],types:[{fields:[{name:"enabled",type:"series bool"},{name:"ticker",type:"series string"},{name:"timeframe",type:"series string"}],name:"Scanner",pos:{lineNumber:30,column:12}}],description:"Provides a tool to quickly output a label on the chart.",codeStr:'const $name={calcBB:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_12","var")||$_var.setVarValue("mean",e+"_14_12",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_13","var")||$_var.setVarValue("dev",e+"_14_13",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_16_16")),v=a.avg(e+"_16_16"),$_var.setVarValue("mean",e+"_14_12",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_17_16")*r),s=a.stdev(e+"_17_16")*r,$_var.setVarValue("dev",e+"_14_13",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},calcBB$1:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_21","var")||$_var.setVarValue("mean",e+"_14_21",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_22","var")||$_var.setVarValue("dev",e+"_14_22",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_25_16")),v=a.avg(e+"_25_16"),$_var.setVarValue("mean",e+"_14_21",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_26_16")*r),s=a.stdev(e+"_26_16")*r,$_var.setVarValue("dev",e+"_14_22",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},Scanner:$_var.getTypeInstance({enabled:void 0,ticker:void 0,timeframe:void 0},[])};'},Rd=["case","catch","default","delete","do","finally","function","instanceof","new","return","this","throw","try","typeof","void","with","const"],$d=["linefill","polyline","matrix","series","simple","string","array","color","const","float","label","table","bool","line","box","int","map","continue","for","varip","var","in","export","import","method","switch","break","while","else","type","and","for","not","as","by","if","in","or","to"];exports.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"})(exports.VMarkerSeverity||(exports.VMarkerSeverity={}));/**
|
28
28
|
* @license
|
29
29
|
* Copyright 2019 Google LLC
|
30
30
|
* SPDX-License-Identifier: Apache-2.0
|
31
|
-
*/const yo=Symbol("Comlink.proxy"),Bd=Symbol("Comlink.endpoint"),Nd=Symbol("Comlink.releaseProxy"),Ni=Symbol("Comlink.finalizer"),or=Symbol("Comlink.thrown"),wo=a=>typeof a=="object"&&a!==null||typeof a=="function",Pd={canHandle:a=>wo(a)&&a[yo],serialize(a){const{port1:b,port2:s}=new MessageChannel;return Mi(a,b),[s,[s]]},deserialize(a){return a.start(),Eo(a)}},Md={canHandle:a=>wo(a)&&or in a,serialize({value:a}){let b;return a instanceof Error?b={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:b={isError:!1,value:a},[b,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},bo=new Map([["proxy",Pd],["throw",Md]]);function Dd(a,b){for(const s of a)if(b===s||s==="*"||s instanceof RegExp&&s.test(b))return!0;return!1}function Mi(a,b=globalThis,s=["*"]){b.addEventListener("message",function Y(U){if(!U||!U.data)return;if(!Dd(s,U.origin)){console.warn(`Invalid origin '${U.origin}' for comlink proxy`);return}const{id:Mn,type:P,path:ln}=Object.assign({path:[]},U.data),rn=(U.data.argumentList||[]).map(be);let nn;try{const J=ln.slice(0,-1).reduce((an,wn)=>an[wn],a),k=ln.reduce((an,wn)=>an[wn],a);switch(P){case"GET":nn=k;break;case"SET":J[ln.slice(-1)[0]]=be(U.data.value),nn=!0;break;case"APPLY":nn=k.apply(J,rn);break;case"CONSTRUCT":{const an=new k(...rn);nn=Io(an)}break;case"ENDPOINT":{const{port1:an,port2:wn}=new MessageChannel;Mi(a,wn),nn=Hd(an,[an])}break;case"RELEASE":nn=void 0;break;default:return}}catch(J){nn={value:J,[or]:0}}Promise.resolve(nn).catch(J=>({value:J,[or]:0})).then(J=>{const[k,an]=cr(J);b.postMessage(Object.assign(Object.assign({},k),{id:Mn}),an),P==="RELEASE"&&(b.removeEventListener("message",Y),xo(b),Ni in a&&typeof a[Ni]=="function"&&a[Ni]())}).catch(J=>{const[k,an]=cr({value:new TypeError("Unserializable return value"),[or]:0});b.postMessage(Object.assign(Object.assign({},k),{id:Mn}),an)})}),b.start&&b.start()}function Wd(a){return a.constructor.name==="MessagePort"}function xo(a){Wd(a)&&a.close()}function Eo(a,b){return Pi(a,[],b)}function ur(a){if(a)throw new Error("Proxy has been released and is not useable")}function Ao(a){return He(a,{type:"RELEASE"}).then(()=>{xo(a)})}const lr=new WeakMap,fr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const b=(lr.get(a)||0)-1;lr.set(a,b),b===0&&Ao(a)});function Fd(a,b){const s=(lr.get(b)||0)+1;lr.set(b,s),fr&&fr.register(a,b,a)}function Ud(a){fr&&fr.unregister(a)}function Pi(a,b=[],s=function(){}){let Y=!1;const U=new Proxy(s,{get(Mn,P){if(ur(Y),P===Nd)return()=>{Ud(U),Ao(a),Y=!0};if(P==="then"){if(b.length===0)return{then:()=>U};const ln=He(a,{type:"GET",path:b.map(rn=>rn.toString())}).then(be);return ln.then.bind(ln)}return Pi(a,[...b,P])},set(Mn,P,ln){ur(Y);const[rn,nn]=cr(ln);return He(a,{type:"SET",path:[...b,P].map(J=>J.toString()),value:rn},nn).then(be)},apply(Mn,P,ln){ur(Y);const rn=b[b.length-1];if(rn===Bd)return He(a,{type:"ENDPOINT"}).then(be);if(rn==="bind")return Pi(a,b.slice(0,-1));const[nn,J]=mo(ln);return He(a,{type:"APPLY",path:b.map(k=>k.toString()),argumentList:nn},J).then(be)},construct(Mn,P){ur(Y);const[ln,rn]=mo(P);return He(a,{type:"CONSTRUCT",path:b.map(nn=>nn.toString()),argumentList:ln},rn).then(be)}});return Fd(U,a),U}function qd(a){return Array.prototype.concat.apply([],a)}function mo(a){const b=a.map(cr);return[b.map(s=>s[0]),qd(b.map(s=>s[1]))]}const To=new WeakMap;function Hd(a,b){return To.set(a,b),a}function Io(a){return Object.assign(a,{[yo]:!0})}function cr(a){for(const[b,s]of bo)if(s.canHandle(a)){const[Y,U]=s.serialize(a);return[{type:"HANDLER",name:b,value:Y},U]}return[{type:"RAW",value:a},To.get(a)||[]]}function be(a){switch(a.type){case"HANDLER":return bo.get(a.name).deserialize(a.value);case"RAW":return a.value}}function He(a,b,s){return new Promise(Y=>{const U=Gd();a.addEventListener("message",function Mn(P){!P.data||!P.data.id||P.data.id!==U||(a.removeEventListener("message",Mn),Y(P.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:U},b),s)})}function Gd(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}exports.
|
31
|
+
*/const yo=Symbol("Comlink.proxy"),Bd=Symbol("Comlink.endpoint"),Nd=Symbol("Comlink.releaseProxy"),Ni=Symbol("Comlink.finalizer"),or=Symbol("Comlink.thrown"),wo=a=>typeof a=="object"&&a!==null||typeof a=="function",Pd={canHandle:a=>wo(a)&&a[yo],serialize(a){const{port1:b,port2:s}=new MessageChannel;return Mi(a,b),[s,[s]]},deserialize(a){return a.start(),Eo(a)}},Md={canHandle:a=>wo(a)&&or in a,serialize({value:a}){let b;return a instanceof Error?b={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:b={isError:!1,value:a},[b,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},bo=new Map([["proxy",Pd],["throw",Md]]);function Dd(a,b){for(const s of a)if(b===s||s==="*"||s instanceof RegExp&&s.test(b))return!0;return!1}function Mi(a,b=globalThis,s=["*"]){b.addEventListener("message",function Y(U){if(!U||!U.data)return;if(!Dd(s,U.origin)){console.warn(`Invalid origin '${U.origin}' for comlink proxy`);return}const{id:Mn,type:P,path:ln}=Object.assign({path:[]},U.data),rn=(U.data.argumentList||[]).map(be);let nn;try{const J=ln.slice(0,-1).reduce((an,wn)=>an[wn],a),k=ln.reduce((an,wn)=>an[wn],a);switch(P){case"GET":nn=k;break;case"SET":J[ln.slice(-1)[0]]=be(U.data.value),nn=!0;break;case"APPLY":nn=k.apply(J,rn);break;case"CONSTRUCT":{const an=new k(...rn);nn=Io(an)}break;case"ENDPOINT":{const{port1:an,port2:wn}=new MessageChannel;Mi(a,wn),nn=Hd(an,[an])}break;case"RELEASE":nn=void 0;break;default:return}}catch(J){nn={value:J,[or]:0}}Promise.resolve(nn).catch(J=>({value:J,[or]:0})).then(J=>{const[k,an]=cr(J);b.postMessage(Object.assign(Object.assign({},k),{id:Mn}),an),P==="RELEASE"&&(b.removeEventListener("message",Y),xo(b),Ni in a&&typeof a[Ni]=="function"&&a[Ni]())}).catch(J=>{const[k,an]=cr({value:new TypeError("Unserializable return value"),[or]:0});b.postMessage(Object.assign(Object.assign({},k),{id:Mn}),an)})}),b.start&&b.start()}function Wd(a){return a.constructor.name==="MessagePort"}function xo(a){Wd(a)&&a.close()}function Eo(a,b){return Pi(a,[],b)}function ur(a){if(a)throw new Error("Proxy has been released and is not useable")}function Ao(a){return He(a,{type:"RELEASE"}).then(()=>{xo(a)})}const lr=new WeakMap,fr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const b=(lr.get(a)||0)-1;lr.set(a,b),b===0&&Ao(a)});function Fd(a,b){const s=(lr.get(b)||0)+1;lr.set(b,s),fr&&fr.register(a,b,a)}function Ud(a){fr&&fr.unregister(a)}function Pi(a,b=[],s=function(){}){let Y=!1;const U=new Proxy(s,{get(Mn,P){if(ur(Y),P===Nd)return()=>{Ud(U),Ao(a),Y=!0};if(P==="then"){if(b.length===0)return{then:()=>U};const ln=He(a,{type:"GET",path:b.map(rn=>rn.toString())}).then(be);return ln.then.bind(ln)}return Pi(a,[...b,P])},set(Mn,P,ln){ur(Y);const[rn,nn]=cr(ln);return He(a,{type:"SET",path:[...b,P].map(J=>J.toString()),value:rn},nn).then(be)},apply(Mn,P,ln){ur(Y);const rn=b[b.length-1];if(rn===Bd)return He(a,{type:"ENDPOINT"}).then(be);if(rn==="bind")return Pi(a,b.slice(0,-1));const[nn,J]=mo(ln);return He(a,{type:"APPLY",path:b.map(k=>k.toString()),argumentList:nn},J).then(be)},construct(Mn,P){ur(Y);const[ln,rn]=mo(P);return He(a,{type:"CONSTRUCT",path:b.map(nn=>nn.toString()),argumentList:ln},rn).then(be)}});return Fd(U,a),U}function qd(a){return Array.prototype.concat.apply([],a)}function mo(a){const b=a.map(cr);return[b.map(s=>s[0]),qd(b.map(s=>s[1]))]}const To=new WeakMap;function Hd(a,b){return To.set(a,b),a}function Io(a){return Object.assign(a,{[yo]:!0})}function cr(a){for(const[b,s]of bo)if(s.canHandle(a)){const[Y,U]=s.serialize(a);return[{type:"HANDLER",name:b,value:Y},U]}return[{type:"RAW",value:a},To.get(a)||[]]}function be(a){switch(a.type){case"HANDLER":return bo.get(a.name).deserialize(a.value);case"RAW":return a.value}}function He(a,b,s){return new Promise(Y=>{const U=Gd();a.addEventListener("message",function Mn(P){!P.data||!P.data.id||P.data.id!==U||(a.removeEventListener("message",Mn),Y(P.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:U},b),s)})}function Gd(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}exports.DEFAULT_EXPORT_TEST=Ld;exports.ERRORS_TIPS=Id;exports.JS_KEYWORDS=Rd;exports.READY_ONLY_OPTIONS=Od;exports.SOURCE_TYPE_BUILTIN=Cd;exports.TCC_KEYWORDS=$d;exports.WARNING_TIPS=Sd;exports.commonjsGlobal=qe;exports.expose=Mi;exports.getAugmentedNamespace=Ad;exports.getDefaultExportFromCjs=Ed;exports.lodashExports=Td;exports.proxy=Io;exports.wrap=Eo;
|
@@ -16,11 +16,12 @@ interface IArrayArgs {
|
|
16
16
|
nth?: number;
|
17
17
|
percentage?: number;
|
18
18
|
order?: VSortOrder;
|
19
|
+
type?: string;
|
19
20
|
}
|
20
21
|
export default class BuildInArray {
|
21
22
|
private _errorListener;
|
22
23
|
constructor(errorListener: TccErrorListener);
|
23
|
-
new({ size, initial_value }?: IArrayArgs): PseudoArray;
|
24
|
+
new({ size, initial_value, type }?: IArrayArgs): PseudoArray;
|
24
25
|
new_float({ size, initial_value }?: IArrayArgs): PseudoArray;
|
25
26
|
new_int({ size, initial_value }?: IArrayArgs): PseudoArray;
|
26
27
|
new_color({ size, initial_value }?: IArrayArgs): PseudoArray;
|
@@ -79,7 +80,9 @@ export default class BuildInArray {
|
|
79
80
|
export declare class PseudoArray {
|
80
81
|
private _arrInstance;
|
81
82
|
private _errorListener?;
|
82
|
-
|
83
|
+
private _isNumber?;
|
84
|
+
private _thisType?;
|
85
|
+
constructor(size?: number, initialValue?: any, errorListener?: TccErrorListener, type?: string);
|
83
86
|
get isArray(): boolean;
|
84
87
|
get _value(): any[];
|
85
88
|
set _value(val: any[]);
|
@@ -23,7 +23,7 @@ export default class BuildInMath {
|
|
23
23
|
acos({ angle }: IMathArgs): number | undefined;
|
24
24
|
asin({ angle }: IMathArgs): number | undefined;
|
25
25
|
atan({ angle }: IMathArgs): number | undefined;
|
26
|
-
avg(_: IMathArgs, numbers: number[]): number;
|
26
|
+
avg(_: IMathArgs, numbers: number[]): number | undefined;
|
27
27
|
ceil({ number }: IMathArgs): number | undefined;
|
28
28
|
floor({ number }: IMathArgs): number | undefined;
|
29
29
|
cos({ angle }: IMathArgs): number | undefined;
|
@@ -22,11 +22,12 @@ interface IMatrixArgs {
|
|
22
22
|
row2?: number;
|
23
23
|
column1?: number;
|
24
24
|
column2?: number;
|
25
|
+
type?: string;
|
25
26
|
}
|
26
27
|
export default class BuildInMatrix {
|
27
28
|
private _errorListener;
|
28
29
|
constructor(errorListener: TccErrorListener);
|
29
|
-
new({ rows, columns, initial_value }?: IMatrixArgs): Matrix;
|
30
|
+
new({ rows, columns, initial_value, type }?: IMatrixArgs): Matrix;
|
30
31
|
avg({ id }: IMatrixArgs): number | undefined;
|
31
32
|
col({ id, column }: IMatrixArgs): PseudoArray | undefined;
|
32
33
|
det({ id }: IMatrixArgs): number | undefined;
|
@@ -79,7 +80,9 @@ export default class BuildInMatrix {
|
|
79
80
|
declare class Matrix {
|
80
81
|
private _matrixInstance;
|
81
82
|
private _errorListener;
|
82
|
-
|
83
|
+
private _isNumber?;
|
84
|
+
private _thisType?;
|
85
|
+
constructor(rows: number | undefined, columns: number | undefined, initial_value: any, errorListener: TccErrorListener, type?: string);
|
83
86
|
get _matrixArray(): any[][];
|
84
87
|
get _value(): PseudoArray[];
|
85
88
|
set _value(matrix: PseudoArray[]);
|
@@ -103,7 +106,7 @@ declare class Matrix {
|
|
103
106
|
fill({ value, from_row, to_row, from_column, to_column }?: IMatrixArgs): void;
|
104
107
|
kron({ id2 }: IMatrixArgs): Matrix;
|
105
108
|
mode(): any;
|
106
|
-
mult({ id2 }: IMatrixArgs): Matrix;
|
109
|
+
mult({ id2 }: IMatrixArgs): PseudoArray | Matrix;
|
107
110
|
pinv(): Matrix;
|
108
111
|
rank(): number;
|
109
112
|
sort({ column, order }?: IMatrixArgs): void;
|
@@ -11,7 +11,7 @@ export default class BuildInTimeframe {
|
|
11
11
|
private _variables;
|
12
12
|
private _cacheData;
|
13
13
|
constructor(variables: BuiltInVariables);
|
14
|
-
change({ timeframe }: ITimeArgs, posStr: string):
|
14
|
+
change({ timeframe }: ITimeArgs, posStr: string): any;
|
15
15
|
in_seconds({ timeframe }?: ITimeArgs): number;
|
16
16
|
from_seconds({ seconds }: ITimeArgs): string;
|
17
17
|
private _calcTimeOffset;
|
@@ -207,7 +207,7 @@ export declare class BuildInFunctions {
|
|
207
207
|
bgcolor(args: IBgColorArgs, posStr: string): void;
|
208
208
|
private _verifyDisplay;
|
209
209
|
private _setColors;
|
210
|
-
max_bars_back({
|
210
|
+
max_bars_back({ num, var_name }: IMaxBarsBackArgs): void;
|
211
211
|
float({ x }: IColorArgs): any;
|
212
212
|
bool({ x }: IColorArgs): any;
|
213
213
|
string({ x }: IColorArgs): any;
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import { IKeyObjectValue } from "../type";
|
2
2
|
declare class UserTypeClass {
|
3
3
|
private _defaultParams;
|
4
|
-
private _UserTypeFileds;
|
5
4
|
private _varipKeys;
|
6
5
|
constructor(params: IKeyObjectValue, keys: string[]);
|
7
6
|
copy(typeObject: IKeyObjectValue): IKeyObjectValue;
|
8
|
-
new(params?: IKeyObjectValue):
|
9
|
-
addNewMethod(name: string, func: any): void;
|
7
|
+
new(params?: IKeyObjectValue): IKeyObjectValue;
|
10
8
|
private _createDynamicClass;
|
11
9
|
private _deepCopy;
|
12
10
|
}
|
@@ -7,6 +7,7 @@ export declare function periodTransform(period: string): string;
|
|
7
7
|
export declare function generateRandomId(length?: number): string;
|
8
8
|
export declare function parseTimezoneOffset(timezone: string): number;
|
9
9
|
export declare function parserTimezone(time?: any, timezone?: string): moment.Moment;
|
10
|
+
export declare function parserTimeStamp(time?: any, timezone?: string): number;
|
10
11
|
export declare function periodConvert(period: string, time: number): number;
|
11
12
|
export declare function isNotNum(num?: number): boolean;
|
12
13
|
export declare function argColorsHandle(args: any, colors: string[]): void;
|
@@ -11,6 +11,7 @@ import { BlockLineContext } from "./tccScriptParser";
|
|
11
11
|
import { VariableDeclarationStmtContext } from "./tccScriptParser";
|
12
12
|
import { DeclareAssignContext } from "./tccScriptParser";
|
13
13
|
import { AgainAssignContext } from "./tccScriptParser";
|
14
|
+
import { AgainAssignNameContext } from "./tccScriptParser";
|
14
15
|
import { VarModifierContext } from "./tccScriptParser";
|
15
16
|
import { BlockSequenceContext } from "./tccScriptParser";
|
16
17
|
import { ExpressionSequenceContext } from "./tccScriptParser";
|
@@ -143,6 +144,12 @@ export default class tccScriptParserVisitor<Result> extends ParseTreeVisitor<Res
|
|
143
144
|
* @return the visitor result
|
144
145
|
*/
|
145
146
|
visitAgainAssign?: (ctx: AgainAssignContext) => Result;
|
147
|
+
/**
|
148
|
+
* Visit a parse tree produced by `tccScriptParser.againAssignName`.
|
149
|
+
* @param ctx the parse tree
|
150
|
+
* @return the visitor result
|
151
|
+
*/
|
152
|
+
visitAgainAssignName?: (ctx: AgainAssignNameContext) => Result;
|
146
153
|
/**
|
147
154
|
* Visit a parse tree produced by `tccScriptParser.varModifier`.
|
148
155
|
* @param ctx the parse tree
|