@famibee/skynovel 1.64.16 → 1.64.18

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.
package/dist/LayerMng.js CHANGED
@@ -1,30 +1,30 @@
1
- import { e as w, S as H, L as F, n as D, l as v, a as k, p as M, G, q as U, E as A, f as tt, r as et, t as st, v as B, w as it, x as q, y as at, F as nt, u as W, z as J } from "./web2.js";
2
- import { C as _, T as P } from "./CmnTween.js";
1
+ import { e as g, S as H, L as F, n as B, l as x, a as _, p as M, G, q as U, E as A, f as tt, r as et, t as st, v as W, w as it, x as q, y as at, F as nt, u as O, z as J } from "./web2.js";
2
+ import { C as w, T as R } from "./CmnTween.js";
3
3
  import { G as X, D as Y } from "./GrpLayer.js";
4
- import { S as I } from "./SpritesMng.js";
5
- import { T as $, a as rt } from "./TxtLayer.js";
4
+ import { S as E } from "./SpritesMng.js";
5
+ import { T as N, a as rt } from "./TxtLayer.js";
6
6
  import { R as ot } from "./RubySpliter.js";
7
7
  import { P as ct, b as K } from "./Main.js";
8
- import { a as C } from "./Reading.js";
8
+ import { a as $ } from "./Reading.js";
9
9
  import { Button as Q } from "./Button.js";
