@genai-fi/nanogpt 0.20.7 → 0.21.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 (206) hide show
  1. package/dist/{BaseTokeniser-DSg9zcYq.js → BaseTokeniser-C9TSv4th.js} +1 -1
  2. package/dist/{DatasetBuilder-DgURD85T.js → DatasetBuilder-B9UGNQT5.js} +82 -88
  3. package/dist/Generator.js +1 -1
  4. package/dist/{RealDiv-DBu0FQqT.js → RealDiv-CNsvC4AU.js} +6 -6
  5. package/dist/{Reshape-DqO3r8BC.js → Reshape-CwxdaU8n.js} +1 -1
  6. package/dist/{Reshape-CABOPB9d.js → Reshape-dnm9bO3B.js} +2 -2
  7. package/dist/TeachableLLM.js +1 -1
  8. package/dist/Trainer.js +1 -1
  9. package/dist/backend.js +2 -2
  10. package/dist/{backend_util-Cg-roD1p.js → backend_util-DAV0I34P.js} +5 -5
  11. package/dist/checks/appendCache.js +1 -1
  12. package/dist/checks/attentionMask.js +1 -1
  13. package/dist/checks/gelu.js +1 -1
  14. package/dist/checks/matMulGelu.js +1 -1
  15. package/dist/checks/normRMS.js +1 -1
  16. package/dist/checks/normRMSGrad.js +1 -1
  17. package/dist/checks/packUnpack.js +1 -1
  18. package/dist/checks/qkv.js +1 -1
  19. package/dist/checks/rope.js +1 -1
  20. package/dist/{chunk-BPntVaq0.js → chunk-CWhphoD1.js} +5 -5
  21. package/dist/{concat_util-CWDZCBlA.js → concat_util-CWzvQQlK.js} +1 -1
  22. package/dist/data/docx.js +58 -59
  23. package/dist/data/pdf.js +1 -1
  24. package/dist/data/textLoader.js +1 -1
  25. package/dist/{dist-DVmq73nz.js → dist-9wGF4ci9.js} +10 -10
  26. package/dist/{dist-VEU5mfO0.js → dist-BqAU9-yi.js} +4 -4
  27. package/dist/{dist-BewPQWjc.js → dist-Da20xy8E.js} +1874 -3071
  28. package/dist/{gelu-Bf1HW1RY.js → gelu-B6637MKa.js} +1 -1
  29. package/dist/{gpgpu_math-DvLcCH6u.js → gpgpu_math-DBYEAAdI.js} +2 -2
  30. package/dist/{kernel_funcs_utils-HiXOOx3f.js → kernel_funcs_utils-D-mATnGR.js} +3 -3
  31. package/dist/layers/BaseLayer.js +1 -1
  32. package/dist/layers/CausalSelfAttention.js +4 -4
  33. package/dist/layers/LoRA.js +3 -3
  34. package/dist/layers/MLP.js +2 -2
  35. package/dist/layers/PositionEmbedding.js +2 -2
  36. package/dist/layers/RMSNorm.js +1 -1
  37. package/dist/layers/RoPECache.js +1 -1
  38. package/dist/layers/TiedEmbedding.js +3 -3
  39. package/dist/layers/TransformerBlock.js +1 -1
  40. package/dist/layers/WeightStore.js +3 -3
  41. package/dist/loader/load.js +1 -1
  42. package/dist/loader/loadHF.js +1 -1
  43. package/dist/loader/loadTransformers.js +1 -1
  44. package/dist/loader/loadZipMeta.js +1 -1
  45. package/dist/loader/newZipLoad.js +1 -1
  46. package/dist/loader/oldZipLoad.js +1 -1
  47. package/dist/loader/save.d.ts +1 -0
  48. package/dist/loader/save.js +1 -1
  49. package/dist/{main-BTmbwF1h.js → main-DdsoTJAW.js} +2009 -2014
  50. package/dist/main.js +1 -1
  51. package/dist/{matMul16-BNfZSnNM.js → matMul16-DGtlziMn.js} +3 -3
  52. package/dist/{matMulGelu-CPTntosE.js → matMulGelu-BAIgQaRx.js} +3 -3
  53. package/dist/models/NanoGPTV1.js +1 -1
  54. package/dist/models/NanoGPTV2.js +1 -1
  55. package/dist/models/factory.js +1 -1
  56. package/dist/models/model.js +1 -1
  57. package/dist/ops/adamAdjust.js +1 -1
  58. package/dist/ops/adamMoments.js +1 -1
  59. package/dist/ops/add16.js +1 -1
  60. package/dist/ops/appendCache.js +1 -1
  61. package/dist/ops/attentionMask.js +1 -1
  62. package/dist/ops/concat16.js +1 -1
  63. package/dist/ops/cpu/adamAdjust.js +1 -1
  64. package/dist/ops/cpu/adamMoments.js +1 -1
  65. package/dist/ops/cpu/appendCache.js +1 -1
  66. package/dist/ops/cpu/attentionMask.js +1 -1
  67. package/dist/ops/cpu/fusedSoftmax.js +1 -1
  68. package/dist/ops/cpu/gatherSub.js +1 -1
  69. package/dist/ops/cpu/gelu.js +1 -1
  70. package/dist/ops/cpu/matMul16.js +1 -1
  71. package/dist/ops/cpu/matMulGelu.js +2 -2
  72. package/dist/ops/cpu/matMulMul.js +1 -1
  73. package/dist/ops/cpu/mulDropout.js +1 -1
  74. package/dist/ops/cpu/normRMS.js +1 -1
  75. package/dist/ops/cpu/qkv.js +1 -1
  76. package/dist/ops/cpu/rope.js +1 -1
  77. package/dist/ops/cpu/scatterSub.js +1 -1
  78. package/dist/ops/dot16.js +2 -2
  79. package/dist/ops/dropout.js +1 -1
  80. package/dist/ops/dropout16.js +1 -1
  81. package/dist/ops/gatherSub.js +1 -1
  82. package/dist/ops/gelu.js +1 -1
  83. package/dist/ops/globalNorm.js +1 -1
  84. package/dist/ops/grads/add16.js +1 -1
  85. package/dist/ops/grads/attentionMask.js +2 -2
  86. package/dist/ops/grads/gelu.js +1 -1
  87. package/dist/ops/grads/matMul16.js +1 -1
  88. package/dist/ops/grads/matMulGelu.js +1 -1
  89. package/dist/ops/grads/normRMS.js +1 -1
  90. package/dist/ops/grads/pack16.js +1 -1
  91. package/dist/ops/grads/qkv.js +2 -2
  92. package/dist/ops/grads/rope.js +1 -1
  93. package/dist/ops/grads/softmax16.js +1 -1
  94. package/dist/ops/grads/unpack16.js +1 -1
  95. package/dist/ops/matMul16.js +1 -1
  96. package/dist/ops/matMulGelu.js +2 -2
  97. package/dist/ops/matMulMul.js +1 -1
  98. package/dist/ops/mul16.js +1 -1
  99. package/dist/ops/mulDrop.js +1 -1
  100. package/dist/ops/normRMS.js +1 -1
  101. package/dist/ops/pack16.js +1 -1
  102. package/dist/ops/qkv.js +1 -1
  103. package/dist/ops/reshape16.js +1 -1
  104. package/dist/ops/rope.js +1 -1
  105. package/dist/ops/scatterSub.js +1 -1
  106. package/dist/ops/slice16.js +1 -1
  107. package/dist/ops/softmax16.js +1 -1
  108. package/dist/ops/sub16.js +1 -1
  109. package/dist/ops/sum16.js +1 -1
  110. package/dist/ops/transpose16.js +1 -1
  111. package/dist/ops/unpack16.js +1 -1
  112. package/dist/ops/webgl/adamAdjust.js +2 -2
  113. package/dist/ops/webgl/adamMoments.js +1 -1
  114. package/dist/ops/webgl/appendCache.js +1 -1
  115. package/dist/ops/webgl/attentionMask.js +1 -1
  116. package/dist/ops/webgl/dropout16.js +1 -1
  117. package/dist/ops/webgl/fusedSoftmax.js +3 -3
  118. package/dist/ops/webgl/gatherSub.js +1 -1
  119. package/dist/ops/webgl/gelu.js +2 -2
  120. package/dist/ops/webgl/log.js +3 -3
  121. package/dist/ops/webgl/matMul16.js +1 -1
  122. package/dist/ops/webgl/matMulGelu.js +1 -1
  123. package/dist/ops/webgl/matMulMul.js +2 -2
  124. package/dist/ops/webgl/mulDropout.js +1 -1
  125. package/dist/ops/webgl/normRMS.js +1 -1
  126. package/dist/ops/webgl/qkv.js +1 -1
  127. package/dist/ops/webgl/rope.js +1 -1
  128. package/dist/ops/webgl/scatterSub.js +1 -1
  129. package/dist/ops/webgpu/adamAdjust.js +3 -3
  130. package/dist/ops/webgpu/adamMoments.js +3 -3
  131. package/dist/ops/webgpu/add16.js +1 -1
  132. package/dist/ops/webgpu/appendCache.js +3 -3
  133. package/dist/ops/webgpu/attentionMask.js +2 -2
  134. package/dist/ops/webgpu/attentionMask32_program.js +2 -2
  135. package/dist/ops/webgpu/clipScale.js +1 -1
  136. package/dist/ops/webgpu/concat16.js +5 -5
  137. package/dist/ops/webgpu/dropout16.js +3 -3
  138. package/dist/ops/webgpu/gatherSub.js +3 -3
  139. package/dist/ops/webgpu/gelu.js +3 -3
  140. package/dist/ops/webgpu/matMul16.js +1 -1
  141. package/dist/ops/webgpu/matMul16_program.js +7 -7
  142. package/dist/ops/webgpu/mul16.js +1 -1
  143. package/dist/ops/webgpu/norm2.js +1 -1
  144. package/dist/ops/webgpu/normRMS.js +2 -2
  145. package/dist/ops/webgpu/normRMSGrad.js +4 -4
  146. package/dist/ops/webgpu/pack16.js +1 -1
  147. package/dist/ops/webgpu/pack16_program.js +2 -2
  148. package/dist/ops/webgpu/qkv.js +2 -2
  149. package/dist/ops/webgpu/rope.js +3 -3
  150. package/dist/ops/webgpu/scatterSub.js +3 -3
  151. package/dist/ops/webgpu/slice16.js +4 -4
  152. package/dist/ops/webgpu/softmax16.js +1 -1
  153. package/dist/ops/webgpu/softmax16_program.js +2 -2
  154. package/dist/ops/webgpu/softmax16_subgroup_program.js +2 -2
  155. package/dist/ops/webgpu/softmax16grad.js +1 -1
  156. package/dist/ops/webgpu/sub16.js +1 -1
  157. package/dist/ops/webgpu/sum16.js +15 -15
  158. package/dist/ops/webgpu/transpose16.js +1 -1
  159. package/dist/ops/webgpu/transpose16_program.js +2 -2
  160. package/dist/ops/webgpu/transpose16_shared_program.js +3 -3
  161. package/dist/ops/webgpu/unpack16.js +3 -3
  162. package/dist/ops/webgpu/utils/binary_op.js +3 -3
  163. package/dist/ops/webgpu/utils/reductions.js +3 -3
  164. package/dist/{pack16-Ck-spx_F.js → pack16-BhuXNUS7.js} +1 -1
  165. package/dist/patches/webgpu_backend.js +3 -3
  166. package/dist/patches/webgpu_base.js +1 -1
  167. package/dist/patches/webgpu_program.js +4 -4
  168. package/dist/{pdf-UoDqCYzz.js → pdf-CdmW8ikl.js} +1159 -1160
  169. package/dist/{picomatch-3tUnMMbd.js → picomatch-BO4HbNfo.js} +125 -127
  170. package/dist/{rope-CbeGlsV8.js → rope-C8EAiSGY.js} +1 -1
  171. package/dist/{selu_util-zkAx5doH.js → selu_util-B_AFEfoz.js} +1 -1
  172. package/dist/{shared-D1coEFea.js → shared-24EoeHJl.js} +4 -4
  173. package/dist/{shared-DOgWaqvL.js → shared-CfTzpULd.js} +1 -1
  174. package/dist/{slice_util-Dgb3ANWI.js → slice_util-Dve4TkDn.js} +2 -2
  175. package/dist/{tfjs_backend-BjuQ5FqB.js → tfjs_backend-CydPRQTc.js} +2 -2
  176. package/dist/tokeniser/BaseTokeniser.js +1 -1
  177. package/dist/tokeniser/CharTokeniser.js +1 -1
  178. package/dist/tokeniser/bpe.js +1 -1
  179. package/dist/training/AdamW.js +1 -1
  180. package/dist/training/BasicTrainer.js +1 -1
  181. package/dist/training/DatasetBuilder.d.ts +0 -1
  182. package/dist/training/DatasetBuilder.js +2 -2
  183. package/dist/training/Evaluator.js +1 -1
  184. package/dist/training/PreTrainer.js +1 -1
  185. package/dist/training/SFTTrainer.js +1 -1
  186. package/dist/training/loss.js +2 -2
  187. package/dist/training/orthoGrad.js +1 -1
  188. package/dist/training/sparseCrossEntropy.js +1 -1
  189. package/dist/training/tasks/ConversationTask.js +1 -1
  190. package/dist/training/validation.js +1 -1
  191. package/dist/utilities/dummy.js +1 -1
  192. package/dist/utilities/float16.d.ts +3 -0
  193. package/dist/utilities/float16.js +46 -0
  194. package/dist/utilities/multinomialCPU.js +1 -1
  195. package/dist/utilities/packed.js +1 -1
  196. package/dist/utilities/performance.js +1 -1
  197. package/dist/utilities/profile.js +1 -1
  198. package/dist/utilities/safetensors.d.ts +3 -1
  199. package/dist/utilities/safetensors.js +46 -36
  200. package/dist/utilities/sentences.js +1 -1
  201. package/dist/utilities/weights.js +1 -1
  202. package/dist/{webgpu-Dt7BMzWz.js → webgpu-B19Tw8Nd.js} +3 -3
  203. package/dist/{webgpu_program-WOyIVMlZ.js → webgpu_program-B0PokuRJ.js} +1 -1
  204. package/dist/{webgpu_util-B_F3SShA.js → webgpu_util-DfODg6XI.js} +1 -1
  205. package/package.json +5 -5
  206. package/dist/dist-DXwIvKxl.js +0 -896
