nadesiko3 3.7.13 → 3.7.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/batch/command.txt +473 -473
  2. package/batch/jsplugin2text.nako3 +2 -0
  3. package/core/package.json +1 -1
  4. package/core/src/nako3.mjs +0 -4
  5. package/core/src/nako3.mts +55 -55
  6. package/core/src/nako_ast.mjs +0 -1
  7. package/core/src/nako_ast.mts +1 -1
  8. package/core/src/nako_colors.mjs +0 -1
  9. package/core/src/nako_colors.mts +1 -1
  10. package/core/src/nako_core_version.mjs +2 -2
  11. package/core/src/nako_core_version.mts +2 -2
  12. package/core/src/nako_csv.mjs +0 -1
  13. package/core/src/nako_csv.mts +9 -9
  14. package/core/src/nako_errors.mts +8 -8
  15. package/core/src/nako_from_dncl.mts +5 -5
  16. package/core/src/nako_from_dncl2.mjs +0 -1
  17. package/core/src/nako_from_dncl2.mts +5 -5
  18. package/core/src/nako_gen.mjs +13 -15
  19. package/core/src/nako_gen.mts +224 -220
  20. package/core/src/nako_global.mts +11 -11
  21. package/core/src/nako_indent.mts +92 -92
  22. package/core/src/nako_indent_chars.mts +1 -1
  23. package/core/src/nako_indent_inline.mjs +11 -11
  24. package/core/src/nako_indent_inline.mts +20 -20
  25. package/core/src/nako_lex_rules.mjs +0 -1
  26. package/core/src/nako_lex_rules.mts +8 -8
  27. package/core/src/nako_lexer.mjs +0 -1
  28. package/core/src/nako_lexer.mts +23 -23
  29. package/core/src/nako_logger.mjs +1 -1
  30. package/core/src/nako_logger.mts +38 -38
  31. package/core/src/nako_parser3.mjs +4 -5
  32. package/core/src/nako_parser3.mts +79 -79
  33. package/core/src/nako_parser_base.mjs +1 -1
  34. package/core/src/nako_parser_base.mts +68 -68
  35. package/core/src/nako_parser_const.mjs +0 -1
  36. package/core/src/nako_parser_const.mts +1 -1
  37. package/core/src/nako_prepare.mts +12 -12
  38. package/core/src/nako_source_mapping.mts +9 -9
  39. package/core/src/nako_token.mjs +0 -1
  40. package/core/src/nako_token.mts +2 -2
  41. package/core/src/nako_tools.mjs +0 -1
  42. package/core/src/nako_tools.mts +4 -4
  43. package/core/src/nako_types.mjs +0 -1
  44. package/core/src/nako_types.mts +3 -3
  45. package/core/src/plugin_api.mjs +0 -1
  46. package/core/src/plugin_api.mts +1 -1
  47. package/core/src/plugin_csv.mjs +0 -1
  48. package/core/src/plugin_csv.mts +7 -7
  49. package/core/src/plugin_math.mjs +0 -1
  50. package/core/src/plugin_math.mts +39 -40
  51. package/core/src/plugin_promise.mjs +1 -1
  52. package/core/src/plugin_promise.mts +9 -9
  53. package/core/src/plugin_system.mjs +1 -10
  54. package/core/src/plugin_system.mts +319 -321
  55. package/core/src/plugin_test.mjs +0 -2
  56. package/core/src/plugin_test.mts +6 -6
  57. package/core/src/plugin_toml.mjs +1 -1
  58. package/core/src/plugin_toml.mts +4 -4
  59. package/core/test/flow_test.mjs +22 -0
  60. package/package.json +31 -34
  61. package/release/_hash.txt +24 -24
  62. package/release/_script-tags.txt +16 -16
  63. package/release/command_cnako3.json +1 -1
  64. package/release/edit_main.js +33 -21
  65. package/release/edit_main.js.map +4 -4
  66. package/release/editor.js +33 -21
  67. package/release/plugin_keigo.js.map +2 -2
  68. package/release/plugin_turtle.js.map +2 -2
  69. package/release/plugin_weykturtle3d.js.map +2 -2
  70. package/release/version.js +29 -17
  71. package/release/version_main.js +29 -17
  72. package/release/version_main.js.map +4 -4
  73. package/release/wnako3.js +51 -44
  74. package/release/wnako3.js.map +3 -3
  75. package/release/wnako3webworker.js +45 -38
  76. package/release/wnako3webworker.js.map +2 -2
  77. package/src/cnako3.mts +1 -1
  78. package/src/cnako3mod.mjs +4 -7
  79. package/src/cnako3mod.mts +24 -24
  80. package/src/commander_ja.mts +8 -8
  81. package/src/deno_wrapper.mjs +0 -1
  82. package/src/deno_wrapper.mts +5 -5
  83. package/src/nako_version.mjs +2 -2
  84. package/src/nako_version.mts +2 -2
  85. package/src/plugin_browser.mjs +21 -29
  86. package/src/plugin_browser.mts +30 -35
  87. package/src/plugin_browser_ajax.mts +27 -27
  88. package/src/plugin_browser_audio.mjs +0 -1
  89. package/src/plugin_browser_audio.mts +11 -11
  90. package/src/plugin_browser_camera.mts +8 -8
  91. package/src/plugin_browser_canvas.mjs +0 -2
  92. package/src/plugin_browser_canvas.mts +34 -34
  93. package/src/plugin_browser_chart.mjs +0 -1
  94. package/src/plugin_browser_chart.mts +13 -13
  95. package/src/plugin_browser_color.mts +2 -2
  96. package/src/plugin_browser_crypto.mts +5 -5
  97. package/src/plugin_browser_dialog.mts +4 -4
  98. package/src/plugin_browser_dom_basic.mts +42 -42
  99. package/src/plugin_browser_dom_event.mjs +0 -1
  100. package/src/plugin_browser_dom_event.mts +27 -28
  101. package/src/plugin_browser_dom_parts.mjs +0 -2
  102. package/src/plugin_browser_dom_parts.mts +31 -31
  103. package/src/plugin_browser_geolocation.mts +3 -3
  104. package/src/plugin_browser_hotkey.mts +3 -3
  105. package/src/plugin_browser_html.mts +4 -4
  106. package/src/plugin_browser_in_worker.mts +1 -1
  107. package/src/plugin_browser_location.mts +2 -2
  108. package/src/plugin_browser_speech.mts +7 -7
  109. package/src/plugin_browser_storage.mts +11 -11
  110. package/src/plugin_browser_system.mts +2 -2
  111. package/src/plugin_browser_websocket.mts +6 -6
  112. package/src/plugin_httpserver.mts +17 -17
  113. package/src/plugin_keigo.mts +5 -5
  114. package/src/plugin_node.mjs +7 -48
  115. package/src/plugin_node.mts +114 -145
  116. package/src/plugin_turtle.mts +143 -143
  117. package/src/plugin_weykturtle3d.mjs +0 -3
  118. package/src/plugin_weykturtle3d.mts +135 -135
  119. package/src/plugin_weykturtle3d_three.mjs +0 -1
  120. package/src/plugin_weykturtle3d_three.mts +1 -1
  121. package/src/plugin_weykturtle3d_threeutil.mts +3 -3
  122. package/src/wnako3.mjs +0 -1
  123. package/src/wnako3.mts +1 -1
  124. package/src/wnako3_editor.mjs +0 -2
  125. package/src/wnako3_editor.mts +132 -132
  126. package/src/wnako3mod.mjs +0 -5
  127. package/src/wnako3mod.mts +19 -19
