mirror of
				https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
				synced 2025-10-31 09:55:30 +00:00 
			
		
		
		
	Fixed some build options for vite
This commit is contained in:
		
							
								
								
									
										2
									
								
								node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| import type { ScalarTag } from '../types.js'; | ||||
| export declare const binary: ScalarTag; | ||||
							
								
								
									
										68
									
								
								node_modules/yaml/dist/schema/yaml-1.1/binary.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								node_modules/yaml/dist/schema/yaml-1.1/binary.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,68 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var Scalar = require('../../nodes/Scalar.js'); | ||||
| var stringifyString = require('../../stringify/stringifyString.js'); | ||||
|  | ||||
| const binary = { | ||||
|     identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array | ||||
|     default: false, | ||||
|     tag: 'tag:yaml.org,2002:binary', | ||||
|     /** | ||||
|      * Returns a Buffer in node and an Uint8Array in browsers | ||||
|      * | ||||
|      * To use the resulting buffer as an image, you'll want to do something like: | ||||
|      * | ||||
|      *   const blob = new Blob([buffer], { type: 'image/jpeg' }) | ||||
|      *   document.querySelector('#photo').src = URL.createObjectURL(blob) | ||||
|      */ | ||||
|     resolve(src, onError) { | ||||
|         if (typeof Buffer === 'function') { | ||||
|             return Buffer.from(src, 'base64'); | ||||
|         } | ||||
|         else if (typeof atob === 'function') { | ||||
|             // On IE 11, atob() can't handle newlines | ||||
|             const str = atob(src.replace(/[\n\r]/g, '')); | ||||
|             const buffer = new Uint8Array(str.length); | ||||
|             for (let i = 0; i < str.length; ++i) | ||||
|                 buffer[i] = str.charCodeAt(i); | ||||
|             return buffer; | ||||
|         } | ||||
|         else { | ||||
|             onError('This environment does not support reading binary tags; either Buffer or atob is required'); | ||||
|             return src; | ||||
|         } | ||||
|     }, | ||||
|     stringify({ comment, type, value }, ctx, onComment, onChompKeep) { | ||||
|         const buf = value; // checked earlier by binary.identify() | ||||
|         let str; | ||||
|         if (typeof Buffer === 'function') { | ||||
|             str = | ||||
|                 buf instanceof Buffer | ||||
|                     ? buf.toString('base64') | ||||
|                     : Buffer.from(buf.buffer).toString('base64'); | ||||
|         } | ||||
|         else if (typeof btoa === 'function') { | ||||
|             let s = ''; | ||||
|             for (let i = 0; i < buf.length; ++i) | ||||
|                 s += String.fromCharCode(buf[i]); | ||||
|             str = btoa(s); | ||||
|         } | ||||
|         else { | ||||
|             throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required'); | ||||
|         } | ||||
|         if (!type) | ||||
|             type = Scalar.Scalar.BLOCK_LITERAL; | ||||
|         if (type !== Scalar.Scalar.QUOTE_DOUBLE) { | ||||
|             const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); | ||||
|             const n = Math.ceil(str.length / lineWidth); | ||||
|             const lines = new Array(n); | ||||
|             for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { | ||||
|                 lines[i] = str.substr(o, lineWidth); | ||||
|             } | ||||
|             str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? '\n' : ' '); | ||||
|         } | ||||
|         return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); | ||||
|     } | ||||
| }; | ||||
|  | ||||
| exports.binary = binary; | ||||
							
								
								
									
										7
									
								
								node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| import type { ScalarTag } from '../types.js'; | ||||
| export declare const trueTag: ScalarTag & { | ||||
|     test: RegExp; | ||||
| }; | ||||
| export declare const falseTag: ScalarTag & { | ||||
|     test: RegExp; | ||||
| }; | ||||
							
								
								
									
										29
									
								
								node_modules/yaml/dist/schema/yaml-1.1/bool.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								node_modules/yaml/dist/schema/yaml-1.1/bool.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var Scalar = require('../../nodes/Scalar.js'); | ||||
|  | ||||
| function boolStringify({ value, source }, ctx) { | ||||
|     const boolObj = value ? trueTag : falseTag; | ||||
|     if (source && boolObj.test.test(source)) | ||||
|         return source; | ||||
|     return value ? ctx.options.trueStr : ctx.options.falseStr; | ||||
| } | ||||
| const trueTag = { | ||||
|     identify: value => value === true, | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:bool', | ||||
|     test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, | ||||
|     resolve: () => new Scalar.Scalar(true), | ||||
|     stringify: boolStringify | ||||
| }; | ||||
| const falseTag = { | ||||
|     identify: value => value === false, | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:bool', | ||||
|     test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, | ||||
|     resolve: () => new Scalar.Scalar(false), | ||||
|     stringify: boolStringify | ||||
| }; | ||||
|  | ||||
| exports.falseTag = falseTag; | ||||
| exports.trueTag = trueTag; | ||||
							
								
								
									
										4
									
								
								node_modules/yaml/dist/schema/yaml-1.1/float.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								node_modules/yaml/dist/schema/yaml-1.1/float.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| import type { ScalarTag } from '../types.js'; | ||||
