@powerlines/plugin-env 0.16.59 → 0.16.61
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/README.md +14 -16
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -3
- package/dist/_virtual/{rolldown_runtime.mjs → _rolldown/runtime.mjs} +2 -3
- package/dist/babel/index.cjs +1 -0
- package/dist/babel/plugin.cjs +20 -19
- package/dist/babel/plugin.d.cts +0 -1
- package/dist/babel/plugin.d.cts.map +1 -1
- package/dist/babel/plugin.d.mts +0 -1
- package/dist/babel/plugin.d.mts.map +1 -1
- package/dist/babel/plugin.mjs +3 -3
- package/dist/babel/plugin.mjs.map +1 -1
- package/dist/components/docs.cjs +26 -25
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +1 -1
- package/dist/components/env-builtin.cjs +155 -153
- package/dist/components/env-builtin.d.cts +0 -1
- package/dist/components/env-builtin.d.cts.map +1 -1
- package/dist/components/env-builtin.d.mts +0 -1
- package/dist/components/env-builtin.d.mts.map +1 -1
- package/dist/components/env-builtin.mjs +1 -1
- package/dist/components/index.cjs +1 -0
- package/dist/helpers/automd-generator.cjs +4 -3
- package/dist/helpers/automd-generator.d.cts +2 -3
- package/dist/helpers/automd-generator.d.cts.map +1 -1
- package/dist/helpers/automd-generator.d.mts +2 -3
- package/dist/helpers/automd-generator.d.mts.map +1 -1
- package/dist/helpers/automd-generator.mjs +1 -1
- package/dist/helpers/automd-generator.mjs.map +1 -1
- package/dist/helpers/create-reflection-resource.cjs +1 -0
- package/dist/helpers/create-reflection-resource.d.cts +0 -1
- package/dist/helpers/create-reflection-resource.d.cts.map +1 -1
- package/dist/helpers/create-reflection-resource.d.mts +0 -1
- package/dist/helpers/create-reflection-resource.d.mts.map +1 -1
- package/dist/helpers/create-reflection-resource.mjs.map +1 -1
- package/dist/helpers/docs-helper.cjs +4 -2
- package/dist/helpers/docs-helper.d.cts +0 -1
- package/dist/helpers/docs-helper.d.cts.map +1 -1
- package/dist/helpers/docs-helper.d.mts +0 -1
- package/dist/helpers/docs-helper.d.mts.map +1 -1
- package/dist/helpers/docs-helper.mjs +1 -1
- package/dist/helpers/docs-helper.mjs.map +1 -1
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/load.cjs +19 -17
- package/dist/helpers/load.d.cts +0 -1
- package/dist/helpers/load.d.cts.map +1 -1
- package/dist/helpers/load.d.mts +0 -1
- package/dist/helpers/load.d.mts.map +1 -1
- package/dist/helpers/load.mjs +2 -2
- package/dist/helpers/load.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +59 -58
- package/dist/helpers/persistence.d.cts +0 -1
- package/dist/helpers/persistence.d.cts.map +1 -1
- package/dist/helpers/persistence.d.mts +0 -1
- package/dist/helpers/persistence.d.mts.map +1 -1
- package/dist/helpers/persistence.mjs +15 -15
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/reflect.cjs +40 -39
- package/dist/helpers/reflect.d.cts.map +1 -1
- package/dist/helpers/reflect.d.mts.map +1 -1
- package/dist/helpers/reflect.mjs +2 -2
- package/dist/helpers/reflect.mjs.map +1 -1
- package/dist/helpers/source-file-env.cjs +8 -7
- package/dist/helpers/source-file-env.d.cts.map +1 -1
- package/dist/helpers/source-file-env.d.mts.map +1 -1
- package/dist/helpers/source-file-env.mjs.map +1 -1
- package/dist/helpers/template-helpers.cjs +6 -5
- package/dist/helpers/template-helpers.d.cts +0 -1
- package/dist/helpers/template-helpers.d.cts.map +1 -1
- package/dist/helpers/template-helpers.d.mts +0 -1
- package/dist/helpers/template-helpers.d.mts.map +1 -1
- package/dist/helpers/template-helpers.mjs.map +1 -1
- package/dist/index.cjs +49 -49
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -6
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.cjs +7 -7
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs +6 -6
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.cjs +6 -6
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +6 -6
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.cjs +655 -655
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs +655 -655
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.cjs +179 -179
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs +179 -179
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.cjs +188 -188
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +188 -188
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.cjs +297 -297
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs +297 -297
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.cjs +8 -8
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs +8 -8
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs +4 -4
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.cjs +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.cjs +5 -5
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs +4 -4
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs.map +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.cjs +2 -2
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs.map +1 -1
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +18 -18
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +2 -2
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +1308 -1311
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +1294 -1297
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +1 -1
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +2194 -2194
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +2193 -2193
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +1 -1
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +3 -3
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +3 -3
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +34 -34
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +33 -33
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +221 -223
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +220 -222
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +1 -1
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.cjs +3 -3
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs +5 -5
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +1 -1
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +6 -6
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +5 -5
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +10 -10
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +16 -16
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +412 -412
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +189 -189
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +1 -1
- package/dist/types/index.cjs +1 -0
- package/dist/types/plugin.cjs +20 -19
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/plugin.mjs.map +1 -1
- package/dist/types/runtime.cjs +1 -0
- package/dist/types/runtime.d.cts.map +1 -1
- package/dist/types/runtime.d.mts.map +1 -1
- package/dist/types/runtime.mjs.map +1 -1
- package/package.json +45 -26
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.cjs +0 -37
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.mjs +0 -38
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -3
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -5
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +0 -7
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -3
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +0 -19
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +0 -63
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +0 -64
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +0 -17
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.cjs +0 -32
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.mjs +0 -33
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.cjs +0 -28
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.mjs +0 -29
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.cjs +0 -122
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs +0 -123
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.mjs +0 -9
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +0 -43
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +0 -43
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +0 -1
package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs
CHANGED
|
@@ -26,27 +26,27 @@
|
|
|
26
26
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
27
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
28
|
*/
|
|
29
|
-
function e(e
|
|
30
|
-
let n
|
|
31
|
-
return [n
|
|
29
|
+
function e(e, t) {
|
|
30
|
+
let n = e.slice(0, t).split(/\r\n|\n|\r/g);
|
|
31
|
+
return [n.length, n.pop().length + 1];
|
|
32
32
|
}
|
|
33
|
-
function t(e
|
|
34
|
-
let r
|
|
35
|
-
for (let e
|
|
36
|
-
let o
|
|
37
|
-
o
|
|
38
|
-
`, e
|
|
33
|
+
function t(e, t, n) {
|
|
34
|
+
let r = e.split(/\r\n|\n|\r/g), i = ``, a = (Math.log10(t + 1) | 0) + 1;
|
|
35
|
+
for (let e = t - 1; e <= t + 1; e++) {
|
|
36
|
+
let o = r[e - 1];
|
|
37
|
+
o && (i += e.toString().padEnd(a, ` `), i += `: `, i += o, i += `
|
|
38
|
+
`, e === t && (i += ` `.repeat(a + n + 2), i += `^
|
|
39
39
|
`));
|
|
40
40
|
}
|
|
41
|
-
return i
|
|
41
|
+
return i;
|
|
42
42
|
}
|
|
43
43
|
var n = class extends Error {
|
|
44
44
|
line;
|
|
45
45
|
column;
|
|
46
46
|
codeblock;
|
|
47
|
-
constructor(n
|
|
48
|
-
let [i
|
|
49
|
-
super(`Invalid TOML document: ${n
|
|
47
|
+
constructor(n, r) {
|
|
48
|
+
let [i, a] = e(r.toml, r.ptr), o = t(r.toml, i, a);
|
|
49
|
+
super(`Invalid TOML document: ${n}\n\n${o}`, r), this.line = i, this.column = a, this.codeblock = o;
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
/*!
|
|
@@ -76,59 +76,59 @@ var n = class extends Error {
|
|
|
76
76
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
77
77
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
78
78
|
*/
|
|
79
|
-
function r(e
|
|
80
|
-
let n
|
|
81
|
-
for (; e
|
|
82
|
-
return --n
|
|
79
|
+
function r(e, t) {
|
|
80
|
+
let n = 0;
|
|
81
|
+
for (; e[t - ++n] === `\\`;);
|
|
82
|
+
return --n && n % 2;
|
|
83
83
|
}
|
|
84
|
-
function i(e
|
|
85
|
-
let r
|
|
86
|
-
`, t
|
|
87
|
-
return e
|
|
84
|
+
function i(e, t = 0, n = e.length) {
|
|
85
|
+
let r = e.indexOf(`
|
|
86
|
+
`, t);
|
|
87
|
+
return e[r - 1] === `\r` && r--, r <= n ? r : -1;
|
|
88
88
|
}
|
|
89
|
-
function a(e
|
|
90
|
-
for (let r
|
|
91
|
-
let i
|
|
92
|
-
if (i
|
|
93
|
-
`) return r
|
|
94
|
-
if (i
|
|
95
|
-
`) return r
|
|
96
|
-
if (i
|
|
97
|
-
toml: e
|
|
98
|
-
ptr: t
|
|
89
|
+
function a(e, t) {
|
|
90
|
+
for (let r = t; r < e.length; r++) {
|
|
91
|
+
let i = e[r];
|
|
92
|
+
if (i === `
|
|
93
|
+
`) return r;
|
|
94
|
+
if (i === `\r` && e[r + 1] === `
|
|
95
|
+
`) return r + 1;
|
|
96
|
+
if (i < ` ` && i !== ` ` || i === ``) throw new n(`control characters are not allowed in comments`, {
|
|
97
|
+
toml: e,
|
|
98
|
+
ptr: t
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
return e
|
|
101
|
+
return e.length;
|
|
102
102
|
}
|
|
103
|
-
function o(e
|
|
104
|
-
let i
|
|
105
|
-
for (; (i
|
|
106
|
-
` || i
|
|
107
|
-
`);) t
|
|
108
|
-
return r
|
|
103
|
+
function o(e, t, n, r) {
|
|
104
|
+
let i;
|
|
105
|
+
for (; (i = e[t]) === ` ` || i === ` ` || !n && (i === `
|
|
106
|
+
` || i === `\r` && e[t + 1] === `
|
|
107
|
+
`);) t++;
|
|
108
|
+
return r || i !== `#` ? t : o(e, a(e, t), n);
|
|
109
109
|
}
|
|
110
|
-
function s(e
|
|
111
|
-
if (!a
|
|
112
|
-
for (let n
|
|
113
|
-
let t
|
|
114
|
-
if (t
|
|
115
|
-
else if (t
|
|
116
|
-
else if (t
|
|
117
|
-
` || t
|
|
118
|
-
`)) return n
|
|
110
|
+
function s(e, t, r, a, o = !1) {
|
|
111
|
+
if (!a) return t = i(e, t), t < 0 ? e.length : t;
|
|
112
|
+
for (let n = t; n < e.length; n++) {
|
|
113
|
+
let t = e[n];
|
|
114
|
+
if (t === `#`) n = i(e, n);
|
|
115
|
+
else if (t === r) return n + 1;
|
|
116
|
+
else if (t === a || o && (t === `
|
|
117
|
+
` || t === `\r` && e[n + 1] === `
|
|
118
|
+
`)) return n;
|
|
119
119
|
}
|
|
120
120
|
throw new n(`cannot find end of structure`, {
|
|
121
|
-
toml: e
|
|
122
|
-
ptr: t
|
|
121
|
+
toml: e,
|
|
122
|
+
ptr: t
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
function c(e
|
|
126
|
-
let n
|
|
127
|
-
t
|
|
125
|
+
function c(e, t) {
|
|
126
|
+
let n = e[t], i = n === e[t + 1] && e[t + 1] === e[t + 2] ? e.slice(t, t + 3) : n;
|
|
127
|
+
t += i.length - 1;
|
|
128
128
|
do
|
|
129
|
-
t
|
|
130
|
-
while (t
|
|
131
|
-
return t
|
|
129
|
+
t = e.indexOf(i, ++t);
|
|
130
|
+
while (t > -1 && n !== `'` && r(e, t));
|
|
131
|
+
return t > -1 && (t += i.length, i.length > 1 && (e[t] === n && t++, e[t] === n && t++)), t;
|
|
132
132
|
}
|
|
133
133
|
/*!
|
|
134
134
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -158,17 +158,17 @@ function c(e$1, t$1) {
|
|
|
158
158
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
159
159
|
*/
|
|
160
160
|
let l = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
161
|
-
var u = class e
|
|
161
|
+
var u = class e extends Date {
|
|
162
162
|
#e = !1;
|
|
163
163
|
#t = !1;
|
|
164
164
|
#n = null;
|
|
165
|
-
constructor(e
|
|
166
|
-
let t
|
|
167
|
-
if (typeof e
|
|
168
|
-
let i
|
|
169
|
-
i
|
|
165
|
+
constructor(e) {
|
|
166
|
+
let t = !0, n = !0, r = `Z`;
|
|
167
|
+
if (typeof e == `string`) {
|
|
168
|
+
let i = e.match(l);
|
|
169
|
+
i ? (i[1] || (t = !1, e = `0000-01-01T${e}`), n = !!i[2], n && e[10] === ` ` && (e = e.replace(` `, `T`)), i[2] && +i[2] > 23 ? e = `` : (r = i[3] || null, e = e.toUpperCase(), !r && n && (e += `Z`))) : e = ``;
|
|
170
170
|
}
|
|
171
|
-
super(e
|
|
171
|
+
super(e), isNaN(this.getTime()) || (this.#e = t, this.#t = n, this.#n = r);
|
|
172
172
|
}
|
|
173
173
|
isDateTime() {
|
|
174
174
|
return this.#e && this.#t;
|
|
@@ -186,29 +186,29 @@ var u = class e$1 extends Date {
|
|
|
186
186
|
return this.#e || this.#t;
|
|
187
187
|
}
|
|
188
188
|
toISOString() {
|
|
189
|
-
let e
|
|
190
|
-
if (this.isDate()) return e
|
|
191
|
-
if (this.isTime()) return e
|
|
192
|
-
if (this.#n === null) return e
|
|
193
|
-
if (this.#n === `Z`) return e
|
|
194
|
-
let t
|
|
195
|
-
return t
|
|
189
|
+
let e = super.toISOString();
|
|
190
|
+
if (this.isDate()) return e.slice(0, 10);
|
|
191
|
+
if (this.isTime()) return e.slice(11, 23);
|
|
192
|
+
if (this.#n === null) return e.slice(0, -1);
|
|
193
|
+
if (this.#n === `Z`) return e;
|
|
194
|
+
let t = this.#n.slice(1, 3) * 60 + +this.#n.slice(4, 6);
|
|
195
|
+
return t = this.#n[0] === `-` ? t : -t, (/* @__PURE__ */ new Date(this.getTime() - t * 6e4)).toISOString().slice(0, -1) + this.#n;
|
|
196
196
|
}
|
|
197
|
-
static wrapAsOffsetDateTime(t
|
|
198
|
-
let r
|
|
199
|
-
return r
|
|
197
|
+
static wrapAsOffsetDateTime(t, n = `Z`) {
|
|
198
|
+
let r = new e(t);
|
|
199
|
+
return r.#n = n, r;
|
|
200
200
|
}
|
|
201
|
-
static wrapAsLocalDateTime(t
|
|
202
|
-
let n
|
|
203
|
-
return n
|
|
201
|
+
static wrapAsLocalDateTime(t) {
|
|
202
|
+
let n = new e(t);
|
|
203
|
+
return n.#n = null, n;
|
|
204
204
|
}
|
|
205
|
-
static wrapAsLocalDate(t
|
|
206
|
-
let n
|
|
207
|
-
return n
|
|
205
|
+
static wrapAsLocalDate(t) {
|
|
206
|
+
let n = new e(t);
|
|
207
|
+
return n.#t = !1, n.#n = null, n;
|
|
208
208
|
}
|
|
209
|
-
static wrapAsLocalTime(t
|
|
210
|
-
let n
|
|
211
|
-
return n
|
|
209
|
+
static wrapAsLocalTime(t) {
|
|
210
|
+
let n = new e(t);
|
|
211
|
+
return n.#e = !1, n.#n = null, n;
|
|
212
212
|
}
|
|
213
213
|
};
|
|
214
214
|
/*!
|
|
@@ -249,91 +249,91 @@ let d = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, f = /^[+
|
|
|
249
249
|
"\"": `"`,
|
|
250
250
|
"\\": `\\`
|
|
251
251
|
};
|
|
252
|
-
function g(e
|
|
253
|
-
let i
|
|
254
|
-
a
|
|
255
|
-
` && t
|
|
256
|
-
let s
|
|
257
|
-
for (; t
|
|
258
|
-
let r
|
|
259
|
-
if (r
|
|
260
|
-
` || r
|
|
252
|
+
function g(e, t = 0, r = e.length) {
|
|
253
|
+
let i = e[t] === `'`, a = e[t++] === e[t] && e[t] === e[t + 1];
|
|
254
|
+
a && (r -= 2, e[t += 2] === `\r` && t++, e[t] === `
|
|
255
|
+
` && t++);
|
|
256
|
+
let s = 0, c, l = ``, u = t;
|
|
257
|
+
for (; t < r - 1;) {
|
|
258
|
+
let r = e[t++];
|
|
259
|
+
if (r === `
|
|
260
|
+
` || r === `\r` && e[t] === `
|
|
261
261
|
`) {
|
|
262
|
-
if (!a
|
|
263
|
-
toml: e
|
|
264
|
-
ptr: t
|
|
262
|
+
if (!a) throw new n(`newlines are not allowed in strings`, {
|
|
263
|
+
toml: e,
|
|
264
|
+
ptr: t - 1
|
|
265
265
|
});
|
|
266
|
-
} else if (r
|
|
267
|
-
toml: e
|
|
268
|
-
ptr: t
|
|
266
|
+
} else if (r < ` ` && r !== ` ` || r === ``) throw new n(`control characters are not allowed in strings`, {
|
|
267
|
+
toml: e,
|
|
268
|
+
ptr: t - 1
|
|
269
269
|
});
|
|
270
|
-
if (c
|
|
271
|
-
if (c
|
|
272
|
-
let i
|
|
273
|
-
if (!m.test(i
|
|
274
|
-
toml: e
|
|
275
|
-
ptr: s
|
|
270
|
+
if (c) {
|
|
271
|
+
if (c = !1, r === `x` || r === `u` || r === `U`) {
|
|
272
|
+
let i = e.slice(t, t += r === `x` ? 2 : r === `u` ? 4 : 8);
|
|
273
|
+
if (!m.test(i)) throw new n(`invalid unicode escape`, {
|
|
274
|
+
toml: e,
|
|
275
|
+
ptr: s
|
|
276
276
|
});
|
|
277
277
|
try {
|
|
278
|
-
l
|
|
278
|
+
l += String.fromCodePoint(parseInt(i, 16));
|
|
279
279
|
} catch {
|
|
280
280
|
throw new n(`invalid unicode escape`, {
|
|
281
|
-
toml: e
|
|
282
|
-
ptr: s
|
|
281
|
+
toml: e,
|
|
282
|
+
ptr: s
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
|
-
} else if (a
|
|
286
|
-
` || r
|
|
287
|
-
if (t
|
|
288
|
-
` && e
|
|
289
|
-
toml: e
|
|
290
|
-
ptr: s
|
|
285
|
+
} else if (a && (r === `
|
|
286
|
+
` || r === ` ` || r === ` ` || r === `\r`)) {
|
|
287
|
+
if (t = o(e, t - 1, !0), e[t] !== `
|
|
288
|
+
` && e[t] !== `\r`) throw new n(`invalid escape: only line-ending whitespace may be escaped`, {
|
|
289
|
+
toml: e,
|
|
290
|
+
ptr: s
|
|
291
291
|
});
|
|
292
|
-
t
|
|
293
|
-
} else if (r
|
|
292
|
+
t = o(e, t);
|
|
293
|
+
} else if (r in h) l += h[r];
|
|
294
294
|
else throw new n(`unrecognized escape sequence`, {
|
|
295
|
-
toml: e
|
|
296
|
-
ptr: s
|
|
295
|
+
toml: e,
|
|
296
|
+
ptr: s
|
|
297
297
|
});
|
|
298
|
-
u
|
|
299
|
-
} else !i
|
|
298
|
+
u = t;
|
|
299
|
+
} else !i && r === `\\` && (s = t - 1, c = !0, l += e.slice(u, s));
|
|
300
300
|
}
|
|
301
|
-
return l
|
|
301
|
+
return l + e.slice(u, r - 1);
|
|
302
302
|
}
|
|
303
|
-
function _(e
|
|
304
|
-
if (e
|
|
305
|
-
if (e
|
|
306
|
-
if (e
|
|
307
|
-
if (e
|
|
308
|
-
if (e
|
|
309
|
-
if (e
|
|
310
|
-
let a
|
|
311
|
-
if (a
|
|
312
|
-
if (p.test(e
|
|
313
|
-
toml: t
|
|
314
|
-
ptr: r
|
|
303
|
+
function _(e, t, r, i) {
|
|
304
|
+
if (e === `true`) return !0;
|
|
305
|
+
if (e === `false`) return !1;
|
|
306
|
+
if (e === `-inf`) return -Infinity;
|
|
307
|
+
if (e === `inf` || e === `+inf`) return Infinity;
|
|
308
|
+
if (e === `nan` || e === `+nan` || e === `-nan`) return NaN;
|
|
309
|
+
if (e === `-0`) return i ? 0n : 0;
|
|
310
|
+
let a = d.test(e);
|
|
311
|
+
if (a || f.test(e)) {
|
|
312
|
+
if (p.test(e)) throw new n(`leading zeroes are not allowed`, {
|
|
313
|
+
toml: t,
|
|
314
|
+
ptr: r
|
|
315
315
|
});
|
|
316
|
-
e
|
|
317
|
-
let o
|
|
318
|
-
if (isNaN(o
|
|
319
|
-
toml: t
|
|
320
|
-
ptr: r
|
|
316
|
+
e = e.replace(/_/g, ``);
|
|
317
|
+
let o = +e;
|
|
318
|
+
if (isNaN(o)) throw new n(`invalid number`, {
|
|
319
|
+
toml: t,
|
|
320
|
+
ptr: r
|
|
321
321
|
});
|
|
322
|
-
if (a
|
|
323
|
-
if ((a
|
|
324
|
-
toml: t
|
|
325
|
-
ptr: r
|
|
322
|
+
if (a) {
|
|
323
|
+
if ((a = !Number.isSafeInteger(o)) && !i) throw new n(`integer value cannot be represented losslessly`, {
|
|
324
|
+
toml: t,
|
|
325
|
+
ptr: r
|
|
326
326
|
});
|
|
327
|
-
(a
|
|
327
|
+
(a || i === !0) && (o = BigInt(e));
|
|
328
328
|
}
|
|
329
|
-
return o
|
|
329
|
+
return o;
|
|
330
330
|
}
|
|
331
|
-
let o
|
|
332
|
-
if (!o
|
|
333
|
-
toml: t
|
|
334
|
-
ptr: r
|
|
331
|
+
let o = new u(e);
|
|
332
|
+
if (!o.isValid()) throw new n(`invalid value`, {
|
|
333
|
+
toml: t,
|
|
334
|
+
ptr: r
|
|
335
335
|
});
|
|
336
|
-
return o
|
|
336
|
+
return o;
|
|
337
337
|
}
|
|
338
338
|
/*!
|
|
339
339
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -362,48 +362,48 @@ function _(e$1, t$1, r$1, i$1) {
|
|
|
362
362
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
363
363
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
364
364
|
*/
|
|
365
|
-
function v(e
|
|
366
|
-
let r
|
|
367
|
-
return i
|
|
365
|
+
function v(e, t, n) {
|
|
366
|
+
let r = e.slice(t, n), i = r.indexOf(`#`);
|
|
367
|
+
return i > -1 && (a(e, i), r = r.slice(0, i)), [r.trimEnd(), i];
|
|
368
368
|
}
|
|
369
|
-
function y(e
|
|
370
|
-
if (i
|
|
371
|
-
toml: e
|
|
372
|
-
ptr: t
|
|
369
|
+
function y(e, t, r, i, a) {
|
|
370
|
+
if (i === 0) throw new n(`document contains excessively nested structures. aborting.`, {
|
|
371
|
+
toml: e,
|
|
372
|
+
ptr: t
|
|
373
373
|
});
|
|
374
|
-
let l
|
|
375
|
-
if (l
|
|
376
|
-
let [s
|
|
377
|
-
if (r
|
|
378
|
-
if (c
|
|
379
|
-
else if (e
|
|
380
|
-
toml: e
|
|
381
|
-
ptr: c
|
|
374
|
+
let l = e[t];
|
|
375
|
+
if (l === `[` || l === `{`) {
|
|
376
|
+
let [s, c] = l === `[` ? C(e, t, i, a) : S(e, t, i, a);
|
|
377
|
+
if (r) {
|
|
378
|
+
if (c = o(e, c), e[c] === `,`) c++;
|
|
379
|
+
else if (e[c] !== r) throw new n(`expected comma or end of structure`, {
|
|
380
|
+
toml: e,
|
|
381
|
+
ptr: c
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
return [s
|
|
384
|
+
return [s, c];
|
|
385
385
|
}
|
|
386
|
-
let u
|
|
387
|
-
if (l
|
|
388
|
-
u
|
|
389
|
-
let i
|
|
390
|
-
if (r
|
|
391
|
-
if (u
|
|
392
|
-
` && e
|
|
393
|
-
toml: e
|
|
394
|
-
ptr: u
|
|
386
|
+
let u;
|
|
387
|
+
if (l === `"` || l === `'`) {
|
|
388
|
+
u = c(e, t);
|
|
389
|
+
let i = g(e, t, u);
|
|
390
|
+
if (r) {
|
|
391
|
+
if (u = o(e, u), e[u] && e[u] !== `,` && e[u] !== r && e[u] !== `
|
|
392
|
+
` && e[u] !== `\r`) throw new n(`unexpected character encountered`, {
|
|
393
|
+
toml: e,
|
|
394
|
+
ptr: u
|
|
395
395
|
});
|
|
396
|
-
u
|
|
396
|
+
u += +(e[u] === `,`);
|
|
397
397
|
}
|
|
398
|
-
return [i
|
|
398
|
+
return [i, u];
|
|
399
399
|
}
|
|
400
|
-
u
|
|
401
|
-
let d
|
|
402
|
-
if (!d
|
|
403
|
-
toml: e
|
|
404
|
-
ptr: t
|
|
400
|
+
u = s(e, t, `,`, r);
|
|
401
|
+
let d = v(e, t, u - +(e[u - 1] === `,`));
|
|
402
|
+
if (!d[0]) throw new n(`incomplete key-value declaration: no value specified`, {
|
|
403
|
+
toml: e,
|
|
404
|
+
ptr: t
|
|
405
405
|
});
|
|
406
|
-
return r
|
|
406
|
+
return r && d[1] > -1 && (u = o(e, t + d[1]), u += +(e[u] === `,`)), [_(d[0], e, t, a), u];
|
|
407
407
|
}
|
|
408
408
|
/*!
|
|
409
409
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -433,102 +433,102 @@ function y(e$1, t$1, r$1, i$1, a$1) {
|
|
|
433
433
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
434
434
|
*/
|
|
435
435
|
let b = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
436
|
-
function x(e
|
|
437
|
-
let a
|
|
438
|
-
if (l
|
|
439
|
-
toml: e
|
|
440
|
-
ptr: t
|
|
436
|
+
function x(e, t, r = `=`) {
|
|
437
|
+
let a = t - 1, s = [], l = e.indexOf(r, t);
|
|
438
|
+
if (l < 0) throw new n(`incomplete key-value: cannot find end of key`, {
|
|
439
|
+
toml: e,
|
|
440
|
+
ptr: t
|
|
441
441
|
});
|
|
442
442
|
do {
|
|
443
|
-
let o
|
|
444
|
-
if (o
|
|
445
|
-
if (o
|
|
446
|
-
toml: e
|
|
447
|
-
ptr: t
|
|
443
|
+
let o = e[t = ++a];
|
|
444
|
+
if (o !== ` ` && o !== ` `) if (o === `"` || o === `'`) {
|
|
445
|
+
if (o === e[t + 1] && o === e[t + 2]) throw new n(`multiline strings are not allowed in keys`, {
|
|
446
|
+
toml: e,
|
|
447
|
+
ptr: t
|
|
448
448
|
});
|
|
449
|
-
let u
|
|
450
|
-
if (u
|
|
451
|
-
toml: e
|
|
452
|
-
ptr: t
|
|
449
|
+
let u = c(e, t);
|
|
450
|
+
if (u < 0) throw new n(`unfinished string encountered`, {
|
|
451
|
+
toml: e,
|
|
452
|
+
ptr: t
|
|
453
453
|
});
|
|
454
|
-
a
|
|
455
|
-
let d
|
|
456
|
-
if (f
|
|
457
|
-
toml: e
|
|
458
|
-
ptr: t
|
|
454
|
+
a = e.indexOf(`.`, u);
|
|
455
|
+
let d = e.slice(u, a < 0 || a > l ? l : a), f = i(d);
|
|
456
|
+
if (f > -1) throw new n(`newlines are not allowed in keys`, {
|
|
457
|
+
toml: e,
|
|
458
|
+
ptr: t + a + f
|
|
459
459
|
});
|
|
460
|
-
if (d
|
|
461
|
-
toml: e
|
|
462
|
-
ptr: u
|
|
460
|
+
if (d.trimStart()) throw new n(`found extra tokens after the string part`, {
|
|
461
|
+
toml: e,
|
|
462
|
+
ptr: u
|
|
463
463
|
});
|
|
464
|
-
if (l
|
|
465
|
-
toml: e
|
|
466
|
-
ptr: t
|
|
464
|
+
if (l < u && (l = e.indexOf(r, u), l < 0)) throw new n(`incomplete key-value: cannot find end of key`, {
|
|
465
|
+
toml: e,
|
|
466
|
+
ptr: t
|
|
467
467
|
});
|
|
468
|
-
s
|
|
468
|
+
s.push(g(e, t, u));
|
|
469
469
|
} else {
|
|
470
|
-
a
|
|
471
|
-
let r
|
|
472
|
-
if (!b.test(r
|
|
473
|
-
toml: e
|
|
474
|
-
ptr: t
|
|
470
|
+
a = e.indexOf(`.`, t);
|
|
471
|
+
let r = e.slice(t, a < 0 || a > l ? l : a);
|
|
472
|
+
if (!b.test(r)) throw new n(`only letter, numbers, dashes and underscores are allowed in keys`, {
|
|
473
|
+
toml: e,
|
|
474
|
+
ptr: t
|
|
475
475
|
});
|
|
476
|
-
s
|
|
476
|
+
s.push(r.trimEnd());
|
|
477
477
|
}
|
|
478
|
-
} while (a
|
|
479
|
-
return [s
|
|
478
|
+
} while (a + 1 && a < l);
|
|
479
|
+
return [s, o(e, l + 1, !0, !0)];
|
|
480
480
|
}
|
|
481
|
-
function S(e
|
|
482
|
-
let o
|
|
483
|
-
for (t
|
|
484
|
-
toml: e
|
|
485
|
-
ptr: t
|
|
481
|
+
function S(e, t, r, i) {
|
|
482
|
+
let o = {}, s = /* @__PURE__ */ new Set(), c;
|
|
483
|
+
for (t++; (c = e[t++]) !== `}` && c;) if (c === `,`) throw new n(`expected value, found comma`, {
|
|
484
|
+
toml: e,
|
|
485
|
+
ptr: t - 1
|
|
486
486
|
});
|
|
487
|
-
else if (c
|
|
488
|
-
else if (c
|
|
489
|
-
` && c
|
|
490
|
-
let a
|
|
491
|
-
for (let r
|
|
492
|
-
if (r
|
|
493
|
-
toml: e
|
|
494
|
-
ptr: t
|
|
487
|
+
else if (c === `#`) t = a(e, t);
|
|
488
|
+
else if (c !== ` ` && c !== ` ` && c !== `
|
|
489
|
+
` && c !== `\r`) {
|
|
490
|
+
let a, c = o, l = !1, [u, d] = x(e, t - 1);
|
|
491
|
+
for (let r = 0; r < u.length; r++) {
|
|
492
|
+
if (r && (c = l ? c[a] : c[a] = {}), a = u[r], (l = Object.hasOwn(c, a)) && (typeof c[a] != `object` || s.has(c[a]))) throw new n(`trying to redefine an already defined value`, {
|
|
493
|
+
toml: e,
|
|
494
|
+
ptr: t
|
|
495
495
|
});
|
|
496
|
-
!l
|
|
496
|
+
!l && a === `__proto__` && Object.defineProperty(c, a, {
|
|
497
497
|
enumerable: !0,
|
|
498
498
|
configurable: !0,
|
|
499
499
|
writable: !0
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
if (l
|
|
503
|
-
toml: e
|
|
504
|
-
ptr: t
|
|
502
|
+
if (l) throw new n(`trying to redefine an already defined value`, {
|
|
503
|
+
toml: e,
|
|
504
|
+
ptr: t
|
|
505
505
|
});
|
|
506
|
-
let [f
|
|
507
|
-
s
|
|
506
|
+
let [f, p] = y(e, d, `}`, r - 1, i);
|
|
507
|
+
s.add(f), c[a] = f, t = p;
|
|
508
508
|
}
|
|
509
|
-
if (!c
|
|
510
|
-
toml: e
|
|
511
|
-
ptr: t
|
|
509
|
+
if (!c) throw new n(`unfinished table encountered`, {
|
|
510
|
+
toml: e,
|
|
511
|
+
ptr: t
|
|
512
512
|
});
|
|
513
|
-
return [o
|
|
513
|
+
return [o, t];
|
|
514
514
|
}
|
|
515
|
-
function C(e
|
|
516
|
-
let o
|
|
517
|
-
for (t
|
|
518
|
-
toml: e
|
|
519
|
-
ptr: t
|
|
515
|
+
function C(e, t, r, i) {
|
|
516
|
+
let o = [], s;
|
|
517
|
+
for (t++; (s = e[t++]) !== `]` && s;) if (s === `,`) throw new n(`expected value, found comma`, {
|
|
518
|
+
toml: e,
|
|
519
|
+
ptr: t - 1
|
|
520
520
|
});
|
|
521
|
-
else if (s
|
|
522
|
-
else if (s
|
|
523
|
-
` && s
|
|
524
|
-
let n
|
|
525
|
-
o
|
|
521
|
+
else if (s === `#`) t = a(e, t);
|
|
522
|
+
else if (s !== ` ` && s !== ` ` && s !== `
|
|
523
|
+
` && s !== `\r`) {
|
|
524
|
+
let n = y(e, t - 1, `]`, r - 1, i);
|
|
525
|
+
o.push(n[0]), t = n[1];
|
|
526
526
|
}
|
|
527
|
-
if (!s
|
|
528
|
-
toml: e
|
|
529
|
-
ptr: t
|
|
527
|
+
if (!s) throw new n(`unfinished array encountered`, {
|
|
528
|
+
toml: e,
|
|
529
|
+
ptr: t
|
|
530
530
|
});
|
|
531
|
-
return [o
|
|
531
|
+
return [o, t];
|
|
532
532
|
}
|
|
533
533
|
/*!
|
|
534
534
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
@@ -557,81 +557,81 @@ function C(e$1, t$1, r$1, i$1) {
|
|
|
557
557
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
558
558
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
559
559
|
*/
|
|
560
|
-
function w(e
|
|
561
|
-
let i
|
|
562
|
-
for (let t
|
|
563
|
-
if (t
|
|
564
|
-
if (i
|
|
565
|
-
if (c
|
|
566
|
-
let e
|
|
567
|
-
i
|
|
560
|
+
function w(e, t, n, r) {
|
|
561
|
+
let i = t, a = n, o, s = !1, c;
|
|
562
|
+
for (let t = 0; t < e.length; t++) {
|
|
563
|
+
if (t) {
|
|
564
|
+
if (i = s ? i[o] : i[o] = {}, a = (c = a[o]).c, r === 0 && (c.t === 1 || c.t === 2)) return null;
|
|
565
|
+
if (c.t === 2) {
|
|
566
|
+
let e = i.length - 1;
|
|
567
|
+
i = i[e], a = a[e].c;
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
if (o
|
|
571
|
-
s
|
|
570
|
+
if (o = e[t], (s = Object.hasOwn(i, o)) && a[o]?.t === 0 && a[o]?.d) return null;
|
|
571
|
+
s || (o === `__proto__` && (Object.defineProperty(i, o, {
|
|
572
572
|
enumerable: !0,
|
|
573
573
|
configurable: !0,
|
|
574
574
|
writable: !0
|
|
575
|
-
}), Object.defineProperty(a
|
|
575
|
+
}), Object.defineProperty(a, o, {
|
|
576
576
|
enumerable: !0,
|
|
577
577
|
configurable: !0,
|
|
578
578
|
writable: !0
|
|
579
|
-
})), a
|
|
580
|
-
t: t
|
|
579
|
+
})), a[o] = {
|
|
580
|
+
t: t < e.length - 1 && r === 2 ? 3 : r,
|
|
581
581
|
d: !1,
|
|
582
582
|
i: 0,
|
|
583
583
|
c: {}
|
|
584
584
|
});
|
|
585
585
|
}
|
|
586
|
-
if (c
|
|
586
|
+
if (c = a[o], c.t !== r && !(r === 1 && c.t === 3) || (r === 2 && (c.d || (c.d = !0, i[o] = []), i[o].push(i = {}), c.c[c.i++] = c = {
|
|
587
587
|
t: 1,
|
|
588
588
|
d: !1,
|
|
589
589
|
i: 0,
|
|
590
590
|
c: {}
|
|
591
|
-
}), c
|
|
592
|
-
if (c
|
|
593
|
-
else if (r
|
|
591
|
+
}), c.d)) return null;
|
|
592
|
+
if (c.d = !0, r === 1) i = s ? i[o] : i[o] = {};
|
|
593
|
+
else if (r === 0 && s) return null;
|
|
594
594
|
return [
|
|
595
|
-
o
|
|
596
|
-
i
|
|
597
|
-
c
|
|
595
|
+
o,
|
|
596
|
+
i,
|
|
597
|
+
c.c
|
|
598
598
|
];
|
|
599
599
|
}
|
|
600
|
-
function T(e
|
|
601
|
-
let i
|
|
602
|
-
for (let l
|
|
603
|
-
if (e
|
|
604
|
-
let t
|
|
605
|
-
if (t
|
|
606
|
-
if (e
|
|
607
|
-
toml: e
|
|
608
|
-
ptr: r
|
|
600
|
+
function T(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
|
|
601
|
+
let i = {}, a = {}, s = i, c = a;
|
|
602
|
+
for (let l = o(e, 0); l < e.length;) {
|
|
603
|
+
if (e[l] === `[`) {
|
|
604
|
+
let t = e[++l] === `[`, r = x(e, l += +t, `]`);
|
|
605
|
+
if (t) {
|
|
606
|
+
if (e[r[1] - 1] !== `]`) throw new n(`expected end of table declaration`, {
|
|
607
|
+
toml: e,
|
|
608
|
+
ptr: r[1] - 1
|
|
609
609
|
});
|
|
610
|
-
r
|
|
610
|
+
r[1]++;
|
|
611
611
|
}
|
|
612
|
-
let o
|
|
613
|
-
if (!o
|
|
614
|
-
toml: e
|
|
615
|
-
ptr: l
|
|
612
|
+
let o = w(r[0], i, a, t ? 2 : 1);
|
|
613
|
+
if (!o) throw new n(`trying to redefine an already defined table or value`, {
|
|
614
|
+
toml: e,
|
|
615
|
+
ptr: l
|
|
616
616
|
});
|
|
617
|
-
c
|
|
617
|
+
c = o[2], s = o[1], l = r[1];
|
|
618
618
|
} else {
|
|
619
|
-
let i
|
|
620
|
-
if (!a
|
|
621
|
-
toml: e
|
|
622
|
-
ptr: l
|
|
619
|
+
let i = x(e, l), a = w(i[0], s, c, 0);
|
|
620
|
+
if (!a) throw new n(`trying to redefine an already defined table or value`, {
|
|
621
|
+
toml: e,
|
|
622
|
+
ptr: l
|
|
623
623
|
});
|
|
624
|
-
let o
|
|
625
|
-
a
|
|
624
|
+
let o = y(e, i[1], void 0, t, r);
|
|
625
|
+
a[1][a[0]] = o[0], l = o[1];
|
|
626
626
|
}
|
|
627
|
-
if (l
|
|
628
|
-
` && e
|
|
629
|
-
toml: e
|
|
630
|
-
ptr: l
|
|
627
|
+
if (l = o(e, l, !0), e[l] && e[l] !== `
|
|
628
|
+
` && e[l] !== `\r`) throw new n(`each key-value declaration must be followed by an end-of-line`, {
|
|
629
|
+
toml: e,
|
|
630
|
+
ptr: l
|
|
631
631
|
});
|
|
632
|
-
l
|
|
632
|
+
l = o(e, l);
|
|
633
633
|
}
|
|
634
|
-
return i
|
|
634
|
+
return i;
|
|
635
635
|
}
|
|
636
636
|
|
|
637
637
|
//#endregion
|