@guihz/trading-vue-editor-tes 0.0.261 → 0.0.262
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/assets/{parserTccWorker-6aNcG5yW.js → parserTccWorker-B7F1lNQc.js} +30 -30
- package/lib/assets/{scriptsRunWorker-BIvpWXuG.js → scriptsRunWorker-C37-bpBw.js} +15 -15
- package/lib/components/editor/parseScript/buildInFuncNamespace/box.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/label.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/line.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/linefill.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/polyline.d.ts +2 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/table.d.ts +2 -0
- package/lib/trading-vue-editor.js +2 -2
- package/lib/trading-vue-editor.umd.cjs +1 -1
- package/package.json +1 -1
@@ -37,39 +37,39 @@ x0.version="2.30.1",G3(Re),x0.fn=W0,x0.min=kA,x0.max=wA,x0.now=PA,x0.utc=Xn,x0.u
|
|
37
37
|
/****/
|
38
38
|
`);let q="";const m=(n==null?void 0:n.ruleType)==="VarMultiple";z.length>1?q=`${z[0]}
|
39
39
|
let ${i} = ${m?`(${z[1]}) || []`:z[1]}
|
40
|
-
`:q=`let ${i} = ${m?`(${b}) || []`:b}`;const g={code:q,varNames:i.replace(/[\[\]]/g,"").split(", "),depends:this._getDepends(s)};return this._codesCol[this._blockCount].push(g),q}_getDepends(e){const n=[];for(const[r,i]of this._dependsObj[e])(i.scope||0)>this._blockCount||n.push(i);return delete this._dependsObj[e],n}_parserForToStatement(e,n=!1){let{numerical:r,block:i,name:s,type:b}=e;const[z,q,m]=r,g=this._isInLoop;
|
41
|
-
if (Date.now() - ${
|
40
|
+
`:q=`let ${i} = ${m?`(${b}) || []`:b}`;const g={code:q,varNames:i.replace(/[\[\]]/g,"").split(", "),depends:this._getDepends(s)};return this._codesCol[this._blockCount].push(g),q}_getDepends(e){const n=[];for(const[r,i]of this._dependsObj[e])(i.scope||0)>this._blockCount||n.push(i);return delete this._dependsObj[e],n}_parserForToStatement(e,n=!1){let{numerical:r,block:i,name:s,type:b}=e;const[z,q,m]=r,g=this._isInLoop;this._isInLoop=!0;const y=`$start${this._count+1}`;g||(this._count+=1);const E=`$$count${this._count}`,k=`$forTo${this._blockCount}`;n||(this._dependsObj[k]=new Map);const D=this._parserSingleExpression(z),h=this._parserSingleExpression(q),A=m?this._parserSingleExpression(m):"",d=this._parserBlockLine(i,n,!1,!0);We.includes(s)&&(s=`$${s}`);const v=`var ${y} = Date.now()`,L=`for (let ${s}=${D}; ${s}>=(${h}); ${s}-=(${A||"1"})){
|
41
|
+
if (Date.now() - ${y} > 500) {
|
42
42
|
throw new Error('${O0.loopRuntimeErr}')
|
43
43
|
}
|
44
|
-
${
|
45
|
-
${
|
46
|
-
}`,
|
47
|
-
if (Date.now() - ${
|
44
|
+
${E}++
|
45
|
+
${d}
|
46
|
+
}`,S=`for (let ${s}=${D};${s}<=(${h}); ${s}+=(${A||"1"})){
|
47
|
+
if (Date.now() - ${y} > 500) {
|
48
48
|
throw new Error('${O0.loopRuntimeErr}')
|
49
49
|
}
|
50
|
-
${
|
51
|
-
${
|
52
|
-
}`;let
|
53
|
-
${
|
50
|
+
${E}++
|
51
|
+
${d}
|
52
|
+
}`;let I="";return(z==null?void 0:z.ruleType)==="Literal"&&(q==null?void 0:q.ruleType)==="Literal"?I=Number(z.value)>Number(q.value)?L:S:I=`if ((${D})>(${h})) {
|
53
|
+
${L}
|
54
54
|
} else {
|
55
|
-
${
|
56
|
-
}`,
|
57
|
-
var ${
|
58
|
-
${
|
59
|
-
if (Date.now() - ${
|
55
|
+
${S}
|
56
|
+
}`,I=`${v};
|
57
|
+
${g?"":`var ${E} = 0`}
|
58
|
+
${I}`,n||this._codesCol[this._blockCount].push({code:I,depends:this._getDepends(k)}),this._isInLoop=g,n?this._functionalProcess(I,b):I}_parserForInStatement(e,n=!1){const{names:r,block:i,array:s,type:b}=e,z=this._isInLoop;this._isInLoop=!0;const q=`$start${this._count+1}`;z||(this._count+=1);const m=`$$count${this._count}`,g=this._parserBlockLine(i,n,!1,!0);let y="",[E,k]=r;We.includes(E)&&(E=`$${E}`);const D=`var ${q} = Date.now()`;return r.length===1?y=`for (const ${E} of ${this._parserSingleExpression(s)}._value) {
|
59
|
+
if (Date.now() - ${q} > 500) {
|
60
60
|
throw new Error('${O0.loopRuntimeErr}')
|
61
61
|
}
|
62
|
-
${
|
63
|
-
${
|
64
|
-
}`:(We.includes(
|
65
|
-
if (Date.now() - ${
|
62
|
+
${m}++
|
63
|
+
${g}
|
64
|
+
}`:(We.includes(k)&&(k=`$${k}`),y=`for (const [${E},${k}] of (${this._parserSingleExpression(s)})._value.entries()) {
|
65
|
+
if (Date.now() - ${q} > 500) {
|
66
66
|
throw new Error('${O0.loopRuntimeErr}')
|
67
67
|
}
|
68
|
-
${
|
69
|
-
${
|
70
|
-
}`),this._isInLoop=z,
|
71
|
-
var ${
|
72
|
-
${
|
68
|
+
${m}++
|
69
|
+
${g}
|
70
|
+
}`),this._isInLoop=z,y=`${D};
|
71
|
+
${z?"":`var ${m} = 0`}
|
72
|
+
${y}`,n?this._functionalProcess(y,b):y}_parserAgainAssign(e){const{operator:n,name:r,value:i}=e,{varPos:s,declare:b}=r,z=`$againAssign${this._blockCount}`;this._dependsObj[z]=new Map;const q=this._parserName(r,!0);let m="",g=this._parserStmt(i,!0);const y=g.split(`
|
73
73
|
/****/
|
74
74
|
`);let E="";y.length>1&&(E=y[0],g=y[1]);let k=`${q} ${n===":="?`= ${g}`:`${n} ${g}`}`;const D=`${s==null?void 0:s.column}_${s==null?void 0:s.lineNumber}`;if(b){const A=this._isInFunc?`$posStr + "_${D}"`:`"${D}"`;m=`;
|
75
75
|
${this._prefixNameVar}.setVarValue("${q}", ${A}, ${q}, "${b}")`}n==="-="?k=`${q} = ${this._prefixNameVar}.sub(${q}, ${g})`:n==="+="?k=`${q} = ${this._prefixNameVar}.add(${q}, ${g})`:n===":="&&(E=`${E};
|
@@ -81,15 +81,15 @@ ${this._prefixNameVar}.setVarValue("${q}", ${A}, ${q}, "${b}")`}n==="-="?k=`${q}
|
|
81
81
|
{ ${this._parserBlock(e.block,n)} }
|
82
82
|
break;`}_parserCase(e,n=!1){const{condition:r,block:i}=e;return`case ${this._parserSingleExpression(r)}:
|
83
83
|
{ ${this._parserBlock(i,n)} }
|
84
|
-
break;`}_parserWhileStatement(e,n=!1){const{condition:r,block:i,type:s}=e;let b=`$while${this._blockCount}`;n||(this._dependsObj[b]=new Map);const z=this._isInLoop
|
85
|
-
if (Date.now() - ${
|
84
|
+
break;`}_parserWhileStatement(e,n=!1){const{condition:r,block:i,type:s}=e;let b=`$while${this._blockCount}`;n||(this._dependsObj[b]=new Map);const z=this._isInLoop;this._isInLoop=!0;const q=`$start${this._count+1}`;z||(this._count+=1);const m=`var ${q} = Date.now()`,g=`$$count${this._count}`;let y=`while (${this._parserSingleExpression(r)}) {
|
85
|
+
if (Date.now() - ${q} > 500) {
|
86
86
|
throw new Error('${O0.loopRuntimeErr}')
|
87
87
|
}
|
88
|
-
${
|
88
|
+
${g}++
|
89
89
|
${this._parserBlockLine(i,n,!1,!0)}
|
90
|
-
}`;return
|
91
|
-
var ${
|
92
|
-
${
|
90
|
+
}`;return y=`${m};
|
91
|
+
${z?"":`var ${g} = 0`}
|
92
|
+
${y}`,n||this._codesCol[this._blockCount].push({code:y,depends:this._getDepends(b)}),this._isInLoop=z,n?this._functionalProcess(y,s):y}_parserIfStatement(e,n=!1){const{condition:r,block:i,type:s}=e;let b="",z=`$if${this._blockCount}`;n||(this._dependsObj[z]=new Map);for(const[q,m]of i.entries()){const g=this._parserBlockLine(m,n),y=r[q]&&this._parserSingleExpression(r[q]);q===0?b=`if (${y}) {
|
93
93
|
${g}
|
94
94
|
}`:y?b+=`else if (${y}) {
|
95
95
|
${g}
|