storybook 9.0.0-alpha.1 → 9.0.0-alpha.10

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 (259) hide show
  1. package/README.md +31 -29
  2. package/assets/browser/favicon.svg +1 -0
  3. package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
  4. package/assets/browser/nunito-sans-bold.woff2 +0 -0
  5. package/assets/browser/nunito-sans-italic.woff2 +0 -0
  6. package/assets/browser/nunito-sans-regular.woff2 +0 -0
  7. package/assets/docs/addon-controls-args-annotated.png +0 -0
  8. package/assets/docs/addon-controls-args-background-color.png +0 -0
  9. package/assets/docs/addon-controls-args-background-string.png +0 -0
  10. package/assets/docs/addon-controls-args-docs.png +0 -0
  11. package/assets/docs/addon-controls-args-logging.png +0 -0
  12. package/assets/docs/addon-controls-args-no-annotation.png +0 -0
  13. package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
  14. package/assets/docs/addon-controls-args-reflow.png +0 -0
  15. package/assets/docs/addon-controls-args-template.png +0 -0
  16. package/assets/docs/addon-controls-expanded.png +0 -0
  17. package/assets/docs/addon-controls-hero.gif +0 -0
  18. package/assets/docs/addon-controls-install.png +0 -0
  19. package/assets/docs/hero.gif +0 -0
  20. package/assets/docs/message-reference.png +0 -0
  21. package/assets/docs/viewport.png +0 -0
  22. package/assets/server/addon.tsconfig.json +6 -0
  23. package/assets/server/base-preview-body.html +119 -0
  24. package/assets/server/base-preview-head.html +451 -0
  25. package/assets/server/template.ejs +87 -0
  26. package/bin/index.cjs +1 -1
  27. package/dist/actions/decorator.d.ts +6 -0
  28. package/dist/actions/decorator.js +139 -0
  29. package/dist/actions/index.cjs +127 -0
  30. package/dist/actions/index.d.ts +105 -0
  31. package/dist/actions/index.js +112 -0
  32. package/dist/actions/manager.js +1196 -0
  33. package/dist/actions/preview.cjs +165 -0
  34. package/dist/actions/preview.d.ts +55 -0
  35. package/dist/actions/preview.js +156 -0
  36. package/dist/babel/index.cjs +54034 -0
  37. package/dist/babel/index.d.ts +7488 -0
  38. package/dist/babel/index.js +54044 -0
  39. package/dist/bin/index.cjs +119 -0
  40. package/dist/bin/index.js +113 -0
  41. package/dist/builder-manager/index.cjs +2140 -0
  42. package/dist/builder-manager/index.d.ts +19 -0
  43. package/dist/builder-manager/index.js +2162 -0
  44. package/dist/channels/index.cjs +1913 -0
  45. package/dist/channels/index.d.ts +108 -0
  46. package/dist/channels/index.js +1881 -0
  47. package/dist/cli/bin/index.cjs +2687 -0
  48. package/dist/cli/bin/index.d.ts +2 -0
  49. package/dist/cli/bin/index.js +2707 -0
  50. package/dist/cli/index.cjs +17327 -0
  51. package/dist/cli/index.d.ts +209 -0
  52. package/dist/cli/index.js +17349 -0
  53. package/dist/client-logger/index.cjs +80 -0
  54. package/dist/client-logger/index.d.ts +29 -0
  55. package/dist/client-logger/index.js +64 -0
  56. package/dist/common/index.cjs +20569 -0
  57. package/dist/common/index.d.ts +949 -0
  58. package/dist/common/index.js +20654 -0
  59. package/dist/components/index.cjs +27924 -0
  60. package/dist/components/index.d.ts +1423 -0
  61. package/dist/components/index.js +24673 -0
  62. package/dist/controls/decorator.d.ts +5 -0
  63. package/dist/controls/decorator.js +8 -0
  64. package/dist/controls/index.cjs +26 -0
  65. package/dist/controls/index.d.ts +39 -0
  66. package/dist/controls/index.js +6 -0
  67. package/dist/controls/manager.js +5545 -0
  68. package/dist/controls/preview.cjs +26 -0
  69. package/dist/controls/preview.d.ts +55 -0
  70. package/dist/controls/preview.js +9 -0
  71. package/dist/core-events/index.cjs +167 -0
  72. package/dist/core-events/index.d.ts +426 -0
  73. package/dist/core-events/index.js +149 -0
  74. package/dist/core-server/index.cjs +38183 -0
  75. package/dist/core-server/index.d.ts +720 -0
  76. package/dist/core-server/index.js +38272 -0
  77. package/dist/core-server/presets/common-manager.js +20 -0
  78. package/dist/core-server/presets/common-override-preset.cjs +4824 -0
  79. package/dist/core-server/presets/common-override-preset.js +4829 -0
  80. package/dist/core-server/presets/common-preset.cjs +10231 -0
  81. package/dist/core-server/presets/common-preset.js +10309 -0
  82. package/dist/csf/index.cjs +179 -0
  83. package/dist/csf/index.d.ts +750 -0
  84. package/dist/csf/index.js +172 -0
  85. package/dist/csf-tools/index.cjs +1422 -0
  86. package/dist/csf-tools/index.d.ts +250 -0
  87. package/dist/csf-tools/index.js +1439 -0
  88. package/dist/docs-tools/index.cjs +2891 -0
  89. package/dist/docs-tools/index.d.ts +162 -0
  90. package/dist/docs-tools/index.js +2876 -0
  91. package/dist/index.cjs +17 -1
  92. package/dist/index.d.ts +1 -1
  93. package/dist/index.js +2 -7
  94. package/dist/instrumenter/index.cjs +3485 -0
  95. package/dist/instrumenter/index.d.ts +104 -0
  96. package/dist/instrumenter/index.js +4965 -0
  97. package/dist/manager/globals-module-info.cjs +817 -0
  98. package/dist/manager/globals-module-info.d.ts +36 -0
  99. package/dist/manager/globals-module-info.js +804 -0
  100. package/dist/manager/globals-runtime.js +77536 -0
  101. package/dist/manager/globals.cjs +47 -0
  102. package/dist/manager/globals.d.ts +24 -0
  103. package/dist/manager/globals.js +34 -0
  104. package/dist/manager/runtime.js +12323 -0
  105. package/dist/manager-api/index.cjs +11074 -0
  106. package/dist/manager-api/index.d.ts +1512 -0
  107. package/dist/manager-api/index.js +4835 -0
  108. package/dist/manager-errors.d.ts +89 -0
  109. package/dist/manager-errors.js +99 -0
  110. package/dist/node-logger/index.cjs +1642 -0
  111. package/dist/node-logger/index.d.ts +117 -0
  112. package/dist/node-logger/index.js +1652 -0
  113. package/dist/preview/globals.cjs +38 -0
  114. package/dist/preview/globals.d.ts +15 -0
  115. package/dist/preview/globals.js +25 -0
  116. package/dist/preview/runtime.js +43629 -0
  117. package/dist/preview-api/index.cjs +5224 -0
  118. package/dist/preview-api/index.d.ts +1093 -0
  119. package/dist/preview-api/index.js +5292 -0
  120. package/dist/preview-errors.cjs +503 -0
  121. package/dist/preview-errors.d.ts +212 -0
  122. package/dist/preview-errors.js +449 -0
  123. package/dist/router/index.cjs +3296 -0
  124. package/dist/router/index.d.ts +385 -0
  125. package/dist/router/index.js +1843 -0
  126. package/dist/server-errors.cjs +727 -0
  127. package/dist/server-errors.d.ts +296 -0
  128. package/dist/server-errors.js +728 -0
  129. package/dist/telemetry/index.cjs +2756 -0
  130. package/dist/telemetry/index.d.ts +133 -0
  131. package/dist/telemetry/index.js +2797 -0
  132. package/dist/test/index.cjs +35685 -0
  133. package/dist/test/index.d.ts +186 -0
  134. package/dist/test/index.js +33751 -0
  135. package/dist/test/preview.cjs +15869 -0
  136. package/dist/test/preview.d.ts +54 -0
  137. package/dist/test/preview.js +14440 -0
  138. package/dist/test/spy.cjs +257 -0
  139. package/dist/test/spy.d.ts +66 -0
  140. package/dist/test/spy.js +239 -0
  141. package/dist/theming/create.cjs +232 -0
  142. package/dist/theming/create.d.ts +50 -0
  143. package/dist/theming/create.js +216 -0
  144. package/dist/theming/index.cjs +2665 -0
  145. package/dist/theming/index.d.ts +11939 -0
  146. package/dist/theming/index.js +2485 -0
  147. package/dist/types/index.cjs +27 -0
  148. package/dist/types/index.d.ts +2795 -0
  149. package/dist/types/index.js +7 -0
  150. package/dist/viewport/index.cjs +310 -0
  151. package/dist/viewport/index.d.ts +320 -0
  152. package/dist/viewport/index.js +290 -0
  153. package/dist/viewport/manager.js +400 -0
  154. package/dist/viewport/preview.cjs +35 -0
  155. package/dist/viewport/preview.d.ts +69 -0
  156. package/dist/viewport/preview.js +19 -0
  157. package/package.json +518 -209
  158. package/.eslintrc.cjs +0 -31
  159. package/__mocks__/@aw-web-design/x-default-browser.js +0 -2
  160. package/core/babel/index.cjs +0 -1
  161. package/core/babel/index.d.ts +0 -2
  162. package/core/babel/index.js +0 -1
  163. package/core/builder-manager/index.cjs +0 -1
  164. package/core/builder-manager/index.d.ts +0 -2
  165. package/core/builder-manager/index.js +0 -1
  166. package/core/channels/index.cjs +0 -1
  167. package/core/channels/index.d.ts +0 -2
  168. package/core/channels/index.js +0 -1
  169. package/core/cli/bin/index.cjs +0 -1
  170. package/core/cli/bin/index.d.ts +0 -2
  171. package/core/cli/bin/index.js +0 -1
  172. package/core/cli/index.cjs +0 -1
  173. package/core/cli/index.d.ts +0 -2
  174. package/core/cli/index.js +0 -1
  175. package/core/client-logger/index.cjs +0 -1
  176. package/core/client-logger/index.d.ts +0 -2
  177. package/core/client-logger/index.js +0 -1
  178. package/core/common/index.cjs +0 -1
  179. package/core/common/index.d.ts +0 -2
  180. package/core/common/index.js +0 -1
  181. package/core/components/index.cjs +0 -1
  182. package/core/components/index.d.ts +0 -2
  183. package/core/components/index.js +0 -1
  184. package/core/core-events/index.cjs +0 -1
  185. package/core/core-events/index.d.ts +0 -2
  186. package/core/core-events/index.js +0 -1
  187. package/core/core-server/index.cjs +0 -1
  188. package/core/core-server/index.d.ts +0 -2
  189. package/core/core-server/index.js +0 -1
  190. package/core/core-server/presets/common-manager.js +0 -1
  191. package/core/core-server/presets/common-override-preset.cjs +0 -1
  192. package/core/core-server/presets/common-override-preset.js +0 -1
  193. package/core/core-server/presets/common-preset.cjs +0 -1
  194. package/core/core-server/presets/common-preset.js +0 -1
  195. package/core/csf/index.cjs +0 -1
  196. package/core/csf/index.d.ts +0 -2
  197. package/core/csf/index.js +0 -1
  198. package/core/csf-tools/index.cjs +0 -1
  199. package/core/csf-tools/index.d.ts +0 -2
  200. package/core/csf-tools/index.js +0 -1
  201. package/core/docs-tools/index.cjs +0 -1
  202. package/core/docs-tools/index.d.ts +0 -2
  203. package/core/docs-tools/index.js +0 -1
  204. package/core/index.cjs +0 -1
  205. package/core/index.d.ts +0 -2
  206. package/core/index.js +0 -1
  207. package/core/manager/globals-module-info.cjs +0 -1
  208. package/core/manager/globals-module-info.d.ts +0 -2
  209. package/core/manager/globals-module-info.js +0 -1
  210. package/core/manager/globals-runtime.js +0 -1
  211. package/core/manager/globals.cjs +0 -1
  212. package/core/manager/globals.d.ts +0 -2
  213. package/core/manager/globals.js +0 -1
  214. package/core/manager-api/index.cjs +0 -1
  215. package/core/manager-api/index.d.ts +0 -2
  216. package/core/manager-api/index.js +0 -1
  217. package/core/manager-errors.d.ts +0 -2
  218. package/core/manager-errors.js +0 -1
  219. package/core/node-logger/index.cjs +0 -1
  220. package/core/node-logger/index.d.ts +0 -2
  221. package/core/node-logger/index.js +0 -1
  222. package/core/preview/globals.cjs +0 -1
  223. package/core/preview/globals.d.ts +0 -2
  224. package/core/preview/globals.js +0 -1
  225. package/core/preview/runtime.js +0 -1
  226. package/core/preview-api/index.cjs +0 -1
  227. package/core/preview-api/index.d.ts +0 -2
  228. package/core/preview-api/index.js +0 -1
  229. package/core/preview-errors.cjs +0 -1
  230. package/core/preview-errors.d.ts +0 -2
  231. package/core/preview-errors.js +0 -1
  232. package/core/router/index.cjs +0 -1
  233. package/core/router/index.d.ts +0 -2
  234. package/core/router/index.js +0 -1
  235. package/core/server-errors.cjs +0 -1
  236. package/core/server-errors.d.ts +0 -2
  237. package/core/server-errors.js +0 -1
  238. package/core/telemetry/index.cjs +0 -1
  239. package/core/telemetry/index.d.ts +0 -2
  240. package/core/telemetry/index.js +0 -1
  241. package/core/theming/create.cjs +0 -1
  242. package/core/theming/create.d.ts +0 -2
  243. package/core/theming/create.js +0 -1
  244. package/core/theming/index.cjs +0 -1
  245. package/core/theming/index.d.ts +0 -2
  246. package/core/theming/index.js +0 -1
  247. package/core/types/index.cjs +0 -1
  248. package/core/types/index.d.ts +0 -2
  249. package/core/types/index.js +0 -1
  250. package/core.cjs +0 -0
  251. package/core.d.ts +0 -0
  252. package/core.js +0 -1
  253. package/dist/chunk-OWLSIX54.js +0 -8
  254. package/dist/core-path.cjs +0 -1
  255. package/dist/core-path.d.ts +0 -3
  256. package/dist/core-path.js +0 -9
  257. package/dist/proxy.cjs +0 -1
  258. package/dist/proxy.d.ts +0 -2
  259. package/dist/proxy.js +0 -9