| export declare const floatNaN: ScalarTag; | ||||
| export declare const floatExp: ScalarTag; | ||||
| export declare const float: ScalarTag; | ||||
							
								
								
									
										50
									
								
								node_modules/yaml/dist/schema/yaml-1.1/float.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								node_modules/yaml/dist/schema/yaml-1.1/float.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var Scalar = require('../../nodes/Scalar.js'); | ||||
| var stringifyNumber = require('../../stringify/stringifyNumber.js'); | ||||
|  | ||||
| const floatNaN = { | ||||
|     identify: value => typeof value === 'number', | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:float', | ||||
|     test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, | ||||
|     resolve: (str) => str.slice(-3).toLowerCase() === 'nan' | ||||
|         ? NaN | ||||
|         : str[0] === '-' | ||||
|             ? Number.NEGATIVE_INFINITY | ||||
|             : Number.POSITIVE_INFINITY, | ||||
|     stringify: stringifyNumber.stringifyNumber | ||||
| }; | ||||
| const floatExp = { | ||||
|     identify: value => typeof value === 'number', | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:float', | ||||
|     format: 'EXP', | ||||
|     test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, | ||||
|     resolve: (str) => parseFloat(str.replace(/_/g, '')), | ||||
|     stringify(node) { | ||||
|         const num = Number(node.value); | ||||
|         return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); | ||||
|     } | ||||
| }; | ||||
| const float = { | ||||
|     identify: value => typeof value === 'number', | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:float', | ||||
|     test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, | ||||
|     resolve(str) { | ||||
|         const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, ''))); | ||||
|         const dot = str.indexOf('.'); | ||||
|         if (dot !== -1) { | ||||
|             const f = str.substring(dot + 1).replace(/_/g, ''); | ||||
|             if (f[f.length - 1] === '0') | ||||
|                 node.minFractionDigits = f.length; | ||||
|         } | ||||
|         return node; | ||||
|     }, | ||||
|     stringify: stringifyNumber.stringifyNumber | ||||
| }; | ||||
|  | ||||
| exports.float = float; | ||||
| exports.floatExp = floatExp; | ||||
| exports.floatNaN = floatNaN; | ||||
							
								
								
									
										5
									
								
								node_modules/yaml/dist/schema/yaml-1.1/int.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								node_modules/yaml/dist/schema/yaml-1.1/int.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| import type { ScalarTag } from '../types.js'; | ||||
| export declare const intBin: ScalarTag; | ||||
| export declare const intOct: ScalarTag; | ||||
| export declare const int: ScalarTag; | ||||
| export declare const intHex: ScalarTag; | ||||
							
								
								
									
										76
									
								
								node_modules/yaml/dist/schema/yaml-1.1/int.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								node_modules/yaml/dist/schema/yaml-1.1/int.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,76 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var stringifyNumber = require('../../stringify/stringifyNumber.js'); | ||||
