@famibee/skynovel 1.65.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/README.md +3 -3
  2. package/dist/Button.js +131 -163
  3. package/dist/Button.js.map +1 -1
  4. package/dist/CallStack.js +19 -22
  5. package/dist/CallStack.js.map +1 -1
  6. package/dist/CmnInterface.js +91 -0
  7. package/dist/CmnInterface.js.map +1 -0
  8. package/dist/CmnLib.js +94 -0
  9. package/dist/CmnLib.js.map +1 -0
  10. package/dist/Config.js +26 -0
  11. package/dist/Config.js.map +1 -0
  12. package/dist/ConfigBase.js +152 -0
  13. package/dist/ConfigBase.js.map +1 -0
  14. package/dist/DebugMng.js +89 -102
  15. package/dist/DebugMng.js.map +1 -1
  16. package/dist/EventListenerCtn.js +21 -0
  17. package/dist/EventListenerCtn.js.map +1 -0
  18. package/dist/EventMng.js +1435 -1577
  19. package/dist/EventMng.js.map +1 -1
  20. package/dist/Grammar.js +194 -0
  21. package/dist/Grammar.js.map +1 -0
  22. package/dist/GrpLayer.js +163 -195
  23. package/dist/GrpLayer.js.map +1 -1
  24. package/dist/Layer.js +260 -0
  25. package/dist/Layer.js.map +1 -0
  26. package/dist/LayerMng.js +810 -991
  27. package/dist/LayerMng.js.map +1 -1
  28. package/dist/Main.js +144 -393
  29. package/dist/Main.js.map +1 -1
  30. package/dist/PropParser.js +936 -834
  31. package/dist/PropParser.js.map +1 -1
  32. package/dist/Reading.js +918 -786
  33. package/dist/Reading.js.map +1 -1
  34. package/dist/RubySpliter.js +59 -92
  35. package/dist/RubySpliter.js.map +1 -1
  36. package/dist/ScriptIterator.js +805 -1034
  37. package/dist/ScriptIterator.js.map +1 -1
  38. package/dist/SndBuf.js +1097 -1332
  39. package/dist/SndBuf.js.map +1 -1
  40. package/dist/SoundMng.js +124 -135
  41. package/dist/SoundMng.js.map +1 -1
  42. package/dist/SpritesMng.js +220 -232
  43. package/dist/SpritesMng.js.map +1 -1
  44. package/dist/SysBase.js +1729 -0
  45. package/dist/SysBase.js.map +1 -0
  46. package/dist/TxtLayer.js +1212 -1397
  47. package/dist/TxtLayer.js.map +1 -1
  48. package/dist/Variable.js +398 -466
  49. package/dist/Variable.js.map +1 -1
  50. package/dist/chunk.js +18 -0
  51. package/dist/gamepad.js +723 -511
  52. package/dist/gamepad.js.map +1 -1
  53. package/dist/pixi.js +13422 -0
  54. package/dist/pixi.js.map +1 -0
  55. package/dist/platform.js +424 -369
  56. package/dist/platform.js.map +1 -1
  57. package/dist/sn/AnalyzeTagArg.d.ts +1 -1
  58. package/dist/sn/AnalyzeTagArg.d.ts.map +1 -1
  59. package/dist/sn/CmnInterface.d.ts +3 -1
  60. package/dist/sn/CmnInterface.d.ts.map +1 -1
  61. package/dist/sn/CmnLib.d.ts.map +1 -1
  62. package/dist/sn/CmnTween.d.ts +3 -3
  63. package/dist/sn/CmnTween.d.ts.map +1 -1
  64. package/dist/sn/EventMng.d.ts.map +1 -1
  65. package/dist/sn/Grammar.d.ts +1 -1
  66. package/dist/sn/Grammar.d.ts.map +1 -1
  67. package/dist/sn/PropParser.d.ts +2 -2
  68. package/dist/sn/PropParser.d.ts.map +1 -1
  69. package/dist/sn/Reading.d.ts +6 -0
  70. package/dist/sn/Reading.d.ts.map +1 -1
  71. package/dist/sn/ScriptIterator.d.ts.map +1 -1
  72. package/dist/sn/SndBuf.d.ts +27 -16
  73. package/dist/sn/SndBuf.d.ts.map +1 -1
  74. package/dist/sn/SoundMng.d.ts +4 -1
  75. package/dist/sn/SoundMng.d.ts.map +1 -1
  76. package/dist/sn/SysBase.d.ts.map +1 -1
  77. package/dist/sn/TxtStage.d.ts +2 -1
  78. package/dist/sn/TxtStage.d.ts.map +1 -1
  79. package/dist/test/ValTest.d.ts +1 -1
  80. package/dist/test/ValTest.d.ts.map +1 -1
  81. package/dist/web.js +653 -8
  82. package/dist/web.js.map +1 -1
  83. package/dist_app/Button.js +131 -163
  84. package/dist_app/Button.js.map +1 -1
  85. package/dist_app/CallStack.js +19 -22
  86. package/dist_app/CallStack.js.map +1 -1
  87. package/dist_app/CmnInterface.js +91 -0
  88. package/dist_app/CmnInterface.js.map +1 -0
  89. package/dist_app/CmnLib.js +94 -0
  90. package/dist_app/CmnLib.js.map +1 -0
  91. package/dist_app/Config.js +26 -0
  92. package/dist_app/Config.js.map +1 -0
  93. package/dist_app/ConfigBase.js +152 -0
  94. package/dist_app/ConfigBase.js.map +1 -0
  95. package/dist_app/DebugMng.js +92 -0
  96. package/dist_app/DebugMng.js.map +1 -0
  97. package/dist_app/EventListenerCtn.js +21 -0
  98. package/dist_app/EventListenerCtn.js.map +1 -0
  99. package/dist_app/EventMng.js +1435 -1577
  100. package/dist_app/EventMng.js.map +1 -1
  101. package/dist_app/Grammar.js +194 -0
  102. package/dist_app/Grammar.js.map +1 -0
  103. package/dist_app/GrpLayer.js +163 -195
  104. package/dist_app/GrpLayer.js.map +1 -1
  105. package/dist_app/Layer.js +260 -0
  106. package/dist_app/Layer.js.map +1 -0
  107. package/dist_app/LayerMng.js +810 -991
  108. package/dist_app/LayerMng.js.map +1 -1
  109. package/dist_app/Main.js +144 -392
  110. package/dist_app/Main.js.map +1 -1
  111. package/dist_app/PropParser.js +936 -834
  112. package/dist_app/PropParser.js.map +1 -1
  113. package/dist_app/Reading.js +918 -786
  114. package/dist_app/Reading.js.map +1 -1
  115. package/dist_app/RubySpliter.js +59 -92
  116. package/dist_app/RubySpliter.js.map +1 -1
  117. package/dist_app/ScriptIterator.js +805 -1033
  118. package/dist_app/ScriptIterator.js.map +1 -1
  119. package/dist_app/SndBuf.js +1097 -1332
  120. package/dist_app/SndBuf.js.map +1 -1
  121. package/dist_app/SoundMng.js +124 -135
  122. package/dist_app/SoundMng.js.map +1 -1
  123. package/dist_app/SpritesMng.js +220 -231
  124. package/dist_app/SpritesMng.js.map +1 -1
  125. package/dist_app/SysBase.js +1729 -0
  126. package/dist_app/SysBase.js.map +1 -0
  127. package/dist_app/TxtLayer.js +1212 -1396
  128. package/dist_app/TxtLayer.js.map +1 -1
  129. package/dist_app/Variable.js +398 -466
  130. package/dist_app/Variable.js.map +1 -1
  131. package/dist_app/app.js +211 -8
  132. package/dist_app/app.js.map +1 -1
  133. package/dist_app/appMain.js +20 -21
  134. package/dist_app/appMain.js.map +1 -1
  135. package/dist_app/chunk.js +18 -0
  136. package/dist_app/gamepad.js +723 -511
  137. package/dist_app/gamepad.js.map +1 -1
  138. package/dist_app/pixi.js +11181 -0
  139. package/dist_app/pixi.js.map +1 -0
  140. package/dist_app/platform.js +424 -369
  141. package/dist_app/platform.js.map +1 -1
  142. package/dist_app/preload.js +2 -2
  143. package/dist_app/preload.js.map +1 -1
  144. package/dist_app/sn/AnalyzeTagArg.d.ts +1 -1
  145. package/dist_app/sn/AnalyzeTagArg.d.ts.map +1 -1
  146. package/dist_app/sn/CmnInterface.d.ts +3 -1
  147. package/dist_app/sn/CmnInterface.d.ts.map +1 -1
  148. package/dist_app/sn/CmnLib.d.ts.map +1 -1
  149. package/dist_app/sn/CmnTween.d.ts +3 -3
  150. package/dist_app/sn/CmnTween.d.ts.map +1 -1
  151. package/dist_app/sn/EventMng.d.ts.map +1 -1
  152. package/dist_app/sn/Grammar.d.ts +1 -1
  153. package/dist_app/sn/Grammar.d.ts.map +1 -1
  154. package/dist_app/sn/PropParser.d.ts +2 -2
  155. package/dist_app/sn/PropParser.d.ts.map +1 -1
  156. package/dist_app/sn/Reading.d.ts +6 -0
  157. package/dist_app/sn/Reading.d.ts.map +1 -1
  158. package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
  159. package/dist_app/sn/SndBuf.d.ts +27 -16
  160. package/dist_app/sn/SndBuf.d.ts.map +1 -1
  161. package/dist_app/sn/SoundMng.d.ts +4 -1
  162. package/dist_app/sn/SoundMng.d.ts.map +1 -1
  163. package/dist_app/sn/SysBase.d.ts.map +1 -1
  164. package/dist_app/sn/TxtStage.d.ts +2 -1
  165. package/dist_app/sn/TxtStage.d.ts.map +1 -1
  166. package/dist_app/test/ValTest.d.ts +1 -1
  167. package/dist_app/test/ValTest.d.ts.map +1 -1
  168. package/package.json +23 -13
  169. package/dist/CmnTween.js +0 -1005
  170. package/dist/CmnTween.js.map +0 -1
  171. package/dist/web2.js +0 -21644
  172. package/dist/web2.js.map +0 -1
  173. package/dist_app/CmnTween.js +0 -1005
  174. package/dist_app/CmnTween.js.map +0 -1
  175. package/dist_app/app2.js +0 -18547
  176. package/dist_app/app2.js.map +0 -1
@@ -1,1593 +1,1451 @@
1
- import { E as se, o as ut, H as G, a as it, w as Ee, d as Te, I as Oe, J as ke, e as J, K as _e, S as Lt, M as Me } from "./app2.js";
2
- import { T as Se } from "./TxtLayer.js";
3
- import { Button as Jt } from "./Button.js";
4
- import { R as L, a as k } from "./CmnTween.js";
5
- class De {
6
- #e = [];
7
- #t = -1;
8
- #o = new se();
9
- constructor(t, e) {
10
- this.#l = e.isApp ? () => t.focus() : () => globalThis.focus();
11
- }
12
- destroy() {
13
- this.#e = [], this.#t = -1, this.#o.clear();
14
- }
15
- add(t, e, n) {
16
- if (this.#e.findIndex((o) => o.btn === t) >= 0) return;
17
- if (t instanceof ut) {
18
- t.on("pointerdown", () => {
19
- for (let o = this.#e.length - 1; o >= 0; --o)
20
- if (this.#e[o].btn === t) {
21
- this.#t = o;
22
- return;
23
- }
24
- this.#t = -1;
25
- }), this.#e.push({ btn: t, on: e, off: n });
26
- return;
27
- }
28
- this.#o.add(t, "focus", () => {
29
- for (let o = this.#e.length - 1; o >= 0; --o)
30
- if (this.#e[o].btn === t) {
31
- this.#t = o;
32
- return;
33
- }
34
- this.#t = -1;
35
- });
36
- let r = (o) => {
37
- }, s = t.localName === "button" || t.localName === "a" ? (o) => !o.isTrusted && o.key === "Enter" : (o) => o.key === "Enter";
38
- const l = t;
39
- switch (l.type ?? "") {
40
- // switch (btn.getAttribute('type') ?? '') { // textareaで''になる
41
- case "checkbox":
42
- r = () => {
43
- l.checked = !l.checked;
44
- };
45
- break;
46
- case "":
47
- t.querySelectorAll("input[type]").length > 0 && (r = (o) => this.#s(t, o.key), s = () => !1);
48
- break;
49
- case "range":
50
- r = (o) => {
51
- o.isTrusted || (o.key === "ArrowUp" ? l.stepUp() : l.stepDown());
52
- };
53
- break;
54
- case "text":
55
- case "textarea":
56
- r = (o) => {
57
- if (o.isTrusted) return;
58
- let a = (l.selectionStart ?? 0) + (o.key === "ArrowUp" ? -1 : 1);
59
- a < 0 && (a = 0), l.setSelectionRange(a, a);
60
- };
61
- break;
62
- }
63
- this.#o.add(t, G, (o) => {
64
- if (!(o.key !== "ArrowUp" && o.key !== "ArrowDown" && o.key !== "Enter")) {
65
- if (o.stopImmediatePropagation(), s(o)) {
66
- t.dispatchEvent(new MouseEvent("click"));
67
- return;
68
- }
69
- r(o);
70
- }
71
- }, { passive: !0 }), t.hasAttribute("tabindex") || (t.tabIndex = 0), this.#e.push({ btn: t, on: e, off: n });
72
- }
73
- remove(t) {
74
- const e = this.#e.findIndex((n) => n.btn === t);
75
- e < 0 || (this.#e.splice(e, 1), this.#e.length === 0 ? this.#t = -1 : e <= this.#t && --this.#t);
76
- }
77
- #s(t, e) {
78
- const n = t.querySelectorAll("input[type]"), r = n.length;
79
- for (let s = 0; s < r; ++s)
80
- if (n[s].checked) {
81
- n[(s + r + (e === "ArrowUp" ? -1 : 1)) % r].checked = !0;
82
- break;
83
- }
84
- }
85
- isFocus(t) {
86
- return this.#t < 0 ? !1 : this.#e[this.#t].btn === t;
87
- }
88
- prev() {
89
- this.#i();
90
- const t = this.#e.length;
91
- if (t !== 0) {
92
- --this.#t < 0 && (this.#t = t - 1);
93
- for (let e = t; e >= 1; --e) {
94
- const n = (this.#t + e) % t;
95
- if (this.#e[n].on()) {
96
- this.#t = n, this.#a(n);
97
- return;
98
- }
99
- }
100
- this.#t = -1;
101
- }
102
- }
103
- next() {
104
- this.#i();
105
- const t = this.#e.length;
106
- if (t !== 0) {
107
- ++this.#t >= t && (this.#t = 0);
108
- for (let e = 0; e < t; ++e) {
109
- const n = (this.#t + e) % t;
110
- if (this.#e[n].on()) {
111
- this.#t = n, this.#a(n);
112
- return;
113
- }
114
- }
115
- this.#t = -1;
116
- }
117
- }
118
- #a = it.debugLog ? (t) => console.log(`👾 <FocusMng idx:${String(t)} btn:%o`, this.#e[t].btn) : () => {
119
- };
120
- getFocus() {
121
- if (this.#t < 0) return null;
122
- this.#i(), this.#t >= this.#e.length && (this.#t = 0);
123
- const t = this.#e[this.#t];
124
- return t.on() ? t.btn : null;
125
- }
126
- blur() {
127
- this.#i(), this.#t = -1, this.#l();
128
- }
129
- #l = () => {
130
- };
131
- #i() {
132
- for (let t = this.#e.length - 1; t >= 0; --t) {
133
- const e = this.#e[t];
134
- !(e.btn instanceof ut) || e.btn.parent ? e.off() : this.#e.splice(t, 1);
135
- }
136
- }
137
- }
138
- var C = "top", R = "bottom", $ = "right", Y = "left", Xt = "auto", vt = [C, R, $, Y], nt = "start", ft = "end", Pe = "clippingParents", ae = "viewport", ct = "popper", Le = "reference", Gt = /* @__PURE__ */ vt.reduce(function(i, t) {
139
- return i.concat([t + "-" + nt, t + "-" + ft]);
140
- }, []), le = /* @__PURE__ */ [].concat(vt, [Xt]).reduce(function(i, t) {
141
- return i.concat([t, t + "-" + nt, t + "-" + ft]);
142
- }, []), Ce = "beforeRead", Ye = "read", Xe = "afterRead", He = "beforeMain", je = "main", Re = "afterMain", $e = "beforeWrite", Ae = "write", Fe = "afterWrite", Ve = [Ce, Ye, Xe, He, je, Re, $e, Ae, Fe];
143
- function W(i) {
144
- return i ? (i.nodeName || "").toLowerCase() : null;
145
- }
146
- function H(i) {
147
- if (i == null)
148
- return window;
149
- if (i.toString() !== "[object Window]") {
150
- var t = i.ownerDocument;
151
- return t && t.defaultView || window;
152
- }
153
- return i;
154
- }
155
- function tt(i) {
156
- var t = H(i).Element;
157
- return i instanceof t || i instanceof Element;
158
- }
159
- function j(i) {
160
- var t = H(i).HTMLElement;
161
- return i instanceof t || i instanceof HTMLElement;
162
- }
163
- function Ht(i) {
164
- if (typeof ShadowRoot > "u")
165
- return !1;
166
- var t = H(i).ShadowRoot;
167
- return i instanceof t || i instanceof ShadowRoot;
168
- }
169
- function We(i) {
170
- var t = i.state;
171
- Object.keys(t.elements).forEach(function(e) {
172
- var n = t.styles[e] || {}, r = t.attributes[e] || {}, s = t.elements[e];
173
- !j(s) || !W(s) || (Object.assign(s.style, n), Object.keys(r).forEach(function(l) {
174
- var o = r[l];
175
- o === !1 ? s.removeAttribute(l) : s.setAttribute(l, o === !0 ? "" : o);
176
- }));
177
- });
178
- }
179
- function Be(i) {
180
- var t = i.state, e = {
181
- popper: {
182
- position: t.options.strategy,
183
- left: "0",
184
- top: "0",
185
- margin: "0"
186
- },
187
- arrow: {
188
- position: "absolute"
189
- },
190
- reference: {}
191
- };
192
- return Object.assign(t.elements.popper.style, e.popper), t.styles = e, t.elements.arrow && Object.assign(t.elements.arrow.style, e.arrow), function() {
193
- Object.keys(t.elements).forEach(function(n) {
194
- var r = t.elements[n], s = t.attributes[n] || {}, l = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : e[n]), o = l.reduce(function(a, h) {
195
- return a[h] = "", a;
196
- }, {});
197
- !j(r) || !W(r) || (Object.assign(r.style, o), Object.keys(s).forEach(function(a) {
198
- r.removeAttribute(a);
199
- }));
200
- });
201
- };
202
- }
203
- const Ne = {
204
- name: "applyStyles",
205
- enabled: !0,
206
- phase: "write",
207
- fn: We,
208
- effect: Be,
209
- requires: ["computeStyles"]
1
+ import { r as __toDynamicImportESM } from "./chunk.js";
2
+ import { i as EVNM_KEY, m as mesErrJSON, n as EVNM_BUTTON, o as addStyle, r as EVNM_CLICK, s as argChk_Boolean, t as CmnLib } from "./CmnLib.js";
3
+ import "./CmnInterface.js";
4
+ import { _ as clearTextureCache, m as Container } from "./pixi.js";
5
+ import { t as EventListenerCtn } from "./EventListenerCtn.js";
6
+ import { n as SEARCH_PATH_ARG_EXT } from "./ConfigBase.js";
7
+ import { t as SysBase } from "./SysBase.js";
8
+ import "./DebugMng.js";
9
+ import "./Layer.js";
10
+ import { n as ReadingState, t as Reading } from "./Reading.js";
11
+ import "./SpritesMng.js";
12
+ import { Button } from "./Button.js";
13
+ import { TxtLayer } from "./TxtLayer.js";
14
+ var FocusMng = class {
15
+ #e = [];
16
+ #t = -1;
17
+ #n = new EventListenerCtn();
18
+ constructor(e, t) {
19
+ this.#a = t.isApp ? () => e.focus() : () => globalThis.focus();
20
+ }
21
+ destroy() {
22
+ this.#e = [], this.#t = -1, this.#n.clear();
23
+ }
24
+ add(e, n, r) {
25
+ if (this.#e.findIndex((t) => t.btn === e) >= 0) return;
26
+ if (e instanceof Container) {
27
+ e.on("pointerdown", () => {
28
+ for (let t = this.#e.length - 1; t >= 0; --t) if (this.#e[t].btn === e) {
29
+ this.#t = t;
30
+ return;
31
+ }
32
+ this.#t = -1;
33
+ }), this.#e.push({
34
+ btn: e,
35
+ on: n,
36
+ off: r
37
+ });
38
+ return;
39
+ }
40
+ this.#n.add(e, "focus", () => {
41
+ for (let t = this.#e.length - 1; t >= 0; --t) if (this.#e[t].btn === e) {
42
+ this.#t = t;
43
+ return;
44
+ }
45
+ this.#t = -1;
46
+ });
47
+ let i = (e) => {}, a = e.localName === "button" || e.localName === "a" ? (e) => !e.isTrusted && e.key === "Enter" : (e) => e.key === "Enter", o = e;
48
+ switch (o.type ?? "") {
49
+ case "checkbox":
50
+ i = () => {
51
+ o.checked = !o.checked;
52
+ };
53
+ break;
54
+ case "":
55
+ e.querySelectorAll("input[type]").length > 0 && (i = (t) => this.#r(e, t.key), a = () => !1);
56
+ break;
57
+ case "range":
58
+ i = (e) => {
59
+ e.isTrusted || (e.key === "ArrowUp" ? o.stepUp() : o.stepDown());
60
+ };
61
+ break;
62
+ case "text":
63
+ case "textarea":
64
+ i = (e) => {
65
+ if (e.isTrusted) return;
66
+ let t = (o.selectionStart ?? 0) + (e.key === "ArrowUp" ? -1 : 1);
67
+ t < 0 && (t = 0), o.setSelectionRange(t, t);
68
+ };
69
+ break;
70
+ }
71
+ this.#n.add(e, EVNM_KEY, (t) => {
72
+ if (!(t.key !== "ArrowUp" && t.key !== "ArrowDown" && t.key !== "Enter")) {
73
+ if (t.stopImmediatePropagation(), a(t)) {
74
+ e.dispatchEvent(new MouseEvent("click"));
75
+ return;
76
+ }
77
+ i(t);
78
+ }
79
+ }, { passive: !0 }), e.hasAttribute("tabindex") || (e.tabIndex = 0), this.#e.push({
80
+ btn: e,
81
+ on: n,
82
+ off: r
83
+ });
84
+ }
85
+ remove(e) {
86
+ let t = this.#e.findIndex((t) => t.btn === e);
87
+ t < 0 || (this.#e.splice(t, 1), this.#e.length === 0 ? this.#t = -1 : t <= this.#t && --this.#t);
88
+ }
89
+ #r(e, t) {
90
+ let n = e.querySelectorAll("input[type]"), r = n.length;
91
+ for (let e = 0; e < r; ++e) if (n[e].checked) {
92
+ n[(e + r + (t === "ArrowUp" ? -1 : 1)) % r].checked = !0;
93
+ break;
94
+ }
95
+ }
96
+ isFocus(e) {
97
+ return this.#t < 0 ? !1 : this.#e[this.#t].btn === e;
98
+ }
99
+ prev() {
100
+ this.#o();
101
+ let e = this.#e.length;
102
+ if (e !== 0) {
103
+ --this.#t < 0 && (this.#t = e - 1);
104
+ for (let t = e; t >= 1; --t) {
105
+ let n = (this.#t + t) % e;
106
+ if (this.#e[n].on()) {
107
+ this.#t = n, this.#i(n);
108
+ return;
109
+ }
110
+ }
111
+ this.#t = -1;
112
+ }
113
+ }
114
+ next() {
115
+ this.#o();
116
+ let e = this.#e.length;
117
+ if (e !== 0) {
118
+ ++this.#t >= e && (this.#t = 0);
119
+ for (let t = 0; t < e; ++t) {
120
+ let n = (this.#t + t) % e;
121
+ if (this.#e[n].on()) {
122
+ this.#t = n, this.#i(n);
123
+ return;
124
+ }
125
+ }
126
+ this.#t = -1;
127
+ }
128
+ }
129
+ #i = CmnLib.debugLog ? (e) => console.log(`👾 <FocusMng idx:${String(e)} btn:%o`, this.#e[e].btn) : () => {};
130
+ getFocus() {
131
+ if (this.#t < 0) return null;
132
+ this.#o(), this.#t >= this.#e.length && (this.#t = 0);
133
+ let e = this.#e[this.#t];
134
+ return e.on() ? e.btn : null;
135
+ }
136
+ blur() {
137
+ this.#o(), this.#t = -1, this.#a();
138
+ }
139
+ #a = () => {};
140
+ #o() {
141
+ for (let e = this.#e.length - 1; e >= 0; --e) {
142
+ let t = this.#e[e];
143
+ !(t.btn instanceof Container) || t.btn.parent ? t.off() : this.#e.splice(e, 1);
144
+ }
145
+ }
146
+ }, bottom = "bottom", right = "right", left = "left", auto = "auto", basePlacements = [
147
+ "top",
148
+ bottom,
149
+ right,
150
+ left
151
+ ], start = "start", clippingParents = "clippingParents", viewport = "viewport", popper = "popper", reference = "reference", variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(e, t) {
152
+ return e.concat([t + "-" + start, t + "-end"]);
153
+ }, []), placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(e, t) {
154
+ return e.concat([
155
+ t,
156
+ t + "-" + start,
157
+ t + "-end"
158
+ ]);
159
+ }, []), modifierPhases = [
160
+ "beforeRead",
161
+ "read",
162
+ "afterRead",
163
+ "beforeMain",
164
+ "main",
165
+ "afterMain",
166
+ "beforeWrite",
167
+ "write",
168
+ "afterWrite"
169
+ ];
170
+ function getNodeName(e) {
171
+ return e ? (e.nodeName || "").toLowerCase() : null;
172
+ }
173
+ function getWindow(e) {
174
+ if (e == null) return window;
175
+ if (e.toString() !== "[object Window]") {
176
+ var t = e.ownerDocument;
177
+ return t && t.defaultView || window;
178
+ }
179
+ return e;
180
+ }
181
+ function isElement(e) {
182
+ return e instanceof getWindow(e).Element || e instanceof Element;
183
+ }
184
+ function isHTMLElement(e) {
185
+ return e instanceof getWindow(e).HTMLElement || e instanceof HTMLElement;
186
+ }
187
+ function isShadowRoot(e) {
188
+ return typeof ShadowRoot > "u" ? !1 : e instanceof getWindow(e).ShadowRoot || e instanceof ShadowRoot;
189
+ }
190
+ function applyStyles(e) {
191
+ var t = e.state;
192
+ Object.keys(t.elements).forEach(function(e) {
193
+ var n = t.styles[e] || {}, r = t.attributes[e] || {}, i = t.elements[e];
194
+ !isHTMLElement(i) || !getNodeName(i) || (Object.assign(i.style, n), Object.keys(r).forEach(function(e) {
195
+ var t = r[e];
196
+ t === !1 ? i.removeAttribute(e) : i.setAttribute(e, t === !0 ? "" : t);
197
+ }));
198
+ });
199
+ }
200
+ function effect$2(e) {
201
+ var t = e.state, n = {
202
+ popper: {
203
+ position: t.options.strategy,
204
+ left: "0",
205
+ top: "0",
206
+ margin: "0"
207
+ },
208
+ arrow: { position: "absolute" },
209
+ reference: {}
210
+ };
211
+ return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
212
+ Object.keys(t.elements).forEach(function(e) {
213
+ var r = t.elements[e], i = t.attributes[e] || {}, a = Object.keys(t.styles.hasOwnProperty(e) ? t.styles[e] : n[e]).reduce(function(e, t) {
214
+ return e[t] = "", e;
215
+ }, {});
216
+ !isHTMLElement(r) || !getNodeName(r) || (Object.assign(r.style, a), Object.keys(i).forEach(function(e) {
217
+ r.removeAttribute(e);
218
+ }));
219
+ });
220
+ };
221
+ }
222
+ var applyStyles_default = {
223
+ name: "applyStyles",
224
+ enabled: !0,
225
+ phase: "write",
226
+ fn: applyStyles,
227
+ effect: effect$2,
228
+ requires: ["computeStyles"]
210
229
  };
