document-model 1.0.16 → 1.0.17

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 (43) hide show
  1. package/dist/browser/document/schema/zod.d.ts +24 -0
  2. package/dist/browser/document/types.d.ts +8 -7
  3. package/dist/browser/document/utils/base.d.ts +4 -4
  4. package/dist/browser/document-model/gen/object.d.ts +1 -1
  5. package/dist/browser/document-model/gen/schema/types.d.ts +12 -5
  6. package/dist/browser/document-model/gen/schema/zod.d.ts +20 -1
  7. package/dist/browser/document-model/index.d.ts +3 -3
  8. package/dist/browser/document-model.cjs +1 -1
  9. package/dist/browser/document-model.js +2 -2
  10. package/dist/browser/document.cjs +1 -1
  11. package/dist/browser/document.js +2 -2
  12. package/dist/browser/index.cjs +1 -1
  13. package/dist/browser/index.js +3 -3
  14. package/dist/browser/internal/index-01030c3f.js +22 -0
  15. package/dist/{node/internal/index-0e7af6c6.js → browser/internal/index-2aee8ea9.js} +1 -1
  16. package/dist/browser/internal/{index-37753e74.js → index-5f1909ad.js} +513 -435
  17. package/dist/{node/internal/index-124bda95.js → browser/internal/index-a1282d5c.js} +1 -1
  18. package/dist/browser/internal/object-24df9d92.js +6 -0
  19. package/dist/browser/internal/{object-17aee7a9.js → object-7e8eaff4.js} +377 -365
  20. package/dist/node/document/schema/zod.d.ts +24 -0
  21. package/dist/node/document/types.d.ts +8 -7
  22. package/dist/node/document/utils/base.d.ts +4 -4
  23. package/dist/node/document-model/gen/object.d.ts +1 -1
  24. package/dist/node/document-model/gen/schema/types.d.ts +12 -5
  25. package/dist/node/document-model/gen/schema/zod.d.ts +20 -1
  26. package/dist/node/document-model/index.d.ts +3 -3
  27. package/dist/node/document-model.cjs +1 -1
  28. package/dist/node/document-model.js +2 -2
  29. package/dist/node/document.cjs +1 -1
  30. package/dist/node/document.js +2 -2
  31. package/dist/node/index.cjs +1 -1
  32. package/dist/node/index.js +3 -3
  33. package/dist/node/internal/{index-9037f83a.js → index-0db636da.js} +513 -435
  34. package/dist/{browser/internal/index-f5587600.js → node/internal/index-2d4783d9.js} +1 -1
  35. package/dist/{browser/internal/index-9b4d67fc.js → node/internal/index-5ef0c6b0.js} +1 -1
  36. package/dist/node/internal/index-cddc9dfd.js +22 -0
  37. package/dist/node/internal/object-21f3d2ee.js +1 -0
  38. package/dist/node/internal/{object-f7cd4777.js → object-c32ea0a0.js} +154 -142
  39. package/package.json +1 -1
  40. package/dist/browser/internal/index-a5150e7e.js +0 -22
  41. package/dist/browser/internal/object-28a1a8bf.js +0 -6
  42. package/dist/node/internal/index-417115f1.js +0 -22
  43. package/dist/node/internal/object-f3dd289e.js +0 -1
