@famibee/skynovel 1.48.13 → 1.63.12

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 (289) hide show
  1. package/README.md +2 -1
  2. package/dist/CallStack.js +25 -0
  3. package/dist/CallStack.js.map +1 -0
  4. package/dist/EventMng.js +1588 -0
  5. package/dist/EventMng.js.map +1 -0
  6. package/dist/LayerMng.js +2924 -0
  7. package/dist/LayerMng.js.map +1 -0
  8. package/dist/PropParser.js +833 -0
  9. package/dist/PropParser.js.map +1 -0
  10. package/dist/Reading.js +784 -0
  11. package/dist/Reading.js.map +1 -0
  12. package/dist/ScriptIterator.js +1125 -0
  13. package/dist/ScriptIterator.js.map +1 -0
  14. package/dist/SndBuf.js +1519 -0
  15. package/dist/SndBuf.js.map +1 -0
  16. package/dist/SoundMng.js +136 -0
  17. package/dist/SoundMng.js.map +1 -0
  18. package/dist/Variable.js +479 -0
  19. package/dist/Variable.js.map +1 -0
  20. package/dist/app.d.ts +5 -1
  21. package/dist/app.d.ts.map +1 -1
  22. package/dist/appMain.d.ts +6 -6
  23. package/dist/appMain.d.ts.map +1 -1
  24. package/dist/appMain_cmn.d.ts +30 -0
  25. package/dist/appMain_cmn.d.ts.map +1 -0
  26. package/dist/build.d.ts +2 -0
  27. package/dist/build.d.ts.map +1 -0
  28. package/dist/gamepad.js +511 -0
  29. package/dist/gamepad.js.map +1 -0
  30. package/dist/index.d.ts +32 -38
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/preload.d.ts +34 -31
  33. package/dist/preload.d.ts.map +1 -1
  34. package/dist/sn/AnalyzeTagArg.d.ts +10 -6
  35. package/dist/sn/AnalyzeTagArg.d.ts.map +1 -1
  36. package/dist/sn/Areas.d.ts +7 -5
  37. package/dist/sn/Areas.d.ts.map +1 -1
  38. package/dist/sn/Button.d.ts +2 -2
  39. package/dist/sn/Button.d.ts.map +1 -1
  40. package/dist/sn/CallStack.d.ts +12 -5
  41. package/dist/sn/CallStack.d.ts.map +1 -1
  42. package/dist/sn/CmnInterface.d.ts +178 -117
  43. package/dist/sn/CmnInterface.d.ts.map +1 -1
  44. package/dist/sn/CmnLib.d.ts +20 -19
  45. package/dist/sn/CmnLib.d.ts.map +1 -1
  46. package/dist/sn/CmnTween.d.ts +6 -8
  47. package/dist/sn/CmnTween.d.ts.map +1 -1
  48. package/dist/sn/Config.d.ts +6 -4
  49. package/dist/sn/Config.d.ts.map +1 -1
  50. package/dist/sn/ConfigBase.d.ts +39 -24
  51. package/dist/sn/ConfigBase.d.ts.map +1 -1
  52. package/dist/sn/DebugMng.d.ts +3 -2
  53. package/dist/sn/DebugMng.d.ts.map +1 -1
  54. package/dist/sn/DesignCast.d.ts +5 -6
  55. package/dist/sn/DesignCast.d.ts.map +1 -1
  56. package/dist/sn/EventListenerCtn.d.ts +3 -3
  57. package/dist/sn/EventListenerCtn.d.ts.map +1 -1
  58. package/dist/sn/EventMng.d.ts +5 -11
  59. package/dist/sn/EventMng.d.ts.map +1 -1
  60. package/dist/sn/FocusMng.d.ts.map +1 -1
  61. package/dist/sn/FrameMng.d.ts +3 -4
  62. package/dist/sn/FrameMng.d.ts.map +1 -1
  63. package/dist/sn/Grammar.d.ts +133 -16
  64. package/dist/sn/Grammar.d.ts.map +1 -1
  65. package/dist/sn/GrpLayer.d.ts +8 -4
  66. package/dist/sn/GrpLayer.d.ts.map +1 -1
  67. package/dist/sn/Hyphenation.d.ts +42 -0
  68. package/dist/sn/Hyphenation.d.ts.map +1 -0
  69. package/dist/sn/Layer.d.ts +24 -4
  70. package/dist/sn/Layer.d.ts.map +1 -1
  71. package/dist/sn/LayerMng.d.ts +17 -24
  72. package/dist/sn/LayerMng.d.ts.map +1 -1
  73. package/dist/sn/Log.d.ts +18 -0
  74. package/dist/sn/Log.d.ts.map +1 -0
  75. package/dist/sn/Main.d.ts +4 -6
  76. package/dist/sn/Main.d.ts.map +1 -1
  77. package/dist/sn/Pages.d.ts +1 -1
  78. package/dist/sn/Pages.d.ts.map +1 -1
  79. package/dist/sn/PropParser.d.ts +2 -2
  80. package/dist/sn/PropParser.d.ts.map +1 -1
  81. package/dist/sn/Reading.d.ts +86 -0
  82. package/dist/sn/Reading.d.ts.map +1 -0
  83. package/dist/sn/RubySpliter.d.ts +1 -3
  84. package/dist/sn/RubySpliter.d.ts.map +1 -1
  85. package/dist/sn/ScriptIterator.d.ts +20 -10
  86. package/dist/sn/ScriptIterator.d.ts.map +1 -1
  87. package/dist/sn/SndBuf.d.ts +15 -5
  88. package/dist/sn/SndBuf.d.ts.map +1 -1
  89. package/dist/sn/SoundMng.d.ts +3 -2
  90. package/dist/sn/SoundMng.d.ts.map +1 -1
  91. package/dist/sn/SpritesMng.d.ts +4 -4
  92. package/dist/sn/SpritesMng.d.ts.map +1 -1
  93. package/dist/sn/SysApp.d.ts +12 -16
  94. package/dist/sn/SysApp.d.ts.map +1 -1
  95. package/dist/sn/SysBase.d.ts +24 -27
  96. package/dist/sn/SysBase.d.ts.map +1 -1
  97. package/dist/sn/SysNode.d.ts +9 -9
  98. package/dist/sn/SysNode.d.ts.map +1 -1
  99. package/dist/sn/SysWeb.d.ts +10 -14
  100. package/dist/sn/SysWeb.d.ts.map +1 -1
  101. package/dist/sn/TxtLayer.d.ts +79 -7
  102. package/dist/sn/TxtLayer.d.ts.map +1 -1
  103. package/dist/sn/TxtStage.d.ts +45 -30
  104. package/dist/sn/TxtStage.d.ts.map +1 -1
  105. package/dist/sn/Variable.d.ts +33 -13
  106. package/dist/sn/Variable.d.ts.map +1 -1
  107. package/dist/sn/htm2tx.d.ts +3 -0
  108. package/dist/sn/htm2tx.d.ts.map +1 -0
  109. package/dist/test/AnalyzeTagArg.test.d.ts +2 -0
  110. package/dist/test/AnalyzeTagArg.test.d.ts.map +1 -0
  111. package/dist/test/AreasTest.test.d.ts +2 -0
  112. package/dist/test/AreasTest.test.d.ts.map +1 -0
  113. package/dist/test/CmnLib.test.d.ts +2 -0
  114. package/dist/test/CmnLib.test.d.ts.map +1 -0
  115. package/dist/test/Config.test.d.ts +2 -0
  116. package/dist/test/Config.test.d.ts.map +1 -0
  117. package/dist/test/Grammar.test.d.ts +2 -0
  118. package/dist/test/Grammar.test.d.ts.map +1 -0
  119. package/dist/test/HyphTest.test.d.ts +2 -0
  120. package/dist/test/HyphTest.test.d.ts.map +1 -0
  121. package/dist/test/Log.test.d.ts +2 -0
  122. package/dist/test/Log.test.d.ts.map +1 -0
  123. package/dist/test/PropParser.test.d.ts +2 -0
  124. package/dist/test/PropParser.test.d.ts.map +1 -0
  125. package/dist/test/RubySpliter.test.d.ts +2 -0
  126. package/dist/test/RubySpliter.test.d.ts.map +1 -0
  127. package/dist/test/SysTest.d.ts +5 -0
  128. package/dist/test/SysTest.d.ts.map +1 -0
  129. package/dist/test/ValTest.d.ts +31 -0
  130. package/dist/test/ValTest.d.ts.map +1 -0
  131. package/dist/test/Variable.test.d.ts +2 -0
  132. package/dist/test/Variable.test.d.ts.map +1 -0
  133. package/dist/web.d.ts +5 -1
  134. package/dist/web.d.ts.map +1 -1
  135. package/dist/web.js +6 -30102
  136. package/dist/web.js.map +1 -1
  137. package/dist/web2.js +23020 -0
  138. package/dist/web2.js.map +1 -0
  139. package/dist_app/CallStack.js +25 -0
  140. package/dist_app/CallStack.js.map +1 -0
  141. package/dist_app/EventMng.js +1588 -0
  142. package/dist_app/EventMng.js.map +1 -0
  143. package/dist_app/LayerMng.js +2924 -0
  144. package/dist_app/LayerMng.js.map +1 -0
  145. package/dist_app/PropParser.js +833 -0
  146. package/dist_app/PropParser.js.map +1 -0
  147. package/dist_app/Reading.js +784 -0
  148. package/dist_app/Reading.js.map +1 -0
  149. package/dist_app/ScriptIterator.js +1125 -0
  150. package/dist_app/ScriptIterator.js.map +1 -0
  151. package/dist_app/SndBuf.js +1519 -0
  152. package/dist_app/SndBuf.js.map +1 -0
  153. package/dist_app/SoundMng.js +136 -0
  154. package/dist_app/SoundMng.js.map +1 -0
  155. package/dist_app/Variable.js +479 -0
  156. package/dist_app/Variable.js.map +1 -0
  157. package/dist_app/app.d.ts +9 -0
  158. package/dist_app/app.d.ts.map +1 -0
  159. package/dist_app/app.js +9 -0
  160. package/dist_app/app.js.map +1 -0
  161. package/dist_app/app2.js +19819 -0
  162. package/dist_app/app2.js.map +1 -0
  163. package/dist_app/appMain.d.ts +9 -0
  164. package/dist_app/appMain.d.ts.map +1 -0
  165. package/dist_app/appMain.js +23 -0
  166. package/dist_app/appMain.js.map +1 -0
  167. package/dist_app/appMain_cmn.d.ts +30 -0
  168. package/dist_app/appMain_cmn.d.ts.map +1 -0
  169. package/dist_app/build.d.ts +2 -0
  170. package/dist_app/build.d.ts.map +1 -0
  171. package/dist_app/gamepad.js +511 -0
  172. package/dist_app/gamepad.js.map +1 -0
  173. package/dist_app/index.d.ts +33 -0
  174. package/dist_app/index.d.ts.map +1 -0
  175. package/dist_app/preload.d.ts +47 -0
  176. package/dist_app/preload.d.ts.map +1 -0
  177. package/dist_app/preload.js +2 -0
  178. package/dist_app/preload.js.map +1 -0
  179. package/dist_app/sn/AnalyzeTagArg.d.ts +28 -0
  180. package/dist_app/sn/AnalyzeTagArg.d.ts.map +1 -0
  181. package/dist_app/sn/Areas.d.ts +15 -0
  182. package/dist_app/sn/Areas.d.ts.map +1 -0
  183. package/dist_app/sn/Button.d.ts +23 -0
  184. package/dist_app/sn/Button.d.ts.map +1 -0
  185. package/dist_app/sn/CallStack.d.ts +23 -0
  186. package/dist_app/sn/CallStack.d.ts.map +1 -0
  187. package/dist_app/sn/CmnInterface.d.ts +227 -0
  188. package/dist_app/sn/CmnInterface.d.ts.map +1 -0
  189. package/dist_app/sn/CmnLib.d.ts +46 -0
  190. package/dist_app/sn/CmnLib.d.ts.map +1 -0
  191. package/dist_app/sn/CmnTween.d.ts +35 -0
  192. package/dist_app/sn/CmnTween.d.ts.map +1 -0
  193. package/dist_app/sn/Config.d.ts +12 -0
  194. package/dist_app/sn/Config.d.ts.map +1 -0
  195. package/dist_app/sn/ConfigBase.d.ts +111 -0
  196. package/dist_app/sn/ConfigBase.d.ts.map +1 -0
  197. package/dist_app/sn/DebugMng.d.ts +14 -0
  198. package/dist_app/sn/DebugMng.d.ts.map +1 -0
  199. package/dist_app/sn/DesignCast.d.ts +53 -0
  200. package/dist_app/sn/DesignCast.d.ts.map +1 -0
  201. package/dist_app/sn/EventListenerCtn.d.ts +13 -0
  202. package/dist_app/sn/EventListenerCtn.d.ts.map +1 -0
  203. package/dist_app/sn/EventMng.d.ts +29 -0
  204. package/dist_app/sn/EventMng.d.ts.map +1 -0
  205. package/dist_app/sn/FocusMng.d.ts +13 -0
  206. package/dist_app/sn/FocusMng.d.ts.map +1 -0
  207. package/dist_app/sn/FrameMng.d.ts +20 -0
  208. package/dist_app/sn/FrameMng.d.ts.map +1 -0
  209. package/dist_app/sn/Grammar.d.ts +291 -0
  210. package/dist_app/sn/Grammar.d.ts.map +1 -0
  211. package/dist_app/sn/GrpLayer.d.ts +49 -0
  212. package/dist_app/sn/GrpLayer.d.ts.map +1 -0
  213. package/dist_app/sn/Hyphenation.d.ts +42 -0
  214. package/dist_app/sn/Hyphenation.d.ts.map +1 -0
  215. package/dist_app/sn/Layer.d.ts +86 -0
  216. package/dist_app/sn/Layer.d.ts.map +1 -0
  217. package/dist_app/sn/LayerMng.d.ts +46 -0
  218. package/dist_app/sn/LayerMng.d.ts.map +1 -0
  219. package/dist_app/sn/Log.d.ts +18 -0
  220. package/dist_app/sn/Log.d.ts.map +1 -0
  221. package/dist_app/sn/Main.d.ts +16 -0
  222. package/dist_app/sn/Main.d.ts.map +1 -0
  223. package/dist_app/sn/Pages.d.ts +26 -0
  224. package/dist_app/sn/Pages.d.ts.map +1 -0
  225. package/dist_app/sn/PropParser.d.ts +12 -0
  226. package/dist_app/sn/PropParser.d.ts.map +1 -0
  227. package/dist_app/sn/Reading.d.ts +86 -0
  228. package/dist_app/sn/Reading.d.ts.map +1 -0
  229. package/dist_app/sn/RubySpliter.d.ts +14 -0
  230. package/dist_app/sn/RubySpliter.d.ts.map +1 -0
  231. package/dist_app/sn/ScriptIterator.d.ts +58 -0
  232. package/dist_app/sn/ScriptIterator.d.ts.map +1 -0
  233. package/dist_app/sn/SndBuf.d.ts +30 -0
  234. package/dist_app/sn/SndBuf.d.ts.map +1 -0
  235. package/dist_app/sn/SoundMng.d.ts +16 -0
  236. package/dist_app/sn/SoundMng.d.ts.map +1 -0
  237. package/dist_app/sn/SpritesMng.d.ts +27 -0
  238. package/dist_app/sn/SpritesMng.d.ts.map +1 -0
  239. package/dist_app/sn/SysApp.d.ts +32 -0
  240. package/dist_app/sn/SysApp.d.ts.map +1 -0
  241. package/dist_app/sn/SysBase.d.ts +79 -0
  242. package/dist_app/sn/SysBase.d.ts.map +1 -0
  243. package/dist_app/sn/SysNode.d.ts +15 -0
  244. package/dist_app/sn/SysNode.d.ts.map +1 -0
  245. package/dist_app/sn/SysWeb.d.ts +26 -0
  246. package/dist_app/sn/SysWeb.d.ts.map +1 -0
  247. package/dist_app/sn/TxtLayer.d.ts +121 -0
  248. package/dist_app/sn/TxtLayer.d.ts.map +1 -0
  249. package/dist_app/sn/TxtStage.d.ts +90 -0
  250. package/dist_app/sn/TxtStage.d.ts.map +1 -0
  251. package/dist_app/sn/Variable.d.ts +48 -0
  252. package/dist_app/sn/Variable.d.ts.map +1 -0
  253. package/dist_app/sn/htm2tx.d.ts +3 -0
  254. package/dist_app/sn/htm2tx.d.ts.map +1 -0
  255. package/dist_app/test/AnalyzeTagArg.test.d.ts +2 -0
  256. package/dist_app/test/AnalyzeTagArg.test.d.ts.map +1 -0
  257. package/dist_app/test/AreasTest.test.d.ts +2 -0
  258. package/dist_app/test/AreasTest.test.d.ts.map +1 -0
  259. package/dist_app/test/CmnLib.test.d.ts +2 -0
  260. package/dist_app/test/CmnLib.test.d.ts.map +1 -0
  261. package/dist_app/test/Config.test.d.ts +2 -0
  262. package/dist_app/test/Config.test.d.ts.map +1 -0
  263. package/dist_app/test/Grammar.test.d.ts +2 -0
  264. package/dist_app/test/Grammar.test.d.ts.map +1 -0
  265. package/dist_app/test/HyphTest.test.d.ts +2 -0
  266. package/dist_app/test/HyphTest.test.d.ts.map +1 -0
  267. package/dist_app/test/Log.test.d.ts +2 -0
  268. package/dist_app/test/Log.test.d.ts.map +1 -0
  269. package/dist_app/test/PropParser.test.d.ts +2 -0
  270. package/dist_app/test/PropParser.test.d.ts.map +1 -0
  271. package/dist_app/test/RubySpliter.test.d.ts +2 -0
  272. package/dist_app/test/RubySpliter.test.d.ts.map +1 -0
  273. package/dist_app/test/SysTest.d.ts +5 -0
  274. package/dist_app/test/SysTest.d.ts.map +1 -0
  275. package/dist_app/test/ValTest.d.ts +31 -0
  276. package/dist_app/test/ValTest.d.ts.map +1 -0
  277. package/dist_app/test/Variable.test.d.ts +2 -0
  278. package/dist_app/test/Variable.test.d.ts.map +1 -0
  279. package/dist_app/web.d.ts +9 -0
  280. package/dist_app/web.d.ts.map +1 -0
  281. package/package.json +57 -51
  282. package/dist/app.js +0 -28154
  283. package/dist/app.js.map +0 -1
  284. package/dist/appMain.js +0 -16
  285. package/dist/appMain.js.map +0 -1
  286. package/dist/preload.js +0 -2
  287. package/dist/preload.js.map +0 -1
  288. package/dist/sn/ReadState.d.ts +0 -79
  289. package/dist/sn/ReadState.d.ts.map +0 -1
