parse-tmx 2.4.1 → 2.5.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.
package/LICENSE CHANGED
@@ -1,201 +1,201 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2020-present Jimmy Chen
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2020-present Jimmy Chen
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,125 +1,125 @@
1
- # parse-tmx
2
-
3
- [![Apache-2.0 licensed][badge-license]][url-license]
4
- [![NPM version][badge-npm-version]][url-npm]
5
- [![NPM downloads][badge-npm-downloads]][url-npm]
6
- [![NPM Unpacked Size (with version)][badge-npm-unpacked-size]][url-npm]
7
-
8
- Inspired by [tmx-map-parser](https://github.com/praghus/tmx-map-parser).
9
- A parser for [Tiled Map Editor](http://www.mapeditor.org/) \*.tmx files.
10
-
11
- ### Table of Contents
12
-
13
- - 🚀 [Getting Started](#getting-started)
14
- - 📖 [Documentation](#documentation)
15
- - ⚖️ [License](#license)
16
-
17
- ---
18
-
19
- ## <a name="getting-started">🚀 Getting Started</a>
20
-
21
- ```bash
22
- pnpm i parse-tmx
23
- ```
24
-
25
- ## <a name="documentation">📖 Documentation</a>
26
-
27
- We highly recommend you take a look at the [documentation](https://esposter.com/docs/modules/parse_tmx.html) to level up.
28
-
29
- ### Usage
30
-
31
- The basic implementation:
32
-
33
- ```ts
34
- import { parseTmx } from "parse-tmx";
35
- // The *.tmx file can be loaded as a string or URL encoded data
36
- import map from "map.tmx";
37
-
38
- // Translates the tile flips in the layer data (default: false)
39
- const translateFlips = true;
40
-
41
- const loadMap = async () => {
42
- const data = await parseTmx(map, translateFlips);
43
- ...
44
- };
45
- ```
46
-
47
- ### Example data
48
-
49
- [TMX Map Format documentation](https://doc.mapeditor.org/en/stable/reference/tmx-map-format/)
50
-
51
- ```js
52
- {
53
- tiledversion: "1.8.0",
54
- tilewidth: 16,
55
- tileheight: 16,
56
- version: 1.8,
57
- width: 512,
58
- height: 128,
59
- infinite: 0,
60
- nextlayerid: 5,
61
- nextobjectid: 165,
62
- orientation: "orthogonal",
63
- renderorder: "right-down",
64
- properties: {
65
- property1: 'value',
66
- property2: 0.5
67
- },
68
- layers: [{
69
- id: 1,
70
- name: "layer name",
71
- type: "layer",
72
- visible: 1,
73
- data: [0, 1, 1, 10, 10, 10, 1, 1, 0, 0, 0, 0, …],
74
- // When the translateFlips parameter is enabled
75
- flips: [
76
- {H: false, V: false, D: false},
77
- {H: true, V: false, D: true},
78
- {H: false, V: false, D: false},
79
- {…}
80
- ],
81
- width: 512,
82
- height: 128,
83
- opacity: 0.77,
84
- properties: {
85
- property1: 'value',
86
- property2: false
87
- }
88
- }, {
89
- id: 2,
90
- name: "objects",
91
- type: "objectgroup",
92
- visible: 1,
93
- objects: [{…}, {…}, {…}],
94
- properties: {
95
- property1: 'value',
96
- property2: false
97
- }
98
- }, {
99
- …
100
- }],
101
- tilesets: [{
102
- columns: 32,
103
- firstgid: 1,
104
- image: {source: "tiles.png", width: 512, height: 512},
105
- name: "tiles",
106
- tilecount: 1024,
107
- tilewidth: 16,
108
- tileheight: 16,
109
- tiles: [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
110
- }, {
111
- …
112
- }]
113
- }
114
- ```
115
-
116
- ## <a name="license">⚖️ License</a>
117
-
118
- This project is licensed under the [Apache-2.0 license](https://github.com/Esposter/Esposter/blob/main/LICENSE).
119
-
120
- [badge-license]: https://img.shields.io/github/license/Esposter/Esposter.svg?color=blue
121
- [url-license]: https://github.com/Esposter/Esposter/blob/main/LICENSE
122
- [badge-npm-version]: https://img.shields.io/npm/v/parse-tmx/latest?color=brightgreen
123
- [url-npm]: https://www.npmjs.com/package/parse-tmx/v/latest
124
- [badge-npm-unpacked-size]: https://img.shields.io/npm/unpacked-size/parse-tmx/latest?label=npm
125
- [badge-npm-downloads]: https://img.shields.io/npm/dm/parse-tmx.svg
1
+ # parse-tmx
2
+
3
+ [![Apache-2.0 licensed][badge-license]][url-license]
4
+ [![NPM version][badge-npm-version]][url-npm]
5
+ [![NPM downloads][badge-npm-downloads]][url-npm]
6
+ [![NPM Unpacked Size (with version)][badge-npm-unpacked-size]][url-npm]
7
+
8
+ Inspired by [tmx-map-parser](https://github.com/praghus/tmx-map-parser).
9
+ A parser for [Tiled Map Editor](http://www.mapeditor.org/) \*.tmx files.
10
+
11
+ ### Table of Contents
12
+
13
+ - 🚀 [Getting Started](#getting-started)
14
+ - 📖 [Documentation](#documentation)
15
+ - ⚖️ [License](#license)
16
+
17
+ ---
18
+
19
+ ## <a name="getting-started">🚀 Getting Started</a>
20
+
21
+ ```bash
22
+ pnpm i parse-tmx
23
+ ```
24
+
25
+ ## <a name="documentation">📖 Documentation</a>
26
+
27
+ We highly recommend you take a look at the [documentation](https://esposter.com/docs/modules/parse_tmx.html) to level up.
28
+
29
+ ### Usage
30
+
31
+ The basic implementation:
32
+
33
+ ```ts
34
+ import { parseTmx } from "parse-tmx";
35
+ // The *.tmx file can be loaded as a string or URL encoded data
36
+ import map from "map.tmx";
37
+
38
+ // Translates the tile flips in the layer data (default: false)
39
+ const translateFlips = true;
40
+
41
+ const loadMap = async () => {
42
+ const data = await parseTmx(map, translateFlips);
43
+ ...
44
+ };
45
+ ```
46
+
47
+ ### Example data
48
+
49
+ [TMX Map Format documentation](https://doc.mapeditor.org/en/stable/reference/tmx-map-format/)
50
+
51
+ ```js
52
+ {
53
+ tiledversion: "1.8.0",
54
+ tilewidth: 16,
55
+ tileheight: 16,
56
+ version: 1.8,
57
+ width: 512,
58
+ height: 128,
59
+ infinite: 0,
60
+ nextlayerid: 5,
61
+ nextobjectid: 165,
62
+ orientation: "orthogonal",
63
+ renderorder: "right-down",
64
+ properties: {
65
+ property1: 'value',
66
+ property2: 0.5
67
+ },
68
+ layers: [{
69
+ id: 1,
70
+ name: "layer name",
71
+ type: "layer",
72
+ visible: 1,
73
+ data: [0, 1, 1, 10, 10, 10, 1, 1, 0, 0, 0, 0, …],
74
+ // When the translateFlips parameter is enabled
75
+ flips: [
76
+ {H: false, V: false, D: false},
77
+ {H: true, V: false, D: true},
78
+ {H: false, V: false, D: false},
79
+ {…}
80
+ ],
81
+ width: 512,
82
+ height: 128,
83
+ opacity: 0.77,
84
+ properties: {
85
+ property1: 'value',
86
+ property2: false
87
+ }
88
+ }, {
89
+ id: 2,
90
+ name: "objects",
91
+ type: "objectgroup",
92
+ visible: 1,
93
+ objects: [{…}, {…}, {…}],
94
+ properties: {
95
+ property1: 'value',
96
+ property2: false
97
+ }
98
+ }, {
99
+ …
100
+ }],
101
+ tilesets: [{
102
+ columns: 32,
103
+ firstgid: 1,
104
+ image: {source: "tiles.png", width: 512, height: 512},
105
+ name: "tiles",
106
+ tilecount: 1024,
107
+ tilewidth: 16,
108
+ tileheight: 16,
109
+ tiles: [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
110
+ }, {
111
+ …
112
+ }]
113
+ }
114
+ ```
115
+
116
+ ## <a name="license">⚖️ License</a>
117
+
118
+ This project is licensed under the [Apache-2.0 license](https://github.com/Esposter/Esposter/blob/main/LICENSE).
119
+
120
+ [badge-license]: https://img.shields.io/github/license/Esposter/Esposter.svg?color=blue
121
+ [url-license]: https://github.com/Esposter/Esposter/blob/main/LICENSE
122
+ [badge-npm-version]: https://img.shields.io/npm/v/parse-tmx/latest?color=brightgreen
123
+ [url-npm]: https://www.npmjs.com/package/parse-tmx/v/latest
124
+ [badge-npm-unpacked-size]: https://img.shields.io/npm/unpacked-size/parse-tmx/latest?label=npm
125
+ [badge-npm-downloads]: https://img.shields.io/npm/dm/parse-tmx.svg
package/dist/index.d.ts CHANGED
@@ -222,7 +222,7 @@ type TMXNode<T, TChildNode extends BaseTMXNode<unknown> | undefined = undefined>
222
222
  //#endregion
223
223
  //#region src/models/tmx/node/TMXDataNode.d.ts
224
224
  interface TMXDataNode extends TMXNode<{
225
- compression?: Compression | null;
225
+ compression?: Compression;
226
226
  encoding: Encoding;
227
227
  }> {
228
228
  _: string;
package/dist/index.js CHANGED
@@ -265,13 +265,15 @@ const parseTileLayer = async (node, expectedCount, translateFlips) => {
265
265
  const decompress = compression === Compression.Gzip ? gunzip : inflate;
266
266
  layer.data = await new Promise((resolve, reject) => {
267
267
  decompress(buffer, (err, buf) => {
268
- if (err) reject(err);
268
+ if (err) {
269
+ reject(err);
270
+ return;
271
+ }
269
272
  resolve(unpackTileBytes(buf, expectedCount));
270
273
  });
271
274
  });
272
275
  }
273
276
  break;
274
- case null:
275
277
  case void 0:
276
278
  layer.data = unpackTileBytes(buffer, expectedCount);
277
279
  break;
@@ -1546,7 +1548,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
1546
1548
  throw new TypeError(t$1 ? "Object is not iterable." : "Symbol.iterator is not defined.");
1547
1549
  };
1548
1550
  Object.defineProperty(t, "__esModule", { value: !0 });
1549
- var i$1 = r(6), o = r(17), a = r(3), s = r(72), u = new Map();
1551
+ var i$1 = r(6), o = r(17), a = r(3), s = r(72), u = /* @__PURE__ */ new Map();
1550
1552
  function l(e$1, t$1) {
1551
1553
  if (t$1 !== e$1._root && o.tree_isAncestorOf(e$1._reference, t$1, !0)) {
1552
1554
  if (e$1._pointerBeforeReference) for (;;) {
@@ -1599,7 +1601,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
1599
1601
  }, t.dom_hasSupportedTokens = function(e$1) {
1600
1602
  return u.has(e$1);
1601
1603
  }, t.dom_getSupportedTokens = function(e$1) {
1602
- return u.get(e$1) || new Set();
1604
+ return u.get(e$1) || /* @__PURE__ */ new Set();
1603
1605
  }, t.dom_runEventConstructingSteps = function(e$1) {}, t.dom_runChildTextContentChangeSteps = function(e$1) {};
1604
1606
  },
1605
1607
  function(e, t, r) {
@@ -3055,7 +3057,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
3055
3057
  }
3056
3058
  }
3057
3059
  function f(e$1, t$1, r$1, o$1, a$1, s$1, c$1, p$1$1, f$1) {
3058
- for (var d, m, y = new Map(), v = l.tree_getFirstAncestorNode(t$1, !0); null !== v;) {
3060
+ for (var d, m, y = /* @__PURE__ */ new Map(), v = l.tree_getFirstAncestorNode(t$1, !0); null !== v;) {
3059
3061
  for (var _ = 0; _ < v._registeredObserverList.length; _++) {
3060
3062
  var g = v._registeredObserverList[_], b = g.options;
3061
3063
  if ((v === t$1 || b.subtree) && ("attributes" !== e$1 || b.attributes) && ("attributes" !== e$1 || !b.attributeFilter || b.attributeFilter.indexOf(r$1 || "") && null === o$1) && ("characterData" !== e$1 || b.characterData) && ("childList" !== e$1 || b.childList)) {
@@ -3196,7 +3198,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
3196
3198
  function(e, t, r) {
3197
3199
  "use strict";
3198
3200
  function n(e$1, t$1) {
3199
- Error.call(this), this.name = "YAMLException", this.reason = e$1, this.mark = t$1, this.message = (this.reason || "(unknown reason)") + (this.mark ? " " + this.mark.toString() : ""), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
3201
+ Error.call(this), this.name = "YAMLException", this.reason = e$1, this.mark = t$1, this.message = (this.reason || "(unknown reason)") + (this.mark ? " " + this.mark.toString() : ""), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ new Error()).stack || "";
3200
3202
  }
3201
3203
  n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n.prototype.toString = function(e$1) {
3202
3204
  var t$1 = this.name + ": ";
@@ -4426,7 +4428,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
4426
4428
  var a = r(6), s = r(1), u = r(3), l = r(171), c = r(104), h = r(9), p$3 = r(17), f = r(72), d = r(30);
4427
4429
  function m(e$1, t$1) {
4428
4430
  void 0 === t$1 && (t$1 = void 0), void 0 === t$1 && (t$1 = null);
4429
- var r$1 = y(e$1, t$1, new Date(), {});
4431
+ var r$1 = y(e$1, t$1, /* @__PURE__ */ new Date(), {});
4430
4432
  return r$1._isTrusted = !0, r$1;
4431
4433
  }
4432
4434
  function y(e$1, t$1, r$1, n$1) {
@@ -4606,7 +4608,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
4606
4608
  }
4607
4609
  if (null === t$1) throw new h.NotSupportedError("Event constructor not found for interface " + e$1 + ".");
4608
4610
  var r$1 = new t$1("");
4609
- return r$1._type = "", r$1._timeStamp = new Date().getTime(), r$1._isTrusted = !1, r$1._initializedFlag = !1, r$1;
4611
+ return r$1._type = "", r$1._timeStamp = (/* @__PURE__ */ new Date()).getTime(), r$1._isTrusted = !1, r$1._initializedFlag = !1, r$1;
4610
4612
  }, t.event_getterEventHandlerIDLAttribute = function(e$1, t$1) {
4611
4613
  return null;
4612
4614
  }, t.event_setterEventHandlerIDLAttribute = function(e$1, t$1, r$1) {}, t.event_determineTheTargetOfAnEventHandler = x, t.event_getTheCurrentValueOfAnEventHandler = w, t.event_activateAnEventHandler = E, t.event_deactivateAnEventHandler = D;
@@ -4655,7 +4657,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
4655
4657
  var s = r(6), u = r(1), l = r(9), c = r(34), h = r(3), p$3 = r(2), f = r(7), d = r(152), m = r(0), y = r(12), v = function(e$1) {
4656
4658
  function t$1() {
4657
4659
  var t$2 = e$1.call(this) || this;
4658
- return t$2._children = new Set(), t$2._encoding = {
4660
+ return t$2._children = /* @__PURE__ */ new Set(), t$2._encoding = {
4659
4661
  name: "UTF-8",
4660
4662
  labels: [
4661
4663
  "unicode-1-1-utf-8",
@@ -4906,7 +4908,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
4906
4908
  var s = r(1), u = r(34), l = r(9), c = r(7), h = r(0), p$3 = r(12), f = function(e$1) {
4907
4909
  function t$1() {
4908
4910
  var t$2 = e$1.call(this) || this;
4909
- return t$2._children = new Set(), t$2._namespace = null, t$2._namespacePrefix = null, t$2._localName = "", t$2._customElementState = "undefined", t$2._customElementDefinition = null, t$2._is = null, t$2._shadowRoot = null, t$2._attributeList = h.create_namedNodeMap(t$2), t$2._attributeChangeSteps = [], t$2._name = "", t$2._assignedSlot = null, t$2;
4911
+ return t$2._children = /* @__PURE__ */ new Set(), t$2._namespace = null, t$2._namespacePrefix = null, t$2._localName = "", t$2._customElementState = "undefined", t$2._customElementDefinition = null, t$2._is = null, t$2._shadowRoot = null, t$2._attributeList = h.create_namedNodeMap(t$2), t$2._attributeChangeSteps = [], t$2._name = "", t$2._assignedSlot = null, t$2;
4910
4912
  }
4911
4913
  return i$1(t$1, e$1), Object.defineProperty(t$1.prototype, "namespaceURI", {
4912
4914
  get: function() {
@@ -5189,7 +5191,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
5189
5191
  function t$1(t$2) {
5190
5192
  void 0 === t$2 && (t$2 = null);
5191
5193
  var r$1 = e$1.call(this) || this;
5192
- return r$1._children = new Set(), r$1._host = t$2, r$1;
5194
+ return r$1._children = /* @__PURE__ */ new Set(), r$1._host = t$2, r$1;
5193
5195
  }
5194
5196
  return i$1(t$1, e$1), t$1.prototype.getElementById = function(e$2) {
5195
5197
  throw new Error("Mixin: NonElementParentNode not implemented.");
@@ -5403,7 +5405,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
5403
5405
  Object.defineProperty(t, "__esModule", { value: !0 });
5404
5406
  var n = r(1), i$1 = r(0), o = r(12), a = function() {
5405
5407
  function e$1(e$2, t$1) {
5406
- this._target = null, this._relatedTarget = null, this._touchTargetList = [], this._path = [], this._currentTarget = null, this._eventPhase = n.EventPhase.None, this._stopPropagationFlag = !1, this._stopImmediatePropagationFlag = !1, this._canceledFlag = !1, this._inPassiveListenerFlag = !1, this._composedFlag = !1, this._initializedFlag = !1, this._dispatchFlag = !1, this._isTrusted = !1, this._bubbles = !1, this._cancelable = !1, this._type = e$2, t$1 && (this._bubbles = t$1.bubbles || !1, this._cancelable = t$1.cancelable || !1, this._composedFlag = t$1.composed || !1), this._initializedFlag = !0, this._timeStamp = new Date().getTime();
5408
+ this._target = null, this._relatedTarget = null, this._touchTargetList = [], this._path = [], this._currentTarget = null, this._eventPhase = n.EventPhase.None, this._stopPropagationFlag = !1, this._stopImmediatePropagationFlag = !1, this._canceledFlag = !1, this._inPassiveListenerFlag = !1, this._composedFlag = !1, this._initializedFlag = !1, this._dispatchFlag = !1, this._isTrusted = !1, this._bubbles = !1, this._cancelable = !1, this._type = e$2, t$1 && (this._bubbles = t$1.bubbles || !1, this._cancelable = t$1.cancelable || !1, this._composedFlag = t$1.composed || !1), this._initializedFlag = !0, this._timeStamp = (/* @__PURE__ */ new Date()).getTime();
5407
5409
  }
5408
5410
  return Object.defineProperty(e$1.prototype, "type", {
5409
5411
  get: function() {
@@ -7033,7 +7035,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
7033
7035
  var o = r(70), a = r(2), s = r(0), u = function(e$1) {
7034
7036
  function t$1() {
7035
7037
  var t$2 = e$1.call(this) || this;
7036
- return t$2._signalSlots = new Set(), t$2._mutationObserverMicrotaskQueued = !1, t$2._mutationObservers = new Set(), t$2._iteratorList = new a.FixedSizeSet(), t$2._associatedDocument = s.create_document(), t$2;
7038
+ return t$2._signalSlots = /* @__PURE__ */ new Set(), t$2._mutationObserverMicrotaskQueued = !1, t$2._mutationObservers = /* @__PURE__ */ new Set(), t$2._iteratorList = new a.FixedSizeSet(), t$2._associatedDocument = s.create_document(), t$2;
7037
7039
  }
7038
7040
  return i$1(t$1, e$1), Object.defineProperty(t$1.prototype, "document", {
7039
7041
  get: function() {
@@ -7843,7 +7845,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
7843
7845
  var o = r(70), a = r(0), s = function(e$1) {
7844
7846
  function t$1() {
7845
7847
  var t$2 = e$1.call(this) || this;
7846
- return t$2._abortedFlag = !1, t$2._abortAlgorithms = new Set(), t$2;
7848
+ return t$2._abortedFlag = !1, t$2._abortAlgorithms = /* @__PURE__ */ new Set(), t$2;
7847
7849
  }
7848
7850
  return i$1(t$1, e$1), Object.defineProperty(t$1.prototype, "aborted", {
7849
7851
  get: function() {
@@ -8880,7 +8882,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
8880
8882
  Object.defineProperty(t, "__esModule", { value: !0 });
8881
8883
  var i$1 = r(6), o = r(9), a = r(7), s = r(0), u = function() {
8882
8884
  function e$1(e$2, t$1) {
8883
- this._element = e$2, this._attribute = t$1, this._tokenSet = new Set();
8885
+ this._element = e$2, this._attribute = t$1, this._tokenSet = /* @__PURE__ */ new Set();
8884
8886
  var r$1 = t$1._localName, n$1 = s.element_getAnAttributeValue(e$2, r$1), o$1 = this;
8885
8887
  this._element._attributeChangeSteps.push(function(e$3, t$2, r$2, n$2, i$2) {
8886
8888
  t$2 === o$1._attribute._localName && null === i$2 && (n$2 ? o$1._tokenSet = s.orderedSet_parse(n$2) : o$1._tokenSet.clear());
@@ -9594,7 +9596,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
9594
9596
  col: this._index - i$2,
9595
9597
  index: this._index,
9596
9598
  str: this._str.substring(i$2, o$1)
9597
- }, new Error(e$2 + "\nIndex: " + this.err.index + "\nLn: " + this.err.line + ", Col: " + this.err.col + "\nInput: " + this.err.str);
9599
+ }, /* @__PURE__ */ new Error(e$2 + "\nIndex: " + this.err.index + "\nLn: " + this.err.line + ", Col: " + this.err.col + "\nInput: " + this.err.str);
9598
9600
  }, e$1.prototype[Symbol.iterator] = function() {
9599
9601
  return this._index = 0, { next: function() {
9600
9602
  var e$2 = this.nextToken();
@@ -10472,7 +10474,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
10472
10474
  Object.defineProperty(t, "__esModule", { value: !0 });
10473
10475
  var o = function() {
10474
10476
  function e$1(e$2) {
10475
- void 0 === e$2 && (e$2 = 1e3), this._items = new Set(), this._limit = e$2;
10477
+ void 0 === e$2 && (e$2 = 1e3), this._items = /* @__PURE__ */ new Set(), this._limit = e$2;
10476
10478
  }
10477
10479
  return e$1.prototype.add = function(e$2) {
10478
10480
  if (this._items.add(e$2), this._items.size > this._limit) {
@@ -10623,7 +10625,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
10623
10625
  Object.defineProperty(t, "__esModule", { value: !0 });
10624
10626
  var o = function() {
10625
10627
  function e$1(e$2) {
10626
- void 0 === e$2 && (e$2 = 1e3), this._items = new Map(), this._limit = e$2;
10628
+ void 0 === e$2 && (e$2 = 1e3), this._items = /* @__PURE__ */ new Map(), this._limit = e$2;
10627
10629
  }
10628
10630
  return e$1.prototype.get = function(e$2) {
10629
10631
  return this._items.get(e$2);
@@ -10691,7 +10693,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
10691
10693
  Object.defineProperty(t, "__esModule", { value: !0 });
10692
10694
  var n = function() {
10693
10695
  function e$1(e$2) {
10694
- void 0 === e$2 && (e$2 = 1e3), this._items = new Map(), this._limit = e$2;
10696
+ void 0 === e$2 && (e$2 = 1e3), this._items = /* @__PURE__ */ new Map(), this._limit = e$2;
10695
10697
  }
10696
10698
  return e$1.prototype.check = function(e$2, t$1) {
10697
10699
  if (this._items.get(e$2) === t$1) return !0;
@@ -10821,7 +10823,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
10821
10823
  return e$2;
10822
10824
  }
10823
10825
  if (o.isObject(e$2)) {
10824
- var r$1 = new Map();
10826
+ var r$1 = /* @__PURE__ */ new Map();
10825
10827
  for (var n$1 in e$2) r$1.set(n$1, this._convertObject(e$2[n$1]));
10826
10828
  return r$1;
10827
10829
  }
@@ -11084,7 +11086,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
11084
11086
  return a;
11085
11087
  }
11086
11088
  if (i$1.isObject(e$1)) {
11087
- a = new Map();
11089
+ a = /* @__PURE__ */ new Map();
11088
11090
  for (var c in e$1) if (e$1.hasOwnProperty(c)) {
11089
11091
  var h = e$1[c];
11090
11092
  a.set(c, o(h));
@@ -11695,7 +11697,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
11695
11697
  var r$1 = new Set(e$1);
11696
11698
  e$1.clear(), e$1.add(t$1), r$1.forEach(e$1.add, e$1);
11697
11699
  }, t.replace = function(e$1, t$1, r$1) {
11698
- var n$1, o$1, a$1 = new Set();
11700
+ var n$1, o$1, a$1 = /* @__PURE__ */ new Set();
11699
11701
  try {
11700
11702
  for (var u$1 = i$1(e$1), l = u$1.next(); !l.done; l = u$1.next()) {
11701
11703
  var c = l.value;
@@ -11712,7 +11714,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
11712
11714
  }
11713
11715
  e$1.clear(), a$1.forEach(e$1.add, e$1);
11714
11716
  }, t.insert = function(e$1, t$1, r$1) {
11715
- var n$1, o$1, a$1 = new Set(), s$1 = 0;
11717
+ var n$1, o$1, a$1 = /* @__PURE__ */ new Set(), s$1 = 0;
11716
11718
  try {
11717
11719
  for (var u$1 = i$1(e$1), l = u$1.next(); !l.done; l = u$1.next()) {
11718
11720
  var c = l.value;
@@ -11844,7 +11846,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
11844
11846
  }, t.isSubsetOf = u, t.isSupersetOf = function(e$1, t$1) {
11845
11847
  return u(t$1, e$1);
11846
11848
  }, t.intersection = function(e$1, t$1) {
11847
- var r$1, n$1, o$1 = new Set();
11849
+ var r$1, n$1, o$1 = /* @__PURE__ */ new Set();
11848
11850
  try {
11849
11851
  for (var a$1 = i$1(e$1), s$1 = a$1.next(); !s$1.done; s$1 = a$1.next()) {
11850
11852
  var u$1 = s$1.value;
@@ -11864,7 +11866,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
11864
11866
  var r$1 = new Set(e$1);
11865
11867
  return t$1.forEach(r$1.add, r$1), r$1;
11866
11868
  }, t.range = function(e$1, t$1) {
11867
- for (var r$1 = new Set(), n$1 = e$1; n$1 <= t$1; n$1++) r$1.add(n$1);
11869
+ for (var r$1 = /* @__PURE__ */ new Set(), n$1 = e$1; n$1 <= t$1; n$1++) r$1.add(n$1);
11868
11870
  return r$1;
11869
11871
  };
11870
11872
  },
@@ -14799,7 +14801,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
14799
14801
  },
14800
14802
  function(e, t, r) {
14801
14803
  "use strict";
14802
- var n = r(38), i$1 = r(10), o = new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
14804
+ var n = r(38), i$1 = r(10), o = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
14803
14805
  var a = /^[-+]?[0-9]+e/;
14804
14806
  e.exports = new i$1("tag:yaml.org,2002:float", {
14805
14807
  kind: "scalar",
@@ -14842,7 +14844,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
14842
14844
  },
14843
14845
  function(e, t, r) {
14844
14846
  "use strict";
14845
- var n = r(10), i$1 = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), o = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
14847
+ var n = r(10), i$1 = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), o = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
14846
14848
  e.exports = new n("tag:yaml.org,2002:timestamp", {
14847
14849
  kind: "scalar",
14848
14850
  resolve: function(e$1) {
@@ -18538,15 +18540,15 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18538
18540
  }
18539
18541
  return this;
18540
18542
  }
18541
- if (this._serializeOpenTag(!0), !this._fragment && this._hasDocumentElement && 0 === this._writer.level) return this.emit("error", new Error("Document cannot have multiple document element nodes.")), this;
18543
+ if (this._serializeOpenTag(!0), !this._fragment && this._hasDocumentElement && 0 === this._writer.level) return this.emit("error", /* @__PURE__ */ new Error("Document cannot have multiple document element nodes.")), this;
18542
18544
  try {
18543
18545
  this._currentElement = l.fragment(this._builderOptions).ele(e$2, t$2, r$1);
18544
18546
  } catch (e$3) {
18545
18547
  return this.emit("error", e$3), this;
18546
18548
  }
18547
- return this._fragment || this._hasDocumentElement || "" === this._docTypeName || this._currentElement.node._qualifiedName === this._docTypeName ? (this._currentElementSerialized = !1, this._fragment || (this._hasDocumentElement = !0), this) : (this.emit("error", new Error("Document element name does not match DocType declaration name.")), this);
18549
+ return this._fragment || this._hasDocumentElement || "" === this._docTypeName || this._currentElement.node._qualifiedName === this._docTypeName ? (this._currentElementSerialized = !1, this._fragment || (this._hasDocumentElement = !0), this) : (this.emit("error", /* @__PURE__ */ new Error("Document element name does not match DocType declaration name.")), this);
18548
18550
  }, t$1.prototype.att = function(e$2, t$2, r$1) {
18549
- if (void 0 === this._currentElement) return this.emit("error", new Error("Cannot insert an attribute node as child of a document node.")), this;
18551
+ if (void 0 === this._currentElement) return this.emit("error", /* @__PURE__ */ new Error("Cannot insert an attribute node as child of a document node.")), this;
18550
18552
  try {
18551
18553
  this._currentElement.att(e$2, t$2, r$1);
18552
18554
  } catch (e$3) {
@@ -18561,9 +18563,9 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18561
18563
  } catch (e$3) {
18562
18564
  return this.emit("error", e$3), this;
18563
18565
  }
18564
- return !this._options.wellFormed || c.xml_isLegalChar(t$2.data) && -1 === t$2.data.indexOf("--") && !t$2.data.endsWith("-") ? (this._push(this._writer.comment(t$2.data)), this) : (this.emit("error", new Error("Comment data contains invalid characters (well-formed required).")), this);
18566
+ return !this._options.wellFormed || c.xml_isLegalChar(t$2.data) && -1 === t$2.data.indexOf("--") && !t$2.data.endsWith("-") ? (this._push(this._writer.comment(t$2.data)), this) : (this.emit("error", /* @__PURE__ */ new Error("Comment data contains invalid characters (well-formed required).")), this);
18565
18567
  }, t$1.prototype.txt = function(e$2) {
18566
- if (!this._fragment && void 0 === this._currentElement) return this.emit("error", new Error("Cannot insert a text node as child of a document node.")), this;
18568
+ if (!this._fragment && void 0 === this._currentElement) return this.emit("error", /* @__PURE__ */ new Error("Cannot insert a text node as child of a document node.")), this;
18567
18569
  var t$2;
18568
18570
  this._serializeOpenTag(!0);
18569
18571
  try {
@@ -18571,7 +18573,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18571
18573
  } catch (e$3) {
18572
18574
  return this.emit("error", e$3), this;
18573
18575
  }
18574
- if (this._options.wellFormed && !c.xml_isLegalChar(t$2.data)) return this.emit("error", new Error("Text data contains invalid characters (well-formed required).")), this;
18576
+ if (this._options.wellFormed && !c.xml_isLegalChar(t$2.data)) return this.emit("error", /* @__PURE__ */ new Error("Text data contains invalid characters (well-formed required).")), this;
18575
18577
  var r$1 = t$2.data.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
18576
18578
  return this._push(this._writer.text(r$1)), this;
18577
18579
  }, t$1.prototype.ins = function(e$2, t$2) {
@@ -18582,7 +18584,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18582
18584
  } catch (e$3) {
18583
18585
  return this.emit("error", e$3), this;
18584
18586
  }
18585
- return this._options.wellFormed && (-1 !== r$1.target.indexOf(":") || /^xml$/i.test(r$1.target)) ? (this.emit("error", new Error("Processing instruction target contains invalid characters (well-formed required).")), this) : this._options.wellFormed && !c.xml_isLegalChar(r$1.data) ? (this.emit("error", Error("Processing instruction data contains invalid characters (well-formed required).")), this) : (this._push(this._writer.instruction(r$1.target, r$1.data)), this);
18587
+ return this._options.wellFormed && (-1 !== r$1.target.indexOf(":") || /^xml$/i.test(r$1.target)) ? (this.emit("error", /* @__PURE__ */ new Error("Processing instruction target contains invalid characters (well-formed required).")), this) : this._options.wellFormed && !c.xml_isLegalChar(r$1.data) ? (this.emit("error", Error("Processing instruction data contains invalid characters (well-formed required).")), this) : (this._push(this._writer.instruction(r$1.target, r$1.data)), this);
18586
18588
  }, t$1.prototype.dat = function(e$2) {
18587
18589
  var t$2;
18588
18590
  this._serializeOpenTag(!0);
@@ -18596,15 +18598,15 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18596
18598
  return void 0 === e$2 && (e$2 = { version: "1.0" }), this._fragment ? (this.emit("error", Error("Cannot insert an XML declaration into a document fragment.")), this) : this._hasDeclaration ? (this.emit("error", Error("XML declaration is already inserted.")), this) : (this._push(this._writer.declaration(e$2.version || "1.0", e$2.encoding, e$2.standalone)), this._hasDeclaration = !0, this);
18597
18599
  }, t$1.prototype.dtd = function(e$2) {
18598
18600
  if (this._fragment) return this.emit("error", Error("Cannot insert a DocType declaration into a document fragment.")), this;
18599
- if ("" !== this._docTypeName) return this.emit("error", new Error("DocType declaration is already inserted.")), this;
18600
- if (this._hasDocumentElement) return this.emit("error", new Error("Cannot insert DocType declaration after document element.")), this;
18601
+ if ("" !== this._docTypeName) return this.emit("error", /* @__PURE__ */ new Error("DocType declaration is already inserted.")), this;
18602
+ if (this._hasDocumentElement) return this.emit("error", /* @__PURE__ */ new Error("Cannot insert DocType declaration after document element.")), this;
18601
18603
  var t$2;
18602
18604
  try {
18603
18605
  t$2 = l.create().dtd(e$2).first().node;
18604
18606
  } catch (e$3) {
18605
18607
  return this.emit("error", e$3), this;
18606
18608
  }
18607
- return this._options.wellFormed && !c.xml_isPubidChar(t$2.publicId) ? (this.emit("error", new Error("DocType public identifier does not match PubidChar construct (well-formed required).")), this) : this._options.wellFormed && (!c.xml_isLegalChar(t$2.systemId) || -1 !== t$2.systemId.indexOf("\"") && -1 !== t$2.systemId.indexOf("'")) ? (this.emit("error", new Error("DocType system identifier contains invalid characters (well-formed required).")), this) : (this._docTypeName = e$2.name, this._push(this._writer.docType(e$2.name, t$2.publicId, t$2.systemId)), this);
18609
+ return this._options.wellFormed && !c.xml_isPubidChar(t$2.publicId) ? (this.emit("error", /* @__PURE__ */ new Error("DocType public identifier does not match PubidChar construct (well-formed required).")), this) : this._options.wellFormed && (!c.xml_isLegalChar(t$2.systemId) || -1 !== t$2.systemId.indexOf("\"") && -1 !== t$2.systemId.indexOf("'")) ? (this.emit("error", /* @__PURE__ */ new Error("DocType system identifier contains invalid characters (well-formed required).")), this) : (this._docTypeName = e$2.name, this._push(this._writer.docType(e$2.name, t$2.publicId, t$2.systemId)), this);
18608
18610
  }, t$1.prototype.import = function(e$2) {
18609
18611
  var t$2, r$1, n$1 = l.fragment().set(this._options);
18610
18612
  try {
@@ -18641,7 +18643,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18641
18643
  else {
18642
18644
  var p$1$1 = r$1.prefix, f$1 = null;
18643
18645
  if (null === p$1$1 && l$1 === s$1 || (f$1 = o$1.get(p$1$1, l$1)), "xmlns" === p$1$1) {
18644
- if (this._options.wellFormed) return void this.emit("error", new Error("An element cannot have the 'xmlns' prefix (well-formed required)."));
18646
+ if (this._options.wellFormed) return void this.emit("error", /* @__PURE__ */ new Error("An element cannot have the 'xmlns' prefix (well-formed required)."));
18645
18647
  f$1 = p$1$1;
18646
18648
  }
18647
18649
  null !== f$1 ? (n$1 = f$1 + ":" + r$1.localName, null !== s$1 && s$1 !== h.namespace.XML && (u$1 = s$1 || null), this._writer.beginElement(n$1), this._push(this._writer.openTagBegin(n$1))) : null !== p$1$1 ? (p$1$1 in a$1 && (p$1$1 = this._generatePrefix(l$1, o$1, this._prefixIndex)), o$1.set(p$1$1, l$1), n$1 += p$1$1 + ":" + r$1.localName, this._writer.beginElement(n$1), this._push(this._writer.openTagBegin(n$1)), this._push(this._writer.attribute("xmlns:" + p$1$1, this._serializeAttributeValue(l$1, this._options.wellFormed))), null !== s$1 && (u$1 = s$1 || null)) : null === s$1 || null !== s$1 && s$1 !== l$1 ? (i$2 = !0, n$1 += r$1.localName, u$1 = l$1, this._writer.beginElement(n$1), this._push(this._writer.openTagBegin(n$1)), this._push(this._writer.attribute("xmlns", this._serializeAttributeValue(l$1, this._options.wellFormed)))) : (n$1 += r$1.localName, u$1 = l$1, this._writer.beginElement(n$1), this._push(this._writer.openTagBegin(n$1)));
@@ -18654,7 +18656,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18654
18656
  this._prefixMap,
18655
18657
  e$2
18656
18658
  ]), this._isPrefixMapModified(this._prefixMap, o$1) && (this._prefixMap = o$1), this._writer.level++;
18657
- } else this.emit("error", new Error("Node local name contains invalid characters (well-formed required)."));
18659
+ } else this.emit("error", /* @__PURE__ */ new Error("Node local name contains invalid characters (well-formed required)."));
18658
18660
  }
18659
18661
  }, t$1.prototype._serializeCloseTag = function() {
18660
18662
  this._writer.level--;
@@ -18662,9 +18664,9 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18662
18664
  if (void 0 !== e$2) {
18663
18665
  var t$2 = a(e$2, 4), r$1 = t$2[0], n$1 = (t$2[1], t$2[2]), i$2 = t$2[3];
18664
18666
  this._prefixMap = n$1, i$2 && (this._push(this._writer.closeTag(r$1)), this._writer.endElement(r$1));
18665
- } else this.emit("error", new Error("Last element is undefined."));
18667
+ } else this.emit("error", /* @__PURE__ */ new Error("Last element is undefined."));
18666
18668
  }, t$1.prototype._push = function(e$2) {
18667
- null === e$2 ? (this._ended = !0, this.emit("end")) : this._ended ? this.emit("error", new Error("Cannot push to ended stream.")) : 0 !== e$2.length && (this._writer.hasData = !0, this.emit("data", e$2, this._writer.level));
18669
+ null === e$2 ? (this._ended = !0, this.emit("end")) : this._ended ? this.emit("error", /* @__PURE__ */ new Error("Cannot push to ended stream.")) : 0 !== e$2.length && (this._writer.hasData = !0, this.emit("data", e$2, this._writer.level));
18668
18670
  }, t$1.prototype._fromNode = function(e$2) {
18669
18671
  var t$2, r$1, n$1, i$2;
18670
18672
  if (d.Guard.isElementNode(e$2)) {
@@ -18706,16 +18708,16 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18706
18708
  for (var p$1$1 = o(e$2.attributes), d$1 = p$1$1.next(); !d$1.done; d$1 = p$1$1.next()) {
18707
18709
  var m$1 = d$1.value;
18708
18710
  if (a$1 || i$2 || null !== m$1.namespaceURI) {
18709
- if (a$1 && l$1 && l$1.has(m$1.namespaceURI, m$1.localName)) return void this.emit("error", new Error("Element contains duplicate attributes (well-formed required)."));
18711
+ if (a$1 && l$1 && l$1.has(m$1.namespaceURI, m$1.localName)) return void this.emit("error", /* @__PURE__ */ new Error("Element contains duplicate attributes (well-formed required)."));
18710
18712
  a$1 && l$1 && l$1.set(m$1.namespaceURI, m$1.localName);
18711
18713
  var y$1 = m$1.namespaceURI, v$1 = null;
18712
18714
  if (null !== y$1) if (v$1 = t$2.get(m$1.prefix, y$1), y$1 === h.namespace.XMLNS) {
18713
18715
  if (m$1.value === h.namespace.XML || null === m$1.prefix && i$2 || null !== m$1.prefix && (!(m$1.localName in n$1) || n$1[m$1.localName] !== m$1.value) && t$2.has(m$1.localName, m$1.value)) continue;
18714
- if (a$1 && m$1.value === h.namespace.XMLNS) return void this.emit("error", new Error("XMLNS namespace is reserved (well-formed required)."));
18715
- if (a$1 && "" === m$1.value) return void this.emit("error", new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."));
18716
+ if (a$1 && m$1.value === h.namespace.XMLNS) return void this.emit("error", /* @__PURE__ */ new Error("XMLNS namespace is reserved (well-formed required)."));
18717
+ if (a$1 && "" === m$1.value) return void this.emit("error", /* @__PURE__ */ new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."));
18716
18718
  "xmlns" === m$1.prefix && (v$1 = "xmlns");
18717
18719
  } else null === v$1 && (v$1 = null === m$1.prefix || t$2.hasPrefix(m$1.prefix) && !t$2.has(m$1.prefix, y$1) ? this._generatePrefix(y$1, t$2, r$1) : m$1.prefix, this._push(this._writer.attribute("xmlns:" + v$1, this._serializeAttributeValue(y$1, this._options.wellFormed))));
18718
- if (a$1 && (-1 !== m$1.localName.indexOf(":") || !c.xml_isName(m$1.localName) || "xmlns" === m$1.localName && null === y$1)) return void this.emit("error", new Error("Attribute local name contains invalid characters (well-formed required)."));
18720
+ if (a$1 && (-1 !== m$1.localName.indexOf(":") || !c.xml_isName(m$1.localName) || "xmlns" === m$1.localName && null === y$1)) return void this.emit("error", /* @__PURE__ */ new Error("Attribute local name contains invalid characters (well-formed required)."));
18719
18721
  this._push(this._writer.attribute((null !== v$1 ? v$1 + ":" : "") + m$1.localName, this._serializeAttributeValue(m$1.value, this._options.wellFormed)));
18720
18722
  } else this._push(this._writer.attribute(m$1.localName, this._serializeAttributeValue(m$1.value, this._options.wellFormed)));
18721
18723
  }
@@ -18729,7 +18731,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
18729
18731
  }
18730
18732
  }
18731
18733
  }, t$1.prototype._serializeAttributeValue = function(e$2, t$2) {
18732
- return t$2 && null !== e$2 && !c.xml_isLegalChar(e$2) ? (this.emit("error", new Error("Invalid characters in attribute value.")), "") : null === e$2 ? "" : e$2.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
18734
+ return t$2 && null !== e$2 && !c.xml_isLegalChar(e$2) ? (this.emit("error", /* @__PURE__ */ new Error("Invalid characters in attribute value.")), "") : null === e$2 ? "" : e$2.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
18733
18735
  }, t$1.prototype._recordNamespaceInformation = function(e$2, t$2, r$1) {
18734
18736
  var n$1, i$2, a$1 = null;
18735
18737
  try {
@@ -19012,7 +19014,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
19012
19014
  if (l(r$1), void 0 === (o$1 = e$1._events) ? (o$1 = e$1._events = Object.create(null), e$1._eventsCount = 0) : (void 0 !== o$1.newListener && (e$1.emit("newListener", t$1, r$1.listener ? r$1.listener : r$1), o$1 = e$1._events), a$1 = o$1[t$1]), void 0 === a$1) a$1 = o$1[t$1] = r$1, ++e$1._eventsCount;
19013
19015
  else if ("function" == typeof a$1 ? a$1 = o$1[t$1] = n$1 ? [r$1, a$1] : [a$1, r$1] : n$1 ? a$1.unshift(r$1) : a$1.push(r$1), (i$2 = c(e$1)) > 0 && a$1.length > i$2 && !a$1.warned) {
19014
19016
  a$1.warned = !0;
19015
- var u$1 = new Error("Possible EventEmitter memory leak detected. " + a$1.length + " " + String(t$1) + " listeners added. Use emitter.setMaxListeners() to increase limit");
19017
+ var u$1 = /* @__PURE__ */ new Error("Possible EventEmitter memory leak detected. " + a$1.length + " " + String(t$1) + " listeners added. Use emitter.setMaxListeners() to increase limit");
19016
19018
  u$1.name = "MaxListenersExceededWarning", u$1.emitter = e$1, u$1.type = t$1, u$1.count = a$1.length, s$1 = u$1, console && console.warn && console.warn(s$1);
19017
19019
  }
19018
19020
  return e$1;
@@ -19076,7 +19078,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
19076
19078
  if (n$1) {
19077
19079
  var a$1;
19078
19080
  if (t$1.length > 0 && (a$1 = t$1[0]), a$1 instanceof Error) throw a$1;
19079
- var s$1 = new Error("Unhandled error." + (a$1 ? " (" + a$1.message + ")" : ""));
19081
+ var s$1 = /* @__PURE__ */ new Error("Unhandled error." + (a$1 ? " (" + a$1.message + ")" : ""));
19080
19082
  throw s$1.context = a$1, s$1;
19081
19083
  }
19082
19084
  var u$1 = i$2[e$1];
@@ -19147,7 +19149,7 @@ var require_xmlbuilder2_min = __commonJS({ "../../node_modules/.pnpm/xmlbuilder2
19147
19149
  ]);
19148
19150
  });
19149
19151
  } });
19150
- var import_xmlbuilder2_min = __toESM(require_xmlbuilder2_min(), 1);
19152
+ var import_xmlbuilder2_min = __toESM(require_xmlbuilder2_min());
19151
19153
  const BUILTIN_NAME_KEY = "#name";
19152
19154
  const TEXT_NODE_NAME = "__text__";
19153
19155
  const DefaultParserOptions = {
@@ -19170,7 +19172,6 @@ const DefaultParserOptions = {
19170
19172
  trim: false,
19171
19173
  xmlns: false
19172
19174
  };
19173
- const prefixMatch = new RegExp(/(?!xmlns)^.*:/);
19174
19175
  const normalize = (string) => string.toLowerCase();
19175
19176
  const stripBOM = (str) => str.startsWith("") ? str.substring(1) : str;
19176
19177
  var require_base64_js = __commonJS({ "../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js"(exports$1) {
@@ -21912,7 +21913,7 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/sax@1.4.1/node_modules/
21912
21913
  })();
21913
21914
  })(typeof exports$1 === "undefined" ? (void 0).sax = {} : exports$1);
21914
21915
  } });
21915
- var import_sax = __toESM(require_sax(), 1);
21916
+ var import_sax = __toESM(require_sax());
21916
21917
  var Parser = class {
21917
21918
  get xmlnsKey() {
21918
21919
  return `${this.options.attrkey}ns`;
@@ -22193,7 +22194,7 @@ var require_parser$1 = __commonJS$1({ "../../node_modules/.pnpm/whatwg-mimetype@
22193
22194
  const mimeType = {
22194
22195
  type: asciiLowercase$1(type),
22195
22196
  subtype: asciiLowercase$1(subtype),
22196
- parameters: new Map()
22197
+ parameters: /* @__PURE__ */ new Map()
22197
22198
  };
22198
22199
  while (position < input.length) {
22199
22200
  ++position;
@@ -58904,7 +58905,7 @@ var require_parser = __commonJS$1({ "../../node_modules/.pnpm/data-urls@5.0.0/no
58904
58905
 
58905
58906
  //#endregion
58906
58907
  //#region src/util/parseXmlString.ts
58907
- var import_parser = __toESM$1(require_parser(), 1);
58908
+ var import_parser = __toESM$1(require_parser());
58908
58909
  const parseXmlString = (xmlString) => {
58909
58910
  const xml = (0, import_parser.default)(xmlString) ?? xmlString;
58910
58911
  return parseStringPromise(xml, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse-tmx",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "A parser for tmx.",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/Esposter/Esposter#readme",
@@ -29,18 +29,18 @@
29
29
  "build": "pnpm export:gen && rolldown --config rolldown.config.ts",
30
30
  "test": "NODE_OPTIONS=--max-old-space-size=8192 vitest",
31
31
  "coverage": "vitest run --coverage",
32
- "lint": "eslint .",
33
- "lint:fix": "eslint --fix .",
32
+ "lint": "oxlint && eslint .",
33
+ "lint:fix": "oxlint --fix && eslint --fix .",
34
34
  "typecheck": "tsc",
35
35
  "export:gen": "ctix build --config ../configuration/.ctirc-ts"
36
36
  },
37
37
  "dependencies": {
38
- "@esposter/xml2js": "2.4.1",
38
+ "@esposter/xml2js": "2.5.0",
39
39
  "data-urls": "^5.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/data-urls": "^3.0.4",
43
43
  "@types/xml2js": "^0.4.14"
44
44
  },
45
- "gitHead": "a21ed2057213eae49ea366f8866dfae2e5041163"
45
+ "gitHead": "8faf7789eed01e2fcff4d2206137058e3c3ee681"
46
46
  }