@genai-fi/nanogpt 0.20.6 → 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 (208) 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 +6 -6
  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-C0YUnw98.js → main-DdsoTJAW.js} +2012 -2015
  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 +3 -3
  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 +8 -4
  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 +8 -4
  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 +3 -3
  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 +2 -2
  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/arrayClose.d.ts +1 -0
  192. package/dist/utilities/arrayClose.js +13 -1
  193. package/dist/utilities/dummy.js +1 -1
  194. package/dist/utilities/float16.d.ts +3 -0
  195. package/dist/utilities/float16.js +46 -0
  196. package/dist/utilities/multinomialCPU.js +1 -1
  197. package/dist/utilities/packed.js +1 -1
  198. package/dist/utilities/performance.js +1 -1
  199. package/dist/utilities/profile.js +1 -1
  200. package/dist/utilities/safetensors.d.ts +3 -1
  201. package/dist/utilities/safetensors.js +46 -36
  202. package/dist/utilities/sentences.js +1 -1
  203. package/dist/utilities/weights.js +1 -1
  204. package/dist/{webgpu-Dt7BMzWz.js → webgpu-B19Tw8Nd.js} +3 -3
  205. package/dist/{webgpu_program-WOyIVMlZ.js → webgpu_program-B0PokuRJ.js} +1 -1
  206. package/dist/{webgpu_util-B_F3SShA.js → webgpu_util-DfODg6XI.js} +1 -1
  207. package/package.json +5 -5
  208. package/dist/dist-DXwIvKxl.js +0 -896
@@ -1,23 +1,23 @@
1
1
  //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), c = (e, n) => {
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
3
3
  let r = {};
4
4
  for (var i in e) t(r, i, {
5
5
  get: e[i],
6
6
  enumerable: !0
7
7
  });
8
8
  return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
- }, l = (e, i, o, s) => {
9
+ }, c = (e, i, o, s) => {
10
10
  if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
11
  get: ((e) => i[e]).bind(null, d),
12
12
  enumerable: !(s = n(i, d)) || s.enumerable
13
13
  });
14
14
  return e;
15
- }, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", {
15
+ }, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
16
16
  value: n,
17
17
  enumerable: !0
18
- }) : a, n)), d = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
18
+ }) : a, n)), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
19
19
  if (typeof require < "u") return require.apply(this, arguments);
20
20
  throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
21
21
  });
22
22
  //#endregion
23
- export { u as a, d as i, o as n, c as r, s as t };
23
+ export { l as i, s as n, u as r, o as t };
@@ -1,4 +1,4 @@
1
- import { Ps as e } from "./dist-BewPQWjc.js";
1
+ import { Ps as e } from "./dist-Da20xy8E.js";
2
2
  //#region node_modules/@tensorflow/tfjs-core/dist/ops/concat_util.js