|  | ||||
| const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value); | ||||
| function intResolve(str, offset, radix, { intAsBigInt }) { | ||||
|     const sign = str[0]; | ||||
|     if (sign === '-' || sign === '+') | ||||
|         offset += 1; | ||||
|     str = str.substring(offset).replace(/_/g, ''); | ||||
|     if (intAsBigInt) { | ||||
|         switch (radix) { | ||||
|             case 2: | ||||
|                 str = `0b${str}`; | ||||
|                 break; | ||||
|             case 8: | ||||
|                 str = `0o${str}`; | ||||
|                 break; | ||||
|             case 16: | ||||
|                 str = `0x${str}`; | ||||
|                 break; | ||||
|         } | ||||
|         const n = BigInt(str); | ||||
|         return sign === '-' ? BigInt(-1) * n : n; | ||||
|     } | ||||
|     const n = parseInt(str, radix); | ||||
|     return sign === '-' ? -1 * n : n; | ||||
| } | ||||
| function intStringify(node, radix, prefix) { | ||||
|     const { value } = node; | ||||
|     if (intIdentify(value)) { | ||||
|         const str = value.toString(radix); | ||||
|         return value < 0 ? '-' + prefix + str.substr(1) : prefix + str; | ||||
|     } | ||||
|     return stringifyNumber.stringifyNumber(node); | ||||
| } | ||||
| const intBin = { | ||||
|     identify: intIdentify, | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:int', | ||||
|     format: 'BIN', | ||||
|     test: /^[-+]?0b[0-1_]+$/, | ||||
|     resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt), | ||||
|     stringify: node => intStringify(node, 2, '0b') | ||||
| }; | ||||
| const intOct = { | ||||
|     identify: intIdentify, | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:int', | ||||
|     format: 'OCT', | ||||
|     test: /^[-+]?0[0-7_]+$/, | ||||
|     resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt), | ||||
|     stringify: node => intStringify(node, 8, '0') | ||||
| }; | ||||
| const int = { | ||||
|     identify: intIdentify, | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:int', | ||||
|     test: /^[-+]?[0-9][0-9_]*$/, | ||||
|     resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), | ||||
|     stringify: stringifyNumber.stringifyNumber | ||||
| }; | ||||
| const intHex = { | ||||
|     identify: intIdentify, | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:int', | ||||
|     format: 'HEX', | ||||
|     test: /^[-+]?0x[0-9a-fA-F_]+$/, | ||||
|     resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), | ||||
|     stringify: node => intStringify(node, 16, '0x') | ||||
| }; | ||||
|  | ||||
| exports.int = int; | ||||
| exports.intBin = intBin; | ||||
| exports.intHex = intHex; | ||||
| exports.intOct = intOct; | ||||
							
								
								
									
										9
									
								
								node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| import type { ToJSContext } from '../../nodes/toJS.js'; | ||||
| import type { MapLike } from '../../nodes/YAMLMap.js'; | ||||
| import type { ScalarTag } from '../types.js'; | ||||
| export declare const merge: ScalarTag & { | ||||
|     identify(value: unknown): boolean; | ||||
|     test: RegExp; | ||||
| }; | ||||
| export declare const isMergeKey: (ctx: ToJSContext | undefined, key: unknown) => boolean | undefined; | ||||
| export declare function addMergeToJSMap(ctx: ToJSContext | undefined, map: MapLike, value: unknown): void; | ||||
							
								
								
									
										68
									
								
								node_modules/yaml/dist/schema/yaml-1.1/merge.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								node_modules/yaml/dist/schema/yaml-1.1/merge.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,68 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var identity = require('../../nodes/identity.js'); | ||||
| var Scalar = require('../../nodes/Scalar.js'); | ||||
|  | ||||
| // If the value associated with a merge key is a single mapping node, each of | ||||
| // its key/value pairs is inserted into the current mapping, unless the key | ||||
| // already exists in it. If the value associated with the merge key is a | ||||
| // sequence, then this sequence is expected to contain mapping nodes and each | ||||
| // of these nodes is merged in turn according to its order in the sequence. | ||||
| // Keys in mapping nodes earlier in the sequence override keys specified in | ||||
| // later mapping nodes. -- http://yaml.org/type/merge.html | ||||
| const MERGE_KEY = '<<'; | ||||
| const merge = { | ||||
|     identify: value => value === MERGE_KEY || | ||||
|         (typeof value === 'symbol' && value.description === MERGE_KEY), | ||||
|     default: 'key', | ||||
|     tag: 'tag:yaml.org,2002:merge', | ||||
|     test: /^<<$/, | ||||
|     resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), { | ||||
|         addToJSMap: addMergeToJSMap | ||||
|     }), | ||||
|     stringify: () => MERGE_KEY | ||||
| }; | ||||
| const isMergeKey = (ctx, key) => (merge.identify(key) || | ||||
|     (identity.isScalar(key) && | ||||
|         (!key.type || key.type === Scalar.Scalar.PLAIN) && | ||||
|         merge.identify(key.value))) && | ||||
|     ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default); | ||||
| function addMergeToJSMap(ctx, map, value) { | ||||
|     value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value; | ||||
|     if (identity.isSeq(value)) | ||||
|         for (const it of value.items) | ||||
|             mergeValue(ctx, map, it); | ||||
|     else if (Array.isArray(value)) | ||||
|         for (const it of value) | ||||
|             mergeValue(ctx, map, it); | ||||
|     else | ||||
|         mergeValue(ctx, map, value); | ||||
| } | ||||
| function mergeValue(ctx, map, value) { | ||||
|     const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value; | ||||
|     if (!identity.isMap(source)) | ||||
|         throw new Error('Merge sources must be maps or map aliases'); | ||||
|     const srcMap = source.toJSON(null, ctx, Map); | ||||
|     for (const [key, value] of srcMap) { | ||||
|         if (map instanceof Map) { | ||||
|             if (!map.has(key)) | ||||
|                 map.set(key, value); | ||||
|         } | ||||
|         else if (map instanceof Set) { | ||||
|             map.add(key); | ||||
|         } | ||||
|         else if (!Object.prototype.hasOwnProperty.call(map, key)) { | ||||
|             Object.defineProperty(map, key, { | ||||
|                 value, | ||||
|                 writable: true, | ||||
|                 enumerable: true, | ||||
|                 configurable: true | ||||
|             }); | ||||
|         } | ||||
|     } | ||||
|     return map; | ||||
| } | ||||
|  | ||||
| exports.addMergeToJSMap = addMergeToJSMap; | ||||
| exports.isMergeKey = isMergeKey; | ||||
| exports.merge = merge; | ||||
							
								
								
									
										28
									
								
								node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| import { ToJSContext } from '../../nodes/toJS.js'; | ||||