211
- function V(i) {
212
- return i.split("-")[0];
213
- }
214
- var Q = Math.max, Ot = Math.min, rt = Math.round;
215
- function Ct() {
216
- var i = navigator.userAgentData;
217
- return i != null && i.brands && Array.isArray(i.brands) ? i.brands.map(function(t) {
218
- return t.brand + "/" + t.version;
219
- }).join(" ") : navigator.userAgent;
220
- }
221
- function ce() {
222
- return !/^((?!chrome|android).)*safari/i.test(Ct());
223
- }
224
- function ot(i, t, e) {
225
- t === void 0 && (t = !1), e === void 0 && (e = !1);
226
- var n = i.getBoundingClientRect(), r = 1, s = 1;
227
- t && j(i) && (r = i.offsetWidth > 0 && rt(n.width) / i.offsetWidth || 1, s = i.offsetHeight > 0 && rt(n.height) / i.offsetHeight || 1);
228
- var l = tt(i) ? H(i) : window, o = l.visualViewport, a = !ce() && e, h = (n.left + (a && o ? o.offsetLeft : 0)) / r, u = (n.top + (a && o ? o.offsetTop : 0)) / s, p = n.width / r, y = n.height / s;
229
- return {
230
- width: p,
231
- height: y,
232
- top: u,
233
- right: h + p,
234
- bottom: u + y,
235
- left: h,
236
- x: h,
237
- y: u
238
- };
239
- }
240
- function jt(i) {
241
- var t = ot(i), e = i.offsetWidth, n = i.offsetHeight;
242
- return Math.abs(t.width - e) <= 1 && (e = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
243
- x: i.offsetLeft,
244
- y: i.offsetTop,
245
- width: e,
246
- height: n
247
- };
248
- }
249
- function ue(i, t) {
250
- var e = t.getRootNode && t.getRootNode();
251
- if (i.contains(t))
252
- return !0;
253
- if (e && Ht(e)) {
254
- var n = t;
255
- do {
256
- if (n && i.isSameNode(n))
257
- return !0;
258
- n = n.parentNode || n.host;
259
- } while (n);
260
- }
261
- return !1;
262
- }
263
- function B(i) {
264
- return H(i).getComputedStyle(i);
265
- }
266
- function qe(i) {
267
- return ["table", "td", "th"].indexOf(W(i)) >= 0;
268
- }
269
- function q(i) {
270
- return ((tt(i) ? i.ownerDocument : (
271
- // $FlowFixMe[prop-missing]
272
- i.document
273
- )) || window.document).documentElement;
274
- }
275
- function kt(i) {
276
- return W(i) === "html" ? i : (
277
- // this is a quicker (but less type safe) way to save quite some bytes from the bundle
278
- // $FlowFixMe[incompatible-return]
279
- // $FlowFixMe[prop-missing]
280
- i.assignedSlot || // step into the shadow DOM of the parent of a slotted node
281
- i.parentNode || // DOM Element detected
282
- (Ht(i) ? i.host : null) || // ShadowRoot detected
283
- // $FlowFixMe[incompatible-call]: HTMLElement is a Node
284
- q(i)
285
- );
286
- }
287
- function Zt(i) {
288
- return !j(i) || // https://github.com/popperjs/popper-core/issues/837
289
- B(i).position === "fixed" ? null : i.offsetParent;
290
- }
291
- function Ie(i) {
292
- var t = /firefox/i.test(Ct()), e = /Trident/i.test(Ct());
293
- if (e && j(i)) {
294
- var n = B(i);
295
- if (n.position === "fixed")
296
- return null;
297
- }
298
- var r = kt(i);
299
- for (Ht(r) && (r = r.host); j(r) && ["html", "body"].indexOf(W(r)) < 0; ) {
300
- var s = B(r);
301
- if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none")
302
- return r;
303
- r = r.parentNode;
304
- }
305
- return null;
306
- }
307
- function mt(i) {
308
- for (var t = H(i), e = Zt(i); e && qe(e) && B(e).position === "static"; )
309
- e = Zt(e);
310
- return e && (W(e) === "html" || W(e) === "body" && B(e).position === "static") ? t : e || Ie(i) || t;
311
- }
312
- function Rt(i) {
313
- return ["top", "bottom"].indexOf(i) >= 0 ? "x" : "y";
314
- }
315
- function ht(i, t, e) {
316
- return Q(i, Ot(t, e));
317
- }
318
- function ze(i, t, e) {
319
- var n = ht(i, t, e);
320
- return n > e ? e : n;
321
- }
322
- function he() {
323
- return {
324
- top: 0,
325
- right: 0,
326
- bottom: 0,
327
- left: 0
328
- };
329
- }
330
- function de(i) {
331
- return Object.assign({}, he(), i);
332
- }
333
- function fe(i, t) {
334
- return t.reduce(function(e, n) {
335
- return e[n] = i, e;
336
- }, {});
337
- }
338
- var Ue = function(t, e) {
339
- return t = typeof t == "function" ? t(Object.assign({}, e.rects, {
340
- placement: e.placement
341
- })) : t, de(typeof t != "number" ? t : fe(t, vt));
230
+ function getBasePlacement(e) {
231
+ return e.split("-")[0];
232
+ }
233
+ var max = Math.max, min = Math.min, round = Math.round;
234
+ function getUAString() {
235
+ var e = navigator.userAgentData;
236
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(e) {
237
+ return e.brand + "/" + e.version;
238
+ }).join(" ") : navigator.userAgent;
239
+ }
240
+ function isLayoutViewport() {
241
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
242
+ }
243
+ function getBoundingClientRect(e, t, n) {
244
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
245
+ var r = e.getBoundingClientRect(), i = 1, a = 1;
246
+ t && isHTMLElement(e) && (i = e.offsetWidth > 0 && round(r.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && round(r.height) / e.offsetHeight || 1);
247
+ var o = (isElement(e) ? getWindow(e) : window).visualViewport, s = !isLayoutViewport() && n, c = (r.left + (s && o ? o.offsetLeft : 0)) / i, l = (r.top + (s && o ? o.offsetTop : 0)) / a, u = r.width / i, d = r.height / a;
248
+ return {
249
+ width: u,
250
+ height: d,
251
+ top: l,
252
+ right: c + u,
253
+ bottom: l + d,
254
+ left: c,
255
+ x: c,
256
+ y: l
257
+ };
258
+ }
259
+ function getLayoutRect(e) {
260
+ var t = getBoundingClientRect(e), n = e.offsetWidth, r = e.offsetHeight;
261
+ return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
262
+ x: e.offsetLeft,
263
+ y: e.offsetTop,
264
+ width: n,
265
+ height: r
266
+ };
267
+ }
268
+ function contains(e, t) {
269
+ var n = t.getRootNode && t.getRootNode();
270
+ if (e.contains(t)) return !0;
271
+ if (n && isShadowRoot(n)) {
272
+ var r = t;
273
+ do {
274
+ if (r && e.isSameNode(r)) return !0;
275
+ r = r.parentNode || r.host;
276
+ } while (r);
277
+ }
278
+ return !1;
279
+ }
280
+ function getComputedStyle$1(e) {
281
+ return getWindow(e).getComputedStyle(e);
282
+ }
283
+ function isTableElement(e) {
284
+ return [
285
+ "table",
286
+ "td",
287
+ "th"
288
+ ].indexOf(getNodeName(e)) >= 0;
289
+ }
290
+ function getDocumentElement(e) {
291
+ return ((isElement(e) ? e.ownerDocument : e.document) || window.document).documentElement;
292
+ }
293
+ function getParentNode(e) {
294
+ return getNodeName(e) === "html" ? e : e.assignedSlot || e.parentNode || (isShadowRoot(e) ? e.host : null) || getDocumentElement(e);
295
+ }
296
+ function getTrueOffsetParent(e) {
297
+ return !isHTMLElement(e) || getComputedStyle$1(e).position === "fixed" ? null : e.offsetParent;
298
+ }
299
+ function getContainingBlock(e) {
300
+ var t = /firefox/i.test(getUAString());
301
+ if (/Trident/i.test(getUAString()) && isHTMLElement(e) && getComputedStyle$1(e).position === "fixed") return null;
302
+ var n = getParentNode(e);
303
+ for (isShadowRoot(n) && (n = n.host); isHTMLElement(n) && ["html", "body"].indexOf(getNodeName(n)) < 0;) {
304
+ var r = getComputedStyle$1(n);
305
+ if (r.transform !== "none" || r.perspective !== "none" || r.contain === "paint" || ["transform", "perspective"].indexOf(r.willChange) !== -1 || t && r.willChange === "filter" || t && r.filter && r.filter !== "none") return n;
306
+ n = n.parentNode;
307
+ }
308
+ return null;
309
+ }
310
+ function getOffsetParent(e) {
311
+ for (var t = getWindow(e), n = getTrueOffsetParent(e); n && isTableElement(n) && getComputedStyle$1(n).position === "static";) n = getTrueOffsetParent(n);
312
+ return n && (getNodeName(n) === "html" || getNodeName(n) === "body" && getComputedStyle$1(n).position === "static") ? t : n || getContainingBlock(e) || t;
313
+ }
314
+ function getMainAxisFromPlacement(e) {
315
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
316
+ }
317
+ function within(e, t, n) {
318
+ return max(e, min(t, n));
319
+ }
320
+ function withinMaxClamp(e, t, n) {
321
+ var r = within(e, t, n);
322
+ return r > n ? n : r;
323
+ }
324
+ function getFreshSideObject() {
325
+ return {
326
+ top: 0,
327
+ right: 0,
328
+ bottom: 0,
329
+ left: 0
330
+ };
331
+ }
332
+ function mergePaddingObject(e) {
333
+ return Object.assign({}, getFreshSideObject(), e);
334
+ }
335
+ function expandToHashMap(e, t) {
336
+ return t.reduce(function(t, n) {
337
+ return t[n] = e, t;
338
+ }, {});
339
+ }
340
+ var toPaddingObject = function(e, t) {
341
+ return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, mergePaddingObject(typeof e == "number" ? expandToHashMap(e, basePlacements) : e);
342
342
  };