3
3
  function t(t, n) {
4
4
  let r = t[0].length;
package/dist/data/docx.js CHANGED
@@ -1,9 +1,8 @@
1
- import { a as e, i as t, t as n } from "../chunk-BPntVaq0.js";
2
- import { a as r, i, n as a, o, r as s, t as c } from "../dist-DXwIvKxl.js";
1
+ import { i as e, r as t, t as n } from "../chunk-CWhphoD1.js";
3
2
  //#region node_modules/jszip/dist/jszip.min.js
4
- var l = /* @__PURE__ */ n(((e, n) => {
5
- a(), o(), s(), (function(t) {
6
- typeof e == "object" && n !== void 0 ? n.exports = t() : typeof define == "function" && define.amd ? define([], t) : (typeof window < "u" ? window : r === void 0 ? typeof self < "u" ? self : this : r).JSZip = t();
3
+ var r = /* @__PURE__ */ n(((e, n) => {
4
+ (function(t) {
5
+ typeof e == "object" && n !== void 0 ? n.exports = t() : typeof define == "function" && define.amd ? define([], t) : (typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : this).JSZip = t();
7
6
  })(function() {
8
7
  return function e(n, r, i) {
9
8
  function a(s, c) {
@@ -405,19 +404,19 @@ var l = /* @__PURE__ */ n(((e, n) => {
405
404
  }],
406
405
  14: [function(e, t, n) {
407
406
  t.exports = {
408
- isNode: c !== void 0,
407
+ isNode: typeof Buffer < "u",
409
408
  newBufferFrom: function(e, t) {
410
- if (c.from && c.from !== Uint8Array.from) return c.from(e, t);
409
+ if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(e, t);
411
410
  if (typeof e == "number") throw Error("The \"data\" argument must not be a number");
412
- return new c(e, t);
411
+ return new Buffer(e, t);
413
412
  },
414
413
  allocBuffer: function(e) {
415
- if (c.alloc) return c.alloc(e);
416
- var t = new c(e);
414
+ if (Buffer.alloc) return Buffer.alloc(e);
415
+ var t = new Buffer(e);
417
416
  return t.fill(0), t;
418
417
  },
419
418
  isBuffer: function(e) {
420
- return c.isBuffer(e);
419
+ return Buffer.isBuffer(e);
421
420
  },
422
421
  isStream: function(e) {
423
422
  return e && typeof e.on == "function" && typeof e.pause == "function" && typeof e.resume == "function";
@@ -824,13 +823,13 @@ var l = /* @__PURE__ */ n(((e, n) => {
824
823
  }, t.exports = r;
825
824
  }, {}],
826
825
  29: [function(e, t, n) {
827
- var r = e("../utils"), i = e("./ConvertWorker"), a = e("./GenericWorker"), o = e("../base64"), s = e("../support"), l = e("../external"), u = null;
826
+ var r = e("../utils"), i = e("./ConvertWorker"), a = e("./GenericWorker"), o = e("../base64"), s = e("../support"), c = e("../external"), l = null;
828
827
  if (s.nodestream) try {
829
- u = e("../nodejs/NodejsStreamOutputAdapter");
828
+ l = e("../nodejs/NodejsStreamOutputAdapter");
830
829
  } catch {}
831
- function d(e, t) {
832
- return new l.Promise(function(n, i) {
833
- var a = [], s = e._internalType, l = e._outputType, u = e._mimeType;
830
+ function u(e, t) {
831
+ return new c.Promise(function(n, i) {
832
+ var a = [], s = e._internalType, c = e._outputType, l = e._mimeType;
834
833
  e.on("data", function(e, n) {
835
834
  a.push(e), t && t(n);
836
835
  }).on("error", function(e) {
@@ -843,7 +842,7 @@ var l = /* @__PURE__ */ n(((e, n) => {
843
842
  case "base64": return o.encode(t);
844
843
  default: return r.transformTo(e, t);
845
844
  }
846
- }(l, function(e, t) {
845
+ }(c, function(e, t) {
847
846
  var n, r = 0, i = null, a = 0;
848
847
  for (n = 0; n < t.length; n++) a += t[n].length;
849
848
  switch (e) {
@@ -852,10 +851,10 @@ var l = /* @__PURE__ */ n(((e, n) => {
852
851
  case "uint8array":
853
852
  for (i = new Uint8Array(a), n = 0; n < t.length; n++) i.set(t[n], r), r += t[n].length;
854
853
  return i;
855
- case "nodebuffer": return c.concat(t);
854
+ case "nodebuffer": return Buffer.concat(t);
856
855
  default: throw Error("concat : unsupported type '" + e + "'");
857
856
  }
858
- }(s, a), u));
857
+ }(s, a), l));
859
858
  } catch (e) {
860
859
  i(e);
861
860
  }
@@ -863,7 +862,7 @@ var l = /* @__PURE__ */ n(((e, n) => {
863
862
  }).resume();
864
863
  });
865
864
  }
866
- function f(e, t, n) {
865
+ function d(e, t, n) {
867
866
  var o = t;
868
867
  switch (t) {
869
868
  case "blob":
@@ -878,9 +877,9 @@ var l = /* @__PURE__ */ n(((e, n) => {
878
877
  this._worker = new a("error"), this._worker.error(e);
879
878
  }
880
879
  }
881
- f.prototype = {
880
+ d.prototype = {
882
881
  accumulate: function(e) {
883
- return d(this, e);
882
+ return u(this, e);
884
883
  },
885
884
  on: function(e, t) {
886
885
  var n = this;
@@ -898,9 +897,9 @@ var l = /* @__PURE__ */ n(((e, n) => {
898
897
  },
899
898
  toNodejsStream: function(e) {
900
899
  if (r.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw Error(this._outputType + " is not supported by this method");
901
- return new u(this, { objectMode: this._outputType !== "nodebuffer" }, e);
900
+ return new l(this, { objectMode: this._outputType !== "nodebuffer" }, e);
902
901
  }
903
- }, t.exports = f;
902
+ }, t.exports = d;
904
903
  }, {
905
904
  "../base64": 1,
906
905
  "../external": 6,
@@ -911,7 +910,7 @@ var l = /* @__PURE__ */ n(((e, n) => {
911
910
  "./GenericWorker": 28
912
911
  }],
913
912
  30: [function(e, t, n) {
914
- if (n.base64 = !0, n.array = !0, n.string = !0, n.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", n.nodebuffer = c !== void 0, n.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") n.blob = !1;
913
+ if (n.base64 = !0, n.array = !0, n.string = !0, n.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", n.nodebuffer = typeof Buffer < "u", n.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") n.blob = !1;
915
914
  else {
916
915
  var r = /* @__PURE__ */ new ArrayBuffer(0);
917
916
  try {
@@ -1427,7 +1426,7 @@ var l = /* @__PURE__ */ n(((e, n) => {
1427
1426
  t.exports = function(e) {
1428
1427
  l.push(e) !== 1 || r || n();
1429
1428
  };
1430
- }).call(this, r === void 0 ? typeof self < "u" ? self : typeof window < "u" ? window : {} : r);
1429
+ }).call(this, typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : {});
1431
1430
  }, {}],
1432
1431
  37: [function(e, t, n) {
1433
1432
  var r = e("immediate");
@@ -2953,10 +2952,10 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
2953
2952
  (function(e) {
2954
2953
  (function(e, t) {
2955
2954
  if (!e.setImmediate) {
2956
- var n, r, a, o, s = 1, c = {}, l = !1, u = e.document, d = Object.getPrototypeOf && Object.getPrototypeOf(e);
2957
- d = d && d.setTimeout ? d : e, n = {}.toString.call(e.process) === "[object process]" ? function(e) {
2958
- i.nextTick(function() {
2959
- p(e);
2955
+ var n, r, i, a, o = 1, s = {}, c = !1, l = e.document, u = Object.getPrototypeOf && Object.getPrototypeOf(e);
2956
+ u = u && u.setTimeout ? u : e, n = {}.toString.call(e.process) === "[object process]" ? function(e) {
2957
+ process.nextTick(function() {
2958
+ f(e);
2960
2959
  });
2961
2960
  } : function() {
2962
2961
  if (e.postMessage && !e.importScripts) {
@@ -2965,37 +2964,37 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
2965
2964
  t = !1;
2966
2965
  }, e.postMessage("", "*"), e.onmessage = n, t;
2967
2966
  }
2968
- }() ? (o = "setImmediate$" + Math.random() + "$", e.addEventListener ? e.addEventListener("message", m, !1) : e.attachEvent("onmessage", m), function(t) {
2969
- e.postMessage(o + t, "*");
2970
- }) : e.MessageChannel ? ((a = new MessageChannel()).port1.onmessage = function(e) {
2971
- p(e.data);
2967
+ }() ? (a = "setImmediate$" + Math.random() + "$", e.addEventListener ? e.addEventListener("message", p, !1) : e.attachEvent("onmessage", p), function(t) {
2968
+ e.postMessage(a + t, "*");
2969
+ }) : e.MessageChannel ? ((i = new MessageChannel()).port1.onmessage = function(e) {
2970
+ f(e.data);
2972
2971
  }, function(e) {
2973
- a.port2.postMessage(e);
2974
- }) : u && "onreadystatechange" in u.createElement("script") ? (r = u.documentElement, function(e) {
2975
- var t = u.createElement("script");
2972
+ i.port2.postMessage(e);
2973
+ }) : l && "onreadystatechange" in l.createElement("script") ? (r = l.documentElement, function(e) {
2974
+ var t = l.createElement("script");
2976
2975
  t.onreadystatechange = function() {
2977
- p(e), t.onreadystatechange = null, r.removeChild(t), t = null;
2976
+ f(e), t.onreadystatechange = null, r.removeChild(t), t = null;
2978
2977
  }, r.appendChild(t);
2979
2978
  }) : function(e) {
2980
- setTimeout(p, 0, e);
2981
- }, d.setImmediate = function(e) {
2979
+ setTimeout(f, 0, e);
2980
+ }, u.setImmediate = function(e) {
2982
2981
  typeof e != "function" && (e = Function("" + e));
2983
2982
  for (var t = Array(arguments.length - 1), r = 0; r < t.length; r++) t[r] = arguments[r + 1];
2984
- return c[s] = {
2983
+ return s[o] = {
2985
2984
  callback: e,
2986
2985
  args: t
2987
- }, n(s), s++;
2988
- }, d.clearImmediate = f;
2986
+ }, n(o), o++;
2987
+ }, u.clearImmediate = d;
2989
2988
  }
2990
- function f(e) {
2991
- delete c[e];
2989
+ function d(e) {
2990
+ delete s[e];
2992
2991
  }
2993
- function p(e) {
2994
- if (l) setTimeout(p, 0, e);
2992
+ function f(e) {
2993
+ if (c) setTimeout(f, 0, e);
2995
2994
  else {
2996
- var n = c[e];
2995
+ var n = s[e];
2997
2996
  if (n) {
2998
- l = !0;
2997
+ c = !0;
2999
2998
  try {
3000
2999
  (function(e) {
3001
3000
  var n = e.callback, r = e.args;
@@ -3016,31 +3015,31 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
3016
3015
  }
3017
3016
  })(n);
3018
3017
  } finally {
3019
- f(e), l = !1;
3018
+ d(e), c = !1;
3020
3019
  }
3021
3020
  }
3022
3021
  }
3023
3022
  }
3024
- function m(t) {
3025
- t.source === e && typeof t.data == "string" && t.data.indexOf(o) === 0 && p(+t.data.slice(o.length));
3023
+ function p(t) {
3024
+ t.source === e && typeof t.data == "string" && t.data.indexOf(a) === 0 && f(+t.data.slice(a.length));
3026
3025
  }
3027
3026
  })(typeof self > "u" ? e === void 0 ? this : e : self);
3028
- }).call(this, r === void 0 ? typeof self < "u" ? self : typeof window < "u" ? window : {} : r);
3027
+ }).call(this, typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : {});
3029
3028
  }, {}]
3030
3029
  }, {}, [10])(10);
3031
3030
  });
3032
- })), u = /* @__PURE__ */ e(l(), 1);
3033
- async function d(e) {
3034
- let t = await (await u.default.loadAsync(e)).file("word/document.xml")?.async("string");
3031
+ })), i = /* @__PURE__ */ e(r(), 1);
3032
+ async function a(e) {
3033
+ let t = await (await i.default.loadAsync(e)).file("word/document.xml")?.async("string");
3035
3034
  if (!t) throw Error("Failed to load document.xml");
3036
- return f(t).split("\n").filter((e) => e.trim().length > 10).map((e) => [{
3035
+ return o(t).split("\n").filter((e) => e.trim().length > 10).map((e) => [{
3037
3036
  role: "text",
3038
3037
  content: e
3039
3038
  }]);
3040
3039
  }
3041
- function f(e) {
3040
+ function o(e) {
3042
3041
  let t = new DOMParser().parseFromString(e, "application/xml");
3043
3042
  return Array.from(t.getElementsByTagName("w:t")).map((e) => e.textContent).join("\n");
3044
3043
  }
3045
3044
  //#endregion
3046
- export { d as loadDOCX, l as t };
3045
+ export { a as loadDOCX, r as t };