@@ -0,0 +1,2140 @@
1
+ "use strict";
2
+ var Jt = Object.create;
3
+ var I = Object.defineProperty;
4
+ var Ut = Object.getOwnPropertyDescriptor;
5
+ var Gt = Object.getOwnPropertyNames;
6
+ var Vt = Object.getPrototypeOf, Xt = Object.prototype.hasOwnProperty;
7
+ var o = (e, i) => I(e, "name", { value: i, configurable: !0 });
8
+ var U = (e, i) => () => (e && (i = e(e = 0)), i);
9
+ var M = (e, i) => () => (i || e((i = { exports: {} }).exports, i), i.exports), z = (e, i) => {
10
+ for (var t in i)
11
+ I(e, t, { get: i[t], enumerable: !0 });
12
+ }, _e = (e, i, t, r) => {
13
+ if (i && typeof i == "object" || typeof i == "function")
14
+ for (let a of Gt(i))
15
+ !Xt.call(e, a) && a !== t && I(e, a, { get: () => i[a], enumerable: !(r = Ut(i, a)) || r.enumerable });
16
+ return e;
17
+ };
18
+ var R = (e, i, t) => (t = e != null ? Jt(Vt(e)) : {}, _e(
19
+ // If the importer is in node compatibility mode or this is not an ESM
20
+ // file that has been converted to a CommonJS file using a Babel-
21
+ // compatible transform (i.e. "__esModule" has not been set), then set
22
+ // "default" to the CommonJS "module.exports" for node compatibility.
23
+ i || !e || !e.__esModule ? I(t, "default", { value: e, enumerable: !0 }) : t,
24
+ e
25
+ )), q = (e) => _e(I({}, "__esModule", { value: !0 }), e);
26
+
27
+ // ../node_modules/tslib/tslib.es6.mjs
28
+ var Ye = {};
29
+ z(Ye, {
30
+ __addDisposableResource: () => Xe,
31
+ __assign: () => G,
32
+ __asyncDelegator: () => $e,
33
+ __asyncGenerator: () => qe,
34
+ __asyncValues: () => We,
35
+ __await: () => L,
36
+ __awaiter: () => Ae,
37
+ __classPrivateFieldGet: () => Ue,
38
+ __classPrivateFieldIn: () => Ve,
39
+ __classPrivateFieldSet: () => Ge,
40
+ __createBinding: () => X,
41
+ __decorate: () => Se,
42
+ __disposeResources: () => Ke,
43
+ __esDecorate: () => Fe,
44
+ __exportStar: () => De,
45
+ __extends: () => Ee,
46
+ __generator: () => Ne,
47
+ __importDefault: () => Je,
48
+ __importStar: () => Be,
49
+ __makeTemplateObject: () => He,
50
+ __metadata: () => Ce,
51
+ __param: () => Te,
52
+ __propKey: () => ke,
53
+ __read: () => ce,
54
+ __rest: () => Pe,
55
+ __rewriteRelativeImportExtension: () => Ze,
56
+ __runInitializers: () => Re,
57
+ __setFunctionName: () => Le,
58
+ __spread: () => Ie,
59
+ __spreadArray: () => ze,
60
+ __spreadArrays: () => Me,
61
+ __values: () => V,
62
+ default: () => ei
63
+ });
64
+ function Ee(e, i) {
65
+ if (typeof i != "function" && i !== null)
66
+ throw new TypeError("Class extends value " + String(i) + " is not a constructor or null");
67
+ se(e, i);
68
+ function t() {
69
+ this.constructor = e;
70
+ }
71
+ o(t, "__"), e.prototype = i === null ? Object.create(i) : (t.prototype = i.prototype, new t());
72
+ }
73
+ function Pe(e, i) {
74
+ var t = {};
75
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && i.indexOf(r) < 0 && (t[r] = e[r]);
76
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
77
+ for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
78
+ i.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (t[r[a]] = e[r[a]]);
79
+ return t;
80
+ }
81
+ function Se(e, i, t, r) {
82
+ var a = arguments.length, n = a < 3 ? i : r === null ? r = Object.getOwnPropertyDescriptor(i, t) : r, s;
83
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") n = Reflect.decorate(e, i, t, r);
84
+ else for (var c = e.length - 1; c >= 0; c--) (s = e[c]) && (n = (a < 3 ? s(n) : a > 3 ? s(i, t, n) : s(i, t)) || n);
85
+ return a > 3 && n && Object.defineProperty(i, t, n), n;
86
+ }
87
+ function Te(e, i) {
88
+ return function(t, r) {
89
+ i(t, r, e);
90
+ };
91
+ }
92
+ function Fe(e, i, t, r, a, n) {
93
+ function s(v) {
94
+ if (v !== void 0 && typeof v != "function") throw new TypeError("Function expected");
95
+ return v;
96
+ }
97
+ o(s, "accept");
98
+ for (var c = r.kind, p = c === "getter" ? "get" : c === "setter" ? "set" : "value", l = !i && e ? r.static ? e : e.prototype : null, u = i ||
99
+ (l ? Object.getOwnPropertyDescriptor(l, r.name) : {}), d, x = !1, g = t.length - 1; g >= 0; g--) {
100
+ var m = {};
101
+ for (var f in r) m[f] = f === "access" ? {} : r[f];
102
+ for (var f in r.access) m.access[f] = r.access[f];
103
+ m.addInitializer = function(v) {
104
+ if (x) throw new TypeError("Cannot add initializers after decoration has completed");
105
+ n.push(s(v || null));
106
+ };
107
+ var y = (0, t[g])(c === "accessor" ? { get: u.get, set: u.set } : u[p], m);
108
+ if (c === "accessor") {
109
+ if (y === void 0) continue;
110
+ if (y === null || typeof y != "object") throw new TypeError("Object expected");
111
+ (d = s(y.get)) && (u.get = d), (d = s(y.set)) && (u.set = d), (d = s(y.init)) && a.unshift(d);
112
+ } else (d = s(y)) && (c === "field" ? a.unshift(d) : u[p] = d);
113
+ }
114
+ l && Object.defineProperty(l, r.name, u), x = !0;
115
+ }
116
+ function Re(e, i, t) {
117
+ for (var r = arguments.length > 2, a = 0; a < i.length; a++)
118
+ t = r ? i[a].call(e, t) : i[a].call(e);
119
+ return r ? t : void 0;
120
+ }
121
+ function ke(e) {
122
+ return typeof e == "symbol" ? e : "".concat(e);
123
+ }
124
+ function Le(e, i, t) {
125
+ return typeof i == "symbol" && (i = i.description ? "[".concat(i.description, "]") : ""), Object.defineProperty(e, "name", { configurable: !0,
126
+ value: t ? "".concat(t, " ", i) : i });
127
+ }
128
+ function Ce(e, i) {
129
+ if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, i);
130
+ }
131
+ function Ae(e, i, t, r) {
132
+ function a(n) {
133
+ return n instanceof t ? n : new t(function(s) {
134
+ s(n);
135
+ });
136
+ }
137
+ return o(a, "adopt"), new (t || (t = Promise))(function(n, s) {
138
+ function c(u) {
139
+ try {
140
+ l(r.next(u));
141
+ } catch (d) {
142
+ s(d);
143
+ }
144
+ }
145
+ o(c, "fulfilled");
146
+ function p(u) {
147
+ try {
148
+ l(r.throw(u));
149
+ } catch (d) {
150
+ s(d);
151
+ }
152
+ }
153
+ o(p, "rejected");
154
+ function l(u) {
155
+ u.done ? n(u.value) : a(u.value).then(c, p);
156
+ }
157
+ o(l, "step"), l((r = r.apply(e, i || [])).next());
158
+ });
159
+ }
160
+ function Ne(e, i) {
161
+ var t = { label: 0, sent: /* @__PURE__ */ o(function() {
162
+ if (n[0] & 1) throw n[1];
163
+ return n[1];
164
+ }, "sent"), trys: [], ops: [] }, r, a, n, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
165
+ return s.next = c(0), s.throw = c(1), s.return = c(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
166
+ return this;
167
+ }), s;
168
+ function c(l) {
169
+ return function(u) {
170
+ return p([l, u]);
171
+ };
172
+ }
173
+ function p(l) {
174
+ if (r) throw new TypeError("Generator is already executing.");
175
+ for (; s && (s = 0, l[0] && (t = 0)), t; ) try {
176
+ if (r = 1, a && (n = l[0] & 2 ? a.return : l[0] ? a.throw || ((n = a.return) && n.call(a), 0) : a.next) && !(n = n.call(a, l[1])).done)
177
+ return n;
178
+ switch (a = 0, n && (l = [l[0] & 2, n.value]), l[0]) {
179
+ case 0:
180
+ case 1:
181
+ n = l;
182
+ break;
183
+ case 4:
184
+ return t.label++, { value: l[1], done: !1 };
185
+ case 5:
186
+ t.label++, a = l[1], l = [0];
187
+ continue;
188
+ case 7:
189
+ l = t.ops.pop(), t.trys.pop();
190
+ continue;
191
+ default:
192
+ if (n = t.trys, !(n = n.length > 0 && n[n.length - 1]) && (l[0] === 6 || l[0] === 2)) {
193
+ t = 0;
194
+ continue;
195
+ }
196
+ if (l[0] === 3 && (!n || l[1] > n[0] && l[1] < n[3])) {
197
+ t.label = l[1];
198
+ break;
199
+ }
200
+ if (l[0] === 6 && t.label < n[1]) {
201
+ t.label = n[1], n = l;
202
+ break;
203
+ }
204
+ if (n && t.label < n[2]) {
205
+ t.label = n[2], t.ops.push(l);
206
+ break;
207
+ }
208
+ n[2] && t.ops.pop(), t.trys.pop();
209
+ continue;
210
+ }
211
+ l = i.call(e, t);
212
+ } catch (u) {
213
+ l = [6, u], a = 0;
214
+ } finally {
215
+ r = n = 0;
216
+ }
217
+ if (l[0] & 5) throw l[1];
218
+ return { value: l[0] ? l[1] : void 0, done: !0 };
219
+ }
220
+ }
221
+ function De(e, i) {
222
+ for (var t in e) t !== "default" && !Object.prototype.hasOwnProperty.call(i, t) && X(i, e, t);
223
+ }
224
+ function V(e) {
225
+ var i = typeof Symbol == "function" && Symbol.iterator, t = i && e[i], r = 0;
226
+ if (t) return t.call(e);
227
+ if (e && typeof e.length == "number") return {
228
+ next: /* @__PURE__ */ o(function() {
229
+ return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
230
+ }, "next")
231
+ };
232
+ throw new TypeError(i ? "Object is not iterable." : "Symbol.iterator is not defined.");
233
+ }
234
+ function ce(e, i) {
235
+ var t = typeof Symbol == "function" && e[Symbol.iterator];
236
+ if (!t) return e;
237
+ var r = t.call(e), a, n = [], s;
238
+ try {
239
+ for (; (i === void 0 || i-- > 0) && !(a = r.next()).done; ) n.push(a.value);
240
+ } catch (c) {
241
+ s = { error: c };
242
+ } finally {
243
+ try {
244
+ a && !a.done && (t = r.return) && t.call(r);
245
+ } finally {
246
+ if (s) throw s.error;
247
+ }
248
+ }
249
+ return n;
250
+ }
251
+ function Ie() {
252
+ for (var e = [], i = 0; i < arguments.length; i++)
253
+ e = e.concat(ce(arguments[i]));
254
+ return e;
255
+ }
256
+ function Me() {
257
+ for (var e = 0, i = 0, t = arguments.length; i < t; i++) e += arguments[i].length;
258
+ for (var r = Array(e), a = 0, i = 0; i < t; i++)
259
+ for (var n = arguments[i], s = 0, c = n.length; s < c; s++, a++)
260
+ r[a] = n[s];
261
+ return r;
262
+ }
263
+ function ze(e, i, t) {
264
+ if (t || arguments.length === 2) for (var r = 0, a = i.length, n; r < a; r++)
265
+ (n || !(r in i)) && (n || (n = Array.prototype.slice.call(i, 0, r)), n[r] = i[r]);
266
+ return e.concat(n || Array.prototype.slice.call(i));
267
+ }
268
+ function L(e) {
269
+ return this instanceof L ? (this.v = e, this) : new L(e);
270
+ }
271
+ function qe(e, i, t) {
272
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
273
+ var r = t.apply(e, i || []), a, n = [];
274
+ return a = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", s), a[Symbol.
275
+ asyncIterator] = function() {
276
+ return this;
277
+ }, a;
278
+ function s(g) {
279
+ return function(m) {
280
+ return Promise.resolve(m).then(g, d);
281
+ };
282
+ }
283
+ function c(g, m) {
284
+ r[g] && (a[g] = function(f) {
285
+ return new Promise(function(y, v) {
286
+ n.push([g, f, y, v]) > 1 || p(g, f);
287
+ });
288
+ }, m && (a[g] = m(a[g])));
289
+ }
290
+ function p(g, m) {
291
+ try {
292
+ l(r[g](m));
293
+ } catch (f) {
294
+ x(n[0][3], f);
295
+ }
296
+ }
297
+ function l(g) {
298
+ g.value instanceof L ? Promise.resolve(g.value.v).then(u, d) : x(n[0][2], g);
299
+ }
300
+ function u(g) {
301
+ p("next", g);
302
+ }
303
+ function d(g) {
304
+ p("throw", g);
305
+ }
306
+ function x(g, m) {
307
+ g(m), n.shift(), n.length && p(n[0][0], n[0][1]);
308
+ }
309
+ }
310
+ function $e(e) {
311
+ var i, t;
312
+ return i = {}, r("next"), r("throw", function(a) {
313
+ throw a;
314
+ }), r("return"), i[Symbol.iterator] = function() {
315
+ return this;
316
+ }, i;
317
+ function r(a, n) {
318
+ i[a] = e[a] ? function(s) {
319
+ return (t = !t) ? { value: L(e[a](s)), done: !1 } : n ? n(s) : s;
320
+ } : n;
321
+ }
322
+ }
323
+ function We(e) {
324
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
325
+ var i = e[Symbol.asyncIterator], t;
326
+ return i ? i.call(e) : (e = typeof V == "function" ? V(e) : e[Symbol.iterator](), t = {}, r("next"), r("throw"), r("return"), t[Symbol.asyncIterator] =
327
+ function() {
328
+ return this;
329
+ }, t);
330
+ function r(n) {
331
+ t[n] = e[n] && function(s) {
332
+ return new Promise(function(c, p) {
333
+ s = e[n](s), a(c, p, s.done, s.value);
334
+ });
335
+ };
336
+ }
337
+ function a(n, s, c, p) {
338
+ Promise.resolve(p).then(function(l) {
339
+ n({ value: l, done: c });
340
+ }, s);
341
+ }
342
+ }
343
+ function He(e, i) {
344
+ return Object.defineProperty ? Object.defineProperty(e, "raw", { value: i }) : e.raw = i, e;
345
+ }
346
+ function Be(e) {
347
+ if (e && e.__esModule) return e;
348
+ var i = {};
349
+ if (e != null) for (var t = le(e), r = 0; r < t.length; r++) t[r] !== "default" && X(i, e, t[r]);
350
+ return Yt(i, e), i;
351
+ }
352
+ function Je(e) {
353
+ return e && e.__esModule ? e : { default: e };
354
+ }
355
+ function Ue(e, i, t, r) {
356
+ if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
357
+ if (typeof i == "function" ? e !== i || !r : !i.has(e)) throw new TypeError("Cannot read private member from an object whose class did not\
358
+ declare it");
359
+ return t === "m" ? r : t === "a" ? r.call(e) : r ? r.value : i.get(e);
360
+ }
361
+ function Ge(e, i, t, r, a) {
362
+ if (r === "m") throw new TypeError("Private method is not writable");
363
+ if (r === "a" && !a) throw new TypeError("Private accessor was defined without a setter");
364
+ if (typeof i == "function" ? e !== i || !a : !i.has(e)) throw new TypeError("Cannot write private member to an object whose class did not \
365
+ declare it");
366
+ return r === "a" ? a.call(e, t) : a ? a.value = t : i.set(e, t), t;
367
+ }
368
+ function Ve(e, i) {
369
+ if (i === null || typeof i != "object" && typeof i != "function") throw new TypeError("Cannot use 'in' operator on non-object");
370
+ return typeof e == "function" ? i === e : e.has(i);
371
+ }
372
+ function Xe(e, i, t) {
373
+ if (i != null) {
374
+ if (typeof i != "object" && typeof i != "function") throw new TypeError("Object expected.");
375
+ var r, a;
376
+ if (t) {
377
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
378
+ r = i[Symbol.asyncDispose];
379
+ }
380
+ if (r === void 0) {
381
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
382
+ r = i[Symbol.dispose], t && (a = r);
383
+ }
384
+ if (typeof r != "function") throw new TypeError("Object not disposable.");
385
+ a && (r = /* @__PURE__ */ o(function() {
386
+ try {
387
+ a.call(this);
388
+ } catch (n) {
389
+ return Promise.reject(n);
390
+ }
391
+ }, "dispose")), e.stack.push({ value: i, dispose: r, async: t });
392
+ } else t && e.stack.push({ async: !0 });
393
+ return i;
394
+ }
395
+ function Ke(e) {
396
+ function i(n) {
397
+ e.error = e.hasError ? new Qt(n, e.error, "An error was suppressed during disposal.") : n, e.hasError = !0;
398
+ }
399
+ o(i, "fail");
400
+ var t, r = 0;
401
+ function a() {
402
+ for (; t = e.stack.pop(); )
403
+ try {
404
+ if (!t.async && r === 1) return r = 0, e.stack.push(t), Promise.resolve().then(a);
405
+ if (t.dispose) {
406
+ var n = t.dispose.call(t.value);
407
+ if (t.async) return r |= 2, Promise.resolve(n).then(a, function(s) {
408
+ return i(s), a();
409
+ });
410
+ } else r |= 1;
411
+ } catch (s) {
412
+ i(s);
413
+ }
414
+ if (r === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
415
+ if (e.hasError) throw e.error;
416
+ }
417
+ return o(a, "next"), a();
418
+ }
419
+ function Ze(e, i) {
420
+ return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(t, r, a, n, s) {
421
+ return r ? i ? ".jsx" : ".js" : a && (!n || !s) ? t : a + n + "." + s.toLowerCase() + "js";
422
+ }) : e;
423
+ }
424
+ var se, G, X, Yt, le, Qt, ei, Qe = U(() => {
425
+ se = /* @__PURE__ */ o(function(e, i) {
426
+ return se = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
427
+ t.__proto__ = r;
428
+ } || function(t, r) {
429
+ for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
430
+ }, se(e, i);
431
+ }, "extendStatics");
432
+ o(Ee, "__extends");
433
+ G = /* @__PURE__ */ o(function() {
434
+ return G = Object.assign || /* @__PURE__ */ o(function(i) {
435
+ for (var t, r = 1, a = arguments.length; r < a; r++) {
436
+ t = arguments[r];
437
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
438
+ }
439
+ return i;
440
+ }, "__assign"), G.apply(this, arguments);
441
+ }, "__assign");
442
+ o(Pe, "__rest");
443
+ o(Se, "__decorate");
444
+ o(Te, "__param");
445
+ o(Fe, "__esDecorate");
446
+ o(Re, "__runInitializers");
447
+ o(ke, "__propKey");
448
+ o(Le, "__setFunctionName");
449
+ o(Ce, "__metadata");
450
+ o(Ae, "__awaiter");
451
+ o(Ne, "__generator");
452
+ X = Object.create ? function(e, i, t, r) {
453
+ r === void 0 && (r = t);
454
+ var a = Object.getOwnPropertyDescriptor(i, t);
455
+ (!a || ("get" in a ? !i.__esModule : a.writable || a.configurable)) && (a = { enumerable: !0, get: /* @__PURE__ */ o(function() {
456
+ return i[t];
457
+ }, "get") }), Object.defineProperty(e, r, a);
458
+ } : function(e, i, t, r) {
459
+ r === void 0 && (r = t), e[r] = i[t];
460
+ };
461
+ o(De, "__exportStar");
462
+ o(V, "__values");
463
+ o(ce, "__read");
464
+ o(Ie, "__spread");
465
+ o(Me, "__spreadArrays");
466
+ o(ze, "__spreadArray");
467
+ o(L, "__await");
468
+ o(qe, "__asyncGenerator");
469
+ o($e, "__asyncDelegator");
470
+ o(We, "__asyncValues");
471
+ o(He, "__makeTemplateObject");
472
+ Yt = Object.create ? function(e, i) {
473
+ Object.defineProperty(e, "default", { enumerable: !0, value: i });
474
+ } : function(e, i) {
475
+ e.default = i;
476
+ }, le = /* @__PURE__ */ o(function(e) {
477
+ return le = Object.getOwnPropertyNames || function(i) {
478
+ var t = [];
479
+ for (var r in i) Object.prototype.hasOwnProperty.call(i, r) && (t[t.length] = r);
480
+ return t;
481
+ }, le(e);
482
+ }, "ownKeys");
483
+ o(Be, "__importStar");
484
+ o(Je, "__importDefault");
485
+ o(Ue, "__classPrivateFieldGet");
486
+ o(Ge, "__classPrivateFieldSet");
487
+ o(Ve, "__classPrivateFieldIn");
488
+ o(Xe, "__addDisposableResource");
489
+ Qt = typeof SuppressedError == "function" ? SuppressedError : function(e, i, t) {
490
+ var r = new Error(t);
491
+ return r.name = "SuppressedError", r.error = e, r.suppressed = i, r;
492
+ };
493
+ o(Ke, "__disposeResources");
494
+ o(Ze, "__rewriteRelativeImportExtension");
495
+ ei = {
496
+ __extends: Ee,
497
+ __assign: G,
498
+ __rest: Pe,
499
+ __decorate: Se,
500
+ __param: Te,
501
+ __esDecorate: Fe,
502
+ __runInitializers: Re,
503
+ __propKey: ke,
504
+ __setFunctionName: Le,
505
+ __metadata: Ce,
506
+ __awaiter: Ae,
507
+ __generator: Ne,
508
+ __createBinding: X,
509
+ __exportStar: De,
510
+ __values: V,
511
+ __read: ce,
512
+ __spread: Ie,
513
+ __spreadArrays: Me,
514
+ __spreadArray: ze,
515
+ __await: L,
516
+ __asyncGenerator: qe,
517
+ __asyncDelegator: $e,
518
+ __asyncValues: We,
519
+ __makeTemplateObject: He,
520
+ __importStar: Be,
521
+ __importDefault: Je,
522
+ __classPrivateFieldGet: Ue,
523
+ __classPrivateFieldSet: Ge,
524
+ __classPrivateFieldIn: Ve,
525
+ __addDisposableResource: Xe,
526
+ __disposeResources: Ke,
527
+ __rewriteRelativeImportExtension: Ze
528
+ };
529
+ });
530
+
531
+ // ../node_modules/@yarnpkg/esbuild-plugin-pnp/lib/index.js
532
+ var tt = M((K) => {
533
+ "use strict";
534
+ Object.defineProperty(K, "__esModule", { value: !0 });
535
+ K.pnpPlugin = void 0;
536
+ var et = (Qe(), q(Ye)), ti = et.__importStar(require("fs")), ii = et.__importDefault(require("path")), ri = /()/, ai = [".tsx", ".ts", ".j\
537
+ sx", ".mjs", ".cjs", ".js", ".css", ".json"];
538
+ function ni(e) {
539
+ return e.map((i) => {
540
+ let t = i.indexOf("*");
541
+ return t !== -1 ? { prefix: i.slice(0, t), suffix: i.slice(t + 1) } : i;
542
+ });
543
+ }
544
+ o(ni, "parseExternals");
545
+ function oi(e, i) {
546
+ for (let t of i)
547
+ if (typeof t == "object") {
548
+ if (e.length >= t.prefix.length + t.suffix.length && e.startsWith(t.prefix) && e.endsWith(t.suffix))
549
+ return !0;
550
+ } else if (e === t || !t.startsWith("/") && !t.startsWith("./") && !t.startsWith("../") && t !== "." && t !== ".." && e.startsWith(`${t}\
551
+ /`))
552
+ return !0;
553
+ return !1;
554
+ }
555
+ o(oi, "isExternal");
556
+ async function si(e) {
557
+ return {
558
+ contents: await ti.promises.readFile(e.path),
559
+ loader: "default",
560
+ // For regular imports in the `file` namespace, resolveDir is the directory the
561
+ // file being resolved lives in. For all other virtual modules, this defaults to
562
+ // empty string: ""
563
+ // A sensible value for pnp imports is the same as the `file` namespace, as pnp
564
+ // still resolves to files on disk (in the cache).
565
+ resolveDir: ii.default.dirname(e.path)
566
+ };
567
+ }
568
+ o(si, "defaultOnLoad");
569
+ async function li(e, { resolvedPath: i, error: t, watchFiles: r }) {
570
+ let a = t ? [{ text: t.message }] : [], n;
571
+ switch (e.kind) {
572
+ case "require-call":
573
+ case "require-resolve":
574
+ case "dynamic-import":
575
+ n = { warnings: a };
576
+ break;
577
+ default:
578
+ n = { errors: a };
579
+ break;
580
+ }
581
+ return i !== null ? { namespace: "pnp", path: i, watchFiles: r } : { external: !0, ...n, watchFiles: r };
582
+ }
583
+ o(li, "defaultOnResolve");
584
+ function ci({ baseDir: e = process.cwd(), extensions: i = ai, filter: t = ri, onResolve: r = li, onLoad: a = si } = {}) {
585
+ return {
586
+ name: "@yarnpkg/esbuild-plugin-pnp",
587
+ setup(n) {
588
+ var s, c;
589
+ let { findPnpApi: p } = require("module");
590
+ if (typeof p > "u")
591
+ return;
592
+ let l = ni((s = n.initialOptions.external) !== null && s !== void 0 ? s : []), u = (c = n.initialOptions.platform) !== null && c !==
593
+ void 0 ? c : "browser", d = u === "node", x = new Set(n.initialOptions.conditions);
594
+ x.add("default"), (u === "browser" || u === "node") && x.add(u);
595
+ let g = new Set(x);
596
+ g.add("import");
597
+ let m = new Set(x);
598
+ m.add("require"), n.onResolve({ filter: t }, (f) => {
599
+ var y, v;
600
+ if (oi(f.path, l))
601
+ return { external: !0 };
602
+ let _ = x;
603
+ f.kind === "dynamic-import" || f.kind === "import-statement" ? _ = g : (f.kind === "require-call" || f.kind === "require-resolve") &&
604
+ (_ = m);
605
+ let O = f.resolveDir ? `${f.resolveDir}/` : f.importer ? f.importer : `${e}/`, w = p(O);
606
+ if (!w)
607
+ return;
608
+ let E = null, P;
609
+ try {
610
+ E = w.resolveRequest(f.path, O, {
611
+ conditions: _,
612
+ considerBuiltins: d,
613
+ extensions: i
614
+ });
615
+ } catch (J) {
616
+ P = J;
617
+ }
618
+ let k = [w.resolveRequest("pnpapi", null)];
619
+ if (E) {
620
+ let J = w.findPackageLocator(E);
621
+ if (J) {
622
+ let re = w.getPackageInformation(J);
623
+ re?.linkType === "SOFT" && k.push((v = (y = w.resolveVirtual) === null || y === void 0 ? void 0 : y.call(w, E)) !== null && v !==
624
+ void 0 ? v : E);
625
+ }
626
+ }
627
+ return r(f, { resolvedPath: E, error: P, watchFiles: k });
628
+ }), n.onLoad !== null && n.onLoad({ filter: t }, a);
629
+ }
630
+ };
631
+ }
632
+ o(ci, "pnpPlugin");
633
+ K.pnpPlugin = ci;
634
+ });
635
+
636
+ // ../node_modules/totalist/sync/index.mjs
637
+ var rt = {};
638
+ z(rt, {
639
+ totalist: () => it
640
+ });
641
+ function it(e, i, t = "") {
642
+ e = (0, C.resolve)(".", e);
643
+ let r = (0, Z.readdirSync)(e), a = 0, n, s;
644
+ for (; a < r.length; a++)
645
+ n = (0, C.join)(e, r[a]), s = (0, Z.statSync)(n), s.isDirectory() ? it(n, i, (0, C.join)(t, r[a])) : i((0, C.join)(t, r[a]), n, s);
646
+ }
647
+ var C, Z, at = U(() => {
648
+ C = require("path"), Z = require("fs");
649
+ o(it, "totalist");
650
+ });
651
+
652
+ // ../node_modules/@polka/url/build.mjs
653
+ var ot = {};
654
+ z(ot, {
655
+ parse: () => pi
656
+ });
657
+ function pi(e) {
658
+ let i = e.url;
659
+ if (i == null) return;
660
+ let t = e._parsedUrl;
661
+ if (t && t.raw === i) return t;
662
+ let r = i, a = "", n;
663
+ if (i.length > 1) {
664
+ let s = i.indexOf("?", 1);
665
+ s !== -1 && (a = i.substring(s), r = i.substring(0, s), a.length > 1 && (n = nt.parse(a.substring(1))));
666
+ }
667
+ return e._parsedUrl = { pathname: r, search: a, query: n, raw: i };
668
+ }
669
+ var nt, st = U(() => {
670
+ nt = R(require("node:querystring"), 1);
671
+ o(pi, "parse");
672
+ });
673
+
674
+ // ../node_modules/mrmime/index.mjs
675
+ var ct = {};
676
+ z(ct, {
677
+ lookup: () => mi,
678
+ mimes: () => lt
679
+ });
680
+ function mi(e) {
681
+ let i = ("" + e).trim().toLowerCase(), t = i.lastIndexOf(".");
682
+ return lt[~t ? i.substring(++t) : i];
683
+ }
684
+ var lt, pt = U(() => {
685
+ lt = {
686
+ "3g2": "video/3gpp2",
687
+ "3gp": "video/3gpp",
688
+ "3gpp": "video/3gpp",
689
+ "3mf": "model/3mf",
690
+ aac: "audio/aac",
691
+ ac: "application/pkix-attr-cert",
692
+ adp: "audio/adpcm",
693
+ adts: "audio/aac",
694
+ ai: "application/postscript",
695
+ aml: "application/automationml-aml+xml",
696
+ amlx: "application/automationml-amlx+zip",
697
+ amr: "audio/amr",
698
+ apng: "image/apng",
699
+ appcache: "text/cache-manifest",
700
+ appinstaller: "application/appinstaller",
701
+ appx: "application/appx",
702
+ appxbundle: "application/appxbundle",
703
+ asc: "application/pgp-keys",
704
+ atom: "application/atom+xml",
705
+ atomcat: "application/atomcat+xml",
706
+ atomdeleted: "application/atomdeleted+xml",
707
+ atomsvc: "application/atomsvc+xml",
708
+ au: "audio/basic",
709
+ avci: "image/avci",
710
+ avcs: "image/avcs",
711
+ avif: "image/avif",
712
+ aw: "application/applixware",
713
+ bdoc: "application/bdoc",
714
+ bin: "application/octet-stream",
715
+ bmp: "image/bmp",
716
+ bpk: "application/octet-stream",
717
+ btf: "image/prs.btif",
718
+ btif: "image/prs.btif",
719
+ buffer: "application/octet-stream",
720
+ ccxml: "application/ccxml+xml",
721
+ cdfx: "application/cdfx+xml",
722
+ cdmia: "application/cdmi-capability",
723
+ cdmic: "application/cdmi-container",
724
+ cdmid: "application/cdmi-domain",
725
+ cdmio: "application/cdmi-object",
726
+ cdmiq: "application/cdmi-queue",
727
+ cer: "application/pkix-cert",
728
+ cgm: "image/cgm",
729
+ cjs: "application/node",
730
+ class: "application/java-vm",
731
+ coffee: "text/coffeescript",
732
+ conf: "text/plain",
733
+ cpl: "application/cpl+xml",
734
+ cpt: "application/mac-compactpro",
735
+ crl: "application/pkix-crl",
736
+ css: "text/css",
737
+ csv: "text/csv",
738
+ cu: "application/cu-seeme",
739
+ cwl: "application/cwl",
740
+ cww: "application/prs.cww",
741
+ davmount: "application/davmount+xml",
742
+ dbk: "application/docbook+xml",
743
+ deb: "application/octet-stream",
744
+ def: "text/plain",
745
+ deploy: "application/octet-stream",
746
+ dib: "image/bmp",
747
+ "disposition-notification": "message/disposition-notification",
748
+ dist: "application/octet-stream",
749
+ distz: "application/octet-stream",
750
+ dll: "application/octet-stream",
751
+ dmg: "application/octet-stream",
752
+ dms: "application/octet-stream",
753
+ doc: "application/msword",
754
+ dot: "application/msword",
755
+ dpx: "image/dpx",
756
+ drle: "image/dicom-rle",
757
+ dsc: "text/prs.lines.tag",
758
+ dssc: "application/dssc+der",
759
+ dtd: "application/xml-dtd",
760
+ dump: "application/octet-stream",
761
+ dwd: "application/atsc-dwd+xml",
762
+ ear: "application/java-archive",
763
+ ecma: "application/ecmascript",
764
+ elc: "application/octet-stream",
765
+ emf: "image/emf",
766
+ eml: "message/rfc822",
767
+ emma: "application/emma+xml",
768
+ emotionml: "application/emotionml+xml",
769
+ eps: "application/postscript",
770
+ epub: "application/epub+zip",
771
+ exe: "application/octet-stream",
772
+ exi: "application/exi",
773
+ exp: "application/express",
774
+ exr: "image/aces",
775
+ ez: "application/andrew-inset",
776
+ fdf: "application/fdf",
777
+ fdt: "application/fdt+xml",
778
+ fits: "image/fits",
779
+ g3: "image/g3fax",
780
+ gbr: "application/rpki-ghostbusters",
781
+ geojson: "application/geo+json",
782
+ gif: "image/gif",
783
+ glb: "model/gltf-binary",
784
+ gltf: "model/gltf+json",
785
+ gml: "application/gml+xml",
786
+ gpx: "application/gpx+xml",
787
+ gram: "application/srgs",
788
+ grxml: "application/srgs+xml",
789
+ gxf: "application/gxf",
790
+ gz: "application/gzip",
791
+ h261: "video/h261",
792
+ h263: "video/h263",
793
+ h264: "video/h264",
794
+ heic: "image/heic",
795
+ heics: "image/heic-sequence",
796
+ heif: "image/heif",
797
+ heifs: "image/heif-sequence",
798
+ hej2: "image/hej2k",
799
+ held: "application/atsc-held+xml",
800
+ hjson: "application/hjson",
801
+ hlp: "application/winhlp",
802
+ hqx: "application/mac-binhex40",
803
+ hsj2: "image/hsj2",
804
+ htm: "text/html",
805
+ html: "text/html",
806
+ ics: "text/calendar",
807
+ ief: "image/ief",
808
+ ifb: "text/calendar",
809
+ iges: "model/iges",
810
+ igs: "model/iges",
811
+ img: "application/octet-stream",
812
+ in: "text/plain",
813
+ ini: "text/plain",
814
+ ink: "application/inkml+xml",
815
+ inkml: "application/inkml+xml",
816
+ ipfix: "application/ipfix",
817
+ iso: "application/octet-stream",
818
+ its: "application/its+xml",
819
+ jade: "text/jade",
820
+ jar: "application/java-archive",
821
+ jhc: "image/jphc",
822
+ jls: "image/jls",
823
+ jp2: "image/jp2",
824
+ jpe: "image/jpeg",
825
+ jpeg: "image/jpeg",
826
+ jpf: "image/jpx",
827
+ jpg: "image/jpeg",
828
+ jpg2: "image/jp2",
829
+ jpgm: "image/jpm",
830
+ jpgv: "video/jpeg",
831
+ jph: "image/jph",
832
+ jpm: "image/jpm",
833
+ jpx: "image/jpx",
834
+ js: "text/javascript",
835
+ json: "application/json",
836
+ json5: "application/json5",
837
+ jsonld: "application/ld+json",
838
+ jsonml: "application/jsonml+json",
839
+ jsx: "text/jsx",
840
+ jt: "model/jt",
841
+ jxr: "image/jxr",
842
+ jxra: "image/jxra",
843
+ jxrs: "image/jxrs",
844
+ jxs: "image/jxs",
845
+ jxsc: "image/jxsc",
846
+ jxsi: "image/jxsi",
847
+ jxss: "image/jxss",
848
+ kar: "audio/midi",
849
+ ktx: "image/ktx",
850
+ ktx2: "image/ktx2",
851
+ less: "text/less",
852
+ lgr: "application/lgr+xml",
853
+ list: "text/plain",
854
+ litcoffee: "text/coffeescript",
855
+ log: "text/plain",
856
+ lostxml: "application/lost+xml",
857
+ lrf: "application/octet-stream",
858
+ m1v: "video/mpeg",
859
+ m21: "application/mp21",
860
+ m2a: "audio/mpeg",
861
+ m2v: "video/mpeg",
862
+ m3a: "audio/mpeg",
863
+ m4a: "audio/mp4",
864
+ m4p: "application/mp4",
865
+ m4s: "video/iso.segment",
866
+ ma: "application/mathematica",
867
+ mads: "application/mads+xml",
868
+ maei: "application/mmt-aei+xml",
869
+ man: "text/troff",
870
+ manifest: "text/cache-manifest",
871
+ map: "application/json",
872
+ mar: "application/octet-stream",
873
+ markdown: "text/markdown",
874
+ mathml: "application/mathml+xml",
875
+ mb: "application/mathematica",
876
+ mbox: "application/mbox",
877
+ md: "text/markdown",
878
+ mdx: "text/mdx",
879
+ me: "text/troff",
880
+ mesh: "model/mesh",
881
+ meta4: "application/metalink4+xml",
882
+ metalink: "application/metalink+xml",
883
+ mets: "application/mets+xml",
884
+ mft: "application/rpki-manifest",
885
+ mid: "audio/midi",
886
+ midi: "audio/midi",
887
+ mime: "message/rfc822",
888
+ mj2: "video/mj2",
889
+ mjp2: "video/mj2",
890
+ mjs: "text/javascript",
891
+ mml: "text/mathml",
892
+ mods: "application/mods+xml",
893
+ mov: "video/quicktime",
894
+ mp2: "audio/mpeg",
895
+ mp21: "application/mp21",
896
+ mp2a: "audio/mpeg",
897
+ mp3: "audio/mpeg",
898
+ mp4: "video/mp4",
899
+ mp4a: "audio/mp4",
900
+ mp4s: "application/mp4",
901
+ mp4v: "video/mp4",
902
+ mpd: "application/dash+xml",
903
+ mpe: "video/mpeg",
904
+ mpeg: "video/mpeg",
905
+ mpf: "application/media-policy-dataset+xml",
906
+ mpg: "video/mpeg",
907
+ mpg4: "video/mp4",
908
+ mpga: "audio/mpeg",
909
+ mpp: "application/dash-patch+xml",
910
+ mrc: "application/marc",
911
+ mrcx: "application/marcxml+xml",
912
+ ms: "text/troff",
913
+ mscml: "application/mediaservercontrol+xml",
914
+ msh: "model/mesh",
915
+ msi: "application/octet-stream",
916
+ msix: "application/msix",
917
+ msixbundle: "application/msixbundle",
918
+ msm: "application/octet-stream",
919
+ msp: "application/octet-stream",
920
+ mtl: "model/mtl",
921
+ musd: "application/mmt-usd+xml",
922
+ mxf: "application/mxf",
923
+ mxmf: "audio/mobile-xmf",
924
+ mxml: "application/xv+xml",
925
+ n3: "text/n3",
926
+ nb: "application/mathematica",
927
+ nq: "application/n-quads",
928
+ nt: "application/n-triples",
929
+ obj: "model/obj",
930
+ oda: "application/oda",
931
+ oga: "audio/ogg",
932
+ ogg: "audio/ogg",
933
+ ogv: "video/ogg",
934
+ ogx: "application/ogg",
935
+ omdoc: "application/omdoc+xml",
936
+ onepkg: "application/onenote",
937
+ onetmp: "application/onenote",
938
+ onetoc: "application/onenote",
939
+ onetoc2: "application/onenote",
940
+ opf: "application/oebps-package+xml",
941
+ opus: "audio/ogg",
942
+ otf: "font/otf",
943
+ owl: "application/rdf+xml",
944
+ oxps: "application/oxps",
945
+ p10: "application/pkcs10",
946
+ p7c: "application/pkcs7-mime",
947
+ p7m: "application/pkcs7-mime",
948
+ p7s: "application/pkcs7-signature",
949
+ p8: "application/pkcs8",
950
+ pdf: "application/pdf",
951
+ pfr: "application/font-tdpfr",
952
+ pgp: "application/pgp-encrypted",
953
+ pkg: "application/octet-stream",
954
+ pki: "application/pkixcmp",
955
+ pkipath: "application/pkix-pkipath",
956
+ pls: "application/pls+xml",
957
+ png: "image/png",
958
+ prc: "model/prc",
959
+ prf: "application/pics-rules",
960
+ provx: "application/provenance+xml",
961
+ ps: "application/postscript",
962
+ pskcxml: "application/pskc+xml",
963
+ pti: "image/prs.pti",
964
+ qt: "video/quicktime",
965
+ raml: "application/raml+yaml",
966
+ rapd: "application/route-apd+xml",
967
+ rdf: "application/rdf+xml",
968
+ relo: "application/p2p-overlay+xml",
969
+ rif: "application/reginfo+xml",
970
+ rl: "application/resource-lists+xml",
971
+ rld: "application/resource-lists-diff+xml",
972
+ rmi: "audio/midi",
973
+ rnc: "application/relax-ng-compact-syntax",
974
+ rng: "application/xml",
975
+ roa: "application/rpki-roa",
976
+ roff: "text/troff",
977
+ rq: "application/sparql-query",
978
+ rs: "application/rls-services+xml",
979
+ rsat: "application/atsc-rsat+xml",
980
+ rsd: "application/rsd+xml",
981
+ rsheet: "application/urc-ressheet+xml",
982
+ rss: "application/rss+xml",
983
+ rtf: "text/rtf",
984
+ rtx: "text/richtext",
985
+ rusd: "application/route-usd+xml",
986
+ s3m: "audio/s3m",
987
+ sbml: "application/sbml+xml",
988
+ scq: "application/scvp-cv-request",
989
+ scs: "application/scvp-cv-response",
990
+ sdp: "application/sdp",
991
+ senmlx: "application/senml+xml",
992
+ sensmlx: "application/sensml+xml",
993
+ ser: "application/java-serialized-object",
994
+ setpay: "application/set-payment-initiation",
995
+ setreg: "application/set-registration-initiation",
996
+ sgi: "image/sgi",
997
+ sgm: "text/sgml",
998
+ sgml: "text/sgml",
999
+ shex: "text/shex",
1000
+ shf: "application/shf+xml",
1001
+ shtml: "text/html",
1002
+ sieve: "application/sieve",
1003
+ sig: "application/pgp-signature",
1004
+ sil: "audio/silk",
1005
+ silo: "model/mesh",
1006
+ siv: "application/sieve",
1007
+ slim: "text/slim",
1008
+ slm: "text/slim",
1009
+ sls: "application/route-s-tsid+xml",
1010
+ smi: "application/smil+xml",
1011
+ smil: "application/smil+xml",
1012
+ snd: "audio/basic",
1013
+ so: "application/octet-stream",
1014
+ spdx: "text/spdx",
1015
+ spp: "application/scvp-vp-response",
1016
+ spq: "application/scvp-vp-request",
1017
+ spx: "audio/ogg",
1018
+ sql: "application/sql",
1019
+ sru: "application/sru+xml",
1020
+ srx: "application/sparql-results+xml",
1021
+ ssdl: "application/ssdl+xml",
1022
+ ssml: "application/ssml+xml",
1023
+ stk: "application/hyperstudio",
1024
+ stl: "model/stl",
1025
+ stpx: "model/step+xml",
1026
+ stpxz: "model/step-xml+zip",
1027
+ stpz: "model/step+zip",
1028
+ styl: "text/stylus",
1029
+ stylus: "text/stylus",
1030
+ svg: "image/svg+xml",
1031
+ svgz: "image/svg+xml",
1032
+ swidtag: "application/swid+xml",
1033
+ t: "text/troff",
1034
+ t38: "image/t38",
1035
+ td: "application/urc-targetdesc+xml",
1036
+ tei: "application/tei+xml",
1037
+ teicorpus: "application/tei+xml",
1038
+ text: "text/plain",
1039
+ tfi: "application/thraud+xml",
1040
+ tfx: "image/tiff-fx",
1041
+ tif: "image/tiff",
1042
+ tiff: "image/tiff",
1043
+ toml: "application/toml",
1044
+ tr: "text/troff",
1045
+ trig: "application/trig",
1046
+ ts: "video/mp2t",
1047
+ tsd: "application/timestamped-data",
1048
+ tsv: "text/tab-separated-values",
1049
+ ttc: "font/collection",
1050
+ ttf: "font/ttf",
1051
+ ttl: "text/turtle",
1052
+ ttml: "application/ttml+xml",
1053
+ txt: "text/plain",
1054
+ u3d: "model/u3d",
1055
+ u8dsn: "message/global-delivery-status",
1056
+ u8hdr: "message/global-headers",
1057
+ u8mdn: "message/global-disposition-notification",
1058
+ u8msg: "message/global",
1059
+ ubj: "application/ubjson",
1060
+ uri: "text/uri-list",
1061
+ uris: "text/uri-list",
1062
+ urls: "text/uri-list",
1063
+ vcard: "text/vcard",
1064
+ vrml: "model/vrml",
1065
+ vtt: "text/vtt",
1066
+ vxml: "application/voicexml+xml",
1067
+ war: "application/java-archive",
1068
+ wasm: "application/wasm",
1069
+ wav: "audio/wav",
1070
+ weba: "audio/webm",
1071
+ webm: "video/webm",
1072
+ webmanifest: "application/manifest+json",
1073
+ webp: "image/webp",
1074
+ wgsl: "text/wgsl",
1075
+ wgt: "application/widget",
1076
+ wif: "application/watcherinfo+xml",
1077
+ wmf: "image/wmf",
1078
+ woff: "font/woff",
1079
+ woff2: "font/woff2",
1080
+ wrl: "model/vrml",
1081
+ wsdl: "application/wsdl+xml",
1082
+ wspolicy: "application/wspolicy+xml",
1083
+ x3d: "model/x3d+xml",
1084
+ x3db: "model/x3d+fastinfoset",
1085
+ x3dbz: "model/x3d+binary",
1086
+ x3dv: "model/x3d-vrml",
1087
+ x3dvz: "model/x3d+vrml",
1088
+ x3dz: "model/x3d+xml",
1089
+ xaml: "application/xaml+xml",
1090
+ xav: "application/xcap-att+xml",
1091
+ xca: "application/xcap-caps+xml",
1092
+ xcs: "application/calendar+xml",
1093
+ xdf: "application/xcap-diff+xml",
1094
+ xdssc: "application/dssc+xml",
1095
+ xel: "application/xcap-el+xml",
1096
+ xenc: "application/xenc+xml",
1097
+ xer: "application/patch-ops-error+xml",
1098
+ xfdf: "application/xfdf",
1099
+ xht: "application/xhtml+xml",
1100
+ xhtml: "application/xhtml+xml",
1101
+ xhvml: "application/xv+xml",
1102
+ xlf: "application/xliff+xml",
1103
+ xm: "audio/xm",
1104
+ xml: "text/xml",
1105
+ xns: "application/xcap-ns+xml",
1106
+ xop: "application/xop+xml",
1107
+ xpl: "application/xproc+xml",
1108
+ xsd: "application/xml",
1109
+ xsf: "application/prs.xsf+xml",
1110
+ xsl: "application/xml",
1111
+ xslt: "application/xml",
1112
+ xspf: "application/xspf+xml",
1113
+ xvm: "application/xv+xml",
1114
+ xvml: "application/xv+xml",
1115
+ yaml: "text/yaml",
1116
+ yang: "application/yang",
1117
+ yin: "application/yin+xml",
1118
+ yml: "text/yaml",
1119
+ zip: "application/zip"
1120
+ };
1121
+ o(mi, "lookup");
1122
+ });
1123
+
1124
+ // ../node_modules/sirv/build.js
1125
+ var dt = M((br, ft) => {
1126
+ var pe = require("fs"), { join: ui, normalize: fi, resolve: di } = require("path"), { totalist: gi } = (at(), q(rt)), { parse: xi } = (st(), q(ot)),
1127
+ { lookup: hi } = (pt(), q(ct)), yi = /* @__PURE__ */ o(() => {
1128
+ }, "noop");
1129
+ function vi(e, i) {
1130
+ for (let t = 0; t < i.length; t++)
1131
+ if (i[t].test(e)) return !0;
1132
+ }
1133
+ o(vi, "isMatch");
1134
+ function mt(e, i) {
1135
+ let t = 0, r, a = e.length - 1;
1136
+ e.charCodeAt(a) === 47 && (e = e.substring(0, a));
1137
+ let n = [], s = `${e}/index`;
1138
+ for (; t < i.length; t++)
1139
+ r = i[t] ? `.${i[t]}` : "", e && n.push(e + r), n.push(s + r);
1140
+ return n;
1141
+ }
1142
+ o(mt, "toAssume");
1143
+ function wi(e, i, t) {
1144
+ let r = 0, a, n = mt(i, t);
1145
+ for (; r < n.length; r++)
1146
+ if (a = e[n[r]]) return a;
1147
+ }
1148
+ o(wi, "viaCache");
1149
+ function bi(e, i, t, r) {
1150
+ let a = 0, n = mt(t, r), s, c, p, l;
1151
+ for (; a < n.length; a++)
1152
+ if (s = fi(ui(e, p = n[a])), s.startsWith(e) && pe.existsSync(s)) {
1153
+ if (c = pe.statSync(s), c.isDirectory()) continue;
1154
+ return l = ut(p, c, i), l["Cache-Control"] = i ? "no-cache" : "no-store", { abs: s, stats: c, headers: l };
1155
+ }
1156
+ }
1157
+ o(bi, "viaLocal");
1158
+ function _i(e, i) {
1159
+ return i.statusCode = 404, i.end();
1160
+ }
1161
+ o(_i, "is404");
1162
+ function ji(e, i, t, r, a) {
1163
+ let n = 200, s, c = {};
1164
+ a = { ...a };
1165
+ for (let p in a)
1166
+ s = i.getHeader(p), s && (a[p] = s);
1167
+ if ((s = i.getHeader("content-type")) && (a["Content-Type"] = s), e.headers.range) {
1168
+ n = 206;
1169
+ let [p, l] = e.headers.range.replace("bytes=", "").split("-"), u = c.end = parseInt(l, 10) || r.size - 1, d = c.start = parseInt(p, 10) ||
1170
+ 0;
1171
+ if (u >= r.size && (u = r.size - 1), d >= r.size)
1172
+ return i.setHeader("Content-Range", `bytes */${r.size}`), i.statusCode = 416, i.end();
1173
+ a["Content-Range"] = `bytes ${d}-${u}/${r.size}`, a["Content-Length"] = u - d + 1, a["Accept-Ranges"] = "bytes";
1174
+ }
1175
+ i.writeHead(n, a), pe.createReadStream(t, c).pipe(i);
1176
+ }
1177
+ o(ji, "send");
1178
+ var Oi = {
1179
+ ".br": "br",
1180
+ ".gz": "gzip"
1181
+ };
1182
+ function ut(e, i, t) {
1183
+ let r = Oi[e.slice(-3)], a = hi(e.slice(0, r && -3)) || "";
1184
+ a === "text/html" && (a += ";charset=utf-8");
1185
+ let n = {
1186
+ "Content-Length": i.size,
1187
+ "Content-Type": a,
1188
+ "Last-Modified": i.mtime.toUTCString()
1189
+ };
1190
+ return r && (n["Content-Encoding"] = r), t && (n.ETag = `W/"${i.size}-${i.mtime.getTime()}"`), n;
1191
+ }
1192
+ o(ut, "toHeaders");
1193
+ ft.exports = function(e, i = {}) {
1194
+ e = di(e || ".");
1195
+ let t = i.onNoMatch || _i, r = i.setHeaders || yi, a = i.extensions || ["html", "htm"], n = i.gzip && a.map((m) => `${m}.gz`).concat("gz"),
1196
+ s = i.brotli && a.map((m) => `${m}.br`).concat("br"), c = {}, p = "/", l = !!i.etag, u = !!i.single;
1197
+ if (typeof i.single == "string") {
1198
+ let m = i.single.lastIndexOf(".");
1199
+ p += ~m ? i.single.substring(0, m) : i.single;
1200
+ }
1201
+ let d = [];
1202
+ i.ignores !== !1 && (d.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/), i.dotfiles ? d.push(/\/\.\w/) : d.push(/\/\.well-known/), [].concat(i.
1203
+ ignores || []).forEach((m) => {
1204
+ d.push(new RegExp(m, "i"));
1205
+ }));
1206
+ let x = i.maxAge != null && `public,max-age=${i.maxAge}`;
1207
+ x && i.immutable ? x += ",immutable" : x && i.maxAge === 0 && (x += ",must-revalidate"), i.dev || gi(e, (m, f, y) => {
1208
+ if (!/\.well-known[\\+\/]/.test(m)) {
1209
+ if (!i.dotfiles && /(^\.|[\\+|\/+]\.)/.test(m)) return;
1210
+ }
1211
+ let v = ut(m, y, l);
1212
+ x && (v["Cache-Control"] = x), c["/" + m.normalize().replace(/\\+/g, "/")] = { abs: f, stats: y, headers: v };
1213
+ });
1214
+ let g = i.dev ? bi.bind(0, e, l) : wi.bind(0, c);
1215
+ return function(m, f, y) {
1216
+ let v = [""], _ = xi(m).pathname, O = m.headers["accept-encoding"] || "";
1217
+ if (n && O.includes("gzip") && v.unshift(...n), s && /(br|brotli)/i.test(O) && v.unshift(...s), v.push(...a), _.indexOf("%") !== -1)
1218
+ try {
1219
+ _ = decodeURI(_);
1220
+ } catch {
1221
+ }
1222
+ let w = g(_, v) || u && !vi(_, d) && g(p, v);
1223
+ if (!w) return y ? y() : t(m, f);
1224
+ if (l && m.headers["if-none-match"] === w.headers.ETag)
1225
+ return f.writeHead(304), f.end();
1226
+ (n || s) && f.setHeader("Vary", "Accept-Encoding"), r(f, _, w.stats), ji(m, f, w.abs, w.stats, w.headers);
1227
+ };
1228
+ };
1229
+ });
1230
+
1231
+ // ../node_modules/ejs/lib/utils.js
1232
+ var xt = M((S) => {
1233
+ "use strict";
1234
+ var Ei = /[|\\{}()[\]^$+*?.]/g, Pi = Object.prototype.hasOwnProperty, me = /* @__PURE__ */ o(function(e, i) {
1235
+ return Pi.apply(e, [i]);
1236
+ }, "hasOwn");
1237
+ S.escapeRegExpChars = function(e) {
1238
+ return e ? String(e).replace(Ei, "\\$&") : "";
1239
+ };
1240
+ var Si = {
1241
+ "&": "&amp;",
1242
+ "<": "&lt;",
1243
+ ">": "&gt;",
1244
+ '"': "&#34;",
1245
+ "'": "&#39;"
1246
+ }, Ti = /[&<>'"]/g;
1247
+ function Fi(e) {
1248
+ return Si[e] || e;
1249
+ }
1250
+ o(Fi, "encode_char");
1251
+ var Ri = `var _ENCODE_HTML_RULES = {
1252
+ "&": "&amp;"
1253
+ , "<": "&lt;"
1254
+ , ">": "&gt;"
1255
+ , '"': "&#34;"
1256
+ , "'": "&#39;"
1257
+ }
1258
+ , _MATCH_HTML = /[&<>'"]/g;
1259
+ function encode_char(c) {
1260
+ return _ENCODE_HTML_RULES[c] || c;
1261
+ };
1262
+ `;
1263
+ S.escapeXML = function(e) {
1264
+ return e == null ? "" : String(e).replace(Ti, Fi);
1265
+ };
1266
+ function gt() {
1267
+ return Function.prototype.toString.call(this) + `;
1268
+ ` + Ri;
1269
+ }
1270
+ o(gt, "escapeXMLToString");
1271
+ try {
1272
+ typeof Object.defineProperty == "function" ? Object.defineProperty(S.escapeXML, "toString", { value: gt }) : S.escapeXML.toString = gt;
1273
+ } catch {
1274
+ console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)");
1275
+ }
1276
+ S.shallowCopy = function(e, i) {
1277
+ if (i = i || {}, e != null)
1278
+ for (var t in i)
1279
+ me(i, t) && (t === "__proto__" || t === "constructor" || (e[t] = i[t]));
1280
+ return e;
1281
+ };
1282
+ S.shallowCopyFromList = function(e, i, t) {
1283
+ if (t = t || [], i = i || {}, e != null)
1284
+ for (var r = 0; r < t.length; r++) {
1285
+ var a = t[r];
1286
+ if (typeof i[a] < "u") {
1287
+ if (!me(i, a) || a === "__proto__" || a === "constructor")
1288
+ continue;
1289
+ e[a] = i[a];
1290
+ }
1291
+ }
1292
+ return e;
1293
+ };
1294
+ S.cache = {
1295
+ _data: {},
1296
+ set: /* @__PURE__ */ o(function(e, i) {
1297
+ this._data[e] = i;
1298
+ }, "set"),
1299
+ get: /* @__PURE__ */ o(function(e) {
1300
+ return this._data[e];
1301
+ }, "get"),
1302
+ remove: /* @__PURE__ */ o(function(e) {
1303
+ delete this._data[e];
1304
+ }, "remove"),
1305
+ reset: /* @__PURE__ */ o(function() {
1306
+ this._data = {};
1307
+ }, "reset")
1308
+ };
1309
+ S.hyphenToCamel = function(e) {
1310
+ return e.replace(/-[a-z]/g, function(i) {
1311
+ return i[1].toUpperCase();
1312
+ });
1313
+ };
1314
+ S.createNullProtoObjWherePossible = function() {
1315
+ return typeof Object.create == "function" ? function() {
1316
+ return /* @__PURE__ */ Object.create(null);
1317
+ } : { __proto__: null } instanceof Object ? function() {
1318
+ return {};
1319
+ } : function() {
1320
+ return { __proto__: null };
1321
+ };
1322
+ }();
1323
+ S.hasOwnOnlyObject = function(e) {
1324
+ var i = S.createNullProtoObjWherePossible();
1325
+ for (var t in e)
1326
+ me(e, t) && (i[t] = e[t]);
1327
+ return i;
1328
+ };
1329
+ });
1330
+
1331
+ // ../node_modules/ejs/package.json
1332
+ var ht = M((Er, ki) => {
1333
+ ki.exports = {
1334
+ name: "ejs",
1335
+ description: "Embedded JavaScript templates",
1336
+ keywords: [
1337
+ "template",
1338
+ "engine",
1339
+ "ejs"
1340
+ ],
1341
+ version: "3.1.10",
1342
+ author: "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
1343
+ license: "Apache-2.0",
1344
+ bin: {
1345
+ ejs: "./bin/cli.js"
1346
+ },
1347
+ main: "./lib/ejs.js",
1348
+ jsdelivr: "ejs.min.js",
1349
+ unpkg: "ejs.min.js",
1350
+ repository: {
1351
+ type: "git",
1352
+ url: "git://github.com/mde/ejs.git"
1353
+ },
1354
+ bugs: "https://github.com/mde/ejs/issues",
1355
+ homepage: "https://github.com/mde/ejs",
1356
+ dependencies: {
1357
+ jake: "^10.8.5"
1358
+ },
1359
+ devDependencies: {
1360
+ browserify: "^16.5.1",
1361
+ eslint: "^6.8.0",
1362
+ "git-directory-deploy": "^1.5.1",
1363
+ jsdoc: "^4.0.2",
1364
+ "lru-cache": "^4.0.1",
1365
+ mocha: "^10.2.0",
1366
+ "uglify-js": "^3.3.16"
1367
+ },
1368
+ engines: {
1369
+ node: ">=0.10.0"
1370
+ },
1371
+ scripts: {
1372
+ test: "npx jake test"
1373
+ }
1374
+ };
1375
+ });
1376
+
1377
+ // ../node_modules/ejs/lib/ejs.js
1378
+ var Pt = M((h) => {
1379
+ "use strict";
1380
+ var fe = require("fs"), $ = require("path"), b = xt(), yt = !1, Li = ht().version, Ci = "<", Ai = ">", Ni = "%", Ot = "locals", Di = "ejs",
1381
+ Ii = "(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)", Et = [
1382
+ "delimiter",
1383
+ "scope",
1384
+ "context",
1385
+ "debug",
1386
+ "compileDebug",
1387
+ "client",
1388
+ "_with",
1389
+ "rmWhitespace",
1390
+ "strict",
1391
+ "filename",
1392
+ "async"
1393
+ ], Mi = Et.concat("cache"), vt = /^\uFEFF/, ue = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
1394
+ h.cache = b.cache;
1395
+ h.fileLoader = fe.readFileSync;
1396
+ h.localsName = Ot;
1397
+ h.promiseImpl = new Function("return this;")().Promise;
1398
+ h.resolveInclude = function(e, i, t) {
1399
+ var r = $.dirname, a = $.extname, n = $.resolve, s = n(t ? i : r(i), e), c = a(e);
1400
+ return c || (s += ".ejs"), s;
1401
+ };
1402
+ function wt(e, i) {
1403
+ var t;
1404
+ if (i.some(function(r) {
1405
+ return t = h.resolveInclude(e, r, !0), fe.existsSync(t);
1406
+ }))
1407
+ return t;
1408
+ }
1409
+ o(wt, "resolvePaths");
1410
+ function zi(e, i) {
1411
+ var t, r, a = i.views, n = /^[A-Za-z]+:\\|^\//.exec(e);
1412
+ if (n && n.length)
1413
+ e = e.replace(/^\/*/, ""), Array.isArray(i.root) ? t = wt(e, i.root) : t = h.resolveInclude(e, i.root || "/", !0);
1414
+ else if (i.filename && (r = h.resolveInclude(e, i.filename), fe.existsSync(r) && (t = r)), !t && Array.isArray(a) && (t = wt(e, a)), !t &&
1415
+ typeof i.includer != "function")
1416
+ throw new Error('Could not find the include file "' + i.escapeFunction(e) + '"');
1417
+ return t;
1418
+ }
1419
+ o(zi, "getIncludePath");
1420
+ function W(e, i) {
1421
+ var t, r = e.filename, a = arguments.length > 1;
1422
+ if (e.cache) {
1423
+ if (!r)
1424
+ throw new Error("cache option requires a filename");
1425
+ if (t = h.cache.get(r), t)
1426
+ return t;
1427
+ a || (i = bt(r).toString().replace(vt, ""));
1428
+ } else if (!a) {
1429
+ if (!r)
1430
+ throw new Error("Internal EJS error: no file name or template provided");
1431
+ i = bt(r).toString().replace(vt, "");
1432
+ }
1433
+ return t = h.compile(i, e), e.cache && h.cache.set(r, t), t;
1434
+ }
1435
+ o(W, "handleCache");
1436
+ function qi(e, i, t) {
1437
+ var r;
1438
+ if (t) {
1439
+ try {
1440
+ r = W(e)(i);
1441
+ } catch (a) {
1442
+ return t(a);
1443
+ }
1444
+ t(null, r);
1445
+ } else {
1446
+ if (typeof h.promiseImpl == "function")
1447
+ return new h.promiseImpl(function(a, n) {
1448
+ try {
1449
+ r = W(e)(i), a(r);
1450
+ } catch (s) {
1451
+ n(s);
1452
+ }
1453
+ });
1454
+ throw new Error("Please provide a callback function");
1455
+ }
1456
+ }
1457
+ o(qi, "tryHandleCache");
1458
+ function bt(e) {
1459
+ return h.fileLoader(e);
1460
+ }
1461
+ o(bt, "fileLoader");
1462
+ function $i(e, i) {
1463
+ var t = b.shallowCopy(b.createNullProtoObjWherePossible(), i);
1464
+ if (t.filename = zi(e, t), typeof i.includer == "function") {
1465
+ var r = i.includer(e, t.filename);
1466
+ if (r && (r.filename && (t.filename = r.filename), r.template))
1467
+ return W(t, r.template);
1468
+ }
1469
+ return W(t);
1470
+ }
1471
+ o($i, "includeFile");
1472
+ function _t(e, i, t, r, a) {
1473
+ var n = i.split(`
1474
+ `), s = Math.max(r - 3, 0), c = Math.min(n.length, r + 3), p = a(t), l = n.slice(s, c).map(function(u, d) {
1475
+ var x = d + s + 1;
1476
+ return (x == r ? " >> " : " ") + x + "| " + u;
1477
+ }).join(`
1478
+ `);
1479
+ throw e.path = p, e.message = (p || "ejs") + ":" + r + `
1480
+ ` + l + `
1481
+
1482
+ ` + e.message, e;
1483
+ }
1484
+ o(_t, "rethrow");
1485
+ function jt(e) {
1486
+ return e.replace(/;(\s*$)/, "$1");
1487
+ }
1488
+ o(jt, "stripSemi");
1489
+ h.compile = /* @__PURE__ */ o(function(i, t) {
1490
+ var r;
1491
+ return t && t.scope && (yt || (console.warn("`scope` option is deprecated and will be removed in EJS 3"), yt = !0), t.context || (t.context =
1492
+ t.scope), delete t.scope), r = new j(i, t), r.compile();
1493
+ }, "compile");
1494
+ h.render = function(e, i, t) {
1495
+ var r = i || b.createNullProtoObjWherePossible(), a = t || b.createNullProtoObjWherePossible();
1496
+ return arguments.length == 2 && b.shallowCopyFromList(a, r, Et), W(a, e)(r);
1497
+ };
1498
+ h.renderFile = function() {
1499
+ var e = Array.prototype.slice.call(arguments), i = e.shift(), t, r = { filename: i }, a, n;
1500
+ return typeof arguments[arguments.length - 1] == "function" && (t = e.pop()), e.length ? (a = e.shift(), e.length ? b.shallowCopy(r, e.pop()) :
1501
+ (a.settings && (a.settings.views && (r.views = a.settings.views), a.settings["view cache"] && (r.cache = !0), n = a.settings["view optio\
1502
+ ns"], n && b.shallowCopy(r, n)), b.shallowCopyFromList(r, a, Mi)), r.filename = i) : a = b.createNullProtoObjWherePossible(), qi(r, a, t);
1503
+ };
1504
+ h.Template = j;
1505
+ h.clearCache = function() {
1506
+ h.cache.reset();
1507
+ };
1508
+ function j(e, i) {
1509
+ var t = b.hasOwnOnlyObject(i), r = b.createNullProtoObjWherePossible();
1510
+ this.templateText = e, this.mode = null, this.truncate = !1, this.currentLine = 1, this.source = "", r.client = t.client || !1, r.escapeFunction =
1511
+ t.escape || t.escapeFunction || b.escapeXML, r.compileDebug = t.compileDebug !== !1, r.debug = !!t.debug, r.filename = t.filename, r.openDelimiter =
1512
+ t.openDelimiter || h.openDelimiter || Ci, r.closeDelimiter = t.closeDelimiter || h.closeDelimiter || Ai, r.delimiter = t.delimiter || h.
1513
+ delimiter || Ni, r.strict = t.strict || !1, r.context = t.context, r.cache = t.cache || !1, r.rmWhitespace = t.rmWhitespace, r.root = t.
1514
+ root, r.includer = t.includer, r.outputFunctionName = t.outputFunctionName, r.localsName = t.localsName || h.localsName || Ot, r.views =
1515
+ t.views, r.async = t.async, r.destructuredLocals = t.destructuredLocals, r.legacyInclude = typeof t.legacyInclude < "u" ? !!t.legacyInclude :
1516
+ !0, r.strict ? r._with = !1 : r._with = typeof t._with < "u" ? t._with : !0, this.opts = r, this.regex = this.createRegex();
1517
+ }
1518
+ o(j, "Template");
1519
+ j.modes = {
1520
+ EVAL: "eval",
1521
+ ESCAPED: "escaped",
1522
+ RAW: "raw",
1523
+ COMMENT: "comment",
1524
+ LITERAL: "literal"
1525
+ };
1526
+ j.prototype = {
1527
+ createRegex: /* @__PURE__ */ o(function() {
1528
+ var e = Ii, i = b.escapeRegExpChars(this.opts.delimiter), t = b.escapeRegExpChars(this.opts.openDelimiter), r = b.escapeRegExpChars(this.
1529
+ opts.closeDelimiter);
1530
+ return e = e.replace(/%/g, i).replace(/</g, t).replace(/>/g, r), new RegExp(e);
1531
+ }, "createRegex"),
1532
+ compile: /* @__PURE__ */ o(function() {
1533
+ var e, i, t = this.opts, r = "", a = "", n = t.escapeFunction, s, c = t.filename ? JSON.stringify(t.filename) : "undefined";
1534
+ if (!this.source) {
1535
+ if (this.generateSource(), r += ` var __output = "";
1536
+ function __append(s) { if (s !== undefined && s !== null) __output += s }
1537
+ `, t.outputFunctionName) {
1538
+ if (!ue.test(t.outputFunctionName))
1539
+ throw new Error("outputFunctionName is not a valid JS identifier.");
1540
+ r += " var " + t.outputFunctionName + ` = __append;
1541
+ `;
1542
+ }
1543
+ if (t.localsName && !ue.test(t.localsName))
1544
+ throw new Error("localsName is not a valid JS identifier.");
1545
+ if (t.destructuredLocals && t.destructuredLocals.length) {
1546
+ for (var p = " var __locals = (" + t.localsName + ` || {}),
1547
+ `, l = 0; l < t.destructuredLocals.length; l++) {
1548
+ var u = t.destructuredLocals[l];
1549
+ if (!ue.test(u))
1550
+ throw new Error("destructuredLocals[" + l + "] is not a valid JS identifier.");
1551
+ l > 0 && (p += `,
1552
+ `), p += u + " = __locals." + u;
1553
+ }
1554
+ r += p + `;
1555
+ `;
1556
+ }
1557
+ t._with !== !1 && (r += " with (" + t.localsName + ` || {}) {
1558
+ `, a += ` }
1559
+ `), a += ` return __output;
1560
+ `, this.source = r + this.source + a;
1561
+ }
1562
+ t.compileDebug ? e = `var __line = 1
1563
+ , __lines = ` + JSON.stringify(this.templateText) + `
1564
+ , __filename = ` + c + `;
1565
+ try {
1566
+ ` + this.source + `} catch (e) {
1567
+ rethrow(e, __lines, __filename, __line, escapeFn);
1568
+ }
1569
+ ` : e = this.source, t.client && (e = "escapeFn = escapeFn || " + n.toString() + `;
1570
+ ` + e, t.compileDebug && (e = "rethrow = rethrow || " + _t.toString() + `;
1571
+ ` + e)), t.strict && (e = `"use strict";
1572
+ ` + e), t.debug && console.log(e), t.compileDebug && t.filename && (e = e + `
1573
+ //# sourceURL=` + c + `
1574
+ `);
1575
+ try {
1576
+ if (t.async)
1577
+ try {
1578
+ s = new Function("return (async function(){}).constructor;")();
1579
+ } catch (m) {
1580
+ throw m instanceof SyntaxError ? new Error("This environment does not support async/await") : m;
1581
+ }
1582
+ else
1583
+ s = Function;
1584
+ i = new s(t.localsName + ", escapeFn, include, rethrow", e);
1585
+ } catch (m) {
1586
+ throw m instanceof SyntaxError && (t.filename && (m.message += " in " + t.filename), m.message += ` while compiling ejs
1587
+
1588
+ `, m.message += `If the above error is not helpful, you may want to try EJS-Lint:
1589
+ `, m.message += "https://github.com/RyanZim/EJS-Lint", t.async || (m.message += `
1590
+ `, m.message += "Or, if you meant to create an async function, pass `async: true` as an option.")), m;
1591
+ }
1592
+ var d = t.client ? i : /* @__PURE__ */ o(function(f) {
1593
+ var y = /* @__PURE__ */ o(function(v, _) {
1594
+ var O = b.shallowCopy(b.createNullProtoObjWherePossible(), f);
1595
+ return _ && (O = b.shallowCopy(O, _)), $i(v, t)(O);
1596
+ }, "include");
1597
+ return i.apply(
1598
+ t.context,
1599
+ [f || b.createNullProtoObjWherePossible(), n, y, _t]
1600
+ );
1601
+ }, "anonymous");
1602
+ if (t.filename && typeof Object.defineProperty == "function") {
1603
+ var x = t.filename, g = $.basename(x, $.extname(x));
1604
+ try {
1605
+ Object.defineProperty(d, "name", {
1606
+ value: g,
1607
+ writable: !1,
1608
+ enumerable: !1,
1609
+ configurable: !0
1610
+ });
1611
+ } catch {
1612
+ }
1613
+ }
1614
+ return d;
1615
+ }, "compile"),
1616
+ generateSource: /* @__PURE__ */ o(function() {
1617
+ var e = this.opts;
1618
+ e.rmWhitespace && (this.templateText = this.templateText.replace(/[\r\n]+/g, `
1619
+ `).replace(/^\s+|\s+$/gm, "")), this.templateText = this.templateText.replace(/[ \t]*<%_/gm, "<%_").replace(/_%>[ \t]*/gm, "_%>");
1620
+ var i = this, t = this.parseTemplateText(), r = this.opts.delimiter, a = this.opts.openDelimiter, n = this.opts.closeDelimiter;
1621
+ t && t.length && t.forEach(function(s, c) {
1622
+ var p;
1623
+ if (s.indexOf(a + r) === 0 && s.indexOf(a + r + r) !== 0 && (p = t[c + 2], !(p == r + n || p == "-" + r + n || p == "_" + r + n)))
1624
+ throw new Error('Could not find matching close tag for "' + s + '".');
1625
+ i.scanLine(s);
1626
+ });
1627
+ }, "generateSource"),
1628
+ parseTemplateText: /* @__PURE__ */ o(function() {
1629
+ for (var e = this.templateText, i = this.regex, t = i.exec(e), r = [], a; t; )
1630
+ a = t.index, a !== 0 && (r.push(e.substring(0, a)), e = e.slice(a)), r.push(t[0]), e = e.slice(t[0].length), t = i.exec(e);
1631
+ return e && r.push(e), r;
1632
+ }, "parseTemplateText"),
1633
+ _addOutput: /* @__PURE__ */ o(function(e) {
1634
+ if (this.truncate && (e = e.replace(/^(?:\r\n|\r|\n)/, ""), this.truncate = !1), !e)
1635
+ return e;
1636
+ e = e.replace(/\\/g, "\\\\"), e = e.replace(/\n/g, "\\n"), e = e.replace(/\r/g, "\\r"), e = e.replace(/"/g, '\\"'), this.source += ' \
1637
+ ; __append("' + e + `")
1638
+ `;
1639
+ }, "_addOutput"),
1640
+ scanLine: /* @__PURE__ */ o(function(e) {
1641
+ var i = this, t = this.opts.delimiter, r = this.opts.openDelimiter, a = this.opts.closeDelimiter, n = 0;
1642
+ switch (n = e.split(`
1643
+ `).length - 1, e) {
1644
+ case r + t:
1645
+ case r + t + "_":
1646
+ this.mode = j.modes.EVAL;
1647
+ break;
1648
+ case r + t + "=":
1649
+ this.mode = j.modes.ESCAPED;
1650
+ break;
1651
+ case r + t + "-":
1652
+ this.mode = j.modes.RAW;
1653
+ break;
1654
+ case r + t + "#":
1655
+ this.mode = j.modes.COMMENT;
1656
+ break;
1657
+ case r + t + t:
1658
+ this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(r + t + t, r + t) + `")
1659
+ `;
1660
+ break;
1661
+ case t + t + a:
1662
+ this.mode = j.modes.LITERAL, this.source += ' ; __append("' + e.replace(t + t + a, t + a) + `")
1663
+ `;
1664
+ break;
1665
+ case t + a:
1666
+ case "-" + t + a:
1667
+ case "_" + t + a:
1668
+ this.mode == j.modes.LITERAL && this._addOutput(e), this.mode = null, this.truncate = e.indexOf("-") === 0 || e.indexOf("_") === 0;
1669
+ break;
1670
+ default:
1671
+ if (this.mode) {
1672
+ switch (this.mode) {
1673
+ case j.modes.EVAL:
1674
+ case j.modes.ESCAPED:
1675
+ case j.modes.RAW:
1676
+ e.lastIndexOf("//") > e.lastIndexOf(`
1677
+ `) && (e += `
1678
+ `);
1679
+ }
1680
+ switch (this.mode) {
1681
+ // Just executing code
1682
+ case j.modes.EVAL:
1683
+ this.source += " ; " + e + `
1684
+ `;
1685
+ break;
1686
+ // Exec, esc, and output
1687
+ case j.modes.ESCAPED:
1688
+ this.source += " ; __append(escapeFn(" + jt(e) + `))
1689
+ `;
1690
+ break;
1691
+ // Exec and output
1692
+ case j.modes.RAW:
1693
+ this.source += " ; __append(" + jt(e) + `)
1694
+ `;
1695
+ break;
1696
+ case j.modes.COMMENT:
1697
+ break;
1698
+ // Literal <%% mode, append as raw output
1699
+ case j.modes.LITERAL:
1700
+ this._addOutput(e);
1701
+ break;
1702
+ }
1703
+ } else
1704
+ this._addOutput(e);
1705
+ }
1706
+ i.opts.compileDebug && n && (this.currentLine += n, this.source += " ; __line = " + this.currentLine + `
1707
+ `);
1708
+ }, "scanLine")
1709
+ };
1710
+ h.escapeXML = b.escapeXML;
1711
+ h.__express = h.renderFile;
1712
+ h.VERSION = Li;
1713
+ h.name = Di;
1714
+ typeof window < "u" && (window.ejs = h);
1715
+ });
1716
+
1717
+ // src/builder-manager/index.ts
1718
+ var Qi = {};
1719
+ z(Qi, {
1720
+ bail: () => Bt,
1721
+ build: () => Ki,
1722
+ corePresets: () => Zi,
1723
+ executor: () => ye,
1724
+ getConfig: () => he,
1725
+ overridePresets: () => Yi,
1726
+ start: () => Xi
1727
+ });
1728
+ module.exports = q(Qi);
1729
+ var D = require("node:fs/promises"), T = require("node:path"), $t = require("storybook/internal/common"), Wt = require("storybook/internal/manager/globals-module-info"),
1730
+ te = require("storybook/internal/node-logger");
1731
+
1732
+ // ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/module-info.js
1733
+ var je = /* @__PURE__ */ o((e) => {
1734
+ let {
1735
+ type: i = "esm",
1736
+ varName: t,
1737
+ namedExports: r = null,
1738
+ defaultExport: a = !0
1739
+ } = typeof e == "string" ? { varName: e } : e;
1740
+ return { type: i, varName: t, namedExports: r, defaultExport: a };
1741
+ }, "normalizeModuleInfo");
1742
+
1743
+ // ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/on-load.js
1744
+ var Kt = /* @__PURE__ */ o((e) => `module.exports = ${e};`, "createCjsContents");
1745
+ var Zt = /* @__PURE__ */ o((e, i, t) => {
1746
+ let r = t ? [`export default ${e};`] : [];
1747
+ if (i && i.length) {
1748
+ let a = [...new Set(i)].join(", ");
1749
+ r.push(`const { ${a} } = ${e};`), r.push(`export { ${a} };`);
1750
+ }
1751
+ return r.join(`
1752
+ `);
1753
+ }, "createEsmContents"), Oe = /* @__PURE__ */ o((e) => {
1754
+ let { type: i, varName: t, namedExports: r, defaultExport: a } = e;
1755
+ switch (i) {
1756
+ case "esm":
1757
+ return Zt(t, r, a);
1758
+ case "cjs":
1759
+ return Kt(t);
1760
+ }
1761
+ }, "createContents");
1762
+
1763
+ // ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/with-reg-exp.js
1764
+ var ae = "global-externals", ne = /* @__PURE__ */ o((e) => {
1765
+ let { modulePathFilter: i, getModuleInfo: t } = e;
1766
+ return {
1767
+ name: ae,
1768
+ setup(r) {
1769
+ r.onResolve({ filter: i }, (a) => ({
1770
+ path: a.path,
1771
+ namespace: ae
1772
+ })), r.onLoad({ filter: /.*/, namespace: ae }, (a) => {
1773
+ let n = a.path, s = je(t(n));
1774
+ return { contents: Oe(s) };
1775
+ });
1776
+ }
1777
+ };
1778
+ }, "globalExternalsWithRegExp");
1779
+
1780
+ // ../node_modules/@fal-works/esbuild-plugin-global-externals/lib/with-object.js
1781
+ var oe = /* @__PURE__ */ o((e) => {
1782
+ let i = {
1783
+ modulePathFilter: new RegExp(`^(?:${Object.keys(e).join("|")})$`),
1784
+ getModuleInfo: /* @__PURE__ */ o((t) => e[t], "getModuleInfo")
1785
+ };
1786
+ return ne(i);
1787
+ }, "globalExternals");
1788
+
1789
+ // src/builder-manager/index.ts
1790
+ var Ht = R(tt(), 1), be = R(dt(), 1);
1791
+
1792
+ // src/builder-manager/utils/data.ts
1793
+ var Rt = require("node:path"), kt = require("storybook/internal/common");
1794
+
1795
+ // src/builder-manager/utils/template.ts
1796
+ var St = require("node:fs/promises"), Y = require("node:path"), Tt = R(Pt(), 1);
1797
+ var de = /* @__PURE__ */ o(async (e) => (0, Y.join)((0, Y.dirname)(require.resolve("storybook/package.json")), "assets/server", e), "getTemp\
1798
+ latePath"), Ft = /* @__PURE__ */ o(async (e) => {
1799
+ let i = await de(e);
1800
+ return (0, St.readFile)(i, { encoding: "utf8" });
1801
+ }, "readTemplate");
1802
+ var ge = /* @__PURE__ */ o(async (e, i, t, r, a, n, s, c, p, l, u, { versionCheck: d, previewUrl: x, configType: g, ignorePreview: m }, f) => {
1803
+ let y = await i, v = await e, _ = Object.entries(f).reduce(
1804
+ (O, [w, E]) => ({ ...O, [w]: JSON.stringify(E) }),
1805
+ {}
1806
+ );
1807
+ return (0, Tt.render)(v, {
1808
+ title: y ? `${y} - Storybook` : "Storybook",
1809
+ files: { js: n, css: a },
1810
+ favicon: await t,
1811
+ globals: {
1812
+ FEATURES: JSON.stringify(await s, null, 2),
1813
+ REFS: JSON.stringify(await c, null, 2),
1814
+ LOGLEVEL: JSON.stringify(await p, null, 2),
1815
+ DOCS_OPTIONS: JSON.stringify(await l, null, 2),
1816
+ CONFIG_TYPE: JSON.stringify(await g, null, 2),
1817
+ // These two need to be double stringified because the UI expects a string
1818
+ VERSIONCHECK: JSON.stringify(JSON.stringify(d), null, 2),
1819
+ PREVIEW_URL: JSON.stringify(x, null, 2),
1820
+ // global preview URL
1821
+ TAGS_OPTIONS: JSON.stringify(await u, null, 2),
1822
+ ..._
1823
+ },
1824
+ head: await r || "",
1825
+ ignorePreview: m
1826
+ });
1827
+ }, "renderHTML");
1828
+
1829
+ // src/builder-manager/utils/data.ts
1830
+ var xe = /* @__PURE__ */ o(async (e) => {
1831
+ let i = (0, kt.getRefs)(e), t = e.presets.apply("favicon").then((x) => (0, Rt.basename)(x)), r = e.presets.apply("features"), a = e.presets.
1832
+ apply("logLevel"), n = e.presets.apply("title"), s = e.presets.apply("docs", {}), c = e.presets.apply("tags", {}), p = Ft("template.ejs"),
1833
+ l = e.presets.apply("managerHead"), [u, d] = await Promise.all([
1834
+ //
1835
+ ye.get(),
1836
+ he(e)
1837
+ ]);
1838
+ return {
1839
+ refs: i,
1840
+ features: r,
1841
+ title: n,
1842
+ docsOptions: s,
1843
+ template: p,
1844
+ customHead: l,
1845
+ instance: u,
1846
+ config: d,
1847
+ logLevel: a,
1848
+ favicon: t,
1849
+ tagsOptions: c
1850
+ };
1851
+ }, "getData");
1852
+
1853
+ // src/builder-manager/utils/files.ts
1854
+ var Lt = require("node:fs"), Q = require("node:fs/promises"), A = require("node:path");
1855
+
1856
+ // ../node_modules/slash/index.js
1857
+ function H(e) {
1858
+ return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
1859
+ }
1860
+ o(H, "slash");
1861
+
1862
+ // src/builder-manager/utils/files.ts
1863
+ async function ve(e, i) {
1864
+ let t = await Promise.all(
1865
+ i?.map(async (n) => {
1866
+ let { location: s, url: c } = Wi(n, e);
1867
+ if (!(0, Lt.existsSync)(s)) {
1868
+ let p = (0, A.dirname)(s);
1869
+ await (0, Q.mkdir)(p, { recursive: !0 });
1870
+ }
1871
+ return await (0, Q.writeFile)(s, n.contents), c;
1872
+ }) || []
1873
+ ), r = t.filter((n) => n.endsWith(".js"));
1874
+ return { cssFiles: t.filter((n) => n.endsWith(".css")), jsFiles: r };
1875
+ }
1876
+ o(ve, "readOrderedFiles");
1877
+ function Wi(e, i) {
1878
+ let t = e.path.replace(i, ""), r = (0, A.normalize)((0, A.join)(i, t)), a = `./sb-addons${H(t).split("/").map(encodeURIComponent).join("/")}`;
1879
+ return { location: r, url: a };
1880
+ }
1881
+ o(Wi, "sanitizePath");
1882
+
1883
+ // src/builder-manager/utils/framework.ts
1884
+ var At = require("node:path"), B = require("storybook/internal/common");
1885
+ var Ct = /* @__PURE__ */ o((e) => {
1886
+ if (e)
1887
+ return typeof e == "string" ? e : e.name;
1888
+ }, "pluckNameFromConfigProperty"), Nt = /* @__PURE__ */ o((e) => e.replaceAll(At.sep, "/"), "normalizePath"), Hi = /* @__PURE__ */ o((e) => Nt(
1889
+ e).match(/(@storybook\/.*)$/)?.[1], "pluckStorybookPackageFromPath"), Bi = /* @__PURE__ */ o((e) => Nt(e).split("node_modules/")[1] ?? e, "p\
1890
+ luckThirdPartyPackageFromPath"), we = /* @__PURE__ */ o(async (e) => {
1891
+ let i = {}, { builder: t } = await e.presets.apply("core"), r = await (0, B.getFrameworkName)(e);
1892
+ await (0, B.extractProperRendererNameFromFramework)(r) && (i.STORYBOOK_RENDERER = await (0, B.extractProperRendererNameFromFramework)(r) ??
1893
+ void 0);
1894
+ let n = Ct(t);
1895
+ n && (i.STORYBOOK_BUILDER = Hi(n) ?? Bi(n));
1896
+ let s = Ct(await e.presets.apply("framework"));
1897
+ return s && (i.STORYBOOK_FRAMEWORK = s), i;
1898
+ }, "buildFrameworkGlobalsFromOptions");
1899
+
1900
+ // src/builder-manager/utils/managerEntries.ts
1901
+ var It = require("node:fs"), ee = require("node:fs/promises"), F = require("node:path"), Mt = require("storybook/internal/common");
1902
+ var Dt = /* @__PURE__ */ o((e) => e.replaceAll(".", "").replaceAll("@", "").replaceAll(F.sep, "-").replaceAll("/", "-").replaceAll(new RegExp(
1903
+ /^(-)+/g), ""), "sanitizeBase"), Ji = /* @__PURE__ */ o((e) => {
1904
+ let i = e.split(/-?node_modules-?/);
1905
+ return i[i.length - 1].replaceAll("storybook-addon-", "").replaceAll("dist-", "");
1906
+ }, "sanitizeFinal");
1907
+ async function zt(e, i) {
1908
+ return Promise.all(
1909
+ e.map(async (t, r) => {
1910
+ let { name: a, dir: n } = (0, F.parse)(t), s = (0, Mt.resolvePathInStorybookCache)("sb-manager", i);
1911
+ if (!s)
1912
+ throw new Error("Could not create/find cache directory");
1913
+ let c = (0, F.relative)(process.cwd(), n), p = (0, F.join)(
1914
+ s,
1915
+ Ji((0, F.join)(`${Dt(c)}-${r}`, `${Dt(a)}-bundle.js`))
1916
+ );
1917
+ if (!(0, It.existsSync)(p)) {
1918
+ let l = (0, F.dirname)(p);
1919
+ await (0, ee.mkdir)(l, { recursive: !0 });
1920
+ }
1921
+ return await (0, ee.writeFile)(p, `import '${H(t).replaceAll(/'/g, "\\'")}';`), p;
1922
+ })
1923
+ );
1924
+ }
1925
+ o(zt, "wrapManagerEntries");
1926
+
1927
+ // src/builder-manager/utils/safeResolve.ts
1928
+ var qt = /* @__PURE__ */ o((e) => {
1929
+ try {
1930
+ return Promise.resolve(require.resolve(e));
1931
+ } catch {
1932
+ return Promise.resolve(!1);
1933
+ }
1934
+ }, "safeResolve");
1935
+
1936
+ // src/builder-manager/index.ts
1937
+ var Ui = /^\/($|\?)/, ie, N, he = /* @__PURE__ */ o(async (e) => {
1938
+ let [i, t, r, a] = await Promise.all([
1939
+ e.presets.apply("managerEntries", []),
1940
+ qt((0, T.join)(e.configDir, "manager")),
1941
+ de("addon.tsconfig.json"),
1942
+ e.presets.apply("env")
1943
+ ]), n = t ? [...i, t] : i;
1944
+ return {
1945
+ entryPoints: await zt(n, e.cacheKey),
1946
+ outdir: (0, T.join)(e.outputDir || "./", "sb-addons"),
1947
+ format: "iife",
1948
+ write: !1,
1949
+ ignoreAnnotations: !0,
1950
+ resolveExtensions: [".ts", ".tsx", ".mjs", ".js", ".jsx"],
1951
+ outExtension: { ".js": ".js" },
1952
+ loader: {
1953
+ ".js": "jsx",
1954
+ // media
1955
+ ".png": "dataurl",
1956
+ ".gif": "dataurl",
1957
+ ".jpg": "dataurl",
1958
+ ".jpeg": "dataurl",
1959
+ ".svg": "dataurl",
1960
+ ".webp": "dataurl",
1961
+ ".webm": "dataurl",
1962
+ ".mp3": "dataurl",
1963
+ // modern fonts
1964
+ ".woff2": "dataurl",
1965
+ // legacy font formats
1966
+ ".woff": "dataurl",
1967
+ ".eot": "dataurl",
1968
+ ".ttf": "dataurl"
1969
+ },
1970
+ target: ["chrome100", "safari15", "firefox91"],
1971
+ platform: "browser",
1972
+ bundle: !0,
1973
+ minify: !0,
1974
+ sourcemap: !1,
1975
+ conditions: ["browser", "module", "default"],
1976
+ jsxFactory: "React.createElement",
1977
+ jsxFragment: "React.Fragment",
1978
+ jsx: "transform",
1979
+ jsxImportSource: "react",
1980
+ tsconfig: r,
1981
+ legalComments: "external",
1982
+ plugins: [oe(Wt.globalsModuleInfoMap), (0, Ht.pnpPlugin)()],
1983
+ banner: {
1984
+ js: "try{"
1985
+ },
1986
+ footer: {
1987
+ js: '}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }'
1988
+ },
1989
+ define: {
1990
+ "process.env": JSON.stringify(a),
1991
+ ...(0, $t.stringifyProcessEnvs)(a),
1992
+ global: "window",
1993
+ module: "{}"
1994
+ }
1995
+ };
1996
+ }, "getConfig"), ye = {
1997
+ get: /* @__PURE__ */ o(async () => {
1998
+ let { build: e } = await import("esbuild");
1999
+ return e;
2000
+ }, "get")
2001
+ }, Gi = /* @__PURE__ */ o(async function* ({
2002
+ startTime: i,
2003
+ options: t,
2004
+ router: r
2005
+ }) {
2006
+ t.quiet || te.logger.info("=> Starting manager..");
2007
+ let {
2008
+ config: a,
2009
+ favicon: n,
2010
+ customHead: s,
2011
+ features: c,
2012
+ instance: p,
2013
+ refs: l,
2014
+ template: u,
2015
+ title: d,
2016
+ logLevel: x,
2017
+ docsOptions: g,
2018
+ tagsOptions: m
2019
+ } = await xe(t);
2020
+ yield;
2021
+ let f = a.outdir;
2022
+ await (0, D.rm)(f, { recursive: !0, force: !0 }), yield, ie = await p({
2023
+ ...a
2024
+ }), yield;
2025
+ let y = (0, T.join)((0, T.dirname)(require.resolve("storybook/package.json")), "dist", "manager");
2026
+ r.use(
2027
+ "/sb-addons",
2028
+ (0, be.default)(f, {
2029
+ maxAge: 3e5,
2030
+ dev: !0,
2031
+ immutable: !0
2032
+ })
2033
+ ), r.use(
2034
+ "/sb-manager",
2035
+ (0, be.default)(y, {
2036
+ maxAge: 3e5,
2037
+ dev: !0,
2038
+ immutable: !0
2039
+ })
2040
+ );
2041
+ let { cssFiles: v, jsFiles: _ } = await ve(f, ie?.outputFiles), O = await we(t);
2042
+ yield;
2043
+ let w = await ge(
2044
+ u,
2045
+ d,
2046
+ n,
2047
+ s,
2048
+ v,
2049
+ _,
2050
+ c,
2051
+ l,
2052
+ x,
2053
+ g,
2054
+ m,
2055
+ t,
2056
+ O
2057
+ );
2058
+ return yield, r.use("/", ({ url: E }, P, k) => {
2059
+ E && Ui.test(E) ? (P.statusCode = 200, P.setHeader("Content-Type", "text/html"), P.write(w), P.end()) : k();
2060
+ }), r.use("/index.html", (E, P) => {
2061
+ P.statusCode = 200, P.setHeader("Content-Type", "text/html"), P.write(w), P.end();
2062
+ }), {
2063
+ bail: Bt,
2064
+ stats: {
2065
+ toJson: /* @__PURE__ */ o(() => ({}), "toJson")
2066
+ },
2067
+ totalTime: process.hrtime(i)
2068
+ };
2069
+ }, "starterGeneratorFn"), Vi = /* @__PURE__ */ o(async function* ({ startTime: i, options: t }) {
2070
+ if (!t.outputDir)
2071
+ throw new Error("outputDir is required");
2072
+ te.logger.info("=> Building manager..");
2073
+ let {
2074
+ config: r,
2075
+ customHead: a,
2076
+ favicon: n,
2077
+ features: s,
2078
+ instance: c,
2079
+ refs: p,
2080
+ template: l,
2081
+ title: u,
2082
+ logLevel: d,
2083
+ docsOptions: x,
2084
+ tagsOptions: g
2085
+ } = await xe(t);
2086
+ yield;
2087
+ let m = r.outdir, f = (0, T.join)((0, T.dirname)(require.resolve("storybook/package.json")), "dist", "manager"), y = (0, T.join)(t.outputDir,
2088
+ "sb-manager");
2089
+ ie = await c({
2090
+ ...r,
2091
+ minify: !0
2092
+ }), yield;
2093
+ let v = (0, D.cp)(f, y, {
2094
+ filter: /* @__PURE__ */ o((P) => {
2095
+ let { ext: k } = (0, T.parse)(P);
2096
+ return k ? k === ".js" : !0;
2097
+ }, "filter"),
2098
+ recursive: !0
2099
+ }), { cssFiles: _, jsFiles: O } = await ve(m, ie?.outputFiles), w = await we(t);
2100
+ yield;
2101
+ let E = await ge(
2102
+ l,
2103
+ u,
2104
+ n,
2105
+ a,
2106
+ _,
2107
+ O,
2108
+ s,
2109
+ p,
2110
+ d,
2111
+ x,
2112
+ g,
2113
+ t,
2114
+ w
2115
+ );
2116
+ return await Promise.all([(0, D.writeFile)((0, T.join)(t.outputDir, "index.html"), E), v]), te.logger.trace({ message: "=> Manager built",
2117
+ time: process.hrtime(i) }), {
2118
+ toJson: /* @__PURE__ */ o(() => ({}), "toJson")
2119
+ };
2120
+ }, "builderGeneratorFn"), Bt = /* @__PURE__ */ o(async () => {
2121
+ if (N)
2122
+ try {
2123
+ await N.throw(new Error());
2124
+ } catch {
2125
+ }
2126
+ }, "bail"), Xi = /* @__PURE__ */ o(async (e) => {
2127
+ N = Gi(e);
2128
+ let i;
2129
+ do
2130
+ i = await N.next();
2131
+ while (!i.done);
2132
+ return i.value;
2133
+ }, "start"), Ki = /* @__PURE__ */ o(async (e) => {
2134
+ N = Vi(e);
2135
+ let i;
2136
+ do
2137
+ i = await N.next();
2138
+ while (!i.done);
2139
+ return i.value;
2140
+ }, "build"), Zi = [], Yi = [];