@@ -1,4 +1,4 @@
1
- /* eslint-disable quote-props */
1
+
2
2
  const errMsgCanvasInit = '描画を行うためには、HTML内にcanvasを配置し、idを振って『描画開始』命令に指定します。'
3
3
 
4
4
  export default {
@@ -7,7 +7,7 @@ export default {
7
7
  type: 'func',
8
8
  josi: [['の', 'へ', 'で']],
9
9
  pure: true,
10
- fn: function (cv: any, sys: any) {
10
+ fn: function(cv: any, sys: any) {
11
11
  if (typeof cv === 'string') { cv = document.querySelector(cv) || document.getElementById(cv) }
12
12
  if (!cv) { throw new Error('『描画開始』でCanvasを取得できませんでした。') }
13
13
  sys.__addPropMethod(cv)
@@ -26,7 +26,7 @@ export default {
26
26
  type: 'func',
27
27
  josi: [],
28
28
  pure: true,
29
- fn: function (sys: any) {
29
+ fn: function(sys: any) {
30
30
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
31
31
  sys.__ctx.save()
32
32
  },
@@ -36,7 +36,7 @@ export default {
36
36
  type: 'func',
37
37
  josi: [],
38
38
  pure: true,
39
- fn: function (sys: any) {
39
+ fn: function(sys: any) {
40
40
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
41
41
  sys.__ctx.restore()
42
42
  },
@@ -46,7 +46,7 @@ export default {
46
46
  type: 'func',
47
47
  josi: [['に', 'へ']],
48
48
  pure: true,
49
- fn: function (v: any, sys: any) {
49
+ fn: function(v: any, sys: any) {
50
50
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
51
51
  sys.__strokeStyle = v
52
52
  if (v !== '') {
@@ -59,7 +59,7 @@ export default {
59
59
  type: 'func',
60
60
  josi: [['に', 'へ']],
61
61
  pure: true,
62
- fn: function (v: any, sys: any) {
62
+ fn: function(v: any, sys: any) {
63
63
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
64
64
  sys.__fillStyle = v
65
65
  if (v !== '') {
@@ -72,7 +72,7 @@ export default {
72
72
  type: 'func',
73
73
  josi: [['から'], ['へ', 'まで']],
74
74
  pure: true,
75
- fn: function (a: any, b: any, sys: any) {
75
+ fn: function(a: any, b: any, sys: any) {
76
76
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
77
77
  sys.__ctx.beginPath()
78
78
  sys.__ctx.moveTo(a[0], a[1])
@@ -85,7 +85,7 @@ export default {
85
85
  type: 'func',
86
86
  josi: [['に', 'へ']],
87
87
  pure: true,
88
- fn: function (v: any, sys: any) {
88
+ fn: function(v: any, sys: any) {
89
89
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
90
90
  sys.__ctx.lineWidth = v
91
91
  },
@@ -95,7 +95,7 @@ export default {
95
95
  type: 'func',
96
96
  josi: [['の', 'へ', 'に']],
97
97
  pure: true,
98
- fn: function (b: any, sys: any) {
98
+ fn: function(b: any, sys: any) {
99
99
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
100
100
  sys.__ctx.beginPath()
101
101
  sys.__ctx.rect(b[0], b[1], b[2], b[3])
@@ -108,7 +108,7 @@ export default {
108
108
  type: 'func',
109
109
  josi: [],
110
110
  pure: true,
111
- fn: function (sys: any) {
111
+ fn: function(sys: any) {
112
112
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
113
113
  sys.__ctx.clearRect(0, 0,
114
114
  sys.__canvas.width, sys.__canvas.height)
@@ -119,7 +119,7 @@ export default {
119
119
  type: 'func',
120
120
  josi: [['の', 'へ', 'に']],
121
121
  pure: true,
122
- fn: function (b: any, sys: any) {
122
+ fn: function(b: any, sys: any) {
123
123
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
124
124
  if (!(b instanceof Array)) { b = [] }
125
125
  if (b.length === 0) {
@@ -136,7 +136,7 @@ export default {
136
136
  type: 'func',
137
137
  josi: [],
138
138
  pure: true,
139
- fn: function (sys: any) {
139
+ fn: function(sys: any) {
140
140
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
141
141
  sys.__ctx.clip()
142
142
  },
@@ -146,7 +146,7 @@ export default {
146
146
  type: 'func',
147
147
  josi: [['へ', 'に'], ['の']],
148
148
  pure: true,
149
- fn: function (xy: any, r: any, sys: any) {
149
+ fn: function(xy: any, r: any, sys: any) {
150
150
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
151
151
  sys.__ctx.beginPath()
152
152
  sys.__ctx.arc(xy[0], xy[1], r, 0, 2 * Math.PI, false)
@@ -159,7 +159,7 @@ export default {
159
159
  type: 'func',
160
160
  josi: [['へ', 'に', 'の']],
161
161
  pure: true,
162
- fn: function (args: any, sys: any) {
162
+ fn: function(args: any, sys: any) {
163
163
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
164
164
  if (!args) { throw new Error('楕円描画の引数配列が無効です') }
165
165
  if (args.length < 4) { throw new Error('楕円描画の引数配列が不足しています') }
@@ -180,7 +180,7 @@ export default {
180
180
  type: 'func',
181
181
  josi: [['で', 'の', 'を']],
182
182
  pure: true,
183
- fn: function (a: any, sys: any) {
183
+ fn: function(a: any, sys: any) {
184
184
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
185
185
  sys.__ctx.beginPath()
186
186
  const p = a[0]
@@ -199,7 +199,7 @@ export default {
199
199
  type: 'func',
200
200
  josi: [['の', 'を']],
201
201
  pure: true,
202
- fn: function (url: any, sys: any) {
202
+ fn: function(url: any, sys: any) {
203
203
  const img = new window.Image()
204
204
  img.src = url
205
205
  img.crossOrigin = 'Anonymous'
@@ -211,7 +211,7 @@ export default {
211
211
  josi: [['の', 'を']],
212
212
  pure: true,
213
213
  asyncFn: true,
214
- fn: function (url: any) {
214
+ fn: function(url: any) {
215
215
  return new Promise((resolve, reject) => {
216
216
  const img = new window.Image()
217
217
  img.src = url
@@ -227,7 +227,7 @@ export default {
227
227
  type: 'func',
228
228
  josi: [['の', 'を']],
229
229
  pure: true,
230
- fn: function (url: any, sys: any) {
230
+ fn: function(url: any, sys: any) {
231
231
  if (sys.resolve === undefined) { throw new Error('『画像逐次読』は『逐次実行』構文で使ってください。') }
232
232
  sys.resolveCount++
233
233
  const img = new window.Image()
@@ -248,7 +248,7 @@ export default {
248
248
  type: 'func',
249
249
  josi: [['で'], ['の', 'を']],
250
250
  pure: true,
251
- fn: function (f: any, url: any, sys: any) {
251
+ fn: function(f: any, url: any, sys: any) {
252
252
  // 関数オブジェクトを得る
253
253
  const func = sys.__findVar(f, null) // 文字列指定なら関数に変換
254
254
  // 画像を読む
@@ -270,7 +270,7 @@ export default {
270
270
  type: 'func',
271
271
  josi: [['の', 'を'], ['へ', 'に']],
272
272
  pure: true,
273
- fn: function (img: any, xy: any, sys: any) {
273
+ fn: function(img: any, xy: any, sys: any) {
274
274
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
275
275
  const drawFunc = (im: any, ctx: any) => {
276
276
  if (xy.length === 2) {
@@ -302,13 +302,13 @@ export default {
302
302
  type: 'func',
303
303
  josi: [['の'], ['を', 'から'], ['へ', 'に']],
304
304
  pure: true,
305
- fn: function (img: any, sxy: any, dxy: any, sys: any) {
305
+ fn: function(img: any, sxy: any, dxy: any, sys: any) {
306
306
  const errArgLen =
307
307
  '『画像部分描画』に使える引数は画像と、描画する座標へ2つか、' +
308
308
  '描画する座標とその位置の4つか、使用する座標と使用する位置と描画する座標と大きさの8つだけです。'
309
309
  if (img && sxy) {
310
310
  if (!Array.isArray(sxy) && Array.isArray(img)) { // 逆になっていれば入れ替える
311
- // eslint-disable-next-line no-proto
311
+
312
312
  if (typeof sxy === 'string' || String(sxy.__proto__) === '[object HTMLImageElement]') {
313
313
  const sw = img
314
314
  img = sxy
@@ -354,7 +354,7 @@ export default {
354
354
  type: 'func',
355
355
  josi: [['を', 'の', 'で', 'に']],
356
356
  pure: true,
357
- fn: function (n: any, sys: any) {
357
+ fn: function(n: any, sys: any) {
358
358
  // 数値だけならフォントサイズのみの指定
359
359
  if (typeof n === 'number') { n = n + 'px sans-serif' }
360
360
  // ピクセル数のみの指定なら適当にフォントを足す
@@ -369,7 +369,7 @@ export default {
369
369
  type: 'func',
370
370
  josi: [['へ', 'に'], ['の', 'を']],
371
371
  pure: true,
372
- fn: function (xy: any, s: any, sys: any) {
372
+ fn: function(xy: any, s: any, sys: any) {
373
373
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
374
374
  sys.__ctx.fillText(s, xy[0], xy[1])
375
375
  },
@@ -379,7 +379,7 @@ export default {
379
379
  type: 'func',
380
380
  josi: [['の']],
381
381
  pure: true,
382
- fn: function (s: any, sys: any) {
382
+ fn: function(s: any, sys: any) {
383
383
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
384
384
  return sys.__ctx.measureText(s)
385
385
  },
@@ -389,7 +389,7 @@ export default {
389
389
  type: 'func',
390
390
  josi: [['へ', 'に']],
391
391
  pure: true,
392
- fn: function (xy: any, sys: any) {
392
+ fn: function(xy: any, sys: any) {
393
393
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
394
394
  sys.__ctx.translate(xy[0], xy[1])
395
395
  },
@@ -399,7 +399,7 @@ export default {
399
399
  type: 'func',
400
400
  josi: [['だけ', 'に', 'へ']],
401
401
  pure: true,
402
- fn: function (a: any, sys: any) {
402
+ fn: function(a: any, sys: any) {
403
403
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
404
404
  sys.__ctx.rotate(a * Math.PI / 180)
405
405
  },
@@ -409,7 +409,7 @@ export default {
409
409
  type: 'func',
410
410
  josi: [['だけ', 'に', 'へ']],
411
411
  pure: true,
412
- fn: function (xy: any, sys: any) {
412
+ fn: function(xy: any, sys: any) {
413
413
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
414
414
  sys.__ctx.scale(xy[0], xy[1])
415
415
  },
@@ -419,7 +419,7 @@ export default {
419
419
  type: 'func',
420
420
  josi: [['だけ', 'に', 'へ']],
421
421
  pure: true,
422
- fn: function (a: any, sys: any) {
422
+ fn: function(a: any, sys: any) {
423
423
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
424
424
  sys.__ctx.setTransform(a[0], a[1], a[2], a[3], a[4], a[5], a[6])
425
425
  },
@@ -429,7 +429,7 @@ export default {
429
429
  type: 'func',
430
430
  josi: [['だけ', 'に', 'へ']],
431
431
  pure: true,
432
- fn: function (a: any, sys: any) {
432
+ fn: function(a: any, sys: any) {
433
433
  if (!sys.__ctx) { throw new Error(errMsgCanvasInit) }
434
434
  sys.__ctx.transform(a[0], a[1], a[2], a[3], a[4], a[5], a[6])
435
435
  },
@@ -439,7 +439,7 @@ export default {
439
439
  type: 'func',
440
440
  josi: [],
441
441
  pure: true,
442
- fn: function (sys: any) {
442
+ fn: function(sys: any) {
443
443
  const cv = sys.__getSysVar('描画中キャンバス')
444
444
  const url = cv.toDataURL('image/png')
445
445
  return url
@@ -450,7 +450,7 @@ export default {
450
450
  josi: [],
451
451
  pure: true,
452
452
  asyncFn: true,
453
- fn: function (sys: any) {
453
+ fn: function(sys: any) {
454
454
  return new Promise((resolve, reject) => {
455
455
  const cv = sys.__getSysVar('描画中キャンバス')
456
456
  cv.toBlob((result: any) => { resolve(result) }, 'image/png')
@@ -461,7 +461,7 @@ export default {
461
461
  type: 'func',
462
462
  josi: [['へ', 'に']],
463
463
  pure: true,
464
- fn: function (dom: any, sys: any) {
464
+ fn: function(dom: any, sys: any) {
465
465
  if (typeof dom === 'string') { dom = document.querySelector(dom) }
466
466
  if (!dom) { throw new Error('『描画ダウンロードリンク作成』でDOMが見当たりません。') }
467
467
  const cv = sys.__getSysVar('描画中キャンバス')
@@ -475,7 +475,7 @@ export default {
475
475
  type: 'func',
476
476
  josi: [],
477
477
  pure: true,
478
- fn: function (sys: any) {
478
+ fn: function(sys: any) {
479
479
  const cv = sys.__getSysVar('描画中キャンバス')
480
480
  if (!cv) { throw new Error('『描画ダウンロード』で描画中キャンバスが設定されていません。') }
481
481
  const a = document.createElement('a')
@@ -37,7 +37,6 @@ export default {
37
37
  if (sys.__chartjs) {
38
38
  sys.__chartjs.destroy();
39
39
  }
40
- // eslint-disable-next-line no-undef
41
40
  const chart = new Chart(sys.__canvas, data);
42
41
  sys.__chartjs = chart;
43
42
  return chart;
@@ -4,7 +4,7 @@ export default {
4
4
  type: 'func',
5
5
  josi: [['を', 'で', 'の']],
6
6
  asyncFn: true,
7
- fn: async function (data: any, sys: any) {
7
+ fn: async function(data: any, sys: any) {
8
8
  // Chart.jsが使えるかチェック
9
9
  const win: any = sys.__getSysVar('WINDOW')
10
10
  if (typeof win === 'undefined') {
@@ -31,7 +31,7 @@ export default {
31
31
  if (sys.__chartjs) {
32
32
  sys.__chartjs.destroy()
33
33
  }
34
- // eslint-disable-next-line no-undef
34
+
35
35
  const chart = new Chart(sys.__canvas, data)
36
36
  sys.__chartjs = chart
37
37
  return chart
@@ -42,7 +42,7 @@ export default {
42
42
  type: 'func',
43
43
  josi: [['を', 'で', 'の']],
44
44
  asyncFn: true,
45
- fn: async function (data: any, sys: any) {
45
+ fn: async function(data: any, sys: any) {
46
46
  data = sys.__exec('二次元グラフデータ変形', ['line', data, sys])
47
47
  const d = {
48
48
  type: 'line',
@@ -56,7 +56,7 @@ export default {
56
56
  type: 'func',
57
57
  josi: [['を', 'で', 'の']],
58
58
  asyncFn: true,
59
- fn: async function (data: any, sys: any) {
59
+ fn: async function(data: any, sys: any) {
60
60
  // グラフオプションの差分作成
61
61
  const gopt = Object.assign({},
62
62
  sys.__getSysVar('グラフオプション'),
@@ -75,7 +75,7 @@ export default {
75
75
  josi: [['を', 'で', 'の']],
76
76
  pure: true,
77
77
  asyncFn: true,
78
- fn: async function (data: any, sys: any) {
78
+ fn: async function(data: any, sys: any) {
79
79
  // グラフオプションの差分作成
80
80
  const gopt = Object.assign({},
81
81
  sys.__getSysVar('グラフオプション'),
@@ -93,7 +93,7 @@ export default {
93
93
  type: 'func',
94
94
  josi: [['を', 'で', 'の']],
95
95
  asyncFn: true,
96
- fn: async function (data: any, sys: any) {
96
+ fn: async function(data: any, sys: any) {
97
97
  // グラフオプションの差分作成
98
98
  const gopt = Object.assign({},
99
99
  sys.__getSysVar('グラフオプション'),
@@ -117,7 +117,7 @@ export default {
117
117
  type: 'func',
118
118
  josi: [['を', 'で', 'の']],
119
119
  asyncFn: true,
120
- fn: async function (data: any, sys: any) {
120
+ fn: async function(data: any, sys: any) {
121
121
  // グラフオプションの差分作成
122
122
  const gopt = Object.assign({},
123
123
  sys.__getSysVar('グラフオプション'),
@@ -141,7 +141,7 @@ export default {
141
141
  type: 'func',
142
142
  josi: [['を', 'で', 'の']],
143
143
  asyncFn: true,
144
- fn: async function (data: any, sys: any) {
144
+ fn: async function(data: any, sys: any) {
145
145
  // グラフオプションの差分作成
146
146
  const gopt = Object.assign({},
147
147
  sys.__getSysVar('グラフオプション'),
@@ -159,7 +159,7 @@ export default {
159
159
  type: 'func',
160
160
  josi: [['を', 'で', 'の']],
161
161
  asyncFn: true,
162
- fn: async function (data: any, sys: any) {
162
+ fn: async function(data: any, sys: any) {
163
163
  data = sys.__exec('二次元グラフデータ変形', ['pie', data, sys])
164
164
  const d = {
165
165
  type: 'pie',
@@ -173,7 +173,7 @@ export default {
173
173
  type: 'func',
174
174
  josi: [['を', 'で', 'の']],
175
175
  asyncFn: true,
176
- fn: async function (data: any, sys: any) {
176
+ fn: async function(data: any, sys: any) {
177
177
  data = sys.__exec('二次元グラフデータ変形', ['pie', data, sys])
178
178
  const d = {
179
179
  type: 'doughnut',
@@ -187,7 +187,7 @@ export default {
187
187
  type: 'func',
188
188
  josi: [['を', 'で', 'の']],
189
189
  asyncFn: true,
190
- fn: async function (data: any, sys: any) {
190
+ fn: async function(data: any, sys: any) {
191
191
  data = sys.__exec('二次元グラフデータ変形', ['pie', data, sys])
192
192
  const d = {
193
193
  type: 'polarArea',
@@ -201,7 +201,7 @@ export default {
201
201
  type: 'func',
202
202
  josi: [['を', 'で', 'の']],
203
203
  asyncFn: true,
204
- fn: async function (data: any, sys: any) {
204
+ fn: async function(data: any, sys: any) {
205
205
  data = sys.__exec('二次元グラフデータ変形', ['bar', data, sys])
206
206
  const d = {
207
207
  type: 'radar',
@@ -214,7 +214,7 @@ export default {
214
214
  '二次元グラフデータ変形': { // @ 二次元配列をXXグラフ描画の形式に整形する。種類TとDATAを指定。 // @にじげんぐらふでーたへんけい
215
215
  type: 'func',
216
216
  josi: [['の'], ['を']],
217
- fn: function (t: any, dataOrg: any, sys: any) {
217
+ fn: function(t: any, dataOrg: any, sys: any) {
218
218
  // データを破壊的に変更してしまうので最初にデータをコピー (#1416)
219
219
  const data = JSON.parse(JSON.stringify(dataOrg))
220
220
  const bgcolorList: string[] = [
@@ -22,7 +22,7 @@ export default {
22
22
  type: 'func',
23
23
  josi: [['と'], ['と'], ['で', 'の']],
24
24
  pure: true,
25
- fn: function (r: number, g: number, b: number) {
25
+ fn: function(r: number, g: number, b: number) {
26
26
  const z2 = (v) => {
27
27
  const v2 = '00' + v.toString(16)
28
28
  return v2.substr(v2.length - 2, 2)
@@ -35,7 +35,7 @@ export default {
35
35
  type: 'func',
36
36
  josi: [['の']],
37
37
  pure: true,
38
- fn: function (a: any) {
38
+ fn: function(a: any) {
39
39
  const z2 = (v) => {
40
40
  const v2 = '00' + v.toString(16)
41
41
  return v2.substr(v2.length - 2, 2)
@@ -4,12 +4,12 @@ export default {
4
4
  type: 'func',
5
5
  josi: [['へ'], ['を'], ['で']],
6
6
  pure: true,
7
- fn: function (func: any, s: string, alg: string, sys: any) {
7
+ fn: function(func: any, s: string, alg: string, sys: any) {
8
8
  func = sys.__findVar(func, null) // 文字列指定なら関数に変換(コールバック関数)
9
9
  // (ref) https://developer.mozilla.org/ja/docs/Web/API/SubtleCrypto/digest
10
10
  const msgUint8 = new TextEncoder().encode(s) // (utf-8 の) Uint8Array にエンコードする
11
11
  // メッセージをハッシュする
12
- crypto.subtle.digest(alg, msgUint8).then(function (hashBuffer: ArrayBuffer) {
12
+ crypto.subtle.digest(alg, msgUint8).then(function(hashBuffer: ArrayBuffer) {
13
13
  const hashArray = Array.from(new Uint8Array(hashBuffer)) // バッファーをバイト列に変換する
14
14
  const hashHex = hashArray
15
15
  .map((b) => b.toString(16).padStart(2, '0'))
@@ -25,7 +25,7 @@ export default {
25
25
  josi: [['を'], ['で']],
26
26
  pure: true,
27
27
  asyncFn: true,
28
- fn: async function (s: string, alg: string, sys: any) {
28
+ fn: async function(s: string, alg: string, sys: any) {
29
29
  const msgUint8 = new TextEncoder().encode(s) // (utf-8 の) Uint8Array にエンコードする
30
30
  const hashBuffer = await crypto.subtle.digest(alg, msgUint8)
31
31
  const hashArray = Array.from(new Uint8Array(hashBuffer)) // バッファーをバイト列に変換する
@@ -39,7 +39,7 @@ export default {
39
39
  type: 'func',
40
40
  josi: [],
41
41
  pure: true,
42
- fn: function (sys: any) {
42
+ fn: function(sys: any) {
43
43
  return window.crypto.randomUUID()
44
44
  }
45
45
  },
@@ -47,7 +47,7 @@ export default {
47
47
  type: 'func',
48
48
  josi: [['の']],
49
49
  pure: true,
50
- fn: function (cnt: number, sys: any) {
50
+ fn: function(cnt: number, sys: any) {
51
51
  const array = new Uint8Array(cnt)
52
52
  window.crypto.getRandomValues(array)
53
53
  return array
@@ -5,7 +5,7 @@ export default {
5
5
  type: 'func',
6
6
  josi: [['と', 'を']],
7
7
  pure: true,
8
- fn: function (s: any) {
8
+ fn: function(s: any) {
9
9
  window.alert(s)
10
10
  },
11
11
  return_none: true
@@ -15,7 +15,7 @@ export default {
15
15
  type: 'func',
16
16
  josi: [['と', 'を']],
17
17
  pure: true,
18
- fn: function (s: any, sys: any) {
18
+ fn: function(s: any, sys: any) {
19
19
  const r = window.prompt(s)
20
20
  if (r === null) {
21
21
  return sys.__getSysVar('ダイアログキャンセル値')
@@ -35,7 +35,7 @@ export default {
35
35
  type: 'func',
36
36
  josi: [['と', 'を']],
37
37
  pure: true,
38
- fn: function (s: any, sys: any) {
38
+ fn: function(s: any, sys: any) {
39
39
  const r = window.prompt(s)
40
40
  if (r === null) {
41
41
  return sys.__getSysVar('ダイアログキャンセル値')
@@ -47,7 +47,7 @@ export default {
47
47
  type: 'func',
48
48
  josi: [['で', 'の', 'と', 'を']],
49
49
  pure: true,
50
- fn: function (s: any) {
50
+ fn: function(s: any) {
51
51
  return window.confirm(s)
52
52
  }
53
53
  }