| import { YAMLSeq } from '../../nodes/YAMLSeq.js'; | ||||
| import { CreateNodeContext } from '../../util.js'; | ||||
| import type { Schema } from '../Schema.js'; | ||||
| import { CollectionTag } from '../types.js'; | ||||
| export declare class YAMLOMap extends YAMLSeq { | ||||
|     static tag: string; | ||||
|     constructor(); | ||||
|     add: (pair: import("../../index.js").Pair<any, any> | { | ||||
|         key: any; | ||||
|         value: any; | ||||
|     }, overwrite?: boolean) => void; | ||||
|     delete: (key: unknown) => boolean; | ||||
|     get: { | ||||
|         (key: unknown, keepScalar: true): import("../../index.js").Scalar<any> | undefined; | ||||
|         (key: unknown, keepScalar?: false): any; | ||||
|         (key: unknown, keepScalar?: boolean): any; | ||||
|     }; | ||||
|     has: (key: unknown) => boolean; | ||||
|     set: (key: any, value: any) => void; | ||||
|     /** | ||||
|      * If `ctx` is given, the return type is actually `Map<unknown, unknown>`, | ||||
|      * but TypeScript won't allow widening the signature of a child method. | ||||
|      */ | ||||
|     toJSON(_?: unknown, ctx?: ToJSContext): unknown[]; | ||||
|     static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLOMap; | ||||
| } | ||||
| export declare const omap: CollectionTag; | ||||
							
								
								
									
										77
									
								
								node_modules/yaml/dist/schema/yaml-1.1/omap.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								node_modules/yaml/dist/schema/yaml-1.1/omap.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,77 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var identity = require('../../nodes/identity.js'); | ||||
