@famibee/skynovel 1.64.22 → 2.0.0

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 (186) hide show
  1. package/README.md +3 -3
  2. package/dist/Button.js +131 -163
  3. package/dist/Button.js.map +1 -1
  4. package/dist/CallStack.js +19 -22
  5. package/dist/CallStack.js.map +1 -1
  6. package/dist/CmnInterface.js +91 -0
  7. package/dist/CmnInterface.js.map +1 -0
  8. package/dist/CmnLib.js +94 -0
  9. package/dist/CmnLib.js.map +1 -0
  10. package/dist/Config.js +26 -0
  11. package/dist/Config.js.map +1 -0
  12. package/dist/ConfigBase.js +152 -0
  13. package/dist/ConfigBase.js.map +1 -0
  14. package/dist/DebugMng.js +89 -102
  15. package/dist/DebugMng.js.map +1 -1
  16. package/dist/EventListenerCtn.js +21 -0
  17. package/dist/EventListenerCtn.js.map +1 -0
  18. package/dist/EventMng.js +1435 -1577
  19. package/dist/EventMng.js.map +1 -1
  20. package/dist/Grammar.js +194 -0
  21. package/dist/Grammar.js.map +1 -0
  22. package/dist/GrpLayer.js +163 -195
  23. package/dist/GrpLayer.js.map +1 -1
  24. package/dist/Layer.js +260 -0
  25. package/dist/Layer.js.map +1 -0
  26. package/dist/LayerMng.js +810 -992
  27. package/dist/LayerMng.js.map +1 -1
  28. package/dist/Main.js +144 -393
  29. package/dist/Main.js.map +1 -1
  30. package/dist/PropParser.js +936 -834
  31. package/dist/PropParser.js.map +1 -1
  32. package/dist/Reading.js +918 -786
  33. package/dist/Reading.js.map +1 -1
  34. package/dist/RubySpliter.js +59 -89
  35. package/dist/RubySpliter.js.map +1 -1
  36. package/dist/ScriptIterator.js +805 -1035
  37. package/dist/ScriptIterator.js.map +1 -1
  38. package/dist/SndBuf.js +1097 -1326
  39. package/dist/SndBuf.js.map +1 -1
  40. package/dist/SoundMng.js +124 -135
  41. package/dist/SoundMng.js.map +1 -1
  42. package/dist/SpritesMng.js +220 -232
  43. package/dist/SpritesMng.js.map +1 -1
  44. package/dist/SysBase.js +1729 -0
  45. package/dist/SysBase.js.map +1 -0
  46. package/dist/TxtLayer.js +1212 -1398
  47. package/dist/TxtLayer.js.map +1 -1
  48. package/dist/Variable.js +398 -466
  49. package/dist/Variable.js.map +1 -1
  50. package/dist/chunk.js +18 -0
  51. package/dist/gamepad.js +723 -511
  52. package/dist/gamepad.js.map +1 -1
  53. package/dist/pixi.js +13422 -0
  54. package/dist/pixi.js.map +1 -0
  55. package/dist/platform.js +424 -369
  56. package/dist/platform.js.map +1 -1
  57. package/dist/sn/AnalyzeTagArg.d.ts +1 -1
  58. package/dist/sn/AnalyzeTagArg.d.ts.map +1 -1
  59. package/dist/sn/CmnInterface.d.ts +3 -1
  60. package/dist/sn/CmnInterface.d.ts.map +1 -1
  61. package/dist/sn/CmnLib.d.ts.map +1 -1
  62. package/dist/sn/CmnTween.d.ts +7 -7
  63. package/dist/sn/CmnTween.d.ts.map +1 -1
  64. package/dist/sn/EventMng.d.ts.map +1 -1
  65. package/dist/sn/FocusMng.d.ts.map +1 -1
  66. package/dist/sn/Grammar.d.ts +1 -1
  67. package/dist/sn/Grammar.d.ts.map +1 -1
  68. package/dist/sn/Log.d.ts.map +1 -1
  69. package/dist/sn/Main.d.ts.map +1 -1
  70. package/dist/sn/Pages.d.ts.map +1 -1
  71. package/dist/sn/PropParser.d.ts +2 -2
  72. package/dist/sn/PropParser.d.ts.map +1 -1
  73. package/dist/sn/Reading.d.ts +7 -0
  74. package/dist/sn/Reading.d.ts.map +1 -1
  75. package/dist/sn/RubySpliter.d.ts.map +1 -1
  76. package/dist/sn/ScriptIterator.d.ts.map +1 -1
  77. package/dist/sn/SndBuf.d.ts +27 -16
  78. package/dist/sn/SndBuf.d.ts.map +1 -1
  79. package/dist/sn/SoundMng.d.ts +4 -1
  80. package/dist/sn/SoundMng.d.ts.map +1 -1
  81. package/dist/sn/SysBase.d.ts.map +1 -1
  82. package/dist/sn/TxtStage.d.ts +4 -1
  83. package/dist/sn/TxtStage.d.ts.map +1 -1
  84. package/dist/test/ValTest.d.ts +1 -1
  85. package/dist/test/ValTest.d.ts.map +1 -1
  86. package/dist/web.js +653 -8
  87. package/dist/web.js.map +1 -1
  88. package/dist_app/Button.js +131 -163
  89. package/dist_app/Button.js.map +1 -1
  90. package/dist_app/CallStack.js +19 -22
  91. package/dist_app/CallStack.js.map +1 -1
  92. package/dist_app/CmnInterface.js +91 -0
  93. package/dist_app/CmnInterface.js.map +1 -0
  94. package/dist_app/CmnLib.js +94 -0
  95. package/dist_app/CmnLib.js.map +1 -0
  96. package/dist_app/Config.js +26 -0
  97. package/dist_app/Config.js.map +1 -0
  98. package/dist_app/ConfigBase.js +152 -0
  99. package/dist_app/ConfigBase.js.map +1 -0
  100. package/dist_app/DebugMng.js +92 -0
  101. package/dist_app/DebugMng.js.map +1 -0
  102. package/dist_app/EventListenerCtn.js +21 -0
  103. package/dist_app/EventListenerCtn.js.map +1 -0
  104. package/dist_app/EventMng.js +1435 -1577
  105. package/dist_app/EventMng.js.map +1 -1
  106. package/dist_app/Grammar.js +194 -0
  107. package/dist_app/Grammar.js.map +1 -0
  108. package/dist_app/GrpLayer.js +163 -195
  109. package/dist_app/GrpLayer.js.map +1 -1
  110. package/dist_app/Layer.js +260 -0
  111. package/dist_app/Layer.js.map +1 -0
  112. package/dist_app/LayerMng.js +810 -992
  113. package/dist_app/LayerMng.js.map +1 -1
  114. package/dist_app/Main.js +144 -392
  115. package/dist_app/Main.js.map +1 -1
  116. package/dist_app/PropParser.js +936 -834
  117. package/dist_app/PropParser.js.map +1 -1
  118. package/dist_app/Reading.js +918 -786
  119. package/dist_app/Reading.js.map +1 -1
  120. package/dist_app/RubySpliter.js +59 -89
  121. package/dist_app/RubySpliter.js.map +1 -1
  122. package/dist_app/ScriptIterator.js +805 -1034
  123. package/dist_app/ScriptIterator.js.map +1 -1
  124. package/dist_app/SndBuf.js +1097 -1326
  125. package/dist_app/SndBuf.js.map +1 -1
  126. package/dist_app/SoundMng.js +124 -135
  127. package/dist_app/SoundMng.js.map +1 -1
  128. package/dist_app/SpritesMng.js +220 -231
  129. package/dist_app/SpritesMng.js.map +1 -1
  130. package/dist_app/SysBase.js +1729 -0
  131. package/dist_app/SysBase.js.map +1 -0
  132. package/dist_app/TxtLayer.js +1212 -1397
  133. package/dist_app/TxtLayer.js.map +1 -1
  134. package/dist_app/Variable.js +398 -466
  135. package/dist_app/Variable.js.map +1 -1
  136. package/dist_app/app.js +211 -8
  137. package/dist_app/app.js.map +1 -1
  138. package/dist_app/appMain.js +20 -21
  139. package/dist_app/appMain.js.map +1 -1
  140. package/dist_app/chunk.js +18 -0
  141. package/dist_app/gamepad.js +723 -511
  142. package/dist_app/gamepad.js.map +1 -1
  143. package/dist_app/pixi.js +11181 -0
  144. package/dist_app/pixi.js.map +1 -0
  145. package/dist_app/platform.js +424 -369
  146. package/dist_app/platform.js.map +1 -1
  147. package/dist_app/preload.js +2 -2
  148. package/dist_app/preload.js.map +1 -1
  149. package/dist_app/sn/AnalyzeTagArg.d.ts +1 -1
  150. package/dist_app/sn/AnalyzeTagArg.d.ts.map +1 -1
  151. package/dist_app/sn/CmnInterface.d.ts +3 -1
  152. package/dist_app/sn/CmnInterface.d.ts.map +1 -1
  153. package/dist_app/sn/CmnLib.d.ts.map +1 -1
  154. package/dist_app/sn/CmnTween.d.ts +7 -7
  155. package/dist_app/sn/CmnTween.d.ts.map +1 -1
  156. package/dist_app/sn/EventMng.d.ts.map +1 -1
  157. package/dist_app/sn/FocusMng.d.ts.map +1 -1
  158. package/dist_app/sn/Grammar.d.ts +1 -1
  159. package/dist_app/sn/Grammar.d.ts.map +1 -1
  160. package/dist_app/sn/Log.d.ts.map +1 -1
  161. package/dist_app/sn/Main.d.ts.map +1 -1
  162. package/dist_app/sn/Pages.d.ts.map +1 -1
  163. package/dist_app/sn/PropParser.d.ts +2 -2
  164. package/dist_app/sn/PropParser.d.ts.map +1 -1
  165. package/dist_app/sn/Reading.d.ts +7 -0
  166. package/dist_app/sn/Reading.d.ts.map +1 -1
  167. package/dist_app/sn/RubySpliter.d.ts.map +1 -1
  168. package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
  169. package/dist_app/sn/SndBuf.d.ts +27 -16
  170. package/dist_app/sn/SndBuf.d.ts.map +1 -1
  171. package/dist_app/sn/SoundMng.d.ts +4 -1
  172. package/dist_app/sn/SoundMng.d.ts.map +1 -1
  173. package/dist_app/sn/SysBase.d.ts.map +1 -1
  174. package/dist_app/sn/TxtStage.d.ts +4 -1
  175. package/dist_app/sn/TxtStage.d.ts.map +1 -1
  176. package/dist_app/test/ValTest.d.ts +1 -1
  177. package/dist_app/test/ValTest.d.ts.map +1 -1
  178. package/package.json +24 -14
  179. package/dist/CmnTween.js +0 -193
  180. package/dist/CmnTween.js.map +0 -1
  181. package/dist/web2.js +0 -21644
  182. package/dist/web2.js.map +0 -1
  183. package/dist_app/CmnTween.js +0 -193
  184. package/dist_app/CmnTween.js.map +0 -1
  185. package/dist_app/app2.js +0 -18547
  186. package/dist_app/app2.js.map +0 -1