10
- class R {
11
- constructor(t, e, s, i, n, o, r, l) {
12
- this.cls = e, this.hArg = n, this.sys = o, this.val = r, this.ret = l;
13
- const f = o.hFactoryCls[e];
14
- if (!f) throw `属性 class【${e}】が不正です`;
15
- const d = f(), h = f();
16
- d.layname = h.layname = t;
17
- const p = n[":id_tag"] = `layer:${t} cls:${e} page:`;
18
- d.ctn.name = d.name = p + "A", h.ctn.name = h.name = p + "B", s.addChild(d.ctn), i.addChild(h.ctn), w(n, "visible", !0), w(n, "visible", !0), l.isWait = d.lay(n) || h.lay(n), this.#e = { fore: d, back: h }, i.visible = !1;
19
- const c = `const.sn.lay.${t}`;
20
- r.setVal_Nochk("tmp", c, !0), r.defTmp(c + ".fore.alpha", () => this.#e.fore.alpha), r.defTmp(c + ".back.alpha", () => this.#e.back.alpha), r.defTmp(c + ".fore.height", () => this.#e.fore.height), r.defTmp(c + ".back.height", () => this.#e.back.height), r.defTmp(c + ".fore.visible", () => this.#e.fore.ctn.visible), r.defTmp(c + ".back.visible", () => this.#e.back.ctn.visible), r.defTmp(c + ".fore.width", () => this.#e.fore.width), r.defTmp(c + ".back.width", () => this.#e.back.width), r.defTmp(c + ".fore.x", () => this.#e.fore.x), r.defTmp(c + ".back.x", () => this.#e.back.x), r.defTmp(c + ".fore.y", () => this.#e.fore.y), r.defTmp(c + ".back.y", () => this.#e.back.y);
10
+ class I {
11
+ constructor(t, e, s, i, n, o, r, c) {
12
+ this.cls = e, this.hArg = n, this.sys = o, this.val = r, this.ret = c;
13
+ const h = o.hFactoryCls[e];
14
+ if (!h) throw `属性 class【${e}】が不正です`;
15
+ const f = h(), l = h();
16
+ f.layname = l.layname = t;
17
+ const d = n[":id_tag"] = `layer:${t} cls:${e} page:`;
18
+ f.ctn.name = f.name = d + "A", l.ctn.name = l.name = d + "B", s.addChild(f.ctn), i.addChild(l.ctn), g(n, "visible", !0), g(n, "visible", !0), c.isWait = f.lay(n) || l.lay(n), this.#e = { fore: f, back: l }, i.visible = !1;
19
+ const u = `const.sn.lay.${t}`;
20
+ r.setVal_Nochk("tmp", u, !0), r.defTmp(u + ".fore.alpha", () => this.#e.fore.alpha), r.defTmp(u + ".back.alpha", () => this.#e.back.alpha), r.defTmp(u + ".fore.height", () => this.#e.fore.height), r.defTmp(u + ".back.height", () => this.#e.back.height), r.defTmp(u + ".fore.visible", () => this.#e.fore.ctn.visible), r.defTmp(u + ".back.visible", () => this.#e.back.ctn.visible), r.defTmp(u + ".fore.width", () => this.#e.fore.width), r.defTmp(u + ".back.width", () => this.#e.back.width), r.defTmp(u + ".fore.x", () => this.#e.fore.x), r.defTmp(u + ".back.x", () => this.#e.back.x), r.defTmp(u + ".fore.y", () => this.#e.fore.y), r.defTmp(u + ".back.y", () => this.#e.back.y);
21
21
  }
22
22
  #e;
23
23
  destroy() {
24
24
  this.#e.fore.destroy(), this.#e.back.destroy();
25
25
  }
26
26
  lay = (t) => this.getPage(t).lay(t);
27
- getPage = (t) => R.argChk_page(t, "fore") !== "back" ? this.#e.fore : this.#e.back;
27
+ getPage = (t) => I.argChk_page(t, "fore") !== "back" ? this.#e.fore : this.#e.back;
28
28
  static argChk_page(t, e) {
29
29
  const s = t.page ?? e;
30
30
  if (s === "fore" || s === "back")
@@ -41,7 +41,7 @@ class R {
41
41
  [this.#e.back, this.#e.fore] = [this.#e.fore, this.#e.back], this.#e.back.copy(this.#e.fore, t);
42
42
  }
43
43
  }
44
- class u {
44
+ class p {
45
45
  constructor(t, e, s) {
46
46
  this.appPixi = e, this.val = s, t.add_frame = (i) => this.#k(i), t.let_frame = (i) => this.#d(i), t.set_frame = (i) => this.#N(i), t.frame = (i) => this.#S(i), t.tsy_frame = (i) => this.#w(i);
47
47
  }
@@ -49,7 +49,7 @@ class u {
49
49
  static #t;
50
50
  static #i;
51
51
  static init(t, e, s) {
52
- u.#e = t, u.#t = e, u.#i = s;
52
+ p.#e = t, p.#t = e, p.#i = s;
53
53
  }
54
54
  #o;
55
55
  setEvtMng(t) {
@@ -80,35 +80,35 @@ class u {
80
80
  const { id: e, src: s, alpha: i = 1, scale_x: n = 1, scale_y: o = 1, rotate: r = 0 } = t;
81
81
  if (!e) throw "idは必須です";
82
82
  if (!s) throw "srcは必須です";
83
- const l = "const.sn.frm." + e;
84
- if (this.val.getVal(`tmp:${l}`)) throw `frame【${e}】はすでにあります`;
85
- const f = w(t, "visible", !0), d = t.b_color ? ` background-color: ${t.b_color};` : "", h = this.#b(t);
86
- u.#i.cvs.insertAdjacentHTML("beforebegin", `<iframe id="${e}" style="opacity: ${i}; ${d} position: absolute; left:${u.#t.ofsLeft4elm + h.x * u.#t.cvsScale}px; top: ${u.#t.ofsTop4elm + h.y * u.#t.cvsScale}px; z-index: 1; border: 0px; overflow: hidden; display: ${f ? "inline" : "none"}; transform: scale(${n}, ${o}) rotate(${r}deg);" width="${h.width * u.#t.cvsScale}" height="${h.height * u.#t.cvsScale}"></iframe>`);
87
- const p = C.procID + `add_frame id:${e}`;
88
- C.beginProc(p);
89
- const c = u.#e.searchPath(s, H.HTML), a = new F().add({ name: s, url: c, xhrType: D.XHR_RESPONSE_TYPE.TEXT });
90
- return u.#t.arg.crypto && a.use(
83
+ const c = "const.sn.frm." + e;
84
+ if (this.val.getVal(`tmp:${c}`)) throw `frame【${e}】はすでにあります`;
85
+ const h = g(t, "visible", !0), f = t.b_color ? ` background-color: ${t.b_color};` : "", l = this.#b(t);
86
+ p.#i.cvs.insertAdjacentHTML("beforebegin", `<iframe id="${e}" style="opacity: ${i}; ${f} position: absolute; left:${p.#t.ofsLeft4elm + l.x * p.#t.cvsScale}px; top: ${p.#t.ofsTop4elm + l.y * p.#t.cvsScale}px; z-index: 1; border: 0px; overflow: hidden; display: ${h ? "inline" : "none"}; transform: scale(${n}, ${o}) rotate(${r}deg);" width="${l.width * p.#t.cvsScale}" height="${l.height * p.#t.cvsScale}"></iframe>`);
87
+ const d = $.procID + `add_frame id:${e}`;
88
+ $.beginProc(d);
89
+ const u = p.#e.searchPath(s, H.HTML), a = new F().add({ name: s, url: u, xhrType: B.XHR_RESPONSE_TYPE.TEXT });
90
+ return p.#t.arg.crypto && a.use(
91
91
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
92
- (y, x) => void u.#t.dec(y.extension, y.data).then((b) => {
93
- y.data = b, x();
94
- }).catch((b) => {
95
- u.#i.errScript(`[add_frame]Html ロード失敗です src:${y.name} ${b}`, !1), x();
92
+ (b, k) => void p.#t.dec(b.extension, b.data).then((v) => {
93
+ b.data = v, k();
94
+ }).catch((v) => {
95
+ p.#i.errScript(`[add_frame]Html ロード失敗です src:${b.name} ${v}`, !1), k();
96
96
  })
97
- ), a.load((y, x) => {
98
- const b = document.getElementById(e);
99
- this.#c[e] = b, this.#y[e] = !1;
100
- const g = c.lastIndexOf("/") + 1, S = c.slice(0, g), j = S.slice(0, g);
101
- b.srcdoc = String(x[s]?.data).replace("sn_repRes();", "").replaceAll(
97
+ ), a.load((b, k) => {
98
+ const v = document.getElementById(e);
99
+ this.#c[e] = v, this.#y[e] = !1;
100
+ const C = u.lastIndexOf("/") + 1, V = u.slice(0, C), m = V.slice(0, C);
101
+ v.srcdoc = String(k[s]?.data).replace("sn_repRes();", "").replaceAll(
102
102
  /\s(?:src|href)=(["'])(\S+?)\1/g,
103
103
  // 【\s】が大事、data-src弾く
104
- (m, N, L) => L.startsWith("../") ? j + m.slice(3) : m.replace("./", "").replace(N, N + S)
105
- ), b.srcdoc.includes("true/*WEBP*/;") && (b.srcdoc = b.srcdoc.replaceAll(
104
+ (y, S, T) => T.startsWith("../") ? m + y.slice(3) : y.replace("./", "").replace(S, S + V)
105
+ ), v.srcdoc.includes("true/*WEBP*/;") && (v.srcdoc = v.srcdoc.replaceAll(
106
106
  /data-src="(.+?\.)(?:jpe?g|png)/g,
107
- (m, N) => `data-src="${N}webp`
108
- )), b.onload = () => {
109
- C.endProc(p), this.val.setVal_Nochk("tmp", l, !0), this.val.setVal_Nochk("tmp", l + ".alpha", i), this.val.setVal_Nochk("tmp", l + ".x", h.x), this.val.setVal_Nochk("tmp", l + ".y", h.y), this.val.setVal_Nochk("tmp", l + ".scale_x", n), this.val.setVal_Nochk("tmp", l + ".scale_y", o), this.val.setVal_Nochk("tmp", l + ".rotate", r), this.val.setVal_Nochk("tmp", l + ".width", h.width), this.val.setVal_Nochk("tmp", l + ".height", h.height), this.val.setVal_Nochk("tmp", l + ".visible", f);
110
- const m = b.contentWindow;
111
- this.#o.resvFlameEvent(m.document.body), m.sn_repRes?.((N) => u.#_(N.dataset.src ?? "", N));
107
+ (y, S) => `data-src="${S}webp`
108
+ )), v.onload = () => {
109
+ $.endProc(d), this.val.setVal_Nochk("tmp", c, !0), this.val.setVal_Nochk("tmp", c + ".alpha", i), this.val.setVal_Nochk("tmp", c + ".x", l.x), this.val.setVal_Nochk("tmp", c + ".y", l.y), this.val.setVal_Nochk("tmp", c + ".scale_x", n), this.val.setVal_Nochk("tmp", c + ".scale_y", o), this.val.setVal_Nochk("tmp", c + ".rotate", r), this.val.setVal_Nochk("tmp", c + ".width", l.width), this.val.setVal_Nochk("tmp", c + ".height", l.height), this.val.setVal_Nochk("tmp", c + ".visible", h);
110
+ const y = v.contentWindow;
111
+ this.#o.resvFlameEvent(y.document.body), y.sn_repRes?.((S) => p.#_(S.dataset.src ?? "", S));
112
112
  };
113
113
  }), !0;
114
114
  }
@@ -120,10 +120,10 @@ class u {
120
120
  #b(t) {
121
121
  const e = { ...t };
122
122
  return new DOMRect(
123
- v(e, "x", 0),
124
- v(e, "y", 0),
125
- v(e, "width", k.stageW),
126
- v(e, "height", k.stageH)
123
+ x(e, "x", 0),
124
+ x(e, "y", 0),
125
+ x(e, "width", _.stageW),
126
+ x(e, "height", _.stageH)
127
127
  );
128
128
  }
129
129
  static #_(t, e, s) {
@@ -138,24 +138,24 @@ class u {
138
138
  return;
139
139
  }
140
140
  this.#m[t] = [e];
141
- const [o = "", r = ""] = t.split("?"), l = u.#e.searchPath(o, H.SP_GSM), f = new F().add({ name: t, url: l, xhrType: D.XHR_RESPONSE_TYPE.BUFFER });
142
- u.#t.use4ViteElectron(t, l, f, u.#i) || u.#t.arg.crypto && l.endsWith(".bin") && f.use((d, h) => {
143
- if (d.extension !== "bin") {
144
- h();
141
+ const [o = "", r = ""] = t.split("?"), c = p.#e.searchPath(o, H.SP_GSM), h = new F().add({ name: t, url: c, xhrType: B.XHR_RESPONSE_TYPE.BUFFER });
142
+ p.#t.use4ViteElectron(t, c, h, p.#i) || p.#t.arg.crypto && c.endsWith(".bin") && h.use((f, l) => {
143
+ if (f.extension !== "bin") {
144
+ l();
145
145
  return;
146
146
  }
147
- u.#t.decAB(d.data).then((p) => {
148
- d.data = p, p instanceof HTMLImageElement && (d.type = D.TYPE.IMAGE), h();
149
- }).catch((p) => {
150
- u.#i.errScript(`FrameMng loadPic ロード失敗です fn:${d.name} ${p}`, !1), h();
147
+ p.#t.decAB(f.data).then((d) => {
148
+ f.data = d, d instanceof HTMLImageElement && (f.type = B.TYPE.IMAGE), l();
149
+ }).catch((d) => {
150
+ p.#i.errScript(`FrameMng loadPic ロード失敗です fn:${f.name} ${d}`, !1), l();
151
151
  });
152
- }), f.load((d, h) => {
153
- for (const [p, { data: { src: c } }] of Object.entries(h)) {
154
- const a = this.#f[p] = c + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
155
- (c.startsWith("blob:") || c.startsWith("data:") ? "" : r ? "?" + r : ""), y = this.#m[p];
156
- if (y) for (const x of y)
157
- x.src = a, s && (x.onload = () => s(x));
158
- delete this.#m[p];
152
+ }), h.load((f, l) => {
153
+ for (const [d, { data: { src: u } }] of Object.entries(l)) {
154
+ const a = this.#f[d] = u + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
155
+ (u.startsWith("blob:") || u.startsWith("data:") ? "" : r ? "?" + r : ""), b = this.#m[d];
156
+ if (b) for (const k of b)
157
+ k.src = a, s && (k.onload = () => s(k));
158
+ delete this.#m[d];
159
159
  }
160
160
  });
161
161
  }
@@ -164,7 +164,7 @@ class u {
164
164
  cvsResize() {
165
165
  for (const [t, e] of Object.entries(this.#c)) {
166
166
  const s = "const.sn.frm." + t, i = Number(this.val.getVal(s + ".x")), n = Number(this.val.getVal(s + ".y")), o = Number(this.val.getVal(s + ".width")), r = Number(this.val.getVal(s + ".height"));
167
- e.style.left = `${u.#t.ofsLeft4elm + i * u.#t.cvsScale}px`, e.style.top = `${u.#t.ofsTop4elm + n * u.#t.cvsScale}px`, e.width = String(o * u.#t.cvsScale), e.height = String(r * u.#t.cvsScale);
167
+ e.style.left = `${p.#t.ofsLeft4elm + i * p.#t.cvsScale}px`, e.style.top = `${p.#t.ofsTop4elm + n * p.#t.cvsScale}px`, e.width = String(o * p.#t.cvsScale), e.height = String(r * p.#t.cvsScale);
168
168
  }
169
169
  }
170
170
  // フレーム変数を取得
@@ -183,7 +183,7 @@ class u {
183
183
  "tmp",
184
184
  n + "." + s,
185
185
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
186
- w(t, "function", !1) ? r() : r
186
+ g(t, "function", !1) ? r() : r
187
187
  ), !1;
188
188
  }
189
189
  // フレーム変数に設定
@@ -210,64 +210,62 @@ class u {
210
210
  const i = "const.sn.frm." + e;
211
211
  if (!this.val.getVal("tmp:" + i)) throw `frame【${e}】が読み込まれていません`;
212
212
  const n = s.style;
213
- if (w(t, "float", !1) ? n.zIndex = `${++this.#n}` : "index" in t ? n.zIndex = `${v(t, "index", 0)}` : t.dive && (n.zIndex = `-${++this.#n}`), "alpha" in t) {
213
+ if (g(t, "float", !1) ? n.zIndex = `${++this.#n}` : "index" in t ? n.zIndex = `${x(t, "index", 0)}` : t.dive && (n.zIndex = `-${++this.#n}`), "alpha" in t) {
214
214
  const r = n.opacity = String(t.alpha);
215
215
  this.val.setVal_Nochk("tmp", i + ".alpha", r);
216
216
  }
217
217
  const o = this.#b(t);
218
- if (("x" in t || "y" in t) && (n.left = `${u.#t.ofsLeft4elm + o.x * u.#t.cvsScale}px`, n.top = `${u.#t.ofsTop4elm + o.y * u.#t.cvsScale}px`, this.val.setVal_Nochk("tmp", i + ".x", o.x), this.val.setVal_Nochk("tmp", i + ".y", o.y)), "scale_x" in t || "scale_y" in t || "rotate" in t) {
219
- const r = v(t, "scale_x", 1), l = v(t, "scale_y", 1), f = v(t, "rotate", 0);
220
- n.transform = `scale(${r}, ${l}) rotate(${f}deg)`, this.val.setVal_Nochk("tmp", i + ".scale_x", r), this.val.setVal_Nochk("tmp", i + ".scale_y", l), this.val.setVal_Nochk("tmp", i + ".rotate", f);
218
+ if (("x" in t || "y" in t) && (n.left = `${p.#t.ofsLeft4elm + o.x * p.#t.cvsScale}px`, n.top = `${p.#t.ofsTop4elm + o.y * p.#t.cvsScale}px`, this.val.setVal_Nochk("tmp", i + ".x", o.x), this.val.setVal_Nochk("tmp", i + ".y", o.y)), "scale_x" in t || "scale_y" in t || "rotate" in t) {
219
+ const r = x(t, "scale_x", 1), c = x(t, "scale_y", 1), h = x(t, "rotate", 0);
220
+ n.transform = `scale(${r}, ${c}) rotate(${h}deg)`, this.val.setVal_Nochk("tmp", i + ".scale_x", r), this.val.setVal_Nochk("tmp", i + ".scale_y", c), this.val.setVal_Nochk("tmp", i + ".rotate", h);
221
221
  }
222
- if ("width" in t && (s.width = String(o.width * u.#t.cvsScale), this.val.setVal_Nochk("tmp", i + ".width", o.width)), "height" in t && (s.height = String(o.height * u.#t.cvsScale), this.val.setVal_Nochk("tmp", i + ".height", o.height)), "visible" in t) {
223
- const r = w(t, "visible", !0);
222
+ if ("width" in t && (s.width = String(o.width * p.#t.cvsScale), this.val.setVal_Nochk("tmp", i + ".width", o.width)), "height" in t && (s.height = String(o.height * p.#t.cvsScale), this.val.setVal_Nochk("tmp", i + ".height", o.height)), "visible" in t) {
223
+ const r = g(t, "visible", !0);
224
224
  n.display = r ? "inline" : "none", this.val.setVal_Nochk("tmp", i + ".visible", r);
225
225
  }
226
226
  if ("b_color" in t && (n.backgroundColor = t.b_color), "disabled" in t) {
227
- const r = this.#y[e] = w(t, "disabled", !0), l = s.contentDocument.body;
228
- for (const f of [
229
- ...Array.from(l.getElementsByTagName("input")),
230
- ...Array.from(l.getElementsByTagName("select"))
231
- ]) f.disabled = r;
227
+ const r = this.#y[e] = g(t, "disabled", !0), c = s.contentDocument.body;
228
+ for (const h of [
229
+ ...Array.from(c.getElementsByTagName("input")),
230
+ ...Array.from(c.getElementsByTagName("select"))
231
+ ]) h.disabled = r;
232
232
  }
233
233
  return !1;
234
234
  }
235
235
  // フレームをトゥイーン開始
236
236
  #w(t) {
237
- const { id: e, alpha: s, x: i, y: n, scale_x: o, scale_y: r, rotate: l, width: f, height: d } = t;
237
+ const { id: e, alpha: s, x: i, y: n, scale_x: o, scale_y: r, rotate: c, width: h, height: f } = t;
238
238
  if (!e) throw "idは必須です";
239
- const h = document.getElementById(e);
240
- if (!h) throw `id【${e}】はフレームではありません`;
241
- const p = "const.sn.frm." + e;
242
- if (!this.val.getVal(`tmp:${p}`, 0)) throw `frame【${e}】が読み込まれていません`;
243
- const c = {};
244
- s && (c.a = Number(h.style.opacity)), (i || n || o || r || l) && (c.x = Number(this.val.getVal(`tmp:${p}.x`)), c.y = Number(this.val.getVal(`tmp:${p}.y`)), c.sx = Number(this.val.getVal(`tmp:${p}.scale_x`)), c.sy = Number(this.val.getVal(`tmp:${p}.scale_y`)), c.r = Number(this.val.getVal(`tmp:${p}.rotate`))), f && (c.w = Number(this.val.getVal(`tmp:${p}.width`))), d && (c.h = Number(this.val.getVal(`tmp:${p}.height`)));
245
- const a = _.cnvTweenArg(t, c);
246
- let y = () => {
239
+ const l = document.getElementById(e);
240
+ if (!l) throw `id【${e}】はフレームではありません`;
241
+ const d = "const.sn.frm." + e;
242
+ if (!this.val.getVal(`tmp:${d}`, 0)) throw `frame【${e}】が読み込まれていません`;
243
+ const u = {};
244
+ s && (u.a = Number(l.style.opacity)), (i || n || o || r || c) && (u.x = Number(this.val.getVal(`tmp:${d}.x`)), u.y = Number(this.val.getVal(`tmp:${d}.y`)), u.sx = Number(this.val.getVal(`tmp:${d}.scale_x`)), u.sy = Number(this.val.getVal(`tmp:${d}.scale_y`)), u.r = Number(this.val.getVal(`tmp:${d}.rotate`))), h && (u.w = Number(this.val.getVal(`tmp:${d}.width`))), f && (u.h = Number(this.val.getVal(`tmp:${d}.height`)));
245
+ const a = w.cnvTweenArg(t, u);
246
+ let b = (m) => {
247
247
  };
248
- s && (v(a, "alpha", 0), y = () => {
249
- h.style.opacity = String(c.a), this.val.setVal_Nochk("tmp", "alpha", c.a);
248
+ s && (x(a, "alpha", 0), b = (m) => {
249
+ l.style.opacity = String(m.a), this.val.setVal_Nochk("tmp", "alpha", m.a);
250
250
  });
251
- let x = () => {
251
+ let k = (m) => {
252
252
  };
253
- const b = this.#b(a);
254
- (i || n || o || r || l) && (b.x, b.y, v(a, "scale_x", 1), v(a, "scale_y", 1), v(a, "rotate", 0), x = () => {
255
- h.style.left = `${// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
256
- u.#t.ofsLeft4elm + c.x * u.#t.cvsScale} px`, h.style.top = `${// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
257
- u.#t.ofsTop4elm + c.y * u.#t.cvsScale} px`, h.style.transform = `scale(${c.sx}, ${c.sy}) rotate(${c.r}deg)`, this.val.setVal_Nochk("tmp", p + ".x", c.x), this.val.setVal_Nochk("tmp", p + ".y", c.y), this.val.setVal_Nochk("tmp", p + ".scale_x", c.sx), this.val.setVal_Nochk("tmp", p + ".scale_y", c.sy), this.val.setVal_Nochk("tmp", p + ".rotate", c.r);
253
+ const v = this.#b(a);
254
+ (i || n || o || r || c) && (v.x, v.y, x(a, "scale_x", 1), x(a, "scale_y", 1), x(a, "rotate", 0), k = (m) => {
255
+ l.style.left = `${p.#t.ofsLeft4elm + m.x * p.#t.cvsScale} px`, l.style.top = `${p.#t.ofsTop4elm + m.y * p.#t.cvsScale} px`, l.style.transform = `scale(${m.sx}, ${m.sy}) rotate(${m.r}deg)`, this.val.setVal_Nochk("tmp", d + ".x", m.x), this.val.setVal_Nochk("tmp", d + ".y", m.y), this.val.setVal_Nochk("tmp", d + ".scale_x", m.sx), this.val.setVal_Nochk("tmp", d + ".scale_y", m.sy), this.val.setVal_Nochk("tmp", d + ".rotate", m.r);
258
256
  });
259
- let g = () => {
257
+ let C = (m) => {
260
258
  };
261
- f && (b.width, g = () => {
262
- h.width = `${c.w * u.#t.cvsScale} px`, this.val.setVal_Nochk("tmp", p + ".width", c.w);
259
+ h && (v.width, C = (m) => {
260
+ l.width = `${m.w * p.#t.cvsScale} px`, this.val.setVal_Nochk("tmp", d + ".width", m.w);
263
261
  });
264
- let S = () => {
262
+ let V = (m) => {
265
263
  };
266
- return d && (b.height, S = () => {
267
- h.height = `${c.h * u.#t.cvsScale} px`, this.val.setVal_Nochk("tmp", p + ".height", c.h);
268
- }), this.appPixi.stage.interactive = !1, _.tween(`frm
269
- ${e}`, t, c, _.cnvTweenArg(t, c), () => {
270
- y(), x(), g(), S();
264
+ return f && (v.height, V = (m) => {
265
+ l.height = `${m.h * p.#t.cvsScale} px`, this.val.setVal_Nochk("tmp", d + ".height", m.h);
266
+ }), this.appPixi.stage.interactive = !1, w.tween(`frm
267
+ ${e}`, t, u, w.cnvTweenArg(t, u), (m) => {
268
+ b(m), k(m), C(m), V(m);
271
269
  }, () => {
272
270
  this.appPixi.stage.interactive = !0;
273
271
  }, () => {
@@ -335,46 +333,46 @@ class lt {
335
333
  this.#t = JSON.parse(String(this.val.getVal("save:const.sn.sLog"))), this.#e = { text: "" };
336
334
  }
337
335
  }
338
- function V(O) {
339
- return encodeURIComponent(JSON.stringify(O));
336
+ function L(j) {
337
+ return encodeURIComponent(JSON.stringify(j));
340
338
  }
341
339
  class Z {
342
340
  //MARK: コンストラクタ
343
- constructor(t, e, s, i, n, o, r, l, f) {
341
+ constructor(t, e, s, i, n, o, r, c, h) {
344
342
  this.cfg = t, this.hTag = e, this.appPixi = s, this.val = i, this.main = n, this.scrItr = o, this.sys = r;
345
- const d = () => {
343
+ const f = () => {
346
344
  if (r.cvsResize(), this.cvsResizeDesign(), this.#_) for (const a of this.#r)
347
345
  this.#s[a].fore.cvsResizeChildren();
348
346
  else for (const a of this.#r)
349
347
  this.#s[a].fore.cvsResize();
350
348
  this.#o.cvsResize(), this.#d.cvsResize();
351
349
  };
352
- if (k.isMobile)
353
- this.#k.add(globalThis, "orientationchange", d, { passive: !0 });
350
+ if (_.isMobile)
351
+ this.#k.add(globalThis, "orientationchange", f, { passive: !0 });
354
352
  else {
355
353
  let a;
356
354
  this.#k.add(globalThis, "resize", () => {
357
355
  a || (a = setTimeout(() => {
358
- a = void 0, d();
356
+ a = void 0, f();
359
357
  }, 1e3 / 60 * 10));
360
358
  }, { passive: !0 });
361
359
  }
362
- r.cvsResize(), this.#l = new lt(this.cfg.oCfg, e, i), $.init(t, e, i, this.#l, (a) => this.#s[a.layname].fore === a, s), X.init(n, t, s, r, l, i), u.init(t, r, n), this.#o = new u(e, s, i), e.loadplugin = (a) => this.#O(a), e.snapshot = (a) => this.#S(a), this.#w = this.sys.isApp ? (a, y, x, b, g) => this.#B(a, y, x, b, g) : (a, y, x, b, g) => this.#W(a, y, x, b, g), e.add_lay = (a) => this.#j(a), e.clear_lay = (a) => this.#H(a), e.finish_trans = () => !1, e.lay = (a) => this.#z(a), e.trans = (a) => this.#G(a), e.wt = (a) => _.wt(a), e.quake = (a) => this.#q(a), e.stop_quake = e.finish_trans, e.wq = e.wt, e.pause_tsy = (a) => _.pause_tsy(a), e.resume_tsy = (a) => _.resume_tsy(a), e.stop_tsy = (a) => _.stop_tsy(a), e.tsy = (a) => this.#J(a), e.wait_tsy = (a) => _.wait_tsy(a), e.add_filter = (a) => this.#X(a), e.clear_filter = (a) => this.#Y(a), e.enable_filter = (a) => this.#K(a), e.ch = (a) => this.#I(a), e.clear_text = (a) => this.#M(a), e.current = (a) => this.#D(a), e.endlink = (a) => this.#A(a), e.er = (a) => this.#tt(a), e.graph = (a) => this.#et(a), e.link = (a) => this.#st(a), e.r = (a) => this.#it(a), e.ruby2 = (a) => this.#at(a), e.span = (a) => this.#nt(a), e.tcy = (a) => this.#rt(a), e.add_face = (a) => I.add_face(a), e.wv = (a) => I.wv(a), e.dump_lay = (a) => this.#ot(a), e.enable_event = (a) => this.#ct(a), e.button = (a) => this.#lt(a), t.existsBreakline && (this.breakLine = (a) => {
363
- delete a.visible, a.id = "break", a.pic = "breakline", this.#n("grp|" + V(a));
360
+ r.cvsResize(), this.#l = new lt(this.cfg.oCfg, e, i), N.init(t, e, i, this.#l, (a) => this.#s[a.layname].fore === a, s), X.init(n, t, s, r, c, i), p.init(t, r, n), this.#o = new p(e, s, i), e.loadplugin = (a) => this.#O(a), e.snapshot = (a) => this.#S(a), this.#w = this.sys.isApp ? (a, b, k, v, C) => this.#B(a, b, k, v, C) : (a, b, k, v, C) => this.#W(a, b, k, v, C), e.add_lay = (a) => this.#j(a), e.clear_lay = (a) => this.#H(a), e.finish_trans = () => !1, e.lay = (a) => this.#z(a), e.trans = (a) => this.#G(a), e.wt = (a) => w.wt(a), e.quake = (a) => this.#q(a), e.stop_quake = e.finish_trans, e.wq = e.wt, e.pause_tsy = (a) => w.pause_tsy(a), e.resume_tsy = (a) => w.resume_tsy(a), e.stop_tsy = (a) => w.stop_tsy(a), e.tsy = (a) => this.#J(a), e.wait_tsy = (a) => w.wait_tsy(a), e.add_filter = (a) => this.#X(a), e.clear_filter = (a) => this.#Y(a), e.enable_filter = (a) => this.#K(a), e.ch = (a) => this.#I(a), e.clear_text = (a) => this.#M(a), e.current = (a) => this.#D(a), e.endlink = (a) => this.#A(a), e.er = (a) => this.#tt(a), e.graph = (a) => this.#et(a), e.link = (a) => this.#st(a), e.r = (a) => this.#it(a), e.ruby2 = (a) => this.#at(a), e.span = (a) => this.#nt(a), e.tcy = (a) => this.#rt(a), e.add_face = (a) => E.add_face(a), e.wv = (a) => E.wv(a), e.dump_lay = (a) => this.#ot(a), e.enable_event = (a) => this.#ct(a), e.button = (a) => this.#lt(a), t.existsBreakline && (this.breakLine = (a) => {
361
+ delete a.visible, a.id = "break", a.pic = "breakline", this.#n("grp|" + L(a));
364
362
  }), t.existsBreakpage && (this.breakPage = (a) => {
365
- delete a.visible, a.id = "break", a.pic = "breakpage", this.#n("grp|" + V(a));
363
+ delete a.visible, a.id = "break", a.pic = "breakpage", this.#n("grp|" + L(a));
366
364
  }), this.#c = M(String(t.oCfg.init.bg_color));
367
- const h = new G();
368
- h.beginFill(this.#c).lineStyle(0, this.#c).drawRect(0, 0, k.stageW, k.stageH).endFill(), this.#t.addChild(h.clone()), this.#i.addChild(h), this.#i.visible = !1, this.#t.name = "page:A", this.#i.name = "page:B", this.#e = s.stage, this.#e.addChild(this.#i), this.#e.addChild(this.#t), this.#e.addChild(this.#T), this.#e.addChild(this.#a), this.#e.name = "stage";
369
- const p = (a, y) => {
370
- this.#N(Number(y));
365
+ const l = new G();
366
+ l.beginFill(this.#c).lineStyle(0, this.#c).drawRect(0, 0, _.stageW, _.stageH).endFill(), this.#t.addChild(l.clone()), this.#i.addChild(l), this.#i.visible = !1, this.#t.name = "page:A", this.#i.name = "page:B", this.#e = s.stage, this.#e.addChild(this.#i), this.#e.addChild(this.#t), this.#e.addChild(this.#T), this.#e.addChild(this.#a), this.#e.name = "stage";
367
+ const d = (a, b) => {
368
+ this.#N(Number(b));
371
369
  };
372
- p("", i.getVal("sys:TextLayer.Back.Alpha", 1)), i.defValTrg("sys:TextLayer.Back.Alpha", p);
373
- const c = (a, y) => {
374
- Q.fontFamily = y;
370
+ d("", i.getVal("sys:TextLayer.Back.Alpha", 1)), i.defValTrg("sys:TextLayer.Back.Alpha", d);
371
+ const u = (a, b) => {
372
+ Q.fontFamily = b;
375
373
  };
376
- c("", i.getVal("tmp:sn.button.fontFamily", Q.fontFamily)), i.defValTrg("tmp:sn.button.fontFamily", c), i.defTmp("const.sn.last_page_text", () => this.currentTxtlayFore?.pageText ?? ""), i.defTmp("const.sn.last_page_plain_text", () => this.currentTxtlayFore?.pagePlainText ?? ""), k.isDbg && (Y.init(s, r, o, f, t, this.#s), this.cvsResizeDesign = () => Y.cvsResizeDesign(), r.addHook((a, y) => {
377
- this.#y[a]?.(a, y) && delete this.#y[a];
374
+ u("", i.getVal("tmp:sn.button.fontFamily", Q.fontFamily)), i.defValTrg("tmp:sn.button.fontFamily", u), i.defTmp("const.sn.last_page_text", () => this.currentTxtlayFore?.pageText ?? ""), i.defTmp("const.sn.last_page_plain_text", () => this.currentTxtlayFore?.pagePlainText ?? ""), _.isDbg && (Y.init(s, r, o, h, t, this.#s), this.cvsResizeDesign = () => Y.cvsResizeDesign(), r.addHook((a, b) => {
375
+ this.#y[a]?.(a, b) && delete this.#y[a];
378
376
  }));
379
377
  }
380
378
  #e;
@@ -412,22 +410,22 @@ class Z {
412
410
  #f = void 0;
413
411
  cover(t, e = 0) {
414
412
  this.#f && (this.#e.removeChild(this.#f), this.#f.destroy(), this.#f = void 0), t && this.#e.addChild(
415
- (this.#f = new G()).beginFill(e).lineStyle(0, e).drawRect(0, 0, k.stageW, k.stageH).endFill()
413
+ (this.#f = new G()).beginFill(e).lineStyle(0, e).drawRect(0, 0, _.stageW, _.stageH).endFill()
416
414
  );
417
415
  }
418
416
  #d;
419
417
  setEvtMng(t) {
420
- this.#d = t, this.#o.setEvtMng(t), I.setEvtMng(t), _.init(t, this.appPixi);
418
+ this.#d = t, this.#o.setEvtMng(t), E.setEvtMng(t), w.init(t, this.appPixi);
421
419
  }
422
420
  destroy() {
423
421
  for (const t of Object.values(this.#s)) t.destroy();
424
- this.#k.clear(), X.destroy(), ot.destroy(), rt.destroy(), $.destroy(), this.#o.destroy(), _.destroy(), $.msecChWait = 10;
422
+ this.#k.clear(), X.destroy(), ot.destroy(), rt.destroy(), N.destroy(), this.#o.destroy(), w.destroy(), N.msecChWait = 10;
425
423
  }
426
424
  // 既存の全文字レイヤの実際のバック不透明度、を再計算
427
425
  #N(t) {
428
426
  for (const e of this.#r) {
429
427
  const { fore: s, back: i } = this.#s[e];
430
- s instanceof $ && (s.chgBackAlpha(t), i.chgBackAlpha(t));
428
+ s instanceof N && (s.chgBackAlpha(t), i.chgBackAlpha(t));
431
429
  }
432
430
  }
433
431
  #n = (t, e = this.currentTxtlayForeNeedErr, s = !0) => e.tagCh("|&emsp;《" + t + "》");
@@ -444,54 +442,54 @@ class Z {
444
442
  this.currentTxtlayFore && (this.clearBreak = () => this.#n("del|break"), this.clearBreak());
445
443
  }
446
444
  clickTxtLay() {
447
- return this.currentTxtlayFore ? this.#r.map((t) => this.#s[t].fore).some((t) => t instanceof $ && t.click()) : !1;
445
+ return this.currentTxtlayFore ? this.#r.map((t) => this.#s[t].fore).some((t) => t instanceof N && t.click()) : !1;
448
446
  }
449
447
  // // システム
450
448
  //MARK: スナップショット
451
449
  #S(t) {
452
- const e = tt("-", "_", "", "_"), s = t.fn ? t.fn.startsWith(ct) ? t.fn : `${K + t.fn + e}.png` : `${K}snapshot${e}.png`, i = this.cfg.searchPath(s), n = v(t, "width", k.stageW), o = v(t, "height", k.stageH);
450
+ const e = tt("-", "_", "", "_"), s = t.fn ? t.fn.startsWith(ct) ? t.fn : `${K + t.fn + e}.png` : `${K}snapshot${e}.png`, i = this.cfg.searchPath(s), n = x(t, "width", _.stageW), o = x(t, "height", _.stageH);
453
451
  return this.#w(t, i, n, o, `snapshot dt:${e}`);
454
452
  }
455
453
  #w = () => !1;
456
454
  #B({ layer: t }, e, s, i, n) {
457
- if (this.#o.hideAllFrame(), C.beginProc(n), !t)
455
+ if (this.#o.hideAllFrame(), $.beginProc(n), !t)
458
456
  return this.sys.capturePage(e, s, i, () => {
459
- this.#o.restoreAllFrame(), C.endProc(n);
457
+ this.#o.restoreAllFrame(), $.endProc(n);
460
458
  }), !0;
461
459
  const o = this.#r.map((r) => {
462
- const { ctn: l } = this.#s[r].fore, f = [l, l.visible];
463
- return l.visible = !1, f;
460
+ const { ctn: c } = this.#s[r].fore, h = [c, c.visible];
461
+ return c.visible = !1, h;
464
462
  });
465
463
  for (const r of this.#p(t)) this.#s[r].fore.ctn.visible = !0;
466
464
  return this.sys.capturePage(e, s, i, () => {
467
- for (const [r, l] of o) r.visible = l;
468
- this.#o.restoreAllFrame(), C.endProc(n);
465
+ for (const [r, c] of o) r.visible = c;
466
+ this.#o.restoreAllFrame(), $.endProc(n);
469
467
  }), !0;
470
468
  }
471
469
  #W(t, e, s, i, n) {
472
- C.beginProc(n);
470
+ $.beginProc(n);
473
471
  const o = et(t, "b_color", this.#c), r = st({
474
472
  width: s,
475
473
  height: i,
476
474
  backgroundAlpha: o > 16777216 && e.endsWith(".png") ? 0 : 1,
477
- antialias: w(t, "smoothing", !1),
475
+ antialias: g(t, "smoothing", !1),
478
476
  preserveDrawingBuffer: !0,
479
477
  backgroundColor: o & 16777215,
480
478
  autoDensity: !0
481
- }), l = t.page !== "back" ? "fore" : "back", { layer: f } = t;
479
+ }), c = t.page !== "back" ? "fore" : "back", { layer: h } = t;
482
480
  return Promise.allSettled(
483
- this.#p(f).map((d) => new Promise(
484
- (h) => this.#s[d][l].snapshot(r, h)
481
+ this.#p(h).map((f) => new Promise(
482
+ (l) => this.#s[f][c].snapshot(r, l)
485
483
  ))
486
484
  ).then(async () => {
487
- const d = B.create({ width: r.width, height: r.height });
488
- r.render(this.#e, { renderTexture: d }), await this.sys.savePic(
485
+ const f = W.create({ width: r.width, height: r.height });
486
+ r.render(this.#e, { renderTexture: f }), await this.sys.savePic(
489
487
  e,
490
488
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
491
- r.plugins.extract.base64(d)
492
- ), d.destroy();
493
- for (const h of this.#p(f)) this.#s[h][l].snapshot_end();
494
- r.destroy(!0), C.endProc(n);
489
+ r.plugins.extract.base64(f)
490
+ ), f.destroy();
491
+ for (const l of this.#p(h)) this.#s[l][c].snapshot_end();
492
+ r.destroy(!0), $.endProc(n);
495
493
  }), !0;
496
494
  }
497
495
  //MARK: プラグインの読み込み
@@ -499,11 +497,11 @@ class Z {
499
497
  const { fn: e } = t;
500
498
  if (!e) throw "fnは必須です";
501
499
  if (!e.endsWith(".css")) throw "サポートされない拡張子です";
502
- const s = w(t, "join", !0), i = C.procID + `loadplugin fn:${e}`;
503
- return s && C.beginProc(i), (async () => {
500
+ const s = g(t, "join", !0), i = $.procID + `loadplugin fn:${e}`;
501
+ return s && $.beginProc(i), (async () => {
504
502
  const n = await fetch(e);
505
503
  if (!n.ok) throw new Error("Network response was not ok.");
506
- it(await n.text()), s && C.endProc(i);
504
+ it(await n.text()), s && $.endProc(i);
507
505
  })(), s;
508
506
  }
509
507
  // // レイヤ共通
@@ -515,14 +513,14 @@ class Z {
515
513
  if (e in this.#s) throw `layer【${e}】はすでにあります`;
516
514
  if (!s) throw "clsは必須です";
517
515
  const i = { isWait: !1 };
518
- switch (this.#s[e] = new R(e, s, this.#t, this.#i, t, this.sys, this.val, i), this.#r.push(e), s) {
516
+ switch (this.#s[e] = new I(e, s, this.#t, this.#i, t, this.sys, this.val, i), this.#r.push(e), s) {
519
517
  case "txt":
520
518
  this.#v || (this.#$ = () => {
521
519
  }, this.#h = (n) => this.#Q(n), this.#D = (n) => this.#Z(n), this.hTag.current({ layer: e }), this.goTxt = () => {
522
- this.#d.isSkipping ? $.msecChWait = 0 : this.setNormalChWait();
520
+ this.#d.isSkipping ? N.msecChWait = 0 : this.setNormalChWait();
523
521
  for (const n of this.#r) {
524
522
  const o = this.#s[n].fore;
525
- o instanceof $ && this.#n("gotxt|", o, !1);
523
+ o instanceof N && this.#n("gotxt|", o, !1);
526
524
  }
527
525
  }), this.val.setVal_Nochk("save", "const.sn.layer." + e + ".enabled", !0);
528
526
  break;
@@ -543,18 +541,18 @@ class Z {
543
541
  #E = "";
544
542
  #z(t) {
545
543
  const e = this.#u(t), s = this.#s[e], i = s.back.ctn, n = s.fore.ctn;
546
- if (w(t, "float", !1))
544
+ if (g(t, "float", !1))
547
545
  this.#i.setChildIndex(i, this.#i.children.length - 1), this.#t.setChildIndex(n, this.#t.children.length - 1), this.#V();
548
546
  else if (t.index)
549
- v(t, "index", 0) && (this.#i.setChildIndex(i, t.index), this.#t.setChildIndex(n, t.index), this.#V());
547
+ x(t, "index", 0) && (this.#i.setChildIndex(i, t.index), this.#t.setChildIndex(n, t.index), this.#V());
550
548
  else if (t.dive) {
551
549
  const { dive: o } = t;
552
550
  let r = 0;
553
551
  if (e === o) throw "[lay] 属性 layerとdiveが同じ【" + o + "】です";
554
- const l = this.#s[o];
555
- if (!l) throw "[lay] 属性 dive【" + o + "】が不正です。レイヤーがありません";
556
- const f = l.back, d = l.fore, h = this.#i.getChildIndex(f.ctn), p = this.#t.getChildIndex(d.ctn);
557
- r = h < p ? h : p, r > this.#i.getChildIndex(i) && --r, this.#t.setChildIndex(n, r), this.#i.setChildIndex(i, r), this.#V();
552
+ const c = this.#s[o];
553
+ if (!c) throw "[lay] 属性 dive【" + o + "】が不正です。レイヤーがありません";
554
+ const h = c.back, f = c.fore, l = this.#i.getChildIndex(h.ctn), d = this.#t.getChildIndex(f.ctn);
555
+ r = l < d ? l : d, r > this.#i.getChildIndex(i) && --r, this.#t.setChildIndex(n, r), this.#i.setChildIndex(i, r), this.#V();
558
556
  }
559
557
  return t[":id_tag"] = s.fore.name.slice(0, -7), this.scrItr.recodeDesign(t), s.lay(t);
560
558
  }
@@ -616,92 +614,92 @@ void main() {
616
614
  ★GLSL : don't use "if"|Nobu note.com/nobuhirosaijo/n/n606a3f5d8e89
617
615
  > if文はあまり使わない方がいいらしい (処理負荷が高い)
618
616
  */
619
- #L = B.create({
620
- width: k.stageW,
621
- height: k.stageH
617
+ #L = W.create({
618
+ width: _.stageW,
619
+ height: _.stageH
622
620
  });
623
621
  #T = new q(this.#L);
624
- #g = B.create({
625
- width: k.stageW,
626
- height: k.stageH
622
+ #g = W.create({
623
+ width: _.stageW,
624
+ height: _.stageH
627
625
  });
628
626
  #a = new q(this.#g);
629
627
  //MARK: ページ裏表を交換
630
628
  #G(t) {
631
- const { layer: e } = t, s = /* @__PURE__ */ new Set(), i = this.#p(e).map((m) => (s.add(m), this.#s[m].fore)), n = () => {
629
+ const { layer: e } = t, s = /* @__PURE__ */ new Set(), i = this.#p(e).map((y) => (s.add(y), this.#s[y].fore)), n = () => {
632
630
  [this.#t, this.#i] = [this.#i, this.#t];
633
- const m = [];
634
- for (const [N, L] of Object.entries(this.#s)) {
635
- if (s.has(N)) {
636
- L.transPage(m);
631
+ const y = [];
632
+ for (const [S, T] of Object.entries(this.#s)) {
633
+ if (s.has(S)) {
634
+ T.transPage(y);
637
635
  continue;
638
636
  }
639
- const { fore: { ctn: T }, back: { ctn: E } } = L, z = this.#t.getChildIndex(E);
640
- this.#t.removeChild(E), this.#i.removeChild(T), this.#t.addChildAt(T, z), this.#i.addChildAt(E, z);
637
+ const { fore: { ctn: P }, back: { ctn: D } } = T, z = this.#t.getChildIndex(D);
638
+ this.#t.removeChild(D), this.#i.removeChild(P), this.#t.addChildAt(P, z), this.#i.addChildAt(D, z);
641
639
  }
642
- Promise.allSettled(m).then(() => {
643
- this.#t.visible = !0, this.#i.visible = !1, this.#T.visible = !1, this.#a.visible = !1, C.notifyEndProc(P);
640
+ Promise.allSettled(y).then(() => {
641
+ this.#t.visible = !0, this.#i.visible = !1, this.#T.visible = !1, this.#a.visible = !1, $.notifyEndProc(R);
644
642
  });
645
643
  };
646
- if (this.#a.filters = [], this.#a.alpha = 1, v(t, "time", 0) === 0 || this.#d.isSkipping)
644
+ if (this.#a.filters = [], this.#a.alpha = 1, x(t, "time", 0) === 0 || this.#d.isSkipping)
647
645
  return n(), !1;
648
- const r = [], l = this.#r.map((m) => {
649
- const { fore: N, back: L } = this.#s[m], T = s.has(m) ? L : N;
650
- return T.ctn.visible && r.push(T.ctn), T;
651
- }), { ticker: f, renderer: d } = this.appPixi;
652
- d.render(this.#i, { renderTexture: this.#L });
653
- let h = () => {
654
- for (const m of r) d.render(
655
- m,
646
+ const r = [], c = this.#r.map((y) => {
647
+ const { fore: S, back: T } = this.#s[y], P = s.has(y) ? T : S;
648
+ return P.ctn.visible && r.push(P.ctn), P;
649
+ }), { ticker: h, renderer: f } = this.appPixi;
650
+ f.render(this.#i, { renderTexture: this.#L });
651
+ let l = () => {
652
+ for (const y of r) f.render(
653
+ y,
656
654
  { renderTexture: this.#L, clear: !1 }
657
655
  );
658
656
  };
659
- if (!l.some((m) => m.containMovement)) {
660
- const m = h;
661
- h = () => {
662
- h = () => {
663
- }, m();
657
+ if (!c.some((y) => y.containMovement)) {
658
+ const y = l;
659
+ l = () => {
660
+ l = () => {
661
+ }, y();
664
662
  };
665
663
  }
666
- const p = () => d.render(this.#t, { renderTexture: this.#g });
667
- p();
668
- let c = () => {
669
- this.#t.visible = !0, p(), this.#t.visible = !1;
664
+ const d = () => f.render(this.#t, { renderTexture: this.#g });
665
+ d();
666
+ let u = () => {
667
+ this.#t.visible = !0, d(), this.#t.visible = !1;
670
668
  };
671
- if (!i.some((m) => m.containMovement)) {
672
- const m = c;
673
- c = () => {
674
- c = () => {
675
- }, m();
669
+ if (!i.some((y) => y.containMovement)) {
670
+ const y = u;
671
+ u = () => {
672
+ u = () => {
673
+ }, y();
676
674
  };
677
675
  }
678
676
  const a = () => {
679
- h(), this.#T.visible = !0, c(), this.#a.visible = !0;
680
- }, { glsl: y, rule: x } = t, b = () => {
681
- f.remove(a), n();
677
+ l(), this.#T.visible = !0, u(), this.#a.visible = !0;
678
+ }, { glsl: b, rule: k } = t, v = () => {
679
+ h.remove(a), n();
682
680
  };
683
- if (!y && !x)
684
- return _.tween(P, t, this.#a, { alpha: 0 }, () => {
685
- }, b, () => {
686
- }), f.add(a), !1;
687
- const g = {
681
+ if (!b && !k)
682
+ return w.tween(R, t, this.#a, { alpha: 0 }, () => {
683
+ }, v, () => {
684
+ }), h.add(a), !1;
685
+ const C = {
688
686
  rule: at.EMPTY,
689
- vague: v(t, "vague", 0.04),
687
+ vague: x(t, "vague", 0.04),
690
688
  tick: 0
691
689
  };
692
690
  this.#a.filters = [new nt(
693
691
  void 0,
694
- y ?? Z.#F,
695
- g
692
+ b ?? Z.#F,
693
+ C
696
694
  )];
697
- const S = _.tween(P, t, g, { tick: 1 }, () => {
698
- }, b, () => {
699
- }, !x);
700
- return x ? new I(x, void 0, (m) => {
701
- g.rule = m.texture, m.destroy(), S.start(), f.add(a);
702
- }, (m) => {
703
- m && this.main.resume();
704
- }).ret : (f.add(a), !1);
695
+ const V = w.tween(R, t, C, { tick: 1 }, () => {
696
+ }, v, () => {
697
+ }, !k);
698
+ return k ? new E(k, void 0, (y) => {
699
+ C.rule = y.texture, y.destroy(), V.start(), h.add(a);
700
+ }, (y) => {
701
+ y && this.main.resume();
702
+ }).ret : (h.add(a), !1);
705
703
  }
706
704
  #p(t = "") {
707
705
  return t ? t.split(",") : this.#r;
@@ -724,34 +722,34 @@ void main() {
724
722
  setAllStyle2TxtLay(t) {
725
723
  for (const e of this.#r) {
726
724
  const s = this.#s[e].fore;
727
- s instanceof $ && s.lay({ style: t });
725
+ s instanceof N && s.lay({ style: t });
728
726
  }
729
727
  }
730
728
  //MARK: 画面を揺らす
731
729
  #q(t) {
732
- if (v(t, "time", NaN) === 0) return !1;
733
- const e = this.#p(t.layer).map((d) => this.#s[d].fore.ctn), { renderer: s, ticker: i } = this.appPixi;
734
- this.#g.resize(k.stageW, k.stageH);
730
+ if (x(t, "time", NaN) === 0) return !1;
731
+ const e = this.#p(t.layer).map((f) => this.#s[f].fore.ctn), { renderer: s, ticker: i } = this.appPixi;
732
+ this.#g.resize(_.stageW, _.stageH);
735
733
  const n = () => {
736
734
  this.#t.visible = !0;
737
- for (const d of e) s.render(
738
- d,
735
+ for (const f of e) s.render(
736
+ f,
739
737
  { renderTexture: this.#g, clear: !1 }
740
738
  );
741
739
  this.#t.visible = !1;
742
740
  };
743
741
  this.#a.visible = !0, this.#a.alpha = 1;
744
- const o = W(v(t, "hmax", 10)), r = W(v(t, "vmax", 10)), l = o === 0 ? () => {
742
+ const o = O(x(t, "hmax", 10)), r = O(x(t, "vmax", 10)), c = o === 0 ? () => {
745
743
  } : () => {
746
744
  this.#a.x = Math.round(Math.random() * o * 2) - o;
747
- }, f = r === 0 ? () => {
745
+ }, h = r === 0 ? () => {
748
746
  } : () => {
749
747
  this.#a.y = Math.round(Math.random() * r * 2) - r;
750
748
  };
751
- return this.#a.filters = [], _.tween(P, t, this.#a, { x: 0, y: 0 }, () => {
752
- l(), f();
749
+ return this.#a.filters = [], w.tween(R, t, this.#a, { x: 0, y: 0 }, () => {
750
+ c(), h();
753
751
  }, () => {
754
- i.remove(n), this.#t.visible = !0, this.#a.visible = !1, this.#a.x = 0, this.#a.y = 0, C.notifyEndProc(P);
752
+ i.remove(n), this.#t.visible = !0, this.#a.visible = !1, this.#a.x = 0, this.#a.y = 0, $.notifyEndProc(R);
755
753
  }, () => {
756
754
  }), i.add(n), !1;
757
755
  }
@@ -763,10 +761,10 @@ void main() {
763
761
  let r = () => {
764
762
  };
765
763
  s && (this.#d.isSkipping ? o.renderStart(!0) : (o.renderStart(!1), r = () => o.renderEnd()));
766
- const l = _.cnvTweenArg(t, o), f = w(t, "arrive", !1), d = w(t, "backlay", !1), h = n.back.ctn;
767
- return _.tween(i ?? e, t, o, _.cnvTweenArg(t, o), () => {
764
+ const c = w.cnvTweenArg(t, o), h = g(t, "arrive", !1), f = g(t, "backlay", !1), l = n.back.ctn;
765
+ return w.tween(i ?? e, t, o, w.cnvTweenArg(t, o), () => {
768
766
  }, r, () => {
769
- if (f && Object.assign(o, l), d) for (const p of _.aLayerPrpNm) h[p] = o[p];
767
+ if (h && Object.assign(o, c), f) for (const d of w.aLayerPrpNm) l[d] = o[d];
770
768
  }), "filter" in t && (o.ctn.filters = [J.bldFilters(t)], o.aFltHArg = [t]), !1;
771
769
  }
772
770
  //MARK: フィルター追加
@@ -813,9 +811,9 @@ void main() {
813
811
  #R(t, e) {
814
812
  const s = t.ctn;
815
813
  if (!s.filters) throw "フィルターがありません";
816
- const i = W(v(e, "index", 0)), n = s.filters.length;
814
+ const i = O(x(e, "index", 0)), n = s.filters.length;
817
815
  if (n <= i) throw `フィルターの個数(${String(n)})を越えています`;
818
- t.aFltHArg[i].enabled = s.filters[i].enabled = w(e, "enabled", !0);
816
+ t.aFltHArg[i].enabled = s.filters[i].enabled = g(e, "enabled", !0);
819
817
  }
820
818
  // // 文字・文字レイヤ
821
819
  //MARK: 文字を追加する
@@ -823,8 +821,8 @@ void main() {
823
821
  const { text: e } = t;
824
822
  if (!e) throw "textは必須です";
825
823
  const s = this.#h(t);
826
- delete t.text, this.setNormalChWait(), this.#d.isSkipping ? t.wait = 0 : "wait" in t && v(t, "wait", NaN), this.#n("add|" + V(t), s);
827
- const i = w(t, "record", !0), n = this.val.doRecLog();
824
+ delete t.text, this.setNormalChWait(), this.#d.isSkipping ? t.wait = 0 : "wait" in t && x(t, "wait", NaN), this.#n("add|" + L(t), s);
825
+ const i = g(t, "record", !0), n = this.val.doRecLog();
828
826
  return i || this.val.setVal_Nochk("save", "sn.doRecLog", i), s.tagCh(e.replaceAll("[r]", `
829
827
  `)), this.val.setVal_Nochk("save", "sn.doRecLog", n), this.#n("add_close|", s), !1;
830
828
  }
@@ -833,11 +831,11 @@ void main() {
833
831
  };
834
832
  #Q(t) {
835
833
  const e = this.#u(t, this.#v), i = this.#s[e].getPage(t);
836
- if (!(i instanceof $)) throw e + "はTxtLayerではありません";
834
+ if (!(i instanceof N)) throw e + "はTxtLayerではありません";
837
835
  return i;
838
836
  }
839
837
  setNormalChWait() {
840
- $.msecChWait = this.scrItr.normalWait;
838
+ N.msecChWait = this.scrItr.normalWait;
841
839
  }
842
840
  //MARK: 操作対象のメッセージレイヤの指定
843
841
  #D = (t) => {
@@ -847,11 +845,11 @@ void main() {
847
845
  const { layer: e } = t;
848
846
  if (!e) throw "[current] layerは必須です";
849
847
  const s = this.#s[e];
850
- if (!s || !(s.getPage(t) instanceof $)) throw `${e}はTxtLayerではありません`;
848
+ if (!s || !(s.getPage(t) instanceof N)) throw `${e}はTxtLayerではありません`;
851
849
  this.#x = s, this.#l.pagebreak(), this.#v = e, this.val.setVal_Nochk("save", "const.sn.mesLayer", e);
852
850
  for (const i of this.#r) {
853
851
  const { fore: n, back: o } = this.#s[i];
854
- n instanceof $ && (n.isCur = o.isCur = i === e);
852
+ n instanceof N && (n.isCur = o.isCur = i === e);
855
853
  }
856
854
  return !1;
857
855
  }
@@ -886,17 +884,17 @@ void main() {
886
884
  }
887
885
  //MARK: ページ両面の文字消去
888
886
  #tt(t) {
889
- return w(t, "rec_page_break", !0) && this.#l.pagebreak(), this.#x && (this.#x.fore.clearLay(t), this.#x.back.clearLay(t)), !1;
887
+ return g(t, "rec_page_break", !0) && this.#l.pagebreak(), this.#x && (this.#x.fore.clearLay(t), this.#x.back.clearLay(t)), !1;
890
888
  }
891
889
  //MARK: インライン画像表示
892
890
  #et(t) {
893
891
  if (!t.pic) throw "[graph] picは必須です";
894
- return this.#n("grp|" + V(t), this.#h(t)), !1;
892
+ return this.#n("grp|" + L(t), this.#h(t)), !1;
895
893
  }
896
894
  //MARK: ハイパーリンク
897
895
  #st(t) {
898
896
  if (!t.fn && !t.label && !t.url) throw "fn,label,url いずれかは必須です";
899
- return t.fn ??= this.scrItr.scriptFn, t.style ??= "background-color: rgba(255,0,0,0.5);", t.style_hover ??= "background-color: rgba(255,0,0,0.9);", t.style_clicked ??= t.style, this.#n("link|" + V(t), this.#h(t)), !1;
897
+ return t.fn ??= this.scrItr.scriptFn, t.style ??= "background-color: rgba(255,0,0,0.5);", t.style_hover ??= "background-color: rgba(255,0,0,0.9);", t.style_clicked ??= t.style, this.#n("link|" + L(t), this.#h(t)), !1;
900
898
  }
901
899
  //MARK: 改行
902
900
  #it(t) {
@@ -912,12 +910,12 @@ void main() {
912
910
  }
913
911
  //MARK: インラインスタイル設定
914
912
  #nt(t) {
915
- return this.#n("span|" + V(t), this.#h(t)), !1;
913
+ return this.#n("span|" + L(t), this.#h(t)), !1;
916
914
  }
917
915
  //MARK: tcy縦中横を表示する
918
916
  #rt(t) {
919
917
  if (!t.t) throw "[tcy] tは必須です";
920
- return this.#n("tcy|" + V(t), this.#h(t)), !1;
918
+ return this.#n("tcy|" + L(t), this.#h(t)), !1;
921
919
  }
922
920
  //MARK: レイヤのダンプ
923
921
  #ot({ layer: t }) {
@@ -927,7 +925,7 @@ void main() {
927
925
  try {
928
926
  console.info(
929
927
  `%c${s.name.slice(0, -7)} %o`,
930
- `color:#${k.isDarkMode ? "49F" : "05A"};`,
928
+ `color:#${_.isDarkMode ? "49F" : "05A"};`,
931
929
  JSON.parse(`{"back":{${i.dump()}}, "fore":{${s.dump()}}}`)
932
930
  );
933
931
  } catch (n) {
@@ -938,12 +936,12 @@ void main() {
938
936
  }
939
937
  //MARK: イベント有無の切替
940
938
  #ct(t) {
941
- const e = this.#u(t, this.#v), s = w(t, "enabled", !0);
939
+ const e = this.#u(t, this.#v), s = g(t, "enabled", !0);
942
940
  return this.#h(t).enabled = s, this.val.setVal_Nochk("save", "const.sn.layer." + e + ".enabled", s), !1;
943
941
  }
944
942
  //MARK: ボタンを表示
945
943
  #lt(t) {
946
- return R.argChk_page(t, "back"), t.fn ??= this.scrItr.scriptFn, this.#h(t).addButton(t), this.scrItr.recodeDesign(t), !1;
944
+ return I.argChk_page(t, "back"), t.fn ??= this.scrItr.scriptFn, this.#h(t).addButton(t), this.scrItr.recodeDesign(t), !1;
947
945
  }
948
946
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
949
947
  record() {
@@ -961,18 +959,18 @@ void main() {
961
959
  playback(t) {
962
960
  this.#l.playback();
963
961
  const e = [], s = [];
964
- for (const [n, { fore: o, fore: { idx: r }, back: l, cls: f }] of Object.entries(t)) {
962
+ for (const [n, { fore: o, fore: { idx: r }, back: c, cls: h }] of Object.entries(t)) {
965
963
  s.push({ ln: n, idx: r });
966
- const d = this.#s[n] ??= new R(n, f, this.#t, this.#i, {}, this.sys, this.val, { isWait: !1 });
967
- d.fore.playback(o, e), d.back.playback(l, e);
964
+ const f = this.#s[n] ??= new I(n, h, this.#t, this.#i, {}, this.sys, this.val, { isWait: !1 });
965
+ f.fore.playback(o, e), f.back.playback(c, e);
968
966
  }
969
967
  const i = this.#t.children.length;
970
968
  return e.push(new Promise((n) => {
971
- for (const { ln: o, idx: r } of s.sort(({ idx: l }, { idx: f }) => l === f ? 0 : l < f ? -1 : 1)) {
972
- const l = this.#s[o];
973
- if (!l) continue;
974
- const f = i > r ? r : i - 1, { fore: d, back: h } = l;
975
- this.#t.setChildIndex(d.ctn, f), this.#i.setChildIndex(h.ctn, f);
969
+ for (const { ln: o, idx: r } of s.sort(({ idx: c }, { idx: h }) => c === h ? 0 : c < h ? -1 : 1)) {
970
+ const c = this.#s[o];
971
+ if (!c) continue;
972
+ const h = i > r ? r : i - 1, { fore: f, back: l } = c;
973
+ this.#t.setChildIndex(f.ctn, h), this.#i.setChildIndex(l.ctn, h);
976
974
  }
977
975
  n();
978
976
  })), e;