@@ -1,7 +1,6 @@
1
- import { t as e } from "./chunk-BPntVaq0.js";
2
- import { i as t, r as n } from "./dist-DXwIvKxl.js";
1
+ import { t as e } from "./chunk-CWhphoD1.js";
3
2
  //#region node_modules/picomatch/lib/constants.js
4
- var r = /* @__PURE__ */ e(((e, t) => {
3
+ var t = /* @__PURE__ */ e(((e, t) => {
5
4
  var n = "\\\\/", r = `[^${n}]`, i = 0, a = "\\.", o = "\\+", s = "\\?", c = "\\/", l = "(?=.)", u = "[^/]", d = `(?:${c}|$)`, f = `(?:^|${c})`, p = `${a}{1,2}${d}`, m = {
6
5
  DOT_LITERAL: a,
7
6
  PLUS_LITERAL: o,
@@ -142,16 +141,15 @@ var r = /* @__PURE__ */ e(((e, t) => {
142
141
  return e === !0 ? h : m;
143
142
  }
144
143
  };
145
- })), i = /* @__PURE__ */ e(((e) => {
146
- n();
147
- var { REGEX_BACKSLASH: i, REGEX_REMOVE_BACKSLASH: a, REGEX_SPECIAL_CHARS: o, REGEX_SPECIAL_CHARS_GLOBAL: s } = r();
148
- e.isObject = (e) => typeof e == "object" && !!e && !Array.isArray(e), e.hasRegexChars = (e) => o.test(e), e.isRegexChar = (t) => t.length === 1 && e.hasRegexChars(t), e.escapeRegex = (e) => e.replace(s, "\\$1"), e.toPosixSlashes = (e) => e.replace(i, "/"), e.isWindows = () => {
144
+ })), n = /* @__PURE__ */ e(((e) => {
145
+ var { REGEX_BACKSLASH: n, REGEX_REMOVE_BACKSLASH: r, REGEX_SPECIAL_CHARS: i, REGEX_SPECIAL_CHARS_GLOBAL: a } = t();
146
+ e.isObject = (e) => typeof e == "object" && !!e && !Array.isArray(e), e.hasRegexChars = (e) => i.test(e), e.isRegexChar = (t) => t.length === 1 && e.hasRegexChars(t), e.escapeRegex = (e) => e.replace(a, "\\$1"), e.toPosixSlashes = (e) => e.replace(n, "/"), e.isWindows = () => {
149
147
  if (typeof navigator < "u" && navigator.platform) {
150
148
  let e = navigator.platform.toLowerCase();
151
149
  return e === "win32" || e === "windows";
152
150
  }
153
- return t !== void 0 && t.platform ? t.platform === "win32" : !1;
154
- }, e.removeBackslashes = (e) => e.replace(a, (e) => e === "\\" ? "" : e), e.escapeLast = (t, n, r) => {
151
+ return typeof process < "u" && process.platform ? process.platform === "win32" : !1;
152
+ }, e.removeBackslashes = (e) => e.replace(r, (e) => e === "\\" ? "" : e), e.escapeLast = (t, n, r) => {
155
153
  let i = t.lastIndexOf(n, r);
156
154
  return i === -1 ? t : t[i - 1] === "\\" ? e.escapeLast(t, n, i - 1) : `${t.slice(0, i)}\\${t.slice(i)}`;
157
155
  }, e.removePrefix = (e, t = {}) => {
@@ -164,17 +162,17 @@ var r = /* @__PURE__ */ e(((e, t) => {
164
162
  let n = e.split(t ? /[\\/]/ : "/"), r = n[n.length - 1];
165
163
  return r === "" ? n[n.length - 2] : r;
166
164
  };
167
- })), a = /* @__PURE__ */ e(((e, t) => {
168
- var n = i(), { CHAR_ASTERISK: a, CHAR_AT: o, CHAR_BACKWARD_SLASH: s, CHAR_COMMA: c, CHAR_DOT: l, CHAR_EXCLAMATION_MARK: u, CHAR_FORWARD_SLASH: d, CHAR_LEFT_CURLY_BRACE: f, CHAR_LEFT_PARENTHESES: p, CHAR_LEFT_SQUARE_BRACKET: m, CHAR_PLUS: h, CHAR_QUESTION_MARK: g, CHAR_RIGHT_CURLY_BRACE: _, CHAR_RIGHT_PARENTHESES: v, CHAR_RIGHT_SQUARE_BRACKET: y } = r(), b = (e) => e === d || e === s, x = (e) => {
165
+ })), r = /* @__PURE__ */ e(((e, r) => {
166
+ var i = n(), { CHAR_ASTERISK: a, CHAR_AT: o, CHAR_BACKWARD_SLASH: s, CHAR_COMMA: c, CHAR_DOT: l, CHAR_EXCLAMATION_MARK: u, CHAR_FORWARD_SLASH: d, CHAR_LEFT_CURLY_BRACE: f, CHAR_LEFT_PARENTHESES: p, CHAR_LEFT_SQUARE_BRACKET: m, CHAR_PLUS: h, CHAR_QUESTION_MARK: g, CHAR_RIGHT_CURLY_BRACE: _, CHAR_RIGHT_PARENTHESES: v, CHAR_RIGHT_SQUARE_BRACKET: y } = t(), b = (e) => e === d || e === s, x = (e) => {
169
167
  e.isPrefix !== !0 && (e.depth = e.isGlobstar ? Infinity : 1);
170
168
  };
171
- t.exports = (e, t) => {
172
- let r = t || {}, i = e.length - 1, S = r.parts === !0 || r.scanToEnd === !0, C = [], w = [], T = [], E = e, D = -1, O = 0, k = 0, A = !1, j = !1, M = !1, N = !1, P = !1, F = !1, I = !1, L = !1, R = !1, z = !1, B = 0, V, H, U = {
169
+ r.exports = (e, t) => {
170
+ let n = t || {}, r = e.length - 1, S = n.parts === !0 || n.scanToEnd === !0, C = [], w = [], T = [], E = e, D = -1, O = 0, k = 0, A = !1, j = !1, M = !1, N = !1, P = !1, F = !1, I = !1, L = !1, R = !1, z = !1, B = 0, V, H, U = {
173
171
  value: "",
174
172
  depth: 0,
175
173
  isGlob: !1
176
- }, W = () => D >= i, G = () => E.charCodeAt(D + 1), K = () => (V = H, E.charCodeAt(++D));
177
- for (; D < i;) {
174
+ }, W = () => D >= r, G = () => E.charCodeAt(D + 1), K = () => (V = H, E.charCodeAt(++D));
175
+ for (; D < r;) {
178
176
  H = K();
179
177
  let e;
180
178
  if (H === s) {
@@ -220,7 +218,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
220
218
  k = D + 1;
221
219
  continue;
222
220
  }
223
- if (r.noext !== !0 && (H === h || H === o || H === a || H === g || H === u) && G() === p) {
221
+ if (n.noext !== !0 && (H === h || H === o || H === a || H === g || H === u) && G() === p) {
224
222
  if (M = U.isGlob = !0, N = U.isExtglob = !0, z = !0, H === u && D === O && (R = !0), S === !0) {
225
223
  for (; W() !== !0 && (H = K());) {
226
224
  if (H === s) {
@@ -258,11 +256,11 @@ var r = /* @__PURE__ */ e(((e, t) => {
258
256
  if (S === !0) continue;
259
257
  break;
260
258
  }
261
- if (r.nonegate !== !0 && H === u && D === O) {
259
+ if (n.nonegate !== !0 && H === u && D === O) {
262
260
  L = U.negated = !0, O++;
263
261
  continue;
264
262
  }
265
- if (r.noparen !== !0 && H === p) {
263
+ if (n.noparen !== !0 && H === p) {
266
264
  if (M = U.isGlob = !0, S === !0) {
267
265
  for (; W() !== !0 && (H = K());) {
268
266
  if (H === p) {
@@ -283,9 +281,9 @@ var r = /* @__PURE__ */ e(((e, t) => {
283
281
  break;
284
282
  }
285
283
  }
286
- r.noext === !0 && (N = !1, M = !1);
284
+ n.noext === !0 && (N = !1, M = !1);
287
285
  let q = E, J = "", Y = "";
288
- O > 0 && (J = E.slice(0, O), E = E.slice(O), k -= O), q && M === !0 && k > 0 ? (q = E.slice(0, k), Y = E.slice(k)) : M === !0 ? (q = "", Y = E) : q = E, q && q !== "" && q !== "/" && q !== E && b(q.charCodeAt(q.length - 1)) && (q = q.slice(0, -1)), r.unescape === !0 && (Y &&= n.removeBackslashes(Y), q && I === !0 && (q = n.removeBackslashes(q)));
286
+ O > 0 && (J = E.slice(0, O), E = E.slice(O), k -= O), q && M === !0 && k > 0 ? (q = E.slice(0, k), Y = E.slice(k)) : M === !0 ? (q = "", Y = E) : q = E, q && q !== "" && q !== "/" && q !== E && b(q.charCodeAt(q.length - 1)) && (q = q.slice(0, -1)), n.unescape === !0 && (Y &&= i.removeBackslashes(Y), q && I === !0 && (q = i.removeBackslashes(q)));
289
287
  let X = {
290
288
  prefix: J,
291
289
  input: e,
@@ -300,22 +298,22 @@ var r = /* @__PURE__ */ e(((e, t) => {
300
298
  negated: L,
301
299
  negatedExtglob: R
302
300
  };
303
- if (r.tokens === !0 && (X.maxDepth = 0, b(H) || w.push(U), X.tokens = w), r.parts === !0 || r.tokens === !0) {
301
+ if (n.tokens === !0 && (X.maxDepth = 0, b(H) || w.push(U), X.tokens = w), n.parts === !0 || n.tokens === !0) {
304
302
  let t;
305
- for (let n = 0; n < C.length; n++) {
306
- let i = t ? t + 1 : O, a = C[n], o = e.slice(i, a);
307
- r.tokens && (n === 0 && O !== 0 ? (w[n].isPrefix = !0, w[n].value = J) : w[n].value = o, x(w[n]), X.maxDepth += w[n].depth), (n !== 0 || o !== "") && T.push(o), t = a;
303
+ for (let r = 0; r < C.length; r++) {
304
+ let i = t ? t + 1 : O, a = C[r], o = e.slice(i, a);
305
+ n.tokens && (r === 0 && O !== 0 ? (w[r].isPrefix = !0, w[r].value = J) : w[r].value = o, x(w[r]), X.maxDepth += w[r].depth), (r !== 0 || o !== "") && T.push(o), t = a;
308
306
  }
309
307
  if (t && t + 1 < e.length) {
310
- let n = e.slice(t + 1);
311
- T.push(n), r.tokens && (w[w.length - 1].value = n, x(w[w.length - 1]), X.maxDepth += w[w.length - 1].depth);
308
+ let r = e.slice(t + 1);
309
+ T.push(r), n.tokens && (w[w.length - 1].value = r, x(w[w.length - 1]), X.maxDepth += w[w.length - 1].depth);
312
310
  }
313
311
  X.slashes = C, X.parts = T;
314
312
  }
315
313
  return X;
316
314
  };
317
- })), o = /* @__PURE__ */ e(((e, t) => {
318
- var n = r(), a = i(), { MAX_LENGTH: o, POSIX_REGEX_SOURCE: s, REGEX_NON_SPECIAL_CHARS: c, REGEX_SPECIAL_CHARS_BACKREF: l, REPLACEMENTS: u } = n, d = (e, t) => {
315
+ })), i = /* @__PURE__ */ e(((e, r) => {
316
+ var i = t(), a = n(), { MAX_LENGTH: o, POSIX_REGEX_SOURCE: s, REGEX_NON_SPECIAL_CHARS: c, REGEX_SPECIAL_CHARS_BACKREF: l, REPLACEMENTS: u } = i, d = (e, t) => {
319
317
  if (typeof t.expandRange == "function") return t.expandRange(...e, t);
320
318
  e.sort();
321
319
  let n = `[${e.join("-")}]`;
@@ -437,33 +435,33 @@ var r = /* @__PURE__ */ e(((e, t) => {
437
435
  return t;
438
436
  }, b = (e, t) => {
439
437
  if (t.maxExtglobRecursion === !1) return { risky: !1 };
440
- let r = typeof t.maxExtglobRecursion == "number" ? t.maxExtglobRecursion : n.DEFAULT_MAX_EXTGLOB_RECURSION, i = p(e).map((e) => e.trim());
441
- if (i.length > 1 && (i.some((e) => e === "") || i.some((e) => /^[*?]+$/.test(e)) || g(i))) return { risky: !0 };
442
- for (let e of i) {
438
+ let n = typeof t.maxExtglobRecursion == "number" ? t.maxExtglobRecursion : i.DEFAULT_MAX_EXTGLOB_RECURSION, r = p(e).map((e) => e.trim());
439
+ if (r.length > 1 && (r.some((e) => e === "") || r.some((e) => /^[*?]+$/.test(e)) || g(r))) return { risky: !0 };
440
+ for (let e of r) {
443
441
  let t = v(e);
444
442
  if (t) return {
445
443
  risky: !0,
446
444
  safeOutput: t
447
445
  };
448
- if (y(e) > r) return { risky: !0 };
446
+ if (y(e) > n) return { risky: !0 };
449
447
  }
450
448
  return { risky: !1 };
451
449
  }, x = (e, t) => {
452
450
  if (typeof e != "string") throw TypeError("Expected a string");
453
451
  e = u[e] || e;
454
- let r = { ...t }, i = typeof r.maxLength == "number" ? Math.min(o, r.maxLength) : o, p = e.length;
455
- if (p > i) throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${i}`);
452
+ let n = { ...t }, r = typeof n.maxLength == "number" ? Math.min(o, n.maxLength) : o, p = e.length;
453
+ if (p > r) throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${r}`);
456
454
  let m = {
457
455
  type: "bos",
458
456
  value: "",
459
- output: r.prepend || ""
460
- }, h = [m], g = r.capture ? "" : "?:", _ = n.globChars(r.windows), v = n.extglobChars(_), { DOT_LITERAL: y, PLUS_LITERAL: S, SLASH_LITERAL: C, ONE_CHAR: w, DOTS_SLASH: T, NO_DOT: E, NO_DOT_SLASH: D, NO_DOTS_SLASH: O, QMARK: k, QMARK_NO_DOT: A, STAR: j, START_ANCHOR: M } = _, N = (e) => `(${g}(?:(?!${M}${e.dot ? T : y}).)*?)`, P = r.dot ? "" : E, F = r.dot ? k : A, I = r.bash === !0 ? N(r) : j;
461
- r.capture && (I = `(${I})`), typeof r.noext == "boolean" && (r.noextglob = r.noext);
457
+ output: n.prepend || ""
458
+ }, h = [m], g = n.capture ? "" : "?:", _ = i.globChars(n.windows), v = i.extglobChars(_), { DOT_LITERAL: y, PLUS_LITERAL: S, SLASH_LITERAL: C, ONE_CHAR: w, DOTS_SLASH: T, NO_DOT: E, NO_DOT_SLASH: D, NO_DOTS_SLASH: O, QMARK: k, QMARK_NO_DOT: A, STAR: j, START_ANCHOR: M } = _, N = (e) => `(${g}(?:(?!${M}${e.dot ? T : y}).)*?)`, P = n.dot ? "" : E, F = n.dot ? k : A, I = n.bash === !0 ? N(n) : j;
459
+ n.capture && (I = `(${I})`), typeof n.noext == "boolean" && (n.noextglob = n.noext);
462
460
  let L = {
463
461
  input: e,
464
462
  index: -1,
465
463
  start: 0,
466
- dot: r.dot === !0,
464
+ dot: n.dot === !0,
467
465
  consumed: "",
468
466
  output: "",
469
467
  prefix: "",
@@ -500,13 +498,13 @@ var r = /* @__PURE__ */ e(((e, t) => {
500
498
  }
501
499
  e.prev = V, h.push(e), V = e;
502
500
  }, $ = (e, t) => {
503
- let n = {
501
+ let r = {
504
502
  ...v[t],
505
503
  conditions: 1,
506
504
  inner: ""
507
505
  };
508
- n.prev = V, n.parens = L.parens, n.output = L.output, n.startIndex = L.index, n.tokensIndex = h.length;
509
- let i = (r.capture ? "(" : "") + n.open;
506
+ r.prev = V, r.parens = L.parens, r.output = L.output, r.startIndex = L.index, r.tokensIndex = h.length;
507
+ let i = (n.capture ? "(" : "") + r.open;
510
508
  X("parens"), Q({
511
509
  type: e,
512
510
  value: t,
@@ -516,14 +514,14 @@ var r = /* @__PURE__ */ e(((e, t) => {
516
514
  extglob: !0,
517
515
  value: G(),
518
516
  output: i
519
- }), R.push(n);
520
- }, ee = (n) => {
521
- let i = e.slice(n.startIndex, L.index + 1), o = b(e.slice(n.startIndex + 2, L.index), r);
522
- if ((n.type === "plus" || n.type === "star") && o.risky) {
523
- let e = o.safeOutput ? (n.output ? "" : w) + (r.capture ? `(${o.safeOutput})` : o.safeOutput) : void 0, t = h[n.tokensIndex];
517
+ }), R.push(r);
518
+ }, ee = (r) => {
519
+ let i = e.slice(r.startIndex, L.index + 1), o = b(e.slice(r.startIndex + 2, L.index), n);
520
+ if ((r.type === "plus" || r.type === "star") && o.risky) {
521
+ let e = o.safeOutput ? (r.output ? "" : w) + (n.capture ? `(${o.safeOutput})` : o.safeOutput) : void 0, t = h[r.tokensIndex];
524
522
  t.type = "text", t.value = i, t.output = e || a.escapeRegex(i);
525
- for (let e = n.tokensIndex + 1; e < h.length; e++) h[e].value = "", h[e].output = "", delete h[e].suffix;
526
- L.output = n.output + t.output, L.backtrack = !0, Q({
523
+ for (let e = r.tokensIndex + 1; e < h.length; e++) h[e].value = "", h[e].output = "", delete h[e].suffix;
524
+ L.output = r.output + t.output, L.backtrack = !0, Q({
527
525
  type: "paren",
528
526
  extglob: !0,
529
527
  value: H,
@@ -531,13 +529,13 @@ var r = /* @__PURE__ */ e(((e, t) => {
531
529
  }), Z("parens");
532
530
  return;
533
531
  }
534
- let s = n.close + (r.capture ? ")" : ""), c;
535
- if (n.type === "negate") {
532
+ let s = r.close + (n.capture ? ")" : ""), c;
533
+ if (r.type === "negate") {
536
534
  let e = I;
537
- n.inner && n.inner.length > 1 && n.inner.includes("/") && (e = N(r)), (e !== I || U() || /^\)+$/.test(K())) && (s = n.close = `)$))${e}`), n.inner.includes("*") && (c = K()) && /^\.[^\\/.]+$/.test(c) && (s = n.close = `)${x(c, {
535
+ r.inner && r.inner.length > 1 && r.inner.includes("/") && (e = N(n)), (e !== I || U() || /^\)+$/.test(K())) && (s = r.close = `)$))${e}`), r.inner.includes("*") && (c = K()) && /^\.[^\\/.]+$/.test(c) && (s = r.close = `)${x(c, {
538
536
  ...t,
539
537
  fastpaths: !1
540
- }).output})${e})`), n.prev.type === "bos" && (L.negatedExtglob = !0);
538
+ }).output})${e})`), r.prev.type === "bos" && (L.negatedExtglob = !0);
541
539
  }
542
540
  Q({
543
541
  type: "paren",
@@ -546,15 +544,15 @@ var r = /* @__PURE__ */ e(((e, t) => {
546
544
  output: s
547
545
  }), Z("parens");
548
546
  };
549
- if (r.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) {
550
- let n = !1, i = e.replace(l, (e, t, r, i, a, o) => i === "\\" ? (n = !0, e) : i === "?" ? t ? t + i + (a ? k.repeat(a.length) : "") : o === 0 ? F + (a ? k.repeat(a.length) : "") : k.repeat(r.length) : i === "." ? y.repeat(r.length) : i === "*" ? t ? t + i + (a ? I : "") : I : t ? e : `\\${e}`);
551
- return n === !0 && (i = r.unescape === !0 ? i.replace(/\\/g, "") : i.replace(/\\+/g, (e) => e.length % 2 == 0 ? "\\\\" : e ? "\\" : "")), i === e && r.contains === !0 ? (L.output = e, L) : (L.output = a.wrapOutput(i, L, t), L);
547
+ if (n.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) {
548
+ let r = !1, i = e.replace(l, (e, t, n, i, a, o) => i === "\\" ? (r = !0, e) : i === "?" ? t ? t + i + (a ? k.repeat(a.length) : "") : o === 0 ? F + (a ? k.repeat(a.length) : "") : k.repeat(n.length) : i === "." ? y.repeat(n.length) : i === "*" ? t ? t + i + (a ? I : "") : I : t ? e : `\\${e}`);
549
+ return r === !0 && (i = n.unescape === !0 ? i.replace(/\\/g, "") : i.replace(/\\+/g, (e) => e.length % 2 == 0 ? "\\\\" : e ? "\\" : "")), i === e && n.contains === !0 ? (L.output = e, L) : (L.output = a.wrapOutput(i, L, t), L);
552
550
  }
553
551
  for (; !U();) {
554
552
  if (H = G(), H === "\0") continue;
555
553
  if (H === "\\") {
556
554
  let e = W();
557
- if (e === "/" && r.bash !== !0 || e === "." || e === ";") continue;
555
+ if (e === "/" && n.bash !== !0 || e === "." || e === ";") continue;
558
556
  if (!e) {
559
557
  H += "\\", Q({
560
558
  type: "text",
@@ -562,8 +560,8 @@ var r = /* @__PURE__ */ e(((e, t) => {
562
560
  });
563
561
  continue;
564
562
  }
565
- let t = /^\\+/.exec(K()), n = 0;
566
- if (t && t[0].length > 2 && (n = t[0].length, L.index += n, n % 2 != 0 && (H += "\\")), r.unescape === !0 ? H = G() : H += G(), L.brackets === 0) {
563
+ let t = /^\\+/.exec(K()), r = 0;
564
+ if (t && t[0].length > 2 && (r = t[0].length, L.index += r, r % 2 != 0 && (H += "\\")), n.unescape === !0 ? H = G() : H += G(), L.brackets === 0) {
567
565
  Q({
568
566
  type: "text",
569
567
  value: H
@@ -572,7 +570,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
572
570
  }
573
571
  }
574
572
  if (L.brackets > 0 && (H !== "]" || V.value === "[" || V.value === "[^")) {
575
- if (r.posix !== !1 && H === ":") {
573
+ if (n.posix !== !1 && H === ":") {
576
574
  let e = V.value.slice(1);
577
575
  if (e.includes("[") && (V.posix = !0, e.includes(":"))) {
578
576
  let e = V.value.lastIndexOf("["), t = V.value.slice(0, e), n = s[V.value.slice(e + 2)];
@@ -582,7 +580,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
582
580
  }
583
581
  }
584
582
  }
585
- (H === "[" && W() !== ":" || H === "-" && W() === "]") && (H = `\\${H}`), H === "]" && (V.value === "[" || V.value === "[^") && (H = `\\${H}`), r.posix === !0 && H === "!" && V.value === "[" && (H = "^"), V.value += H, J({ value: H });
583
+ (H === "[" && W() !== ":" || H === "-" && W() === "]") && (H = `\\${H}`), H === "]" && (V.value === "[" || V.value === "[^") && (H = `\\${H}`), n.posix === !0 && H === "!" && V.value === "[" && (H = "^"), V.value += H, J({ value: H });
586
584
  continue;
587
585
  }
588
586
  if (L.quotes === 1 && H !== "\"") {
@@ -590,7 +588,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
590
588
  continue;
591
589
  }
592
590
  if (H === "\"") {
593
- L.quotes = L.quotes === 1 ? 0 : 1, r.keepQuotes === !0 && Q({
591
+ L.quotes = L.quotes === 1 ? 0 : 1, n.keepQuotes === !0 && Q({
594
592
  type: "text",
595
593
  value: H
596
594
  });
@@ -604,7 +602,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
604
602
  continue;
605
603
  }
606
604
  if (H === ")") {
607
- if (L.parens === 0 && r.strictBrackets === !0) throw SyntaxError(f("opening", "("));
605
+ if (L.parens === 0 && n.strictBrackets === !0) throw SyntaxError(f("opening", "("));
608
606
  let e = R[R.length - 1];
609
607
  if (e && L.parens === e.parens + 1) {
610
608
  ee(R.pop());
@@ -618,8 +616,8 @@ var r = /* @__PURE__ */ e(((e, t) => {
618
616
  continue;
619
617
  }
620
618
  if (H === "[") {
621
- if (r.nobracket === !0 || !K().includes("]")) {
622
- if (r.nobracket !== !0 && r.strictBrackets === !0) throw SyntaxError(f("closing", "]"));
619
+ if (n.nobracket === !0 || !K().includes("]")) {
620
+ if (n.nobracket !== !0 && n.strictBrackets === !0) throw SyntaxError(f("closing", "]"));
623
621
  H = `\\${H}`;
624
622
  } else X("brackets");
625
623
  Q({
@@ -629,7 +627,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
629
627
  continue;
630
628
  }
631
629
  if (H === "]") {
632
- if (r.nobracket === !0 || V && V.type === "bracket" && V.value.length === 1) {
630
+ if (n.nobracket === !0 || V && V.type === "bracket" && V.value.length === 1) {
633
631
  Q({
634
632
  type: "text",
635
633
  value: H,
@@ -638,7 +636,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
638
636
  continue;
639
637
  }
640
638
  if (L.brackets === 0) {
641
- if (r.strictBrackets === !0) throw SyntaxError(f("opening", "["));
639
+ if (n.strictBrackets === !0) throw SyntaxError(f("opening", "["));
642
640
  Q({
643
641
  type: "text",
644
642
  value: H,
@@ -648,16 +646,16 @@ var r = /* @__PURE__ */ e(((e, t) => {
648
646
  }
649
647
  Z("brackets");
650
648
  let e = V.value.slice(1);
651
- if (V.posix !== !0 && e[0] === "^" && !e.includes("/") && (H = `/${H}`), V.value += H, J({ value: H }), r.literalBrackets === !1 || a.hasRegexChars(e)) continue;
649
+ if (V.posix !== !0 && e[0] === "^" && !e.includes("/") && (H = `/${H}`), V.value += H, J({ value: H }), n.literalBrackets === !1 || a.hasRegexChars(e)) continue;
652
650
  let t = a.escapeRegex(V.value);
653
- if (L.output = L.output.slice(0, -V.value.length), r.literalBrackets === !0) {
651
+ if (L.output = L.output.slice(0, -V.value.length), n.literalBrackets === !0) {
654
652
  L.output += t, V.value = t;
655
653
  continue;
656
654
  }
657
655
  V.value = `(${g}${t}|${V.value})`, L.output += V.value;
658
656
  continue;
659
657
  }
660
- if (H === "{" && r.nobrace !== !0) {
658
+ if (H === "{" && n.nobrace !== !0) {
661
659
  X("braces");
662
660
  let e = {
663
661
  type: "brace",
@@ -671,7 +669,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
671
669
  }
672
670
  if (H === "}") {
673
671
  let e = z[z.length - 1];
674
- if (r.nobrace === !0 || !e) {
672
+ if (n.nobrace === !0 || !e) {
675
673
  Q({
676
674
  type: "text",
677
675
  value: H,
@@ -681,9 +679,9 @@ var r = /* @__PURE__ */ e(((e, t) => {
681
679
  }
682
680
  let t = ")";
683
681
  if (e.dots === !0) {
684
- let e = h.slice(), n = [];
685
- for (let t = e.length - 1; t >= 0 && (h.pop(), e[t].type !== "brace"); t--) e[t].type !== "dots" && n.unshift(e[t].value);
686
- t = d(n, r), L.backtrack = !0;
682
+ let e = h.slice(), r = [];
683
+ for (let t = e.length - 1; t >= 0 && (h.pop(), e[t].type !== "brace"); t--) e[t].type !== "dots" && r.unshift(e[t].value);
684
+ t = d(r, n), L.backtrack = !0;
687
685
  }
688
686
  if (e.comma !== !0 && e.dots !== !0) {
689
687
  let n = L.output.slice(0, e.outputIndex), r = L.tokens.slice(e.tokensIndex);
@@ -748,7 +746,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
748
746
  continue;
749
747
  }
750
748
  if (H === "?") {
751
- if (!(V && V.value === "(") && r.noextglob !== !0 && W() === "(" && W(2) !== "?") {
749
+ if (!(V && V.value === "(") && n.noextglob !== !0 && W() === "(" && W(2) !== "?") {
752
750
  $("qmark", H);
753
751
  continue;
754
752
  }
@@ -761,7 +759,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
761
759
  });
762
760
  continue;
763
761
  }
764
- if (r.dot !== !0 && (V.type === "slash" || V.type === "bos")) {
762
+ if (n.dot !== !0 && (V.type === "slash" || V.type === "bos")) {
765
763
  Q({
766
764
  type: "qmark",
767
765
  value: H,
@@ -777,21 +775,21 @@ var r = /* @__PURE__ */ e(((e, t) => {
777
775
  continue;
778
776
  }
779
777
  if (H === "!") {
780
- if (r.noextglob !== !0 && W() === "(" && (W(2) !== "?" || !/[!=<:]/.test(W(3)))) {
778
+ if (n.noextglob !== !0 && W() === "(" && (W(2) !== "?" || !/[!=<:]/.test(W(3)))) {
781
779
  $("negate", H);
782
780
  continue;
783
781
  }
784
- if (r.nonegate !== !0 && L.index === 0) {
782
+ if (n.nonegate !== !0 && L.index === 0) {
785
783
  Y();
786
784
  continue;
787
785
  }
788
786
  }
789
787
  if (H === "+") {
790
- if (r.noextglob !== !0 && W() === "(" && W(2) !== "?") {
788
+ if (n.noextglob !== !0 && W() === "(" && W(2) !== "?") {
791
789
  $("plus", H);
792
790
  continue;
793
791
  }
794
- if (V && V.value === "(" || r.regex === !1) {
792
+ if (V && V.value === "(" || n.regex === !1) {
795
793
  Q({
796
794
  type: "plus",
797
795
  value: H,
@@ -813,7 +811,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
813
811
  continue;
814
812
  }
815
813
  if (H === "@") {
816
- if (r.noextglob !== !0 && W() === "(" && W(2) !== "?") {
814
+ if (n.noextglob !== !0 && W() === "(" && W(2) !== "?") {
817
815
  Q({
818
816
  type: "at",
819
817
  extglob: !0,
@@ -842,17 +840,17 @@ var r = /* @__PURE__ */ e(((e, t) => {
842
840
  continue;
843
841
  }
844
842
  let t = K();
845
- if (r.noextglob !== !0 && /^\([^?]/.test(t)) {
843
+ if (n.noextglob !== !0 && /^\([^?]/.test(t)) {
846
844
  $("star", H);
847
845
  continue;
848
846
  }
849
847
  if (V.type === "star") {
850
- if (r.noglobstar === !0) {
848
+ if (n.noglobstar === !0) {
851
849
  q(H);
852
850
  continue;
853
851
  }
854
- let n = V.prev, i = n.prev, a = n.type === "slash" || n.type === "bos", o = i && (i.type === "star" || i.type === "globstar");
855
- if (r.bash === !0 && (!a || t[0] && t[0] !== "/")) {
852
+ let r = V.prev, i = r.prev, a = r.type === "slash" || r.type === "bos", o = i && (i.type === "star" || i.type === "globstar");
853
+ if (n.bash === !0 && (!a || t[0] && t[0] !== "/")) {
856
854
  Q({
857
855
  type: "star",
858
856
  value: H,
@@ -860,8 +858,8 @@ var r = /* @__PURE__ */ e(((e, t) => {
860
858
  });
861
859
  continue;
862
860
  }
863
- let s = L.braces > 0 && (n.type === "comma" || n.type === "brace"), c = R.length && (n.type === "pipe" || n.type === "paren");
864
- if (!a && n.type !== "paren" && !s && !c) {
861
+ let s = L.braces > 0 && (r.type === "comma" || r.type === "brace"), c = R.length && (r.type === "pipe" || r.type === "paren");
862
+ if (!a && r.type !== "paren" && !s && !c) {
865
863
  Q({
866
864
  type: "star",
867
865
  value: H,
@@ -874,62 +872,62 @@ var r = /* @__PURE__ */ e(((e, t) => {
874
872
  if (n && n !== "/") break;
875
873
  t = t.slice(3), q("/**", 3);
876
874
  }
877
- if (n.type === "bos" && U()) {
878
- V.type = "globstar", V.value += H, V.output = N(r), L.output = V.output, L.globstar = !0, q(H);
875
+ if (r.type === "bos" && U()) {
876
+ V.type = "globstar", V.value += H, V.output = N(n), L.output = V.output, L.globstar = !0, q(H);
879
877
  continue;
880
878
  }
881
- if (n.type === "slash" && n.prev.type !== "bos" && !o && U()) {
882
- L.output = L.output.slice(0, -(n.output + V.output).length), n.output = `(?:${n.output}`, V.type = "globstar", V.output = N(r) + (r.strictSlashes ? ")" : "|$)"), V.value += H, L.globstar = !0, L.output += n.output + V.output, q(H);
879
+ if (r.type === "slash" && r.prev.type !== "bos" && !o && U()) {
880
+ L.output = L.output.slice(0, -(r.output + V.output).length), r.output = `(?:${r.output}`, V.type = "globstar", V.output = N(n) + (n.strictSlashes ? ")" : "|$)"), V.value += H, L.globstar = !0, L.output += r.output + V.output, q(H);
883
881
  continue;
884
882
  }
885
- if (n.type === "slash" && n.prev.type !== "bos" && t[0] === "/") {
883
+ if (r.type === "slash" && r.prev.type !== "bos" && t[0] === "/") {
886
884
  let e = t[1] === void 0 ? "" : "|$";
887
- L.output = L.output.slice(0, -(n.output + V.output).length), n.output = `(?:${n.output}`, V.type = "globstar", V.output = `${N(r)}${C}|${C}${e})`, V.value += H, L.output += n.output + V.output, L.globstar = !0, q(H + G()), Q({
885
+ L.output = L.output.slice(0, -(r.output + V.output).length), r.output = `(?:${r.output}`, V.type = "globstar", V.output = `${N(n)}${C}|${C}${e})`, V.value += H, L.output += r.output + V.output, L.globstar = !0, q(H + G()), Q({
888
886
  type: "slash",
889
887
  value: "/",
890
888
  output: ""
891
889
  });
892
890
  continue;
893
891
  }
894
- if (n.type === "bos" && t[0] === "/") {
895
- V.type = "globstar", V.value += H, V.output = `(?:^|${C}|${N(r)}${C})`, L.output = V.output, L.globstar = !0, q(H + G()), Q({
892
+ if (r.type === "bos" && t[0] === "/") {
893
+ V.type = "globstar", V.value += H, V.output = `(?:^|${C}|${N(n)}${C})`, L.output = V.output, L.globstar = !0, q(H + G()), Q({
896
894
  type: "slash",
897
895
  value: "/",
898
896
  output: ""
899
897
  });
900
898
  continue;
901
899
  }
902
- L.output = L.output.slice(0, -V.output.length), V.type = "globstar", V.output = N(r), V.value += H, L.output += V.output, L.globstar = !0, q(H);
900
+ L.output = L.output.slice(0, -V.output.length), V.type = "globstar", V.output = N(n), V.value += H, L.output += V.output, L.globstar = !0, q(H);
903
901
  continue;
904
902
  }
905
- let n = {
903
+ let r = {
906
904
  type: "star",
907
905
  value: H,
908
906
  output: I
909
907
  };
910
- if (r.bash === !0) {
911
- n.output = ".*?", (V.type === "bos" || V.type === "slash") && (n.output = P + n.output), Q(n);
908
+ if (n.bash === !0) {
909
+ r.output = ".*?", (V.type === "bos" || V.type === "slash") && (r.output = P + r.output), Q(r);
912
910
  continue;
913
911
  }
914
- if (V && (V.type === "bracket" || V.type === "paren") && r.regex === !0) {
915
- n.output = H, Q(n);
912
+ if (V && (V.type === "bracket" || V.type === "paren") && n.regex === !0) {
913
+ r.output = H, Q(r);
916
914
  continue;
917
915
  }
918
- (L.index === L.start || V.type === "slash" || V.type === "dot") && (V.type === "dot" ? (L.output += D, V.output += D) : r.dot === !0 ? (L.output += O, V.output += O) : (L.output += P, V.output += P), W() !== "*" && (L.output += w, V.output += w)), Q(n);
916
+ (L.index === L.start || V.type === "slash" || V.type === "dot") && (V.type === "dot" ? (L.output += D, V.output += D) : n.dot === !0 ? (L.output += O, V.output += O) : (L.output += P, V.output += P), W() !== "*" && (L.output += w, V.output += w)), Q(r);
919
917
  }
920
918
  for (; L.brackets > 0;) {
921
- if (r.strictBrackets === !0) throw SyntaxError(f("closing", "]"));
919
+ if (n.strictBrackets === !0) throw SyntaxError(f("closing", "]"));
922
920
  L.output = a.escapeLast(L.output, "["), Z("brackets");
923
921
  }
924
922
  for (; L.parens > 0;) {
925
- if (r.strictBrackets === !0) throw SyntaxError(f("closing", ")"));
923
+ if (n.strictBrackets === !0) throw SyntaxError(f("closing", ")"));
926
924
  L.output = a.escapeLast(L.output, "("), Z("parens");
927
925
  }
928
926
  for (; L.braces > 0;) {
929
- if (r.strictBrackets === !0) throw SyntaxError(f("closing", "}"));
927
+ if (n.strictBrackets === !0) throw SyntaxError(f("closing", "}"));
930
928
  L.output = a.escapeLast(L.output, "{"), Z("braces");
931
929
  }
932
- if (r.strictSlashes !== !0 && (V.type === "star" || V.type === "bracket") && Q({
930
+ if (n.strictSlashes !== !0 && (V.type === "star" || V.type === "bracket") && Q({
933
931
  type: "maybe_slash",
934
932
  value: "",
935
933
  output: `${C}?`
@@ -940,24 +938,24 @@ var r = /* @__PURE__ */ e(((e, t) => {
940
938
  return L;
941
939
  };
942
940
  x.fastpaths = (e, t) => {
943
- let r = { ...t }, i = typeof r.maxLength == "number" ? Math.min(o, r.maxLength) : o, s = e.length;
944
- if (s > i) throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${i}`);
941
+ let n = { ...t }, r = typeof n.maxLength == "number" ? Math.min(o, n.maxLength) : o, s = e.length;
942
+ if (s > r) throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${r}`);
945
943
  e = u[e] || e;
946
- let { DOT_LITERAL: c, SLASH_LITERAL: l, ONE_CHAR: d, DOTS_SLASH: f, NO_DOT: p, NO_DOTS: m, NO_DOTS_SLASH: h, STAR: g, START_ANCHOR: _ } = n.globChars(r.windows), v = r.dot ? m : p, y = r.dot ? h : p, b = r.capture ? "" : "?:", x = {
944
+ let { DOT_LITERAL: c, SLASH_LITERAL: l, ONE_CHAR: d, DOTS_SLASH: f, NO_DOT: p, NO_DOTS: m, NO_DOTS_SLASH: h, STAR: g, START_ANCHOR: _ } = i.globChars(n.windows), v = n.dot ? m : p, y = n.dot ? h : p, b = n.capture ? "" : "?:", x = {
947
945
  negated: !1,
948
946
  prefix: ""
949
- }, S = r.bash === !0 ? ".*?" : g;
950
- r.capture && (S = `(${S})`);
947
+ }, S = n.bash === !0 ? ".*?" : g;
948
+ n.capture && (S = `(${S})`);
951
949
  let C = (e) => e.noglobstar === !0 ? S : `(${b}(?:(?!${_}${e.dot ? f : c}).)*?)`, w = (e) => {
952
950
  switch (e) {
953
951
  case "*": return `${v}${d}${S}`;
954
952
  case ".*": return `${c}${d}${S}`;
955
953
  case "*.*": return `${v}${S}${c}${d}${S}`;
956
954
  case "*/*": return `${v}${S}${l}${d}${y}${S}`;
957
- case "**": return v + C(r);
958
- case "**/*": return `(?:${v}${C(r)}${l})?${y}${d}${S}`;
959
- case "**/*.*": return `(?:${v}${C(r)}${l})?${y}${S}${c}${d}${S}`;
960
- case "**/.*": return `(?:${v}${C(r)}${l})?${c}${d}${S}`;
955
+ case "**": return v + C(n);
956
+ case "**/*": return `(?:${v}${C(n)}${l})?${y}${d}${S}`;
957
+ case "**/*.*": return `(?:${v}${C(n)}${l})?${y}${S}${c}${d}${S}`;
958
+ case "**/.*": return `(?:${v}${C(n)}${l})?${c}${d}${S}`;
961
959
  default: {
962
960
  let t = /^(.*?)\.(\w+)$/.exec(e);
963
961
  if (!t) return;
@@ -966,10 +964,10 @@ var r = /* @__PURE__ */ e(((e, t) => {
966
964
  }
967
965
  }
968
966
  }, T = w(a.removePrefix(e, x));
969
- return T && r.strictSlashes !== !0 && (T += `${l}?`), T;
970
- }, t.exports = x;
971
- })), s = /* @__PURE__ */ e(((e, t) => {
972
- var n = a(), s = o(), c = i(), l = r(), u = (e) => e && typeof e == "object" && !Array.isArray(e), d = (e, t, n = !1) => {
967
+ return T && n.strictSlashes !== !0 && (T += `${l}?`), T;
968
+ }, r.exports = x;
969
+ })), a = /* @__PURE__ */ e(((e, a) => {
970
+ var o = r(), s = i(), c = n(), l = t(), u = (e) => e && typeof e == "object" && !Array.isArray(e), d = (e, t, n = !1) => {
973
971
  if (Array.isArray(e)) {
974
972
  let r = e.map((e) => d(e, t, n));
975
973
  return (e) => {
@@ -1027,7 +1025,7 @@ var r = /* @__PURE__ */ e(((e, t) => {
1027
1025
  }, d.matchBase = (e, t, n) => (t instanceof RegExp ? t : d.makeRe(t, n)).test(c.basename(e)), d.isMatch = (e, t, n) => d(t, n)(e), d.parse = (e, t) => Array.isArray(e) ? e.map((e) => d.parse(e, t)) : s(e, {
1028
1026
  ...t,
1029
1027
  fastpaths: !1
1030
- }), d.scan = (e, t) => n(e, t), d.compileRe = (e, t, n = !1, r = !1) => {
1028
+ }), d.scan = (e, t) => o(e, t), d.compileRe = (e, t, n = !1, r = !1) => {
1031
1029
  if (n === !0) return e.output;
1032
1030
  let i = t || {}, a = i.contains ? "" : "^", o = i.contains ? "" : "$", s = `${a}(?:${e.output})${o}`;
1033
1031
  e && e.negated === !0 && (s = `^(?!${s}).*$`);
@@ -1048,16 +1046,16 @@ var r = /* @__PURE__ */ e(((e, t) => {
1048
1046
  if (t && t.debug === !0) throw e;
1049
1047
  return /$^/;
1050
1048
  }
1051
- }, d.constants = l, t.exports = d;
1052
- })), c = /* @__PURE__ */ e(((e, t) => {
1053
- var n = s(), r = i();
1054
- function a(e, t, i = !1) {
1049
+ }, d.constants = l, a.exports = d;
1050
+ })), o = /* @__PURE__ */ e(((e, t) => {
1051
+ var r = a(), i = n();
1052
+ function o(e, t, n = !1) {
1055
1053
  return t && (t.windows === null || t.windows === void 0) && (t = {
1056
1054
  ...t,
1057
- windows: r.isWindows()
1058
- }), n(e, t, i);
1055
+ windows: i.isWindows()
1056
+ }), r(e, t, n);
1059
1057
  }
1060
- Object.assign(a, n), t.exports = a;
1058
+ Object.assign(o, r), t.exports = o;
1061
1059
  }));
1062
1060
  //#endregion
1063
- export { c as t };
1061
+ export { o as t };
@@ -1,4 +1,4 @@
1
- import { Fi as e, ii as t } from "./dist-BewPQWjc.js";
1
+ import { Fi as e, ii as t } from "./dist-Da20xy8E.js";
2
2
  import "./ops/cpu/rope.js";
3
3
  import "./ops/webgl/rope.js";
4
4
  //#region lib/ops/grads/rope.ts
@@ -1,4 +1,4 @@
1
- import { $t as e, An as t, B as n, Rn as r, Wr as i, br as a, ct as o, gt as s, hr as c, lt as l, mn as u } from "./dist-BewPQWjc.js";
1
+ import { $t as e, An as t, B as n, Rn as r, Wr as i, br as a, ct as o, gt as s, hr as c, lt as l, mn as u } from "./dist-Da20xy8E.js";
2
2
  //#region node_modules/@tensorflow/tfjs-core/dist/ops/fused_util.js
3
3
  function d(e, t, r) {
4
4
  if (r == null || r === "linear") return e;
@@ -1,7 +1,7 @@
1
- import { r as e } from "./chunk-BPntVaq0.js";
2
- import { $o as t, $s as n, Ao as r, Bs as i, Ci as a, Di as o, Dn as s, En as c, Es as l, Fa as u, Fo as d, Hs as f, In as p, Jo as m, Ka as h, Ln as g, Na as _, Ni as v, Pi as y, Ps as b, Ra as x, Rs as S, Ti as C, Tn as ee, Us as w, Vs as T, Xr as E, Xs as D, Ya as te, _o as ne, aa as re, bo as ie, br as ae, ca as oe, di as se, fs as ce, ho as le, hs as ue, ki as O, ms as de, na as fe, nc as pe, no as me, ns as he, oa as ge, oc as k, qa as _e, ro as ve, sr as ye, uc as A, wn as be, wo as j, za as M } from "./dist-BewPQWjc.js";
3
- import { B as xe, H as Se, R as Ce, V as we, _ as Te, c as N, d as Ee, f as De, g as Oe, h as ke, l as Ae, m as je, n as Me, p as Ne, r as P, s as Pe, u as Fe, v as Ie, z as Le } from "./backend_util-Cg-roD1p.js";
4
- import { a as Re, i as ze, n as Be, t as Ve } from "./slice_util-Dgb3ANWI.js";
1
+ import { n as e } from "./chunk-CWhphoD1.js";
2
+ import { $o as t, $s as n, Ao as r, Bs as i, Ci as a, Di as o, Dn as s, En as c, Es as l, Fa as u, Fo as d, Hs as f, In as p, Jo as m, Ka as h, Ln as g, Na as _, Ni as v, Pi as y, Ps as b, Ra as x, Rs as S, Ti as C, Tn as ee, Us as w, Vs as T, Xr as E, Xs as D, Ya as te, _o as ne, aa as re, bo as ie, br as ae, ca as oe, di as se, fs as ce, ho as le, hs as ue, ki as O, ms as de, na as fe, nc as pe, no as me, ns as he, oa as ge, oc as k, qa as _e, ro as ve, sr as ye, uc as A, wn as be, wo as j, za as M } from "./dist-Da20xy8E.js";
3
+ import { B as xe, H as Se, R as Ce, V as we, _ as Te, c as N, d as Ee, f as De, g as Oe, h as ke, l as Ae, m as je, n as Me, p as Ne, r as P, s as Pe, u as Fe, v as Ie, z as Le } from "./backend_util-DAV0I34P.js";
4
+ import { a as Re, i as ze, n as Be, t as Ve } from "./slice_util-Dve4TkDn.js";
5
5
  import { s as F } from "./complex_util-CkazZsaH.js";
6
6
  //#region node_modules/@tensorflow/tfjs-backend-cpu/dist/cpu_util.js
7
7
  function I(e, t) {