| var toJS = require('../../nodes/toJS.js'); | ||||
| var YAMLMap = require('../../nodes/YAMLMap.js'); | ||||
| var YAMLSeq = require('../../nodes/YAMLSeq.js'); | ||||
| var pairs = require('./pairs.js'); | ||||
|  | ||||
| class YAMLOMap extends YAMLSeq.YAMLSeq { | ||||
|     constructor() { | ||||
|         super(); | ||||
|         this.add = YAMLMap.YAMLMap.prototype.add.bind(this); | ||||
|         this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this); | ||||
|         this.get = YAMLMap.YAMLMap.prototype.get.bind(this); | ||||
|         this.has = YAMLMap.YAMLMap.prototype.has.bind(this); | ||||
|         this.set = YAMLMap.YAMLMap.prototype.set.bind(this); | ||||
|         this.tag = YAMLOMap.tag; | ||||
|     } | ||||
|     /** | ||||
|      * If `ctx` is given, the return type is actually `Map<unknown, unknown>`, | ||||
|      * but TypeScript won't allow widening the signature of a child method. | ||||
|      */ | ||||
|     toJSON(_, ctx) { | ||||
|         if (!ctx) | ||||
|             return super.toJSON(_); | ||||
|         const map = new Map(); | ||||
|         if (ctx?.onCreate) | ||||
|             ctx.onCreate(map); | ||||
|         for (const pair of this.items) { | ||||
|             let key, value; | ||||
|             if (identity.isPair(pair)) { | ||||
|                 key = toJS.toJS(pair.key, '', ctx); | ||||
|                 value = toJS.toJS(pair.value, key, ctx); | ||||
|             } | ||||
|             else { | ||||
|                 key = toJS.toJS(pair, '', ctx); | ||||
|             } | ||||
|             if (map.has(key)) | ||||
|                 throw new Error('Ordered maps must not include duplicate keys'); | ||||
|             map.set(key, value); | ||||
|         } | ||||
|         return map; | ||||
|     } | ||||
|     static from(schema, iterable, ctx) { | ||||
|         const pairs$1 = pairs.createPairs(schema, iterable, ctx); | ||||
|         const omap = new this(); | ||||
|         omap.items = pairs$1.items; | ||||
|         return omap; | ||||
|     } | ||||
| } | ||||
| YAMLOMap.tag = 'tag:yaml.org,2002:omap'; | ||||
| const omap = { | ||||
|     collection: 'seq', | ||||
|     identify: value => value instanceof Map, | ||||
|     nodeClass: YAMLOMap, | ||||
|     default: false, | ||||
|     tag: 'tag:yaml.org,2002:omap', | ||||
|     resolve(seq, onError) { | ||||
|         const pairs$1 = pairs.resolvePairs(seq, onError); | ||||
|         const seenKeys = []; | ||||
|         for (const { key } of pairs$1.items) { | ||||
|             if (identity.isScalar(key)) { | ||||
|                 if (seenKeys.includes(key.value)) { | ||||
|                     onError(`Ordered maps must not include duplicate keys: ${key.value}`); | ||||
|                 } | ||||
|                 else { | ||||
|                     seenKeys.push(key.value); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         return Object.assign(new YAMLOMap(), pairs$1); | ||||
|     }, | ||||
|     createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx) | ||||
| }; | ||||
|  | ||||
| exports.YAMLOMap = YAMLOMap; | ||||
| exports.omap = omap; | ||||
							
								
								
									
										10
									
								
								node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| import type { CreateNodeContext } from '../../doc/createNode.js'; | ||||
| import type { ParsedNode } from '../../nodes/Node.js'; | ||||
| import { Pair } from '../../nodes/Pair.js'; | ||||
| import { YAMLMap } from '../../nodes/YAMLMap.js'; | ||||
| import { YAMLSeq } from '../../nodes/YAMLSeq.js'; | ||||
| import type { Schema } from '../../schema/Schema.js'; | ||||
| import type { CollectionTag } from '../types.js'; | ||||
| export declare function resolvePairs(seq: YAMLSeq.Parsed<ParsedNode | Pair<ParsedNode, ParsedNode | null>> | YAMLMap.Parsed, onError: (message: string) => void): YAMLSeq.Parsed<Pair<ParsedNode, ParsedNode | null>>; | ||||
| export declare function createPairs(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSeq<unknown>; | ||||
| export declare const pairs: CollectionTag; | ||||
							
								
								
									
										82
									
								
								node_modules/yaml/dist/schema/yaml-1.1/pairs.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								node_modules/yaml/dist/schema/yaml-1.1/pairs.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,82 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var identity = require('../../nodes/identity.js'); | ||||
| var Pair = require('../../nodes/Pair.js'); | ||||
| var Scalar = require('../../nodes/Scalar.js'); | ||||
| var YAMLSeq = require('../../nodes/YAMLSeq.js'); | ||||
|  | ||||
| function resolvePairs(seq, onError) { | ||||
|     if (identity.isSeq(seq)) { | ||||
|         for (let i = 0; i < seq.items.length; ++i) { | ||||
|             let item = seq.items[i]; | ||||
|             if (identity.isPair(item)) | ||||
|                 continue; | ||||
|             else if (identity.isMap(item)) { | ||||
|                 if (item.items.length > 1) | ||||
|                     onError('Each pair must have its own sequence indicator'); | ||||
|                 const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null)); | ||||
|                 if (item.commentBefore) | ||||
|                     pair.key.commentBefore = pair.key.commentBefore | ||||
|                         ? `${item.commentBefore}\n${pair.key.commentBefore}` | ||||
|                         : item.commentBefore; | ||||
|                 if (item.comment) { | ||||
|                     const cn = pair.value ?? pair.key; | ||||
|                     cn.comment = cn.comment | ||||
|                         ? `${item.comment}\n${cn.comment}` | ||||
|                         : item.comment; | ||||
|                 } | ||||
|                 item = pair; | ||||
|             } | ||||
|             seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item); | ||||
|         } | ||||
|     } | ||||
|     else | ||||
|         onError('Expected a sequence for this tag'); | ||||
|     return seq; | ||||
| } | ||||
| function createPairs(schema, iterable, ctx) { | ||||
|     const { replacer } = ctx; | ||||
|     const pairs = new YAMLSeq.YAMLSeq(schema); | ||||
|     pairs.tag = 'tag:yaml.org,2002:pairs'; | ||||
|     let i = 0; | ||||
|     if (iterable && Symbol.iterator in Object(iterable)) | ||||
|         for (let it of iterable) { | ||||
|             if (typeof replacer === 'function') | ||||
|                 it = replacer.call(iterable, String(i++), it); | ||||
|             let key, value; | ||||
|             if (Array.isArray(it)) { | ||||
|                 if (it.length === 2) { | ||||
|                     key = it[0]; | ||||
|                     value = it[1]; | ||||
|                 } | ||||
|                 else | ||||
|                     throw new TypeError(`Expected [key, value] tuple: ${it}`); | ||||
|             } | ||||
|             else if (it && it instanceof Object) { | ||||
|                 const keys = Object.keys(it); | ||||
|                 if (keys.length === 1) { | ||||
|                     key = keys[0]; | ||||
|                     value = it[key]; | ||||
|                 } | ||||
|                 else { | ||||
|                     throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`); | ||||
|                 } | ||||
|             } | ||||
|             else { | ||||
|                 key = it; | ||||
|             } | ||||
|             pairs.items.push(Pair.createPair(key, value, ctx)); | ||||
|         } | ||||
|     return pairs; | ||||
| } | ||||
| const pairs = { | ||||
|     collection: 'seq', | ||||
|     default: false, | ||||
|     tag: 'tag:yaml.org,2002:pairs', | ||||
|     resolve: resolvePairs, | ||||
|     createNode: createPairs | ||||
| }; | ||||
|  | ||||
| exports.createPairs = createPairs; | ||||
| exports.pairs = pairs; | ||||
| exports.resolvePairs = resolvePairs; | ||||
							
								
								
									
										1
									
								
								node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| export declare const schema: (import("../types.js").CollectionTag | import("../types.js").ScalarTag)[]; | ||||
							
								
								
									
										41
									
								
								node_modules/yaml/dist/schema/yaml-1.1/schema.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								node_modules/yaml/dist/schema/yaml-1.1/schema.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var map = require('../common/map.js'); | ||||
| var _null = require('../common/null.js'); | ||||
| var seq = require('../common/seq.js'); | ||||
| var string = require('../common/string.js'); | ||||
| var binary = require('./binary.js'); | ||||
| var bool = require('./bool.js'); | ||||
| var float = require('./float.js'); | ||||
| var int = require('./int.js'); | ||||
| var merge = require('./merge.js'); | ||||
| var omap = require('./omap.js'); | ||||
| var pairs = require('./pairs.js'); | ||||
| var set = require('./set.js'); | ||||
| var timestamp = require('./timestamp.js'); | ||||
|  | ||||
| const schema = [ | ||||
|     map.map, | ||||
|     seq.seq, | ||||
|     string.string, | ||||
|     _null.nullTag, | ||||
|     bool.trueTag, | ||||
|     bool.falseTag, | ||||
|     int.intBin, | ||||
|     int.intOct, | ||||
|     int.int, | ||||
|     int.intHex, | ||||
|     float.floatNaN, | ||||
|     float.floatExp, | ||||
|     float.float, | ||||
|     binary.binary, | ||||
|     merge.merge, | ||||
|     omap.omap, | ||||
|     pairs.pairs, | ||||
|     set.set, | ||||
|     timestamp.intTime, | ||||
|     timestamp.floatTime, | ||||
|     timestamp.timestamp | ||||
| ]; | ||||
|  | ||||
| exports.schema = schema; | ||||
							
								
								
									
										28
									
								
								node_modules/yaml/dist/schema/yaml-1.1/set.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								node_modules/yaml/dist/schema/yaml-1.1/set.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| import { Pair } from '../../nodes/Pair.js'; | ||||
| import { Scalar } from '../../nodes/Scalar.js'; | ||||
| import { ToJSContext } from '../../nodes/toJS.js'; | ||||
| import { YAMLMap } from '../../nodes/YAMLMap.js'; | ||||
| import type { Schema } from '../../schema/Schema.js'; | ||||
| import type { StringifyContext } from '../../stringify/stringify.js'; | ||||
| import { CreateNodeContext } from '../../util.js'; | ||||
| import type { CollectionTag } from '../types.js'; | ||||
| export declare class YAMLSet<T = unknown> extends YAMLMap<T, Scalar<null> | null> { | ||||
|     static tag: string; | ||||
|     constructor(schema?: Schema); | ||||
|     add(key: T | Pair<T, Scalar<null> | null> | { | ||||
|         key: T; | ||||
|         value: Scalar<null> | null; | ||||
|     }): void; | ||||
|     /** | ||||
|      * If `keepPair` is `true`, returns the Pair matching `key`. | ||||
|      * Otherwise, returns the value of that Pair's key. | ||||
|      */ | ||||
|     get(key: unknown, keepPair?: boolean): any; | ||||
|     set(key: T, value: boolean): void; | ||||
|     /** @deprecated Will throw; `value` must be boolean */ | ||||
|     set(key: T, value: null): void; | ||||
|     toJSON(_?: unknown, ctx?: ToJSContext): any; | ||||
|     toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; | ||||
|     static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet<unknown>; | ||||
| } | ||||
| export declare const set: CollectionTag; | ||||
							
								
								
									
										96
									
								
								node_modules/yaml/dist/schema/yaml-1.1/set.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								node_modules/yaml/dist/schema/yaml-1.1/set.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var identity = require('../../nodes/identity.js'); | ||||
| var Pair = require('../../nodes/Pair.js'); | ||||
| var YAMLMap = require('../../nodes/YAMLMap.js'); | ||||
|  | ||||
| class YAMLSet extends YAMLMap.YAMLMap { | ||||
|     constructor(schema) { | ||||
|         super(schema); | ||||
|         this.tag = YAMLSet.tag; | ||||
|     } | ||||
|     add(key) { | ||||
|         let pair; | ||||
|         if (identity.isPair(key)) | ||||
|             pair = key; | ||||
|         else if (key && | ||||
|             typeof key === 'object' && | ||||
|             'key' in key && | ||||
|             'value' in key && | ||||
|             key.value === null) | ||||
|             pair = new Pair.Pair(key.key, null); | ||||
|         else | ||||
|             pair = new Pair.Pair(key, null); | ||||
|         const prev = YAMLMap.findPair(this.items, pair.key); | ||||
|         if (!prev) | ||||
|             this.items.push(pair); | ||||
|     } | ||||
|     /** | ||||
|      * If `keepPair` is `true`, returns the Pair matching `key`. | ||||
|      * Otherwise, returns the value of that Pair's key. | ||||
|      */ | ||||
|     get(key, keepPair) { | ||||
|         const pair = YAMLMap.findPair(this.items, key); | ||||
|         return !keepPair && identity.isPair(pair) | ||||
|             ? identity.isScalar(pair.key) | ||||
|                 ? pair.key.value | ||||
|                 : pair.key | ||||
|             : pair; | ||||
|     } | ||||
|     set(key, value) { | ||||
|         if (typeof value !== 'boolean') | ||||
|             throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); | ||||
|         const prev = YAMLMap.findPair(this.items, key); | ||||
|         if (prev && !value) { | ||||
|             this.items.splice(this.items.indexOf(prev), 1); | ||||
|         } | ||||
|         else if (!prev && value) { | ||||
|             this.items.push(new Pair.Pair(key)); | ||||
|         } | ||||
|     } | ||||
|     toJSON(_, ctx) { | ||||
|         return super.toJSON(_, ctx, Set); | ||||
|     } | ||||
|     toString(ctx, onComment, onChompKeep) { | ||||
|         if (!ctx) | ||||
|             return JSON.stringify(this); | ||||
|         if (this.hasAllNullValues(true)) | ||||
|             return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); | ||||
|         else | ||||
|             throw new Error('Set items must all have null values'); | ||||
|     } | ||||
|     static from(schema, iterable, ctx) { | ||||
|         const { replacer } = ctx; | ||||
|         const set = new this(schema); | ||||
|         if (iterable && Symbol.iterator in Object(iterable)) | ||||
|             for (let value of iterable) { | ||||
|                 if (typeof replacer === 'function') | ||||
|                     value = replacer.call(iterable, value, value); | ||||
|                 set.items.push(Pair.createPair(value, null, ctx)); | ||||
|             } | ||||
|         return set; | ||||
|     } | ||||
| } | ||||
| YAMLSet.tag = 'tag:yaml.org,2002:set'; | ||||
| const set = { | ||||
|     collection: 'map', | ||||
|     identify: value => value instanceof Set, | ||||
|     nodeClass: YAMLSet, | ||||
|     default: false, | ||||
|     tag: 'tag:yaml.org,2002:set', | ||||
|     createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx), | ||||
|     resolve(map, onError) { | ||||
|         if (identity.isMap(map)) { | ||||
|             if (map.hasAllNullValues(true)) | ||||
|                 return Object.assign(new YAMLSet(), map); | ||||
|             else | ||||
|                 onError('Set items must all have null values'); | ||||
|         } | ||||
|         else | ||||
|             onError('Expected a mapping for this tag'); | ||||
|         return map; | ||||
|     } | ||||
| }; | ||||
|  | ||||
| exports.YAMLSet = YAMLSet; | ||||
| exports.set = set; | ||||
							
								
								
									
										6
									
								
								node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| import type { ScalarTag } from '../types.js'; | ||||
| export declare const intTime: ScalarTag; | ||||
| export declare const floatTime: ScalarTag; | ||||
| export declare const timestamp: ScalarTag & { | ||||
|     test: RegExp; | ||||
| }; | ||||
							
								
								
									
										105
									
								
								node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,105 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var stringifyNumber = require('../../stringify/stringifyNumber.js'); | ||||
|  | ||||
| /** Internal types handle bigint as number, because TS can't figure it out. */ | ||||
| function parseSexagesimal(str, asBigInt) { | ||||
|     const sign = str[0]; | ||||
|     const parts = sign === '-' || sign === '+' ? str.substring(1) : str; | ||||
|     const num = (n) => asBigInt ? BigInt(n) : Number(n); | ||||
|     const res = parts | ||||
|         .replace(/_/g, '') | ||||
|         .split(':') | ||||
|         .reduce((res, p) => res * num(60) + num(p), num(0)); | ||||
|     return (sign === '-' ? num(-1) * res : res); | ||||
| } | ||||
| /** | ||||
|  * hhhh:mm:ss.sss | ||||
|  * | ||||
|  * Internal types handle bigint as number, because TS can't figure it out. | ||||
|  */ | ||||
| function stringifySexagesimal(node) { | ||||
|     let { value } = node; | ||||
|     let num = (n) => n; | ||||
|     if (typeof value === 'bigint') | ||||
|         num = n => BigInt(n); | ||||
|     else if (isNaN(value) || !isFinite(value)) | ||||
|         return stringifyNumber.stringifyNumber(node); | ||||
|     let sign = ''; | ||||
|     if (value < 0) { | ||||
|         sign = '-'; | ||||
|         value *= num(-1); | ||||
|     } | ||||
|     const _60 = num(60); | ||||
|     const parts = [value % _60]; // seconds, including ms | ||||
|     if (value < 60) { | ||||
|         parts.unshift(0); // at least one : is required | ||||
|     } | ||||
|     else { | ||||
|         value = (value - parts[0]) / _60; | ||||
|         parts.unshift(value % _60); // minutes | ||||
|         if (value >= 60) { | ||||
|             value = (value - parts[0]) / _60; | ||||
|             parts.unshift(value); // hours | ||||
|         } | ||||
|     } | ||||
|     return (sign + | ||||
|         parts | ||||
|             .map(n => String(n).padStart(2, '0')) | ||||
|             .join(':') | ||||
|             .replace(/000000\d*$/, '') // % 60 may introduce error | ||||
|     ); | ||||
| } | ||||
| const intTime = { | ||||
|     identify: value => typeof value === 'bigint' || Number.isInteger(value), | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:int', | ||||
|     format: 'TIME', | ||||
|     test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, | ||||
|     resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), | ||||
|     stringify: stringifySexagesimal | ||||
| }; | ||||
| const floatTime = { | ||||
|     identify: value => typeof value === 'number', | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:float', | ||||
|     format: 'TIME', | ||||
|     test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, | ||||
|     resolve: str => parseSexagesimal(str, false), | ||||
|     stringify: stringifySexagesimal | ||||
| }; | ||||
| const timestamp = { | ||||
|     identify: value => value instanceof Date, | ||||
|     default: true, | ||||
|     tag: 'tag:yaml.org,2002:timestamp', | ||||
|     // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part | ||||
|     // may be omitted altogether, resulting in a date format. In such a case, the time part is | ||||
|     // assumed to be 00:00:00Z (start of day, UTC). | ||||
|     test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd | ||||
|         '(?:' + // time is optional | ||||
|         '(?:t|T|[ \\t]+)' + // t | T | whitespace | ||||
|         '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)? | ||||
|         '(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30 | ||||
|         ')?$'), | ||||
|     resolve(str) { | ||||
|         const match = str.match(timestamp.test); | ||||
|         if (!match) | ||||
|             throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd'); | ||||
|         const [, year, month, day, hour, minute, second] = match.map(Number); | ||||
|         const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0; | ||||
|         let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); | ||||
|         const tz = match[8]; | ||||
|         if (tz && tz !== 'Z') { | ||||
|             let d = parseSexagesimal(tz, false); | ||||
|             if (Math.abs(d) < 30) | ||||
|                 d *= 60; | ||||
|             date -= 60000 * d; | ||||
|         } | ||||
|         return new Date(date); | ||||
|     }, | ||||
|     stringify: ({ value }) => value.toISOString().replace(/(T00:00:00)?\.000Z$/, '') | ||||
| }; | ||||
|  | ||||
| exports.floatTime = floatTime; | ||||
| exports.intTime = intTime; | ||||
| exports.timestamp = timestamp; | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens