@famibee/skynovel 2.0.2 → 2.0.3

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