package/dist/web.js CHANGED
@@ -1,9 +1,654 @@
1
- import { a as e, z as r, V as o, e as m, l as C } from "./web2.js";
2
- export {
3
- e as CmnLib,
4
- r as Layer,
5
- o as SysWeb,
6
- m as argChk_Boolean,
7
- C as argChk_Num
1
+ import { i as __toESM, t as __commonJSMin } from "./chunk.js";
2
+ import { l as argChk_Num, s as argChk_Boolean, t as CmnLib, u as getDateStr } from "./CmnLib.js";
3
+ import "./CmnInterface.js";
4
+ import "./pixi.js";
5
+ import "./EventListenerCtn.js";
6
+ import "./ConfigBase.js";
7
+ import { t as SysBase } from "./SysBase.js";
8
+ import { t as Layer } from "./Layer.js";
9
+ var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10
+ var assign = make_assign();
11
+ module.exports = {
12
+ assign,
13
+ create: make_create(),
14
+ trim: make_trim(),
15
+ bind,
16
+ slice,
17
+ each,
18
+ map,
19
+ pluck,
20
+ isList,
21
+ isFunction,
22
+ isObject,
23
+ Global: typeof window < "u" ? window : global
24
+ };
25
+ function make_assign() {
26
+ return Object.assign ? Object.assign : function(obj, props1, props2, etc) {
27
+ for (var i = 1; i < arguments.length; i++) each(Object(arguments[i]), function(val, key) {
28
+ obj[key] = val;
29
+ });
30
+ return obj;
31
+ };
32
+ }
33
+ function make_create() {
34
+ if (Object.create) return function(obj, assignProps1, assignProps2, etc) {
35
+ var assignArgsList = slice(arguments, 1);
36
+ return assign.apply(this, [Object.create(obj)].concat(assignArgsList));
37
+ };
38
+ {
39
+ function F() {}
40
+ return function(obj, assignProps1, assignProps2, etc) {
41
+ var assignArgsList = slice(arguments, 1);
42
+ return F.prototype = obj, assign.apply(this, [new F()].concat(assignArgsList));
43
+ };
44
+ }
45
+ }
46
+ function make_trim() {
47
+ return String.prototype.trim ? function(str) {
48
+ return String.prototype.trim.call(str);
49
+ } : function(str) {
50
+ return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
51
+ };
52
+ }
53
+ function bind(obj, fn) {
54
+ return function() {
55
+ return fn.apply(obj, Array.prototype.slice.call(arguments, 0));
56
+ };
57
+ }
58
+ function slice(arr, index) {
59
+ return Array.prototype.slice.call(arr, index || 0);
60
+ }
61
+ function each(obj, fn) {
62
+ pluck(obj, function(val, key) {
63
+ return fn(val, key), !1;
64
+ });
65
+ }
66
+ function map(obj, fn) {
67
+ var res = isList(obj) ? [] : {};
68
+ return pluck(obj, function(v, k) {
69
+ return res[k] = fn(v, k), !1;
70
+ }), res;
71
+ }
72
+ function pluck(obj, fn) {
73
+ if (isList(obj)) {
74
+ for (var i = 0; i < obj.length; i++) if (fn(obj[i], i)) return obj[i];
75
+ } else for (var key in obj) if (obj.hasOwnProperty(key) && fn(obj[key], key)) return obj[key];
76
+ }
77
+ function isList(val) {
78
+ return val != null && typeof val != "function" && typeof val.length == "number";
79
+ }
80
+ function isFunction(val) {
81
+ return val && {}.toString.call(val) === "[object Function]";
82
+ }
83
+ function isObject(val) {
84
+ return val && {}.toString.call(val) === "[object Object]";
85
+ }
86
+ })), require_store_engine = /* @__PURE__ */ __commonJSMin(((exports, module) => {
87
+ var util = require_util(), slice = util.slice, pluck = util.pluck, each = util.each, bind = util.bind, create = util.create, isList = util.isList, isFunction = util.isFunction, isObject = util.isObject;
88
+ module.exports = { createStore };
89
+ var storeAPI = {
90
+ version: "2.0.12",
91
+ enabled: !1,
92
+ get: function(key, optionalDefaultValue) {
93
+ var data = this.storage.read(this._namespacePrefix + key);
94
+ return this._deserialize(data, optionalDefaultValue);
95
+ },
96
+ set: function(key, value) {
97
+ return value === void 0 ? this.remove(key) : (this.storage.write(this._namespacePrefix + key, this._serialize(value)), value);
98
+ },
99
+ remove: function(key) {
100
+ this.storage.remove(this._namespacePrefix + key);
101
+ },
102
+ each: function(callback) {
103
+ var self = this;
104
+ this.storage.each(function(val, namespacedKey) {
105
+ callback.call(self, self._deserialize(val), (namespacedKey || "").replace(self._namespaceRegexp, ""));
106
+ });
107
+ },
108
+ clearAll: function() {
109
+ this.storage.clearAll();
110
+ },
111
+ hasNamespace: function(namespace) {
112
+ return this._namespacePrefix == "__storejs_" + namespace + "_";
113
+ },
114
+ createStore: function() {
115
+ return createStore.apply(this, arguments);
116
+ },
117
+ addPlugin: function(plugin) {
118
+ this._addPlugin(plugin);
119
+ },
120
+ namespace: function(namespace) {
121
+ return createStore(this.storage, this.plugins, namespace);
122
+ }
123
+ };
124
+ function _warn() {
125
+ var _console = typeof console > "u" ? null : console;
126
+ _console && (_console.warn ? _console.warn : _console.log).apply(_console, arguments);
127
+ }
128
+ function createStore(storages, plugins, namespace) {
129
+ namespace ||= "", storages && !isList(storages) && (storages = [storages]), plugins && !isList(plugins) && (plugins = [plugins]);
130
+ var namespacePrefix = namespace ? "__storejs_" + namespace + "_" : "", namespaceRegexp = namespace ? /* @__PURE__ */ RegExp("^" + namespacePrefix) : null;
131
+ if (!/^[a-zA-Z0-9_\-]*$/.test(namespace)) throw Error("store.js namespaces can only have alphanumerics + underscores and dashes");
132
+ var store$1 = create({
133
+ _namespacePrefix: namespacePrefix,
134
+ _namespaceRegexp: namespaceRegexp,
135
+ _testStorage: function(storage) {
136
+ try {
137
+ var testStr = "__storejs__test__";
138
+ storage.write(testStr, testStr);
139
+ var ok = storage.read(testStr) === testStr;
140
+ return storage.remove(testStr), ok;
141
+ } catch {
142
+ return !1;
143
+ }
144
+ },
145
+ _assignPluginFnProp: function(pluginFnProp, propName) {
146
+ var oldFn = this[propName];
147
+ this[propName] = function() {
148
+ var args = slice(arguments, 0), self = this;
149
+ function super_fn() {
150
+ if (oldFn) return each(arguments, function(arg, i) {
151
+ args[i] = arg;
152
+ }), oldFn.apply(self, args);
153
+ }
154
+ var newFnArgs = [super_fn].concat(args);
155
+ return pluginFnProp.apply(self, newFnArgs);
156
+ };
157
+ },
158
+ _serialize: function(obj) {
159
+ return JSON.stringify(obj);
160
+ },
161
+ _deserialize: function(strVal, defaultVal) {
162
+ if (!strVal) return defaultVal;
163
+ var val = "";
164
+ try {
165
+ val = JSON.parse(strVal);
166
+ } catch {
167
+ val = strVal;
168
+ }
169
+ return val === void 0 ? defaultVal : val;
170
+ },
171
+ _addStorage: function(storage) {
172
+ this.enabled || this._testStorage(storage) && (this.storage = storage, this.enabled = !0);
173
+ },
174
+ _addPlugin: function(plugin) {
175
+ var self = this;
176
+ if (isList(plugin)) {
177
+ each(plugin, function(plugin$1) {
178
+ self._addPlugin(plugin$1);
179
+ });
180
+ return;
181
+ }
182
+ if (!pluck(this.plugins, function(seenPlugin) {
183
+ return plugin === seenPlugin;
184
+ })) {
185
+ if (this.plugins.push(plugin), !isFunction(plugin)) throw Error("Plugins must be function values that return objects");
186
+ var pluginProperties = plugin.call(this);
187
+ if (!isObject(pluginProperties)) throw Error("Plugins must return an object of function properties");
188
+ each(pluginProperties, function(pluginFnProp, propName) {
189
+ if (!isFunction(pluginFnProp)) throw Error("Bad plugin property: " + propName + " from plugin " + plugin.name + ". Plugins should only return functions.");
190
+ self._assignPluginFnProp(pluginFnProp, propName);
191
+ });
192
+ }
193
+ },
194
+ addStorage: function(storage) {
195
+ _warn("store.addStorage(storage) is deprecated. Use createStore([storages])"), this._addStorage(storage);
196
+ }
197
+ }, storeAPI, { plugins: [] });
198
+ return store$1.raw = {}, each(store$1, function(prop, propName) {
199
+ isFunction(prop) && (store$1.raw[propName] = bind(store$1, prop));
200
+ }), each(storages, function(storage) {
201
+ store$1._addStorage(storage);
202
+ }), each(plugins, function(plugin) {
203
+ store$1._addPlugin(plugin);
204
+ }), store$1;
205
+ }
206
+ })), require_localStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
207
+ var Global = require_util().Global;
208
+ module.exports = {
209
+ name: "localStorage",
210
+ read,
211
+ write,
212
+ each,
213
+ remove,
214
+ clearAll
215
+ };
216
+ function localStorage() {
217
+ return Global.localStorage;
218
+ }
219
+ function read(key) {
220
+ return localStorage().getItem(key);
221
+ }
222
+ function write(key, data) {
223
+ return localStorage().setItem(key, data);
224
+ }
225
+ function each(fn) {
226
+ for (var i = localStorage().length - 1; i >= 0; i--) {
227
+ var key = localStorage().key(i);
228
+ fn(read(key), key);
229
+ }
230
+ }
231
+ function remove(key) {
232
+ return localStorage().removeItem(key);
233
+ }
234
+ function clearAll() {
235
+ return localStorage().clear();
236
+ }
237
+ })), require_oldFF_globalStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
238
+ var Global = require_util().Global;
239
+ module.exports = {
240
+ name: "oldFF-globalStorage",
241
+ read,
242
+ write,
243
+ each,
244
+ remove,
245
+ clearAll
246
+ };
247
+ var globalStorage = Global.globalStorage;
248
+ function read(key) {
249
+ return globalStorage[key];
250
+ }
251
+ function write(key, data) {
252
+ globalStorage[key] = data;
253
+ }
254
+ function each(fn) {
255
+ for (var i = globalStorage.length - 1; i >= 0; i--) {
256
+ var key = globalStorage.key(i);
257
+ fn(globalStorage[key], key);
258
+ }
259
+ }
260
+ function remove(key) {
261
+ return globalStorage.removeItem(key);
262
+ }
263
+ function clearAll() {
264
+ each(function(key, _) {
265
+ delete globalStorage[key];
266
+ });
267
+ }
268
+ })), require_oldIE_userDataStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
269
+ var Global = require_util().Global;
270
+ module.exports = {
271
+ name: "oldIE-userDataStorage",
272
+ write,
273
+ read,
274
+ each,
275
+ remove,
276
+ clearAll
277
+ };
278
+ var storageName = "storejs", doc = Global.document, _withStorageEl = _makeIEStorageElFunction(), disable = (Global.navigator ? Global.navigator.userAgent : "").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);
279
+ function write(unfixedKey, data) {
280
+ if (!disable) {
281
+ var fixedKey = fixKey(unfixedKey);
282
+ _withStorageEl(function(storageEl) {
283
+ storageEl.setAttribute(fixedKey, data), storageEl.save(storageName);
284
+ });
285
+ }
286
+ }
287
+ function read(unfixedKey) {
288
+ if (!disable) {
289
+ var fixedKey = fixKey(unfixedKey), res = null;
290
+ return _withStorageEl(function(storageEl) {
291
+ res = storageEl.getAttribute(fixedKey);
292
+ }), res;
293
+ }
294
+ }
295
+ function each(callback) {
296
+ _withStorageEl(function(storageEl) {
297
+ for (var attributes = storageEl.XMLDocument.documentElement.attributes, i = attributes.length - 1; i >= 0; i--) {
298
+ var attr = attributes[i];
299
+ callback(storageEl.getAttribute(attr.name), attr.name);
300
+ }
301
+ });
302
+ }
303
+ function remove(unfixedKey) {
304
+ var fixedKey = fixKey(unfixedKey);
305
+ _withStorageEl(function(storageEl) {
306
+ storageEl.removeAttribute(fixedKey), storageEl.save(storageName);
307
+ });
308
+ }
309
+ function clearAll() {
310
+ _withStorageEl(function(storageEl) {
311
+ var attributes = storageEl.XMLDocument.documentElement.attributes;
312
+ storageEl.load(storageName);
313
+ for (var i = attributes.length - 1; i >= 0; i--) storageEl.removeAttribute(attributes[i].name);
314
+ storageEl.save(storageName);
315
+ });
316
+ }
317
+ var forbiddenCharsRegex = RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]", "g");
318
+ function fixKey(key) {
319
+ return key.replace(/^\d/, "___$&").replace(forbiddenCharsRegex, "___");
320
+ }
321
+ function _makeIEStorageElFunction() {
322
+ if (!doc || !doc.documentElement || !doc.documentElement.addBehavior) return null;
323
+ var scriptTag = "script", storageOwner, storageContainer, storageEl;
324
+ try {
325
+ storageContainer = new ActiveXObject("htmlfile"), storageContainer.open(), storageContainer.write("<" + scriptTag + ">document.w=window</" + scriptTag + "><iframe src=\"/favicon.ico\"></iframe>"), storageContainer.close(), storageOwner = storageContainer.w.frames[0].document, storageEl = storageOwner.createElement("div");
326
+ } catch {
327
+ storageEl = doc.createElement("div"), storageOwner = doc.body;
328
+ }
329
+ return function(storeFunction) {
330
+ var args = [].slice.call(arguments, 0);
331
+ args.unshift(storageEl), storageOwner.appendChild(storageEl), storageEl.addBehavior("#default#userData"), storageEl.load(storageName), storeFunction.apply(this, args), storageOwner.removeChild(storageEl);
332
+ };
333
+ }
334
+ })), require_cookieStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
335
+ var util = require_util(), Global = util.Global, trim = util.trim;
336
+ module.exports = {
337
+ name: "cookieStorage",
338
+ read,
339
+ write,
340
+ each,
341
+ remove,
342
+ clearAll
343
+ };
344
+ var doc = Global.document;
345
+ function read(key) {
346
+ if (!key || !_has(key)) return null;
347
+ var regexpStr = "(?:^|.*;\\s*)" + escape(key).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";
348
+ return unescape(doc.cookie.replace(new RegExp(regexpStr), "$1"));
349
+ }
350
+ function each(callback) {
351
+ for (var cookies = doc.cookie.split(/; ?/g), i = cookies.length - 1; i >= 0; i--) if (trim(cookies[i])) {
352
+ var kvp = cookies[i].split("="), key = unescape(kvp[0]);
353
+ callback(unescape(kvp[1]), key);
354
+ }
355
+ }
356
+ function write(key, data) {
357
+ key && (doc.cookie = escape(key) + "=" + escape(data) + "; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/");
358
+ }
359
+ function remove(key) {
360
+ !key || !_has(key) || (doc.cookie = escape(key) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/");
361
+ }
362
+ function clearAll() {
363
+ each(function(_, key) {
364
+ remove(key);
365
+ });
366
+ }
367
+ function _has(key) {
368
+ return (/* @__PURE__ */ RegExp("(?:^|;\\s*)" + escape(key).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(doc.cookie);
369
+ }
370
+ })), require_sessionStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
371
+ var Global = require_util().Global;
372
+ module.exports = {
373
+ name: "sessionStorage",
374
+ read,
375
+ write,
376
+ each,
377
+ remove,
378
+ clearAll
379
+ };
380
+ function sessionStorage() {
381
+ return Global.sessionStorage;
382
+ }
383
+ function read(key) {
384
+ return sessionStorage().getItem(key);
385
+ }
386
+ function write(key, data) {
387
+ return sessionStorage().setItem(key, data);
388
+ }
389
+ function each(fn) {
390
+ for (var i = sessionStorage().length - 1; i >= 0; i--) {
391
+ var key = sessionStorage().key(i);
392
+ fn(read(key), key);
393
+ }
394
+ }
395
+ function remove(key) {
396
+ return sessionStorage().removeItem(key);
397
+ }
398
+ function clearAll() {
399
+ return sessionStorage().clear();
400
+ }
401
+ })), require_memoryStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
402
+ module.exports = {
403
+ name: "memoryStorage",
404
+ read,
405
+ write,
406
+ each,
407
+ remove,
408
+ clearAll
409
+ };
410
+ var memoryStorage = {};
411
+ function read(key) {
412
+ return memoryStorage[key];
413
+ }
414
+ function write(key, data) {
415
+ memoryStorage[key] = data;
416
+ }
417
+ function each(callback) {
418
+ for (var key in memoryStorage) memoryStorage.hasOwnProperty(key) && callback(memoryStorage[key], key);
419
+ }
420
+ function remove(key) {
421
+ delete memoryStorage[key];
422
+ }
423
+ function clearAll(key) {
424
+ memoryStorage = {};
425
+ }
426
+ })), require_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
427
+ module.exports = [
428
+ require_localStorage(),
429
+ require_oldFF_globalStorage(),
430
+ require_oldIE_userDataStorage(),
431
+ require_cookieStorage(),
432
+ require_sessionStorage(),
433
+ require_memoryStorage()
434
+ ];
435
+ })), require_json2$1 = /* @__PURE__ */ __commonJSMin((() => {
436
+ typeof JSON != "object" && (JSON = {}), (function() {
437
+ var rx_one = /^[\],:{}\s]*$/, rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, rx_four = /(?:^|:|,)(?:\s*\[)+/g, rx_escapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
438
+ function f(n) {
439
+ return n < 10 ? "0" + n : n;
440
+ }
441
+ function this_value() {
442
+ return this.valueOf();
443
+ }
444
+ typeof Date.prototype.toJSON != "function" && (Date.prototype.toJSON = function() {
445
+ return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null;
446
+ }, Boolean.prototype.toJSON = this_value, Number.prototype.toJSON = this_value, String.prototype.toJSON = this_value);
447
+ var gap, indent, meta, rep;
448
+ function quote(string) {
449
+ return rx_escapable.lastIndex = 0, rx_escapable.test(string) ? "\"" + string.replace(rx_escapable, function(a) {
450
+ var c = meta[a];
451
+ return typeof c == "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
452
+ }) + "\"" : "\"" + string + "\"";
453
+ }
454
+ function str(key, holder) {
455
+ var i, k, v, length, mind = gap, partial, value = holder[key];
456
+ switch (value && typeof value == "object" && typeof value.toJSON == "function" && (value = value.toJSON(key)), typeof rep == "function" && (value = rep.call(holder, key, value)), typeof value) {
457
+ case "string": return quote(value);
458
+ case "number": return isFinite(value) ? String(value) : "null";
459
+ case "boolean":
460
+ case "null": return String(value);
461
+ case "object":
462
+ if (!value) return "null";
463
+ if (gap += indent, partial = [], Object.prototype.toString.apply(value) === "[object Array]") {
464
+ for (length = value.length, i = 0; i < length; i += 1) partial[i] = str(i, value) || "null";
465
+ return v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]", gap = mind, v;
466
+ }
467
+ if (rep && typeof rep == "object") for (length = rep.length, i = 0; i < length; i += 1) typeof rep[i] == "string" && (k = rep[i], v = str(k, value), v && partial.push(quote(k) + (gap ? ": " : ":") + v));
468
+ else for (k in value) Object.prototype.hasOwnProperty.call(value, k) && (v = str(k, value), v && partial.push(quote(k) + (gap ? ": " : ":") + v));
469
+ return v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}", gap = mind, v;
470
+ }
471
+ }
472
+ typeof JSON.stringify != "function" && (meta = {
473
+ "\b": "\\b",
474
+ " ": "\\t",
475
+ "\n": "\\n",
476
+ "\f": "\\f",
477
+ "\r": "\\r",
478
+ "\"": "\\\"",
479
+ "\\": "\\\\"
480
+ }, JSON.stringify = function(value, replacer, space) {
481
+ var i;
482
+ if (gap = "", indent = "", typeof space == "number") for (i = 0; i < space; i += 1) indent += " ";
483
+ else typeof space == "string" && (indent = space);
484
+ if (rep = replacer, replacer && typeof replacer != "function" && (typeof replacer != "object" || typeof replacer.length != "number")) throw Error("JSON.stringify");
485
+ return str("", { "": value });
486
+ }), typeof JSON.parse != "function" && (JSON.parse = function(text, reviver) {
487
+ var j;
488
+ function walk(holder, key) {
489
+ var k, v, value = holder[key];
490
+ if (value && typeof value == "object") for (k in value) Object.prototype.hasOwnProperty.call(value, k) && (v = walk(value, k), v === void 0 ? delete value[k] : value[k] = v);
491
+ return reviver.call(holder, key, value);
492
+ }
493
+ if (text = String(text), rx_dangerous.lastIndex = 0, rx_dangerous.test(text) && (text = text.replace(rx_dangerous, function(a) {
494
+ return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
495
+ })), rx_one.test(text.replace(rx_two, "@").replace(rx_three, "]").replace(rx_four, ""))) return j = eval("(" + text + ")"), typeof reviver == "function" ? walk({ "": j }, "") : j;
496
+ throw SyntaxError("JSON.parse");
497
+ });
498
+ })();
499
+ })), require_json2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
500
+ module.exports = json2Plugin;
501
+ function json2Plugin() {
502
+ return require_json2$1(), {};
503
+ }
504
+ })), require_store_legacy = /* @__PURE__ */ __commonJSMin(((exports, module) => {
505
+ var engine = require_store_engine(), storages = require_all(), plugins = [require_json2()];
506
+ module.exports = engine.createStore(storages, plugins);
507
+ })), import_store_legacy = /* @__PURE__ */ __toESM(require_store_legacy()), devtools = {
508
+ isOpen: !1,
509
+ orientation: void 0
510
+ }, threshold = 170, emitEvent = (isOpen, orientation) => {
511
+ globalThis.dispatchEvent(new globalThis.CustomEvent("devtoolschange", { detail: {
512
+ isOpen,
513
+ orientation
514
+ } }));
515
+ }, main = ({ emitEvents = !0 } = {}) => {
516
+ let widthThreshold = globalThis.outerWidth - globalThis.innerWidth > threshold, heightThreshold = globalThis.outerHeight - globalThis.innerHeight > threshold, orientation = widthThreshold ? "vertical" : "horizontal";
517
+ !(heightThreshold && widthThreshold) && (globalThis.Firebug && globalThis.Firebug.chrome && globalThis.Firebug.chrome.isInitialized || widthThreshold || heightThreshold) ? ((!devtools.isOpen || devtools.orientation !== orientation) && emitEvents && emitEvent(!0, orientation), devtools.isOpen = !0, devtools.orientation = orientation) : (devtools.isOpen && emitEvents && emitEvent(!1, void 0), devtools.isOpen = !1, devtools.orientation = void 0);
8
518
  };