@@ -1,12 +1,12 @@
1
- var gr = Object.defineProperty;
2
- var dr = (e, a, s) => a in e ? gr(e, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[a] = s;
3
- var q = (e, a, s) => (dr(e, typeof a != "symbol" ? a + "" : a, s), s);
4
- import wr from "json-stringify-deterministic";
5
- import { produce as bt, castDraft as yr, castImmutable as vr, freeze as br } from "immer";
1
+ var yr = Object.defineProperty;
2
+ var vr = (e, a, s) => a in e ? yr(e, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[a] = s;
3
+ var q = (e, a, s) => (vr(e, typeof a != "symbol" ? a + "" : a, s), s);
4
+ import br from "json-stringify-deterministic";
5
+ import { produce as bt, castDraft as Er, castImmutable as _r, freeze as Fr } from "immer";
6
6
  import At from "jszip";
7
7
  import { z as g } from "zod";
8
- const Bt = (e) => e != null, Er = g.any().refine((e) => Bt(e)), St = g.enum(["LOAD_STATE"]), jt = g.enum(["PRUNE"]), Ut = g.enum(["REDO"]), It = g.enum(["SET_NAME"]), kt = g.enum(["UNDO"]);
9
- function _r() {
8
+ const St = (e) => e != null, Ar = g.any().refine((e) => St(e)), Bt = g.enum(["LOAD_STATE"]), jt = g.enum(["PRUNE"]), It = g.enum(["REDO"]), Ut = g.enum(["SET_NAME"]), kt = g.enum(["UNDO"]);
9
+ function Sr() {
10
10
  return g.object({
11
11
  __typename: g.literal("Action").optional(),
12
12
  type: g.string()
@@ -14,14 +14,14 @@ function _r() {
14
14
  }
15
15
  function Tt() {
16
16
  return g.union([
17
- it(),
18
- et(),
19
- nt(),
20
- at(),
21
- ot()
17
+ Dt(),
18
+ Nt(),
19
+ Mt(),
20
+ Ct(),
21
+ Rt()
22
22
  ]);
23
23
  }
24
- function Fr() {
24
+ function Br() {
25
25
  return g.object({
26
26
  __typename: g.literal("DocumentFile").optional(),
27
27
  data: g.string(),
@@ -30,14 +30,14 @@ function Fr() {
30
30
  mimeType: g.string()
31
31
  });
32
32
  }
33
- function it() {
33
+ function Dt() {
34
34
  return g.object({
35
- input: g.lazy(() => Dt()),
36
- type: St,
35
+ input: g.lazy(() => it()),
36
+ type: Bt,
37
37
  scope: g.literal("global")
38
38
  });
39
39
  }
40
- function Dt() {
40
+ function it() {
41
41
  return g.object({
42
42
  operations: g.number(),
43
43
  state: g.lazy(() => Ot())
@@ -49,7 +49,7 @@ function Ot() {
49
49
  name: g.string()
50
50
  });
51
51
  }
52
- function Ar() {
52
+ function jr() {
53
53
  return g.object({
54
54
  __typename: g.literal("Operation").optional(),
55
55
  hash: g.string(),
@@ -58,34 +58,36 @@ function Ar() {
58
58
  type: g.string()
59
59
  });
60
60
  }
61
- function et() {
61
+ function Nt() {
62
62
  return g.object({
63
- input: g.lazy(() => Nt()),
63
+ input: g.lazy(() => et()),
64
64
  type: jt,
65
65
  scope: g.literal("global")
66
66
  });
67
67
  }
68
- function Nt() {
68
+ function et() {
69
69
  return g.object({
70
70
  end: g.number().nullish(),
71
71
  start: g.number().nullish()
72
72
  });
73
73
  }
74
- function nt() {
74
+ const nt = g.number;
75
+ function Mt() {
75
76
  return g.object({
76
- input: g.number(),
77
- type: Ut,
77
+ input: nt(),
78
+ type: It,
78
79
  scope: g.literal("global")
79
80
  });
80
81
  }
81
- function at() {
82
+ const at = g.string;
83
+ function Ct() {
82
84
  return g.object({
83
- input: g.string(),
84
- type: It,
85
+ input: at(),
86
+ type: Ut,
85
87
  scope: g.literal("global")
86
88
  });
87
89
  }
88
- function Br() {
90
+ function Ir() {
89
91
  return g.object({
90
92
  __typename: g.literal("SetNameOperation").optional(),
91
93
  hash: g.string(),
@@ -95,37 +97,41 @@ function Br() {
95
97
  type: g.string()
96
98
  });
97
99
  }
98
- function ot() {
100
+ const ot = g.number;
101
+ function Rt() {
99
102
  return g.object({
100
- input: g.number(),
103
+ input: ot(),
101
104
  type: kt,
102
105
  scope: g.literal("global")
103
106
  });
104
107
  }
105
- const Fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
108
+ const Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
106
109
  __proto__: null,
107
- ActionSchema: _r,
110
+ ActionSchema: Sr,
108
111
  BaseActionSchema: Tt,
109
- DocumentFileSchema: Fr,
110
- LoadStateActionInputSchema: Dt,
111
- LoadStateActionSchema: it,
112
+ DocumentFileSchema: Br,
113
+ LoadStateActionInputSchema: it,
114
+ LoadStateActionSchema: Dt,
112
115
  LoadStateActionStateInputSchema: Ot,
113
- Load_StateSchema: St,
114
- OperationSchema: Ar,
115
- PruneActionInputSchema: Nt,
116
- PruneActionSchema: et,
116
+ Load_StateSchema: Bt,
117
+ OperationSchema: jr,
118
+ PruneActionInputSchema: et,
119
+ PruneActionSchema: Nt,
117
120
  PruneSchema: jt,
118
- RedoActionSchema: nt,
119
- RedoSchema: Ut,
120
- SetNameActionSchema: at,
121
- SetNameOperationSchema: Br,
122
- Set_NameSchema: It,
123
- UndoActionSchema: ot,
121
+ RedoActionInputSchema: nt,
122
+ RedoActionSchema: Mt,
123
+ RedoSchema: It,
124
+ SetNameActionInputSchema: at,
125
+ SetNameActionSchema: Ct,
126
+ SetNameOperationSchema: Ir,
127
+ Set_NameSchema: Ut,
128
+ UndoActionInputSchema: ot,
129
+ UndoActionSchema: Rt,
124
130
  UndoSchema: kt,
125
- definedNonNullAnySchema: Er,
126
- isDefinedNonNullAny: Bt
131
+ definedNonNullAnySchema: Ar,
132
+ isDefinedNonNullAny: St
127
133
  }, Symbol.toStringTag, { value: "Module" }));
128
- function Mt(e) {
134
+ function Lt(e) {
129
135
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
130
136
  }
131
137
  function P() {
@@ -164,10 +170,10 @@ P.prototype.getType = function(e) {
164
170
  P.prototype.getExtension = function(e) {
165
171
  return e = /^\s*([^;\s]*)/.test(e) && RegExp.$1, e && this._extensions[e.toLowerCase()] || null;
166
172
  };
167
- var Sr = P, jr = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
168
- let Ur = Sr;
169
- var Ir = new Ur(jr);
170
- const kr = /* @__PURE__ */ Mt(Ir);
173
+ var Ur = P, kr = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
174
+ let Tr = Ur;
175
+ var Dr = new Tr(kr);
176
+ const Or = /* @__PURE__ */ Lt(Dr);
171
177
  var tt = { exports: {} };
172
178
  typeof Object.create == "function" ? tt.exports = function(a, s) {
173
179
  s && (a.super_ = s, a.prototype = Object.create(s.prototype, {
@@ -186,16 +192,16 @@ typeof Object.create == "function" ? tt.exports = function(a, s) {
186
192
  l.prototype = s.prototype, a.prototype = new l(), a.prototype.constructor = a;
187
193
  }
188
194
  };
189
- var Tr = tt.exports, rt = { exports: {} }, Ct = {}, W = {};
190
- W.byteLength = Nr;
191
- W.toByteArray = Cr;
192
- W.fromByteArray = zr;
193
- var k = [], j = [], Dr = typeof Uint8Array < "u" ? Uint8Array : Array, Q = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
194
- for (var D = 0, Or = Q.length; D < Or; ++D)
195
+ var Nr = tt.exports, rt = { exports: {} }, zt = {}, W = {};
196
+ W.byteLength = Rr;
197
+ W.toByteArray = zr;
198
+ W.fromByteArray = Jr;
199
+ var k = [], j = [], Mr = typeof Uint8Array < "u" ? Uint8Array : Array, Q = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
200
+ for (var D = 0, Cr = Q.length; D < Cr; ++D)
195
201
  k[D] = Q[D], j[Q.charCodeAt(D)] = D;
196
202
  j["-".charCodeAt(0)] = 62;
197
203
  j["_".charCodeAt(0)] = 63;
198
- function Rt(e) {
204
+ function qt(e) {
199
205
  var a = e.length;
200
206
  if (a % 4 > 0)
201
207
  throw new Error("Invalid string. Length must be a multiple of 4");
@@ -204,30 +210,30 @@ function Rt(e) {
204
210
  var l = s === a ? 0 : 4 - s % 4;
205
211
  return [s, l];
206
212
  }
207
- function Nr(e) {
208
- var a = Rt(e), s = a[0], l = a[1];
213
+ function Rr(e) {
214
+ var a = qt(e), s = a[0], l = a[1];
209
215
  return (s + l) * 3 / 4 - l;
210
216
  }
211
- function Mr(e, a, s) {
217
+ function Lr(e, a, s) {
212
218
  return (a + s) * 3 / 4 - s;
213
219
  }
214
- function Cr(e) {
215
- var a, s = Rt(e), l = s[0], f = s[1], h = new Dr(Mr(e, l, f)), u = 0, o = f > 0 ? l - 4 : l, x;
220
+ function zr(e) {
221
+ var a, s = qt(e), l = s[0], f = s[1], h = new Mr(Lr(e, l, f)), c = 0, o = f > 0 ? l - 4 : l, x;
216
222
  for (x = 0; x < o; x += 4)
217
- a = j[e.charCodeAt(x)] << 18 | j[e.charCodeAt(x + 1)] << 12 | j[e.charCodeAt(x + 2)] << 6 | j[e.charCodeAt(x + 3)], h[u++] = a >> 16 & 255, h[u++] = a >> 8 & 255, h[u++] = a & 255;
218
- return f === 2 && (a = j[e.charCodeAt(x)] << 2 | j[e.charCodeAt(x + 1)] >> 4, h[u++] = a & 255), f === 1 && (a = j[e.charCodeAt(x)] << 10 | j[e.charCodeAt(x + 1)] << 4 | j[e.charCodeAt(x + 2)] >> 2, h[u++] = a >> 8 & 255, h[u++] = a & 255), h;
223
+ a = j[e.charCodeAt(x)] << 18 | j[e.charCodeAt(x + 1)] << 12 | j[e.charCodeAt(x + 2)] << 6 | j[e.charCodeAt(x + 3)], h[c++] = a >> 16 & 255, h[c++] = a >> 8 & 255, h[c++] = a & 255;
224
+ return f === 2 && (a = j[e.charCodeAt(x)] << 2 | j[e.charCodeAt(x + 1)] >> 4, h[c++] = a & 255), f === 1 && (a = j[e.charCodeAt(x)] << 10 | j[e.charCodeAt(x + 1)] << 4 | j[e.charCodeAt(x + 2)] >> 2, h[c++] = a >> 8 & 255, h[c++] = a & 255), h;
219
225
  }
220
- function Rr(e) {
226
+ function qr(e) {
221
227
  return k[e >> 18 & 63] + k[e >> 12 & 63] + k[e >> 6 & 63] + k[e & 63];
222
228
  }
223
- function Lr(e, a, s) {
229
+ function $r(e, a, s) {
224
230
  for (var l, f = [], h = a; h < s; h += 3)
225
- l = (e[h] << 16 & 16711680) + (e[h + 1] << 8 & 65280) + (e[h + 2] & 255), f.push(Rr(l));
231
+ l = (e[h] << 16 & 16711680) + (e[h + 1] << 8 & 65280) + (e[h + 2] & 255), f.push(qr(l));
226
232
  return f.join("");
227
233
  }
228
- function zr(e) {
229
- for (var a, s = e.length, l = s % 3, f = [], h = 16383, u = 0, o = s - l; u < o; u += h)
230
- f.push(Lr(e, u, u + h > o ? o : u + h));
234
+ function Jr(e) {
235
+ for (var a, s = e.length, l = s % 3, f = [], h = 16383, c = 0, o = s - l; c < o; c += h)
236
+ f.push($r(e, c, c + h > o ? o : c + h));
231
237
  return l === 1 ? (a = e[s - 1], f.push(
232
238
  k[a >> 2] + k[a << 4 & 63] + "=="
233
239
  )) : l === 2 && (a = (e[s - 2] << 8) + e[s - 1], f.push(
@@ -237,27 +243,27 @@ function zr(e) {
237
243
  var pt = {};
238
244
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
239
245
  pt.read = function(e, a, s, l, f) {
240
- var h, u, o = f * 8 - l - 1, x = (1 << o) - 1, w = x >> 1, y = -7, _ = s ? f - 1 : 0, U = s ? -1 : 1, B = e[a + _];
241
- for (_ += U, h = B & (1 << -y) - 1, B >>= -y, y += o; y > 0; h = h * 256 + e[a + _], _ += U, y -= 8)
246
+ var h, c, o = f * 8 - l - 1, x = (1 << o) - 1, w = x >> 1, y = -7, _ = s ? f - 1 : 0, I = s ? -1 : 1, S = e[a + _];
247
+ for (_ += I, h = S & (1 << -y) - 1, S >>= -y, y += o; y > 0; h = h * 256 + e[a + _], _ += I, y -= 8)
242
248
  ;
243
- for (u = h & (1 << -y) - 1, h >>= -y, y += l; y > 0; u = u * 256 + e[a + _], _ += U, y -= 8)
249
+ for (c = h & (1 << -y) - 1, h >>= -y, y += l; y > 0; c = c * 256 + e[a + _], _ += I, y -= 8)
244
250
  ;
245
251
  if (h === 0)
246
252
  h = 1 - w;
247
253
  else {
248
254
  if (h === x)
249
- return u ? NaN : (B ? -1 : 1) * (1 / 0);
250
- u = u + Math.pow(2, l), h = h - w;
255
+ return c ? NaN : (S ? -1 : 1) * (1 / 0);
256
+ c = c + Math.pow(2, l), h = h - w;
251
257
  }
252
- return (B ? -1 : 1) * u * Math.pow(2, h - l);
258
+ return (S ? -1 : 1) * c * Math.pow(2, h - l);
253
259
  };
254
260
  pt.write = function(e, a, s, l, f, h) {
255
- var u, o, x, w = h * 8 - f - 1, y = (1 << w) - 1, _ = y >> 1, U = f === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, B = l ? 0 : h - 1, O = l ? 1 : -1, N = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
256
- for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0, u = y) : (u = Math.floor(Math.log(a) / Math.LN2), a * (x = Math.pow(2, -u)) < 1 && (u--, x *= 2), u + _ >= 1 ? a += U / x : a += U * Math.pow(2, 1 - _), a * x >= 2 && (u++, x /= 2), u + _ >= y ? (o = 0, u = y) : u + _ >= 1 ? (o = (a * x - 1) * Math.pow(2, f), u = u + _) : (o = a * Math.pow(2, _ - 1) * Math.pow(2, f), u = 0)); f >= 8; e[s + B] = o & 255, B += O, o /= 256, f -= 8)
261
+ var c, o, x, w = h * 8 - f - 1, y = (1 << w) - 1, _ = y >> 1, I = f === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, S = l ? 0 : h - 1, O = l ? 1 : -1, N = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
262
+ for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0, c = y) : (c = Math.floor(Math.log(a) / Math.LN2), a * (x = Math.pow(2, -c)) < 1 && (c--, x *= 2), c + _ >= 1 ? a += I / x : a += I * Math.pow(2, 1 - _), a * x >= 2 && (c++, x /= 2), c + _ >= y ? (o = 0, c = y) : c + _ >= 1 ? (o = (a * x - 1) * Math.pow(2, f), c = c + _) : (o = a * Math.pow(2, _ - 1) * Math.pow(2, f), c = 0)); f >= 8; e[s + S] = o & 255, S += O, o /= 256, f -= 8)
257
263
  ;
258
- for (u = u << f | o, w += f; w > 0; e[s + B] = u & 255, B += O, u /= 256, w -= 8)
264
+ for (c = c << f | o, w += f; w > 0; e[s + S] = c & 255, S += O, c /= 256, w -= 8)
259
265
  ;
260
- e[s + B - O] |= N * 128;
266
+ e[s + S - O] |= N * 128;
261
267
  };
262
268
  /*!
263
269
  * The buffer module from node.js, for the browser.
@@ -267,7 +273,7 @@ pt.write = function(e, a, s, l, f, h) {
267
273
  */
268
274
  (function(e) {
269
275
  var a = W, s = pt, l = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
270
- e.Buffer = o, e.SlowBuffer = Vt, e.INSPECT_MAX_BYTES = 50;
276
+ e.Buffer = o, e.SlowBuffer = rr, e.INSPECT_MAX_BYTES = 50;
271
277
  var f = 2147483647;
272
278
  e.kMaxLength = f, o.TYPED_ARRAY_SUPPORT = h(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
273
279
  "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
@@ -295,7 +301,7 @@ pt.write = function(e, a, s, l, f, h) {
295
301
  return this.byteOffset;
296
302
  }
297
303
  });
298
- function u(i) {
304
+ function c(i) {
299
305
  if (i > f)
300
306
  throw new RangeError('The value "' + i + '" is invalid for option "size"');
301
307
  var t = new Uint8Array(i);
@@ -314,14 +320,14 @@ pt.write = function(e, a, s, l, f, h) {
314
320
  o.poolSize = 8192;
315
321
  function x(i, t, r) {
316
322
  if (typeof i == "string")
317
- return U(i, t);
323
+ return I(i, t);
318
324
  if (ArrayBuffer.isView(i))
319
325
  return O(i);
320
326
  if (i == null)
321
327
  throw new TypeError(
322
328
  "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof i
323
329
  );
324
- if (I(i, ArrayBuffer) || i && I(i.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (I(i, SharedArrayBuffer) || i && I(i.buffer, SharedArrayBuffer)))
330
+ if (U(i, ArrayBuffer) || i && U(i.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (U(i, SharedArrayBuffer) || i && U(i.buffer, SharedArrayBuffer)))
325
331
  return N(i, t, r);
326
332
  if (typeof i == "number")
327
333
  throw new TypeError(
@@ -330,7 +336,7 @@ pt.write = function(e, a, s, l, f, h) {
330
336
  var n = i.valueOf && i.valueOf();
331
337
  if (n != null && n !== i)
332
338
  return o.from(n, t, r);
333
- var p = Gt(i);
339
+ var p = tr(i);
334
340
  if (p)
335
341
  return p;
336
342
  if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof i[Symbol.toPrimitive] == "function")
@@ -353,36 +359,36 @@ pt.write = function(e, a, s, l, f, h) {
353
359
  throw new RangeError('The value "' + i + '" is invalid for option "size"');
354
360
  }
355
361
  function y(i, t, r) {
356
- return w(i), i <= 0 ? u(i) : t !== void 0 ? typeof r == "string" ? u(i).fill(t, r) : u(i).fill(t) : u(i);
362
+ return w(i), i <= 0 ? c(i) : t !== void 0 ? typeof r == "string" ? c(i).fill(t, r) : c(i).fill(t) : c(i);
357
363
  }
358
364
  o.alloc = function(i, t, r) {
359
365
  return y(i, t, r);
360
366
  };
361
367
  function _(i) {
362
- return w(i), u(i < 0 ? 0 : X(i) | 0);
368
+ return w(i), c(i < 0 ? 0 : X(i) | 0);
363
369
  }
364
370
  o.allocUnsafe = function(i) {
365
371
  return _(i);
366
372
  }, o.allocUnsafeSlow = function(i) {
367
373
  return _(i);
368
374
  };
369
- function U(i, t) {
375
+ function I(i, t) {
370
376
  if ((typeof t != "string" || t === "") && (t = "utf8"), !o.isEncoding(t))
371
377
  throw new TypeError("Unknown encoding: " + t);
372
- var r = ct(i, t) | 0, n = u(r), p = n.write(i, t);
378
+ var r = ct(i, t) | 0, n = c(r), p = n.write(i, t);
373
379
  return p !== r && (n = n.slice(0, p)), n;
374
380
  }
375
- function B(i) {
376
- for (var t = i.length < 0 ? 0 : X(i.length) | 0, r = u(t), n = 0; n < t; n += 1)
381
+ function S(i) {
382
+ for (var t = i.length < 0 ? 0 : X(i.length) | 0, r = c(t), n = 0; n < t; n += 1)
377
383
  r[n] = i[n] & 255;
378
384
  return r;
379
385
  }
380
386
  function O(i) {
381
- if (I(i, Uint8Array)) {
387
+ if (U(i, Uint8Array)) {
382
388
  var t = new Uint8Array(i);
383
389
  return N(t.buffer, t.byteOffset, t.byteLength);
384
390
  }
385
- return B(i);
391
+ return S(i);
386
392
  }
387
393
  function N(i, t, r) {
388
394
  if (t < 0 || i.byteLength < t)
@@ -392,36 +398,36 @@ pt.write = function(e, a, s, l, f, h) {
392
398
  var n;
393
399
  return t === void 0 && r === void 0 ? n = new Uint8Array(i) : r === void 0 ? n = new Uint8Array(i, t) : n = new Uint8Array(i, t, r), Object.setPrototypeOf(n, o.prototype), n;
394
400
  }
395
- function Gt(i) {
401
+ function tr(i) {
396
402
  if (o.isBuffer(i)) {
397
- var t = X(i.length) | 0, r = u(t);
403
+ var t = X(i.length) | 0, r = c(t);
398
404
  return r.length === 0 || i.copy(r, 0, 0, t), r;
399
405
  }
400
406
  if (i.length !== void 0)
401
- return typeof i.length != "number" || V(i.length) ? u(0) : B(i);
407
+ return typeof i.length != "number" || V(i.length) ? c(0) : S(i);
402
408
  if (i.type === "Buffer" && Array.isArray(i.data))
403
- return B(i.data);
409
+ return S(i.data);
404
410
  }
405
411
  function X(i) {
406
412
  if (i >= f)
407
413
  throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + f.toString(16) + " bytes");
408
414
  return i | 0;
409
415
  }
410
- function Vt(i) {
416
+ function rr(i) {
411
417
  return +i != i && (i = 0), o.alloc(+i);
412
418
  }
413
419
  o.isBuffer = function(t) {
414
420
  return t != null && t._isBuffer === !0 && t !== o.prototype;
415
421
  }, o.compare = function(t, r) {
416
- if (I(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), I(r, Uint8Array) && (r = o.from(r, r.offset, r.byteLength)), !o.isBuffer(t) || !o.isBuffer(r))
422
+ if (U(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), U(r, Uint8Array) && (r = o.from(r, r.offset, r.byteLength)), !o.isBuffer(t) || !o.isBuffer(r))
417
423
  throw new TypeError(
418
424
  'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
419
425
  );
420
426
  if (t === r)
421
427
  return 0;
422
- for (var n = t.length, p = r.length, c = 0, m = Math.min(n, p); c < m; ++c)
423
- if (t[c] !== r[c]) {
424
- n = t[c], p = r[c];
428
+ for (var n = t.length, p = r.length, u = 0, m = Math.min(n, p); u < m; ++u)
429
+ if (t[u] !== r[u]) {
430
+ n = t[u], p = r[u];
425
431
  break;
426
432
  }
427
433
  return n < p ? -1 : p < n ? 1 : 0;
@@ -451,27 +457,27 @@ pt.write = function(e, a, s, l, f, h) {
451
457
  if (r === void 0)
452
458
  for (r = 0, n = 0; n < t.length; ++n)
453
459
  r += t[n].length;
454
- var p = o.allocUnsafe(r), c = 0;
460
+ var p = o.allocUnsafe(r), u = 0;
455
461
  for (n = 0; n < t.length; ++n) {
456
462
  var m = t[n];
457
- if (I(m, Uint8Array))
458
- c + m.length > p.length ? o.from(m).copy(p, c) : Uint8Array.prototype.set.call(
463
+ if (U(m, Uint8Array))
464
+ u + m.length > p.length ? o.from(m).copy(p, u) : Uint8Array.prototype.set.call(
459
465
  p,
460
466
  m,
461
- c
467
+ u
462
468
  );
463
469
  else if (o.isBuffer(m))
464
- m.copy(p, c);
470
+ m.copy(p, u);
465
471
  else
466
472
  throw new TypeError('"list" argument must be an Array of Buffers');
467
- c += m.length;
473
+ u += m.length;
468
474
  }
469
475
  return p;
470
476
  };
471
477
  function ct(i, t) {
472
478
  if (o.isBuffer(i))
473
479
  return i.length;
474
- if (ArrayBuffer.isView(i) || I(i, ArrayBuffer))
480
+ if (ArrayBuffer.isView(i) || U(i, ArrayBuffer))
475
481
  return i.byteLength;
476
482
  if (typeof i != "string")
477
483
  throw new TypeError(
@@ -505,29 +511,29 @@ pt.write = function(e, a, s, l, f, h) {
505
511
  }
506
512
  }
507
513
  o.byteLength = ct;
508
- function Qt(i, t, r) {
514
+ function ir(i, t, r) {
509
515
  var n = !1;
510
516
  if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || (r >>>= 0, t >>>= 0, r <= t))
511
517
  return "";
512
518
  for (i || (i = "utf8"); ; )
513
519
  switch (i) {
514
520
  case "hex":
515
- return lr(this, t, r);
521
+ return fr(this, t, r);
516
522
  case "utf8":
517
523
  case "utf-8":
518
524
  return ht(this, t, r);
519
525
  case "ascii":
520
- return pr(this, t, r);
526
+ return cr(this, t, r);
521
527
  case "latin1":
522
528
  case "binary":
523
- return sr(this, t, r);
529
+ return ur(this, t, r);
524
530
  case "base64":
525
- return ar(this, t, r);
531
+ return sr(this, t, r);
526
532
  case "ucs2":
527
533
  case "ucs-2":
528
534
  case "utf16le":
529
535
  case "utf-16le":
530
- return cr(this, t, r);
536
+ return hr(this, t, r);
531
537
  default:
532
538
  if (n)
533
539
  throw new TypeError("Unknown encoding: " + i);
@@ -562,7 +568,7 @@ pt.write = function(e, a, s, l, f, h) {
562
568
  return this;
563
569
  }, o.prototype.toString = function() {
564
570
  var t = this.length;
565
- return t === 0 ? "" : arguments.length === 0 ? ht(this, 0, t) : Qt.apply(this, arguments);
571
+ return t === 0 ? "" : arguments.length === 0 ? ht(this, 0, t) : ir.apply(this, arguments);
566
572
  }, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(t) {
567
573
  if (!o.isBuffer(t))
568
574
  throw new TypeError("Argument must be a Buffer");
@@ -570,22 +576,22 @@ pt.write = function(e, a, s, l, f, h) {
570
576
  }, o.prototype.inspect = function() {
571
577
  var t = "", r = e.INSPECT_MAX_BYTES;
572
578
  return t = this.toString("hex", 0, r).replace(/(.{2})/g, "$1 ").trim(), this.length > r && (t += " ... "), "<Buffer " + t + ">";
573
- }, l && (o.prototype[l] = o.prototype.inspect), o.prototype.compare = function(t, r, n, p, c) {
574
- if (I(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(t))
579
+ }, l && (o.prototype[l] = o.prototype.inspect), o.prototype.compare = function(t, r, n, p, u) {
580
+ if (U(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(t))
575
581
  throw new TypeError(
576
582
  'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t
577
583
  );
578
- if (r === void 0 && (r = 0), n === void 0 && (n = t ? t.length : 0), p === void 0 && (p = 0), c === void 0 && (c = this.length), r < 0 || n > t.length || p < 0 || c > this.length)
584
+ if (r === void 0 && (r = 0), n === void 0 && (n = t ? t.length : 0), p === void 0 && (p = 0), u === void 0 && (u = this.length), r < 0 || n > t.length || p < 0 || u > this.length)
579
585
  throw new RangeError("out of range index");
580
- if (p >= c && r >= n)
586
+ if (p >= u && r >= n)
581
587
  return 0;
582
- if (p >= c)
588
+ if (p >= u)
583
589
  return -1;
584
590
  if (r >= n)
585
591
  return 1;
586
- if (r >>>= 0, n >>>= 0, p >>>= 0, c >>>= 0, this === t)
592
+ if (r >>>= 0, n >>>= 0, p >>>= 0, u >>>= 0, this === t)
587
593
  return 0;
588
- for (var m = c - p, d = n - r, v = Math.min(m, d), b = this.slice(p, c), A = t.slice(r, n), E = 0; E < v; ++E)
594
+ for (var m = u - p, d = n - r, v = Math.min(m, d), b = this.slice(p, u), A = t.slice(r, n), E = 0; E < v; ++E)
589
595
  if (b[E] !== A[E]) {
590
596
  m = b[E], d = A[E];
591
597
  break;
@@ -611,14 +617,14 @@ pt.write = function(e, a, s, l, f, h) {
611
617
  throw new TypeError("val must be string, number or Buffer");
612
618
  }
613
619
  function ft(i, t, r, n, p) {
614
- var c = 1, m = i.length, d = t.length;
620
+ var u = 1, m = i.length, d = t.length;
615
621
  if (n !== void 0 && (n = String(n).toLowerCase(), n === "ucs2" || n === "ucs-2" || n === "utf16le" || n === "utf-16le")) {
616
622
  if (i.length < 2 || t.length < 2)
617
623
  return -1;
618
- c = 2, m /= 2, d /= 2, r /= 2;
624
+ u = 2, m /= 2, d /= 2, r /= 2;
619
625
  }
620
626
  function v(yt, vt) {
621
- return c === 1 ? yt[vt] : yt.readUInt16BE(vt * c);
627
+ return u === 1 ? yt[vt] : yt.readUInt16BE(vt * u);
622
628
  }
623
629
  var b;
624
630
  if (p) {
@@ -626,7 +632,7 @@ pt.write = function(e, a, s, l, f, h) {
626
632
  for (b = r; b < m; b++)
627
633
  if (v(i, b) === v(t, A === -1 ? 0 : b - A)) {
628
634
  if (A === -1 && (A = b), b - A + 1 === d)
629
- return A * c;
635
+ return A * u;
630
636
  } else
631
637
  A !== -1 && (b -= b - A), A = -1;
632
638
  } else
@@ -648,12 +654,12 @@ pt.write = function(e, a, s, l, f, h) {
648
654
  }, o.prototype.lastIndexOf = function(t, r, n) {
649
655
  return ut(this, t, r, n, !1);
650
656
  };
651
- function tr(i, t, r, n) {
657
+ function er(i, t, r, n) {
652
658
  r = Number(r) || 0;
653
659
  var p = i.length - r;
654
660
  n ? (n = Number(n), n > p && (n = p)) : n = p;
655
- var c = t.length;
656
- n > c / 2 && (n = c / 2);
661
+ var u = t.length;
662
+ n > u / 2 && (n = u / 2);
657
663
  for (var m = 0; m < n; ++m) {
658
664
  var d = parseInt(t.substr(m * 2, 2), 16);
659
665
  if (V(d))
@@ -662,17 +668,17 @@ pt.write = function(e, a, s, l, f, h) {
662
668
  }
663
669
  return m;
664
670
  }
665
- function rr(i, t, r, n) {
671
+ function nr(i, t, r, n) {
666
672
  return L(G(t, i.length - r), i, r, n);
667
673
  }
668
- function ir(i, t, r, n) {
669
- return L(hr(t), i, r, n);
674
+ function ar(i, t, r, n) {
675
+ return L(gr(t), i, r, n);
670
676
  }
671
- function er(i, t, r, n) {
677
+ function or(i, t, r, n) {
672
678
  return L(wt(t), i, r, n);
673
679
  }
674
- function nr(i, t, r, n) {
675
- return L(mr(t, i.length - r), i, r, n);
680
+ function pr(i, t, r, n) {
681
+ return L(dr(t, i.length - r), i, r, n);
676
682
  }
677
683
  o.prototype.write = function(t, r, n, p) {
678
684
  if (r === void 0)
@@ -685,28 +691,28 @@ pt.write = function(e, a, s, l, f, h) {
685
691
  throw new Error(
686
692
  "Buffer.write(string, encoding, offset[, length]) is no longer supported"
687
693
  );
688
- var c = this.length - r;
689
- if ((n === void 0 || n > c) && (n = c), t.length > 0 && (n < 0 || r < 0) || r > this.length)
694
+ var u = this.length - r;
695
+ if ((n === void 0 || n > u) && (n = u), t.length > 0 && (n < 0 || r < 0) || r > this.length)
690
696
  throw new RangeError("Attempt to write outside buffer bounds");
691
697
  p || (p = "utf8");
692
698
  for (var m = !1; ; )
693
699
  switch (p) {
694
700
  case "hex":
695
- return tr(this, t, r, n);
701
+ return er(this, t, r, n);
696
702
  case "utf8":
697
703
  case "utf-8":
698
- return rr(this, t, r, n);
704
+ return nr(this, t, r, n);
699
705
  case "ascii":
700
706
  case "latin1":
701
707
  case "binary":
702
- return ir(this, t, r, n);
708
+ return ar(this, t, r, n);
703
709
  case "base64":
704
- return er(this, t, r, n);
710
+ return or(this, t, r, n);
705
711
  case "ucs2":
706
712
  case "ucs-2":
707
713
  case "utf16le":
708
714
  case "utf-16le":
709
- return nr(this, t, r, n);
715
+ return pr(this, t, r, n);
710
716
  default:
711
717
  if (m)
712
718
  throw new TypeError("Unknown encoding: " + p);
@@ -718,35 +724,35 @@ pt.write = function(e, a, s, l, f, h) {
718
724
  data: Array.prototype.slice.call(this._arr || this, 0)
719
725
  };
720
726
  };
721
- function ar(i, t, r) {
727
+ function sr(i, t, r) {
722
728
  return t === 0 && r === i.length ? a.fromByteArray(i) : a.fromByteArray(i.slice(t, r));
723
729
  }
724
730
  function ht(i, t, r) {
725
731
  r = Math.min(i.length, r);
726
732
  for (var n = [], p = t; p < r; ) {
727
- var c = i[p], m = null, d = c > 239 ? 4 : c > 223 ? 3 : c > 191 ? 2 : 1;
733
+ var u = i[p], m = null, d = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1;
728
734
  if (p + d <= r) {
729
735
  var v, b, A, E;
730
736
  switch (d) {
731
737
  case 1:
732
- c < 128 && (m = c);
738
+ u < 128 && (m = u);
733
739
  break;
734
740
  case 2:
735
- v = i[p + 1], (v & 192) === 128 && (E = (c & 31) << 6 | v & 63, E > 127 && (m = E));
741
+ v = i[p + 1], (v & 192) === 128 && (E = (u & 31) << 6 | v & 63, E > 127 && (m = E));
736
742
  break;
737
743
  case 3:
738
- v = i[p + 1], b = i[p + 2], (v & 192) === 128 && (b & 192) === 128 && (E = (c & 15) << 12 | (v & 63) << 6 | b & 63, E > 2047 && (E < 55296 || E > 57343) && (m = E));
744
+ v = i[p + 1], b = i[p + 2], (v & 192) === 128 && (b & 192) === 128 && (E = (u & 15) << 12 | (v & 63) << 6 | b & 63, E > 2047 && (E < 55296 || E > 57343) && (m = E));
739
745
  break;
740
746
  case 4:
741
- v = i[p + 1], b = i[p + 2], A = i[p + 3], (v & 192) === 128 && (b & 192) === 128 && (A & 192) === 128 && (E = (c & 15) << 18 | (v & 63) << 12 | (b & 63) << 6 | A & 63, E > 65535 && E < 1114112 && (m = E));
747
+ v = i[p + 1], b = i[p + 2], A = i[p + 3], (v & 192) === 128 && (b & 192) === 128 && (A & 192) === 128 && (E = (u & 15) << 18 | (v & 63) << 12 | (b & 63) << 6 | A & 63, E > 65535 && E < 1114112 && (m = E));
742
748
  }
743
749
  }
744
750
  m === null ? (m = 65533, d = 1) : m > 65535 && (m -= 65536, n.push(m >>> 10 & 1023 | 55296), m = 56320 | m & 1023), n.push(m), p += d;
745
751
  }
746
- return or(n);
752
+ return lr(n);
747
753
  }
748
754
  var mt = 4096;
749
- function or(i) {
755
+ function lr(i) {
750
756
  var t = i.length;
751
757
  if (t <= mt)
752
758
  return String.fromCharCode.apply(String, i);
@@ -757,30 +763,30 @@ pt.write = function(e, a, s, l, f, h) {
757
763
  );
758
764
  return r;
759
765
  }
760
- function pr(i, t, r) {
766
+ function cr(i, t, r) {
761
767
  var n = "";
762
768
  r = Math.min(i.length, r);
763
769
  for (var p = t; p < r; ++p)
764
770
  n += String.fromCharCode(i[p] & 127);
765
771
  return n;
766
772
  }
767
- function sr(i, t, r) {
773
+ function ur(i, t, r) {
768
774
  var n = "";
769
775
  r = Math.min(i.length, r);
770
776
  for (var p = t; p < r; ++p)
771
777
  n += String.fromCharCode(i[p]);
772
778
  return n;
773
779
  }
774
- function lr(i, t, r) {
780
+ function fr(i, t, r) {
775
781
  var n = i.length;
776
782
  (!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n);
777
- for (var p = "", c = t; c < r; ++c)
778
- p += xr[i[c]];
783
+ for (var p = "", u = t; u < r; ++u)
784
+ p += wr[i[u]];
779
785
  return p;
780
786
  }
781
- function cr(i, t, r) {
782
- for (var n = i.slice(t, r), p = "", c = 0; c < n.length - 1; c += 2)
783
- p += String.fromCharCode(n[c] + n[c + 1] * 256);
787
+ function hr(i, t, r) {
788
+ for (var n = i.slice(t, r), p = "", u = 0; u < n.length - 1; u += 2)
789
+ p += String.fromCharCode(n[u] + n[u + 1] * 256);
784
790
  return p;
785
791
  }
786
792
  o.prototype.slice = function(t, r) {
@@ -797,13 +803,13 @@ pt.write = function(e, a, s, l, f, h) {
797
803
  }
798
804
  o.prototype.readUintLE = o.prototype.readUIntLE = function(t, r, n) {
799
805
  t = t >>> 0, r = r >>> 0, n || F(t, r, this.length);
800
- for (var p = this[t], c = 1, m = 0; ++m < r && (c *= 256); )
801
- p += this[t + m] * c;
806
+ for (var p = this[t], u = 1, m = 0; ++m < r && (u *= 256); )
807
+ p += this[t + m] * u;
802
808
  return p;
803
809
  }, o.prototype.readUintBE = o.prototype.readUIntBE = function(t, r, n) {
804
810
  t = t >>> 0, r = r >>> 0, n || F(t, r, this.length);
805
- for (var p = this[t + --r], c = 1; r > 0 && (c *= 256); )
806
- p += this[t + --r] * c;
811
+ for (var p = this[t + --r], u = 1; r > 0 && (u *= 256); )
812
+ p += this[t + --r] * u;
807
813
  return p;
808
814
  }, o.prototype.readUint8 = o.prototype.readUInt8 = function(t, r) {
809
815
  return t = t >>> 0, r || F(t, 1, this.length), this[t];
@@ -817,14 +823,14 @@ pt.write = function(e, a, s, l, f, h) {
817
823
  return t = t >>> 0, r || F(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
818
824
  }, o.prototype.readIntLE = function(t, r, n) {
819
825
  t = t >>> 0, r = r >>> 0, n || F(t, r, this.length);
820
- for (var p = this[t], c = 1, m = 0; ++m < r && (c *= 256); )
821
- p += this[t + m] * c;
822
- return c *= 128, p >= c && (p -= Math.pow(2, 8 * r)), p;
826
+ for (var p = this[t], u = 1, m = 0; ++m < r && (u *= 256); )
827
+ p += this[t + m] * u;
828
+ return u *= 128, p >= u && (p -= Math.pow(2, 8 * r)), p;
823
829
  }, o.prototype.readIntBE = function(t, r, n) {
824
830
  t = t >>> 0, r = r >>> 0, n || F(t, r, this.length);
825
- for (var p = r, c = 1, m = this[t + --p]; p > 0 && (c *= 256); )
826
- m += this[t + --p] * c;
827
- return c *= 128, m >= c && (m -= Math.pow(2, 8 * r)), m;
831
+ for (var p = r, u = 1, m = this[t + --p]; p > 0 && (u *= 256); )
832
+ m += this[t + --p] * u;
833
+ return u *= 128, m >= u && (m -= Math.pow(2, 8 * r)), m;
828
834
  }, o.prototype.readInt8 = function(t, r) {
829
835
  return t = t >>> 0, r || F(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
830
836
  }, o.prototype.readInt16LE = function(t, r) {
@@ -848,18 +854,18 @@ pt.write = function(e, a, s, l, f, h) {
848
854
  }, o.prototype.readDoubleBE = function(t, r) {
849
855
  return t = t >>> 0, r || F(t, 8, this.length), s.read(this, t, !1, 52, 8);
850
856
  };
851
- function S(i, t, r, n, p, c) {
857
+ function B(i, t, r, n, p, u) {
852
858
  if (!o.isBuffer(i))
853
859
  throw new TypeError('"buffer" argument must be a Buffer instance');
854
- if (t > p || t < c)
860
+ if (t > p || t < u)
855
861
  throw new RangeError('"value" argument is out of bounds');
856
862
  if (r + n > i.length)
857
863
  throw new RangeError("Index out of range");
858
864
  }
859
865
  o.prototype.writeUintLE = o.prototype.writeUIntLE = function(t, r, n, p) {
860
866
  if (t = +t, r = r >>> 0, n = n >>> 0, !p) {
861
- var c = Math.pow(2, 8 * n) - 1;
862
- S(this, t, r, n, c, 0);
867
+ var u = Math.pow(2, 8 * n) - 1;
868
+ B(this, t, r, n, u, 0);
863
869
  }
864
870
  var m = 1, d = 0;
865
871
  for (this[r] = t & 255; ++d < n && (m *= 256); )
@@ -867,27 +873,27 @@ pt.write = function(e, a, s, l, f, h) {
867
873
  return r + n;
868
874
  }, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(t, r, n, p) {
869
875
  if (t = +t, r = r >>> 0, n = n >>> 0, !p) {
870
- var c = Math.pow(2, 8 * n) - 1;
871
- S(this, t, r, n, c, 0);
876
+ var u = Math.pow(2, 8 * n) - 1;
877
+ B(this, t, r, n, u, 0);
872
878
  }
873
879
  var m = n - 1, d = 1;
874
880
  for (this[r + m] = t & 255; --m >= 0 && (d *= 256); )
875
881
  this[r + m] = t / d & 255;
876
882
  return r + n;
877
883
  }, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(t, r, n) {
878
- return t = +t, r = r >>> 0, n || S(this, t, r, 1, 255, 0), this[r] = t & 255, r + 1;
884
+ return t = +t, r = r >>> 0, n || B(this, t, r, 1, 255, 0), this[r] = t & 255, r + 1;
879
885
  }, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(t, r, n) {
880
- return t = +t, r = r >>> 0, n || S(this, t, r, 2, 65535, 0), this[r] = t & 255, this[r + 1] = t >>> 8, r + 2;
886
+ return t = +t, r = r >>> 0, n || B(this, t, r, 2, 65535, 0), this[r] = t & 255, this[r + 1] = t >>> 8, r + 2;
881
887
  }, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(t, r, n) {
882
- return t = +t, r = r >>> 0, n || S(this, t, r, 2, 65535, 0), this[r] = t >>> 8, this[r + 1] = t & 255, r + 2;
888
+ return t = +t, r = r >>> 0, n || B(this, t, r, 2, 65535, 0), this[r] = t >>> 8, this[r + 1] = t & 255, r + 2;
883
889
  }, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(t, r, n) {
884
- return t = +t, r = r >>> 0, n || S(this, t, r, 4, 4294967295, 0), this[r + 3] = t >>> 24, this[r + 2] = t >>> 16, this[r + 1] = t >>> 8, this[r] = t & 255, r + 4;
890
+ return t = +t, r = r >>> 0, n || B(this, t, r, 4, 4294967295, 0), this[r + 3] = t >>> 24, this[r + 2] = t >>> 16, this[r + 1] = t >>> 8, this[r] = t & 255, r + 4;
885
891
  }, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(t, r, n) {
886
- return t = +t, r = r >>> 0, n || S(this, t, r, 4, 4294967295, 0), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
892
+ return t = +t, r = r >>> 0, n || B(this, t, r, 4, 4294967295, 0), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
887
893
  }, o.prototype.writeIntLE = function(t, r, n, p) {
888
894
  if (t = +t, r = r >>> 0, !p) {
889
- var c = Math.pow(2, 8 * n - 1);
890
- S(this, t, r, n, c - 1, -c);
895
+ var u = Math.pow(2, 8 * n - 1);
896
+ B(this, t, r, n, u - 1, -u);
891
897
  }
892
898
  var m = 0, d = 1, v = 0;
893
899
  for (this[r] = t & 255; ++m < n && (d *= 256); )
@@ -895,25 +901,25 @@ pt.write = function(e, a, s, l, f, h) {
895
901
  return r + n;
896
902
  }, o.prototype.writeIntBE = function(t, r, n, p) {
897
903
  if (t = +t, r = r >>> 0, !p) {
898
- var c = Math.pow(2, 8 * n - 1);
899
- S(this, t, r, n, c - 1, -c);
904
+ var u = Math.pow(2, 8 * n - 1);
905
+ B(this, t, r, n, u - 1, -u);
900
906
  }
901
907
  var m = n - 1, d = 1, v = 0;
902
908
  for (this[r + m] = t & 255; --m >= 0 && (d *= 256); )
903
909
  t < 0 && v === 0 && this[r + m + 1] !== 0 && (v = 1), this[r + m] = (t / d >> 0) - v & 255;
904
910
  return r + n;
905
911
  }, o.prototype.writeInt8 = function(t, r, n) {
906
- return t = +t, r = r >>> 0, n || S(this, t, r, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[r] = t & 255, r + 1;
912
+ return t = +t, r = r >>> 0, n || B(this, t, r, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[r] = t & 255, r + 1;
907
913
  }, o.prototype.writeInt16LE = function(t, r, n) {
908
- return t = +t, r = r >>> 0, n || S(this, t, r, 2, 32767, -32768), this[r] = t & 255, this[r + 1] = t >>> 8, r + 2;
914
+ return t = +t, r = r >>> 0, n || B(this, t, r, 2, 32767, -32768), this[r] = t & 255, this[r + 1] = t >>> 8, r + 2;
909
915
  }, o.prototype.writeInt16BE = function(t, r, n) {
910
- return t = +t, r = r >>> 0, n || S(this, t, r, 2, 32767, -32768), this[r] = t >>> 8, this[r + 1] = t & 255, r + 2;
916
+ return t = +t, r = r >>> 0, n || B(this, t, r, 2, 32767, -32768), this[r] = t >>> 8, this[r + 1] = t & 255, r + 2;
911
917
  }, o.prototype.writeInt32LE = function(t, r, n) {
912
- return t = +t, r = r >>> 0, n || S(this, t, r, 4, 2147483647, -2147483648), this[r] = t & 255, this[r + 1] = t >>> 8, this[r + 2] = t >>> 16, this[r + 3] = t >>> 24, r + 4;
918
+ return t = +t, r = r >>> 0, n || B(this, t, r, 4, 2147483647, -2147483648), this[r] = t & 255, this[r + 1] = t >>> 8, this[r + 2] = t >>> 16, this[r + 3] = t >>> 24, r + 4;
913
919
  }, o.prototype.writeInt32BE = function(t, r, n) {
914
- return t = +t, r = r >>> 0, n || S(this, t, r, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
920
+ return t = +t, r = r >>> 0, n || B(this, t, r, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
915
921
  };
916
- function xt(i, t, r, n, p, c) {
922
+ function xt(i, t, r, n, p, u) {
917
923
  if (r + n > i.length)
918
924
  throw new RangeError("Index out of range");
919
925
  if (r < 0)
@@ -946,12 +952,12 @@ pt.write = function(e, a, s, l, f, h) {
946
952
  if (p < 0)
947
953
  throw new RangeError("sourceEnd out of bounds");
948
954
  p > this.length && (p = this.length), t.length - r < p - n && (p = t.length - r + n);
949
- var c = p - n;
955
+ var u = p - n;
950
956
  return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(r, n, p) : Uint8Array.prototype.set.call(
951
957
  t,
952
958
  this.subarray(n, p),
953
959
  r
954
- ), c;
960
+ ), u;
955
961
  }, o.prototype.fill = function(t, r, n, p) {
956
962
  if (typeof t == "string") {
957
963
  if (typeof r == "string" ? (p = r, r = 0, n = this.length) : typeof n == "string" && (p = n, n = this.length), p !== void 0 && typeof p != "string")
@@ -959,8 +965,8 @@ pt.write = function(e, a, s, l, f, h) {
959
965
  if (typeof p == "string" && !o.isEncoding(p))
960
966
  throw new TypeError("Unknown encoding: " + p);
961
967
  if (t.length === 1) {
962
- var c = t.charCodeAt(0);
963
- (p === "utf8" && c < 128 || p === "latin1") && (t = c);
968
+ var u = t.charCodeAt(0);
969
+ (p === "utf8" && u < 128 || p === "latin1") && (t = u);
964
970
  }
965
971
  } else
966
972
  typeof t == "number" ? t = t & 255 : typeof t == "boolean" && (t = Number(t));
@@ -982,9 +988,9 @@ pt.write = function(e, a, s, l, f, h) {
982
988
  }
983
989
  return this;
984
990
  };
985
- var ur = /[^+/0-9A-Za-z-_]/g;
986
- function fr(i) {
987
- if (i = i.split("=")[0], i = i.trim().replace(ur, ""), i.length < 2)
991
+ var mr = /[^+/0-9A-Za-z-_]/g;
992
+ function xr(i) {
993
+ if (i = i.split("=")[0], i = i.trim().replace(mr, ""), i.length < 2)
988
994
  return "";
989
995
  for (; i.length % 4 !== 0; )
990
996
  i = i + "=";
@@ -992,41 +998,41 @@ pt.write = function(e, a, s, l, f, h) {
992
998
  }
993
999
  function G(i, t) {
994
1000
  t = t || 1 / 0;
995
- for (var r, n = i.length, p = null, c = [], m = 0; m < n; ++m) {
1001
+ for (var r, n = i.length, p = null, u = [], m = 0; m < n; ++m) {
996
1002
  if (r = i.charCodeAt(m), r > 55295 && r < 57344) {
997
1003
  if (!p) {
998
1004
  if (r > 56319) {
999
- (t -= 3) > -1 && c.push(239, 191, 189);
1005
+ (t -= 3) > -1 && u.push(239, 191, 189);
1000
1006
  continue;
1001
1007
  } else if (m + 1 === n) {
1002
- (t -= 3) > -1 && c.push(239, 191, 189);
1008
+ (t -= 3) > -1 && u.push(239, 191, 189);
1003
1009
  continue;
1004
1010
  }
1005
1011
  p = r;
1006
1012
  continue;
1007
1013
  }
1008
1014
  if (r < 56320) {
1009
- (t -= 3) > -1 && c.push(239, 191, 189), p = r;
1015
+ (t -= 3) > -1 && u.push(239, 191, 189), p = r;
1010
1016
  continue;
1011
1017
  }
1012
1018
  r = (p - 55296 << 10 | r - 56320) + 65536;
1013
1019
  } else
1014
- p && (t -= 3) > -1 && c.push(239, 191, 189);
1020
+ p && (t -= 3) > -1 && u.push(239, 191, 189);
1015
1021
  if (p = null, r < 128) {
1016
1022
  if ((t -= 1) < 0)
1017
1023
  break;
1018
- c.push(r);
1024
+ u.push(r);
1019
1025
  } else if (r < 2048) {
1020
1026
  if ((t -= 2) < 0)
1021
1027
  break;
1022
- c.push(
1028
+ u.push(
1023
1029
  r >> 6 | 192,
1024
1030
  r & 63 | 128
1025
1031
  );
1026
1032
  } else if (r < 65536) {
1027
1033
  if ((t -= 3) < 0)
1028
1034
  break;
1029
- c.push(
1035
+ u.push(
1030
1036
  r >> 12 | 224,
1031
1037
  r >> 6 & 63 | 128,
1032
1038
  r & 63 | 128
@@ -1034,7 +1040,7 @@ pt.write = function(e, a, s, l, f, h) {
1034
1040
  } else if (r < 1114112) {
1035
1041
  if ((t -= 4) < 0)
1036
1042
  break;
1037
- c.push(
1043
+ u.push(
1038
1044
  r >> 18 | 240,
1039
1045
  r >> 12 & 63 | 128,
1040
1046
  r >> 6 & 63 | 128,
@@ -1043,79 +1049,79 @@ pt.write = function(e, a, s, l, f, h) {
1043
1049
  } else
1044
1050
  throw new Error("Invalid code point");
1045
1051
  }
1046
- return c;
1052
+ return u;
1047
1053
  }
1048
- function hr(i) {
1054
+ function gr(i) {
1049
1055
  for (var t = [], r = 0; r < i.length; ++r)
1050
1056
  t.push(i.charCodeAt(r) & 255);
1051
1057
  return t;
1052
1058
  }
1053
- function mr(i, t) {
1054
- for (var r, n, p, c = [], m = 0; m < i.length && !((t -= 2) < 0); ++m)
1055
- r = i.charCodeAt(m), n = r >> 8, p = r % 256, c.push(p), c.push(n);
1056
- return c;
1059
+ function dr(i, t) {
1060
+ for (var r, n, p, u = [], m = 0; m < i.length && !((t -= 2) < 0); ++m)
1061
+ r = i.charCodeAt(m), n = r >> 8, p = r % 256, u.push(p), u.push(n);
1062
+ return u;
1057
1063
  }
1058
1064
  function wt(i) {
1059
- return a.toByteArray(fr(i));
1065
+ return a.toByteArray(xr(i));
1060
1066
  }
1061
1067
  function L(i, t, r, n) {
1062
1068
  for (var p = 0; p < n && !(p + r >= t.length || p >= i.length); ++p)
1063
1069
  t[p + r] = i[p];
1064
1070
  return p;
1065
1071
  }
1066
- function I(i, t) {
1072
+ function U(i, t) {
1067
1073
  return i instanceof t || i != null && i.constructor != null && i.constructor.name != null && i.constructor.name === t.name;
1068
1074
  }
1069
1075
  function V(i) {
1070
1076
  return i !== i;
1071
1077
  }
1072
- var xr = function() {
1078
+ var wr = function() {
1073
1079
  for (var i = "0123456789abcdef", t = new Array(256), r = 0; r < 16; ++r)
1074
1080
  for (var n = r * 16, p = 0; p < 16; ++p)
1075
1081
  t[n + p] = i[r] + i[p];
1076
1082
  return t;
1077
1083
  }();
1078
- })(Ct);
1084
+ })(zt);
1079
1085
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
1080
1086
  (function(e, a) {
1081
- var s = Ct, l = s.Buffer;
1082
- function f(u, o) {
1083
- for (var x in u)
1084
- o[x] = u[x];
1087
+ var s = zt, l = s.Buffer;
1088
+ function f(c, o) {
1089
+ for (var x in c)
1090
+ o[x] = c[x];
1085
1091
  }
1086
1092
  l.from && l.alloc && l.allocUnsafe && l.allocUnsafeSlow ? e.exports = s : (f(s, a), a.Buffer = h);
1087
- function h(u, o, x) {
1088
- return l(u, o, x);
1093
+ function h(c, o, x) {
1094
+ return l(c, o, x);
1089
1095
  }
1090
- h.prototype = Object.create(l.prototype), f(l, h), h.from = function(u, o, x) {
1091
- if (typeof u == "number")
1096
+ h.prototype = Object.create(l.prototype), f(l, h), h.from = function(c, o, x) {
1097
+ if (typeof c == "number")
1092
1098
  throw new TypeError("Argument must not be a number");
1093
- return l(u, o, x);
1094
- }, h.alloc = function(u, o, x) {
1095
- if (typeof u != "number")
1099
+ return l(c, o, x);
1100
+ }, h.alloc = function(c, o, x) {
1101
+ if (typeof c != "number")
1096
1102
  throw new TypeError("Argument must be a number");
1097
- var w = l(u);
1103
+ var w = l(c);
1098
1104
  return o !== void 0 ? typeof x == "string" ? w.fill(o, x) : w.fill(o) : w.fill(0), w;
1099
- }, h.allocUnsafe = function(u) {
1100
- if (typeof u != "number")
1105
+ }, h.allocUnsafe = function(c) {
1106
+ if (typeof c != "number")
1101
1107
  throw new TypeError("Argument must be a number");
1102
- return l(u);
1103
- }, h.allocUnsafeSlow = function(u) {
1104
- if (typeof u != "number")
1108
+ return l(c);
1109
+ }, h.allocUnsafeSlow = function(c) {
1110
+ if (typeof c != "number")
1105
1111
  throw new TypeError("Argument must be a number");
1106
- return s.SlowBuffer(u);
1112
+ return s.SlowBuffer(c);
1107
1113
  };
1108
1114
  })(rt, rt.exports);
1109
- var Lt = rt.exports, zt = Lt.Buffer;
1115
+ var $t = rt.exports, Jt = $t.Buffer;
1110
1116
  function H(e, a) {
1111
- this._block = zt.alloc(e), this._finalSize = a, this._blockSize = e, this._len = 0;
1117
+ this._block = Jt.alloc(e), this._finalSize = a, this._blockSize = e, this._len = 0;
1112
1118
  }
1113
1119
  H.prototype.update = function(e, a) {
1114
- typeof e == "string" && (a = a || "utf8", e = zt.from(e, a));
1115
- for (var s = this._block, l = this._blockSize, f = e.length, h = this._len, u = 0; u < f; ) {
1116
- for (var o = h % l, x = Math.min(f - u, l - o), w = 0; w < x; w++)
1117
- s[o + w] = e[u + w];
1118
- h += x, u += x, h % l === 0 && this._update(s);
1120
+ typeof e == "string" && (a = a || "utf8", e = Jt.from(e, a));
1121
+ for (var s = this._block, l = this._blockSize, f = e.length, h = this._len, c = 0; c < f; ) {
1122
+ for (var o = h % l, x = Math.min(f - c, l - o), w = 0; w < x; w++)
1123
+ s[o + w] = e[c + w];
1124
+ h += x, c += x, h % l === 0 && this._update(s);
1119
1125
  }
1120
1126
  return this._len += f, this;
1121
1127
  };
@@ -1136,59 +1142,59 @@ H.prototype.digest = function(e) {
1136
1142
  H.prototype._update = function() {
1137
1143
  throw new Error("_update must be implemented by subclass");
1138
1144
  };
1139
- var qr = H, $r = Tr, qt = qr, Jr = Lt.Buffer, Pr = [
1145
+ var Pr = H, Wr = Nr, Pt = Pr, Hr = $t.Buffer, Zr = [
1140
1146
  1518500249,
1141
1147
  1859775393,
1142
1148
  -1894007588,
1143
1149
  -899497514
1144
- ], Wr = new Array(80);
1150
+ ], Yr = new Array(80);
1145
1151
  function C() {
1146
- this.init(), this._w = Wr, qt.call(this, 64, 56);
1152
+ this.init(), this._w = Yr, Pt.call(this, 64, 56);
1147
1153
  }
1148
- $r(C, qt);
1154
+ Wr(C, Pt);
1149
1155
  C.prototype.init = function() {
1150
1156
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
1151
1157
  };
1152
- function Hr(e) {
1158
+ function Kr(e) {
1153
1159
  return e << 1 | e >>> 31;
1154
1160
  }
1155
- function Zr(e) {
1161
+ function Xr(e) {
1156
1162
  return e << 5 | e >>> 27;
1157
1163
  }
1158
- function Yr(e) {
1164
+ function Gr(e) {
1159
1165
  return e << 30 | e >>> 2;
1160
1166
  }
1161
- function Kr(e, a, s, l) {
1167
+ function Vr(e, a, s, l) {
1162
1168
  return e === 0 ? a & s | ~a & l : e === 2 ? a & s | a & l | s & l : a ^ s ^ l;
1163
1169
  }
1164
1170
  C.prototype._update = function(e) {
1165
- for (var a = this._w, s = this._a | 0, l = this._b | 0, f = this._c | 0, h = this._d | 0, u = this._e | 0, o = 0; o < 16; ++o)
1171
+ for (var a = this._w, s = this._a | 0, l = this._b | 0, f = this._c | 0, h = this._d | 0, c = this._e | 0, o = 0; o < 16; ++o)
1166
1172
  a[o] = e.readInt32BE(o * 4);
1167
1173
  for (; o < 80; ++o)
1168
- a[o] = Hr(a[o - 3] ^ a[o - 8] ^ a[o - 14] ^ a[o - 16]);
1174
+ a[o] = Kr(a[o - 3] ^ a[o - 8] ^ a[o - 14] ^ a[o - 16]);
1169
1175
  for (var x = 0; x < 80; ++x) {
1170
- var w = ~~(x / 20), y = Zr(s) + Kr(w, l, f, h) + u + a[x] + Pr[w] | 0;
1171
- u = h, h = f, f = Yr(l), l = s, s = y;
1176
+ var w = ~~(x / 20), y = Xr(s) + Vr(w, l, f, h) + c + a[x] + Zr[w] | 0;
1177
+ c = h, h = f, f = Gr(l), l = s, s = y;
1172
1178
  }
1173
- this._a = s + this._a | 0, this._b = l + this._b | 0, this._c = f + this._c | 0, this._d = h + this._d | 0, this._e = u + this._e | 0;
1179
+ this._a = s + this._a | 0, this._b = l + this._b | 0, this._c = f + this._c | 0, this._d = h + this._d | 0, this._e = c + this._e | 0;
1174
1180
  };
1175
1181
  C.prototype._hash = function() {
1176
- var e = Jr.allocUnsafe(20);
1182
+ var e = Hr.allocUnsafe(20);
1177
1183
  return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
1178
1184
  };
1179
- var Xr = C;
1180
- const Gr = /* @__PURE__ */ Mt(Xr), st = new Error("File system not available.");
1181
- function Vr(e, a, s) {
1185
+ var Qr = C;
1186
+ const ti = /* @__PURE__ */ Lt(Qr), st = new Error("File system not available.");
1187
+ function ri(e, a, s) {
1182
1188
  throw st;
1183
1189
  }
1184
- function $t(e) {
1190
+ function Wt(e) {
1185
1191
  throw st;
1186
1192
  }
1187
- function Qr(e) {
1193
+ function ii(e) {
1188
1194
  throw st;
1189
1195
  }
1190
- const ti = async (e) => $t();
1191
- function ri(e) {
1196
+ const ei = async (e) => Wt();
1197
+ function ni(e) {
1192
1198
  let a = "";
1193
1199
  for (let s = 0; s < e.length; s += 2)
1194
1200
  a += String.fromCharCode(parseInt(e.substr(s, 2), 16));
@@ -1197,15 +1203,15 @@ function ri(e) {
1197
1203
  const Z = (e, a = "sha1") => {
1198
1204
  if (a !== "sha1")
1199
1205
  throw new Error("Only sha1 algorithm is available.");
1200
- const s = new Gr();
1201
- return ri(s.update(e).digest("hex"));
1202
- }, Jt = async (e) => {
1203
- const a = new At(), { name: s, revision: l, documentType: f, created: h, lastModified: u } = e, o = {
1206
+ const s = new ti();
1207
+ return ni(s.update(e).digest("hex"));
1208
+ }, Ht = async (e) => {
1209
+ const a = new At(), { name: s, revision: l, documentType: f, created: h, lastModified: c } = e, o = {
1204
1210
  name: s,
1205
1211
  revision: l,
1206
1212
  documentType: f,
1207
1213
  created: h,
1208
- lastModified: u
1214
+ lastModified: c
1209
1215
  };
1210
1216
  return a.file("header.json", JSON.stringify(o, null, 2)), a.file(
1211
1217
  "state.json",
@@ -1218,33 +1224,33 @@ const Z = (e, a = "sha1") => {
1218
1224
  comment: JSON.stringify(_)
1219
1225
  });
1220
1226
  }), a;
1221
- }, ii = async (e, a, s, l) => {
1222
- await (await Jt(e)).generateAsync({
1227
+ }, ai = async (e, a, s, l) => {
1228
+ await (await Ht(e)).generateAsync({
1223
1229
  type: "uint8array",
1224
1230
  streamFiles: !0
1225
1231
  });
1226
- const h = l ?? e.name, u = `.${s}.zip`;
1227
- return Vr(
1232
+ const h = l ?? e.name, c = `.${s}.zip`;
1233
+ return ri(
1228
1234
  a,
1229
- h.endsWith(u) ? h : `${h}${u}`
1235
+ h.endsWith(c) ? h : `${h}${c}`
1230
1236
  );
1231
- }, Ai = async (e, a) => {
1232
- const l = await (await Jt(e)).generateAsync({ type: "blob" }), f = await a.createWritable();
1237
+ }, ji = async (e, a) => {
1238
+ const l = await (await Ht(e)).generateAsync({ type: "blob" }), f = await a.createWritable();
1233
1239
  await f.write(l), await f.close();
1234
1240
  }, Et = async (e, a) => {
1235
- const s = $t();
1236
- return ei(s, a);
1237
- }, ei = async (e, a) => {
1241
+ const s = Wt();
1242
+ return oi(s, a);
1243
+ }, oi = async (e, a) => {
1238
1244
  const s = new At();
1239
- return await s.loadAsync(e), ni(s, a);
1245
+ return await s.loadAsync(e), pi(s, a);
1240
1246
  };
1241
- async function ni(e, a) {
1247
+ async function pi(e, a) {
1242
1248
  const s = e.file("state.json");
1243
1249
  if (!s)
1244
1250
  throw new Error("Initial state not found");
1245
1251
  const l = await s.async("string"), f = JSON.parse(l), h = e.file("header.json");
1246
- let u = null;
1247
- h && (u = JSON.parse(await h.async("string")));
1252
+ let c = null;
1253
+ h && (c = JSON.parse(await h.async("string")));
1248
1254
  const o = e.file("operations.json");
1249
1255
  if (!o)
1250
1256
  throw new Error("Operations history not found");
@@ -1252,33 +1258,33 @@ async function ni(e, a) {
1252
1258
  await o.async("string")
1253
1259
  ), w = {
1254
1260
  ...f,
1255
- ...u,
1261
+ ...c,
1256
1262
  initialState: f,
1257
1263
  operations: { global: [], local: [] },
1258
1264
  attachments: { ...f.attachments }
1259
1265
  };
1260
- let y = x.global.concat(x.local).slice(0, u == null ? void 0 : u.revision).reduce(
1261
- (_, U) => a(_, U),
1266
+ let y = x.global.concat(x.local).slice(0, c == null ? void 0 : c.revision).reduce(
1267
+ (_, I) => a(_, I),
1262
1268
  w
1263
1269
  );
1264
- return u && (y = {
1270
+ return c && (y = {
1265
1271
  ...y,
1266
- ...u,
1272
+ ...c,
1267
1273
  operations: {
1268
1274
  global: [
1269
1275
  ...y.operations.global,
1270
- ...x.global.slice(u.revision)
1276
+ ...x.global.slice(c.revision)
1271
1277
  ],
1272
1278
  local: y.operations.local
1273
1279
  }
1274
1280
  }), y;
1275
1281
  }
1276
- function Pt(e) {
1282
+ function Zt(e) {
1277
1283
  const a = e.replace(/^.*\./, "") || void 0, s = e.replace(/^.*[/\\]/, "") || void 0;
1278
1284
  return { extension: a, fileName: s };
1279
1285
  }
1280
- async function Bi(e) {
1281
- const { buffer: a, mimeType: s = "application/octet-stream" } = await Qr(), l = Pt(e), f = a.toString("base64");
1286
+ async function Ii(e) {
1287
+ const { buffer: a, mimeType: s = "application/octet-stream" } = await ii(), l = Zt(e), f = a.toString("base64");
1282
1288
  return {
1283
1289
  data: f,
1284
1290
  hash: Z(f),
@@ -1286,21 +1292,21 @@ async function Bi(e) {
1286
1292
  ...l
1287
1293
  };
1288
1294
  }
1289
- async function Si(e) {
1290
- const a = await ti(), s = kr.getType(e) || "application/octet-stream", l = Pt(e), f = a.toString("base64");
1295
+ async function Ui(e) {
1296
+ const a = await ei(), s = Or.getType(e) || "application/octet-stream", l = Zt(e), f = a.toString("base64");
1291
1297
  return { data: f, hash: Z(f), mimeType: s, ...l };
1292
1298
  }
1293
1299
  function J(e, a, s, l) {
1294
- const f = wi(e), h = gi(s);
1300
+ const f = bi(e), h = yi(s);
1295
1301
  return a.global.concat(a.local).reduce(
1296
- (u, o) => h(u, o, l),
1302
+ (c, o) => h(c, o, l),
1297
1303
  f
1298
1304
  );
1299
1305
  }
1300
- function ai(e, a) {
1306
+ function si(e, a) {
1301
1307
  return { ...e, name: a };
1302
1308
  }
1303
- function oi(e, a, s) {
1309
+ function li(e, a, s) {
1304
1310
  const l = Math.min(a, e.revision), f = e.operations.global.slice(
1305
1311
  0,
1306
1312
  e.revision - l
@@ -1318,7 +1324,7 @@ function oi(e, a, s) {
1318
1324
  revision: e.revision - l
1319
1325
  };
1320
1326
  }
1321
- function pi(e, a, s) {
1327
+ function ci(e, a, s) {
1322
1328
  const l = e.operations.global.length - e.revision;
1323
1329
  if (!l)
1324
1330
  throw new Error("There is no UNDO operation to REDO");
@@ -1339,9 +1345,9 @@ function pi(e, a, s) {
1339
1345
  revision: e.revision + f
1340
1346
  };
1341
1347
  }
1342
- function si(e, a, s, l) {
1348
+ function ui(e, a, s, l) {
1343
1349
  a = a || 0, s = s || e.operations.global.length;
1344
- const f = e.operations.global.slice(a, s), h = e.operations.global.slice(0, a), u = e.operations.global.slice(s), o = J(
1350
+ const f = e.operations.global.slice(a, s), h = e.operations.global.slice(0, a), c = e.operations.global.slice(s), o = J(
1345
1351
  e.initialState,
1346
1352
  {
1347
1353
  global: h.concat(f),
@@ -1355,32 +1361,32 @@ function si(e, a, s, l) {
1355
1361
  global: [
1356
1362
  ...h,
1357
1363
  lt({ name: x, state: w }, f.length),
1358
- ...u
1364
+ ...c
1359
1365
  ],
1360
1366
  local: e.operations.local
1361
1367
  },
1362
1368
  l
1363
1369
  );
1364
1370
  }
1365
- function li(e, a) {
1371
+ function fi(e, a) {
1366
1372
  return {
1367
1373
  ...e,
1368
1374
  name: a.name,
1369
1375
  state: a.state ?? { global: {}, local: {} }
1370
1376
  };
1371
1377
  }
1372
- const Wt = "SET_NAME", Y = "UNDO", K = "REDO", M = "PRUNE", Ht = "LOAD_STATE";
1373
- function ci(e, a) {
1378
+ const Yt = "SET_NAME", Y = "UNDO", K = "REDO", M = "PRUNE", Kt = "LOAD_STATE";
1379
+ function hi(e, a) {
1374
1380
  return [Y, K, M].includes(a.type) ? e.revision : e.revision + 1;
1375
1381
  }
1376
- function ui(e, a) {
1382
+ function mi(e, a) {
1377
1383
  return {
1378
1384
  ...e,
1379
- revision: ci(e, a),
1385
+ revision: hi(e, a),
1380
1386
  lastModified: (/* @__PURE__ */ new Date()).toISOString()
1381
1387
  };
1382
1388
  }
1383
- function fi(e, a) {
1389
+ function xi(e, a) {
1384
1390
  if ([Y, K, M, M].includes(a.type))
1385
1391
  return e;
1386
1392
  const s = e.operations.global.slice(
@@ -1407,43 +1413,43 @@ function fi(e, a) {
1407
1413
  }
1408
1414
  };
1409
1415
  }
1410
- function hi(e, a) {
1411
- let s = fi(e, a);
1412
- return (!a.scope || a.scope === "global") && (s = ui(s, a)), s;
1416
+ function gi(e, a) {
1417
+ let s = xi(e, a);
1418
+ return (!a.scope || a.scope === "global") && (s = mi(s, a)), s;
1413
1419
  }
1414
- function mi(e, a, s) {
1420
+ function di(e, a, s) {
1415
1421
  switch (Tt().parse(a), a.type) {
1416
- case Wt:
1417
- return ai(e, a.input);
1422
+ case Yt:
1423
+ return si(e, a.input);
1418
1424
  case Y:
1419
- return oi(e, a.input, s);
1425
+ return li(e, a.input, s);
1420
1426
  case K:
1421
- return pi(e, a.input, s);
1427
+ return ci(e, a.input, s);
1422
1428
  case M:
1423
- return si(
1429
+ return ui(
1424
1430
  e,
1425
1431
  a.input.start,
1426
1432
  a.input.end,
1427
1433
  s
1428
1434
  );
1429
- case Ht:
1430
- return li(e, a.input.state);
1435
+ case Kt:
1436
+ return fi(e, a.input.state);
1431
1437
  default:
1432
1438
  return e;
1433
1439
  }
1434
1440
  }
1435
- function xi(e, a, s, l) {
1441
+ function wi(e, a, s, l) {
1436
1442
  let f = e;
1437
- return _t(a) && (f = mi(f, a, s)), f = hi(f, a), f = bt(f, (h) => {
1438
- const u = s(h.state, a, l);
1439
- if (u)
1440
- return yr({
1443
+ return _t(a) && (f = di(f, a, s)), f = gi(f, a), f = bt(f, (h) => {
1444
+ const c = s(h.state, a, l);
1445
+ if (c)
1446
+ return Er({
1441
1447
  ...f,
1442
- state: u
1448
+ state: c
1443
1449
  });
1444
1450
  }), bt(f, (h) => {
1445
- !a.scope || a.scope === "global" ? h.operations.global[h.operations.global.length - 1].hash = Ft(h, "global") : a.scope === "local" && (h.operations.local[h.operations.local.length - 1].hash = Ft(h, "local")), !_t(a) && a.attachments && a.attachments.forEach((u) => {
1446
- const { hash: o, ...x } = u;
1451
+ !a.scope || a.scope === "global" ? h.operations.global[h.operations.global.length - 1].hash = Ft(h, "global") : a.scope === "local" && (h.operations.local[h.operations.local.length - 1].hash = Ft(h, "local")), !_t(a) && a.attachments && a.attachments.forEach((c) => {
1452
+ const { hash: o, ...x } = c;
1447
1453
  h.attachments[o] = {
1448
1454
  ...x
1449
1455
  };
@@ -1451,7 +1457,7 @@ function xi(e, a, s, l) {
1451
1457
  });
1452
1458
  }
1453
1459
  function _t(e) {
1454
- return [Wt, Y, K, M, Ht].includes(e.type);
1460
+ return [Yt, Y, K, M, Kt].includes(e.type);
1455
1461
  }
1456
1462
  function R(e, a, s, l, f = "global") {
1457
1463
  if (!e)
@@ -1459,12 +1465,18 @@ function R(e, a, s, l, f = "global") {
1459
1465
  if (typeof e != "string")
1460
1466
  throw new Error(`Invalid action type: ${e}`);
1461
1467
  const h = { type: e, input: a, scope: f };
1462
- return s && (h.attachments = s), l == null || l().parse(h), h;
1468
+ s && (h.attachments = s);
1469
+ try {
1470
+ l == null || l().parse(h.input);
1471
+ } catch (c) {
1472
+ throw new Error(`Invalid action input: ${c}`);
1473
+ }
1474
+ return h;
1463
1475
  }
1464
- function gi(e, a = xi) {
1476
+ function yi(e, a = wi) {
1465
1477
  return (s, l, f) => a(s, l, e, f);
1466
1478
  }
1467
- const di = (e, a) => ({
1479
+ const vi = (e, a) => ({
1468
1480
  name: "",
1469
1481
  documentType: "",
1470
1482
  revision: 0,
@@ -1473,8 +1485,8 @@ const di = (e, a) => ({
1473
1485
  attachments: {},
1474
1486
  ...e,
1475
1487
  state: (a == null ? void 0 : a(e == null ? void 0 : e.state)) ?? (e == null ? void 0 : e.state) ?? { global: {}, local: {} }
1476
- }), wi = (e, a) => {
1477
- const s = di(
1488
+ }), bi = (e, a) => {
1489
+ const s = vi(
1478
1490
  e,
1479
1491
  a
1480
1492
  );
@@ -1484,22 +1496,22 @@ const di = (e, a) => ({
1484
1496
  operations: { global: [], local: [] }
1485
1497
  };
1486
1498
  }, Ft = (e, a = "global") => Z(
1487
- wr(
1499
+ br(
1488
1500
  a === "local" ? e.state.local : e.state.global
1489
1501
  )
1490
- ), ji = (e, a = 1e3) => {
1502
+ ), ki = (e, a = 1e3) => {
1491
1503
  const s = Math.random() * a;
1492
1504
  return Z(`${(e ?? /* @__PURE__ */ new Date()).toISOString()}${s}`);
1493
1505
  };
1494
1506
  function $(e) {
1495
- return vr(br(e, !0));
1507
+ return _r(Fr(e, !0));
1496
1508
  }
1497
- const Zt = (e) => R(
1509
+ const Xt = (e) => R(
1498
1510
  "SET_NAME",
1499
1511
  e,
1500
1512
  void 0,
1501
1513
  at
1502
- ), Yt = (e = 1) => R("UNDO", e, void 0, ot), Kt = (e = 1) => R("REDO", e, void 0, nt), Xt = (e, a) => R(
1514
+ ), Gt = (e = 1) => R("UNDO", e, void 0, ot), Vt = (e = 1) => R("REDO", e, void 0, nt), Qt = (e, a) => R(
1503
1515
  "PRUNE",
1504
1516
  { start: e, end: a },
1505
1517
  void 0,
@@ -1509,15 +1521,15 @@ const Zt = (e) => R(
1509
1521
  { state: e, operations: a },
1510
1522
  void 0,
1511
1523
  it
1512
- ), Ui = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1524
+ ), Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1513
1525
  __proto__: null,
1514
1526
  loadState: lt,
1515
- prune: Xt,
1516
- redo: Kt,
1517
- setName: Zt,
1518
- undo: Yt
1527
+ prune: Qt,
1528
+ redo: Vt,
1529
+ setName: Xt,
1530
+ undo: Gt
1519
1531
  }, Symbol.toStringTag, { value: "Module" }));
1520
- class Ii {
1532
+ class Di {
1521
1533
  /**
1522
1534
  * Constructs a BaseDocument instance with an initial state.
1523
1535
  * @param reducer - The reducer function that updates the state.
@@ -1548,7 +1560,7 @@ class Ii {
1548
1560
  * @returns The file path where the state was saved.
1549
1561
  */
1550
1562
  saveToFile(a, s, l) {
1551
- return ii(this._document, a, s, l);
1563
+ return ai(this._document, a, s, l);
1552
1564
  }
1553
1565
  /**
1554
1566
  * Loads the state of the document from a file.
@@ -1632,21 +1644,21 @@ class Ii {
1632
1644
  * @param name - The new name of the document.
1633
1645
  */
1634
1646
  setName(a) {
1635
- return this.dispatch(Zt(a)), this;
1647
+ return this.dispatch(Xt(a)), this;
1636
1648
  }
1637
1649
  /**
1638
1650
  * Reverts a number of actions from the document.
1639
1651
  * @param count - The number of actions to revert.
1640
1652
  */
1641
1653
  undo(a) {
1642
- return this.dispatch(Yt(a)), this;
1654
+ return this.dispatch(Gt(a)), this;
1643
1655
  }
1644
1656
  /**
1645
1657
  * Reapplies a number of actions to the document.
1646
1658
  * @param count - The number of actions to reapply.
1647
1659
  */
1648
1660
  redo(a) {
1649
- return this.dispatch(Kt(a)), this;
1661
+ return this.dispatch(Vt(a)), this;
1650
1662
  }
1651
1663
  /**
1652
1664
  * Removes a range of operations from the document.
@@ -1654,7 +1666,7 @@ class Ii {
1654
1666
  * @param end - The ending index of the range to remove.
1655
1667
  */
1656
1668
  prune(a, s) {
1657
- return this.dispatch(Xt(a, s)), this;
1669
+ return this.dispatch(Qt(a, s)), this;
1658
1670
  }
1659
1671
  /**
1660
1672
  * Loads a document state and a set of operations.
@@ -1665,7 +1677,7 @@ class Ii {
1665
1677
  return this.dispatch(lt(a, s)), this;
1666
1678
  }
1667
1679
  }
1668
- function ki(e, a) {
1680
+ function Oi(e, a) {
1669
1681
  a.forEach((s) => {
1670
1682
  Object.getOwnPropertyNames(s.prototype).forEach((l) => {
1671
1683
  Object.defineProperty(
@@ -1677,24 +1689,24 @@ function ki(e, a) {
1677
1689
  });
1678
1690
  }
1679
1691
  export {
1680
- Ii as B,
1681
- di as a,
1682
- wi as b,
1683
- gi as c,
1684
- Ai as d,
1685
- ei as e,
1692
+ Di as B,
1693
+ vi as a,
1694
+ bi as b,
1695
+ yi as c,
1696
+ ji as d,
1697
+ oi as e,
1686
1698
  R as f,
1687
- ki as g,
1688
- Ui as h,
1699
+ Oi as g,
1700
+ Ti as h,
1689
1701
  _t as i,
1690
- Jt as j,
1691
- Si as k,
1702
+ Ht as j,
1703
+ Ui as k,
1692
1704
  Et as l,
1693
- Bi as m,
1705
+ Ii as m,
1694
1706
  Ft as n,
1695
- ji as o,
1696
- xi as p,
1707
+ ki as o,
1708
+ wi as p,
1697
1709
  $ as r,
1698
- ii as s,
1699
- Fi as z
1710
+ ai as s,
1711
+ Bi as z
1700
1712
  };