343
- function Ke(i) {
344
- var t, e = i.state, n = i.name, r = i.options, s = e.elements.arrow, l = e.modifiersData.popperOffsets, o = V(e.placement), a = Rt(o), h = [Y, $].indexOf(o) >= 0, u = h ? "height" : "width";
345
- if (!(!s || !l)) {
346
- var p = Ue(r.padding, e), y = jt(s), d = a === "y" ? C : Y, m = a === "y" ? R : $, v = e.rects.reference[u] + e.rects.reference[a] - l[a] - e.rects.popper[u], g = l[a] - e.rects.reference[a], w = mt(s), c = w ? a === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, f = v / 2 - g / 2, b = p[d], E = c - y[u] - p[m], x = c / 2 - y[u] / 2 + f, T = ht(b, x, E), S = a;
347
- e.modifiersData[n] = (t = {}, t[S] = T, t.centerOffset = T - x, t);
348
- }
349
- }
350
- function Je(i) {
351
- var t = i.state, e = i.options, n = e.element, r = n === void 0 ? "[data-popper-arrow]" : n;
352
- r != null && (typeof r == "string" && (r = t.elements.popper.querySelector(r), !r) || ue(t.elements.popper, r) && (t.elements.arrow = r));
353
- }
354
- const Ge = {
355
- name: "arrow",
356
- enabled: !0,
357
- phase: "main",
358
- fn: Ke,
359
- effect: Je,
360
- requires: ["popperOffsets"],
361
- requiresIfExists: ["preventOverflow"]
343
+ function arrow(e) {
344
+ var t, n = e.state, r = e.name, i = e.options, a = n.elements.arrow, o = n.modifiersData.popperOffsets, s = getBasePlacement(n.placement), c = getMainAxisFromPlacement(s), l = ["left", "right"].indexOf(s) >= 0 ? "height" : "width";
345
+ if (!(!a || !o)) {
346
+ var u = toPaddingObject(i.padding, n), d = getLayoutRect(a), f = c === "y" ? "top" : left, p = c === "y" ? bottom : right, m = n.rects.reference[l] + n.rects.reference[c] - o[c] - n.rects.popper[l], h = o[c] - n.rects.reference[c], g = getOffsetParent(a), _ = g ? c === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, x = m / 2 - h / 2, S = u[f], C = _ - d[l] - u[p], w = _ / 2 - d[l] / 2 + x, T = within(S, w, C), E = c;
347
+ n.modifiersData[r] = (t = {}, t[E] = T, t.centerOffset = T - w, t);
348
+ }
349
+ }
350
+ function effect$1(e) {
351
+ var t = e.state, n = e.options.element, r = n === void 0 ? "[data-popper-arrow]" : n;
352
+ r != null && (typeof r == "string" && (r = t.elements.popper.querySelector(r), !r) || contains(t.elements.popper, r) && (t.elements.arrow = r));
353
+ }
354
+ var arrow_default = {
355
+ name: "arrow",
356
+ enabled: !0,
357
+ phase: "main",
358
+ fn: arrow,
359
+ effect: effect$1,
360
+ requires: ["popperOffsets"],
361
+ requiresIfExists: ["preventOverflow"]
362
362
  };
363
- function st(i) {
364
- return i.split("-")[1];
365
- }
366
- var Ze = {
367
- top: "auto",
368
- right: "auto",
369
- bottom: "auto",
370
- left: "auto"
363
+ function getVariation(e) {
364
+ return e.split("-")[1];
365
+ }
366
+ var unsetSides = {
367
+ top: "auto",
368
+ right: "auto",
369
+ bottom: "auto",
370
+ left: "auto"
371
371
  };
372
- function Qe(i, t) {
373
- var e = i.x, n = i.y, r = t.devicePixelRatio || 1;
374
- return {
375
- x: rt(e * r) / r || 0,
376
- y: rt(n * r) / r || 0
377
- };
378
- }
379
- function Qt(i) {
380
- var t, e = i.popper, n = i.popperRect, r = i.placement, s = i.variation, l = i.offsets, o = i.position, a = i.gpuAcceleration, h = i.adaptive, u = i.roundOffsets, p = i.isFixed, y = l.x, d = y === void 0 ? 0 : y, m = l.y, v = m === void 0 ? 0 : m, g = typeof u == "function" ? u({
381
- x: d,
382
- y: v
383
- }) : {
384
- x: d,
385
- y: v
386
- };
387
- d = g.x, v = g.y;
388
- var w = l.hasOwnProperty("x"), c = l.hasOwnProperty("y"), f = Y, b = C, E = window;
389
- if (h) {
390
- var x = mt(e), T = "clientHeight", S = "clientWidth";
391
- if (x === H(e) && (x = q(e), B(x).position !== "static" && o === "absolute" && (T = "scrollHeight", S = "scrollWidth")), x = x, r === C || (r === Y || r === $) && s === ft) {
392
- b = R;
393
- var M = p && x === E && E.visualViewport ? E.visualViewport.height : (
394
- // $FlowFixMe[prop-missing]
395
- x[T]
396
- );
397
- v -= M - n.height, v *= a ? 1 : -1;
398
- }
399
- if (r === Y || (r === C || r === R) && s === ft) {
400
- f = $;
401
- var _ = p && x === E && E.visualViewport ? E.visualViewport.width : (
402
- // $FlowFixMe[prop-missing]
403
- x[S]
404
- );
405
- d -= _ - n.width, d *= a ? 1 : -1;
406
- }
407
- }
408
- var O = Object.assign({
409
- position: o
410
- }, h && Ze), D = u === !0 ? Qe({
411
- x: d,
412
- y: v
413
- }, H(e)) : {
414
- x: d,
415
- y: v
416
- };
417
- if (d = D.x, v = D.y, a) {
418
- var P;
419
- return Object.assign({}, O, (P = {}, P[b] = c ? "0" : "", P[f] = w ? "0" : "", P.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + v + "px)" : "translate3d(" + d + "px, " + v + "px, 0)", P));
420
- }
421
- return Object.assign({}, O, (t = {}, t[b] = c ? v + "px" : "", t[f] = w ? d + "px" : "", t.transform = "", t));
422
- }
423
- function ti(i) {
424
- var t = i.state, e = i.options, n = e.gpuAcceleration, r = n === void 0 ? !0 : n, s = e.adaptive, l = s === void 0 ? !0 : s, o = e.roundOffsets, a = o === void 0 ? !0 : o, h = {
425
- placement: V(t.placement),
426
- variation: st(t.placement),
427
- popper: t.elements.popper,
428
- popperRect: t.rects.popper,
429
- gpuAcceleration: r,
430
- isFixed: t.options.strategy === "fixed"
431
- };
432
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Qt(Object.assign({}, h, {
433
- offsets: t.modifiersData.popperOffsets,
434
- position: t.options.strategy,
435
- adaptive: l,
436
- roundOffsets: a
437
- })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Qt(Object.assign({}, h, {
438
- offsets: t.modifiersData.arrow,
439
- position: "absolute",
440
- adaptive: !1,
441
- roundOffsets: a
442
- })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
443
- "data-popper-placement": t.placement
444
- });
445
- }
446
- const ei = {
447
- name: "computeStyles",
448
- enabled: !0,
449
- phase: "beforeWrite",
450
- fn: ti,
451
- data: {}
372
+ function roundOffsetsByDPR(e, t) {
373
+ var n = e.x, r = e.y, i = t.devicePixelRatio || 1;
374
+ return {
375
+ x: round(n * i) / i || 0,
376
+ y: round(r * i) / i || 0
377
+ };
378
+ }
379
+ function mapToStyles(e) {
380
+ var t, n = e.popper, r = e.popperRect, i = e.placement, a = e.variation, o = e.offsets, s = e.position, c = e.gpuAcceleration, l = e.adaptive, u = e.roundOffsets, d = e.isFixed, f = o.x, p = f === void 0 ? 0 : f, m = o.y, h = m === void 0 ? 0 : m, g = typeof u == "function" ? u({
381
+ x: p,
382
+ y: h
383
+ }) : {
384
+ x: p,
385
+ y: h
386
+ };
387
+ p = g.x, h = g.y;
388
+ var _ = o.hasOwnProperty("x"), x = o.hasOwnProperty("y"), S = left, C = "top", w = window;
389
+ if (l) {
390
+ var T = getOffsetParent(n), E = "clientHeight", D = "clientWidth";
391
+ if (T === getWindow(n) && (T = getDocumentElement(n), getComputedStyle$1(T).position !== "static" && s === "absolute" && (E = "scrollHeight", D = "scrollWidth")), T = T, i === "top" || (i === "left" || i === "right") && a === "end") {
392
+ C = bottom;
393
+ var O = d && T === w && w.visualViewport ? w.visualViewport.height : T[E];
394
+ h -= O - r.height, h *= c ? 1 : -1;
395
+ }
396
+ if (i === "left" || (i === "top" || i === "bottom") && a === "end") {
397
+ S = right;
398
+ var k = d && T === w && w.visualViewport ? w.visualViewport.width : T[D];
399
+ p -= k - r.width, p *= c ? 1 : -1;
400
+ }
401
+ }
402
+ var A = Object.assign({ position: s }, l && unsetSides), j = u === !0 ? roundOffsetsByDPR({
403
+ x: p,
404
+ y: h
405
+ }, getWindow(n)) : {
406
+ x: p,
407
+ y: h
408
+ };
409
+ if (p = j.x, h = j.y, c) {
410
+ var N;
411
+ return Object.assign({}, A, (N = {}, N[C] = x ? "0" : "", N[S] = _ ? "0" : "", N.transform = (w.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + h + "px)" : "translate3d(" + p + "px, " + h + "px, 0)", N));
412
+ }
413
+ return Object.assign({}, A, (t = {}, t[C] = x ? h + "px" : "", t[S] = _ ? p + "px" : "", t.transform = "", t));
414
+ }
415
+ function computeStyles(e) {
416
+ var t = e.state, n = e.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, a = n.adaptive, o = a === void 0 ? !0 : a, s = n.roundOffsets, c = s === void 0 ? !0 : s, l = {
417
+ placement: getBasePlacement(t.placement),
418
+ variation: getVariation(t.placement),
419
+ popper: t.elements.popper,
420
+ popperRect: t.rects.popper,
421
+ gpuAcceleration: i,
422
+ isFixed: t.options.strategy === "fixed"
423
+ };
424
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, mapToStyles(Object.assign({}, l, {
425
+ offsets: t.modifiersData.popperOffsets,
426
+ position: t.options.strategy,
427
+ adaptive: o,
428
+ roundOffsets: c
429
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, mapToStyles(Object.assign({}, l, {
430
+ offsets: t.modifiersData.arrow,
431
+ position: "absolute",
432
+ adaptive: !1,
433
+ roundOffsets: c
434
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
435
+ }
436
+ var computeStyles_default = {
437
+ name: "computeStyles",
438
+ enabled: !0,
439
+ phase: "beforeWrite",
440
+ fn: computeStyles,
441
+ data: {}
442
+ }, passive = { passive: !0 };
443
+ function effect(e) {
444
+ var t = e.state, n = e.instance, r = e.options, i = r.scroll, a = i === void 0 ? !0 : i, o = r.resize, s = o === void 0 ? !0 : o, c = getWindow(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
445
+ return a && l.forEach(function(e) {
446
+ e.addEventListener("scroll", n.update, passive);
447
+ }), s && c.addEventListener("resize", n.update, passive), function() {
448
+ a && l.forEach(function(e) {
449
+ e.removeEventListener("scroll", n.update, passive);
450
+ }), s && c.removeEventListener("resize", n.update, passive);
451
+ };
452
+ }
453
+ var eventListeners_default = {
454
+ name: "eventListeners",
455
+ enabled: !0,
456
+ phase: "write",
457
+ fn: function() {},
458
+ effect,
459
+ data: {}
460
+ }, hash$1 = {
461
+ left: "right",
462
+ right: "left",
463
+ bottom: "top",
464
+ top: "bottom"
452
465
  };
453
- var Et = {
454
- passive: !0
466
+ function getOppositePlacement(e) {
467
+ return e.replace(/left|right|bottom|top/g, function(e) {
468
+ return hash$1[e];
469
+ });
470
+ }
471
+ var hash = {
472
+ start: "end",
473
+ end: "start"
455
474
  };
456
- function ii(i) {
457
- var t = i.state, e = i.instance, n = i.options, r = n.scroll, s = r === void 0 ? !0 : r, l = n.resize, o = l === void 0 ? !0 : l, a = H(t.elements.popper), h = [].concat(t.scrollParents.reference, t.scrollParents.popper);
458
- return s && h.forEach(function(u) {
459
- u.addEventListener("scroll", e.update, Et);
460
- }), o && a.addEventListener("resize", e.update, Et), function() {
461
- s && h.forEach(function(u) {
462
- u.removeEventListener("scroll", e.update, Et);
463
- }), o && a.removeEventListener("resize", e.update, Et);
464
- };
465
- }
466
- const ni = {
467
- name: "eventListeners",
468
- enabled: !0,
469
- phase: "write",
470
- fn: function() {
471
- },
472
- effect: ii,
473
- data: {}
475
+ function getOppositeVariationPlacement(e) {
476
+ return e.replace(/start|end/g, function(e) {
477
+ return hash[e];
478
+ });
479
+ }
480
+ function getWindowScroll(e) {
481
+ var t = getWindow(e);
482
+ return {
483
+ scrollLeft: t.pageXOffset,
484
+ scrollTop: t.pageYOffset
485
+ };
486
+ }
487
+ function getWindowScrollBarX(e) {
488
+ return getBoundingClientRect(getDocumentElement(e)).left + getWindowScroll(e).scrollLeft;
489
+ }
490
+ function getViewportRect(e, t) {
491
+ var n = getWindow(e), r = getDocumentElement(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
492
+ if (i) {
493
+ a = i.width, o = i.height;
494
+ var l = isLayoutViewport();
495
+ (l || !l && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
496
+ }
497
+ return {
498
+ width: a,
499
+ height: o,
500
+ x: s + getWindowScrollBarX(e),
501
+ y: c
502
+ };
503
+ }
504
+ function getDocumentRect(e) {
505
+ var t = getDocumentElement(e), n = getWindowScroll(e), r = e.ownerDocument?.body, i = max(t.scrollWidth, t.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), a = max(t.scrollHeight, t.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), o = -n.scrollLeft + getWindowScrollBarX(e), s = -n.scrollTop;
506
+ return getComputedStyle$1(r || t).direction === "rtl" && (o += max(t.clientWidth, r ? r.clientWidth : 0) - i), {
507
+ width: i,
508
+ height: a,
509
+ x: o,
510
+ y: s
511
+ };
512
+ }
513
+ function isScrollParent(e) {
514
+ var t = getComputedStyle$1(e), n = t.overflow, r = t.overflowX, i = t.overflowY;
515
+ return /auto|scroll|overlay|hidden/.test(n + i + r);
516
+ }
517
+ function getScrollParent(e) {
518
+ return [
519
+ "html",
520
+ "body",
521
+ "#document"
522
+ ].indexOf(getNodeName(e)) >= 0 ? e.ownerDocument.body : isHTMLElement(e) && isScrollParent(e) ? e : getScrollParent(getParentNode(e));
523
+ }
524
+ function listScrollParents(e, t) {
525
+ t === void 0 && (t = []);
526
+ var n = getScrollParent(e), r = n === e.ownerDocument?.body, i = getWindow(n), a = r ? [i].concat(i.visualViewport || [], isScrollParent(n) ? n : []) : n, o = t.concat(a);
527
+ return r ? o : o.concat(listScrollParents(getParentNode(a)));
528
+ }
529
+ function rectToClientRect(e) {
530
+ return Object.assign({}, e, {
531
+ left: e.x,
532
+ top: e.y,
533
+ right: e.x + e.width,
534
+ bottom: e.y + e.height
535
+ });
536
+ }
537
+ function getInnerBoundingClientRect(e, t) {
538
+ var n = getBoundingClientRect(e, !1, t === "fixed");
539
+ return n.top += e.clientTop, n.left += e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
540
+ }
541
+ function getClientRectFromMixedType(e, t, n) {
542
+ return t === "viewport" ? rectToClientRect(getViewportRect(e, n)) : isElement(t) ? getInnerBoundingClientRect(t, n) : rectToClientRect(getDocumentRect(getDocumentElement(e)));
543
+ }
544
+ function getClippingParents(e) {
545
+ var t = listScrollParents(getParentNode(e)), n = ["absolute", "fixed"].indexOf(getComputedStyle$1(e).position) >= 0 && isHTMLElement(e) ? getOffsetParent(e) : e;
546
+ return isElement(n) ? t.filter(function(e) {
547
+ return isElement(e) && contains(e, n) && getNodeName(e) !== "body";
548
+ }) : [];
549
+ }
550
+ function getClippingRect(e, t, n, r) {
551
+ var i = t === "clippingParents" ? getClippingParents(e) : [].concat(t), a = [].concat(i, [n]), o = a[0], s = a.reduce(function(t, n) {
552
+ var i = getClientRectFromMixedType(e, n, r);
553
+ return t.top = max(i.top, t.top), t.right = min(i.right, t.right), t.bottom = min(i.bottom, t.bottom), t.left = max(i.left, t.left), t;
554
+ }, getClientRectFromMixedType(e, o, r));
555
+ return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
556
+ }
557
+ function computeOffsets(e) {
558
+ var t = e.reference, n = e.element, r = e.placement, i = r ? getBasePlacement(r) : null, a = r ? getVariation(r) : null, o = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, c;
559
+ switch (i) {
560
+ case "top":
561
+ c = {
562
+ x: o,
563
+ y: t.y - n.height
564
+ };
565
+ break;
566
+ case bottom:
567
+ c = {
568
+ x: o,
569
+ y: t.y + t.height
570
+ };
571
+ break;
572
+ case right:
573
+ c = {
574
+ x: t.x + t.width,
575
+ y: s
576
+ };
577
+ break;
578
+ case left:
579
+ c = {
580
+ x: t.x - n.width,
581
+ y: s
582
+ };
583
+ break;
584
+ default: c = {
585
+ x: t.x,
586
+ y: t.y
587
+ };
588
+ }
589
+ var l = i ? getMainAxisFromPlacement(i) : null;
590
+ if (l != null) {
591
+ var u = l === "y" ? "height" : "width";
592
+ switch (a) {
593
+ case start:
594
+ c[l] = c[l] - (t[u] / 2 - n[u] / 2);
595
+ break;
596
+ case "end":
597
+ c[l] = c[l] + (t[u] / 2 - n[u] / 2);
598
+ break;
599
+ default:
600
+ }
601
+ }
602
+ return c;
603
+ }
604
+ function detectOverflow(e, t) {
605
+ t === void 0 && (t = {});
606
+ var n = t, r = n.placement, i = r === void 0 ? e.placement : r, a = n.strategy, o = a === void 0 ? e.strategy : a, s = n.boundary, c = s === void 0 ? clippingParents : s, l = n.rootBoundary, u = l === void 0 ? viewport : l, d = n.elementContext, f = d === void 0 ? popper : d, p = n.altBoundary, m = p === void 0 ? !1 : p, h = n.padding, g = h === void 0 ? 0 : h, _ = mergePaddingObject(typeof g == "number" ? expandToHashMap(g, basePlacements) : g), v = f === "popper" ? reference : popper, y = e.rects.popper, b = e.elements[m ? v : f], x = getClippingRect(isElement(b) ? b : b.contextElement || getDocumentElement(e.elements.popper), c, u, o), C = getBoundingClientRect(e.elements.reference), O = computeOffsets({
607
+ reference: C,
608
+ element: y,
609
+ strategy: "absolute",
610
+ placement: i
611
+ }), k = rectToClientRect(Object.assign({}, y, O)), A = f === "popper" ? k : C, j = {
612
+ top: x.top - A.top + _.top,
613
+ bottom: A.bottom - x.bottom + _.bottom,
614
+ left: x.left - A.left + _.left,
615
+ right: A.right - x.right + _.right
616
+ }, M = e.modifiersData.offset;
617
+ if (f === "popper" && M) {
618
+ var P = M[i];
619
+ Object.keys(j).forEach(function(e) {
620
+ var t = ["right", "bottom"].indexOf(e) >= 0 ? 1 : -1, n = ["top", "bottom"].indexOf(e) >= 0 ? "y" : "x";
621
+ j[e] += P[n] * t;
622
+ });
623
+ }
624
+ return j;
625
+ }
626
+ function computeAutoPlacement(e, t) {
627
+ t === void 0 && (t = {});
628
+ var n = t, r = n.placement, i = n.boundary, a = n.rootBoundary, o = n.padding, s = n.flipVariations, c = n.allowedAutoPlacements, l = c === void 0 ? placements : c, u = getVariation(r), d = u ? s ? variationPlacements : variationPlacements.filter(function(e) {
629
+ return getVariation(e) === u;
630
+ }) : basePlacements, f = d.filter(function(e) {
631
+ return l.indexOf(e) >= 0;
632
+ });
633
+ f.length === 0 && (f = d);
634
+ var p = f.reduce(function(t, n) {
635
+ return t[n] = detectOverflow(e, {
636
+ placement: n,
637
+ boundary: i,
638
+ rootBoundary: a,
639
+ padding: o
640
+ })[getBasePlacement(n)], t;
641
+ }, {});
642
+ return Object.keys(p).sort(function(e, t) {
643
+ return p[e] - p[t];
644
+ });
645
+ }
646
+ function getExpandedFallbackPlacements(e) {
647
+ if (getBasePlacement(e) === "auto") return [];
648
+ var t = getOppositePlacement(e);
649
+ return [
650
+ getOppositeVariationPlacement(e),
651
+ t,
652
+ getOppositeVariationPlacement(t)
653
+ ];
654
+ }
655
+ function flip(e) {
656
+ var t = e.state, n = e.options, r = e.name;
657
+ if (!t.modifiersData[r]._skip) {
658
+ for (var i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !0 : o, c = n.fallbackPlacements, l = n.padding, u = n.boundary, d = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, m = p === void 0 ? !0 : p, h = n.allowedAutoPlacements, g = t.options.placement, _ = getBasePlacement(g) === g, x = c || (_ || !m ? [getOppositePlacement(g)] : getExpandedFallbackPlacements(g)), S = [g].concat(x).reduce(function(e, n) {
659
+ return e.concat(getBasePlacement(n) === "auto" ? computeAutoPlacement(t, {
660
+ placement: n,
661
+ boundary: u,
662
+ rootBoundary: d,
663
+ padding: l,
664
+ flipVariations: m,
665
+ allowedAutoPlacements: h
666
+ }) : n);
667
+ }, []), w = t.rects.reference, T = t.rects.popper, E = /* @__PURE__ */ new Map(), D = !0, O = S[0], k = 0; k < S.length; k++) {
668
+ var A = S[k], j = getBasePlacement(A), M = getVariation(A) === start, N = ["top", bottom].indexOf(j) >= 0, P = N ? "width" : "height", F = detectOverflow(t, {
669
+ placement: A,
670
+ boundary: u,
671
+ rootBoundary: d,
672
+ altBoundary: f,
673
+ padding: l
674
+ }), I = N ? M ? right : left : M ? bottom : "top";
675
+ w[P] > T[P] && (I = getOppositePlacement(I));
676
+ var L = getOppositePlacement(I), R = [];
677
+ if (a && R.push(F[j] <= 0), s && R.push(F[I] <= 0, F[L] <= 0), R.every(function(e) {
678
+ return e;
679
+ })) {
680
+ O = A, D = !1;
681
+ break;
682
+ }
683
+ E.set(A, R);
684
+ }
685
+ if (D) for (var rt = m ? 3 : 1, it = function(e) {
686
+ var t = S.find(function(t) {
687
+ var n = E.get(t);
688
+ if (n) return n.slice(0, e).every(function(e) {
689
+ return e;
690
+ });
691
+ });
692
+ if (t) return O = t, "break";
693
+ }, z = rt; z > 0 && it(z) !== "break"; z--);
694
+ t.placement !== O && (t.modifiersData[r]._skip = !0, t.placement = O, t.reset = !0);
695
+ }
696
+ }
697
+ var flip_default = {
698
+ name: "flip",
699
+ enabled: !0,
700
+ phase: "main",
701
+ fn: flip,
702
+ requiresIfExists: ["offset"],
703
+ data: { _skip: !1 }
474
704
  };
475
- var ri = {
476
- left: "right",
477
- right: "left",
478
- bottom: "top",
479
- top: "bottom"
705
+ function getSideOffsets(e, t, n) {
706
+ return n === void 0 && (n = {
707
+ x: 0,
708
+ y: 0
709
+ }), {
710
+ top: e.top - t.height - n.y,
711
+ right: e.right - t.width + n.x,
712
+ bottom: e.bottom - t.height + n.y,
713
+ left: e.left - t.width - n.x
714
+ };
715
+ }
716
+ function isAnySideFullyClipped(e) {
717
+ return [
718
+ "top",
719
+ right,
720
+ bottom,
721
+ left
722
+ ].some(function(t) {
723
+ return e[t] >= 0;
724
+ });
725
+ }
726
+ function hide(e) {
727
+ var t = e.state, n = e.name, r = t.rects.reference, i = t.rects.popper, a = t.modifiersData.preventOverflow, o = detectOverflow(t, { elementContext: "reference" }), s = detectOverflow(t, { altBoundary: !0 }), c = getSideOffsets(o, r), l = getSideOffsets(s, i, a), u = isAnySideFullyClipped(c), d = isAnySideFullyClipped(l);
728
+ t.modifiersData[n] = {
729
+ referenceClippingOffsets: c,
730
+ popperEscapeOffsets: l,
731
+ isReferenceHidden: u,
732
+ hasPopperEscaped: d
733
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
734
+ "data-popper-reference-hidden": u,
735
+ "data-popper-escaped": d
736
+ });
737
+ }
738
+ var hide_default = {
739
+ name: "hide",
740
+ enabled: !0,
741
+ phase: "main",
742
+ requiresIfExists: ["preventOverflow"],
743
+ fn: hide
480
744
  };
481
- function Tt(i) {
482
- return i.replace(/left|right|bottom|top/g, function(t) {
483
- return ri[t];
484
- });
485
- }
486
- var oi = {
487
- start: "end",
488
- end: "start"
745
+ function distanceAndSkiddingToXY(e, t, n) {
746
+ var r = getBasePlacement(e), i = ["left", "top"].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, o = a[0], s = a[1];
747
+ return o ||= 0, s = (s || 0) * i, ["left", "right"].indexOf(r) >= 0 ? {
748
+ x: s,
749
+ y: o
750
+ } : {
751
+ x: o,
752
+ y: s
753
+ };
754
+ }
755
+ function offset(e) {
756
+ var t = e.state, n = e.options, r = e.name, i = n.offset, a = i === void 0 ? [0, 0] : i, o = placements.reduce(function(e, n) {
757
+ return e[n] = distanceAndSkiddingToXY(n, t.rects, a), e;
758
+ }, {}), s = o[t.placement], c = s.x, l = s.y;
759
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += c, t.modifiersData.popperOffsets.y += l), t.modifiersData[r] = o;
760
+ }
761
+ var offset_default = {
762
+ name: "offset",
763
+ enabled: !0,
764
+ phase: "main",
765
+ requires: ["popperOffsets"],
766
+ fn: offset
489
767
  };
490
- function te(i) {
491
- return i.replace(/start|end/g, function(t) {
492
- return oi[t];
493
- });
494
- }
495
- function $t(i) {
496
- var t = H(i), e = t.pageXOffset, n = t.pageYOffset;
497
- return {
498
- scrollLeft: e,
499
- scrollTop: n
500
- };
501
- }
502
- function At(i) {
503
- return ot(q(i)).left + $t(i).scrollLeft;
504
- }
505
- function si(i, t) {
506
- var e = H(i), n = q(i), r = e.visualViewport, s = n.clientWidth, l = n.clientHeight, o = 0, a = 0;
507
- if (r) {
508
- s = r.width, l = r.height;
509
- var h = ce();
510
- (h || !h && t === "fixed") && (o = r.offsetLeft, a = r.offsetTop);
511
- }
512
- return {
513
- width: s,
514
- height: l,
515
- x: o + At(i),
516
- y: a
517
- };
518
- }
519
- function ai(i) {
520
- var t, e = q(i), n = $t(i), r = (t = i.ownerDocument) == null ? void 0 : t.body, s = Q(e.scrollWidth, e.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), l = Q(e.scrollHeight, e.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), o = -n.scrollLeft + At(i), a = -n.scrollTop;
521
- return B(r || e).direction === "rtl" && (o += Q(e.clientWidth, r ? r.clientWidth : 0) - s), {
522
- width: s,
523
- height: l,
524
- x: o,
525
- y: a
526
- };
527
- }
528
- function Ft(i) {
529
- var t = B(i), e = t.overflow, n = t.overflowX, r = t.overflowY;
530
- return /auto|scroll|overlay|hidden/.test(e + r + n);
531
- }
532
- function pe(i) {
533
- return ["html", "body", "#document"].indexOf(W(i)) >= 0 ? i.ownerDocument.body : j(i) && Ft(i) ? i : pe(kt(i));
534
- }
535
- function dt(i, t) {
536
- var e;
537
- t === void 0 && (t = []);
538
- var n = pe(i), r = n === ((e = i.ownerDocument) == null ? void 0 : e.body), s = H(n), l = r ? [s].concat(s.visualViewport || [], Ft(n) ? n : []) : n, o = t.concat(l);
539
- return r ? o : (
540
- // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
541
- o.concat(dt(kt(l)))
542
- );
543
- }
544
- function Yt(i) {
545
- return Object.assign({}, i, {
546
- left: i.x,
547
- top: i.y,
548
- right: i.x + i.width,
549
- bottom: i.y + i.height
550
- });
551
- }
552
- function li(i, t) {
553
- var e = ot(i, !1, t === "fixed");
554
- return e.top = e.top + i.clientTop, e.left = e.left + i.clientLeft, e.bottom = e.top + i.clientHeight, e.right = e.left + i.clientWidth, e.width = i.clientWidth, e.height = i.clientHeight, e.x = e.left, e.y = e.top, e;
555
- }
556
- function ee(i, t, e) {
557
- return t === ae ? Yt(si(i, e)) : tt(t) ? li(t, e) : Yt(ai(q(i)));
558
- }
559
- function ci(i) {
560
- var t = dt(kt(i)), e = ["absolute", "fixed"].indexOf(B(i).position) >= 0, n = e && j(i) ? mt(i) : i;
561
- return tt(n) ? t.filter(function(r) {
562
- return tt(r) && ue(r, n) && W(r) !== "body";
563
- }) : [];
564
- }
565
- function ui(i, t, e, n) {
566
- var r = t === "clippingParents" ? ci(i) : [].concat(t), s = [].concat(r, [e]), l = s[0], o = s.reduce(function(a, h) {
567
- var u = ee(i, h, n);
568
- return a.top = Q(u.top, a.top), a.right = Ot(u.right, a.right), a.bottom = Ot(u.bottom, a.bottom), a.left = Q(u.left, a.left), a;
569
- }, ee(i, l, n));
570
- return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
571
- }
572
- function ve(i) {
573
- var t = i.reference, e = i.element, n = i.placement, r = n ? V(n) : null, s = n ? st(n) : null, l = t.x + t.width / 2 - e.width / 2, o = t.y + t.height / 2 - e.height / 2, a;
574
- switch (r) {
575
- case C:
576
- a = {
577
- x: l,
578
- y: t.y - e.height
579
- };
580
- break;
581
- case R:
582
- a = {
583
- x: l,
584
- y: t.y + t.height
585
- };
586
- break;
587
- case $:
588
- a = {
589
- x: t.x + t.width,
590
- y: o
591
- };
592
- break;
593
- case Y:
594
- a = {
595
- x: t.x - e.width,
596
- y: o
597
- };
598
- break;
599
- default:
600
- a = {
601
- x: t.x,
602
- y: t.y
603
- };
604
- }
605
- var h = r ? Rt(r) : null;
606
- if (h != null) {
607
- var u = h === "y" ? "height" : "width";
608
- switch (s) {
609
- case nt:
610
- a[h] = a[h] - (t[u] / 2 - e[u] / 2);
611
- break;
612
- case ft:
613
- a[h] = a[h] + (t[u] / 2 - e[u] / 2);
614
- break;
615
- }
616
- }
617
- return a;
618
- }
619
- function pt(i, t) {
620
- t === void 0 && (t = {});
621
- var e = t, n = e.placement, r = n === void 0 ? i.placement : n, s = e.strategy, l = s === void 0 ? i.strategy : s, o = e.boundary, a = o === void 0 ? Pe : o, h = e.rootBoundary, u = h === void 0 ? ae : h, p = e.elementContext, y = p === void 0 ? ct : p, d = e.altBoundary, m = d === void 0 ? !1 : d, v = e.padding, g = v === void 0 ? 0 : v, w = de(typeof g != "number" ? g : fe(g, vt)), c = y === ct ? Le : ct, f = i.rects.popper, b = i.elements[m ? c : y], E = ui(tt(b) ? b : b.contextElement || q(i.elements.popper), a, u, l), x = ot(i.elements.reference), T = ve({
622
- reference: x,
623
- element: f,
624
- placement: r
625
- }), S = Yt(Object.assign({}, f, T)), M = y === ct ? S : x, _ = {
626
- top: E.top - M.top + w.top,
627
- bottom: M.bottom - E.bottom + w.bottom,
628
- left: E.left - M.left + w.left,
629
- right: M.right - E.right + w.right
630
- }, O = i.modifiersData.offset;
631
- if (y === ct && O) {
632
- var D = O[r];
633
- Object.keys(_).forEach(function(P) {
634
- var A = [$, R].indexOf(P) >= 0 ? 1 : -1, I = [C, R].indexOf(P) >= 0 ? "y" : "x";
635
- _[P] += D[I] * A;
636
- });
637
- }
638
- return _;
639
- }
640
- function hi(i, t) {
641
- t === void 0 && (t = {});
642
- var e = t, n = e.placement, r = e.boundary, s = e.rootBoundary, l = e.padding, o = e.flipVariations, a = e.allowedAutoPlacements, h = a === void 0 ? le : a, u = st(n), p = u ? o ? Gt : Gt.filter(function(m) {
643
- return st(m) === u;
644
- }) : vt, y = p.filter(function(m) {
645
- return h.indexOf(m) >= 0;
646
- });
647
- y.length === 0 && (y = p);
648
- var d = y.reduce(function(m, v) {
649
- return m[v] = pt(i, {
650
- placement: v,
651
- boundary: r,
652
- rootBoundary: s,
653
- padding: l
654
- })[V(v)], m;
655
- }, {});
656
- return Object.keys(d).sort(function(m, v) {
657
- return d[m] - d[v];
658
- });
659
- }
660
- function di(i) {
661
- if (V(i) === Xt)
662
- return [];
663
- var t = Tt(i);
664
- return [te(i), t, te(t)];
665
- }
666
- function fi(i) {
667
- var t = i.state, e = i.options, n = i.name;
668
- if (!t.modifiersData[n]._skip) {
669
- for (var r = e.mainAxis, s = r === void 0 ? !0 : r, l = e.altAxis, o = l === void 0 ? !0 : l, a = e.fallbackPlacements, h = e.padding, u = e.boundary, p = e.rootBoundary, y = e.altBoundary, d = e.flipVariations, m = d === void 0 ? !0 : d, v = e.allowedAutoPlacements, g = t.options.placement, w = V(g), c = w === g, f = a || (c || !m ? [Tt(g)] : di(g)), b = [g].concat(f).reduce(function(et, N) {
670
- return et.concat(V(N) === Xt ? hi(t, {
671
- placement: N,
672
- boundary: u,
673
- rootBoundary: p,
674
- padding: h,
675
- flipVariations: m,
676
- allowedAutoPlacements: v
677
- }) : N);
678
- }, []), E = t.rects.reference, x = t.rects.popper, T = /* @__PURE__ */ new Map(), S = !0, M = b[0], _ = 0; _ < b.length; _++) {
679
- var O = b[_], D = V(O), P = st(O) === nt, A = [C, R].indexOf(D) >= 0, I = A ? "width" : "height", X = pt(t, {
680
- placement: O,
681
- boundary: u,
682
- rootBoundary: p,
683
- altBoundary: y,
684
- padding: h
685
- }), F = A ? P ? $ : Y : P ? R : C;
686
- E[I] > x[I] && (F = Tt(F));
687
- var gt = Tt(F), z = [];
688
- if (s && z.push(X[D] <= 0), o && z.push(X[F] <= 0, X[gt] <= 0), z.every(function(et) {
689
- return et;
690
- })) {
691
- M = O, S = !1;
692
- break;
693
- }
694
- T.set(O, z);
695
- }
696
- if (S)
697
- for (var yt = m ? 3 : 1, Mt = function(N) {
698
- var lt = b.find(function(wt) {
699
- var U = T.get(wt);
700
- if (U)
701
- return U.slice(0, N).every(function(St) {
702
- return St;
703
- });
704
- });
705
- if (lt)
706
- return M = lt, "break";
707
- }, at = yt; at > 0; at--) {
708
- var bt = Mt(at);
709
- if (bt === "break") break;
710
- }
711
- t.placement !== M && (t.modifiersData[n]._skip = !0, t.placement = M, t.reset = !0);
712
- }
713
- }
714
- const pi = {
715
- name: "flip",
716
- enabled: !0,
717
- phase: "main",
718
- fn: fi,
719
- requiresIfExists: ["offset"],
720
- data: {
721
- _skip: !1
722
- }
768
+ function popperOffsets(e) {
769
+ var t = e.state, n = e.name;
770
+ t.modifiersData[n] = computeOffsets({
771
+ reference: t.rects.reference,
772
+ element: t.rects.popper,
773
+ strategy: "absolute",
774
+ placement: t.placement
775
+ });
776
+ }
777
+ var popperOffsets_default = {
778
+ name: "popperOffsets",
779
+ enabled: !0,
780
+ phase: "read",
781
+ fn: popperOffsets,
782
+ data: {}
723
783
  };
724
- function ie(i, t, e) {
725
- return e === void 0 && (e = {
726
- x: 0,
727
- y: 0
728
- }), {
729
- top: i.top - t.height - e.y,
730
- right: i.right - t.width + e.x,
731
- bottom: i.bottom - t.height + e.y,
732
- left: i.left - t.width - e.x
733
- };
734
- }
735
- function ne(i) {
736
- return [C, $, R, Y].some(function(t) {
737
- return i[t] >= 0;
738
- });
739
- }
740
- function vi(i) {
741
- var t = i.state, e = i.name, n = t.rects.reference, r = t.rects.popper, s = t.modifiersData.preventOverflow, l = pt(t, {
742
- elementContext: "reference"
743
- }), o = pt(t, {
744
- altBoundary: !0
745
- }), a = ie(l, n), h = ie(o, r, s), u = ne(a), p = ne(h);
746
- t.modifiersData[e] = {
747
- referenceClippingOffsets: a,
748
- popperEscapeOffsets: h,
749
- isReferenceHidden: u,
750
- hasPopperEscaped: p
751
- }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
752
- "data-popper-reference-hidden": u,
753
- "data-popper-escaped": p
754
- });
755
- }
756
- const mi = {
757
- name: "hide",
758
- enabled: !0,
759
- phase: "main",
760
- requiresIfExists: ["preventOverflow"],
761
- fn: vi
784
+ function getAltAxis(e) {
785
+ return e === "x" ? "y" : "x";
786
+ }
787
+ function preventOverflow(e) {
788
+ var t = e.state, n = e.options, r = e.name, i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !1 : o, c = n.boundary, l = n.rootBoundary, u = n.altBoundary, d = n.padding, f = n.tether, p = f === void 0 ? !0 : f, m = n.tetherOffset, h = m === void 0 ? 0 : m, g = detectOverflow(t, {
789
+ boundary: c,
790
+ rootBoundary: l,
791
+ padding: d,
792
+ altBoundary: u
793
+ }), _ = getBasePlacement(t.placement), x = getVariation(t.placement), S = !x, C = getMainAxisFromPlacement(_), w = getAltAxis(C), T = t.modifiersData.popperOffsets, E = t.rects.reference, D = t.rects.popper, O = typeof h == "function" ? h(Object.assign({}, t.rects, { placement: t.placement })) : h, k = typeof O == "number" ? {
794
+ mainAxis: O,
795
+ altAxis: O
796
+ } : Object.assign({
797
+ mainAxis: 0,
798
+ altAxis: 0
799
+ }, O), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, j = {
800
+ x: 0,
801
+ y: 0
802
+ };
803
+ if (T) {
804
+ if (a) {
805
+ var M = C === "y" ? "top" : left, N = C === "y" ? bottom : right, P = C === "y" ? "height" : "width", F = T[C], I = F + g[M], L = F - g[N], R = p ? -D[P] / 2 : 0, z = x === "start" ? E[P] : D[P], at = x === "start" ? -D[P] : -E[P], B = t.elements.arrow, ot = p && B ? getLayoutRect(B) : {
806
+ width: 0,
807
+ height: 0
808
+ }, V = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : getFreshSideObject(), H = V[M], U = V[N], W = within(0, E[P], ot[P]), st = S ? E[P] / 2 - R - W - H - k.mainAxis : z - W - H - k.mainAxis, ct = S ? -E[P] / 2 + R + W + U + k.mainAxis : at + W + U + k.mainAxis, G = t.elements.arrow && getOffsetParent(t.elements.arrow), lt = G ? C === "y" ? G.clientTop || 0 : G.clientLeft || 0 : 0, K = A?.[C] ?? 0, ut = F + st - K - lt, dt = F + ct - K, q = within(p ? min(I, ut) : I, F, p ? max(L, dt) : L);
809
+ T[C] = q, j[C] = q - F;
810
+ }
811
+ if (s) {
812
+ var ft = C === "x" ? "top" : left, pt = C === "x" ? bottom : right, J = T[w], Y = w === "y" ? "height" : "width", X = J + g[ft], Z = J - g[pt], Q = ["top", left].indexOf(_) !== -1, $ = A?.[w] ?? 0, mt = Q ? X : J - E[Y] - D[Y] - $ + k.altAxis, ht = Q ? J + E[Y] + D[Y] - $ - k.altAxis : Z, gt = p && Q ? withinMaxClamp(mt, J, ht) : within(p ? mt : X, J, p ? ht : Z);
813
+ T[w] = gt, j[w] = gt - J;
814
+ }
815
+ t.modifiersData[r] = j;
816
+ }
817
+ }
818
+ var preventOverflow_default = {
819
+ name: "preventOverflow",
820
+ enabled: !0,
821
+ phase: "main",
822
+ fn: preventOverflow,
823
+ requiresIfExists: ["offset"]
762
824
  };
763
- function gi(i, t, e) {
764
- var n = V(i), r = [Y, C].indexOf(n) >= 0 ? -1 : 1, s = typeof e == "function" ? e(Object.assign({}, t, {
765
- placement: i
766
- })) : e, l = s[0], o = s[1];
767
- return l = l || 0, o = (o || 0) * r, [Y, $].indexOf(n) >= 0 ? {
768
- x: o,
769
- y: l
770
- } : {
771
- x: l,
772
- y: o
773
- };
774
- }
775
- function yi(i) {
776
- var t = i.state, e = i.options, n = i.name, r = e.offset, s = r === void 0 ? [0, 0] : r, l = le.reduce(function(u, p) {
777
- return u[p] = gi(p, t.rects, s), u;
778
- }, {}), o = l[t.placement], a = o.x, h = o.y;
779
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += h), t.modifiersData[n] = l;
780
- }
781
- const bi = {
782
- name: "offset",
783
- enabled: !0,
784
- phase: "main",
785
- requires: ["popperOffsets"],
786
- fn: yi
825
+ function getHTMLElementScroll(e) {
826
+ return {
827
+ scrollLeft: e.scrollLeft,
828
+ scrollTop: e.scrollTop
829
+ };
830
+ }
831
+ function getNodeScroll(e) {
832
+ return e === getWindow(e) || !isHTMLElement(e) ? getWindowScroll(e) : getHTMLElementScroll(e);
833
+ }
834
+ function isElementScaled(e) {
835
+ var t = e.getBoundingClientRect(), n = round(t.width) / e.offsetWidth || 1, r = round(t.height) / e.offsetHeight || 1;
836
+ return n !== 1 || r !== 1;
837
+ }
838
+ function getCompositeRect(e, t, n) {
839
+ n === void 0 && (n = !1);
840
+ var r = isHTMLElement(t), i = isHTMLElement(t) && isElementScaled(t), a = getDocumentElement(t), o = getBoundingClientRect(e, i, n), s = {
841
+ scrollLeft: 0,
842
+ scrollTop: 0
843
+ }, c = {
844
+ x: 0,
845
+ y: 0
846
+ };
847
+ return (r || !r && !n) && ((getNodeName(t) !== "body" || isScrollParent(a)) && (s = getNodeScroll(t)), isHTMLElement(t) ? (c = getBoundingClientRect(t, !0), c.x += t.clientLeft, c.y += t.clientTop) : a && (c.x = getWindowScrollBarX(a))), {
848
+ x: o.left + s.scrollLeft - c.x,
849
+ y: o.top + s.scrollTop - c.y,
850
+ width: o.width,
851
+ height: o.height
852
+ };
853
+ }
854
+ function order(e) {
855
+ var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
856
+ e.forEach(function(e) {
857
+ t.set(e.name, e);
858
+ });
859
+ function i(e) {
860
+ n.add(e.name), [].concat(e.requires || [], e.requiresIfExists || []).forEach(function(e) {
861
+ if (!n.has(e)) {
862
+ var r = t.get(e);
863
+ r && i(r);
864
+ }
865
+ }), r.push(e);
866
+ }
867
+ return e.forEach(function(e) {
868
+ n.has(e.name) || i(e);
869
+ }), r;
870
+ }
871
+ function orderModifiers(e) {
872
+ var t = order(e);
873
+ return modifierPhases.reduce(function(e, n) {
874
+ return e.concat(t.filter(function(e) {
875
+ return e.phase === n;
876
+ }));
877
+ }, []);
878
+ }
879
+ function debounce(e) {
880
+ var t;
881
+ return function() {
882
+ return t ||= new Promise(function(n) {
883
+ Promise.resolve().then(function() {
884
+ t = void 0, n(e());
885
+ });
886
+ }), t;
887
+ };
888
+ }
889
+ function mergeByName(e) {
890
+ var t = e.reduce(function(e, t) {
891
+ var n = e[t.name];
892
+ return e[t.name] = n ? Object.assign({}, n, t, {
893
+ options: Object.assign({}, n.options, t.options),
894
+ data: Object.assign({}, n.data, t.data)
895
+ }) : t, e;
896
+ }, {});
897
+ return Object.keys(t).map(function(e) {
898
+ return t[e];
899
+ });
900
+ }
901
+ var DEFAULT_OPTIONS = {
902
+ placement: "bottom",
903
+ modifiers: [],
904
+ strategy: "absolute"
787
905
  };
788
- function wi(i) {
789
- var t = i.state, e = i.name;
790
- t.modifiersData[e] = ve({
791
- reference: t.rects.reference,
792
- element: t.rects.popper,
793
- placement: t.placement
794
- });
795
- }
796
- const xi = {
797
- name: "popperOffsets",
798
- enabled: !0,
799
- phase: "read",
800
- fn: wi,
801
- data: {}
906
+ function areValidElements() {
907
+ return ![...arguments].some(function(e) {
908
+ return !(e && typeof e.getBoundingClientRect == "function");
909
+ });
910
+ }
911
+ function popperGenerator(e) {
912
+ e === void 0 && (e = {});
913
+ var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, i = t.defaultOptions, a = i === void 0 ? DEFAULT_OPTIONS : i;
914
+ return function(e, t, n) {
915
+ n === void 0 && (n = a);
916
+ var i = {
917
+ placement: "bottom",
918
+ orderedModifiers: [],
919
+ options: Object.assign({}, DEFAULT_OPTIONS, a),
920
+ modifiersData: {},
921
+ elements: {
922
+ reference: e,
923
+ popper: t
924
+ },
925
+ attributes: {},
926
+ styles: {}
927
+ }, o = [], s = !1, c = {
928
+ state: i,
929
+ setOptions: function(n) {
930
+ var o = typeof n == "function" ? n(i.options) : n;
931
+ u(), i.options = Object.assign({}, a, i.options, o), i.scrollParents = {
932
+ reference: isElement(e) ? listScrollParents(e) : e.contextElement ? listScrollParents(e.contextElement) : [],
933
+ popper: listScrollParents(t)
934
+ };
935
+ var s = orderModifiers(mergeByName([].concat(r, i.options.modifiers)));
936
+ return i.orderedModifiers = s.filter(function(e) {
937
+ return e.enabled;
938
+ }), l(), c.update();
939
+ },
940
+ forceUpdate: function() {
941
+ if (!s) {
942
+ var e = i.elements, t = e.reference, n = e.popper;
943
+ if (areValidElements(t, n)) {
944
+ i.rects = {
945
+ reference: getCompositeRect(t, getOffsetParent(n), i.options.strategy === "fixed"),
946
+ popper: getLayoutRect(n)
947
+ }, i.reset = !1, i.placement = i.options.placement, i.orderedModifiers.forEach(function(e) {
948
+ return i.modifiersData[e.name] = Object.assign({}, e.data);
949
+ });
950
+ for (var r = 0; r < i.orderedModifiers.length; r++) {
951
+ if (i.reset === !0) {
952
+ i.reset = !1, r = -1;
953
+ continue;
954
+ }
955
+ var a = i.orderedModifiers[r], o = a.fn, l = a.options, u = l === void 0 ? {} : l, d = a.name;
956
+ typeof o == "function" && (i = o({
957
+ state: i,
958
+ options: u,
959
+ name: d,
960
+ instance: c
961
+ }) || i);
962
+ }
963
+ }
964
+ }
965
+ },
966
+ update: debounce(function() {
967
+ return new Promise(function(e) {
968
+ c.forceUpdate(), e(i);
969
+ });
970
+ }),
971
+ destroy: function() {
972
+ u(), s = !0;
973
+ }
974
+ };
975
+ if (!areValidElements(e, t)) return c;
976
+ c.setOptions(n).then(function(e) {
977
+ !s && n.onFirstUpdate && n.onFirstUpdate(e);
978
+ });
979
+ function l() {
980
+ i.orderedModifiers.forEach(function(e) {
981
+ var t = e.name, n = e.options, r = n === void 0 ? {} : n, a = e.effect;
982
+ if (typeof a == "function") {
983
+ var s = a({
984
+ state: i,
985
+ name: t,
986
+ instance: c,
987
+ options: r
988
+ });
989
+ o.push(s || function() {});
990
+ }
991
+ });
992
+ }
993
+ function u() {
994
+ o.forEach(function(e) {
995
+ return e();
996
+ }), o = [];
997
+ }
998
+ return c;
999
+ };
1000
+ }
1001
+ var createPopper = /* @__PURE__ */ popperGenerator({ defaultModifiers: [
1002
+ eventListeners_default,
1003
+ popperOffsets_default,
1004
+ computeStyles_default,
1005
+ applyStyles_default,
1006
+ offset_default,
1007
+ flip_default,
1008
+ preventOverflow_default,
1009
+ arrow_default,
1010
+ hide_default
1011
+ ] }), TinyGesture = class e {
1012
+ constructor(t, n) {
1013
+ this.element = t, this.touch1 = null, this.touch2 = null, this.touchStartX = null, this.touchStartY = null, this.touchEndX = null, this.touchEndY = null, this.touchMove1 = null, this.touchMove2 = null, this.touchMoveX = null, this.touchMoveY = null, this.velocityX = null, this.velocityY = null, this.longPressTimer = null, this.doubleTapTimer = null, this.doubleTapWaiting = !1, this.thresholdX = 0, this.thresholdY = 0, this.disregardVelocityThresholdX = 0, this.disregardVelocityThresholdY = 0, this.swipingHorizontal = !1, this.swipingVertical = !1, this.swipingDirection = null, this.swipedHorizontal = !1, this.swipedVertical = !1, this.originalDistance = null, this.newDistance = null, this.scale = null, this.originalAngle = null, this.newAngle = null, this.rotation = null, this.handlers = {
1014
+ panstart: [],
1015
+ panmove: [],
1016
+ panend: [],
1017
+ swipeleft: [],
1018
+ swiperight: [],
1019
+ swipeup: [],
1020
+ swipedown: [],
1021
+ tap: [],
1022
+ doubletap: [],
1023
+ longpress: [],
1024
+ pinch: [],
1025
+ pinchend: [],
1026
+ rotate: [],
1027
+ rotateend: []
1028
+ }, this._onTouchStart = this.onTouchStart.bind(this), this._onTouchMove = this.onTouchMove.bind(this), this._onTouchEnd = this.onTouchEnd.bind(this), this.opts = Object.assign({}, e.defaults, n), this.element.addEventListener("touchstart", this._onTouchStart, passiveIfSupported), this.element.addEventListener("touchmove", this._onTouchMove, passiveIfSupported), this.element.addEventListener("touchend", this._onTouchEnd, passiveIfSupported), this.opts.mouseSupport && !("ontouchstart" in window) && (this.element.addEventListener("mousedown", this._onTouchStart, passiveIfSupported), document.addEventListener("mousemove", this._onTouchMove, passiveIfSupported), document.addEventListener("mouseup", this._onTouchEnd, passiveIfSupported));
1029
+ }
1030
+ destroy() {
1031
+ this.element.removeEventListener("touchstart", this._onTouchStart), this.element.removeEventListener("touchmove", this._onTouchMove), this.element.removeEventListener("touchend", this._onTouchEnd), this.element.removeEventListener("mousedown", this._onTouchStart), document.removeEventListener("mousemove", this._onTouchMove), document.removeEventListener("mouseup", this._onTouchEnd), clearTimeout(this.longPressTimer ?? void 0), clearTimeout(this.doubleTapTimer ?? void 0);
1032
+ }
1033
+ on(e, t) {
1034
+ if (this.handlers[e]) return this.handlers[e].push(t), {
1035
+ type: e,
1036
+ fn: t,
1037
+ cancel: () => this.off(e, t)
1038
+ };
1039
+ }
1040
+ off(e, t) {
1041
+ if (this.handlers[e]) {
1042
+ let n = this.handlers[e].indexOf(t);
1043
+ n !== -1 && this.handlers[e].splice(n, 1);
1044
+ }
1045
+ }
1046
+ fire(e, t) {
1047
+ for (let n = 0; n < this.handlers[e].length; n++) this.handlers[e][n](t);
1048
+ }
1049
+ onTouchStart(e) {
1050
+ let t = !1;
1051
+ if (e.type !== "mousedown") {
1052
+ if (this.touch1 || (this.touch1 = e.changedTouches[0], t = !0), (t && e.changedTouches.length > 1 || !t) && !this.touch2) {
1053
+ this.touch2 = [...e.changedTouches].find((e) => e.identifier !== this.touch1?.identifier) || null, this.originalDistance = Math.sqrt(((this.touch2?.screenX ?? 0) - (this.touchMove1?.screenX ?? this.touch1?.screenX ?? 0)) ** 2 + ((this.touch2?.screenY ?? 0) - (this.touchMove1?.screenY ?? this.touch1?.screenY ?? 0)) ** 2), this.originalAngle = Math.atan2((this.touch2?.screenY ?? 0) - (this.touchMove1?.screenY ?? this.touch1?.screenY ?? 0), (this.touch2?.screenX ?? 0) - (this.touchMove1?.screenX ?? this.touch1?.screenX ?? 0)) / (Math.PI / 180);
1054
+ return;
1055
+ }
1056
+ if (!t) return;
1057
+ }
1058
+ (t || e.type === "mousedown") && (this.thresholdX = this.opts.threshold("x", this), this.thresholdY = this.opts.threshold("y", this), this.disregardVelocityThresholdX = this.opts.disregardVelocityThreshold("x", this), this.disregardVelocityThresholdY = this.opts.disregardVelocityThreshold("y", this), this.touchStartX = e.type === "mousedown" ? e.screenX : this.touch1?.screenX || 0, this.touchStartY = e.type === "mousedown" ? e.screenY : this.touch1?.screenY || 0, this.touchMoveX = null, this.touchMoveY = null, this.touchEndX = null, this.touchEndY = null, this.swipingDirection = null, this.longPressTimer = setTimeout(() => this.fire("longpress", e), this.opts.longPressTime), this.scale = 1, this.rotation = 0, this.fire("panstart", e));
1059
+ }
1060
+ onTouchMove(e) {
1061
+ if (e.type === "mousemove" && (!this.touchStartX || this.touchEndX !== null)) return;
1062
+ let t, n;
1063
+ if (e.type !== "mousemove" && (t = [...e.changedTouches].find((e) => e.identifier === this.touch1?.identifier), this.touchMove1 = t || this.touchMove1, n = [...e.changedTouches].find((e) => e.identifier === this.touch2?.identifier), this.touchMove2 = n || this.touchMove2), e.type === "mousemove" || t) {
1064
+ let n = (e.type === "mousemove" ? e.screenX : t?.screenX ?? 0) - (this.touchStartX ?? 0);
1065
+ this.velocityX = n - (this.touchMoveX ?? 0), this.touchMoveX = n;
1066
+ let r = (e.type === "mousemove" ? e.screenY : t?.screenY ?? 0) - (this.touchStartY ?? 0);
1067
+ this.velocityY = r - (this.touchMoveY ?? 0), this.touchMoveY = r;
1068
+ let i = Math.abs(this.touchMoveX), a = Math.abs(this.touchMoveY);
1069
+ this.swipingHorizontal = i > this.thresholdX, this.swipingVertical = a > this.thresholdY, this.swipingDirection = i > a ? this.swipingHorizontal ? "horizontal" : "pre-horizontal" : this.swipingVertical ? "vertical" : "pre-vertical", Math.max(i, a) > this.opts.pressThreshold && clearTimeout(this.longPressTimer ?? void 0), this.fire("panmove", e);
1070
+ }
1071
+ e.type !== "mousemove" && this.touchMove1 != null && this.touchMove2 != null && (this.newDistance = Math.sqrt((this.touchMove2.screenX - this.touchMove1.screenX) ** 2 + (this.touchMove2.screenY - this.touchMove1.screenY) ** 2), this.scale = this.newDistance / (this.originalDistance ?? 0), this.fire("pinch", e), this.newAngle = Math.atan2((this.touchMove2.screenY ?? 0) - (this.touchMove1.screenY ?? 0), (this.touchMove2.screenX ?? 0) - (this.touchMove1.screenX ?? 0)) / (Math.PI / 180), this.rotation = this.newAngle - (this.originalAngle ?? 0), this.fire("rotate", e));
1072
+ }
1073
+ onTouchEnd(e) {
1074
+ let t;
1075
+ if (e.type !== "mouseup" && (t = [...e.changedTouches].find((e) => e.identifier === this.touch1?.identifier), [...e.touches].find((e) => e.identifier === this.touch1?.identifier) || (this.touch1 = null, this.touchMove1 = null), [...e.touches].find((e) => e.identifier === this.touch2?.identifier) || (this.touch2 = null, this.touchMove2 = null)), !(e.type === "mouseup" && (!this.touchStartX || this.touchEndX !== null))) {
1076
+ if (e.type === "mouseup" || t) {
1077
+ this.touchEndX = e.type === "mouseup" ? e.screenX : t?.screenX ?? 0, this.touchEndY = e.type === "mouseup" ? e.screenY : t?.screenY ?? 0, this.fire("panend", e), clearTimeout(this.longPressTimer ?? void 0);
1078
+ let n = this.touchEndX - (this.touchStartX ?? 0), r = Math.abs(n), i = this.touchEndY - (this.touchStartY ?? 0), a = Math.abs(i), o = Math.sqrt(n ** 2 + i ** 2), s = Math.abs(o), c = a / r;
1079
+ r > this.thresholdX || a > this.thresholdY || this.opts.diagonalSwipes && (s > this.thresholdX || s > this.thresholdY) ? (this.swipedHorizontal = r > this.thresholdX || this.opts.diagonalSwipes && s > this.thresholdX, this.swipedVertical = a > this.thresholdY || this.opts.diagonalSwipes && s > this.thresholdY, (!this.opts.diagonalSwipes || c < Math.tan((45 - this.opts.diagonalLimit) * Math.PI / 180) || c > Math.tan((45 + this.opts.diagonalLimit) * Math.PI / 180)) && (r >= a && (this.swipedVertical = !1), a > r && (this.swipedHorizontal = !1)), this.swipedHorizontal && (n < 0 ? ((this.velocityX ?? 0) < -this.opts.velocityThreshold || o < -this.disregardVelocityThresholdX) && this.fire("swipeleft", e) : ((this.velocityX ?? 0) > this.opts.velocityThreshold || o > this.disregardVelocityThresholdX) && this.fire("swiperight", e)), this.swipedVertical && (i < 0 ? ((this.velocityY ?? 0) < -this.opts.velocityThreshold || o < -this.disregardVelocityThresholdY) && this.fire("swipeup", e) : ((this.velocityY ?? 0) > this.opts.velocityThreshold || o > this.disregardVelocityThresholdY) && this.fire("swipedown", e))) : r < this.opts.pressThreshold && a < this.opts.pressThreshold && (this.doubleTapWaiting ? (this.doubleTapWaiting = !1, clearTimeout(this.doubleTapTimer ?? void 0), this.fire("doubletap", e)) : (this.doubleTapWaiting = !0, this.doubleTapTimer = setTimeout(() => this.doubleTapWaiting = !1, this.opts.doubleTapTime), this.fire("tap", e)));
1080
+ }
1081
+ !this.touch1 && !this.touch2 && (this.fire("pinchend", e), this.fire("rotateend", e), this.originalDistance = null, this.newDistance = null, this.scale = null, this.originalAngle = null, this.newAngle = null, this.rotation = null);
1082
+ }
1083
+ }
802
1084
  };
803
- function Ei(i) {
804
- return i === "x" ? "y" : "x";
805
- }
806
- function Ti(i) {
807
- var t = i.state, e = i.options, n = i.name, r = e.mainAxis, s = r === void 0 ? !0 : r, l = e.altAxis, o = l === void 0 ? !1 : l, a = e.boundary, h = e.rootBoundary, u = e.altBoundary, p = e.padding, y = e.tether, d = y === void 0 ? !0 : y, m = e.tetherOffset, v = m === void 0 ? 0 : m, g = pt(t, {
808
- boundary: a,
809
- rootBoundary: h,
810
- padding: p,
811
- altBoundary: u
812
- }), w = V(t.placement), c = st(t.placement), f = !c, b = Rt(w), E = Ei(b), x = t.modifiersData.popperOffsets, T = t.rects.reference, S = t.rects.popper, M = typeof v == "function" ? v(Object.assign({}, t.rects, {
813
- placement: t.placement
814
- })) : v, _ = typeof M == "number" ? {
815
- mainAxis: M,
816
- altAxis: M
817
- } : Object.assign({
818
- mainAxis: 0,
819
- altAxis: 0
820
- }, M), O = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, D = {
821
- x: 0,
822
- y: 0
823
- };
824
- if (x) {
825
- if (s) {
826
- var P, A = b === "y" ? C : Y, I = b === "y" ? R : $, X = b === "y" ? "height" : "width", F = x[b], gt = F + g[A], z = F - g[I], yt = d ? -S[X] / 2 : 0, Mt = c === nt ? T[X] : S[X], at = c === nt ? -S[X] : -T[X], bt = t.elements.arrow, et = d && bt ? jt(bt) : {
827
- width: 0,
828
- height: 0
829
- }, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : he(), lt = N[A], wt = N[I], U = ht(0, T[X], et[X]), St = f ? T[X] / 2 - yt - U - lt - _.mainAxis : Mt - U - lt - _.mainAxis, me = f ? -T[X] / 2 + yt + U + wt + _.mainAxis : at + U + wt + _.mainAxis, Dt = t.elements.arrow && mt(t.elements.arrow), ge = Dt ? b === "y" ? Dt.clientTop || 0 : Dt.clientLeft || 0 : 0, Vt = (P = O?.[b]) != null ? P : 0, ye = F + St - Vt - ge, be = F + me - Vt, Wt = ht(d ? Ot(gt, ye) : gt, F, d ? Q(z, be) : z);
830
- x[b] = Wt, D[b] = Wt - F;
831
- }
832
- if (o) {
833
- var Bt, we = b === "x" ? C : Y, xe = b === "x" ? R : $, K = x[E], xt = E === "y" ? "height" : "width", Nt = K + g[we], qt = K - g[xe], Pt = [C, Y].indexOf(w) !== -1, It = (Bt = O?.[E]) != null ? Bt : 0, zt = Pt ? Nt : K - T[xt] - S[xt] - It + _.altAxis, Ut = Pt ? K + T[xt] + S[xt] - It - _.altAxis : qt, Kt = d && Pt ? ze(zt, K, Ut) : ht(d ? zt : Nt, K, d ? Ut : qt);
834
- x[E] = Kt, D[E] = Kt - K;
835
- }
836
- t.modifiersData[n] = D;
837
- }
838
- }
839
- const Oi = {
840
- name: "preventOverflow",
841
- enabled: !0,
842
- phase: "main",
843
- fn: Ti,
844
- requiresIfExists: ["offset"]
1085
+ TinyGesture.defaults = {
1086
+ threshold: (e, t) => Math.max(25, Math.floor(.15 * (e === "x" ? window.innerWidth || document.body.clientWidth : window.innerHeight || document.body.clientHeight))),
1087
+ velocityThreshold: 10,
1088
+ disregardVelocityThreshold: (e, t) => Math.floor(.5 * (e === "x" ? t.element.clientWidth : t.element.clientHeight)),
1089
+ pressThreshold: 8,
1090
+ diagonalSwipes: !1,
1091
+ diagonalLimit: 15,
1092
+ longPressTime: 500,
1093
+ doubleTapTime: 300,
1094
+ mouseSupport: !0
845
1095
  };
846
- function ki(i) {
847
- return {
848
- scrollLeft: i.scrollLeft,
849
- scrollTop: i.scrollTop
850
- };
851
- }
852
- function _i(i) {
853
- return i === H(i) || !j(i) ? $t(i) : ki(i);
854
- }
855
- function Mi(i) {
856
- var t = i.getBoundingClientRect(), e = rt(t.width) / i.offsetWidth || 1, n = rt(t.height) / i.offsetHeight || 1;
857
- return e !== 1 || n !== 1;
858
- }
859
- function Si(i, t, e) {
860
- e === void 0 && (e = !1);
861
- var n = j(t), r = j(t) && Mi(t), s = q(t), l = ot(i, r, e), o = {
862
- scrollLeft: 0,
863
- scrollTop: 0
864
- }, a = {
865
- x: 0,
866
- y: 0
867
- };
868
- return (n || !n && !e) && ((W(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
869
- Ft(s)) && (o = _i(t)), j(t) ? (a = ot(t, !0), a.x += t.clientLeft, a.y += t.clientTop) : s && (a.x = At(s))), {
870
- x: l.left + o.scrollLeft - a.x,
871
- y: l.top + o.scrollTop - a.y,
872
- width: l.width,
873
- height: l.height
874
- };
875
- }
876
- function Di(i) {
877
- var t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Set(), n = [];
878
- i.forEach(function(s) {
879
- t.set(s.name, s);
880
- });
881
- function r(s) {
882
- e.add(s.name);
883
- var l = [].concat(s.requires || [], s.requiresIfExists || []);
884
- l.forEach(function(o) {
885
- if (!e.has(o)) {
886
- var a = t.get(o);
887
- a && r(a);
888
- }
889
- }), n.push(s);
890
- }
891
- return i.forEach(function(s) {
892
- e.has(s.name) || r(s);
893
- }), n;
894
- }
895
- function Pi(i) {
896
- var t = Di(i);
897
- return Ve.reduce(function(e, n) {
898
- return e.concat(t.filter(function(r) {
899
- return r.phase === n;
900
- }));
901
- }, []);
902
- }
903
- function Li(i) {
904
- var t;
905
- return function() {
906
- return t || (t = new Promise(function(e) {
907
- Promise.resolve().then(function() {
908
- t = void 0, e(i());
909
- });
910
- })), t;
911
- };
912
- }
913
- function Ci(i) {
914
- var t = i.reduce(function(e, n) {
915
- var r = e[n.name];
916
- return e[n.name] = r ? Object.assign({}, r, n, {
917
- options: Object.assign({}, r.options, n.options),
918
- data: Object.assign({}, r.data, n.data)
919
- }) : n, e;
920
- }, {});
921
- return Object.keys(t).map(function(e) {
922
- return t[e];
923
- });
924
- }
925
- var re = {
926
- placement: "bottom",
927
- modifiers: [],
928
- strategy: "absolute"
929
- };
930
- function oe() {
931
- for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
932
- t[e] = arguments[e];
933
- return !t.some(function(n) {
934
- return !(n && typeof n.getBoundingClientRect == "function");
935
- });
936
- }
937
- function Yi(i) {
938
- i === void 0 && (i = {});
939
- var t = i, e = t.defaultModifiers, n = e === void 0 ? [] : e, r = t.defaultOptions, s = r === void 0 ? re : r;
940
- return function(o, a, h) {
941
- h === void 0 && (h = s);
942
- var u = {
943
- placement: "bottom",
944
- orderedModifiers: [],
945
- options: Object.assign({}, re, s),
946
- modifiersData: {},
947
- elements: {
948
- reference: o,
949
- popper: a
950
- },
951
- attributes: {},
952
- styles: {}
953
- }, p = [], y = !1, d = {
954
- state: u,
955
- setOptions: function(w) {
956
- var c = typeof w == "function" ? w(u.options) : w;
957
- v(), u.options = Object.assign({}, s, u.options, c), u.scrollParents = {
958
- reference: tt(o) ? dt(o) : o.contextElement ? dt(o.contextElement) : [],
959
- popper: dt(a)
960
- };
961
- var f = Pi(Ci([].concat(n, u.options.modifiers)));
962
- return u.orderedModifiers = f.filter(function(b) {
963
- return b.enabled;
964
- }), m(), d.update();
965
- },
966
- // Sync update – it will always be executed, even if not necessary. This
967
- // is useful for low frequency updates where sync behavior simplifies the
968
- // logic.
969
- // For high frequency updates (e.g. `resize` and `scroll` events), always
970
- // prefer the async Popper#update method
971
- forceUpdate: function() {
972
- if (!y) {
973
- var w = u.elements, c = w.reference, f = w.popper;
974
- if (oe(c, f)) {
975
- u.rects = {
976
- reference: Si(c, mt(f), u.options.strategy === "fixed"),
977
- popper: jt(f)
978
- }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(_) {
979
- return u.modifiersData[_.name] = Object.assign({}, _.data);
980
- });
981
- for (var b = 0; b < u.orderedModifiers.length; b++) {
982
- if (u.reset === !0) {
983
- u.reset = !1, b = -1;
984
- continue;
985
- }
986
- var E = u.orderedModifiers[b], x = E.fn, T = E.options, S = T === void 0 ? {} : T, M = E.name;
987
- typeof x == "function" && (u = x({
988
- state: u,
989
- options: S,
990
- name: M,
991
- instance: d
992
- }) || u);
993
- }
994
- }
995
- }
996
- },
997
- // Async and optimistically optimized update – it will not be executed if
998
- // not necessary (debounced to run at most once-per-tick)
999
- update: Li(function() {
1000
- return new Promise(function(g) {
1001
- d.forceUpdate(), g(u);
1002
- });
1003
- }),
1004
- destroy: function() {
1005
- v(), y = !0;
1006
- }
1007
- };
1008
- if (!oe(o, a))
1009
- return d;
1010
- d.setOptions(h).then(function(g) {
1011
- !y && h.onFirstUpdate && h.onFirstUpdate(g);
1012
- });
1013
- function m() {
1014
- u.orderedModifiers.forEach(function(g) {
1015
- var w = g.name, c = g.options, f = c === void 0 ? {} : c, b = g.effect;
1016
- if (typeof b == "function") {
1017
- var E = b({
1018
- state: u,
1019
- name: w,
1020
- instance: d,
1021
- options: f
1022
- }), x = function() {
1023
- };
1024
- p.push(E || x);
1025
- }
1026
- });
1027
- }
1028
- function v() {
1029
- p.forEach(function(g) {
1030
- return g();
1031
- }), p = [];
1032
- }
1033
- return d;
1034
- };
1035
- }
1036
- var Xi = [ni, xi, ei, Ne, bi, pi, Oi, Ge, mi], Hi = /* @__PURE__ */ Yi({
1037
- defaultModifiers: Xi
1038
- });
1039
- class _t {
1040
- constructor(t, e) {
1041
- this.element = t, this.touch1 = null, this.touch2 = null, this.touchStartX = null, this.touchStartY = null, this.touchEndX = null, this.touchEndY = null, this.touchMove1 = null, this.touchMove2 = null, this.touchMoveX = null, this.touchMoveY = null, this.velocityX = null, this.velocityY = null, this.longPressTimer = null, this.doubleTapTimer = null, this.doubleTapWaiting = !1, this.thresholdX = 0, this.thresholdY = 0, this.disregardVelocityThresholdX = 0, this.disregardVelocityThresholdY = 0, this.swipingHorizontal = !1, this.swipingVertical = !1, this.swipingDirection = null, this.swipedHorizontal = !1, this.swipedVertical = !1, this.originalDistance = null, this.newDistance = null, this.scale = null, this.originalAngle = null, this.newAngle = null, this.rotation = null, this.handlers = {
1042
- panstart: [],
1043
- panmove: [],
1044
- panend: [],
1045
- swipeleft: [],
1046
- swiperight: [],
1047
- swipeup: [],
1048
- swipedown: [],
1049
- tap: [],
1050
- doubletap: [],
1051
- longpress: [],
1052
- pinch: [],
1053
- pinchend: [],
1054
- rotate: [],
1055
- rotateend: []
1056
- }, this._onTouchStart = this.onTouchStart.bind(this), this._onTouchMove = this.onTouchMove.bind(this), this._onTouchEnd = this.onTouchEnd.bind(this), this.opts = Object.assign({}, _t.defaults, e), this.element.addEventListener("touchstart", this._onTouchStart, Z), this.element.addEventListener("touchmove", this._onTouchMove, Z), this.element.addEventListener("touchend", this._onTouchEnd, Z), this.opts.mouseSupport && !("ontouchstart" in window) && (this.element.addEventListener("mousedown", this._onTouchStart, Z), document.addEventListener("mousemove", this._onTouchMove, Z), document.addEventListener("mouseup", this._onTouchEnd, Z));
1057
- }
1058
- destroy() {
1059
- var t, e;
1060
- this.element.removeEventListener("touchstart", this._onTouchStart), this.element.removeEventListener("touchmove", this._onTouchMove), this.element.removeEventListener("touchend", this._onTouchEnd), this.element.removeEventListener("mousedown", this._onTouchStart), document.removeEventListener("mousemove", this._onTouchMove), document.removeEventListener("mouseup", this._onTouchEnd), clearTimeout((t = this.longPressTimer) !== null && t !== void 0 ? t : void 0), clearTimeout((e = this.doubleTapTimer) !== null && e !== void 0 ? e : void 0);
1061
- }
1062
- on(t, e) {
1063
- if (this.handlers[t])
1064
- return this.handlers[t].push(e), {
1065
- type: t,
1066
- fn: e,
1067
- cancel: () => this.off(t, e)
1068
- };
1069
- }
1070
- off(t, e) {
1071
- if (this.handlers[t]) {
1072
- const n = this.handlers[t].indexOf(e);
1073
- n !== -1 && this.handlers[t].splice(n, 1);
1074
- }
1075
- }
1076
- fire(t, e) {
1077
- for (let n = 0; n < this.handlers[t].length; n++)
1078
- this.handlers[t][n](e);
1079
- }
1080
- onTouchStart(t) {
1081
- var e, n, r, s, l, o, a, h, u, p, y, d, m, v, g, w, c, f, b, E, x, T, S, M, _, O;
1082
- let D = !1;
1083
- if (t.type !== "mousedown") {
1084
- if (this.touch1 || (this.touch1 = t.changedTouches[0], D = !0), (D && t.changedTouches.length > 1 || !D) && !this.touch2) {
1085
- this.touch2 = [...t.changedTouches].find((P) => {
1086
- var A;
1087
- return P.identifier !== ((A = this.touch1) === null || A === void 0 ? void 0 : A.identifier);
1088
- }) || null, this.originalDistance = Math.sqrt(Math.pow(((n = (e = this.touch2) === null || e === void 0 ? void 0 : e.screenX) !== null && n !== void 0 ? n : 0) - ((o = (s = (r = this.touchMove1) === null || r === void 0 ? void 0 : r.screenX) !== null && s !== void 0 ? s : (l = this.touch1) === null || l === void 0 ? void 0 : l.screenX) !== null && o !== void 0 ? o : 0), 2) + Math.pow(((h = (a = this.touch2) === null || a === void 0 ? void 0 : a.screenY) !== null && h !== void 0 ? h : 0) - ((d = (p = (u = this.touchMove1) === null || u === void 0 ? void 0 : u.screenY) !== null && p !== void 0 ? p : (y = this.touch1) === null || y === void 0 ? void 0 : y.screenY) !== null && d !== void 0 ? d : 0), 2)), this.originalAngle = Math.atan2(((v = (m = this.touch2) === null || m === void 0 ? void 0 : m.screenY) !== null && v !== void 0 ? v : 0) - ((f = (w = (g = this.touchMove1) === null || g === void 0 ? void 0 : g.screenY) !== null && w !== void 0 ? w : (c = this.touch1) === null || c === void 0 ? void 0 : c.screenY) !== null && f !== void 0 ? f : 0), ((E = (b = this.touch2) === null || b === void 0 ? void 0 : b.screenX) !== null && E !== void 0 ? E : 0) - ((M = (T = (x = this.touchMove1) === null || x === void 0 ? void 0 : x.screenX) !== null && T !== void 0 ? T : (S = this.touch1) === null || S === void 0 ? void 0 : S.screenX) !== null && M !== void 0 ? M : 0)) / (Math.PI / 180);
1089
- return;
1090
- }
1091
- if (!D)
1092
- return;
1093
- }
1094
- (D || t.type === "mousedown") && (this.thresholdX = this.opts.threshold("x", this), this.thresholdY = this.opts.threshold("y", this), this.disregardVelocityThresholdX = this.opts.disregardVelocityThreshold("x", this), this.disregardVelocityThresholdY = this.opts.disregardVelocityThreshold("y", this), this.touchStartX = t.type === "mousedown" ? t.screenX : ((_ = this.touch1) === null || _ === void 0 ? void 0 : _.screenX) || 0, this.touchStartY = t.type === "mousedown" ? t.screenY : ((O = this.touch1) === null || O === void 0 ? void 0 : O.screenY) || 0, this.touchMoveX = null, this.touchMoveY = null, this.touchEndX = null, this.touchEndY = null, this.swipingDirection = null, this.longPressTimer = setTimeout(() => this.fire("longpress", t), this.opts.longPressTime), this.scale = 1, this.rotation = 0, this.fire("panstart", t));
1095
- }
1096
- onTouchMove(t) {
1097
- var e, n, r, s, l, o, a, h, u, p, y, d, m;
1098
- if (t.type === "mousemove" && (!this.touchStartX || this.touchEndX !== null))
1099
- return;
1100
- let v, g;
1101
- if (t.type !== "mousemove" && (v = [...t.changedTouches].find((w) => {
1102
- var c;
1103
- return w.identifier === ((c = this.touch1) === null || c === void 0 ? void 0 : c.identifier);
1104
- }), this.touchMove1 = v || this.touchMove1, g = [...t.changedTouches].find((w) => {
1105
- var c;
1106
- return w.identifier === ((c = this.touch2) === null || c === void 0 ? void 0 : c.identifier);
1107
- }), this.touchMove2 = g || this.touchMove2), t.type === "mousemove" || v) {
1108
- const w = (t.type === "mousemove" ? t.screenX : (e = v?.screenX) !== null && e !== void 0 ? e : 0) - ((n = this.touchStartX) !== null && n !== void 0 ? n : 0);
1109
- this.velocityX = w - ((r = this.touchMoveX) !== null && r !== void 0 ? r : 0), this.touchMoveX = w;
1110
- const c = (t.type === "mousemove" ? t.screenY : (s = v?.screenY) !== null && s !== void 0 ? s : 0) - ((l = this.touchStartY) !== null && l !== void 0 ? l : 0);
1111
- this.velocityY = c - ((o = this.touchMoveY) !== null && o !== void 0 ? o : 0), this.touchMoveY = c;
1112
- const f = Math.abs(this.touchMoveX), b = Math.abs(this.touchMoveY);
1113
- this.swipingHorizontal = f > this.thresholdX, this.swipingVertical = b > this.thresholdY, this.swipingDirection = f > b ? this.swipingHorizontal ? "horizontal" : "pre-horizontal" : this.swipingVertical ? "vertical" : "pre-vertical", Math.max(f, b) > this.opts.pressThreshold && clearTimeout((a = this.longPressTimer) !== null && a !== void 0 ? a : void 0), this.fire("panmove", t);
1114
- }
1115
- t.type !== "mousemove" && this.touchMove1 != null && this.touchMove2 != null && (this.newDistance = Math.sqrt(Math.pow(this.touchMove2.screenX - this.touchMove1.screenX, 2) + Math.pow(this.touchMove2.screenY - this.touchMove1.screenY, 2)), this.scale = this.newDistance / ((h = this.originalDistance) !== null && h !== void 0 ? h : 0), this.fire("pinch", t), this.newAngle = Math.atan2(((u = this.touchMove2.screenY) !== null && u !== void 0 ? u : 0) - ((p = this.touchMove1.screenY) !== null && p !== void 0 ? p : 0), ((y = this.touchMove2.screenX) !== null && y !== void 0 ? y : 0) - ((d = this.touchMove1.screenX) !== null && d !== void 0 ? d : 0)) / (Math.PI / 180), this.rotation = this.newAngle - ((m = this.originalAngle) !== null && m !== void 0 ? m : 0), this.fire("rotate", t));
1116
- }
1117
- onTouchEnd(t) {
1118
- var e, n, r, s, l, o, a, h, u, p;
1119
- let y;
1120
- if (t.type !== "mouseup" && (y = [...t.changedTouches].find((d) => {
1121
- var m;
1122
- return d.identifier === ((m = this.touch1) === null || m === void 0 ? void 0 : m.identifier);
1123
- }), [...t.touches].find((d) => {
1124
- var m;
1125
- return d.identifier === ((m = this.touch1) === null || m === void 0 ? void 0 : m.identifier);
1126
- }) || (this.touch1 = null, this.touchMove1 = null), [...t.touches].find((d) => {
1127
- var m;
1128
- return d.identifier === ((m = this.touch2) === null || m === void 0 ? void 0 : m.identifier);
1129
- }) || (this.touch2 = null, this.touchMove2 = null)), !(t.type === "mouseup" && (!this.touchStartX || this.touchEndX !== null))) {
1130
- if (t.type === "mouseup" || y) {
1131
- this.touchEndX = t.type === "mouseup" ? t.screenX : (e = y?.screenX) !== null && e !== void 0 ? e : 0, this.touchEndY = t.type === "mouseup" ? t.screenY : (n = y?.screenY) !== null && n !== void 0 ? n : 0, this.fire("panend", t), clearTimeout((r = this.longPressTimer) !== null && r !== void 0 ? r : void 0);
1132
- const d = this.touchEndX - ((s = this.touchStartX) !== null && s !== void 0 ? s : 0), m = Math.abs(d), v = this.touchEndY - ((l = this.touchStartY) !== null && l !== void 0 ? l : 0), g = Math.abs(v), w = Math.sqrt(Math.pow(d, 2) + Math.pow(v, 2)), c = Math.abs(w), f = g / m;
1133
- m > this.thresholdX || g > this.thresholdY || this.opts.diagonalSwipes && (c > this.thresholdX || c > this.thresholdY) ? (this.swipedHorizontal = m > this.thresholdX || this.opts.diagonalSwipes && c > this.thresholdX, this.swipedVertical = g > this.thresholdY || this.opts.diagonalSwipes && c > this.thresholdY, (!this.opts.diagonalSwipes || f < Math.tan((45 - this.opts.diagonalLimit) * Math.PI / 180) || f > Math.tan((45 + this.opts.diagonalLimit) * Math.PI / 180)) && (m >= g && (this.swipedVertical = !1), g > m && (this.swipedHorizontal = !1)), this.swipedHorizontal && (d < 0 ? (((o = this.velocityX) !== null && o !== void 0 ? o : 0) < -this.opts.velocityThreshold || w < -this.disregardVelocityThresholdX) && this.fire("swipeleft", t) : (((a = this.velocityX) !== null && a !== void 0 ? a : 0) > this.opts.velocityThreshold || w > this.disregardVelocityThresholdX) && this.fire("swiperight", t)), this.swipedVertical && (v < 0 ? (((h = this.velocityY) !== null && h !== void 0 ? h : 0) < -this.opts.velocityThreshold || w < -this.disregardVelocityThresholdY) && this.fire("swipeup", t) : (((u = this.velocityY) !== null && u !== void 0 ? u : 0) > this.opts.velocityThreshold || w > this.disregardVelocityThresholdY) && this.fire("swipedown", t))) : m < this.opts.pressThreshold && g < this.opts.pressThreshold && (this.doubleTapWaiting ? (this.doubleTapWaiting = !1, clearTimeout((p = this.doubleTapTimer) !== null && p !== void 0 ? p : void 0), this.fire("doubletap", t)) : (this.doubleTapWaiting = !0, this.doubleTapTimer = setTimeout(() => this.doubleTapWaiting = !1, this.opts.doubleTapTime), this.fire("tap", t)));
1134
- }
1135
- !this.touch1 && !this.touch2 && (this.fire("pinchend", t), this.fire("rotateend", t), this.originalDistance = null, this.newDistance = null, this.scale = null, this.originalAngle = null, this.newAngle = null, this.rotation = null);
1136
- }
1137
- }
1138
- }
1139
- _t.defaults = {
1140
- threshold: (i, t) => Math.max(25, Math.floor(0.15 * (i === "x" ? window.innerWidth || document.body.clientWidth : window.innerHeight || document.body.clientHeight))),
1141
- velocityThreshold: 10,
1142
- disregardVelocityThreshold: (i, t) => Math.floor(0.5 * (i === "x" ? t.element.clientWidth : t.element.clientHeight)),
1143
- pressThreshold: 8,
1144
- diagonalSwipes: !1,
1145
- diagonalLimit: 15,
1146
- longPressTime: 500,
1147
- doubleTapTime: 300,
1148
- mouseSupport: !0
1149
- };
1150
- let Z = !1;
1096
+ var TinyGesture_default = TinyGesture, passiveIfSupported = !1;
1151
1097
  try {
1152
- window.addEventListener("test", null, Object.defineProperty({}, "passive", {
1153
- get: function() {
1154
- Z = { passive: !0 };
1155
- }
1156
- }));
1157
- } catch {
1158
- }
1159
- class Fi {
1160
- constructor(t, e, n, r, s, l, o, a, h) {
1161
- if (this.cfg = t, this.hTag = e, this.appPixi = n, this.main = r, this.layMng = s, this.val = l, this.scrItr = a, this.sys = h, e.clear_event = (c) => L.clear_event(c), e.event = (c) => this.#b(c), e.set_cancel_skip = () => !1, e.set_focus = (c) => this.#w(c), this.#t = new De(n.view, h), o.setEvtMng(this), a.setOtherObj(this, s), Se.setEvtMng(this, h, a), s.setEvtMng(this), k.setFcs(this.#t), h.setFire((c, f) => k.fire(c, f)), it.isDbg) {
1162
- const c = {
1163
- pause: () => {
1164
- if (!k.isWait) return;
1165
- const f = {};
1166
- a.recodeDesign(f), h.callHook("_enterDesign", f), h.send2Dbg("_enterDesign", f);
1167
- }
1168
- // stopOnBreakpoint : ()=> this.#isDbgBreak = true,
1169
- // stopOnDataBreakpoint : ()=> this.#isDbgBreak = true,
1170
- // continue : ()=> this.#isDbgBreak = false,
1171
- // disconnect : ()=> this.#isDbgBreak = false,
1172
- };
1173
- c.attach = c.stopOnEntry = c.stopOnStep = c.stopOnStepIn = c.stopOnStepOut = c.stopOnBackstep = c.pause, h.addHook((f) => c[f]?.());
1174
- }
1175
- Ee(`
1176
- .sn_hint {
1177
- background-color: #3c3225;
1178
- color: white;
1179
- padding: 4px 8px;
1180
- border-radius: 4px;
1181
- font-size: 1.2em;
1182
- z-index: 10000;
1183
- pointer-events: none;
1184
- user-select: none;
1185
- }
1186
-
1187
- .sn_hint_ar,
1188
- .sn_hint_ar::before {
1189
- position: absolute;
1190
- width: 8px;
1191
- height: 8px;
1192
- background: inherit;
1193
- }
1194
- .sn_hint_ar {
1195
- visibility: hidden;
1196
- }
1197
- .sn_hint_ar::before {
1198
- visibility: visible;
1199
- content: '';
1200
- transform: rotate(45deg);
1201
- }
1202
-
1203
- .sn_hint[data-popper-placement^='top'] > .sn_hint_ar {bottom: -4px;}
1204
- .sn_hint[data-popper-placement^='bottom'] > .sn_hint_ar {top: -4px;}
1205
- .sn_hint[data-popper-placement^='left'] > .sn_hint_ar {right: -4px;}
1206
- .sn_hint[data-popper-placement^='right'] > .sn_hint_ar {left: -4px;}
1207
- `), r.cvs.parentElement?.insertAdjacentHTML("beforeend", `
1208
- <div class="sn_hint" role="tooltip">
1209
- <span>Dummy</span>
1210
- <div class="sn_hint_ar" data-popper-arrow></div>
1211
- </div>`), this.#n = document.querySelector(".sn_hint"), this.#h = this.#n.querySelector("span"), this.#d = Hi(this.#v, this.#n), this.#n.hidden = !0, n.stage.interactive = !0, this.#e.add(document.body, G, (c) => this.#l(c)), this.#e.add(document.body, "keyup", () => L.resetFired()), this.#e.add(r.cvs, "contextmenu", (c) => {
1212
- const f = this.#i(c) + "rightclick";
1213
- k.fire(f, c, !0), c.preventDefault();
1214
- });
1215
- const { width: u, height: p } = t.oCfg.window, y = Math.floor(u > p ? p / 3 : u / 3);
1216
- this.#o = new _t(r.cvs, {
1217
- velocityThreshold: 0,
1218
- disregardVelocityThreshold: (c) => Math.floor(y * (c === "x" ? 1 : 0.5))
1219
- });
1220
- let d = !1;
1221
- this.#o.on("tap", (c) => {
1222
- if (d) return;
1223
- if (c instanceof TouchEvent) {
1224
- k.fire("click", c, !0), L.resetFired();
1225
- return;
1226
- }
1227
- if (c.button > 1) return;
1228
- const f = this.#i(c) + `${this.#s.get(c.button) ?? ""}click`;
1229
- k.fire(f, c, !0), L.resetFired();
1230
- }), this.#e.add(window, "pointerup", () => L.resetFired()), this.#e.add(window, "pointerout", () => L.resetFired()), this.#o.on("longpress", (c) => {
1231
- if (d = !0, c instanceof TouchEvent) {
1232
- k.fire("longpress", c, !0);
1233
- return;
1234
- }
1235
- const f = this.#i(c) + `${this.#s.get(c.button) ?? ""}longpress`;
1236
- k.fire(f, c, !0);
1237
- }), this.#o.on("panend", () => {
1238
- d && queueMicrotask(() => {
1239
- d = !1;
1240
- });
1241
- }), [
1242
- "swiperight",
1243
- "swipeleft",
1244
- "swipeup",
1245
- "swipedown"
1246
- ].forEach((c) => {
1247
- this.#o.on(c, (f) => {
1248
- if (f instanceof TouchEvent) {
1249
- k.fire(c, f, !0);
1250
- return;
1251
- }
1252
- const b = this.#i(f) + c;
1253
- k.fire(b, f, !0);
1254
- });
1255
- });
1256
- const m = () => l.setVal_Nochk("tmp", "const.sn.navigator.language", navigator.language);
1257
- this.#e.add(globalThis, "languagechange", (c) => {
1258
- m(), k.fire("sn:chgNavLang", c), Te();
1259
- }), m();
1260
- const v = (c) => {
1261
- it.isDarkMode = c.matches, l.setVal_Nochk("tmp", "const.sn.isDarkMode", it.isDarkMode);
1262
- }, g = globalThis.matchMedia("(prefers-color-scheme: dark)");
1263
- v(g), this.#e.add(g, "change", (c) => {
1264
- v(c), k.fire("sn:chgDarkMode", c);
1265
- });
1266
- let w = (c, f) => {
1267
- };
1268
- "WheelEvent" in globalThis && (this.#e.add(r.cvs, "wheel", (c) => this.#f(c), { passive: !0 }), this.#a = (c) => this.#e.add(c, "wheel", (f) => this.#f(f), { passive: !0 }), w = (c, f) => c.add(r.cvs, "wheel", (b) => {
1269
- b.deltaY <= 0 || (b.stopPropagation(), f());
1270
- })), k.init(t, e, r, l, a, s, this, o, w), import("./gamepad.js").then((c) => c.g).then(({ GamepadListener: c }) => {
1271
- const f = new c({
1272
- analog: !1,
1273
- deadZone: 0.3
1274
- });
1275
- it.debugLog && (f.on("gamepad:connected", ({ detail: x }) => console.log(`👺<'gamepad:connected' index:${String(x.index)} id:${x.gamepad.id}`)), f.on("gamepad:disconnected", ({ detail: x }) => console.log(`👺<'gamepad:disconnected' index:${String(x.index)} id:${x.gamepad.id}`)));
1276
- const b = [
1277
- "",
1278
- "ArrowUp",
1279
- "",
1280
- // '7', '8', '9',
1281
- "ArrowLeft",
1282
- "",
1283
- "ArrowRight",
1284
- // '4', '5', '6',
1285
- "",
1286
- "ArrowDown",
1287
- ""
1288
- // '1', '2', '3',
1289
- ], E = [0, 0];
1290
- f.on("gamepad:axis", ({ detail: x }) => {
1291
- if (!document.hasFocus()) return;
1292
- E[x.axis] = x.value;
1293
- const [T = 0, S = 0] = E, M = (S + 1) * 3 + (T + 1), _ = b[M];
1294
- if (!_) return;
1295
- const O = this.#t.getFocus();
1296
- (!O || O instanceof ut ? globalThis : O).dispatchEvent(new KeyboardEvent(G, { key: _, bubbles: !0 })), !(!O || O instanceof ut) && (k.cancelAutoSkip(), O.getAttribute("type") === "range" && O.dispatchEvent(new InputEvent("input", { bubbles: !0 })));
1297
- }), f.on("gamepad:button", (x) => {
1298
- if (document.hasFocus())
1299
- if (x.detail.button % 2 === 0) {
1300
- k.cancelAutoSkip();
1301
- const T = this.#t.getFocus();
1302
- (!T || T instanceof ut ? document.body : T).dispatchEvent(new KeyboardEvent(G, { key: "Enter", bubbles: !0 }));
1303
- } else k.fire("middleclick", x, !0);
1304
- }), f.start();
1305
- }), this.#e.add(document, "keyup", (c) => {
1306
- c.isComposing || c.key in this.#r && (this.#r[c.key] = 0);
1307
- }), l.defTmp(
1308
- "const.sn.key.alternate",
1309
- () => this.#r.Alt > 0
1310
- /* NO_PUSH */
1311
- ), l.defTmp(
1312
- "const.sn.key.command",
1313
- () => this.#r.Meta > 0
1314
- /* NO_PUSH */
1315
- ), l.defTmp(
1316
- "const.sn.key.control",
1317
- () => this.#r.Control > 0
1318
- /* NO_PUSH */
1319
- ), l.defTmp(
1320
- "const.sn.key.end",
1321
- () => this.#r.End > 0
1322
- /* NO_PUSH */
1323
- ), l.defTmp(
1324
- "const.sn.key.escape",
1325
- () => this.#r.Escape > 0
1326
- /* NO_PUSH */
1327
- ), l.defTmp(
1328
- "const.sn.key.back",
1329
- () => this.#r.GoBack > 0
1330
- /* NO_PUSH */
1331
- );
1332
- }
1333
- #e = new se();
1334
- #t;
1335
- #o;
1336
- #s = /* @__PURE__ */ new Map([
1337
- [0, ""],
1338
- [1, "middle"]
1339
- // [2, 'right'],
1340
- ]);
1341
- resvFlameEvent(t) {
1342
- this.#e.add(t, G, (e) => this.#l(e)), this.#e.add(t, "contextmenu", (e) => {
1343
- k.fire(this.#i(e) + "rightclick", e, !0), e.preventDefault();
1344
- }), this.#a(t), this.#e.add(t, Oe, (e) => {
1345
- if (e instanceof TouchEvent) {
1346
- k.fire("click", e, !0);
1347
- return;
1348
- }
1349
- if (e.button > 1) return;
1350
- const n = this.#i(e) + `${this.#s.get(e.button) ?? ""}click`;
1351
- k.fire(n, e, !0);
1352
- }), this.#e.add(t, "pointerup", () => L.resetFired()), this.#e.add(t, "pointerout", () => L.resetFired());
1353
- }
1354
- #a = (t) => {
1355
- };
1356
- #l(t) {
1357
- t.isComposing || (t.key in this.#r && (this.#r[t.key] = t.repeat ? 2 : 1), t.preventDefault(), k.fire(ke.modKey(t) + t.key, t, !0));
1358
- }
1359
- #i(t) {
1360
- return (t.altKey ? "alt+" : "") + (t.ctrlKey ? "ctrl+" : "") + (t.metaKey ? "meta+" : "") + (t.shiftKey ? "shift+" : "");
1361
- }
1362
- // 縦回転ホイール
1363
- #f(t) {
1364
- if (this.#c) {
1365
- this.#u = !0;
1366
- return;
1367
- }
1368
- this.#c = !0, this.#p();
1369
- const e = this.#i(t) + (t.deltaY > 0 ? "downwheel" : "upwheel");
1370
- k.fire(e, t, !0);
1371
- }
1372
- #c = !1;
1373
- #u = !1;
1374
- #p() {
1375
- setTimeout(() => {
1376
- if (this.#u) {
1377
- this.#u = !1, this.#p();
1378
- return;
1379
- }
1380
- this.#c = !1;
1381
- }, 250);
1382
- }
1383
- destroy() {
1384
- for (const t of Array.from(document.getElementsByClassName("sn_hint"))) t.parentElement?.removeChild(t);
1385
- this.#o.destroy(), L.destroy(), this.#t.destroy(), this.#e.clear();
1386
- }
1387
- unButton(t) {
1388
- this.#t.remove(t);
1389
- }
1390
- button(t, e, n, r, s) {
1391
- !t.fn && !t.label && !t.url && this.main.errScript("fnまたはlabelまたはurlは必須です"), t.fn ??= this.scrItr.scriptFn, e.interactive = !0, e.cursor = "pointer";
1392
- const l = t.key?.toLowerCase() ?? " ", o = J(t, "global", !1);
1393
- L.setEvt2Fnc(o, l, () => this.main.resumeByJumpOrCall(t)), e.on(_e, (p) => {
1394
- p.preventDefault?.(), k.fire(l, p, !0);
1395
- });
1396
- const a = t.hint ? () => this.#y(t, e) : () => {
1397
- }, h = () => {
1398
- n(), this.#n.hidden = !0;
1399
- }, u = () => (a(), r());
1400
- if (e.on("pointerover", u), e.on("pointerout", () => {
1401
- this.#t.isFocus(e) ? u() : h();
1402
- }), e.on("pointerdown", () => {
1403
- this.#n.hidden = !0;
1404
- const p = this.#t.getFocus();
1405
- s(), p instanceof Jt && p.normal();
1406
- }), e.on(
1407
- "pointerup",
1408
- it.isMobile ? h : () => {
1409
- this.#t.isFocus(e) ? u() : h();
1410
- }
1411
- ), this.#t.add(e, u, h), t.clickse && (t.clicksebuf ??= "SYS", this.cfg.searchPath(t.clickse, Lt.SOUND), e.on("pointerdown", () => {
1412
- this.hTag.playse({ fn: t.clickse, buf: t.clicksebuf, join: !1 });
1413
- })), t.enterse && (t.entersebuf ??= "SYS", this.cfg.searchPath(t.enterse, Lt.SOUND), e.on("pointerover", () => {
1414
- this.hTag.playse({ fn: t.enterse, buf: t.entersebuf, join: !1 });
1415
- })), t.leavese && (t.leavesebuf ??= "SYS", this.cfg.searchPath(t.leavese, Lt.SOUND), e.on("pointerout", () => {
1416
- this.hTag.playse({ fn: t.leavese, buf: t.leavesebuf, join: !1 });
1417
- })), t.onenter) {
1418
- const p = l + t.onenter.toLowerCase(), y = { fn: t.fn, label: t.onenter, call: !0, key: p };
1419
- L.setEvt2Fnc(o, p, () => this.main.resumeByJumpOrCall(y)), e.on("pointerover", (d) => k.fire(p, d));
1420
- }
1421
- if (t.onleave) {
1422
- const p = l + t.onleave.toLowerCase(), y = { fn: t.fn, label: t.onleave, call: !0, key: p };
1423
- L.setEvt2Fnc(o, p, () => this.main.resumeByJumpOrCall(y)), e.on("pointerout", (d) => k.fire(p, d));
1424
- }
1425
- }
1426
- #v = {
1427
- getBoundingClientRect: (t = 0, e = 0) => DOMRect.fromRect({ x: t, y: e, width: 0, height: 0 })
1428
- };
1429
- #n;
1430
- #h;
1431
- #d;
1432
- #m = {
1433
- placement: "bottom",
1434
- modifiers: [
1435
- {
1436
- // Flip | Popper https://popper.js.org/docs/v2/modifiers/flip/
1437
- name: "flip",
1438
- options: {
1439
- fallbackPlacements: ["top", "bottom"]
1440
- }
1441
- }
1442
- ]
1443
- };
1444
- #y(t, e) {
1445
- const n = e instanceof Jt ? e.getBtnBounds() : e.getBounds();
1446
- if (!(t[":タグ名"] === "link")) {
1447
- const s = e.parent.parent;
1448
- n.x += s.x, n.y += s.y;
1449
- }
1450
- if (!t.hint) {
1451
- this.#n.hidden = !0;
1452
- return;
1453
- }
1454
- this.#n.style.cssText = `position:${this.#n.style.position}; transform:${this.#n.style.transform};` + (t.hint_style ?? ""), this.#h.style.cssText = "", this.#h.textContent = t.hint ?? "", this.#v.getBoundingClientRect = () => DOMRect.fromRect({
1455
- x: this.sys.ofsLeft4elm + n.x * this.sys.cvsScale,
1456
- y: this.sys.ofsTop4elm + n.y * this.sys.cvsScale,
1457
- width: n.width,
1458
- height: n.height
1459
- }), this.#d.setOptions(
1460
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
1461
- t.hint_opt ? { ...this.#m, ...JSON.parse(t.hint_opt) } : this.#m
1462
- ).then(async () => {
1463
- await this.#d.update(), this.#n.hidden = !1;
1464
- }).catch((s) => console.error(Me(
1465
- t,
1466
- "hint_opt",
1467
- `dispHint 引数 hint_opt エラー ${s instanceof SyntaxError ? s.message : ""}`
1468
- )));
1469
- }
1470
- hideHint() {
1471
- this.#n.hidden = !0;
1472
- }
1473
- cvsResize() {
1474
- this.hideHint();
1475
- }
1476
- #b(t) {
1477
- const e = t.key;
1478
- if (!e) throw "keyは必須です";
1479
- const n = e.toLowerCase(), r = J(t, "call", !1), s = J(t, "global", !1), { fn: l, label: o, url: a } = t;
1480
- if (J(t, "del", !1)) {
1481
- if (l || o || r || a) throw "fn/label/callとdelは同時指定できません";
1482
- return L.clear_eventer(e, s, n), !1;
1483
- }
1484
- if (!l && !o && !a) throw "fn,label,url いずれかは必須です";
1485
- if (t.fn ??= this.scrItr.scriptFn, e.startsWith("dom=")) {
1486
- const h = L.getHtmlElmList(e);
1487
- if (h.el.length === 0) {
1488
- if (J(t, "need_err", !0)) throw `HTML内にセレクタ(${h.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
1489
- return !1;
1490
- }
1491
- let u = ["click", G];
1492
- switch (h.el[0].type ?? "") {
1493
- // switch (g.el[0].getAttribute('type') ?? '') { textareaで''になる
1494
- case "checkbox":
1495
- u = ["input"];
1496
- break;
1497
- case "range":
1498
- u = ["input"];
1499
- break;
1500
- case "text":
1501
- case "textarea":
1502
- u = ["input", "change"];
1503
- break;
1504
- }
1505
- const y = u.length;
1506
- for (let d = 0; d < y; ++d) {
1507
- const m = u[d];
1508
- h.el.forEach((v) => {
1509
- this.#e.add(v, m, (g) => {
1510
- if (!k.isWait || this.layMng.getFrmDisabled(h.id) || m === G && g.key !== "Enter") return;
1511
- const w = v.dataset;
1512
- for (const [c, f] of Object.entries(w)) this.val.setVal_Nochk("tmp", `sn.event.domdata.${c}`, f);
1513
- k.fire(e, g);
1514
- }), d === 0 && this.#t.add(
1515
- v,
1516
- () => this.#g(v) ? (v.focus(), !0) : !1,
1517
- () => {
1518
- }
1519
- );
1520
- });
1521
- }
1522
- }
1523
- return L.setEvt2Fnc(s, n, () => this.main.resumeByJumpOrCall(t)), !1;
1524
- }
1525
- #g(t) {
1526
- if (!t || t.offsetParent === null) return !1;
1527
- let e = t;
1528
- do {
1529
- if (getComputedStyle(e).display === "none" || e.dataset.focus === "false" || e?.disabled) return !1;
1530
- e = e.parentElement;
1531
- } while (e);
1532
- return !0;
1533
- }
1534
- // フォーカス移動
1535
- #w(t) {
1536
- const { add: e, del: n, to: r } = t;
1537
- if (e?.startsWith("dom=")) {
1538
- const s = L.getHtmlElmList(e);
1539
- if (s.el.length === 0 && J(t, "need_err", !0)) throw `HTML内にセレクタ(${s.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
1540
- return s.el.forEach((l) => this.#t.add(
1541
- l,
1542
- () => this.#g(l) ? (l.focus(), !0) : !1,
1543
- () => {
1544
- }
1545
- )), !1;
1546
- }
1547
- if (n?.startsWith("dom=")) {
1548
- const s = L.getHtmlElmList(n);
1549
- if (s.el.length === 0 && J(t, "need_err", !0)) throw `HTML内にセレクタ(${s.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
1550
- return s.el.forEach((l) => this.#t.remove(l)), !1;
1551
- }
1552
- if (!r) throw "[set_focus] add か to は必須です";
1553
- switch (r) {
1554
- case "null":
1555
- this.#t.blur();
1556
- break;
1557
- case "next":
1558
- this.#t.next();
1559
- break;
1560
- case "prev":
1561
- this.#t.prev();
1562
- break;
1563
- }
1564
- return !1;
1565
- }
1566
- // キー押しっぱなしスキップ中か
1567
- get isSkipping() {
1568
- return k.isSkipping ? !0 : Object.keys(this.#r).some(
1569
- (t) => this.#r[t] === 2
1570
- /* PUSH_REPEATING */
1571
- );
1572
- }
1573
- // 0:no push 1:one push 2:push repeating
1574
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
1575
- #r = {
1576
- Alt: 0,
1577
- Meta: 0,
1578
- // COMMANDキー
1579
- Control: 0,
1580
- ArrowDown: 0,
1581
- End: 0,
1582
- Enter: 0,
1583
- Escape: 0,
1584
- " ": 0,
1585
- GoBack: 0
1586
- /* NO_PUSH */
1587
- // AndroidのBackキーだと思う
1588
- };
1589
- }
1590
- export {
1591
- Fi as EventMng
1098
+ window.addEventListener("test", null, Object.defineProperty({}, "passive", { get: function() {
1099
+ passiveIfSupported = { passive: !0 };
1100
+ } }));
1101
+ } catch {}
1102
+ var eDownKeys = /* @__PURE__ */ function(e) {
1103
+ return e[e.NO_PUSH = 0] = "NO_PUSH", e[e.ONE_PUSH = 1] = "ONE_PUSH", e[e.PUSH_REPEATING = 2] = "PUSH_REPEATING", e;
1104
+ }(eDownKeys || {}), EventMng = class {
1105
+ #e = new EventListenerCtn();
1106
+ #t;
1107
+ #n;
1108
+ #r = new Map([[0, ""], [1, "middle"]]);
1109
+ constructor(n, r, a, o, u, d, f, h, v) {
1110
+ if (this.cfg = n, this.hTag = r, this.appPixi = a, this.main = o, this.layMng = u, this.val = d, this.scrItr = h, this.sys = v, r.clear_event = (e) => ReadingState.clear_event(e), r.event = (e) => this.#_(e), r.set_cancel_skip = () => !1, r.set_focus = (e) => this.#y(e), this.#t = new FocusMng(a.view, v), f.setEvtMng(this), h.setOtherObj(this, u), TxtLayer.setEvtMng(this, v, h), u.setEvtMng(this), Reading.setFcs(this.#t), v.setFire((e, t) => Reading.fire(e, t)), CmnLib.isDbg) {
1111
+ let e = { pause: () => {
1112
+ if (!Reading.isWait) return;
1113
+ let e = {};
1114
+ h.recodeDesign(e), v.callHook("_enterDesign", e), v.send2Dbg("_enterDesign", e);
1115
+ } };
1116
+ e.attach = e.stopOnEntry = e.stopOnStep = e.stopOnStepIn = e.stopOnStepOut = e.stopOnBackstep = e.pause, v.addHook((t) => e[t]?.());
1117
+ }
1118
+ addStyle("\n.sn_hint {\n background-color: #3c3225;\n color: white;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 1.2em;\n z-index: 10000;\n pointer-events: none;\n user-select: none;\n}\n\n.sn_hint_ar,\n.sn_hint_ar::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n}\n.sn_hint_ar {\n visibility: hidden;\n}\n.sn_hint_ar::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n}\n\n.sn_hint[data-popper-placement^='top'] > .sn_hint_ar {bottom: -4px;}\n.sn_hint[data-popper-placement^='bottom'] > .sn_hint_ar {top: -4px;}\n.sn_hint[data-popper-placement^='left'] > .sn_hint_ar {right: -4px;}\n.sn_hint[data-popper-placement^='right'] > .sn_hint_ar {left: -4px;}\n"), o.cvs.parentElement?.insertAdjacentHTML("beforeend", "\n<div class=\"sn_hint\" role=\"tooltip\">\n <span>Dummy</span>\n <div class=\"sn_hint_ar\" data-popper-arrow></div>\n</div>"), this.#f = document.querySelector(".sn_hint"), this.#p = this.#f.querySelector("span"), this.#m = createPopper(this.#d, this.#f), this.#f.hidden = !0, a.stage.interactive = !0, this.#e.add(document.body, EVNM_KEY, (e) => this.#a(e)), this.#e.add(document.body, "keyup", () => ReadingState.resetFired()), this.#e.add(o.cvs, "contextmenu", (e) => {
1119
+ let t = this.#o(e) + "rightclick";
1120
+ Reading.fire(t, e, !0), e.preventDefault();
1121
+ });
1122
+ let { width: y, height: b } = n.oCfg.window, x = Math.floor(y > b ? b / 3 : y / 3);
1123
+ this.#n = new TinyGesture_default(o.cvs, {
1124
+ velocityThreshold: 0,
1125
+ disregardVelocityThreshold: (e) => Math.floor(x * (e === "x" ? 1 : .5))
1126
+ });
1127
+ let S = !1;
1128
+ this.#n.on("tap", (e) => {
1129
+ if (S) return;
1130
+ if (e instanceof TouchEvent) {
1131
+ Reading.fire("click", e, !0), ReadingState.resetFired();
1132
+ return;
1133
+ }
1134
+ if (e.button > 1) return;
1135
+ let t = this.#o(e) + `${this.#r.get(e.button) ?? ""}click`;
1136
+ Reading.fire(t, e, !0), ReadingState.resetFired();
1137
+ }), this.#e.add(window, "pointerout", () => ReadingState.resetFired()), this.#n.on("longpress", (e) => {
1138
+ if (S = !0, e instanceof TouchEvent) {
1139
+ Reading.fire("longpress", e, !0);
1140
+ return;
1141
+ }
1142
+ let t = this.#o(e) + `${this.#r.get(e.button) ?? ""}longpress`;
1143
+ Reading.fire(t, e, !0);
1144
+ }), this.#n.on("panend", () => {
1145
+ S && queueMicrotask(() => {
1146
+ S = !1;
1147
+ });
1148
+ }), [
1149
+ "swiperight",
1150
+ "swipeleft",
1151
+ "swipeup",
1152
+ "swipedown"
1153
+ ].forEach((e) => {
1154
+ this.#n.on(e, (t) => {
1155
+ if (t instanceof TouchEvent) {
1156
+ Reading.fire(e, t, !0);
1157
+ return;
1158
+ }
1159
+ let n = this.#o(t) + e;
1160
+ Reading.fire(n, t, !0);
1161
+ });
1162
+ });
1163
+ let C = () => d.setVal_Nochk("tmp", "const.sn.navigator.language", navigator.language);
1164
+ this.#e.add(globalThis, "languagechange", (e) => {
1165
+ C(), Reading.fire("sn:chgNavLang", e), clearTextureCache();
1166
+ }), C();
1167
+ let w = (e) => {
1168
+ CmnLib.isDarkMode = e.matches, d.setVal_Nochk("tmp", "const.sn.isDarkMode", CmnLib.isDarkMode);
1169
+ }, T = globalThis.matchMedia("(prefers-color-scheme: dark)");
1170
+ w(T), this.#e.add(T, "change", (e) => {
1171
+ w(e), Reading.fire("sn:chgDarkMode", e);
1172
+ });
1173
+ let E = (e, t) => {};
1174
+ "WheelEvent" in globalThis && (this.#e.add(o.cvs, "wheel", (e) => this.#s(e), { passive: !0 }), this.#i = (e) => this.#e.add(e, "wheel", (e) => this.#s(e), { passive: !0 }), E = (e, t) => e.add(o.cvs, "wheel", (e) => {
1175
+ e.deltaY <= 0 || (e.stopPropagation(), t());
1176
+ })), Reading.init(n, r, o, d, h, u, this, f, E), import("./gamepad.js").then(__toDynamicImportESM()).then(({ GamepadListener: e }) => {
1177
+ let n = new e({
1178
+ analog: !1,
1179
+ deadZone: .3
1180
+ });
1181
+ CmnLib.debugLog && (n.on("gamepad:connected", ({ detail: e }) => console.log(`👺<'gamepad:connected' index:${String(e.index)} id:${e.gamepad.id}`)), n.on("gamepad:disconnected", ({ detail: e }) => console.log(`👺<'gamepad:disconnected' index:${String(e.index)} id:${e.gamepad.id}`)));
1182
+ let r = [
1183
+ "",
1184
+ "ArrowUp",
1185
+ "",
1186
+ "ArrowLeft",
1187
+ "",
1188
+ "ArrowRight",
1189
+ "",
1190
+ "ArrowDown",
1191
+ ""
1192
+ ], i = [0, 0];
1193
+ n.on("gamepad:axis", ({ detail: e }) => {
1194
+ if (!document.hasFocus()) return;
1195
+ i[e.axis] = e.value;
1196
+ let [n = 0, a = 0] = i, o = r[(a + 1) * 3 + (n + 1)];
1197
+ if (!o) return;
1198
+ let s = this.#t.getFocus();
1199
+ (!s || s instanceof Container ? globalThis : s).dispatchEvent(new KeyboardEvent(EVNM_KEY, {
1200
+ key: o,
1201
+ bubbles: !0
1202
+ })), !(!s || s instanceof Container) && (Reading.cancelAutoSkip(), s.getAttribute("type") === "range" && s.dispatchEvent(new InputEvent("input", { bubbles: !0 })));
1203
+ }), n.on("gamepad:button", (e) => {
1204
+ if (document.hasFocus()) if (e.detail.button % 2 == 0) {
1205
+ Reading.cancelAutoSkip();
1206
+ let e = this.#t.getFocus();
1207
+ (!e || e instanceof Container ? document.body : e).dispatchEvent(new KeyboardEvent(EVNM_KEY, {
1208
+ key: "Enter",
1209
+ bubbles: !0
1210
+ }));
1211
+ } else Reading.fire("middleclick", e, !0);
1212
+ }), n.start();
1213
+ }), this.#e.add(document, "keyup", (e) => {
1214
+ e.isComposing || e.key in this.#b && (this.#b[e.key] = eDownKeys.NO_PUSH);
1215
+ }), d.defTmp("const.sn.key.alternate", () => this.#b.Alt > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.command", () => this.#b.Meta > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.control", () => this.#b.Control > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.end", () => this.#b.End > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.escape", () => this.#b.Escape > eDownKeys.NO_PUSH), d.defTmp("const.sn.key.back", () => this.#b.GoBack > eDownKeys.NO_PUSH);
1216
+ }
1217
+ resvFlameEvent(e) {
1218
+ this.#e.add(e, EVNM_KEY, (e) => this.#a(e)), this.#e.add(e, "contextmenu", (e) => {
1219
+ Reading.fire(this.#o(e) + "rightclick", e, !0), e.preventDefault();
1220
+ }), this.#i(e), this.#e.add(e, EVNM_CLICK, (e) => {
1221
+ if (e instanceof TouchEvent) {
1222
+ Reading.fire("click", e, !0);
1223
+ return;
1224
+ }
1225
+ if (e.button > 1) return;
1226
+ let t = this.#o(e) + `${this.#r.get(e.button) ?? ""}click`;
1227
+ Reading.fire(t, e, !0);
1228
+ }), this.#e.add(e, "pointerup", () => ReadingState.resetFired()), this.#e.add(e, "pointerout", () => ReadingState.resetFired());
1229
+ }
1230
+ #i = (e) => {};
1231
+ #a(e) {
1232
+ e.isComposing || (e.key in this.#b && (this.#b[e.key] = e.repeat ? eDownKeys.PUSH_REPEATING : eDownKeys.ONE_PUSH), e.preventDefault(), Reading.fire(SysBase.modKey(e) + e.key, e, !0));
1233
+ }
1234
+ #o(e) {
1235
+ return (e.altKey ? "alt+" : "") + (e.ctrlKey ? "ctrl+" : "") + (e.metaKey ? "meta+" : "") + (e.shiftKey ? "shift+" : "");
1236
+ }
1237
+ #s(e) {
1238
+ if (this.#c) {
1239
+ this.#l = !0;
1240
+ return;
1241
+ }
1242
+ this.#c = !0, this.#u();
1243
+ let t = this.#o(e) + (e.deltaY > 0 ? "downwheel" : "upwheel");
1244
+ Reading.fire(t, e, !0);
1245
+ }
1246
+ #c = !1;
1247
+ #l = !1;
1248
+ #u() {
1249
+ setTimeout(() => {
1250
+ if (this.#l) {
1251
+ this.#l = !1, this.#u();
1252
+ return;
1253
+ }
1254
+ this.#c = !1;
1255
+ }, 250);
1256
+ }
1257
+ destroy() {
1258
+ for (let e of Array.from(document.getElementsByClassName("sn_hint"))) e.parentElement?.removeChild(e);
1259
+ this.#n.destroy(), Reading.destroy(), this.#t.destroy(), this.#e.clear();
1260
+ }
1261
+ unButton(e) {
1262
+ this.#t.remove(e);
1263
+ }
1264
+ button(e, t, n, i, a) {
1265
+ !e.fn && !e.label && !e.url && this.main.errScript("fnまたはlabelまたはurlは必須です"), e.fn ??= this.scrItr.scriptFn, t.interactive = !0, t.cursor = "pointer";
1266
+ let c = e.key?.toLowerCase() ?? " ", l = argChk_Boolean(e, "global", !1);
1267
+ ReadingState.setEvt2Fnc(l, c, () => this.main.resumeByJumpOrCall(e)), t.on(EVNM_BUTTON, (e) => {
1268
+ e.preventDefault?.(), Reading.fire(c, e, !0);
1269
+ });
1270
+ let u = e.hint ? () => this.#g(e, t) : () => {}, f = () => {
1271
+ n(), this.#f.hidden = !0;
1272
+ }, g = () => (u(), i());
1273
+ if (t.on("pointerover", g), t.on("pointerout", () => {
1274
+ this.#t.isFocus(t) ? g() : f();
1275
+ }), t.on("pointerdown", () => {
1276
+ this.#f.hidden = !0;
1277
+ let e = this.#t.getFocus();
1278
+ a(), e instanceof Button && e.normal();
1279
+ }), t.on("pointerup", CmnLib.isMobile ? f : () => {
1280
+ this.#t.isFocus(t) ? g() : f();
1281
+ }), this.#t.add(t, g, f), e.clickse && (e.clicksebuf ??= "SYS", this.cfg.searchPath(e.clickse, SEARCH_PATH_ARG_EXT.SOUND), t.on("pointerdown", () => this.hTag.playse({
1282
+ fn: e.clickse,
1283
+ ...e.clicksebuf ? { buf: e.clicksebuf } : {},
1284
+ join: !1
1285
+ }))), e.enterse && (e.entersebuf ??= "SYS", this.cfg.searchPath(e.enterse, SEARCH_PATH_ARG_EXT.SOUND), t.on("pointerover", () => this.hTag.playse({
1286
+ fn: e.enterse,
1287
+ ...e.entersebuf ? { buf: e.entersebuf } : {},
1288
+ join: !1
1289
+ }))), e.leavese && (e.leavesebuf ??= "SYS", this.cfg.searchPath(e.leavese, SEARCH_PATH_ARG_EXT.SOUND), t.on("pointerout", () => this.hTag.playse({
1290
+ fn: e.leavese,
1291
+ ...e.leavesebuf ? { buf: e.leavesebuf } : {},
1292
+ join: !1
1293
+ }))), e.onenter) {
1294
+ let n = c + e.onenter.toLowerCase(), r = {
1295
+ fn: e.fn,
1296
+ label: e.onenter,
1297
+ call: !0,
1298
+ key: n
1299
+ };
1300
+ ReadingState.setEvt2Fnc(l, n, () => this.main.resumeByJumpOrCall(r)), t.on("pointerover", (e) => Reading.fire(n, e));
1301
+ }
1302
+ if (e.onleave) {
1303
+ let n = c + e.onleave.toLowerCase(), r = {
1304
+ fn: e.fn,
1305
+ label: e.onleave,
1306
+ call: !0,
1307
+ key: n
1308
+ };
1309
+ ReadingState.setEvt2Fnc(l, n, () => this.main.resumeByJumpOrCall(r)), t.on("pointerout", (e) => Reading.fire(n, e));
1310
+ }
1311
+ }
1312
+ #d = { getBoundingClientRect: (e = 0, t = 0) => DOMRect.fromRect({
1313
+ x: e,
1314
+ y: t,
1315
+ width: 0,
1316
+ height: 0
1317
+ }) };
1318
+ #f;
1319
+ #p;
1320
+ #m;
1321
+ #h = {
1322
+ placement: "bottom",
1323
+ modifiers: [{
1324
+ name: "flip",
1325
+ options: { fallbackPlacements: ["top", "bottom"] }
1326
+ }]
1327
+ };
1328
+ #g(e, t) {
1329
+ let r = t instanceof Button ? t.getBtnBounds() : t.getBounds();
1330
+ if (e[":タグ名"] !== "link") {
1331
+ let e = t.parent.parent;
1332
+ r.x += e.x, r.y += e.y;
1333
+ }
1334
+ if (!e.hint) {
1335
+ this.#f.hidden = !0;
1336
+ return;
1337
+ }
1338
+ this.#f.style.cssText = `position:${this.#f.style.position}; transform:${this.#f.style.transform};` + (e.hint_style ?? ""), this.#p.style.cssText = "", this.#p.textContent = e.hint ?? "", this.#d.getBoundingClientRect = () => DOMRect.fromRect({
1339
+ x: this.sys.ofsLeft4elm + r.x * this.sys.cvsScale,
1340
+ y: this.sys.ofsTop4elm + r.y * this.sys.cvsScale,
1341
+ width: r.width,
1342
+ height: r.height
1343
+ }), this.#m.setOptions(e.hint_opt ? {
1344
+ ...this.#h,
1345
+ ...JSON.parse(e.hint_opt)
1346
+ } : this.#h).then(async () => {
1347
+ await this.#m.update(), this.#f.hidden = !1;
1348
+ }).catch((t) => console.error(mesErrJSON(e, "hint_opt", `dispHint 引数 hint_opt エラー ${t instanceof SyntaxError ? t.message : ""}`)));
1349
+ }
1350
+ hideHint() {
1351
+ this.#f.hidden = !0;
1352
+ }
1353
+ cvsResize() {
1354
+ this.hideHint();
1355
+ }
1356
+ #_(e) {
1357
+ let n = e.key;
1358
+ if (!n) throw "keyは必須です";
1359
+ let r = n.toLowerCase(), i = argChk_Boolean(e, "call", !1), a = argChk_Boolean(e, "global", !1), { fn: s, label: c, url: l } = e;
1360
+ if (argChk_Boolean(e, "del", !1)) {
1361
+ if (s || c || i || l) throw "fn/label/callとdelは同時指定できません";
1362
+ return ReadingState.clear_eventer(n, a, r), !1;
1363
+ }
1364
+ if (!s && !c && !l) throw "fn,label,url いずれかは必須です";
1365
+ if (e.fn ??= this.scrItr.scriptFn, n.startsWith("dom=")) {
1366
+ let r = ReadingState.getHtmlElmList(n);
1367
+ if (r.el.length === 0) {
1368
+ if (argChk_Boolean(e, "need_err", !0)) throw `HTML内にセレクタ(${r.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
1369
+ return !1;
1370
+ }
1371
+ let i = ["click", EVNM_KEY];
1372
+ switch (r.el[0].type ?? "") {
1373
+ case "checkbox":
1374
+ i = ["input"];
1375
+ break;
1376
+ case "range":
1377
+ i = ["input"];
1378
+ break;
1379
+ case "text":
1380
+ case "textarea":
1381
+ i = ["input", "change"];
1382
+ break;
1383
+ }
1384
+ let a = i.length;
1385
+ for (let e = 0; e < a; ++e) {
1386
+ let t = i[e];
1387
+ r.el.forEach((i) => {
1388
+ this.#e.add(i, t, (e) => {
1389
+ if (!Reading.isWait || this.layMng.getFrmDisabled(r.id) || t === "keydown" && e.key !== "Enter") return;
1390
+ let a = i.dataset;
1391
+ for (let [e, t] of Object.entries(a)) this.val.setVal_Nochk("tmp", `sn.event.domdata.${e}`, t);
1392
+ Reading.fire(n, e);
1393
+ }), e === 0 && this.#t.add(i, () => this.#v(i) ? (i.focus(), !0) : !1, () => {});
1394
+ });
1395
+ }
1396
+ }
1397
+ return ReadingState.setEvt2Fnc(a, r, () => this.main.resumeByJumpOrCall(e)), !1;
1398
+ }
1399
+ #v(e) {
1400
+ if (!e || e.offsetParent === null) return !1;
1401
+ let t = e;
1402
+ do {
1403
+ if (getComputedStyle(t).display === "none" || t.dataset.focus === "false" || t?.disabled) return !1;
1404
+ t = t.parentElement;
1405
+ } while (t);
1406
+ return !0;
1407
+ }
1408
+ #y(e) {
1409
+ let { add: t, del: n, to: r } = e;
1410
+ if (t?.startsWith("dom=")) {
1411
+ let n = ReadingState.getHtmlElmList(t);
1412
+ if (n.el.length === 0 && argChk_Boolean(e, "need_err", !0)) throw `HTML内にセレクタ(${n.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
1413
+ return n.el.forEach((e) => this.#t.add(e, () => this.#v(e) ? (e.focus(), !0) : !1, () => {})), !1;
1414
+ }
1415
+ if (n?.startsWith("dom=")) {
1416
+ let t = ReadingState.getHtmlElmList(n);
1417
+ if (t.el.length === 0 && argChk_Boolean(e, "need_err", !0)) throw `HTML内にセレクタ(${t.sel})に対応する要素が見つかりません。存在しない場合を許容するなら、need_err=false と指定してください`;
1418
+ return t.el.forEach((e) => this.#t.remove(e)), !1;
1419
+ }
1420
+ if (!r) throw "[set_focus] add か to は必須です";
1421
+ switch (r) {
1422
+ case "null":
1423
+ this.#t.blur();
1424
+ break;
1425
+ case "next":
1426
+ this.#t.next();
1427
+ break;
1428
+ case "prev":
1429
+ this.#t.prev();
1430
+ break;
1431
+ }
1432
+ return !1;
1433
+ }
1434
+ get isSkipping() {
1435
+ return Reading.isSkipping ? !0 : Object.keys(this.#b).some((e) => this.#b[e] === eDownKeys.PUSH_REPEATING);
1436
+ }
1437
+ #b = {
1438
+ Alt: eDownKeys.NO_PUSH,
1439
+ Meta: eDownKeys.NO_PUSH,
1440
+ Control: eDownKeys.NO_PUSH,
1441
+ ArrowDown: eDownKeys.NO_PUSH,
1442
+ End: eDownKeys.NO_PUSH,
1443
+ Enter: eDownKeys.NO_PUSH,
1444
+ Escape: eDownKeys.NO_PUSH,
1445
+ " ": eDownKeys.NO_PUSH,
1446
+ GoBack: eDownKeys.NO_PUSH
1447
+ };
1592
1448
  };
1593
- //# sourceMappingURL=EventMng.js.map
1449
+ export { EventMng };
1450
+
1451
+ //# sourceMappingURL=EventMng.js.map