@@ -0,0 +1,1519 @@
1
+ import { d as S, e as V, g as Y, Q as U, o as j, U as B, V as dt, m as _t, L as yt } from "./app2.js";
2
+ import { u as mt, E as f, r as gt, T as Z, a as k, b as bt } from "./Reading.js";
3
+ const $ = `trans
4
+ `, Q = "tsy nm:";
5
+ class vt {
6
+ static #t = {};
7
+ static #s;
8
+ static #e;
9
+ static init(t, e) {
10
+ this.#t = {}, this.#s = t, this.#e = e, this.#e.ticker.add(this.#n);
11
+ }
12
+ static #n = () => mt();
13
+ static destroy() {
14
+ this.stopAllTw(), this.#e.ticker.remove(this.#n);
15
+ }
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ static setTwProp(t, e) {
18
+ const s = S(e, "repeat", 1);
19
+ return t.delay(S(e, "delay", 0)).easing(this.ease(e.ease)).repeat(s > 0 ? s - 1 : 1 / 0).yoyo(V(e, "yoyo", !1));
20
+ }
21
+ static #o = {
22
+ "Back.In": (t) => f.Back.In(t),
23
+ "Back.InOut": (t) => f.Back.InOut(t),
24
+ "Back.Out": (t) => f.Back.Out(t),
25
+ "Bounce.In": (t) => f.Bounce.In(t),
26
+ "Bounce.InOut": (t) => f.Bounce.InOut(t),
27
+ "Bounce.Out": (t) => f.Bounce.Out(t),
28
+ "Circular.In": (t) => f.Circular.In(t),
29
+ "Circular.InOut": (t) => f.Circular.InOut(t),
30
+ "Circular.Out": (t) => f.Circular.Out(t),
31
+ "Cubic.In": (t) => f.Cubic.In(t),
32
+ "Cubic.InOut": (t) => f.Cubic.InOut(t),
33
+ "Cubic.Out": (t) => f.Cubic.Out(t),
34
+ "Elastic.In": (t) => f.Elastic.In(t),
35
+ "Elastic.InOut": (t) => f.Elastic.InOut(t),
36
+ "Elastic.Out": (t) => f.Elastic.Out(t),
37
+ "Exponential.In": (t) => f.Exponential.In(t),
38
+ "Exponential.InOut": (t) => f.Exponential.InOut(t),
39
+ "Exponential.Out": (t) => f.Exponential.Out(t),
40
+ "Linear.None": (t) => f.Linear.None(t),
41
+ "Quadratic.In": (t) => f.Quadratic.In(t),
42
+ "Quadratic.InOut": (t) => f.Quadratic.InOut(t),
43
+ "Quadratic.Out": (t) => f.Quadratic.Out(t),
44
+ "Quartic.In": (t) => f.Quartic.In(t),
45
+ "Quartic.InOut": (t) => f.Quartic.InOut(t),
46
+ "Quartic.Out": (t) => f.Quartic.Out(t),
47
+ "Quintic.In": (t) => f.Quintic.In(t),
48
+ "Quintic.InOut": (t) => f.Quintic.InOut(t),
49
+ "Quintic.Out": (t) => f.Quintic.Out(t),
50
+ "Sinusoidal.In": (t) => f.Sinusoidal.In(t),
51
+ "Sinusoidal.InOut": (t) => f.Sinusoidal.InOut(t),
52
+ "Sinusoidal.Out": (t) => f.Sinusoidal.Out(t)
53
+ };
54
+ static ease(t) {
55
+ if (!t) return (s) => f.Linear.None(s);
56
+ const e = this.#o[t];
57
+ if (!e) throw "異常なease指定です";
58
+ return e;
59
+ }
60
+ static hMemberCnt = {
61
+ alpha: 0,
62
+ height: 0,
63
+ rotation: 0,
64
+ // rotationX〜Z、scaleZ、zは設定すると
65
+ scale_x: 0,
66
+ // 三次元方向の拡大縮小ルーチンが働き画像がぼやけるので
67
+ scale_y: 0,
68
+ // backlayで設定しない方針
69
+ pivot_x: 0,
70
+ pivot_y: 0,
71
+ width: 0,
72
+ x: 0,
73
+ y: 0
74
+ };
75
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
+ static cnvTweenArg(t, e) {
77
+ const s = {};
78
+ for (const o of Object.keys(this.hMemberCnt)) {
79
+ const i = t[o];
80
+ if (!i) continue;
81
+ const r = String(i), a = r.startsWith("="), u = a ? r.slice(1) : r;
82
+ if (!u) continue;
83
+ const [c, l] = u.split(","), _ = s[o] = parseFloat(c);
84
+ l && (s[o] += Math.round(
85
+ Math.random() * (parseFloat(l) - _ + 1)
86
+ )), a && (s[o] += parseFloat(e[o]));
87
+ }
88
+ return s;
89
+ }
90
+ // トゥイーン全停止
91
+ static stopAllTw() {
92
+ this.#t = {}, gt();
93
+ }
94
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
+ static tween(t, e, s, o, i, r, a, u = !0) {
96
+ const c = this.#s.isSkipping ? 0 : S(e, "time", NaN), l = new Z(s).to(o, c).onUpdate(i);
97
+ this.setTwProp(l, e), this.#t[t] = { tw: l, onEnd: a };
98
+ const { path: _ } = e;
99
+ let m = l;
100
+ if (_) {
101
+ Y.debugLog && console.group(`🍝 [${e[":タグ名"]}] path=${_}= start(${s.x},${s.y},${s.alpha})`);
102
+ for (const { groups: h } of _.matchAll(this.#a)) {
103
+ const { x: v, x2: T, y: p, y2: P, o: F, o2: O, json: L } = h;
104
+ let E = {};
105
+ if (L) try {
106
+ E = JSON.parse(L);
107
+ } catch (ft) {
108
+ console.error(`🍝 json=${L} ` + String(ft));
109
+ continue;
110
+ }
111
+ else
112
+ (v ?? T) && (E.x = v ?? T), (p ?? P) && (E.y = p ?? P), (F ?? O) && (E.alpha = Number(F ?? O));
113
+ const K = this.cnvTweenArg(E, s);
114
+ Y.debugLog && console.info(`🍝 ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
115
+ L ?? `{x:${v} y:${p} o:${F}}`} => hTo:${JSON.stringify(K)}`);
116
+ const W = new Z(s).to(K, c);
117
+ this.setTwProp(W, e), m.chain(W), m = W;
118
+ }
119
+ Y.debugLog && console.groupEnd();
120
+ }
121
+ m.onComplete(() => {
122
+ const h = this.#t[t];
123
+ h?.tw && (delete this.#t[t], h.tw = void 0, l.stop(), h.onEnd?.(), r(), k.notifyEndProc(Q + t));
124
+ });
125
+ const { chain: b } = e;
126
+ if (b) {
127
+ const h = this.#t[b];
128
+ if (!h?.tw) throw `${b}は存在しない・または終了したトゥイーンです`;
129
+ delete h.onEnd, h.tw.chain(l);
130
+ } else u && l.start();
131
+ return l;
132
+ }
133
+ // 11 match 301 step (0.1ms) PCRE2 https://regex101.com/r/reinpq/1
134
+ // List ${x}${x2}/${y}${y2}/${o}${o2}=${json}\n
135
+ /*
136
+ \(\s*
137
+ (?: (?<x>[-=\d\.]+) | (['"]) (?<x2>.*?) \2 )?
138
+ (?:
139
+ \s*,\s*
140
+ (?: (?<y>[-=\d\.]+) | (['"]) (?<y2>.*?) \5 )?
141
+ (?:
142
+ \s*,\s*
143
+ (?: (?<o>[-=\d\.]+) | (['"]) (?<o2>.*?) \8 )
144
+
145
+ )?
146
+ )?
147
+ |
148
+ (?<json>\{[^{}]*})
149
+ */
150
+ static #a = /\(\s*(?:(?<x>[-=\d.]+)|(['"])(?<x2>.*?)\2)?(?:\s*,\s*(?:(?<y>[-=\d.]+)|(['"])(?<y2>.*?)\5)?(?:\s*,\s*(?:(?<o>[-=\d.]+)|(['"])(?<o2>.*?)\8))?)?|(?<json>\{[^{}]*})/g;
151
+ // トランス終了待ち
152
+ static wt(t) {
153
+ if (!this.#t[$]?.tw) return !1;
154
+ const s = () => this.#r();
155
+ return k.beginProc(Q + $, s, !0, s), !0;
156
+ }
157
+ // レイヤのトランジションの停止
158
+ static #r() {
159
+ this.#t[$]?.tw?.stop().end();
160
+ }
161
+ // stop()とend()は別
162
+ static async closeTrans() {
163
+ if (!this.#t[$]?.tw) return;
164
+ const { promise: e, resolve: s } = Promise.withResolvers();
165
+ k.beginProc(Q + $, s, !1, s), this.#r(), await e;
166
+ }
167
+ // トゥイーン終了待ち
168
+ static wait_tsy(t) {
169
+ const e = this.#i(t), s = this.#t[e];
170
+ if (!s?.tw) return !1;
171
+ const o = () => s.tw?.end();
172
+ return k.beginProc(Q + e, o, !0, o), !0;
173
+ }
174
+ static #i(t) {
175
+ const { layer: e = "", id: s, name: o } = t, i = s ? `frm
176
+ ${s}` : o ?? e;
177
+ if (!i) throw "トゥイーンが指定されていません";
178
+ return i;
179
+ }
180
+ // トゥイーン中断
181
+ static stop_tsy(t) {
182
+ const e = this.#i(t);
183
+ return this.#t[e]?.tw?.stop().end(), !1;
184
+ }
185
+ // 一時停止
186
+ static pause_tsy(t) {
187
+ const e = this.#i(t);
188
+ return this.#t[e]?.tw?.pause(), !1;
189
+ }
190
+ // 一時停止再開
191
+ static resume_tsy(t) {
192
+ const e = this.#i(t);
193
+ return this.#t[e]?.tw?.resume(), !1;
194
+ }
195
+ }
196
+ /*!
197
+ * @pixi/sound - v4.4.1
198
+ * https://github.com/pixijs/pixi-sound
199
+ * Compiled Tue, 15 Aug 2023 19:22:13 UTC
200
+ *
201
+ * @pixi/sound is licensed under the MIT license.
202
+ * http://www.opensource.org/licenses/mit-license
203
+ */
204
+ var at;
205
+ function g() {
206
+ return at;
207
+ }
208
+ var ut = function(n, t) {
209
+ return (ut = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, s) {
210
+ e.__proto__ = s;
211
+ } || function(e, s) {
212
+ for (var o in s) Object.prototype.hasOwnProperty.call(s, o) && (e[o] = s[o]);
213
+ })(n, t);
214
+ };
215
+ function x(n, t) {
216
+ if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
217
+ function e() {
218
+ this.constructor = n;
219
+ }
220
+ ut(n, t), n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
221
+ }
222
+ var N = function() {
223
+ return (N = Object.assign || function(n) {
224
+ for (var t, e = 1, s = arguments.length; e < s; e++) for (var o in t = arguments[e]) Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]);
225
+ return n;
226
+ }).apply(this, arguments);
227
+ }, ct = ["mp3", "ogg", "oga", "opus", "mpeg", "wav", "m4a", "aiff", "wma", "mid", "caf"], X = {};
228
+ function Pt(n) {
229
+ var t = N({ m4a: "audio/mp4", oga: "audio/ogg", opus: 'audio/ogg; codecs="opus"', caf: 'audio/x-caf; codecs="opus"' }, n || {}), e = document.createElement("audio"), s = {}, o = /^no$/;
230
+ ct.forEach(function(i) {
231
+ var r = e.canPlayType("audio/".concat(i)).replace(o, ""), a = t[i] ? e.canPlayType(t[i]).replace(o, "") : "";
232
+ s[i] = !!r || !!a;
233
+ }), Object.assign(X, s);
234
+ }
235
+ Pt();
236
+ var xt = /\.(\{([^\}]+)\})(\?.*)?$/;
237
+ function lt(n) {
238
+ var t = xt, e = typeof n == "string" ? n : n.url;
239
+ if (!t.test(e)) return e;
240
+ for (var s = t.exec(e), o = s[2].split(","), i = o[o.length - 1], r = 0, a = o.length; r < a; r++) {
241
+ var u = o[r];
242
+ if (X[u]) {
243
+ i = u;
244
+ break;
245
+ }
246
+ }
247
+ var c = e.replace(s[1], i);
248
+ if (typeof n != "string") {
249
+ var l = n;
250
+ l.extension = i, l.url = c;
251
+ }
252
+ return c;
253
+ }
254
+ var J = ct.filter(function(n) {
255
+ return X[n];
256
+ }), pt = function() {
257
+ function n() {
258
+ }
259
+ return n.add = function() {
260
+ n.setLegacy(g().useLegacy);
261
+ }, n.setLegacy = function(t) {
262
+ t ? J.forEach(function(e) {
263
+ j.setExtensionXhrType(e, j.XHR_RESPONSE_TYPE.DEFAULT), j.setExtensionLoadType(e, j.LOAD_TYPE.AUDIO);
264
+ }) : J.forEach(function(e) {
265
+ j.setExtensionXhrType(e, j.XHR_RESPONSE_TYPE.BUFFER), j.setExtensionLoadType(e, j.LOAD_TYPE.XHR);
266
+ });
267
+ }, n.pre = function(t, e) {
268
+ lt(t), e();
269
+ }, n.use = function(t, e) {
270
+ t.data && J.indexOf(t.extension) > -1 ? t.sound = g().add(t.name, { loaded: e, preload: !0, url: t.url, source: t.data }) : e();
271
+ }, n.extension = "loader", n;
272
+ }(), wt = 0, Ot = function(n) {
273
+ function t(e) {
274
+ var s = n.call(this) || this;
275
+ return s.id = wt++, s.init(e), s;
276
+ }
277
+ return x(t, n), t.prototype.set = function(e, s) {
278
+ if (this[e] === void 0) throw new Error("Property with name ".concat(e, " does not exist."));
279
+ switch (e) {
280
+ case "speed":
281
+ this.speed = s;
282
+ break;
283
+ case "volume":
284
+ this.volume = s;
285
+ break;
286
+ case "paused":
287
+ this.paused = s;
288
+ break;
289
+ case "loop":
290
+ this.loop = s;
291
+ break;
292
+ case "muted":
293
+ this.muted = s;
294
+ }
295
+ return this;
296
+ }, Object.defineProperty(t.prototype, "progress", { get: function() {
297
+ return this._source.currentTime / this._duration;
298
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "paused", { get: function() {
299
+ return this._paused;
300
+ }, set: function(e) {
301
+ this._paused = e, this.refreshPaused();
302
+ }, enumerable: !1, configurable: !0 }), t.prototype._onPlay = function() {
303
+ this._playing = !0;
304
+ }, t.prototype._onPause = function() {
305
+ this._playing = !1;
306
+ }, t.prototype.init = function(e) {
307
+ this._playing = !1, this._duration = e.source.duration;
308
+ var s = this._source = e.source.cloneNode(!1);
309
+ s.src = e.parent.url, s.onplay = this._onPlay.bind(this), s.onpause = this._onPause.bind(this), e.context.on("refresh", this.refresh, this), e.context.on("refreshPaused", this.refreshPaused, this), this._media = e;
310
+ }, t.prototype._internalStop = function() {
311
+ this._source && this._playing && (this._source.onended = null, this._source.pause());
312
+ }, t.prototype.stop = function() {
313
+ this._internalStop(), this._source && this.emit("stop");
314
+ }, Object.defineProperty(t.prototype, "speed", { get: function() {
315
+ return this._speed;
316
+ }, set: function(e) {
317
+ this._speed = e, this.refresh();
318
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "volume", { get: function() {
319
+ return this._volume;
320
+ }, set: function(e) {
321
+ this._volume = e, this.refresh();
322
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "loop", { get: function() {
323
+ return this._loop;
324
+ }, set: function(e) {
325
+ this._loop = e, this.refresh();
326
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "muted", { get: function() {
327
+ return this._muted;
328
+ }, set: function(e) {
329
+ this._muted = e, this.refresh();
330
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "filters", { get: function() {
331
+ return null;
332
+ }, set: function(e) {
333
+ }, enumerable: !1, configurable: !0 }), t.prototype.refresh = function() {
334
+ var e = this._media.context, s = this._media.parent;
335
+ this._source.loop = this._loop || s.loop;
336
+ var o = e.volume * (e.muted ? 0 : 1), i = s.volume * (s.muted ? 0 : 1), r = this._volume * (this._muted ? 0 : 1);
337
+ this._source.volume = r * o * i, this._source.playbackRate = this._speed * e.speed * s.speed;
338
+ }, t.prototype.refreshPaused = function() {
339
+ var e = this._media.context, s = this._media.parent, o = this._paused || s.paused || e.paused;
340
+ o !== this._pausedReal && (this._pausedReal = o, o ? (this._internalStop(), this.emit("paused")) : (this.emit("resumed"), this.play({ start: this._source.currentTime, end: this._end, volume: this._volume, speed: this._speed, loop: this._loop })), this.emit("pause", o));
341
+ }, t.prototype.play = function(e) {
342
+ var s = this, o = e.start, i = e.end, r = e.speed, a = e.loop, u = e.volume, c = e.muted;
343
+ this._speed = r, this._volume = u, this._loop = !!a, this._muted = c, this.refresh(), this.loop && i !== null && (this.loop = !1), this._start = o, this._end = i || this._duration, this._start = Math.max(0, this._start - t.PADDING), this._end = Math.min(this._end + t.PADDING, this._duration), this._source.onloadedmetadata = function() {
344
+ s._source && (s._source.currentTime = o, s._source.onloadedmetadata = null, s.emit("progress", o, s._duration), B.shared.add(s._onUpdate, s));
345
+ }, this._source.onended = this._onComplete.bind(this), this._source.play(), this.emit("start");
346
+ }, t.prototype._onUpdate = function() {
347
+ this.emit("progress", this.progress, this._duration), this._source.currentTime >= this._end && !this._source.loop && this._onComplete();
348
+ }, t.prototype._onComplete = function() {
349
+ B.shared.remove(this._onUpdate, this), this._internalStop(), this.emit("progress", 1, this._duration), this.emit("end", this);
350
+ }, t.prototype.destroy = function() {
351
+ B.shared.remove(this._onUpdate, this), this.removeAllListeners();
352
+ var e = this._source;
353
+ e && (e.onended = null, e.onplay = null, e.onpause = null, this._internalStop()), this._source = null, this._speed = 1, this._volume = 1, this._loop = !1, this._end = null, this._start = 0, this._duration = 0, this._playing = !1, this._pausedReal = !1, this._paused = !1, this._muted = !1, this._media && (this._media.context.off("refresh", this.refresh, this), this._media.context.off("refreshPaused", this.refreshPaused, this), this._media = null);
354
+ }, t.prototype.toString = function() {
355
+ return "[HTMLAudioInstance id=".concat(this.id, "]");
356
+ }, t.PADDING = 0.1, t;
357
+ }(U), Et = function(n) {
358
+ function t() {
359
+ return n !== null && n.apply(this, arguments) || this;
360
+ }
361
+ return x(t, n), t.prototype.init = function(e) {
362
+ this.parent = e, this._source = e.options.source || new Audio(), e.url && (this._source.src = e.url);
363
+ }, t.prototype.create = function() {
364
+ return new Ot(this);
365
+ }, Object.defineProperty(t.prototype, "isPlayable", { get: function() {
366
+ return !!this._source && this._source.readyState === 4;
367
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "duration", { get: function() {
368
+ return this._source.duration;
369
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "context", { get: function() {
370
+ return this.parent.context;
371
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "filters", { get: function() {
372
+ return null;
373
+ }, set: function(e) {
374
+ }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
375
+ this.removeAllListeners(), this.parent = null, this._source && (this._source.src = "", this._source.load(), this._source = null);
376
+ }, Object.defineProperty(t.prototype, "source", { get: function() {
377
+ return this._source;
378
+ }, enumerable: !1, configurable: !0 }), t.prototype.load = function(e) {
379
+ var s = this._source, o = this.parent;
380
+ if (s.readyState !== 4) if (o.url) {
381
+ s.src = o.url;
382
+ var i = function() {
383
+ u(), o.isLoaded = !0;
384
+ var l = o.autoPlayStart();
385
+ e && e(null, o, l);
386
+ }, r = function() {
387
+ u(), e && e(new Error("Sound loading has been aborted"));
388
+ }, a = function() {
389
+ u();
390
+ var l = "Failed to load audio element (code: ".concat(s.error.code, ")");
391
+ e && e(new Error(l));
392
+ }, u = function() {
393
+ s.removeEventListener("canplaythrough", i), s.removeEventListener("load", i), s.removeEventListener("abort", r), s.removeEventListener("error", a);
394
+ };
395
+ s.addEventListener("canplaythrough", i, !1), s.addEventListener("load", i, !1), s.addEventListener("abort", r, !1), s.addEventListener("error", a, !1), s.load();
396
+ } else e(new Error("sound.url or sound.source must be set"));
397
+ else {
398
+ o.isLoaded = !0;
399
+ var c = o.autoPlayStart();
400
+ e && setTimeout(function() {
401
+ e(null, o, c);
402
+ }, 0);
403
+ }
404
+ }, t;
405
+ }(U), St = function() {
406
+ function n(t, e) {
407
+ this.parent = t, Object.assign(this, e), this.duration = this.end - this.start;
408
+ }
409
+ return n.prototype.play = function(t) {
410
+ return this.parent.play({ complete: t, speed: this.speed || this.parent.speed, end: this.end, start: this.start, loop: this.loop });
411
+ }, n.prototype.destroy = function() {
412
+ this.parent = null;
413
+ }, n;
414
+ }(), w = function() {
415
+ function n() {
416
+ }
417
+ return n.setParamValue = function(t, e) {
418
+ if (t.setValueAtTime) {
419
+ var s = g().context;
420
+ t.setValueAtTime(e, s.audioContext.currentTime);
421
+ } else t.value = e;
422
+ return e;
423
+ }, n;
424
+ }(), kt = 0, Ft = function(n) {
425
+ function t(e) {
426
+ var s = n.call(this) || this;
427
+ return s.id = kt++, s._media = null, s._paused = !1, s._muted = !1, s._elapsed = 0, s.init(e), s;
428
+ }
429
+ return x(t, n), t.prototype.set = function(e, s) {
430
+ if (this[e] === void 0) throw new Error("Property with name ".concat(e, " does not exist."));
431
+ switch (e) {
432
+ case "speed":
433
+ this.speed = s;
434
+ break;
435
+ case "volume":
436
+ this.volume = s;
437
+ break;
438
+ case "muted":
439
+ this.muted = s;
440
+ break;
441
+ case "loop":
442
+ this.loop = s;
443
+ break;
444
+ case "paused":
445
+ this.paused = s;
446
+ }
447
+ return this;
448
+ }, t.prototype.stop = function() {
449
+ this._source && (this._internalStop(), this.emit("stop"));
450
+ }, Object.defineProperty(t.prototype, "speed", { get: function() {
451
+ return this._speed;
452
+ }, set: function(e) {
453
+ this._speed = e, this.refresh(), this._update(!0);
454
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "volume", { get: function() {
455
+ return this._volume;
456
+ }, set: function(e) {
457
+ this._volume = e, this.refresh();
458
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "muted", { get: function() {
459
+ return this._muted;
460
+ }, set: function(e) {
461
+ this._muted = e, this.refresh();
462
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "loop", { get: function() {
463
+ return this._loop;
464
+ }, set: function(e) {
465
+ this._loop = e, this.refresh();
466
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "filters", { get: function() {
467
+ return this._filters;
468
+ }, set: function(e) {
469
+ var s;
470
+ this._filters && ((s = this._filters) === null || s === void 0 || s.filter(function(o) {
471
+ return o;
472
+ }).forEach(function(o) {
473
+ return o.disconnect();
474
+ }), this._filters = null, this._source.connect(this._gain)), this._filters = e?.length ? e.slice(0) : null, this.refresh();
475
+ }, enumerable: !1, configurable: !0 }), t.prototype.refresh = function() {
476
+ if (this._source) {
477
+ var e = this._media.context, s = this._media.parent;
478
+ this._source.loop = this._loop || s.loop;
479
+ var o = e.volume * (e.muted ? 0 : 1), i = s.volume * (s.muted ? 0 : 1), r = this._volume * (this._muted ? 0 : 1);
480
+ w.setParamValue(this._gain.gain, r * i * o), w.setParamValue(this._source.playbackRate, this._speed * s.speed * e.speed), this.applyFilters();
481
+ }
482
+ }, t.prototype.applyFilters = function() {
483
+ var e;
484
+ if (!((e = this._filters) === null || e === void 0) && e.length) {
485
+ this._source.disconnect();
486
+ var s = this._source;
487
+ this._filters.forEach(function(o) {
488
+ s.connect(o.destination), s = o;
489
+ }), s.connect(this._gain);
490
+ }
491
+ }, t.prototype.refreshPaused = function() {
492
+ var e = this._media.context, s = this._media.parent, o = this._paused || s.paused || e.paused;
493
+ o !== this._pausedReal && (this._pausedReal = o, o ? (this._internalStop(), this.emit("paused")) : (this.emit("resumed"), this.play({ start: this._elapsed % this._duration, end: this._end, speed: this._speed, loop: this._loop, volume: this._volume })), this.emit("pause", o));
494
+ }, t.prototype.play = function(e) {
495
+ var s = e.start, o = e.end, i = e.speed, r = e.loop, a = e.volume, u = e.muted, c = e.filters;
496
+ this._paused = !1;
497
+ var l = this._media.nodes.cloneBufferSource(), _ = l.source, m = l.gain;
498
+ this._source = _, this._gain = m, this._speed = i, this._volume = a, this._loop = !!r, this._muted = u, this._filters = c, this.refresh();
499
+ var b = this._source.buffer.duration;
500
+ this._duration = b, this._end = o, this._lastUpdate = this._now(), this._elapsed = s, this._source.onended = this._onComplete.bind(this), this._loop ? (this._source.loopEnd = o, this._source.loopStart = s, this._source.start(0, s)) : o ? this._source.start(0, s, o - s) : this._source.start(0, s), this.emit("start"), this._update(!0), this.enableTicker(!0);
501
+ }, t.prototype.enableTicker = function(e) {
502
+ B.shared.remove(this._updateListener, this), e && B.shared.add(this._updateListener, this);
503
+ }, Object.defineProperty(t.prototype, "progress", { get: function() {
504
+ return this._progress;
505
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "paused", { get: function() {
506
+ return this._paused;
507
+ }, set: function(e) {
508
+ this._paused = e, this.refreshPaused();
509
+ }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
510
+ var e;
511
+ this.removeAllListeners(), this._internalStop(), this._gain && (this._gain.disconnect(), this._gain = null), this._media && (this._media.context.events.off("refresh", this.refresh, this), this._media.context.events.off("refreshPaused", this.refreshPaused, this), this._media = null), (e = this._filters) === null || e === void 0 || e.forEach(function(s) {
512
+ return s.disconnect();
513
+ }), this._filters = null, this._end = null, this._speed = 1, this._volume = 1, this._loop = !1, this._elapsed = 0, this._duration = 0, this._paused = !1, this._muted = !1, this._pausedReal = !1;
514
+ }, t.prototype.toString = function() {
515
+ return "[WebAudioInstance id=".concat(this.id, "]");
516
+ }, t.prototype._now = function() {
517
+ return this._media.context.audioContext.currentTime;
518
+ }, t.prototype._updateListener = function() {
519
+ this._update();
520
+ }, t.prototype._update = function(e) {
521
+ if (e === void 0 && (e = !1), this._source) {
522
+ var s = this._now(), o = s - this._lastUpdate;
523
+ if (o > 0 || e) {
524
+ var i = this._source.playbackRate.value;
525
+ this._elapsed += o * i, this._lastUpdate = s;
526
+ var r = this._duration, a = void 0;
527
+ if (this._source.loopStart) {
528
+ var u = this._source.loopEnd - this._source.loopStart;
529
+ a = (this._source.loopStart + this._elapsed % u) / r;
530
+ } else a = this._elapsed % r / r;
531
+ this._progress = a, this.emit("progress", this._progress, r);
532
+ }
533
+ }
534
+ }, t.prototype.init = function(e) {
535
+ this._media = e, e.context.events.on("refresh", this.refresh, this), e.context.events.on("refreshPaused", this.refreshPaused, this);
536
+ }, t.prototype._internalStop = function() {
537
+ if (this._source) {
538
+ this.enableTicker(!1), this._source.onended = null, this._source.stop(0), this._source.disconnect();
539
+ try {
540
+ this._source.buffer = null;
541
+ } catch {
542
+ }
543
+ this._source = null;
544
+ }
545
+ }, t.prototype._onComplete = function() {
546
+ if (this._source) {
547
+ this.enableTicker(!1), this._source.onended = null, this._source.disconnect();
548
+ try {
549
+ this._source.buffer = null;
550
+ } catch {
551
+ }
552
+ }
553
+ this._source = null, this._progress = 1, this.emit("progress", 1, this._duration), this.emit("end", this);
554
+ }, t;
555
+ }(U), ht = function() {
556
+ function n(t, e) {
557
+ this._output = e, this._input = t;
558
+ }
559
+ return Object.defineProperty(n.prototype, "destination", { get: function() {
560
+ return this._input;
561
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "filters", { get: function() {
562
+ return this._filters;
563
+ }, set: function(t) {
564
+ var e = this;
565
+ if (this._filters && (this._filters.forEach(function(o) {
566
+ o && o.disconnect();
567
+ }), this._filters = null, this._input.connect(this._output)), t && t.length) {
568
+ this._filters = t.slice(0), this._input.disconnect();
569
+ var s = null;
570
+ t.forEach(function(o) {
571
+ s === null ? e._input.connect(o.destination) : s.connect(o.destination), s = o;
572
+ }), s.connect(this._output);
573
+ }
574
+ }, enumerable: !1, configurable: !0 }), n.prototype.destroy = function() {
575
+ this.filters = null, this._input = null, this._output = null;
576
+ }, n;
577
+ }(), Lt = function(n) {
578
+ function t(e) {
579
+ var s = this, o = e.audioContext, i = o.createBufferSource(), r = o.createGain(), a = o.createAnalyser();
580
+ return i.connect(a), a.connect(r), r.connect(e.destination), (s = n.call(this, a, r) || this).context = e, s.bufferSource = i, s.gain = r, s.analyser = a, s;
581
+ }
582
+ return x(t, n), Object.defineProperty(t.prototype, "script", { get: function() {
583
+ return this._script || (this._script = this.context.audioContext.createScriptProcessor(t.BUFFER_SIZE), this._script.connect(this.context.destination)), this._script;
584
+ }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
585
+ n.prototype.destroy.call(this), this.bufferSource.disconnect(), this._script && this._script.disconnect(), this.gain.disconnect(), this.analyser.disconnect(), this.bufferSource = null, this._script = null, this.gain = null, this.analyser = null, this.context = null;
586
+ }, t.prototype.cloneBufferSource = function() {
587
+ var e = this.bufferSource, s = this.context.audioContext.createBufferSource();
588
+ s.buffer = e.buffer, w.setParamValue(s.playbackRate, e.playbackRate.value), s.loop = e.loop;
589
+ var o = this.context.audioContext.createGain();
590
+ return s.connect(o), o.connect(this.destination), { source: s, gain: o };
591
+ }, Object.defineProperty(t.prototype, "bufferSize", { get: function() {
592
+ return this.script.bufferSize;
593
+ }, enumerable: !1, configurable: !0 }), t.BUFFER_SIZE = 0, t;
594
+ }(ht), jt = function() {
595
+ function n() {
596
+ }
597
+ return n.prototype.init = function(t) {
598
+ this.parent = t, this._nodes = new Lt(this.context), this._source = this._nodes.bufferSource, this.source = t.options.source;
599
+ }, n.prototype.destroy = function() {
600
+ this.parent = null, this._nodes.destroy(), this._nodes = null;
601
+ try {
602
+ this._source.buffer = null;
603
+ } catch {
604
+ }
605
+ this._source = null, this.source = null;
606
+ }, n.prototype.create = function() {
607
+ return new Ft(this);
608
+ }, Object.defineProperty(n.prototype, "context", { get: function() {
609
+ return this.parent.context;
610
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "isPlayable", { get: function() {
611
+ return !!this._source && !!this._source.buffer;
612
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "filters", { get: function() {
613
+ return this._nodes.filters;
614
+ }, set: function(t) {
615
+ this._nodes.filters = t;
616
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "duration", { get: function() {
617
+ return this._source.buffer.duration;
618
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "buffer", { get: function() {
619
+ return this._source.buffer;
620
+ }, set: function(t) {
621
+ this._source.buffer = t;
622
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "nodes", { get: function() {
623
+ return this._nodes;
624
+ }, enumerable: !1, configurable: !0 }), n.prototype.load = function(t) {
625
+ this.source ? this._decode(this.source, t) : this.parent.url ? this._loadUrl(t) : t && t(new Error("sound.url or sound.source must be set"));
626
+ }, n.prototype._loadUrl = function(t) {
627
+ var e = this, s = new XMLHttpRequest(), o = this.parent.url;
628
+ s.open("GET", o, !0), s.responseType = "arraybuffer", s.onload = function() {
629
+ e.source = s.response, e._decode(s.response, t);
630
+ }, s.send();
631
+ }, n.prototype._decode = function(t, e) {
632
+ var s = this, o = function(i, r) {
633
+ if (i) e && e(i);
634
+ else {
635
+ s.parent.isLoaded = !0, s.buffer = r;
636
+ var a = s.parent.autoPlayStart();
637
+ e && e(null, s.parent, a);
638
+ }
639
+ };
640
+ t instanceof AudioBuffer ? o(null, t) : this.parent.context.decode(t, o);
641
+ }, n;
642
+ }(), D = function() {
643
+ function n(t, e) {
644
+ this.media = t, this.options = e, this._instances = [], this._sprites = {}, this.media.init(this);
645
+ var s = e.complete;
646
+ this._autoPlayOptions = s ? { complete: s } : null, this.isLoaded = !1, this.isPlaying = !1, this.autoPlay = e.autoPlay, this.singleInstance = e.singleInstance, this.preload = e.preload || this.autoPlay, this.url = e.url, this.speed = e.speed, this.volume = e.volume, this.loop = e.loop, e.sprites && this.addSprites(e.sprites), this.preload && this._preload(e.loaded);
647
+ }
648
+ return n.from = function(t) {
649
+ var e = {};
650
+ return typeof t == "string" ? e.url = t : t instanceof ArrayBuffer || t instanceof AudioBuffer || t instanceof HTMLAudioElement ? e.source = t : e = t, (e = N({ autoPlay: !1, singleInstance: !1, url: null, source: null, preload: !1, volume: 1, speed: 1, complete: null, loaded: null, loop: !1 }, e)).url && (e.url = lt(e.url)), Object.freeze(e), new n(g().useLegacy ? new Et() : new jt(), e);
651
+ }, Object.defineProperty(n.prototype, "context", { get: function() {
652
+ return g().context;
653
+ }, enumerable: !1, configurable: !0 }), n.prototype.pause = function() {
654
+ return this.isPlaying = !1, this.paused = !0, this;
655
+ }, n.prototype.resume = function() {
656
+ return this.isPlaying = this._instances.length > 0, this.paused = !1, this;
657
+ }, Object.defineProperty(n.prototype, "paused", { get: function() {
658
+ return this._paused;
659
+ }, set: function(t) {
660
+ this._paused = t, this.refreshPaused();
661
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "speed", { get: function() {
662
+ return this._speed;
663
+ }, set: function(t) {
664
+ this._speed = t, this.refresh();
665
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "filters", { get: function() {
666
+ return this.media.filters;
667
+ }, set: function(t) {
668
+ this.media.filters = t;
669
+ }, enumerable: !1, configurable: !0 }), n.prototype.addSprites = function(t, e) {
670
+ if (typeof t == "object") {
671
+ var s = {};
672
+ for (var o in t) s[o] = this.addSprites(o, t[o]);
673
+ return s;
674
+ }
675
+ var i = new St(this, e);
676
+ return this._sprites[t] = i, i;
677
+ }, n.prototype.destroy = function() {
678
+ this._removeInstances(), this.removeSprites(), this.media.destroy(), this.media = null, this._sprites = null, this._instances = null;
679
+ }, n.prototype.removeSprites = function(t) {
680
+ if (t) {
681
+ var e = this._sprites[t];
682
+ e !== void 0 && (e.destroy(), delete this._sprites[t]);
683
+ } else for (var s in this._sprites) this.removeSprites(s);
684
+ return this;
685
+ }, Object.defineProperty(n.prototype, "isPlayable", { get: function() {
686
+ return this.isLoaded && this.media && this.media.isPlayable;
687
+ }, enumerable: !1, configurable: !0 }), n.prototype.stop = function() {
688
+ if (!this.isPlayable) return this.autoPlay = !1, this._autoPlayOptions = null, this;
689
+ this.isPlaying = !1;
690
+ for (var t = this._instances.length - 1; t >= 0; t--) this._instances[t].stop();
691
+ return this;
692
+ }, n.prototype.play = function(t, e) {
693
+ var s, o = this;
694
+ if (typeof t == "string" ? s = { sprite: r = t, loop: this.loop, complete: e } : typeof t == "function" ? (s = {}).complete = t : s = t, (s = N({ complete: null, loaded: null, sprite: null, end: null, start: 0, volume: 1, speed: 1, muted: !1, loop: !1 }, s || {})).sprite) {
695
+ var i = s.sprite, r = this._sprites[i];
696
+ s.start = r.start + (s.start || 0), s.end = r.end, s.speed = r.speed || 1, s.loop = r.loop || s.loop, delete s.sprite;
697
+ }
698
+ if (s.offset && (s.start = s.offset), !this.isLoaded) return new Promise(function(u, c) {
699
+ o.autoPlay = !0, o._autoPlayOptions = s, o._preload(function(l, _, m) {
700
+ l ? c(l) : (s.loaded && s.loaded(l, _, m), u(m));
701
+ });
702
+ });
703
+ (this.singleInstance || s.singleInstance) && this._removeInstances();
704
+ var a = this._createInstance();
705
+ return this._instances.push(a), this.isPlaying = !0, a.once("end", function() {
706
+ s.complete && s.complete(o), o._onComplete(a);
707
+ }), a.once("stop", function() {
708
+ o._onComplete(a);
709
+ }), a.play(s), a;
710
+ }, n.prototype.refresh = function() {
711
+ for (var t = this._instances.length, e = 0; e < t; e++) this._instances[e].refresh();
712
+ }, n.prototype.refreshPaused = function() {
713
+ for (var t = this._instances.length, e = 0; e < t; e++) this._instances[e].refreshPaused();
714
+ }, Object.defineProperty(n.prototype, "volume", { get: function() {
715
+ return this._volume;
716
+ }, set: function(t) {
717
+ this._volume = t, this.refresh();
718
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "muted", { get: function() {
719
+ return this._muted;
720
+ }, set: function(t) {
721
+ this._muted = t, this.refresh();
722
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "loop", { get: function() {
723
+ return this._loop;
724
+ }, set: function(t) {
725
+ this._loop = t, this.refresh();
726
+ }, enumerable: !1, configurable: !0 }), n.prototype._preload = function(t) {
727
+ this.media.load(t);
728
+ }, Object.defineProperty(n.prototype, "instances", { get: function() {
729
+ return this._instances;
730
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "sprites", { get: function() {
731
+ return this._sprites;
732
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "duration", { get: function() {
733
+ return this.media.duration;
734
+ }, enumerable: !1, configurable: !0 }), n.prototype.autoPlayStart = function() {
735
+ var t;
736
+ return this.autoPlay && (t = this.play(this._autoPlayOptions)), t;
737
+ }, n.prototype._removeInstances = function() {
738
+ for (var t = this._instances.length - 1; t >= 0; t--) this._poolInstance(this._instances[t]);
739
+ this._instances.length = 0;
740
+ }, n.prototype._onComplete = function(t) {
741
+ if (this._instances) {
742
+ var e = this._instances.indexOf(t);
743
+ e > -1 && this._instances.splice(e, 1), this.isPlaying = this._instances.length > 0;
744
+ }
745
+ this._poolInstance(t);
746
+ }, n.prototype._createInstance = function() {
747
+ if (n._pool.length > 0) {
748
+ var t = n._pool.pop();
749
+ return t.init(this.media), t;
750
+ }
751
+ return this.media.create();
752
+ }, n.prototype._poolInstance = function(t) {
753
+ t.destroy(), n._pool.indexOf(t) < 0 && n._pool.push(t);
754
+ }, n._pool = [], n;
755
+ }(), Ct = function(n) {
756
+ function t() {
757
+ var e = n !== null && n.apply(this, arguments) || this;
758
+ return e.speed = 1, e.muted = !1, e.volume = 1, e.paused = !1, e;
759
+ }
760
+ return x(t, n), t.prototype.refresh = function() {
761
+ this.emit("refresh");
762
+ }, t.prototype.refreshPaused = function() {
763
+ this.emit("refreshPaused");
764
+ }, Object.defineProperty(t.prototype, "filters", { get: function() {
765
+ return null;
766
+ }, set: function(e) {
767
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "audioContext", { get: function() {
768
+ return null;
769
+ }, enumerable: !1, configurable: !0 }), t.prototype.toggleMute = function() {
770
+ return this.muted = !this.muted, this.refresh(), this.muted;
771
+ }, t.prototype.togglePause = function() {
772
+ return this.paused = !this.paused, this.refreshPaused(), this.paused;
773
+ }, t.prototype.destroy = function() {
774
+ this.removeAllListeners();
775
+ }, t;
776
+ }(U), st = function(n) {
777
+ function t() {
778
+ var e = n.call(this, null, null) || this;
779
+ e.autoPause = !0;
780
+ var s = window, o = new t.AudioContext(), i = o.createDynamicsCompressor(), r = o.createAnalyser();
781
+ return r.connect(i), i.connect(o.destination), e._input = r, e._output = o.destination, e._ctx = o, e._offlineCtx = new t.OfflineAudioContext(1, 2, s.OfflineAudioContext ? Math.max(8e3, Math.min(96e3, o.sampleRate)) : 44100), e.compressor = i, e.analyser = r, e.events = new U(), e.volume = 1, e.speed = 1, e.muted = !1, e.paused = !1, e._locked = o.state === "suspended" && ("ontouchstart" in globalThis || "onclick" in globalThis), e._locked && (e._unlock(), e._unlock = e._unlock.bind(e), document.addEventListener("mousedown", e._unlock, !0), document.addEventListener("touchstart", e._unlock, !0), document.addEventListener("touchend", e._unlock, !0)), e.onFocus = e.onFocus.bind(e), e.onBlur = e.onBlur.bind(e), globalThis.addEventListener("focus", e.onFocus), globalThis.addEventListener("blur", e.onBlur), e;
782
+ }
783
+ return x(t, n), t.prototype.onFocus = function() {
784
+ if (this.autoPause) {
785
+ var e = this._ctx.state;
786
+ e !== "suspended" && e !== "interrupted" && this._locked || (this.paused = this._pausedOnBlur, this.refreshPaused());
787
+ }
788
+ }, t.prototype.onBlur = function() {
789
+ this.autoPause && (this._locked || (this._pausedOnBlur = this._paused, this.paused = !0, this.refreshPaused()));
790
+ }, t.prototype._unlock = function() {
791
+ this._locked && (this.playEmptySound(), this._ctx.state === "running" && (document.removeEventListener("mousedown", this._unlock, !0), document.removeEventListener("touchend", this._unlock, !0), document.removeEventListener("touchstart", this._unlock, !0), this._locked = !1));
792
+ }, t.prototype.playEmptySound = function() {
793
+ var e = this._ctx.createBufferSource();
794
+ e.buffer = this._ctx.createBuffer(1, 1, 22050), e.connect(this._ctx.destination), e.start(0, 0, 0), e.context.state === "suspended" && e.context.resume();
795
+ }, Object.defineProperty(t, "AudioContext", { get: function() {
796
+ var e = window;
797
+ return e.AudioContext || e.webkitAudioContext || null;
798
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t, "OfflineAudioContext", { get: function() {
799
+ var e = window;
800
+ return e.OfflineAudioContext || e.webkitOfflineAudioContext || null;
801
+ }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
802
+ n.prototype.destroy.call(this);
803
+ var e = this._ctx;
804
+ e.close !== void 0 && e.close(), globalThis.removeEventListener("focus", this.onFocus), globalThis.removeEventListener("blur", this.onBlur), this.events.removeAllListeners(), this.analyser.disconnect(), this.compressor.disconnect(), this.analyser = null, this.compressor = null, this.events = null, this._offlineCtx = null, this._ctx = null;
805
+ }, Object.defineProperty(t.prototype, "audioContext", { get: function() {
806
+ return this._ctx;
807
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "offlineContext", { get: function() {
808
+ return this._offlineCtx;
809
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "paused", { get: function() {
810
+ return this._paused;
811
+ }, set: function(e) {
812
+ e && this._ctx.state === "running" ? this._ctx.suspend() : e || this._ctx.state !== "suspended" || this._ctx.resume(), this._paused = e;
813
+ }, enumerable: !1, configurable: !0 }), t.prototype.refresh = function() {
814
+ this.events.emit("refresh");
815
+ }, t.prototype.refreshPaused = function() {
816
+ this.events.emit("refreshPaused");
817
+ }, t.prototype.toggleMute = function() {
818
+ return this.muted = !this.muted, this.refresh(), this.muted;
819
+ }, t.prototype.togglePause = function() {
820
+ return this.paused = !this.paused, this.refreshPaused(), this._paused;
821
+ }, t.prototype.decode = function(e, s) {
822
+ var o = function(r) {
823
+ s(new Error(r?.message || "Unable to decode file"));
824
+ }, i = this._offlineCtx.decodeAudioData(e, function(r) {
825
+ s(null, r);
826
+ }, o);
827
+ i && i.catch(o);
828
+ }, t;
829
+ }(ht), It = function() {
830
+ function n() {
831
+ this.init();
832
+ }
833
+ return n.prototype.init = function() {
834
+ return this.supported && (this._webAudioContext = new st()), this._htmlAudioContext = new Ct(), this._sounds = {}, this.useLegacy = !this.supported, this;
835
+ }, Object.defineProperty(n.prototype, "context", { get: function() {
836
+ return this._context;
837
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "filtersAll", { get: function() {
838
+ return this.useLegacy ? [] : this._context.filters;
839
+ }, set: function(t) {
840
+ this.useLegacy || (this._context.filters = t);
841
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "supported", { get: function() {
842
+ return st.AudioContext !== null;
843
+ }, enumerable: !1, configurable: !0 }), n.prototype.add = function(t, e) {
844
+ if (typeof t == "object") {
845
+ var s = {};
846
+ for (var o in t) {
847
+ var i = this._getOptions(t[o], e);
848
+ s[o] = this.add(o, i);
849
+ }
850
+ return s;
851
+ }
852
+ if (e instanceof D) return this._sounds[t] = e, e;
853
+ var r = this._getOptions(e), a = D.from(r);
854
+ return this._sounds[t] = a, a;
855
+ }, n.prototype._getOptions = function(t, e) {
856
+ var s;
857
+ return s = typeof t == "string" ? { url: t } : t instanceof ArrayBuffer || t instanceof AudioBuffer || t instanceof HTMLAudioElement ? { source: t } : t, s = N(N({}, s), e || {});
858
+ }, Object.defineProperty(n.prototype, "useLegacy", { get: function() {
859
+ return this._useLegacy;
860
+ }, set: function(t) {
861
+ pt.setLegacy(t), this._useLegacy = t, this._context = !t && this.supported ? this._webAudioContext : this._htmlAudioContext;
862
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "disableAutoPause", { get: function() {
863
+ return !this._webAudioContext.autoPause;
864
+ }, set: function(t) {
865
+ this._webAudioContext.autoPause = !t;
866
+ }, enumerable: !1, configurable: !0 }), n.prototype.remove = function(t) {
867
+ return this.exists(t, !0), this._sounds[t].destroy(), delete this._sounds[t], this;
868
+ }, Object.defineProperty(n.prototype, "volumeAll", { get: function() {
869
+ return this._context.volume;
870
+ }, set: function(t) {
871
+ this._context.volume = t, this._context.refresh();
872
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "speedAll", { get: function() {
873
+ return this._context.speed;
874
+ }, set: function(t) {
875
+ this._context.speed = t, this._context.refresh();
876
+ }, enumerable: !1, configurable: !0 }), n.prototype.togglePauseAll = function() {
877
+ return this._context.togglePause();
878
+ }, n.prototype.pauseAll = function() {
879
+ return this._context.paused = !0, this._context.refreshPaused(), this;
880
+ }, n.prototype.resumeAll = function() {
881
+ return this._context.paused = !1, this._context.refreshPaused(), this;
882
+ }, n.prototype.toggleMuteAll = function() {
883
+ return this._context.toggleMute();
884
+ }, n.prototype.muteAll = function() {
885
+ return this._context.muted = !0, this._context.refresh(), this;
886
+ }, n.prototype.unmuteAll = function() {
887
+ return this._context.muted = !1, this._context.refresh(), this;
888
+ }, n.prototype.removeAll = function() {
889
+ for (var t in this._sounds) this._sounds[t].destroy(), delete this._sounds[t];
890
+ return this;
891
+ }, n.prototype.stopAll = function() {
892
+ for (var t in this._sounds) this._sounds[t].stop();
893
+ return this;
894
+ }, n.prototype.exists = function(t, e) {
895
+ return !!this._sounds[t];
896
+ }, n.prototype.find = function(t) {
897
+ return this.exists(t, !0), this._sounds[t];
898
+ }, n.prototype.play = function(t, e) {
899
+ return this.find(t).play(e);
900
+ }, n.prototype.stop = function(t) {
901
+ return this.find(t).stop();
902
+ }, n.prototype.pause = function(t) {
903
+ return this.find(t).pause();
904
+ }, n.prototype.resume = function(t) {
905
+ return this.find(t).resume();
906
+ }, n.prototype.volume = function(t, e) {
907
+ var s = this.find(t);
908
+ return e !== void 0 && (s.volume = e), s.volume;
909
+ }, n.prototype.speed = function(t, e) {
910
+ var s = this.find(t);
911
+ return e !== void 0 && (s.speed = e), s.speed;
912
+ }, n.prototype.duration = function(t) {
913
+ return this.find(t).duration;
914
+ }, n.prototype.close = function() {
915
+ return this.removeAll(), this._sounds = null, this._webAudioContext && (this._webAudioContext.destroy(), this._webAudioContext = null), this._htmlAudioContext && (this._htmlAudioContext.destroy(), this._htmlAudioContext = null), this._context = null, this;
916
+ }, n;
917
+ }(), A = function() {
918
+ function n(t, e) {
919
+ this.init(t, e);
920
+ }
921
+ return n.prototype.init = function(t, e) {
922
+ this.destination = t, this.source = e || t;
923
+ }, n.prototype.connect = function(t) {
924
+ this.source.connect(t);
925
+ }, n.prototype.disconnect = function() {
926
+ this.source.disconnect();
927
+ }, n.prototype.destroy = function() {
928
+ this.disconnect(), this.destination = null, this.source = null;
929
+ }, n;
930
+ }(), q = { __proto__: null, EqualizerFilter: function(n) {
931
+ function t(e, s, o, i, r, a, u, c, l, _) {
932
+ e === void 0 && (e = 0), s === void 0 && (s = 0), o === void 0 && (o = 0), i === void 0 && (i = 0), r === void 0 && (r = 0), a === void 0 && (a = 0), u === void 0 && (u = 0), c === void 0 && (c = 0), l === void 0 && (l = 0), _ === void 0 && (_ = 0);
933
+ var m = this;
934
+ if (!g().useLegacy) {
935
+ var b = [{ f: t.F32, type: "lowshelf", gain: e }, { f: t.F64, type: "peaking", gain: s }, { f: t.F125, type: "peaking", gain: o }, { f: t.F250, type: "peaking", gain: i }, { f: t.F500, type: "peaking", gain: r }, { f: t.F1K, type: "peaking", gain: a }, { f: t.F2K, type: "peaking", gain: u }, { f: t.F4K, type: "peaking", gain: c }, { f: t.F8K, type: "peaking", gain: l }, { f: t.F16K, type: "highshelf", gain: _ }].map(function(T) {
936
+ var p = g().context.audioContext.createBiquadFilter();
937
+ return p.type = T.type, w.setParamValue(p.Q, 1), p.frequency.value = T.f, w.setParamValue(p.gain, T.gain), p;
938
+ });
939
+ (m = n.call(this, b[0], b[b.length - 1]) || this).bands = b, m.bandsMap = {};
940
+ for (var h = 0; h < m.bands.length; h++) {
941
+ var v = m.bands[h];
942
+ h > 0 && m.bands[h - 1].connect(v), m.bandsMap[v.frequency.value] = v;
943
+ }
944
+ return m;
945
+ }
946
+ m = n.call(this, null) || this;
947
+ }
948
+ return x(t, n), t.prototype.setGain = function(e, s) {
949
+ if (s === void 0 && (s = 0), !this.bandsMap[e]) throw new Error("No band found for frequency ".concat(e));
950
+ w.setParamValue(this.bandsMap[e].gain, s);
951
+ }, t.prototype.getGain = function(e) {
952
+ if (!this.bandsMap[e]) throw new Error("No band found for frequency ".concat(e));
953
+ return this.bandsMap[e].gain.value;
954
+ }, Object.defineProperty(t.prototype, "f32", { get: function() {
955
+ return this.getGain(t.F32);
956
+ }, set: function(e) {
957
+ this.setGain(t.F32, e);
958
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f64", { get: function() {
959
+ return this.getGain(t.F64);
960
+ }, set: function(e) {
961
+ this.setGain(t.F64, e);
962
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f125", { get: function() {
963
+ return this.getGain(t.F125);
964
+ }, set: function(e) {
965
+ this.setGain(t.F125, e);
966
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f250", { get: function() {
967
+ return this.getGain(t.F250);
968
+ }, set: function(e) {
969
+ this.setGain(t.F250, e);
970
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f500", { get: function() {
971
+ return this.getGain(t.F500);
972
+ }, set: function(e) {
973
+ this.setGain(t.F500, e);
974
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f1k", { get: function() {
975
+ return this.getGain(t.F1K);
976
+ }, set: function(e) {
977
+ this.setGain(t.F1K, e);
978
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f2k", { get: function() {
979
+ return this.getGain(t.F2K);
980
+ }, set: function(e) {
981
+ this.setGain(t.F2K, e);
982
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f4k", { get: function() {
983
+ return this.getGain(t.F4K);
984
+ }, set: function(e) {
985
+ this.setGain(t.F4K, e);
986
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f8k", { get: function() {
987
+ return this.getGain(t.F8K);
988
+ }, set: function(e) {
989
+ this.setGain(t.F8K, e);
990
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "f16k", { get: function() {
991
+ return this.getGain(t.F16K);
992
+ }, set: function(e) {
993
+ this.setGain(t.F16K, e);
994
+ }, enumerable: !1, configurable: !0 }), t.prototype.reset = function() {
995
+ this.bands.forEach(function(e) {
996
+ w.setParamValue(e.gain, 0);
997
+ });
998
+ }, t.prototype.destroy = function() {
999
+ this.bands.forEach(function(e) {
1000
+ e.disconnect();
1001
+ }), this.bands = null, this.bandsMap = null;
1002
+ }, t.F32 = 32, t.F64 = 64, t.F125 = 125, t.F250 = 250, t.F500 = 500, t.F1K = 1e3, t.F2K = 2e3, t.F4K = 4e3, t.F8K = 8e3, t.F16K = 16e3, t;
1003
+ }(A), DistortionFilter: function(n) {
1004
+ function t(e) {
1005
+ e === void 0 && (e = 0);
1006
+ var s = this;
1007
+ if (!g().useLegacy) {
1008
+ var o = g().context.audioContext.createWaveShaper();
1009
+ return (s = n.call(this, o) || this)._distortion = o, s.amount = e, s;
1010
+ }
1011
+ s = n.call(this, null) || this;
1012
+ }
1013
+ return x(t, n), Object.defineProperty(t.prototype, "amount", { get: function() {
1014
+ return this._amount;
1015
+ }, set: function(e) {
1016
+ this._amount = e;
1017
+ for (var s, o = 1e3 * e, i = 44100, r = new Float32Array(i), a = Math.PI / 180, u = 0; u < i; ++u) s = 2 * u / i - 1, r[u] = (3 + o) * s * 20 * a / (Math.PI + o * Math.abs(s));
1018
+ this._distortion.curve = r, this._distortion.oversample = "4x";
1019
+ }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
1020
+ this._distortion = null, n.prototype.destroy.call(this);
1021
+ }, t;
1022
+ }(A), StereoFilter: function(n) {
1023
+ function t(e) {
1024
+ e === void 0 && (e = 0);
1025
+ var s = this;
1026
+ if (!g().useLegacy) {
1027
+ var o, i, r, a = g().context.audioContext;
1028
+ return a.createStereoPanner ? r = o = a.createStereoPanner() : ((i = a.createPanner()).panningModel = "equalpower", r = i), (s = n.call(this, r) || this)._stereo = o, s._panner = i, s.pan = e, s;
1029
+ }
1030
+ s = n.call(this, null) || this;
1031
+ }
1032
+ return x(t, n), Object.defineProperty(t.prototype, "pan", { get: function() {
1033
+ return this._pan;
1034
+ }, set: function(e) {
1035
+ this._pan = e, this._stereo ? w.setParamValue(this._stereo.pan, e) : this._panner.setPosition(e, 0, 1 - Math.abs(e));
1036
+ }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
1037
+ n.prototype.destroy.call(this), this._stereo = null, this._panner = null;
1038
+ }, t;
1039
+ }(A), ReverbFilter: function(n) {
1040
+ function t(e, s, o) {
1041
+ e === void 0 && (e = 3), s === void 0 && (s = 2), o === void 0 && (o = !1);
1042
+ var i = this;
1043
+ if (!g().useLegacy) return (i = n.call(this, null) || this)._seconds = i._clamp(e, 1, 50), i._decay = i._clamp(s, 0, 100), i._reverse = o, i._rebuild(), i;
1044
+ i = n.call(this, null) || this;
1045
+ }
1046
+ return x(t, n), t.prototype._clamp = function(e, s, o) {
1047
+ return Math.min(o, Math.max(s, e));
1048
+ }, Object.defineProperty(t.prototype, "seconds", { get: function() {
1049
+ return this._seconds;
1050
+ }, set: function(e) {
1051
+ this._seconds = this._clamp(e, 1, 50), this._rebuild();
1052
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "decay", { get: function() {
1053
+ return this._decay;
1054
+ }, set: function(e) {
1055
+ this._decay = this._clamp(e, 0, 100), this._rebuild();
1056
+ }, enumerable: !1, configurable: !0 }), Object.defineProperty(t.prototype, "reverse", { get: function() {
1057
+ return this._reverse;
1058
+ }, set: function(e) {
1059
+ this._reverse = e, this._rebuild();
1060
+ }, enumerable: !1, configurable: !0 }), t.prototype._rebuild = function() {
1061
+ for (var e, s = g().context.audioContext, o = s.sampleRate, i = o * this._seconds, r = s.createBuffer(2, i, o), a = r.getChannelData(0), u = r.getChannelData(1), c = 0; c < i; c++) e = this._reverse ? i - c : c, a[c] = (2 * Math.random() - 1) * Math.pow(1 - e / i, this._decay), u[c] = (2 * Math.random() - 1) * Math.pow(1 - e / i, this._decay);
1062
+ var l = g().context.audioContext.createConvolver();
1063
+ l.buffer = r, this.init(l);
1064
+ }, t;
1065
+ }(A), MonoFilter: function(n) {
1066
+ function t() {
1067
+ var e = this;
1068
+ if (!g().useLegacy) {
1069
+ var s = g().context.audioContext, o = s.createChannelSplitter(), i = s.createChannelMerger();
1070
+ return i.connect(o), (e = n.call(this, i, o) || this)._merger = i, e;
1071
+ }
1072
+ e = n.call(this, null) || this;
1073
+ }
1074
+ return x(t, n), t.prototype.destroy = function() {
1075
+ this._merger.disconnect(), this._merger = null, n.prototype.destroy.call(this);
1076
+ }, t;
1077
+ }(A), StreamFilter: function(n) {
1078
+ function t() {
1079
+ var e = this;
1080
+ if (!g().useLegacy) {
1081
+ var s = g().context.audioContext, o = s.createMediaStreamDestination(), i = s.createMediaStreamSource(o.stream);
1082
+ return (e = n.call(this, o, i) || this)._stream = o.stream, e;
1083
+ }
1084
+ e = n.call(this, null) || this;
1085
+ }
1086
+ return x(t, n), Object.defineProperty(t.prototype, "stream", { get: function() {
1087
+ return this._stream;
1088
+ }, enumerable: !1, configurable: !0 }), t.prototype.destroy = function() {
1089
+ this._stream = null, n.prototype.destroy.call(this);
1090
+ }, t;
1091
+ }(A), TelephoneFilter: function(n) {
1092
+ function t() {
1093
+ if (!g().useLegacy) {
1094
+ var e = g().context.audioContext, s = e.createBiquadFilter(), o = e.createBiquadFilter(), i = e.createBiquadFilter(), r = e.createBiquadFilter();
1095
+ return s.type = "lowpass", w.setParamValue(s.frequency, 2e3), o.type = "lowpass", w.setParamValue(o.frequency, 2e3), i.type = "highpass", w.setParamValue(i.frequency, 500), r.type = "highpass", w.setParamValue(r.frequency, 500), s.connect(o), o.connect(i), i.connect(r), n.call(this, s, r) || this;
1096
+ }
1097
+ n.call(this, null);
1098
+ }
1099
+ return x(t, n), t;
1100
+ }(A) }, Bt = { __proto__: null, supported: X }, nt = function(n) {
1101
+ return at = n, n;
1102
+ }(new It());
1103
+ dt.add(pt);
1104
+ class I {
1105
+ constructor(t, e, s, o, i, r, a, u) {
1106
+ this.fn = t, this.buf = e, this.start_ms = s, this.end_ms = o, this.ret_ms = i, this.volume = r, this.pan = a, this.snd = u, this.stt = u ? new G(this) : new Tt(), this.#s = k.procID, u && this.addSnd(u);
1107
+ }
1108
+ static #t = 1;
1109
+ stt;
1110
+ loop = !1;
1111
+ #s;
1112
+ get procID() {
1113
+ return this.#s;
1114
+ }
1115
+ addSnd(t) {
1116
+ switch (this.loop = t.loop, this.stt.onLoad(this), this.pan !== 0 && (t.filters = [new q.StereoFilter(this.pan)]), this.setVol = (e) => {
1117
+ t.volume = e;
1118
+ }, this.tw = () => new Z(t), this.onPlayEnd = () => {
1119
+ this.stt.onPlayEnd(this.buf), this.#e();
1120
+ }, this.stop = () => {
1121
+ t.stop(), this.#e();
1122
+ }, this.destroy = () => t.destroy(), this.buf) {
1123
+ // セリフ再生中はBGM音量を絞る
1124
+ case rt:
1125
+ {
1126
+ const e = Number(d.getVal("sys:sn.sound.BGM.vol_mul_talking") ?? 1);
1127
+ if (e === 1) break;
1128
+ I.#t = e;
1129
+ const s = tt[z];
1130
+ s && s.setVol(this.volume * I.#t);
1131
+ }
1132
+ break;
1133
+ case z:
1134
+ t.volume = this.volume * I.#t;
1135
+ break;
1136
+ }
1137
+ }
1138
+ #e = () => {
1139
+ if (this.#e = () => {
1140
+ }, I.#t === 1 || this.buf !== rt) return;
1141
+ I.#t = 1;
1142
+ const t = tt[z];
1143
+ t && t.setVol(this.volume * I.#t);
1144
+ };
1145
+ setVol(t) {
1146
+ }
1147
+ tw() {
1148
+ }
1149
+ onPlayEnd() {
1150
+ }
1151
+ stop() {
1152
+ }
1153
+ destroy() {
1154
+ }
1155
+ }
1156
+ let ot, d, C, it, tt, H;
1157
+ const z = "BGM", R = "SE", rt = "VOICE";
1158
+ class y {
1159
+ constructor(t, e, s) {
1160
+ this.hArg = t, this.buf = e, this.fn = s;
1161
+ const o = S(t, "start_ms", 0), i = S(t, "end_ms", y.#s), r = S(t, "ret_ms", 0), a = S(t, "pan", 0), u = S(t, "speed", 1);
1162
+ if (o < 0) throw `[playse] start_ms:${o} が負の値です`;
1163
+ if (r < 0) throw `[playse] ret_ms:${r} が負の値です`;
1164
+ if (0 < i) {
1165
+ if (i <= o) throw `[playse] start_ms:${o} >= end_ms:${i} は異常値です`;
1166
+ if (i <= r) throw `[playse] ret_ms:${r} >= end_ms:${i} は異常値です`;
1167
+ }
1168
+ const c = "const.sn.sound." + e + ".";
1169
+ d.setVal_Nochk("save", c + "fn", s);
1170
+ const l = y.getVol(t, 1);
1171
+ d.setVal_Nochk("save", c + "volume", l);
1172
+ const _ = l * Number(d.getVal("sys:" + c + "volume", 1, !0)), m = V(t, "loop", !1);
1173
+ m ? (y.#t[e] = s, d.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(y.#t))) : y.delLoopPlay(e), d.setVal_Nochk("save", c + "start_ms", o), d.setVal_Nochk("save", c + "end_ms", i), d.setVal_Nochk("save", c + "ret_ms", r), d.setVal_Nochk("tmp", c + "playing", !0), d.flush();
1174
+ const b = nt.find(s);
1175
+ this.#e = new I(
1176
+ s,
1177
+ e,
1178
+ o,
1179
+ i,
1180
+ r,
1181
+ _,
1182
+ a,
1183
+ b
1184
+ );
1185
+ const h = {
1186
+ loop: m,
1187
+ speed: u,
1188
+ volume: _,
1189
+ loaded: (p, P) => {
1190
+ if (!this.#e.stt.isDestroy) {
1191
+ if (p) {
1192
+ C.errScript(`ロード失敗です SndBuf fn:${s} ${String(p)}`, !1);
1193
+ return;
1194
+ }
1195
+ P && (this.#e.addSnd(P), a !== 0 && (P.filters = [new q.StereoFilter(a)]), t.fnc?.());
1196
+ }
1197
+ }
1198
+ };
1199
+ let v = "";
1200
+ if (0 < o || i < y.#s) {
1201
+ v = `${s};${o};${i};${r}`;
1202
+ const p = (h.sprites ??= {})[v] = {
1203
+ start: o / 1e3,
1204
+ end: i / 1e3
1205
+ };
1206
+ h.preload = !0;
1207
+ const P = h.loaded;
1208
+ h.loaded = (F, O) => {
1209
+ if (this.#e.stt.isDestroy) return;
1210
+ P(F, O);
1211
+ const L = O, E = L.duration;
1212
+ p.end < 0 && (p.end += E, L.removeSprites(v), L.addSprites(v, p)), p.end <= p.start && C.errScript(`[playse] end_ms:${i}(${p.end * 1e3}) >= start_ms:${o} は異常値です`), p.end * 1e3 <= r && C.errScript(`[playse] end_ms:${i}(${p.end * 1e3}) <= ret_ms:${r} は異常値です`), E <= p.start && C.errScript(`[playse] 音声ファイル再生時間:${E * 1e3} <= start_ms:${o} は異常値です`), i !== y.#s && E <= p.end && C.errScript(`[playse] 音声ファイル再生時間:${E * 1e3} <= end_ms:${i} は異常値です`), L.play(v, (K) => h.complete?.(K));
1213
+ };
1214
+ } else h.autoPlay = !0;
1215
+ if (m ? r !== 0 && (h.loop = !1, h.complete = (p) => {
1216
+ const P = p.duration, F = r / 1e3, O = i / 1e3;
1217
+ P <= F && C.errScript(`[playse] 音声ファイル再生時間:${P * 1e3} <= ret_ms:${r} は異常値です`), p.play({
1218
+ // 一周目はループなし、なのでキャッシュされてる
1219
+ ...h,
1220
+ start: F,
1221
+ end: O < 0 ? O + P : O,
1222
+ // 負の値は末尾から
1223
+ // speed, // 重複
1224
+ loop: !0,
1225
+ // volume, // 重複
1226
+ //- muted?: boolean;
1227
+ filters: a !== 0 ? [new q.StereoFilter(a)] : []
1228
+ //- complete?: CompleteCallback;
1229
+ //- loaded?: LoadedCallback;
1230
+ //- singleInstance?: boolean;
1231
+ });
1232
+ }) : h.complete = () => {
1233
+ et(this.#e, e), this.#e.onPlayEnd();
1234
+ }, this.#n(), b) {
1235
+ if (b.volume = _, v) this.#o(s, h);
1236
+ else if (b.isPlayable) {
1237
+ const p = b.options.source;
1238
+ !(p instanceof ArrayBuffer) || p.byteLength === 0 ? b.play(h) : this.#e.addSnd(D.from({
1239
+ ...h,
1240
+ url: b.options.url,
1241
+ source: p
1242
+ }));
1243
+ }
1244
+ a !== 0 && (b.filters = [new q.StereoFilter(a)]), this.needLoad = !1;
1245
+ return;
1246
+ }
1247
+ if (this.needLoad = V(t, "join", !0)) {
1248
+ const p = this.#e.procID + `loaded buf:${e} fn:${s}`;
1249
+ k.beginProc(p);
1250
+ const P = h.loaded;
1251
+ h.loaded = (F, O) => {
1252
+ P(F, O), k.endProc(p);
1253
+ };
1254
+ }
1255
+ this.#o(s, h);
1256
+ }
1257
+ static #t = {};
1258
+ static init(t, e, s, o, i) {
1259
+ y.#t = {}, ot = t, d = e, C = s, it = o, tt = i;
1260
+ }
1261
+ static setEvtMng(t) {
1262
+ H = t;
1263
+ }
1264
+ static delLoopPlay(t) {
1265
+ delete y.#t[t];
1266
+ const e = "const.sn.sound." + t + ".";
1267
+ d.setVal_Nochk("save", e + "fn", ""), d.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(y.#t)), d.flush();
1268
+ }
1269
+ static getVol(t, e) {
1270
+ const s = S(t, "volume", e);
1271
+ return s < 0 ? 0 : s > 1 ? 1 : s;
1272
+ }
1273
+ static xchgbuf({ buf: t = R, buf2: e = R }) {
1274
+ if (t === e) throw `[xchgbuf] buf:${t} が同じ値です`;
1275
+ const s = "const.sn.sound." + t + ".", o = Number(d.getVal("save:" + s + "volume")), i = String(d.getVal("save:" + s + "fn")), r = "const.sn.sound." + e + ".", a = Number(d.getVal("save:" + r + "volume")), u = String(d.getVal("save:" + r + "fn"));
1276
+ d.setVal_Nochk("save", s + "volume", a), d.setVal_Nochk("save", r + "volume", o), d.setVal_Nochk("save", s + "fn", u), d.setVal_Nochk("save", r + "fn", i), t in y.#t != e in y.#t && (t in y.#t ? (delete y.#t[t], y.#t[e] = i) : (delete y.#t[e], y.#t[t] = u), d.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(y.#t))), d.flush();
1277
+ }
1278
+ static #s = 999e3;
1279
+ #e;
1280
+ needLoad;
1281
+ #n = () => {
1282
+ nt.volumeAll = Number(d.getVal("sys:sn.sound.global_volume", 1)), this.#n = () => {
1283
+ };
1284
+ };
1285
+ #o(t, e) {
1286
+ const s = ot.searchPath(t, _t.SOUND);
1287
+ if (!s.endsWith(".bin")) {
1288
+ e.url = s, D.from(e);
1289
+ return;
1290
+ }
1291
+ new yt().add({ name: t, url: s, xhrType: j.XHR_RESPONSE_TYPE.BUFFER }).use((o, i) => {
1292
+ it.decAB(o.data).then((r) => {
1293
+ o.data = r;
1294
+ }).catch((r) => C.errScript(`Sound ロード失敗ですc fn:${o.name} ${r}`, !1)).finally(() => i());
1295
+ }).load((o, i) => {
1296
+ e.source = i[t]?.data, D.from(e);
1297
+ });
1298
+ }
1299
+ setVol(t) {
1300
+ this.#e.setVol(t);
1301
+ }
1302
+ ws = (t) => this.#e.stt.ws(this.#e, t);
1303
+ stopse({ buf: t = R }) {
1304
+ et(this.#e, t), this.#e.stt.stopse(this.#e);
1305
+ }
1306
+ fade = (t) => this.#e.stt.fade(this.#e, t);
1307
+ wf = (t) => this.#e.stt.wf(this.#e, t);
1308
+ stopfadese = (t) => this.#e.stt.stopfadese(this.#e, t);
1309
+ }
1310
+ function et({ loop: n }, t) {
1311
+ if (n) {
1312
+ y.delLoopPlay(t);
1313
+ return;
1314
+ }
1315
+ const e = "const.sn.sound." + t + ".";
1316
+ d.setVal_Nochk("tmp", e + "playing", !1), d.flush();
1317
+ }
1318
+ class Tt {
1319
+ onLoad(t) {
1320
+ t.stt = new G(t);
1321
+ }
1322
+ stopse(t) {
1323
+ t.stt = new M(t, !1);
1324
+ }
1325
+ ws = () => !1;
1326
+ onPlayEnd() {
1327
+ }
1328
+ // ok
1329
+ fade() {
1330
+ }
1331
+ // ok
1332
+ wf = () => !1;
1333
+ // ok
1334
+ compFade() {
1335
+ }
1336
+ // ok
1337
+ stopfadese() {
1338
+ }
1339
+ // ok
1340
+ isDestroy = !1;
1341
+ }
1342
+ class G {
1343
+ constructor(t) {
1344
+ this.si = t;
1345
+ }
1346
+ onLoad() {
1347
+ }
1348
+ // ok
1349
+ stopse(t) {
1350
+ t.stt = new M(t);
1351
+ }
1352
+ ws(t, e) {
1353
+ if (t.loop) return !1;
1354
+ t.stt = new At(t);
1355
+ const s = V(e, "canskip", !1), o = V(e, "stop", !0);
1356
+ if (s && H.isSkipping)
1357
+ return o ? t.stt.stopse(t) : t.stt.onPlayEnd = () => {
1358
+ }, !1;
1359
+ const { buf: i = R } = e, r = () => {
1360
+ et(t, i), t.onPlayEnd(), o ? t.stt.stopse(t) : t.stt.onPlayEnd = () => {
1361
+ };
1362
+ };
1363
+ return k.beginProc(t.procID + "ws", r, !0, s ? r : void 0), !0;
1364
+ }
1365
+ onPlayEnd() {
1366
+ }
1367
+ // ok
1368
+ fade(t, e) {
1369
+ const { buf: s = R } = e, i = "const.sn.sound." + s + "." + "volume", r = y.getVol(e, NaN);
1370
+ d.setVal_Nochk("save", i, r);
1371
+ const a = r * Number(d.getVal("sys:" + i, 1)), u = V(e, "stop", r === 0);
1372
+ u && y.delLoopPlay(s), d.flush();
1373
+ const c = S(e, "time", NaN), l = S(e, "delay", 0);
1374
+ if (c === 0 && l === 0 || H.isSkipping) {
1375
+ t.setVol(a), t.stt = u ? new M(t) : new G(t);
1376
+ return;
1377
+ }
1378
+ const _ = t.tw();
1379
+ _ && (vt.setTwProp(_, e).to({ volume: a }, c).onComplete(() => {
1380
+ bt(_), t.stt.compFade(s), t.stt = u ? new M(t) : new G(t);
1381
+ }).start(), t.stt = new Vt(_, t));
1382
+ }
1383
+ wf = () => !1;
1384
+ // ok
1385
+ compFade() {
1386
+ }
1387
+ // ok
1388
+ stopfadese() {
1389
+ }
1390
+ // ok
1391
+ isDestroy = !1;
1392
+ }
1393
+ class At {
1394
+ constructor(t) {
1395
+ this.si = t;
1396
+ }
1397
+ onLoad() {
1398
+ }
1399
+ // ok
1400
+ stopse(t) {
1401
+ t.stt = new M(t);
1402
+ }
1403
+ ws = () => !1;
1404
+ // ok
1405
+ onPlayEnd() {
1406
+ k.notifyEndProc(this.si.procID + "ws");
1407
+ }
1408
+ fade() {
1409
+ }
1410
+ // ok
1411
+ wf = () => !1;
1412
+ // ok
1413
+ compFade() {
1414
+ }
1415
+ // ok
1416
+ stopfadese() {
1417
+ }
1418
+ // ok
1419
+ isDestroy = !1;
1420
+ }
1421
+ class Vt {
1422
+ constructor(t, e) {
1423
+ this.tw = t, this.si = e;
1424
+ }
1425
+ onLoad() {
1426
+ }
1427
+ // ok
1428
+ stopse(t) {
1429
+ this.stopfadese(), t.stt = new M(t);
1430
+ }
1431
+ // 順番厳守
1432
+ ws = () => !1;
1433
+ // ok ?
1434
+ onPlayEnd() {
1435
+ }
1436
+ // ok
1437
+ fade() {
1438
+ }
1439
+ // ok
1440
+ wf(t, e) {
1441
+ t.stt = new Mt(t);
1442
+ const s = V(e, "canskip", !1);
1443
+ if (s && H.isSkipping)
1444
+ return this.stopfadese(), !1;
1445
+ const o = () => this.stopfadese();
1446
+ return k.beginProc(t.procID + "wf", o, !0, s ? o : void 0), !0;
1447
+ }
1448
+ compFade() {
1449
+ }
1450
+ // ok
1451
+ stopfadese = () => this.si.stop();
1452
+ isDestroy = !1;
1453
+ }
1454
+ class Mt {
1455
+ constructor(t) {
1456
+ this.si = t;
1457
+ }
1458
+ onLoad() {
1459
+ }
1460
+ // ok
1461
+ stopse(t) {
1462
+ this.stopfadese(), t.stt = new M(t);
1463
+ }
1464
+ ws = () => !1;
1465
+ // ok
1466
+ onPlayEnd() {
1467
+ }
1468
+ // ok
1469
+ fade() {
1470
+ }
1471
+ // ok
1472
+ wf = () => !1;
1473
+ // ok
1474
+ compFade() {
1475
+ k.notifyEndProc(this.si.procID + "wf");
1476
+ }
1477
+ stopfadese = () => this.si.stop();
1478
+ isDestroy = !1;
1479
+ }
1480
+ class M {
1481
+ constructor(t, e = !0) {
1482
+ this.si = t, this.stop = e, e && (t.stop(), t.loop && (t.destroy(), t.destroy = () => {
1483
+ }));
1484
+ }
1485
+ onLoad() {
1486
+ }
1487
+ // ok
1488
+ stopse() {
1489
+ }
1490
+ // ok
1491
+ ws = () => !1;
1492
+ // ok
1493
+ onPlayEnd() {
1494
+ }
1495
+ // ok
1496
+ fade() {
1497
+ }
1498
+ // ok
1499
+ wf = () => !1;
1500
+ // ok
1501
+ compFade() {
1502
+ }
1503
+ // ok
1504
+ stopfadese() {
1505
+ }
1506
+ // ok
1507
+ isDestroy = !0;
1508
+ }
1509
+ export {
1510
+ R as B,
1511
+ vt as C,
1512
+ Bt as I,
1513
+ nt as R,
1514
+ y as S,
1515
+ Q as T,
1516
+ z as a,
1517
+ $ as b
1518
+ };
1519
+ //# sourceMappingURL=SndBuf.js.map