9
- //# sourceMappingURL=web.js.map
519
+ main({ emitEvents: !1 }), setInterval(main, 500);
520
+ var SysWeb = class extends SysBase {
521
+ #e;
522
+ constructor(...[hPlg = {}, arg = {
523
+ cur: "prj/",
524
+ crypto: !1,
525
+ dip: ""
526
+ }]) {
527
+ super(hPlg, arg);
528
+ let a = arg.cur.split("/");
529
+ this.#e = a.length > 2 ? a.slice(0, -2).join("/") + "/" : "", this.loaded(hPlg, arg);
530
+ }
531
+ async loaded(...[hPlg, arg]) {
532
+ await super.loaded(hPlg, arg), document.querySelectorAll("[data-prj]").forEach((v) => {
533
+ let elm = v.attributes.getNamedItem("data-prj");
534
+ elm && v.addEventListener("click", () => {
535
+ this.runSN(elm.value);
536
+ }, { passive: !0 });
537
+ }), document.querySelectorAll("[data-reload]").forEach((v) => v.addEventListener("click", () => {
538
+ this.run();
539
+ }, { passive: !0 })), arg.dip && (CmnLib.hDip = JSON.parse(arg.dip));
540
+ let sp = new URLSearchParams(location.search), dip = sp.get("dip");
541
+ if (dip && (CmnLib.hDip = {
542
+ ...CmnLib.hDip,
543
+ ...JSON.parse(dip.replaceAll("%2C", ","))
544
+ }), !argChk_Boolean(CmnLib.hDip, "oninit_run", !0)) return;
545
+ argChk_Boolean(CmnLib.hDip, "dbg", !1) && (CmnLib.isDbg = !0, this.fetch = (url, init) => fetch(url, {
546
+ ...init,
547
+ mode: "cors"
548
+ })), this.extPort = argChk_Num(CmnLib.hDip, "port", this.extPort);
549
+ let cur = sp.get("cur");
550
+ cur && (arg.cur = this.#e + cur + "/"), await this.run();
551
+ }
552
+ #t = ":";
553
+ async runSN(prj) {
554
+ this.arg.cur = this.#e + prj + "/", this.#t !== this.arg.cur && (this.#t = this.arg.cur, await this.run());
555
+ }
556
+ async initVal(hTmp, comp) {
557
+ let hn = encodeURIComponent(document.location.hostname);
558
+ hTmp["const.sn.isDebugger"] = hn === "localhost" || hn === "127.0.0.1";
559
+ let ns = this.cfg.headNs;
560
+ this.flushSub = this.arg.crypto ? async () => {
561
+ import_store_legacy.default.set(ns + "sys_", await this.enc(JSON.stringify(this.data.sys))), import_store_legacy.default.set(ns + "mark_", await this.enc(JSON.stringify(this.data.mark))), import_store_legacy.default.set(ns + "kidoku_", await this.enc(JSON.stringify(this.data.kidoku)));
562
+ } : () => {
563
+ import_store_legacy.default.set(ns + "sys", this.data.sys), import_store_legacy.default.set(ns + "mark", this.data.mark), import_store_legacy.default.set(ns + "kidoku", this.data.kidoku);
564
+ };
565
+ let nm = ns + (this.arg.crypto ? "sys_" : "sys");
566
+ if (hTmp["const.sn.isFirstBoot"] = import_store_legacy.default.get(nm) === void 0) {
567
+ this.data.sys = {}, this.data.mark = {}, this.data.kidoku = {}, comp(this.data);
568
+ return;
569
+ }
570
+ if (!this.arg.crypto) {
571
+ this.data.sys = import_store_legacy.default.get(ns + "sys"), this.data.mark = import_store_legacy.default.get(ns + "mark"), this.data.kidoku = import_store_legacy.default.get(ns + "kidoku"), comp(this.data);
572
+ return;
573
+ }
574
+ let mes = "";
575
+ try {
576
+ mes = "sys", this.data.sys = JSON.parse(await this.dec("json", import_store_legacy.default.get(ns + "sys_"))), mes += String(this.val.getVal("sys:TextLayer.Back.Alpha", 1)), mes = "mark", this.data.mark = JSON.parse(await this.dec("json", import_store_legacy.default.get(ns + "mark_"))), mes = "kidoku", this.data.kidoku = JSON.parse(await this.dec("json", import_store_legacy.default.get(ns + "kidoku_")));
577
+ } catch (e) {
578
+ console.error(`セーブデータ(${mes})が壊れています。一度クリアする必要があります(a) %o`, e);
579
+ }
580
+ comp(this.data);
581
+ }
582
+ init(hTag, appPixi, val) {
583
+ let aP = super.init(hTag, appPixi, val), pCvs = appPixi.view.parentElement;
584
+ if ("requestFullscreen" in document.body) this.tglFlscr_sub = this.isFullScr ? () => document.exitFullscreen() : () => pCvs.requestFullscreen(), this.elc.add(document, "fullscreenchange", () => {
585
+ this.isFullScr = !!document.fullscreenElement;
586
+ });
587
+ else {
588
+ let doc = document;
589
+ this.tglFlscr_sub = this.isFullScr ? () => doc.webkitCancelFullScreen() : () => pCvs.webkitRequestFullscreen(), this.elc.add(document, "fullscreenchange", () => {
590
+ this.isFullScr = !!doc.webkitFullscreenElement;
591
+ });
592
+ }
593
+ return this.cfg.oCfg.debug.devtool || this.elc.add(globalThis, "devtoolschange", (e) => {
594
+ e.detail.isOpen && (console.error("DevToolは禁止されています。許可する場合は【プロジェクト設定】の【devtool】をONに。"), this.main?.destroy());
595
+ }, {
596
+ once: !0,
597
+ passive: !0
598
+ }), aP;
599
+ }
600
+ cvsResize() {
601
+ if (super.cvsResize(), !this.isFullScr || !this.main) return;
602
+ let s = this.main.cvs.style;
603
+ s.width = s.height = "";
604
+ }
605
+ pathBaseCnvSnPath4Dbg = "${pathbase}/";
606
+ _export = () => ((async () => {
607
+ let s = JSON.stringify({
608
+ sys: this.data.sys,
609
+ mark: this.data.mark,
610
+ kidoku: this.data.kidoku
611
+ }), s2 = this.arg.crypto ? await this.enc(s) : s, blob = new Blob([s2], { type: "text/json" }), a = document.createElement("a");
612
+ a.href = URL.createObjectURL(blob), a.download = (this.arg.crypto ? "" : "no_crypto_") + this.cfg.headNs + getDateStr("-", "_", "") + ".swpd", a.click(), CmnLib.debugLog && console.log("プレイデータをエクスポートしました"), setTimeout(() => this.fire("sn:exported", new MouseEvent("click")), 10);
613
+ })(), !1);
614
+ _import = () => (new Promise((rs, rj) => {
615
+ let inp = document.createElement("input");
616
+ inp.type = "file", inp.accept = ".swpd, text/plain", inp.onchange = () => {
617
+ let f = inp.files?.[0];
618
+ f ? rs(f) : rj(/* @__PURE__ */ Error("ファイル選択に失敗しました"));
619
+ }, inp.click();
620
+ }).then(async (blob) => {
621
+ let s = await blob.text(), o = JSON.parse(this.arg.crypto ? await this.dec("json", s) : s);
622
+ if (o.sys["const.sn.cfg.ns"] !== this.cfg.oCfg.save_ns) {
623
+ console.error(`別のゲーム【プロジェクト名=${o.sys["const.sn.cfg.ns"]}】のプレイデータです`);
624
+ return;
625
+ }
626
+ this.data.sys = o.sys, this.data.mark = o.mark, this.data.kidoku = o.kidoku, this.flush(), this.val.updateData(o), CmnLib.debugLog && console.log("プレイデータをインポートしました"), this.fire("sn:imported", new MouseEvent("click"));
627
+ }).catch((e) => console.error(`異常なプレイデータです ${String(e)}`)), !1);
628
+ navigate_to = (hArg) => {
629
+ let { url } = hArg;
630
+ if (!url) throw "[navigate_to] urlは必須です";
631
+ return globalThis.open(url, "_blank"), !1;
632
+ };
633
+ titleSub(txt) {
634
+ document.title = txt, document.querySelectorAll("[data-title]").forEach((v) => {
635
+ v.textContent = txt;
636
+ });
637
+ }
638
+ async savePic(path, data_url) {
639
+ let a = document.createElement("a");
640
+ a.href = data_url, a.download = path, a.click(), CmnLib.debugLog && console.log("画像ファイルをダウンロードします");
641
+ }
642
+ #n = {};
643
+ async appendFile(path, data) {
644
+ let txt = (this.#n[path] ?? "") + data;
645
+ this.#n[path] = txt, await this.outputFile(path, txt);
646
+ }
647
+ async outputFile(path, data) {
648
+ let blob = new Blob([data], { type: "text/json" }), a = document.createElement("a");
649
+ a.href = URL.createObjectURL(blob), a.download = path, a.click();
650
+ }
651
+ };
652
+ export { CmnLib, Layer, SysWeb, argChk_Boolean, argChk_Num };
653
+
654
+ //# sourceMappingURL=web.js.map