@fern-api/php-dynamic-snippets 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/cjs/DynamicSnippetsGenerator.cjs +18 -11
  2. package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
  3. package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
  4. package/cjs/{DynamicSnippetsGeneratorContext-7JXlOyjB.d.cts → DynamicSnippetsGeneratorContext-CwkDTYOI.d.cts} +3 -3
  5. package/cjs/EndpointSnippetGenerator.cjs +20 -13
  6. package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
  7. package/cjs/EndpointSnippetGenerator.d.cts +5 -1
  8. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +17 -10
  9. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
  10. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
  11. package/cjs/context/DynamicTypeLiteralMapper.cjs +17 -10
  12. package/cjs/context/DynamicTypeLiteralMapper.cjs.map +1 -1
  13. package/cjs/context/DynamicTypeLiteralMapper.d.cts +1 -1
  14. package/cjs/context/FilePropertyMapper.cjs +17 -10
  15. package/cjs/context/FilePropertyMapper.cjs.map +1 -1
  16. package/cjs/context/FilePropertyMapper.d.cts +1 -1
  17. package/cjs/index.cjs +20 -25
  18. package/cjs/index.cjs.map +1 -1
  19. package/cjs/index.d.cts +1 -1
  20. package/esm/DynamicSnippetsGenerator.d.ts +1 -1
  21. package/esm/DynamicSnippetsGenerator.js +1 -1
  22. package/esm/{DynamicSnippetsGeneratorContext-7JXlOyjB.d.ts → DynamicSnippetsGeneratorContext-CwkDTYOI.d.ts} +3 -3
  23. package/esm/EndpointSnippetGenerator.d.ts +5 -1
  24. package/esm/EndpointSnippetGenerator.js +1 -1
  25. package/esm/chunk-3LG5WCZI.js +2 -0
  26. package/esm/chunk-3LG5WCZI.js.map +1 -0
  27. package/esm/{chunk-KU3OGJUU.js → chunk-3QAUV5WT.js} +2 -2
  28. package/esm/chunk-CPIHNCS3.js +4 -0
  29. package/esm/chunk-CPIHNCS3.js.map +1 -0
  30. package/esm/chunk-DFQIKN25.js +2 -0
  31. package/esm/{chunk-625QSFAH.js → chunk-EECVWAVT.js} +2 -2
  32. package/esm/{chunk-625QSFAH.js.map → chunk-EECVWAVT.js.map} +1 -1
  33. package/esm/chunk-PYHFKEW4.js +47 -0
  34. package/esm/chunk-PYHFKEW4.js.map +1 -0
  35. package/esm/chunk-XX3MRTVI.js +2 -0
  36. package/esm/chunk-XX3MRTVI.js.map +1 -0
  37. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
  38. package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
  39. package/esm/context/DynamicTypeLiteralMapper.d.ts +1 -1
  40. package/esm/context/DynamicTypeLiteralMapper.js +1 -1
  41. package/esm/context/FilePropertyMapper.d.ts +1 -1
  42. package/esm/context/FilePropertyMapper.js +1 -1
  43. package/esm/index.d.ts +1 -1
  44. package/esm/index.js +1 -13
  45. package/esm/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/esm/chunk-7MI6WLZG.js +0 -2
  48. package/esm/chunk-7MI6WLZG.js.map +0 -1
  49. package/esm/chunk-BYNT7UJT.js +0 -2
  50. package/esm/chunk-BYNT7UJT.js.map +0 -1
  51. package/esm/chunk-J4Y3S6QS.js +0 -40
  52. package/esm/chunk-J4Y3S6QS.js.map +0 -1
  53. package/esm/chunk-YKXTGZL6.js +0 -4
  54. package/esm/chunk-YKXTGZL6.js.map +0 -1
  55. package/esm/chunk-ZYT6M32A.js +0 -2
  56. /package/esm/{chunk-KU3OGJUU.js.map → chunk-3QAUV5WT.js.map} +0 -0
  57. /package/esm/{chunk-ZYT6M32A.js.map → chunk-DFQIKN25.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../browser-compatible-base/src/dynamic-snippets/AbstractDynamicSnippetsGenerator.ts","../../../../browser-compatible-base/src/dynamic-snippets/Result.ts","../../../../browser-compatible-base/src/dynamic-snippets/ErrorReporter.ts","../../../../browser-compatible-base/src/dynamic-snippets/AbstractDynamicSnippetsGeneratorContext.ts","../../../../../packages/cli/fern-definition/schema/src/index.ts","../../../../../packages/cli/fern-definition/schema/src/utils/HttpEndpointReferenceParser.ts","../../../../browser-compatible-base/src/dynamic-snippets/Scope.ts","../../../../browser-compatible-base/src/dynamic-snippets/index.ts"],"sourcesContent":["import { FernIr } from \"@fern-api/dynamic-ir-sdk\";\n\nimport { AbstractDynamicSnippetsGeneratorContext } from \"./AbstractDynamicSnippetsGeneratorContext\";\nimport { AbstractEndpointSnippetGenerator } from \"./AbstractEndpointSnippetGenerator\";\nimport { Options } from \"./Options\";\nimport { Result } from \"./Result\";\n\nexport abstract class AbstractDynamicSnippetsGenerator<\n Context extends AbstractDynamicSnippetsGeneratorContext,\n EndpointSnippetGenerator extends AbstractEndpointSnippetGenerator<Context>\n> {\n public constructor(public readonly context: Context) {}\n\n protected abstract createSnippetGenerator(context: Context): EndpointSnippetGenerator;\n\n public async generate(\n request: FernIr.dynamic.EndpointSnippetRequest,\n options: Options = {}\n ): Promise<FernIr.dynamic.EndpointSnippetResponse> {\n const endpoints = this.context.resolveEndpointLocationOrThrow(request.endpoint);\n if (endpoints.length === 0) {\n throw new Error(`No endpoints found that match \"${request.endpoint.method} ${request.endpoint.path}\"`);\n }\n const result = new Result();\n for (const endpoint of endpoints) {\n const context = this.context.clone() as Context;\n const snippetGenerator = this.createSnippetGenerator(context);\n try {\n const snippet = await snippetGenerator.generateSnippet({ endpoint, request, options });\n if (context.errors.empty()) {\n return {\n snippet,\n errors: undefined\n };\n }\n result.update({ context, snippet });\n } catch (error) {\n if (result.err == null) {\n result.err = error as Error;\n }\n }\n }\n return result.getResponseOrThrow({ endpoint: request.endpoint });\n }\n\n public generateSync(\n request: FernIr.dynamic.EndpointSnippetRequest,\n options: Options = {}\n ): FernIr.dynamic.EndpointSnippetResponse {\n const endpoints = this.context.resolveEndpointLocationOrThrow(request.endpoint);\n if (endpoints.length === 0) {\n throw new Error(`No endpoints found that match \"${request.endpoint.method} ${request.endpoint.path}\"`);\n }\n const result = new Result();\n for (const endpoint of endpoints) {\n const context = this.context.clone() as Context;\n const snippetGenerator = this.createSnippetGenerator(context);\n try {\n const snippet = snippetGenerator.generateSnippetSync({ endpoint, request, options });\n if (context.errors.empty()) {\n return {\n snippet,\n errors: undefined\n };\n }\n result.update({ context, snippet });\n } catch (error) {\n if (result.err == null) {\n result.err = error as Error;\n }\n }\n }\n return result.getResponseOrThrow({ endpoint: request.endpoint });\n }\n}\n","import { FernIr } from \"@fern-api/dynamic-ir-sdk\";\n\nimport { AbstractDynamicSnippetsGeneratorContext } from \"./AbstractDynamicSnippetsGeneratorContext\";\nimport { ErrorReporter } from \"./ErrorReporter\";\n\nexport class Result {\n public reporter: ErrorReporter | undefined;\n public snippet: string | undefined;\n public err: Error | undefined;\n\n constructor() {\n this.snippet = undefined;\n this.reporter = undefined;\n this.err = undefined;\n }\n\n public update({ context, snippet }: { context: AbstractDynamicSnippetsGeneratorContext; snippet: string }): void {\n if (this.shouldUpdate({ snippet, reporter: context.errors })) {\n this.reporter = context.errors.clone();\n this.snippet = snippet;\n }\n }\n\n public getResponseOrThrow({\n endpoint\n }: {\n endpoint: FernIr.dynamic.EndpointLocation;\n }): FernIr.dynamic.EndpointSnippetResponse {\n if (this.snippet != null && this.reporter != null) {\n return {\n snippet: this.snippet,\n errors: this.reporter.toDynamicSnippetErrors()\n };\n }\n throw this.err ?? new Error(`Failed to generate snippet for endpoint \"${endpoint.method} ${endpoint.path}\"`);\n }\n\n private shouldUpdate({ snippet, reporter }: { snippet: string; reporter: ErrorReporter }): boolean {\n if (this.reporter == null || (this.reporter.size() > 0 && reporter.size() === 0)) {\n return true;\n }\n return snippet.length > (this.snippet?.length ?? 0);\n }\n}\n","export const Severity = {\n Critical: \"CRITICAL\",\n Warning: \"WARNING\"\n} as const;\n\nexport declare namespace ErrorReporter {\n type Path = readonly PathItem[];\n\n type PathItem = string | ArrayPathItem;\n\n type Severity = (typeof Severity)[keyof typeof Severity];\n\n interface ArrayPathItem {\n index: number;\n }\n\n interface Error {\n path?: Path;\n severity: Severity;\n message: string;\n }\n}\n\ninterface Error_ {\n severity: \"CRITICAL\" | \"WARNING\";\n path: string[] | undefined;\n message: string;\n}\n\nexport class ErrorReporter {\n private errors: ErrorReporter.Error[];\n private path: ErrorReporter.PathItem[];\n\n constructor() {\n this.errors = [];\n this.path = [];\n }\n\n public add(err: Omit<ErrorReporter.Error, \"path\">): void {\n this.errors.push({\n ...err,\n path: [...this.path]\n });\n }\n\n public scope(path: ErrorReporter.PathItem): void {\n this.path.push(path);\n }\n\n public unscope(): void {\n this.path.pop();\n }\n\n public getBySeverity(severity: ErrorReporter.Severity): ErrorReporter.Error[] {\n return this.errors.filter((err) => err.severity === severity);\n }\n\n public empty(): boolean {\n return this.errors.length === 0;\n }\n\n public size(): number {\n return this.errors.length;\n }\n\n public clone(): ErrorReporter {\n const clone = new ErrorReporter();\n clone.errors = [...this.errors];\n clone.path = [...this.path];\n return clone;\n }\n\n public reset(): void {\n this.errors = [];\n this.path = [];\n }\n\n public toDynamicSnippetErrors(): Error_[] {\n return this.errors.map((err) => ({\n severity: err.severity,\n path: err.path != null ? this.pathToStringArray(err.path) : undefined,\n message: err.message\n }));\n }\n\n private pathToStringArray(path: ErrorReporter.Path): string[] {\n const result: string[] = [];\n for (const item of path) {\n if (typeof item === \"string\") {\n result.push(item);\n continue;\n }\n result[result.length - 1] += `[${item.index}]`;\n }\n return result;\n }\n}\n","import { assertNever, keys } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { HttpEndpointReferenceParser } from \"@fern-api/fern-definition-schema\";\n\nimport { FernGeneratorExec } from \"../GeneratorNotificationService\";\nimport { DiscriminatedUnionTypeInstance } from \"./DiscriminatedUnionTypeInstance\";\nimport { ErrorReporter, Severity } from \"./ErrorReporter\";\nimport { Options } from \"./Options\";\nimport { TypeInstance } from \"./TypeInstance\";\n\nexport abstract class AbstractDynamicSnippetsGeneratorContext {\n public config: FernGeneratorExec.GeneratorConfig;\n public options: Options;\n public errors: ErrorReporter;\n\n private _ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n private httpEndpointReferenceParser: HttpEndpointReferenceParser;\n\n constructor({\n ir,\n config,\n options = {}\n }: {\n ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n config: FernGeneratorExec.GeneratorConfig;\n options?: Options;\n }) {\n this._ir = ir;\n this.config = config;\n this.options = options;\n this.errors = new ErrorReporter();\n this.httpEndpointReferenceParser = new HttpEndpointReferenceParser();\n }\n\n public abstract clone(): AbstractDynamicSnippetsGeneratorContext;\n\n public associateQueryParametersByWireValue({\n parameters,\n values\n }: {\n parameters: FernIr.dynamic.NamedParameter[];\n values: FernIr.dynamic.Values;\n }): TypeInstance[] {\n const instances: TypeInstance[] = [];\n for (const [key, value] of Object.entries(values)) {\n this.errors.scope(key);\n try {\n const parameter = parameters.find((param) => param.name.wireValue === key);\n if (parameter == null) {\n throw this.newParameterNotRecognizedError(key);\n }\n // If this query parameter supports allow-multiple, the user-provided values\n // must be wrapped in an array.\n const typeInstanceValue =\n this.isListTypeReference(parameter.typeReference) && !Array.isArray(value) ? [value] : value;\n instances.push({\n name: parameter.name,\n typeReference: parameter.typeReference,\n value: typeInstanceValue\n });\n } finally {\n this.errors.unscope();\n }\n }\n return instances;\n }\n\n public associateByWireValue({\n parameters,\n values,\n ignoreMissingParameters\n }: {\n parameters: FernIr.dynamic.NamedParameter[];\n values: FernIr.dynamic.Values;\n ignoreMissingParameters?: boolean;\n }): TypeInstance[] {\n const instances: TypeInstance[] = [];\n for (const [key, value] of Object.entries(values)) {\n this.errors.scope(key);\n try {\n const parameter = parameters.find((param) => param.name.wireValue === key);\n if (parameter == null) {\n if (ignoreMissingParameters) {\n // Required for request payloads that include more information than\n // just the target parameters (e.g. union base properties).\n continue;\n }\n this.errors.add({\n severity: Severity.Critical,\n message: this.newParameterNotRecognizedError(key).message\n });\n continue;\n }\n instances.push({\n name: parameter.name,\n typeReference: parameter.typeReference,\n value\n });\n } finally {\n this.errors.unscope();\n }\n }\n return instances;\n }\n\n public getSingleFileValue({\n property,\n record\n }: {\n property: FernIr.dynamic.FileUploadRequestBodyProperty.File_;\n record: Record<string, unknown>;\n }): string | undefined {\n const fileValue = record[property.wireValue];\n if (fileValue == null) {\n return undefined;\n }\n if (typeof fileValue !== \"string\") {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected file value to be a string, got ${typeof fileValue}`\n });\n return undefined;\n }\n return fileValue;\n }\n\n public getFileArrayValues({\n property,\n record\n }: {\n property: FernIr.dynamic.FileUploadRequestBodyProperty.FileArray;\n record: Record<string, unknown>;\n }): string[] | undefined {\n const fileArrayValue = record[property.wireValue];\n if (fileArrayValue == null) {\n return undefined;\n }\n if (!Array.isArray(fileArrayValue)) {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected file array value to be an array of strings, got ${typeof fileArrayValue}`\n });\n return undefined;\n }\n const stringValues: string[] = [];\n for (const value of fileArrayValue) {\n if (typeof value !== \"string\") {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected file array value to be an array of strings, got ${typeof value}`\n });\n return undefined;\n }\n stringValues.push(value);\n }\n return stringValues;\n }\n\n public getRecord(value: unknown): Record<string, unknown> | undefined {\n if (typeof value !== \"object\" || Array.isArray(value)) {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected object with key, value pairs but got: ${\n Array.isArray(value) ? \"array\" : typeof value\n }`\n });\n return undefined;\n }\n if (value == null) {\n return {};\n }\n return value as Record<string, unknown>;\n }\n\n public resolveNamedType({ typeId }: { typeId: FernIr.TypeId }): FernIr.dynamic.NamedType | undefined {\n const namedType = this._ir.types[typeId];\n if (namedType == null) {\n this.errors.add({\n severity: Severity.Critical,\n message: `Type identified by \"${typeId}\" could not be found`\n });\n return undefined;\n }\n return namedType;\n }\n\n public resolveDiscriminatedUnionTypeInstance({\n discriminatedUnion,\n value\n }: {\n discriminatedUnion: FernIr.dynamic.DiscriminatedUnionType;\n value: unknown;\n }): DiscriminatedUnionTypeInstance | undefined {\n const record = this.getRecord(value);\n if (record == null) {\n return undefined;\n }\n\n const discriminantFieldName = discriminatedUnion.discriminant.wireValue;\n const discriminantValue = record[discriminantFieldName];\n if (discriminantValue == null) {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newParameterNotRecognizedError(discriminantFieldName).message\n });\n return undefined;\n }\n if (typeof discriminantValue !== \"string\") {\n this.errors.add({\n severity: Severity.Critical,\n message: `Expected discriminant value to be a string but got: ${typeof discriminantValue}`\n });\n return undefined;\n }\n\n const singleDiscriminatedUnionType = discriminatedUnion.types[discriminantValue];\n if (singleDiscriminatedUnionType == null) {\n this.errors.add({\n severity: Severity.Critical,\n message: `No type found for discriminant value \"${discriminantValue}\"`\n });\n return undefined;\n }\n\n // Remove the discriminant from the record so that the value is valid for the type.\n const { [discriminantFieldName]: _, ...filtered } = record;\n\n return {\n singleDiscriminatedUnionType,\n discriminantValue: singleDiscriminatedUnionType.discriminantValue,\n value: filtered\n };\n }\n\n public resolveEndpointOrThrow(rawEndpoint: string): FernIr.dynamic.Endpoint[] {\n const parsedEndpoint = this.httpEndpointReferenceParser.tryParse(rawEndpoint);\n if (parsedEndpoint == null) {\n throw new Error(`Failed to parse endpoint reference \"${rawEndpoint}\"`);\n }\n return this.resolveEndpointLocationOrThrow(parsedEndpoint);\n }\n\n public resolveEndpointLocationOrThrow(location: FernIr.dynamic.EndpointLocation): FernIr.dynamic.Endpoint[] {\n const endpoints: FernIr.dynamic.Endpoint[] = [];\n for (const endpoint of Object.values(this._ir.endpoints)) {\n if (this.parsedEndpointMatches({ endpoint, parsedEndpoint: location })) {\n endpoints.push(endpoint);\n }\n }\n if (endpoints.length === 0) {\n throw new Error(`Failed to find endpoint identified by \"${location.method} ${location.path}\"`);\n }\n return endpoints;\n }\n\n public needsRequestParameter({\n request,\n inlinePathParameters,\n inlineFileProperties\n }: {\n request: FernIr.dynamic.InlinedRequest;\n inlinePathParameters: boolean;\n inlineFileProperties: boolean;\n }): boolean {\n if (this.includePathParametersInWrappedRequest({ request, inlinePathParameters })) {\n return true;\n }\n if (request.queryParameters != null && request.queryParameters.length > 0) {\n return true;\n }\n if (request.headers != null && request.headers.length > 0) {\n return true;\n }\n if (request.body != null) {\n return this.includeRequestBodyInWrappedRequest({ body: request.body, inlineFileProperties });\n }\n if (request.metadata?.onlyPathParameters) {\n return false;\n }\n return true;\n }\n\n public includePathParametersInWrappedRequest({\n request,\n inlinePathParameters\n }: {\n request: FernIr.dynamic.InlinedRequest;\n inlinePathParameters: boolean;\n }): boolean {\n return inlinePathParameters && (request.metadata?.includePathParameters ?? false);\n }\n\n public isFileUploadRequestBody(\n body: FernIr.dynamic.InlinedRequestBody\n ): body is FernIr.dynamic.InlinedRequestBody.FileUpload {\n switch (body.type) {\n case \"fileUpload\":\n return true;\n case \"properties\":\n case \"referenced\":\n return false;\n default:\n assertNever(body);\n }\n }\n\n public resolveEnvironmentName(environmentID: string): FernIr.Name | undefined {\n if (this._ir.environments == null) {\n return undefined;\n }\n const environments = this._ir.environments.environments;\n switch (environments.type) {\n case \"singleBaseUrl\": {\n const environment = environments.environments.find((env) => env.id === environmentID);\n if (environment == null) {\n return undefined;\n }\n return environment.name;\n }\n case \"multipleBaseUrls\": {\n const environment = environments.environments.find((env) => env.id === environmentID);\n if (environment == null) {\n return undefined;\n }\n return environment.name;\n }\n default:\n assertNever(environments);\n }\n }\n\n public isSingleEnvironmentID(environment: FernIr.dynamic.EnvironmentValues): environment is FernIr.EnvironmentId {\n return typeof environment === \"string\";\n }\n\n public isMultiEnvironmentValues(\n environment: FernIr.dynamic.EnvironmentValues\n ): environment is FernIr.dynamic.MultipleEnvironmentUrlValues {\n return typeof environment === \"object\";\n }\n\n public validateMultiEnvironmentUrlValues(\n multiEnvironmentUrlValues: FernIr.dynamic.MultipleEnvironmentUrlValues\n ): boolean {\n if (this._ir.environments == null) {\n this.errors.add({\n severity: Severity.Critical,\n message:\n \"Multiple environments are not supported for single base URL environments; use the baseUrl option instead\"\n });\n return false;\n }\n const environments = this._ir.environments.environments;\n switch (environments.type) {\n case \"singleBaseUrl\": {\n this.errors.add({\n severity: Severity.Critical,\n message:\n \"Multiple environments are not supported for single base URL environments; use the baseUrl option instead\"\n });\n return false;\n }\n case \"multipleBaseUrls\": {\n const firstEnvironment = environments.environments[0];\n if (firstEnvironment == null) {\n this.errors.add({\n severity: Severity.Critical,\n message: \"Multiple environments are not supported; use the baseUrl option instead\"\n });\n return false;\n }\n const expectedKeys = new Set(keys(firstEnvironment.urls));\n for (const key of keys(multiEnvironmentUrlValues)) {\n if (expectedKeys.has(key)) {\n expectedKeys.delete(key);\n }\n }\n if (expectedKeys.size > 0) {\n this.errors.add({\n severity: Severity.Critical,\n message: `The provided environments are invalid; got: [${Object.keys(multiEnvironmentUrlValues).join(\", \")}], expected: [${keys(firstEnvironment.urls).join(\", \")}]`\n });\n return false;\n }\n return true;\n }\n }\n }\n\n public getValueAsNumber({ value }: { value: unknown }): number | undefined {\n if (typeof value !== \"number\") {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newTypeMismatchError({ expected: \"number\", value }).message\n });\n return undefined;\n }\n return value;\n }\n\n public getValueAsBoolean({ value }: { value: unknown }): boolean | undefined {\n if (typeof value !== \"boolean\") {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newTypeMismatchError({ expected: \"boolean\", value }).message\n });\n return undefined;\n }\n return value;\n }\n\n public getValueAsString({ value }: { value: unknown }): string | undefined {\n if (typeof value !== \"string\") {\n this.errors.add({\n severity: Severity.Critical,\n message: this.newTypeMismatchError({ expected: \"string\", value }).message\n });\n return undefined;\n }\n return value;\n }\n\n public isOptional(typeReference: FernIr.dynamic.TypeReference): boolean {\n switch (typeReference.type) {\n case \"nullable\":\n return this.isOptional(typeReference.value);\n case \"optional\":\n return true;\n case \"named\": {\n const resolvedType = this.resolveNamedType({ typeId: typeReference.value });\n if (resolvedType == null) {\n return false;\n }\n if (resolvedType.type === \"alias\") {\n return this.isNullable(resolvedType.typeReference);\n }\n return false;\n }\n }\n return false;\n }\n\n public isNullable(typeReference: FernIr.dynamic.TypeReference): boolean {\n switch (typeReference.type) {\n case \"nullable\":\n return true;\n case \"optional\":\n return this.isNullable(typeReference.value);\n case \"named\": {\n const resolvedType = this.resolveNamedType({ typeId: typeReference.value });\n if (resolvedType == null) {\n return false;\n }\n if (resolvedType.type === \"alias\") {\n return this.isNullable(resolvedType.typeReference);\n }\n return false;\n }\n }\n return false;\n }\n\n public newAuthMismatchError({\n auth,\n values\n }: {\n auth: FernIr.dynamic.Auth;\n values: FernIr.dynamic.AuthValues;\n }): Error {\n return new Error(`Expected auth type ${auth.type}, got ${values.type}`);\n }\n\n public newParameterNotRecognizedError(parameterName: string): Error {\n return new Error(`\"${parameterName}\" is not a recognized parameter for this endpoint`);\n }\n\n public newTypeMismatchError({ expected, value }: { expected: string; value: unknown }): Error {\n return new Error(`Expected ${expected}, got ${typeof value}`);\n }\n\n private includeRequestBodyInWrappedRequest({\n body,\n inlineFileProperties\n }: {\n body: FernIr.dynamic.InlinedRequestBody;\n inlineFileProperties: boolean;\n }): boolean {\n switch (body.type) {\n case \"properties\":\n case \"referenced\":\n return true;\n case \"fileUpload\":\n return this.includeFileUploadBodyInWrappedRequest({ fileUpload: body, inlineFileProperties });\n default:\n assertNever(body);\n }\n }\n\n private includeFileUploadBodyInWrappedRequest({\n fileUpload,\n inlineFileProperties\n }: {\n fileUpload: FernIr.dynamic.FileUploadRequestBody;\n inlineFileProperties: boolean;\n }): boolean {\n return (\n this.fileUploadHasBodyProperties({ fileUpload }) ||\n (inlineFileProperties && this.fileUploadHasFileProperties({ fileUpload }))\n );\n }\n\n private fileUploadHasBodyProperties({ fileUpload }: { fileUpload: FernIr.dynamic.FileUploadRequestBody }): boolean {\n return fileUpload.properties.some((property) => {\n switch (property.type) {\n case \"file\":\n case \"fileArray\":\n return false;\n case \"bodyProperty\":\n return true;\n default:\n assertNever(property);\n }\n });\n }\n\n private fileUploadHasFileProperties({ fileUpload }: { fileUpload: FernIr.dynamic.FileUploadRequestBody }): boolean {\n return fileUpload.properties.some((property) => {\n switch (property.type) {\n case \"file\":\n case \"fileArray\":\n return true;\n case \"bodyProperty\":\n return false;\n default:\n assertNever(property);\n }\n });\n }\n\n private isListTypeReference(typeReference: FernIr.dynamic.TypeReference): boolean {\n if (typeReference.type === \"optional\") {\n return this.isListTypeReference(typeReference.value);\n }\n return typeReference.type === \"list\" || typeReference.type === \"set\";\n }\n\n private parsedEndpointMatches({\n endpoint,\n parsedEndpoint\n }: {\n endpoint: FernIr.dynamic.Endpoint;\n parsedEndpoint: HttpEndpointReferenceParser.Parsed;\n }): boolean {\n return endpoint.location.method === parsedEndpoint.method && endpoint.location.path === parsedEndpoint.path;\n }\n}\n","export { EXAMPLE_REFERENCE_PREFIX, YAML_SCHEMA_VERSION } from \"./constants\";\nexport { type NodePath, type NodePathItem } from \"./NodePath\";\nexport * as RawSchemas from \"./schemas\";\nexport { type DefinitionFileSchema, type PackageMarkerFileSchema, type RootApiFileSchema } from \"./schemas\";\nexport * from \"./utils/auth\";\nexport * from \"./utils/generics\";\nexport { getRequestBody } from \"./utils/getRequestBody\";\nexport { getResponseBodyType } from \"./utils/getResponseBodyType\";\nexport { HttpEndpointReferenceParser } from \"./utils/HttpEndpointReferenceParser\";\nexport { isInlineRequestBody } from \"./utils/isInlineRequestBody\";\nexport { isOpenApiSourceSchema } from \"./utils/isOpenApiSourceSchema\";\nexport { isRawProtobufSourceSchema } from \"./utils/isRawProtobufSourceSchema\";\nexport { isRawTextType } from \"./utils/isRawTextType\";\nexport { type BytesRequest, parseBytesRequest } from \"./utils/parseBytesRequest\";\nexport { parseFileUploadRequest, type RawFileUploadRequest } from \"./utils/parseFileUploadRequest\";\nexport { parseRawBytesType, type RawBytesType } from \"./utils/parseRawBytesType\";\nexport { parseRawFileType, type RawFileType } from \"./utils/parseRawFileType\";\nexport { parseRawTextType, type RawTextType } from \"./utils/parseRawTextType\";\nexport { RawPrimitiveType } from \"./utils/RawPrimitiveType\";\nexport { recursivelyVisitRawTypeReference } from \"./utils/recursivelyVisitRawTypeReference\";\nexport { visitExampleCodeSampleSchema } from \"./utils/visitExampleCodeSampleSchema\";\nexport { type ExampleResponseSchemaVisitor, visitExampleResponseSchema } from \"./utils/visitExampleResponseSchema\";\nexport { isAnyAuthSchemes, isSingleAuthScheme, type RawApiAuthVisitor, visitRawApiAuth } from \"./utils/visitRawApiAuth\";\nexport {\n type AuthSchemeDeclarationVisitor,\n isHeaderAuthScheme,\n visitRawAuthSchemeDeclaration\n} from \"./utils/visitRawAuthSchemeDeclaration\";\nexport {\n isRawMultipleBaseUrlsEnvironment,\n isRawSingleBaseUrlEnvironment,\n visitRawEnvironmentDeclaration\n} from \"./utils/visitRawEnvironmentDeclaration\";\nexport {\n isVariablePathParameter,\n type PathParameterDeclarationVisitor,\n visitRawPathParameter\n} from \"./utils/visitRawPathParameter\";\nexport {\n isRawAliasDefinition,\n isRawDiscriminatedUnionDefinition,\n isRawEnumDefinition,\n isRawObjectDefinition,\n isRawUndiscriminatedUnionDefinition,\n type RawTypeDeclarationVisitor,\n visitRawTypeDeclaration\n} from \"./utils/visitRawTypeDeclaration\";\nexport { FernContainerRegex, visitRawTypeReference } from \"./utils/visitRawTypeReference\";\n","export declare namespace HttpEndpointReferenceParser {\n interface Parsed {\n path: string;\n method: Method;\n }\n\n type Method = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\" | \"HEAD\";\n\n export type ValidationResult = Valid | Invalid;\n\n interface Valid {\n type: \"valid\";\n }\n\n interface Invalid {\n type: \"invalid\";\n }\n}\n\n/**\n * Parses an HTTP endpoint reference like `POST /users/get`\n */\nexport class HttpEndpointReferenceParser {\n //eslint-disable-next-line\n private REFERENCE_REGEX = /^(GET|POST|PUT|DELETE|PATCH|HEAD)\\s(\\/\\S*)$/;\n\n public validate(reference: string): HttpEndpointReferenceParser.ValidationResult {\n const validFormat = this.REFERENCE_REGEX.test(reference);\n if (!validFormat) {\n return { type: \"invalid\" };\n }\n return { type: \"valid\" };\n }\n\n public tryParse(reference: string): HttpEndpointReferenceParser.Parsed | undefined {\n const validationResponse = this.validate(reference);\n if (validationResponse.type === \"invalid\") {\n return undefined;\n }\n const match = reference.match(this.REFERENCE_REGEX);\n if (match == null || match[1] == null || match[2] == null) {\n return undefined;\n }\n return {\n method: match[1] as HttpEndpointReferenceParser.Method,\n path: match[2]\n };\n }\n}\n","export const Scope = {\n PathParameters: \"pathParameters\",\n QueryParameters: \"queryParameters\",\n Headers: \"headers\",\n RequestBody: \"requestBody\"\n} as const;\n\nexport type Scope = (typeof Scope)[keyof typeof Scope];\n","export { AbstractDynamicSnippetsGenerator } from \"./AbstractDynamicSnippetsGenerator\";\nexport { AbstractDynamicSnippetsGeneratorContext } from \"./AbstractDynamicSnippetsGeneratorContext\";\nexport { type DiscriminatedUnionTypeInstance } from \"./DiscriminatedUnionTypeInstance\";\nexport { ErrorReporter, Severity } from \"./ErrorReporter\";\nexport { type Options, Style } from \"./Options\";\nexport { Result } from \"./Result\";\nexport { Scope } from \"./Scope\";\nexport { type TypeInstance } from \"./TypeInstance\";\nexport { DynamicSnippetsTestRunner } from \"./test-utils/DynamicSnippetsTestRunner\";\n"],"mappings":"gGAKAA,IAAAC,ICAAC,IAAAC,IAAM,IAAOC,EAAP,KAAa,CAKf,aAAA,CAJOC,EAAA,iBACAA,EAAA,gBACAA,EAAA,YAGH,KAAK,QAAU,OACf,KAAK,SAAW,OAChB,KAAK,IAAM,MACf,CAEO,OAAO,CAAE,QAAAC,EAAS,QAAAC,CAAO,EAAyE,CACjG,KAAK,aAAa,CAAE,QAAAA,EAAS,SAAUD,EAAQ,MAAM,CAAE,IACvD,KAAK,SAAWA,EAAQ,OAAO,MAAK,EACpC,KAAK,QAAUC,EAEvB,C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,gBAAiB,kBACjB,QAAS,UACT,YAAa,eCJjBC,IAAAC","names":["init_process","init_buffer","init_process","init_buffer","Result","__publicField","context","snippet","endpoint","_a","reporter","_b","AbstractDynamicSnippetsGenerator","context","__publicField","request","options","endpoints","result","Result","endpoint","snippetGenerator","snippet","error","init_process","init_buffer","Severity","ErrorReporter","_ErrorReporter","__publicField","err","__spreadProps","__spreadValues","path","severity","clone","result","item","init_process","init_buffer","init_process","init_buffer","init_process","init_buffer","HttpEndpointReferenceParser","__publicField","reference","match","AbstractDynamicSnippetsGeneratorContext","ir","config","options","__publicField","ErrorReporter","HttpEndpointReferenceParser","parameters","values","instances","key","value","parameter","param","typeInstanceValue","ignoreMissingParameters","Severity","property","record","fileValue","fileArrayValue","stringValues","typeId","namedType","discriminatedUnion","discriminantFieldName","discriminantValue","singleDiscriminatedUnionType","_a","_","filtered","__objRest","__restKey","rawEndpoint","parsedEndpoint","location","endpoints","endpoint","request","inlinePathParameters","inlineFileProperties","_b","body","assertNever","environmentID","environments","environment","env","multiEnvironmentUrlValues","firstEnvironment","expectedKeys","keys","typeReference","resolvedType","auth","parameterName","expected","fileUpload","init_process","init_buffer","Scope","init_process","init_buffer"]}
@@ -1,2 +0,0 @@
1
- import{a as u}from"./chunk-625QSFAH.js";import{c as l}from"./chunk-7MI6WLZG.js";import{a as g}from"./chunk-KU3OGJUU.js";import{j as r,k as p,m,o,p as c,r as s}from"./chunk-J4Y3S6QS.js";p();m();var N=["use","clone","list"],h="Requests",d="Types",f=class i extends l{constructor({ir:e,config:t}){var n;super({ir:e,config:t});r(this,"ir");r(this,"customConfig");r(this,"dynamicTypeLiteralMapper");r(this,"filePropertyMapper");r(this,"rootNamespace");this.ir=e,this.customConfig=t.customConfig!=null?t.customConfig:void 0,this.dynamicTypeLiteralMapper=new u({context:this}),this.filePropertyMapper=new g({context:this}),this.rootNamespace=F({organization:t.organization,namespaceOverride:(n=this.customConfig)==null?void 0:n.namespace})}clone(){return new i({ir:this.ir,config:this.config})}getParameterName(e){return this.prependUnderscoreIfNeeded(e.camelCase.unsafeName)}getPropertyName(e){return this.prependUnderscoreIfNeeded(e.camelCase.unsafeName)}getMethodName(e){let t=e.camelCase.unsafeName;return N.includes(t)?t:e.camelCase.safeName}getClassName(e){return e.pascalCase.safeName}getRootClientClassName(){var e,t,n;return((e=this.customConfig)==null?void 0:e.clientName)!=null?this.customConfig.clientName:((t=this.customConfig)==null?void 0:t["client-class-name"])!=null?(n=this.customConfig)==null?void 0:n["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return s.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(e){return this.getNamespace(e,h)}getTypesNamespace(e){return this.getNamespace(e,d)}getNamespace(e,t){let n=e.allParts.map(C=>C.pascalCase.safeName);return n=t!=null?[...n,t]:n,[this.rootNamespace,...n].join("\\")}getEnvironmentClassAccessFromID(e){let t=this.resolveEnvironmentName(e);if(t!=null)return s.codeblock(n=>{n.writeNode(this.getEnvironmentClassReference(t)),n.write("::"),n.write(this.getClassName(t))})}getEnvironmentClassReference(e){return s.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(e){return/^[a-zA-Z_]/.test(e)?e:`_${e}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${o(c(this.config.organization))}`}};function F({organization:i,namespaceOverride:a}){return a!=null?a:`${o(c(i))}`}export{f as a};
2
- //# sourceMappingURL=chunk-BYNT7UJT.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/context/DynamicSnippetsGeneratorContext.ts"],"sourcesContent":["import {\n AbstractDynamicSnippetsGeneratorContext,\n FernGeneratorExec\n} from \"@fern-api/browser-compatible-base-generator\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { BasePhpCustomConfigSchema, php } from \"@fern-api/php-codegen\";\nimport { camelCase, upperFirst } from \"lodash-es\";\n\nimport { DynamicTypeLiteralMapper } from \"./DynamicTypeLiteralMapper\";\nimport { FilePropertyMapper } from \"./FilePropertyMapper\";\n\nconst RESERVED_METHOD_NAMES = [\"use\", \"clone\", \"list\"];\nconst REQUEST_NAMESPACE = \"Requests\";\nconst TYPES_NAMESPACE = \"Types\";\n\nexport class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGeneratorContext {\n public ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n public customConfig: BasePhpCustomConfigSchema | undefined;\n public dynamicTypeLiteralMapper: DynamicTypeLiteralMapper;\n public filePropertyMapper: FilePropertyMapper;\n public rootNamespace: string;\n constructor({\n ir,\n config\n }: {\n ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n config: FernGeneratorExec.GeneratorConfig;\n }) {\n super({ ir, config });\n this.ir = ir;\n this.customConfig =\n config.customConfig != null ? (config.customConfig as BasePhpCustomConfigSchema) : undefined;\n this.dynamicTypeLiteralMapper = new DynamicTypeLiteralMapper({ context: this });\n this.filePropertyMapper = new FilePropertyMapper({ context: this });\n this.rootNamespace = getRootNamespace({\n organization: config.organization,\n namespaceOverride: this.customConfig?.namespace\n });\n }\n\n public clone(): DynamicSnippetsGeneratorContext {\n return new DynamicSnippetsGeneratorContext({\n ir: this.ir,\n config: this.config\n });\n }\n\n public getParameterName(name: FernIr.Name): string {\n return this.prependUnderscoreIfNeeded(name.camelCase.unsafeName);\n }\n\n public getPropertyName(name: FernIr.Name): string {\n return this.prependUnderscoreIfNeeded(name.camelCase.unsafeName);\n }\n\n public getMethodName(name: FernIr.Name): string {\n // TODO: Propogate reserved keywords through IR via CasingsGenerator.\n const unsafeName = name.camelCase.unsafeName;\n if (RESERVED_METHOD_NAMES.includes(unsafeName)) {\n return unsafeName;\n }\n return name.camelCase.safeName;\n }\n\n public getClassName(name: FernIr.Name): string {\n return name.pascalCase.safeName;\n }\n\n public getRootClientClassName(): string {\n if (this.customConfig?.clientName != null) {\n return this.customConfig.clientName;\n }\n if (this.customConfig?.[\"client-class-name\"] != null) {\n return this.customConfig?.[\"client-class-name\"];\n }\n return this.getComputedClientName();\n }\n\n public getEnvironmentsClassReference(): php.ClassReference {\n return php.classReference({\n name: \"Environments\",\n namespace: this.rootNamespace\n });\n }\n\n public getRequestNamespace(fernFilepath: FernIr.FernFilepath): string {\n return this.getNamespace(fernFilepath, REQUEST_NAMESPACE);\n }\n\n public getTypesNamespace(fernFilepath: FernIr.FernFilepath): string {\n return this.getNamespace(fernFilepath, TYPES_NAMESPACE);\n }\n\n public getNamespace(fernFilepath: FernIr.FernFilepath, suffix?: string): string {\n let parts = fernFilepath.allParts.map((path) => path.pascalCase.safeName);\n parts = suffix != null ? [...parts, suffix] : parts;\n return [this.rootNamespace, ...parts].join(\"\\\\\");\n }\n\n public getEnvironmentClassAccessFromID(environmentID: string): php.AstNode | undefined {\n const environmentName = this.resolveEnvironmentName(environmentID);\n if (environmentName == null) {\n return undefined;\n }\n return php.codeblock((writer) => {\n writer.writeNode(this.getEnvironmentClassReference(environmentName));\n writer.write(\"::\");\n writer.write(this.getClassName(environmentName));\n });\n }\n\n public getEnvironmentClassReference(name: FernIr.Name): php.ClassReference {\n return php.classReference({\n name: \"Environments\",\n namespace: this.rootNamespace\n });\n }\n\n private prependUnderscoreIfNeeded(input: string): string {\n // https://www.php.net/manual/en/language.variables.basics.php\n if (!/^[a-zA-Z_]/.test(input)) {\n return `_${input}`;\n }\n return input;\n }\n\n private getComputedClientName(): string {\n return `${this.getOrganizationPascalCase()}Client`;\n }\n\n private getOrganizationPascalCase(): string {\n return `${upperFirst(camelCase(this.config.organization))}`;\n }\n}\n\nfunction getRootNamespace({\n organization,\n namespaceOverride\n}: {\n organization: string;\n namespaceOverride?: string;\n}): string {\n return namespaceOverride ?? `${upperFirst(camelCase(organization))}`;\n}\n"],"mappings":"yLAAAA,IAAAC,IAWA,IAAMC,EAAwB,CAAC,MAAO,QAAS,MAAM,EAC/CC,EAAoB,WACpBC,EAAkB,QAEXC,EAAN,MAAMC,UAAwCC,CAAwC,CAMzF,YAAY,CACR,GAAAC,E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O,oBAAoBC,EAA2C,CAClE,OAAO,KAAK,aAAaA,EAAcjB,CAAiB,CAC5D,CAEO,kBAAkBiB,EAA2C,CAChE,OAAO,KAAK,aAAaA,EAAchB,CAAe,CAC1D,CAEO,aAAagB,EAAmCC,EAAyB,CAC5E,IAAIC,EAAQF,EAAa,SAAS,IAAKG,GAASA,EAAK,WAAW,QAAQ,EACxE,OAAAD,EAAQD,GAAU,KAAO,CAAC,GAAGC,EAAOD,CAAM,EAAIC,EACvC,CAAC,KAAK,cAAe,GAAGA,CAAK,EAAE,KAAK,IAAI,CACnD,CAEO,gCAAgCE,EAAgD,CACnF,IAAMC,EAAkB,KAAK,uBAAuBD,CAAa,EACjE,GAAIC,GAAmB,KAGvB,OAAON,EAAI,UAAWO,GAAW,CAC7BA,EAAO,UAAU,KAAK,6BAA6BD,CAAe,CAAC,EACnEC,EAAO,MAAM,IAAI,EACjBA,EAAO,MAAM,KAAK,aAAaD,CAAe,CAAC,CACnD,CAAC,CACL,CAEO,6BAA6BV,EAAuC,CACvE,OAAOI,EAAI,eAAe,CACtB,KAAM,eACN,UAAW,KAAK,aACpB,CAAC,CACL,CAEQ,0BAA0BQ,EAAuB,CAErD,MAAK,aAAa,KAAKA,CAAK,EAGrBA,EAFI,IAAIA,CAAK,EAGxB,CAEQ,uBAAgC,CACpC,MAAO,GAAG,KAAK,0BAA0B,CAAC,QAC9C,CAEQ,2BAAoC,CACxC,MAAO,GAAGC,EAAWC,EAAU,KAAK,OAAO,YAAY,CAAC,CAAC,EAC7D,CACJ,EAEA,SAASf,EAAiB,CACtB,aAAAgB,EACA,kBAAAC,CACJ,EAGW,CACP,OAAOA,GAAA,KAAAA,EAAqB,GAAGH,EAAWC,EAAUC,CAAY,CAAC,CAAC,EACtE","names":["init_process","init_buffer","RESERVED_METHOD_NAMES","REQUEST_NAMESPACE","TYPES_NAMESPACE","DynamicSnippetsGeneratorContext","_DynamicSnippetsGeneratorContext","AbstractDynamicSnippetsGeneratorContext","ir","config","_a","__publicField","DynamicTypeLiteralMapper","FilePropertyMapper","getRootNamespace","name","unsafeName","_b","_c","php_exports","fernFilepath","suffix","parts","path","environmentID","environmentName","writer","input","upperFirst_default","camelCase_default","organization","namespaceOverride"]}
@@ -1,40 +0,0 @@
1
- var Di=Object.create;var Pe=Object.defineProperty,ji=Object.defineProperties,Fi=Object.getOwnPropertyDescriptor,Wi=Object.getOwnPropertyDescriptors,$i=Object.getOwnPropertyNames,$e=Object.getOwnPropertySymbols,zi=Object.getPrototypeOf,Tt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable;var wt=(r,t,e)=>t in r?Pe(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,ze=(r,t)=>{for(var e in t||(t={}))Tt.call(t,e)&&wt(r,e,t[e]);if($e)for(var e of $e(t))jt.call(t,e)&&wt(r,e,t[e]);return r},Ye=(r,t)=>ji(r,Wi(t));var Al=r=>typeof r=="symbol"?r:r+"",vl=(r,t)=>{var e={};for(var o in r)Tt.call(r,o)&&t.indexOf(o)<0&&(e[o]=r[o]);if(r!=null&&$e)for(var o of $e(r))t.indexOf(o)<0&&jt.call(r,o)&&(e[o]=r[o]);return e};var bt=(r,t)=>()=>(r&&(t=r(r=0)),t);var _l=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),Yi=(r,t)=>{for(var e in t)Pe(r,e,{get:t[e],enumerable:!0})},Ft=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $i(t))!Tt.call(r,i)&&i!==e&&Pe(r,i,{get:()=>t[i],enumerable:!(o=Fi(t,i))||o.enumerable});return r};var El=(r,t,e)=>(e=r!=null?Di(zi(r)):{},Ft(t||!r||!r.__esModule?Pe(e,"default",{value:r,enumerable:!0}):e,r)),Sl=r=>Ft(Pe({},"__esModule",{value:!0}),r);var c=(r,t,e)=>wt(r,typeof t!="symbol"?t+"":t,e);function $t(){throw new Error("setTimeout has not been defined")}function zt(){throw new Error("clearTimeout has not been defined")}function Yt(r){if(Q===setTimeout)return setTimeout(r,0);if((Q===$t||!Q)&&setTimeout)return Q=setTimeout,setTimeout(r,0);try{return Q(r,0)}catch(t){try{return Q.call(null,r,0)}catch(e){return Q.call(this,r,0)}}}function Gi(r){if(X===clearTimeout)return clearTimeout(r);if((X===zt||!X)&&clearTimeout)return X=clearTimeout,clearTimeout(r);try{return X(r)}catch(t){try{return X.call(null,r)}catch(e){return X.call(this,r)}}}function qi(){!Ee||!le||(Ee=!1,le.length?W=le.concat(W):Ge=-1,W.length&&Gt())}function Gt(){if(!Ee){var r=Yt(qi);Ee=!0;for(var t=W.length;t;){for(le=W,W=[];++Ge<t;)le&&le[Ge].run();Ge=-1,t=W.length}le=null,Ee=!1,Gi(r)}}function Hi(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];W.push(new qt(r,t)),W.length===1&&!Ee&&Yt(Gt)}function qt(r,t){this.fun=r,this.array=t}function ce(){}function ln(r){throw new Error("process.binding is not supported")}function cn(){return"/"}function mn(r){throw new Error("process.chdir is not supported")}function dn(){return 0}function xn(r){var t=hn.call(_e)*.001,e=Math.floor(t),o=Math.floor(t%1*1e9);return r&&(e=e-r[0],o=o-r[1],o<0&&(e--,o+=1e9)),[e,o]}function gn(){var r=new Date,t=r-yn;return t/1e3}var Q,X,W,Ee,le,Ge,Vi,Ki,Ji,Zi,Qi,Xi,en,tn,rn,on,nn,an,sn,fn,un,pn,_e,hn,yn,p,Wt,n=bt(()=>{"use strict";Q=$t,X=zt;typeof globalThis.setTimeout=="function"&&(Q=setTimeout);typeof globalThis.clearTimeout=="function"&&(X=clearTimeout);W=[],Ee=!1,Ge=-1;qt.prototype.run=function(){this.fun.apply(null,this.array)};Vi="browser",Ki="browser",Ji=!0,Zi={},Qi=[],Xi="",en={},tn={},rn={};on=ce,nn=ce,an=ce,sn=ce,fn=ce,un=ce,pn=ce;_e=globalThis.performance||{},hn=_e.now||_e.mozNow||_e.msNow||_e.oNow||_e.webkitNow||function(){return new Date().getTime()};yn=new Date;p={nextTick:Hi,title:Vi,browser:Ji,env:Zi,argv:Qi,version:Xi,versions:en,on,addListener:nn,once:an,off:sn,removeListener:fn,removeAllListeners:un,emit:pn,binding:ln,cwd:cn,chdir:mn,umask:dn,hrtime:xn,platform:Ki,release:tn,config:rn,uptime:gn},Wt={};Object.keys(Wt).forEach(r=>{let t=r.split("."),e=p;for(let o=0;o<t.length;o++){let i=t[o];o===t.length-1?e[i]=Wt[r]:e=e[i]||(e[i]={})}})});function Jt(){vt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)k[t]=r[t],L[r.charCodeAt(t)]=t;L[45]=62,L[95]=63}function Tn(r){vt||Jt();var t,e,o,i,s,u,l=r.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=r[l-2]==="="?2:r[l-1]==="="?1:0,u=new wn(l*3/4-s),o=s>0?l-4:l;var m=0;for(t=0,e=0;t<o;t+=4,e+=3)i=L[r.charCodeAt(t)]<<18|L[r.charCodeAt(t+1)]<<12|L[r.charCodeAt(t+2)]<<6|L[r.charCodeAt(t+3)],u[m++]=i>>16&255,u[m++]=i>>8&255,u[m++]=i&255;return s===2?(i=L[r.charCodeAt(t)]<<2|L[r.charCodeAt(t+1)]>>4,u[m++]=i&255):s===1&&(i=L[r.charCodeAt(t)]<<10|L[r.charCodeAt(t+1)]<<4|L[r.charCodeAt(t+2)]>>2,u[m++]=i>>8&255,u[m++]=i&255),u}function bn(r){return k[r>>18&63]+k[r>>12&63]+k[r>>6&63]+k[r&63]}function An(r,t,e){for(var o,i=[],s=t;s<e;s+=3)o=(r[s]<<16)+(r[s+1]<<8)+r[s+2],i.push(bn(o));return i.join("")}function Ht(r){vt||Jt();for(var t,e=r.length,o=e%3,i="",s=[],u=16383,l=0,m=e-o;l<m;l+=u)s.push(An(r,l,l+u>m?m:l+u));return o===1?(t=r[e-1],i+=k[t>>2],i+=k[t<<4&63],i+="=="):o===2&&(t=(r[e-2]<<8)+r[e-1],i+=k[t>>10],i+=k[t>>4&63],i+=k[t<<2&63],i+="="),s.push(i),s.join("")}function qe(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function $(r,t){if(qe()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=f.prototype):(r===null&&(r=new f(t)),r.length=t),r}function f(r,t,e){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return _t(this,r)}return Zt(this,r,t,e)}function Zt(r,t,e,o){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?En(r,t,e,o):typeof t=="string"?_n(r,t,e):Sn(r,t)}function Qt(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function vn(r,t,e,o){return Qt(t),t<=0?$(r,t):e!==void 0?typeof o=="string"?$(r,t).fill(e,o):$(r,t).fill(e):$(r,t)}function _t(r,t){if(Qt(t),r=$(r,t<0?0:Et(t)|0),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function _n(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var o=Xt(t,e)|0;r=$(r,o);var i=r.write(t,e);return i!==o&&(r=r.slice(0,i)),r}function At(r,t){var e=t.length<0?0:Et(t.length)|0;r=$(r,e);for(var o=0;o<e;o+=1)r[o]=t[o]&255;return r}function En(r,t,e,o){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(o||0))throw new RangeError("'length' is out of bounds");return e===void 0&&o===void 0?t=new Uint8Array(t):o===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,o),f.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=f.prototype):r=At(r,t),r}function Sn(r,t){if(D(t)){var e=Et(t.length)|0;return r=$(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Gn(t.length)?$(r,0):At(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return At(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Et(r){if(r>=qe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+qe().toString(16)+" bytes");return r|0}function D(r){return!!(r!=null&&r._isBuffer)}function Xt(r,t){if(D(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return He(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return ar(r).length;default:if(o)return He(r).length;t=(""+t).toLowerCase(),o=!0}}function Cn(r,t,e){var o=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return kn(this,t,e);case"utf8":case"utf-8":return rr(this,t,e);case"ascii":return Un(this,t,e);case"latin1":case"binary":return Bn(this,t,e);case"base64":return Pn(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Dn(this,t,e);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),o=!0}}function me(r,t,e){var o=r[t];r[t]=r[e],r[e]=o}function er(r,t,e,o,i){if(r.length===0)return-1;if(typeof e=="string"?(o=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=f.from(t,o)),D(t))return t.length===0?-1:Vt(r,t,e,o,i);if(typeof t=="number")return t=t&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Vt(r,[t],e,o,i);throw new TypeError("val must be string, number or Buffer")}function Vt(r,t,e,o,i){var s=1,u=r.length,l=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(r.length<2||t.length<2)return-1;s=2,u/=2,l/=2,e/=2}function m(T,b){return s===1?T[b]:T.readUInt16BE(b*s)}var d;if(i){var h=-1;for(d=e;d<u;d++)if(m(r,d)===m(t,h===-1?0:d-h)){if(h===-1&&(h=d),d-h+1===l)return h*s}else h!==-1&&(d-=d-h),h=-1}else for(e+l>u&&(e=u-l),d=e;d>=0;d--){for(var x=!0,g=0;g<l;g++)if(m(r,d+g)!==m(t,g)){x=!1;break}if(x)return d}return-1}function In(r,t,e,o){e=Number(e)||0;var i=r.length-e;o?(o=Number(o),o>i&&(o=i)):o=i;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");o>s/2&&(o=s/2);for(var u=0;u<o;++u){var l=parseInt(t.substr(u*2,2),16);if(isNaN(l))return u;r[e+u]=l}return u}function Ln(r,t,e,o){return Je(He(t,r.length-e),r,e,o)}function tr(r,t,e,o){return Je(zn(t),r,e,o)}function Rn(r,t,e,o){return tr(r,t,e,o)}function Nn(r,t,e,o){return Je(ar(t),r,e,o)}function On(r,t,e,o){return Je(Yn(t,r.length-e),r,e,o)}function Pn(r,t,e){return t===0&&e===r.length?Ht(r):Ht(r.slice(t,e))}function rr(r,t,e){e=Math.min(r.length,e);for(var o=[],i=t;i<e;){var s=r[i],u=null,l=s>239?4:s>223?3:s>191?2:1;if(i+l<=e){var m,d,h,x;switch(l){case 1:s<128&&(u=s);break;case 2:m=r[i+1],(m&192)===128&&(x=(s&31)<<6|m&63,x>127&&(u=x));break;case 3:m=r[i+1],d=r[i+2],(m&192)===128&&(d&192)===128&&(x=(s&15)<<12|(m&63)<<6|d&63,x>2047&&(x<55296||x>57343)&&(u=x));break;case 4:m=r[i+1],d=r[i+2],h=r[i+3],(m&192)===128&&(d&192)===128&&(h&192)===128&&(x=(s&15)<<18|(m&63)<<12|(d&63)<<6|h&63,x>65535&&x<1114112&&(u=x))}}u===null?(u=65533,l=1):u>65535&&(u-=65536,o.push(u>>>10&1023|55296),u=56320|u&1023),o.push(u),i+=l}return Mn(o)}function Mn(r){var t=r.length;if(t<=Kt)return String.fromCharCode.apply(String,r);for(var e="",o=0;o<t;)e+=String.fromCharCode.apply(String,r.slice(o,o+=Kt));return e}function Un(r,t,e){var o="";e=Math.min(r.length,e);for(var i=t;i<e;++i)o+=String.fromCharCode(r[i]&127);return o}function Bn(r,t,e){var o="";e=Math.min(r.length,e);for(var i=t;i<e;++i)o+=String.fromCharCode(r[i]);return o}function kn(r,t,e){var o=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>o)&&(e=o);for(var i="",s=t;s<e;++s)i+=$n(r[s]);return i}function Dn(r,t,e){for(var o=r.slice(t,e),i="",s=0;s<o.length;s+=2)i+=String.fromCharCode(o[s]+o[s+1]*256);return i}function A(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function S(r,t,e,o,i,s){if(!D(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(e+o>r.length)throw new RangeError("Index out of range")}function Ve(r,t,e,o){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(r.length-e,2);i<s;++i)r[e+i]=(t&255<<8*(o?i:1-i))>>>(o?i:1-i)*8}function Ke(r,t,e,o){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(r.length-e,4);i<s;++i)r[e+i]=t>>>(o?i:3-i)*8&255}function or(r,t,e,o,i,s){if(e+o>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function ir(r,t,e,o,i){return i||or(r,t,e,4,34028234663852886e22,-34028234663852886e22),fr(r,t,e,o,23,4),e+4}function nr(r,t,e,o,i){return i||or(r,t,e,8,17976931348623157e292,-17976931348623157e292),fr(r,t,e,o,52,8),e+8}function Fn(r){if(r=Wn(r).replace(jn,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Wn(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function $n(r){return r<16?"0"+r.toString(16):r.toString(16)}function He(r,t){t=t||1/0;for(var e,o=r.length,i=null,s=[],u=0;u<o;++u){if(e=r.charCodeAt(u),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&s.push(239,191,189);continue}else if(u+1===o){(t-=3)>-1&&s.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&s.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;s.push(e)}else if(e<2048){if((t-=2)<0)break;s.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;s.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;s.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return s}function zn(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function Yn(r,t){for(var e,o,i,s=[],u=0;u<r.length&&!((t-=2)<0);++u)e=r.charCodeAt(u),o=e>>8,i=e%256,s.push(i),s.push(o);return s}function ar(r){return Tn(Fn(r))}function Je(r,t,e,o){for(var i=0;i<o&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function Gn(r){return r!==r}function qn(r){return r!=null&&(!!r._isBuffer||sr(r)||Hn(r))}function sr(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Hn(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&sr(r.slice(0,0))}function Ze(r,t,e,o,i){var s,u,l=i*8-o-1,m=(1<<l)-1,d=m>>1,h=-7,x=e?i-1:0,g=e?-1:1,T=r[t+x];for(x+=g,s=T&(1<<-h)-1,T>>=-h,h+=l;h>0;s=s*256+r[t+x],x+=g,h-=8);for(u=s&(1<<-h)-1,s>>=-h,h+=o;h>0;u=u*256+r[t+x],x+=g,h-=8);if(s===0)s=1-d;else{if(s===m)return u?NaN:(T?-1:1)*(1/0);u=u+Math.pow(2,o),s=s-d}return(T?-1:1)*u*Math.pow(2,s-o)}function fr(r,t,e,o,i,s){var u,l,m,d=s*8-i-1,h=(1<<d)-1,x=h>>1,g=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=o?0:s-1,b=o?1:-1,C=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,u=h):(u=Math.floor(Math.log(t)/Math.LN2),t*(m=Math.pow(2,-u))<1&&(u--,m*=2),u+x>=1?t+=g/m:t+=g*Math.pow(2,1-x),t*m>=2&&(u++,m/=2),u+x>=h?(l=0,u=h):u+x>=1?(l=(t*m-1)*Math.pow(2,i),u=u+x):(l=t*Math.pow(2,x-1)*Math.pow(2,i),u=0));i>=8;r[e+T]=l&255,T+=b,l/=256,i-=8);for(u=u<<i|l,d+=i;d>0;r[e+T]=u&255,T+=b,u/=256,d-=8);r[e+T-b]|=C*128}var k,L,wn,vt,Kt,jn,ur=bt(()=>{"use strict";n();a();k=[],L=[],wn=typeof Uint8Array!="undefined"?Uint8Array:Array,vt=!1;f.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;f.poolSize=8192;f._augment=function(r){return r.__proto__=f.prototype,r};f.from=function(r,t,e){return Zt(null,r,t,e)};f.kMaxLength=qe();f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]);f.alloc=function(r,t,e){return vn(null,r,t,e)};f.allocUnsafe=function(r){return _t(null,r)};f.allocUnsafeSlow=function(r){return _t(null,r)};f.isBuffer=qn;f.compare=function(t,e){if(!D(t)||!D(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var o=t.length,i=e.length,s=0,u=Math.min(o,i);s<u;++s)if(t[s]!==e[s]){o=t[s],i=e[s];break}return o<i?-1:i<o?1:0};f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return f.alloc(0);var o;if(e===void 0)for(e=0,o=0;o<t.length;++o)e+=t[o].length;var i=f.allocUnsafe(e),s=0;for(o=0;o<t.length;++o){var u=t[o];if(!D(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,s),s+=u.length}return i};f.byteLength=Xt;f.prototype._isBuffer=!0;f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)me(this,e,e+1);return this};f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)me(this,e,e+3),me(this,e+1,e+2);return this};f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)me(this,e,e+7),me(this,e+1,e+6),me(this,e+2,e+5),me(this,e+3,e+4);return this};f.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?rr(this,0,t):Cn.apply(this,arguments)};f.prototype.equals=function(t){if(!D(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:f.compare(this,t)===0};f.prototype.compare=function(t,e,o,i,s){if(!D(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),o===void 0&&(o=t?t.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),e<0||o>t.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&e>=o)return 0;if(i>=s)return-1;if(e>=o)return 1;if(e>>>=0,o>>>=0,i>>>=0,s>>>=0,this===t)return 0;for(var u=s-i,l=o-e,m=Math.min(u,l),d=this.slice(i,s),h=t.slice(e,o),x=0;x<m;++x)if(d[x]!==h[x]){u=d[x],l=h[x];break}return u<l?-1:l<u?1:0};f.prototype.includes=function(t,e,o){return this.indexOf(t,e,o)!==-1};f.prototype.indexOf=function(t,e,o){return er(this,t,e,o,!0)};f.prototype.lastIndexOf=function(t,e,o){return er(this,t,e,o,!1)};f.prototype.write=function(t,e,o,i){if(e===void 0)i="utf8",o=this.length,e=0;else if(o===void 0&&typeof e=="string")i=e,o=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(o)?(o=o|0,i===void 0&&(i="utf8")):(i=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var s=this.length-e;if((o===void 0||o>s)&&(o=s),t.length>0&&(o<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return In(this,t,e,o);case"utf8":case"utf-8":return Ln(this,t,e,o);case"ascii":return tr(this,t,e,o);case"latin1":case"binary":return Rn(this,t,e,o);case"base64":return Nn(this,t,e,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return On(this,t,e,o);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Kt=4096;f.prototype.slice=function(t,e){var o=this.length;t=~~t,e=e===void 0?o:~~e,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),e<0?(e+=o,e<0&&(e=0)):e>o&&(e=o),e<t&&(e=t);var i;if(f.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=f.prototype;else{var s=e-t;i=new f(s,void 0);for(var u=0;u<s;++u)i[u]=this[u+t]}return i};f.prototype.readUIntLE=function(t,e,o){t=t|0,e=e|0,o||A(t,e,this.length);for(var i=this[t],s=1,u=0;++u<e&&(s*=256);)i+=this[t+u]*s;return i};f.prototype.readUIntBE=function(t,e,o){t=t|0,e=e|0,o||A(t,e,this.length);for(var i=this[t+--e],s=1;e>0&&(s*=256);)i+=this[t+--e]*s;return i};f.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]};f.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8};f.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]};f.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};f.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};f.prototype.readIntLE=function(t,e,o){t=t|0,e=e|0,o||A(t,e,this.length);for(var i=this[t],s=1,u=0;++u<e&&(s*=256);)i+=this[t+u]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*e)),i};f.prototype.readIntBE=function(t,e,o){t=t|0,e=e|0,o||A(t,e,this.length);for(var i=e,s=1,u=this[t+--i];i>0&&(s*=256);)u+=this[t+--i]*s;return s*=128,u>=s&&(u-=Math.pow(2,8*e)),u};f.prototype.readInt8=function(t,e){return e||A(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};f.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};f.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};f.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};f.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};f.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),Ze(this,t,!0,23,4)};f.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),Ze(this,t,!1,23,4)};f.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),Ze(this,t,!0,52,8)};f.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),Ze(this,t,!1,52,8)};f.prototype.writeUIntLE=function(t,e,o,i){if(t=+t,e=e|0,o=o|0,!i){var s=Math.pow(2,8*o)-1;S(this,t,e,o,s,0)}var u=1,l=0;for(this[e]=t&255;++l<o&&(u*=256);)this[e+l]=t/u&255;return e+o};f.prototype.writeUIntBE=function(t,e,o,i){if(t=+t,e=e|0,o=o|0,!i){var s=Math.pow(2,8*o)-1;S(this,t,e,o,s,0)}var u=o-1,l=1;for(this[e+u]=t&255;--u>=0&&(l*=256);)this[e+u]=t/l&255;return e+o};f.prototype.writeUInt8=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};f.prototype.writeUInt16LE=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ve(this,t,e,!0),e+2};f.prototype.writeUInt16BE=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ve(this,t,e,!1),e+2};f.prototype.writeUInt32LE=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):Ke(this,t,e,!0),e+4};f.prototype.writeUInt32BE=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Ke(this,t,e,!1),e+4};f.prototype.writeIntLE=function(t,e,o,i){if(t=+t,e=e|0,!i){var s=Math.pow(2,8*o-1);S(this,t,e,o,s-1,-s)}var u=0,l=1,m=0;for(this[e]=t&255;++u<o&&(l*=256);)t<0&&m===0&&this[e+u-1]!==0&&(m=1),this[e+u]=(t/l>>0)-m&255;return e+o};f.prototype.writeIntBE=function(t,e,o,i){if(t=+t,e=e|0,!i){var s=Math.pow(2,8*o-1);S(this,t,e,o,s-1,-s)}var u=o-1,l=1,m=0;for(this[e+u]=t&255;--u>=0&&(l*=256);)t<0&&m===0&&this[e+u+1]!==0&&(m=1),this[e+u]=(t/l>>0)-m&255;return e+o};f.prototype.writeInt8=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};f.prototype.writeInt16LE=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):Ve(this,t,e,!0),e+2};f.prototype.writeInt16BE=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):Ve(this,t,e,!1),e+2};f.prototype.writeInt32LE=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Ke(this,t,e,!0),e+4};f.prototype.writeInt32BE=function(t,e,o){return t=+t,e=e|0,o||S(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):Ke(this,t,e,!1),e+4};f.prototype.writeFloatLE=function(t,e,o){return ir(this,t,e,!0,o)};f.prototype.writeFloatBE=function(t,e,o){return ir(this,t,e,!1,o)};f.prototype.writeDoubleLE=function(t,e,o){return nr(this,t,e,!0,o)};f.prototype.writeDoubleBE=function(t,e,o){return nr(this,t,e,!1,o)};f.prototype.copy=function(t,e,o,i){if(o||(o=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<o&&(i=o),i===o||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-o&&(i=t.length-e+o);var s=i-o,u;if(this===t&&o<e&&e<i)for(u=s-1;u>=0;--u)t[u+e]=this[u+o];else if(s<1e3||!f.TYPED_ARRAY_SUPPORT)for(u=0;u<s;++u)t[u+e]=this[u+o];else Uint8Array.prototype.set.call(t,this.subarray(o,o+s),e);return s};f.prototype.fill=function(t,e,o,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,o=this.length):typeof o=="string"&&(i=o,o=this.length),t.length===1){var s=t.charCodeAt(0);s<256&&(t=s)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!f.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<o)throw new RangeError("Out of range index");if(o<=e)return this;e=e>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);var u;if(typeof t=="number")for(u=e;u<o;++u)this[u]=t;else{var l=D(t)?t:He(new f(t,i).toString()),m=l.length;for(u=0;u<o-e;++u)this[u+e]=l[u%m]}return this};jn=/[^+\/0-9A-Za-z-_]/g});var a=bt(()=>{"use strict";ur()});n();a();function de(r){throw new Error("Unexpected value: "+JSON.stringify(r))}n();a();n();a();n();a();n();a();function Vn(r,t,e){var o=-1,i=r.length;t<0&&(t=-t>i?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var s=Array(i);++o<i;)s[o]=r[o+t];return s}var pr=Vn;function Kn(r,t,e){var o=r.length;return e=e===void 0?o:e,!t&&e>=o?r:pr(r,t,e)}var lr=Kn;n();a();var Jn="\\ud800-\\udfff",Zn="\\u0300-\\u036f",Qn="\\ufe20-\\ufe2f",Xn="\\u20d0-\\u20ff",ea=Zn+Qn+Xn,ta="\\ufe0e\\ufe0f",ra="\\u200d",oa=RegExp("["+ra+Jn+ea+ta+"]");function ia(r){return oa.test(r)}var Qe=ia;n();a();n();a();function na(r){return r.split("")}var cr=na;n();a();var mr="\\ud800-\\udfff",aa="\\u0300-\\u036f",sa="\\ufe20-\\ufe2f",fa="\\u20d0-\\u20ff",ua=aa+sa+fa,pa="\\ufe0e\\ufe0f",la="["+mr+"]",St="["+ua+"]",Ct="\\ud83c[\\udffb-\\udfff]",ca="(?:"+St+"|"+Ct+")",dr="[^"+mr+"]",hr="(?:\\ud83c[\\udde6-\\uddff]){2}",xr="[\\ud800-\\udbff][\\udc00-\\udfff]",ma="\\u200d",yr=ca+"?",gr="["+pa+"]?",da="(?:"+ma+"(?:"+[dr,hr,xr].join("|")+")"+gr+yr+")*",ha=gr+yr+da,xa="(?:"+[dr+St+"?",St,hr,xr,la].join("|")+")",ya=RegExp(Ct+"(?="+Ct+")|"+xa+ha,"g");function ga(r){return r.match(ya)||[]}var wr=ga;function wa(r){return Qe(r)?wr(r):cr(r)}var Tr=wa;n();a();n();a();n();a();n();a();n();a();var Ta=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,Xe=Ta;var ba=typeof self=="object"&&self&&self.Object===Object&&self,Aa=Xe||ba||Function("return this")(),v=Aa;var va=v.Symbol,R=va;n();a();function _a(r,t){for(var e=-1,o=r==null?0:r.length,i=Array(o);++e<o;)i[e]=t(r[e],e,r);return i}var br=_a;n();a();var Ea=Array.isArray,z=Ea;n();a();n();a();n();a();var Ar=Object.prototype,Sa=Ar.hasOwnProperty,Ca=Ar.toString,Me=R?R.toStringTag:void 0;function Ia(r){var t=Sa.call(r,Me),e=r[Me];try{r[Me]=void 0;var o=!0}catch(s){}var i=Ca.call(r);return o&&(t?r[Me]=e:delete r[Me]),i}var vr=Ia;n();a();var La=Object.prototype,Ra=La.toString;function Na(r){return Ra.call(r)}var _r=Na;var Oa="[object Null]",Pa="[object Undefined]",Er=R?R.toStringTag:void 0;function Ma(r){return r==null?r===void 0?Pa:Oa:Er&&Er in Object(r)?vr(r):_r(r)}var O=Ma;n();a();function Ua(r){return r!=null&&typeof r=="object"}var P=Ua;var Ba="[object Symbol]";function ka(r){return typeof r=="symbol"||P(r)&&O(r)==Ba}var Sr=ka;var Da=1/0,Cr=R?R.prototype:void 0,Ir=Cr?Cr.toString:void 0;function Lr(r){if(typeof r=="string")return r;if(z(r))return br(r,Lr)+"";if(Sr(r))return Ir?Ir.call(r):"";var t=r+"";return t=="0"&&1/r==-Da?"-0":t}var Rr=Lr;function ja(r){return r==null?"":Rr(r)}var ee=ja;function Fa(r){return function(t){t=ee(t);var e=Qe(t)?Tr(t):void 0,o=e?e[0]:t.charAt(0),i=e?lr(e,1).join(""):t.slice(1);return o[r]()+i}}var Nr=Fa;var Wa=Nr("toUpperCase"),It=Wa;n();a();n();a();function $a(r){return It(ee(r).toLowerCase())}var Or=$a;n();a();n();a();function za(r,t,e,o){var i=-1,s=r==null?0:r.length;for(o&&s&&(e=r[++i]);++i<s;)e=t(e,r[i],i,r);return e}var Pr=za;n();a();n();a();n();a();function Ya(r){return function(t){return r==null?void 0:r[t]}}var Mr=Ya;var Ga={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},qa=Mr(Ga),Ur=qa;var Ha=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Va="\\u0300-\\u036f",Ka="\\ufe20-\\ufe2f",Ja="\\u20d0-\\u20ff",Za=Va+Ka+Ja,Qa="["+Za+"]",Xa=RegExp(Qa,"g");function es(r){return r=ee(r),r&&r.replace(Ha,Ur).replace(Xa,"")}var Br=es;n();a();n();a();var ts=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function rs(r){return r.match(ts)||[]}var kr=rs;n();a();var os=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function is(r){return os.test(r)}var Dr=is;n();a();var zr="\\ud800-\\udfff",ns="\\u0300-\\u036f",as="\\ufe20-\\ufe2f",ss="\\u20d0-\\u20ff",fs=ns+as+ss,Yr="\\u2700-\\u27bf",Gr="a-z\\xdf-\\xf6\\xf8-\\xff",us="\\xac\\xb1\\xd7\\xf7",ps="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ls="\\u2000-\\u206f",cs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qr="A-Z\\xc0-\\xd6\\xd8-\\xde",ms="\\ufe0e\\ufe0f",Hr=us+ps+ls+cs,Vr="['\u2019]",jr="["+Hr+"]",ds="["+fs+"]",Kr="\\d+",hs="["+Yr+"]",Jr="["+Gr+"]",Zr="[^"+zr+Hr+Kr+Yr+Gr+qr+"]",xs="\\ud83c[\\udffb-\\udfff]",ys="(?:"+ds+"|"+xs+")",gs="[^"+zr+"]",Qr="(?:\\ud83c[\\udde6-\\uddff]){2}",Xr="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="["+qr+"]",ws="\\u200d",Fr="(?:"+Jr+"|"+Zr+")",Ts="(?:"+Se+"|"+Zr+")",Wr="(?:"+Vr+"(?:d|ll|m|re|s|t|ve))?",$r="(?:"+Vr+"(?:D|LL|M|RE|S|T|VE))?",eo=ys+"?",to="["+ms+"]?",bs="(?:"+ws+"(?:"+[gs,Qr,Xr].join("|")+")"+to+eo+")*",As="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vs="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",_s=to+eo+bs,Es="(?:"+[hs,Qr,Xr].join("|")+")"+_s,Ss=RegExp([Se+"?"+Jr+"+"+Wr+"(?="+[jr,Se,"$"].join("|")+")",Ts+"+"+$r+"(?="+[jr,Se+Fr,"$"].join("|")+")",Se+"?"+Fr+"+"+Wr,Se+"+"+$r,vs,As,Kr,Es].join("|"),"g");function Cs(r){return r.match(Ss)||[]}var ro=Cs;function Is(r,t,e){return r=ee(r),t=e?void 0:t,t===void 0?Dr(r)?ro(r):kr(r):r.match(t)||[]}var oo=Is;var Ls="['\u2019]",Rs=RegExp(Ls,"g");function Ns(r){return function(t){return Pr(oo(Br(t).replace(Rs,"")),r,"")}}var io=Ns;var Os=io(function(r,t,e){return t=t.toLowerCase(),r+(e?Or(t):t)}),Ps=Os;n();a();n();a();function Ms(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var et=Ms;n();a();n();a();n();a();n();a();var Us="[object AsyncFunction]",Bs="[object Function]",ks="[object GeneratorFunction]",Ds="[object Proxy]";function js(r){if(!et(r))return!1;var t=O(r);return t==Bs||t==ks||t==Us||t==Ds}var tt=js;n();a();n();a();var Fs=v["__core-js_shared__"],rt=Fs;var no=(function(){var r=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function Ws(r){return!!no&&no in r}var ao=Ws;n();a();var $s=Function.prototype,zs=$s.toString;function Ys(r){if(r!=null){try{return zs.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var Y=Ys;var Gs=/[\\^$.*+?()[\]{}|]/g,qs=/^\[object .+?Constructor\]$/,Hs=Function.prototype,Vs=Object.prototype,Ks=Hs.toString,Js=Vs.hasOwnProperty,Zs=RegExp("^"+Ks.call(Js).replace(Gs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qs(r){if(!et(r)||ao(r))return!1;var t=tt(r)?Zs:qs;return t.test(Y(r))}var so=Qs;n();a();function Xs(r,t){return r==null?void 0:r[t]}var fo=Xs;function ef(r,t){var e=fo(r,t);return so(e)?e:void 0}var N=ef;var tf=N(v,"WeakMap"),ot=tf;n();a();function rf(){}var uo=rf;n();a();n();a();n();a();function of(r,t,e,o){for(var i=r.length,s=e+(o?1:-1);o?s--:++s<i;)if(t(r[s],s,r))return s;return-1}var po=of;n();a();function nf(r){return r!==r}var lo=nf;n();a();function af(r,t,e){for(var o=e-1,i=r.length;++o<i;)if(r[o]===t)return o;return-1}var co=af;function sf(r,t,e){return t===t?co(r,t,e):po(r,lo,e)}var mo=sf;function ff(r,t){var e=r==null?0:r.length;return!!e&&mo(r,t,0)>-1}var ho=ff;n();a();var uf=9007199254740991,pf=/^(?:0|[1-9]\d*)$/;function lf(r,t){var e=typeof r;return t=t==null?uf:t,!!t&&(e=="number"||e!="symbol"&&pf.test(r))&&r>-1&&r%1==0&&r<t}var xo=lf;n();a();function cf(r,t){return r===t||r!==r&&t!==t}var it=cf;n();a();n();a();var mf=9007199254740991;function df(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=mf}var nt=df;function hf(r){return r!=null&&nt(r.length)&&!tt(r)}var yo=hf;n();a();var xf=Object.prototype;function yf(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||xf;return r===e}var go=yf;n();a();n();a();n();a();function gf(r,t){for(var e=-1,o=Array(r);++e<r;)o[e]=t(e);return o}var wo=gf;n();a();n();a();var wf="[object Arguments]";function Tf(r){return P(r)&&O(r)==wf}var Lt=Tf;var To=Object.prototype,bf=To.hasOwnProperty,Af=To.propertyIsEnumerable,vf=Lt((function(){return arguments})())?Lt:function(r){return P(r)&&bf.call(r,"callee")&&!Af.call(r,"callee")},bo=vf;n();a();n();a();function _f(){return!1}var Ao=_f;var Eo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vo=Eo&&typeof module=="object"&&module&&!module.nodeType&&module,Ef=vo&&vo.exports===Eo,_o=Ef?v.Buffer:void 0,Sf=_o?_o.isBuffer:void 0,Cf=Sf||Ao,Ue=Cf;n();a();n();a();var If="[object Arguments]",Lf="[object Array]",Rf="[object Boolean]",Nf="[object Date]",Of="[object Error]",Pf="[object Function]",Mf="[object Map]",Uf="[object Number]",Bf="[object Object]",kf="[object RegExp]",Df="[object Set]",jf="[object String]",Ff="[object WeakMap]",Wf="[object ArrayBuffer]",$f="[object DataView]",zf="[object Float32Array]",Yf="[object Float64Array]",Gf="[object Int8Array]",qf="[object Int16Array]",Hf="[object Int32Array]",Vf="[object Uint8Array]",Kf="[object Uint8ClampedArray]",Jf="[object Uint16Array]",Zf="[object Uint32Array]",w={};w[zf]=w[Yf]=w[Gf]=w[qf]=w[Hf]=w[Vf]=w[Kf]=w[Jf]=w[Zf]=!0;w[If]=w[Lf]=w[Wf]=w[Rf]=w[$f]=w[Nf]=w[Of]=w[Pf]=w[Mf]=w[Uf]=w[Bf]=w[kf]=w[Df]=w[jf]=w[Ff]=!1;function Qf(r){return P(r)&&nt(r.length)&&!!w[O(r)]}var So=Qf;n();a();function Xf(r){return function(t){return r(t)}}var Co=Xf;n();a();var Io=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Be=Io&&typeof module=="object"&&module&&!module.nodeType&&module,eu=Be&&Be.exports===Io,Rt=eu&&Xe.process,tu=(function(){try{var r=Be&&Be.require&&Be.require("util").types;return r||Rt&&Rt.binding&&Rt.binding("util")}catch(t){}})(),Nt=tu;var Lo=Nt&&Nt.isTypedArray,ru=Lo?Co(Lo):So,at=ru;var ou=Object.prototype,iu=ou.hasOwnProperty;function nu(r,t){var e=z(r),o=!e&&bo(r),i=!e&&!o&&Ue(r),s=!e&&!o&&!i&&at(r),u=e||o||i||s,l=u?wo(r.length,String):[],m=l.length;for(var d in r)(t||iu.call(r,d))&&!(u&&(d=="length"||i&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||xo(d,m)))&&l.push(d);return l}var Ro=nu;n();a();n();a();n();a();function au(r,t){return function(e){return r(t(e))}}var No=au;var su=No(Object.keys,Object),Oo=su;var fu=Object.prototype,uu=fu.hasOwnProperty;function pu(r){if(!go(r))return Oo(r);var t=[];for(var e in Object(r))uu.call(r,e)&&e!="constructor"&&t.push(e);return t}var Po=pu;function lu(r){return yo(r)?Ro(r):Po(r)}var Mo=lu;n();a();n();a();n();a();n();a();n();a();var cu=N(Object,"create"),G=cu;function mu(){this.__data__=G?G(null):{},this.size=0}var Uo=mu;n();a();function du(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Bo=du;n();a();var hu="__lodash_hash_undefined__",xu=Object.prototype,yu=xu.hasOwnProperty;function gu(r){var t=this.__data__;if(G){var e=t[r];return e===hu?void 0:e}return yu.call(t,r)?t[r]:void 0}var ko=gu;n();a();var wu=Object.prototype,Tu=wu.hasOwnProperty;function bu(r){var t=this.__data__;return G?t[r]!==void 0:Tu.call(t,r)}var Do=bu;n();a();var Au="__lodash_hash_undefined__";function vu(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=G&&t===void 0?Au:t,this}var jo=vu;function Ce(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}Ce.prototype.clear=Uo;Ce.prototype.delete=Bo;Ce.prototype.get=ko;Ce.prototype.has=Do;Ce.prototype.set=jo;var Ot=Ce;n();a();n();a();function _u(){this.__data__=[],this.size=0}var Fo=_u;n();a();n();a();function Eu(r,t){for(var e=r.length;e--;)if(it(r[e][0],t))return e;return-1}var te=Eu;var Su=Array.prototype,Cu=Su.splice;function Iu(r){var t=this.__data__,e=te(t,r);if(e<0)return!1;var o=t.length-1;return e==o?t.pop():Cu.call(t,e,1),--this.size,!0}var Wo=Iu;n();a();function Lu(r){var t=this.__data__,e=te(t,r);return e<0?void 0:t[e][1]}var $o=Lu;n();a();function Ru(r){return te(this.__data__,r)>-1}var zo=Ru;n();a();function Nu(r,t){var e=this.__data__,o=te(e,r);return o<0?(++this.size,e.push([r,t])):e[o][1]=t,this}var Yo=Nu;function Ie(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}Ie.prototype.clear=Fo;Ie.prototype.delete=Wo;Ie.prototype.get=$o;Ie.prototype.has=zo;Ie.prototype.set=Yo;var re=Ie;n();a();var Ou=N(v,"Map"),oe=Ou;function Pu(){this.size=0,this.__data__={hash:new Ot,map:new(oe||re),string:new Ot}}var Go=Pu;n();a();n();a();n();a();function Mu(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var qo=Mu;function Uu(r,t){var e=r.__data__;return qo(t)?e[typeof t=="string"?"string":"hash"]:e.map}var ie=Uu;function Bu(r){var t=ie(this,r).delete(r);return this.size-=t?1:0,t}var Ho=Bu;n();a();function ku(r){return ie(this,r).get(r)}var Vo=ku;n();a();function Du(r){return ie(this,r).has(r)}var Ko=Du;n();a();function ju(r,t){var e=ie(this,r),o=e.size;return e.set(r,t),this.size+=e.size==o?0:1,this}var Jo=ju;function Le(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}Le.prototype.clear=Go;Le.prototype.delete=Ho;Le.prototype.get=Vo;Le.prototype.has=Ko;Le.prototype.set=Jo;var st=Le;n();a();function Fu(r,t){for(var e=-1,o=t.length,i=r.length;++e<o;)r[i+e]=t[e];return r}var Zo=Fu;n();a();n();a();function Wu(){this.__data__=new re,this.size=0}var Qo=Wu;n();a();function $u(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var Xo=$u;n();a();function zu(r){return this.__data__.get(r)}var ei=zu;n();a();function Yu(r){return this.__data__.has(r)}var ti=Yu;n();a();var Gu=200;function qu(r,t){var e=this.__data__;if(e instanceof re){var o=e.__data__;if(!oe||o.length<Gu-1)return o.push([r,t]),this.size=++e.size,this;e=this.__data__=new st(o)}return e.set(r,t),this.size=e.size,this}var ri=qu;function Re(r){var t=this.__data__=new re(r);this.size=t.size}Re.prototype.clear=Qo;Re.prototype.delete=Xo;Re.prototype.get=ei;Re.prototype.has=ti;Re.prototype.set=ri;var ft=Re;n();a();n();a();function Hu(r,t){for(var e=-1,o=r==null?0:r.length,i=0,s=[];++e<o;){var u=r[e];t(u,e,r)&&(s[i++]=u)}return s}var oi=Hu;n();a();function Vu(){return[]}var ii=Vu;var Ku=Object.prototype,Ju=Ku.propertyIsEnumerable,ni=Object.getOwnPropertySymbols,Zu=ni?function(r){return r==null?[]:(r=Object(r),oi(ni(r),function(t){return Ju.call(r,t)}))}:ii,ai=Zu;n();a();n();a();function Qu(r,t,e){var o=t(r);return z(r)?o:Zo(o,e(r))}var si=Qu;function Xu(r){return si(r,Mo,ai)}var Pt=Xu;n();a();n();a();var ep=N(v,"DataView"),ut=ep;n();a();var tp=N(v,"Promise"),pt=tp;n();a();var rp=N(v,"Set"),ne=rp;var fi="[object Map]",op="[object Object]",ui="[object Promise]",pi="[object Set]",li="[object WeakMap]",ci="[object DataView]",ip=Y(ut),np=Y(oe),ap=Y(pt),sp=Y(ne),fp=Y(ot),he=O;(ut&&he(new ut(new ArrayBuffer(1)))!=ci||oe&&he(new oe)!=fi||pt&&he(pt.resolve())!=ui||ne&&he(new ne)!=pi||ot&&he(new ot)!=li)&&(he=function(r){var t=O(r),e=t==op?r.constructor:void 0,o=e?Y(e):"";if(o)switch(o){case ip:return ci;case np:return fi;case ap:return ui;case sp:return pi;case fp:return li}return t});var Mt=he;n();a();var up=v.Uint8Array,Ut=up;n();a();n();a();n();a();n();a();n();a();var pp="__lodash_hash_undefined__";function lp(r){return this.__data__.set(r,pp),this}var mi=lp;n();a();function cp(r){return this.__data__.has(r)}var di=cp;function lt(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new st;++t<e;)this.add(r[t])}lt.prototype.add=lt.prototype.push=mi;lt.prototype.has=di;var ct=lt;n();a();function mp(r,t){for(var e=-1,o=r==null?0:r.length;++e<o;)if(t(r[e],e,r))return!0;return!1}var hi=mp;n();a();function dp(r,t){return r.has(t)}var mt=dp;var hp=1,xp=2;function yp(r,t,e,o,i,s){var u=e&hp,l=r.length,m=t.length;if(l!=m&&!(u&&m>l))return!1;var d=s.get(r),h=s.get(t);if(d&&h)return d==t&&h==r;var x=-1,g=!0,T=e&xp?new ct:void 0;for(s.set(r,t),s.set(t,r);++x<l;){var b=r[x],C=t[x];if(o)var Z=u?o(C,b,x,t,r,s):o(b,C,x,r,t,s);if(Z!==void 0){if(Z)continue;g=!1;break}if(T){if(!hi(t,function(ue,pe){if(!mt(T,pe)&&(b===ue||i(b,ue,e,o,s)))return T.push(pe)})){g=!1;break}}else if(!(b===C||i(b,C,e,o,s))){g=!1;break}}return s.delete(r),s.delete(t),g}var dt=yp;n();a();n();a();function gp(r){var t=-1,e=Array(r.size);return r.forEach(function(o,i){e[++t]=[i,o]}),e}var xi=gp;n();a();function wp(r){var t=-1,e=Array(r.size);return r.forEach(function(o){e[++t]=o}),e}var Ne=wp;var Tp=1,bp=2,Ap="[object Boolean]",vp="[object Date]",_p="[object Error]",Ep="[object Map]",Sp="[object Number]",Cp="[object RegExp]",Ip="[object Set]",Lp="[object String]",Rp="[object Symbol]",Np="[object ArrayBuffer]",Op="[object DataView]",yi=R?R.prototype:void 0,Bt=yi?yi.valueOf:void 0;function Pp(r,t,e,o,i,s,u){switch(e){case Op:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Np:return!(r.byteLength!=t.byteLength||!s(new Ut(r),new Ut(t)));case Ap:case vp:case Sp:return it(+r,+t);case _p:return r.name==t.name&&r.message==t.message;case Cp:case Lp:return r==t+"";case Ep:var l=xi;case Ip:var m=o&Tp;if(l||(l=Ne),r.size!=t.size&&!m)return!1;var d=u.get(r);if(d)return d==t;o|=bp,u.set(r,t);var h=dt(l(r),l(t),o,i,s,u);return u.delete(r),h;case Rp:if(Bt)return Bt.call(r)==Bt.call(t)}return!1}var gi=Pp;n();a();var Mp=1,Up=Object.prototype,Bp=Up.hasOwnProperty;function kp(r,t,e,o,i,s){var u=e&Mp,l=Pt(r),m=l.length,d=Pt(t),h=d.length;if(m!=h&&!u)return!1;for(var x=m;x--;){var g=l[x];if(!(u?g in t:Bp.call(t,g)))return!1}var T=s.get(r),b=s.get(t);if(T&&b)return T==t&&b==r;var C=!0;s.set(r,t),s.set(t,r);for(var Z=u;++x<m;){g=l[x];var ue=r[g],pe=t[g];if(o)var Dt=u?o(pe,ue,g,t,r,s):o(ue,pe,g,r,t,s);if(!(Dt===void 0?ue===pe||i(ue,pe,e,o,s):Dt)){C=!1;break}Z||(Z=g=="constructor")}if(C&&!Z){var Fe=r.constructor,We=t.constructor;Fe!=We&&"constructor"in r&&"constructor"in t&&!(typeof Fe=="function"&&Fe instanceof Fe&&typeof We=="function"&&We instanceof We)&&(C=!1)}return s.delete(r),s.delete(t),C}var wi=kp;var Dp=1,Ti="[object Arguments]",bi="[object Array]",ht="[object Object]",jp=Object.prototype,Ai=jp.hasOwnProperty;function Fp(r,t,e,o,i,s){var u=z(r),l=z(t),m=u?bi:Mt(r),d=l?bi:Mt(t);m=m==Ti?ht:m,d=d==Ti?ht:d;var h=m==ht,x=d==ht,g=m==d;if(g&&Ue(r)){if(!Ue(t))return!1;u=!0,h=!1}if(g&&!h)return s||(s=new ft),u||at(r)?dt(r,t,e,o,i,s):gi(r,t,m,e,o,i,s);if(!(e&Dp)){var T=h&&Ai.call(r,"__wrapped__"),b=x&&Ai.call(t,"__wrapped__");if(T||b){var C=T?r.value():r,Z=b?t.value():t;return s||(s=new ft),i(C,Z,e,o,s)}}return g?(s||(s=new ft),wi(r,t,e,o,i,s)):!1}var vi=Fp;function _i(r,t,e,o,i){return r===t?!0:r==null||t==null||!P(r)&&!P(t)?r!==r&&t!==t:vi(r,t,e,o,_i,i)}var Ei=_i;n();a();function Wp(r,t,e){for(var o=-1,i=r==null?0:r.length;++o<i;)if(e(t,r[o]))return!0;return!1}var Si=Wp;n();a();function $p(r,t){return Ei(r,t)}var xt=$p;n();a();n();a();var zp=1/0,Yp=ne&&1/Ne(new ne([,-0]))[1]==zp?function(r){return new ne(r)}:uo,Ci=Yp;var Gp=200;function qp(r,t,e){var o=-1,i=ho,s=r.length,u=!0,l=[],m=l;if(e)u=!1,i=Si;else if(s>=Gp){var d=t?null:Ci(r);if(d)return Ne(d);u=!1,i=mt,m=new ct}else m=t?[]:l;e:for(;++o<s;){var h=r[o],x=t?t(h):h;if(h=e||h!==0?h:0,u&&x===x){for(var g=m.length;g--;)if(m[g]===x)continue e;t&&m.push(x),l.push(h)}else i(m,x,e)||(m!==l&&m.push(x),l.push(h))}return l}var Ii=qp;n();a();function Hp(r,t){return t=typeof t=="function"?t:void 0,r&&r.length?Ii(r,void 0,t):[]}var yt=Hp;n();a();n();a();function Vp(r){return Object.keys(r)}var je={};Yi(je,{Access:()=>ae,Array:()=>xe,AstNode:()=>y,Attribute:()=>ye,Class:()=>H,ClassInstantiation:()=>F,ClassReference:()=>_,CodeBlock:()=>E,DataClass:()=>ge,Enum:()=>we,Field:()=>Te,Map:()=>be,Method:()=>J,MethodInvocation:()=>K,Parameter:()=>V,Trait:()=>Ae,Type:()=>B,TypeLiteral:()=>U,Writer:()=>j,array:()=>ol,assignVariable:()=>yl,attribute:()=>il,classReference:()=>sl,class_:()=>nl,codeblock:()=>ve,dataClass:()=>fl,enum_:()=>ul,field:()=>pl,instantiateClass:()=>ki,invokeMethod:()=>ll,map:()=>ml,mergeArrays:()=>Tl,method:()=>dl,parameter:()=>hl,string:()=>wl,ternary:()=>xl,this_:()=>bl,throwException:()=>cl,trait:()=>al,variable:()=>gl});n();a();n();a();n();a();var q=class{};n();a();n();a();var M=class extends q{constructor(e){super();c(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):typeof this.value=="function"?this.value(e):this.value.write(e)}};var Kp=4,ke=class{constructor(){c(this,"buffer","");c(this,"indentLevel",0);c(this,"hasWrittenAnything",!1);c(this,"lastCharacterIsSemicolon",!1);c(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
2
- `),o=e?t.substring(0,t.length-1):t,i=this.getIndentString(),s=o.replaceAll(`
3
- `,`
4
- ${i}`);this.isAtStartOfLine()&&(s=i+s),e&&(s+=`
5
- `),this.writeInternal(s)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new M(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new M(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}controlFlowWithoutStatement(t){new M(t).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}contiguousControlFlow(t,e){this.dedent(),this.write("} "),new M(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}alternativeControlFlow(t){this.dedent(),this.write("} "),new M(t).write(this),this.write(" {"),this.writeNewLineIfLastLineNot(),this.indent()}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
6
- `)}writeSemicolonIfLastCharacterIsNot(){this.lastCharacterIsSemicolon||this.writeInternal(";")}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
7
- `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:o}){if(t.length>0){let i=t[0];i!=null&&o(i);for(let s=1;s<t.length;s++){this.write(e);let u=t[s];u!=null&&o(u)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
8
- `),this.lastCharacterIsSemicolon=t.endsWith(";")),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*this.getTabSize())}getTabSize(){return Kp}};n();a();function kt(r){return(r==null?void 0:r.name)!=null}n();a();var De=class extends q{constructor({condition:e,true_:o,false_:i}){super();c(this,"condition");c(this,"true_");c(this,"false_");this.condition=e,this.true_=o,this.false_=i}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};n();a();n();a();var ae={Public:"public",PublicReadonly:"public readonly",Protected:"protected",Private:"private"};n();a();n();a();n();a();n();a();var Li="self",Ri="static";function Ni(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var j=class extends ke{constructor({namespace:e,rootNamespace:o,customConfig:i}){super();c(this,"namespace");c(this,"rootNamespace");c(this,"customConfig");c(this,"references",{});this.namespace=e,this.rootNamespace=o,this.customConfig=i}addReference(e){var u,l;if(e.namespace==null)return;if(Object.keys(this.references).filter(m=>{let d=Ni(m);return d.namespace!==e.namespace&&d.name===e.name}).length>0){e.requireFullyQualified();return}let i=e.namespace===""?e.name:`${e.namespace}\\${e.name}`;((l=(u=this.references)[i])!=null?l:u[i]=[]).push(e)}toString(e=!1){if(e)return this.buffer;let o=`namespace ${this.namespace};`,i=this.stringifyImports();return i.length>0?`${o}
9
-
10
- ${i}
11
-
12
- ${this.buffer}`:o+`
13
-
14
- `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(o=>Ni(o).namespace!==this.namespace).map(o=>`use ${o};`).join(`
15
- `)}};var y=class extends q{toString(t){if(t==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:o,customConfig:i,skipImports:s=!1}=t,u=new j({namespace:e,rootNamespace:o,customConfig:i});return this.write(u),u.toString(s)}async toStringAsync({namespace:t,rootNamespace:e,customConfig:o}){let i=new j({namespace:t,rootNamespace:e,customConfig:o});return this.write(i),i.toString()}};var xe=class extends y{constructor({entries:e}){super();c(this,"entries");this.entries=e!=null?e:[]}write(e){e.write("["),this.entries.forEach((o,i)=>{i>0&&e.write(", "),o.write(e)}),e.write("]")}};n();a();var ye=class extends y{constructor(e){var o;super();c(this,"reference");c(this,"arguments");this.reference=e.reference,this.arguments=(o=e.arguments)!=null?o:[]}write(e){e.addReference(this.reference),e.write(`${this.reference.name}`),this.arguments.length>0&&(e.write("("),this.arguments.forEach((o,i)=>{i>0&&e.write(","),typeof o=="string"?e.write(o):o.write(e)}),e.write(")"))}};n();a();n();a();var _=class extends y{constructor({name:e,namespace:o,generics:i}){super();c(this,"name");c(this,"namespace");c(this,"generics");c(this,"fullyQualified");this.name=e,this.namespace=o,this.generics=i,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(e){e.addReference(this);let o=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;e.write(`${o}`)}};n();a();n();a();function se(r){return r.startsWith("$")?r:`$${r}`}var I=class extends y{constructor({docs:e}={}){super();c(this,"docs");c(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(Ye(ze({},e),{name:e.name!=null?se(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
16
- `).forEach(o=>{e.writeLine(` * ${o}`)}),this.tags.length>0&&e.writeLine(" *"));for(let o of this.tags)this.writeTag({writer:e,tag:o});e.writeLine(" */")}writeTag({writer:e,tag:o}){let i=o.docs!=null?o.docs.split(`
17
- `):void 0;i!=null&&i.length>1&&(i.forEach(s=>{e.writeLine(` * ${s}`)}),e.writeLine(" *")),e.write(` * @${o.tagType} `),o.type.write(e,{comment:!0}),o.name!=null&&e.write(` ${o.name}`),i!=null&&i.length===1&&e.write(` ${i[0]}`),e.newLine()}};n();a();function fe(r){return Jp(r,[ae.Public,ae.PublicReadonly,ae.Protected,ae.Private])}function Jp(r,t){return t.reduce((e,o)=>[...e,...r.filter(i=>i.access===o)],[])}var H=class extends y{constructor({name:e,namespace:o,abstract:i,docs:s,parentClassReference:u,traits:l}){super();c(this,"name");c(this,"namespace");c(this,"abstract");c(this,"docs");c(this,"parentClassReference");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);c(this,"constructor_");this.name=e,this.namespace=o,this.abstract=i!=null?i:!1,this.docs=s,this.parentClassReference=u,this.traits=l!=null?l:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addMethods(e){this.methods.push(...e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new _({name:this.name,namespace:this.namespace})),this.abstract&&e.write("abstract "),this.writeComment(e),e.write(`class ${this.name} `),this.parentClassReference!=null&&(e.write("extends "),this.parentClassReference.write(e)),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((o,i)=>{i>0&&e.write(","),e.writeNode(o)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:fe(this.fields)}),(this.constructor!=null||this.methods.length>0)&&e.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:e,constructor:this.constructor_}),this.methods.length>0&&e.newLine()),this.writeMethods({writer:e,methods:fe(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new I({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:o}){var i;this.writeConstructorComment({writer:e,constructor:o}),o.access!=null&&e.write(`${o.access} `),e.write("function __construct("),e.indent(),o.parameters.forEach((s,u)=>{u===0&&e.newLine(),s.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(i=o.body)==null||i.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:o}){if(o.parameters.length===0)return;let i=new I;for(let s of o.parameters)i.addTag(s.getCommentTag());i.write(e)}writeFields({writer:e,fields:o}){o.filter(i=>!i.inherited).forEach((i,s)=>{s>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:o}){o.forEach((i,s)=>{s>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};n();a();n();a();function Oe({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Zp({writer:r,arguments_:t});return}Qp({writer:r,arguments_:t})}function Zp({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)Pi({writer:r,argument:e,writeCompact:!1}),r.writeLine(",");r.dedent(),r.write(")")}function Qp({writer:r,arguments_:t}){r.write("("),t.forEach((e,o)=>{o>0&&r.write(", "),Pi({writer:r,argument:e,writeCompact:!0})}),r.write(")")}function Pi({writer:r,argument:t,writeCompact:e}){kt(t)?(t.docs&&(e?r.write(`/* ${t.docs} */ `):r.writeLine(`/* ${t.docs} */`)),r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var F=class extends y{constructor({classReference:e,arguments_:o,multiline:i}){super();c(this,"classReference");c(this,"arguments_");c(this,"multiline");this.classReference=e,this.arguments_=o,this.multiline=i!=null?i:!1}write(e){e.write("new "),e.writeNode(this.classReference),Oe({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};n();a();var E=class extends y{constructor(e){super();c(this,"arg");this.arg=e}write(e){return new M(this.arg).write(e)}};n();a();n();a();n();a();var V=class extends y{constructor({name:e,type:o,docs:i,initializer:s,access:u,readonly_:l}){super();c(this,"name");c(this,"type");c(this,"docs");c(this,"initializer");c(this,"access");c(this,"readonly_");this.name=se(e),this.type=o,this.docs=i,this.initializer=s,this.access=u,this.readonly_=l!=null?l:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(e){this.access!=null&&e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null?(e.write(" = "),this.initializer.write(e)):this.type.isOptional()&&e.write(" = null")}};n();a();n();a();n();a();n();a();var K=class extends y{constructor({method:e,arguments_:o,static_:i,multiline:s,on:u}){super();c(this,"method");c(this,"arguments_");c(this,"multiline");c(this,"static_");c(this,"on");this.method=e,this.arguments_=o,this.static_=i!=null?i:!1,this.multiline=s!=null?s:!1,this.on=u}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),Oe({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};var U=class r extends y{constructor(e){super();c(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"list":{this.writeList({writer:e,list:this.internalType});break}case"boolean":{e.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"file":{e.writeNode(el({writer:e,value:this.internalType.value}));break}case"float":{e.write(this.internalType.value.toString());break}case"number":{e.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"datetime":{e.writeNode(Xp({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
18
- `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}if(this.internalType.value.includes("'")){e.write(`"${this.internalType.value.replaceAll('"','\\"')}"`);break}e.write(`'${this.internalType.value}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:de(this.internalType)}}isClass(){return this.internalType.type==="class"}asClassOrThrow(){if(this.isClass())return this.internalType;throw new Error("Internal error; ts.TypeLiteral is not a class")}writeStringWithHeredoc({writer:e,value:o}){e.writeLine("<<<EOT"),e.writeNoIndent(o),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:o}){e.writeNode(new F({classReference:o.reference,arguments_:[r.map({entries:o.fields.map(i=>({key:r.string(i.name),value:i.value}))})]}))}writeList({writer:e,list:o}){let i=rl({values:o.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let s of i)s.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:o}){let i=tl({entries:o.entries});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let s of i)s.key.write(e),e.write(" => "),s.value.write(e),e.writeLine(",");e.dedent(),e.write("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:o}){return new this({type:"class",reference:e,fields:o})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:o}){switch(typeof o){case"boolean":e.write(o.toString());return;case"string":e.write(o.includes('"')?`\`${o}\``:`"${o}"`);return;case"number":e.write(o.toString());return;case"object":if(o==null){e.write("null");return}if(Array.isArray(o)){this.writeUnknownArray({writer:e,value:o});return}this.writeUnknownMap({writer:e,value:o});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof o}`)}}writeUnknownArray({writer:e,value:o}){if(o.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of o)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:o}){let i=Object.entries(o);if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[s,u]of i)e.write(`'${s}' => `),e.writeNode(r.unknown(u)),e.writeLine(",");e.dedent(),e.write("]")}};function Xp({writer:r,value:t}){return new F({classReference:new _({name:"DateTime",namespace:""}),arguments_:[new E(`'${t}'`)]})}function el({writer:r,value:t}){return new K({on:new _({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new E(`"${t}"`)]})}function tl({entries:r}){return r.filter(t=>!U.isNop(t.key)&&!U.isNop(t.value))}function rl({values:r}){return r.filter(t=>!U.isNop(t))}var B=class r extends y{constructor(e){super();c(this,"internalType");this.internalType=e}write(e,{comment:o}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(Mi),e.write("DateTime");break;case"dateTime":e.addReference(Mi),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!o){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:o}),e.write(">");break;case"map":{if(!o){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:o}),e.write(", "),this.internalType.valueType.write(e,{comment:o}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!o){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");let i=this.internalType.entries.filter(l=>!l.valueType.isOptional()),s=this.internalType.entries.filter(l=>l.valueType.isOptional()),u=[...i,...s];for(let l of u)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:l,comment:o}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((i,s)=>{s>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:i,comment:o})}),e.write("}");break}case"union":{this.writeUnion({writer:e,unionTypes:this.internalType.types,comment:o});break}case"optional":{let i=this.internalType.value.internalType,s=i.type==="mixed",u=i.type==="union";!u&&!s&&e.write("?"),this.internalType.value.write(e,{comment:o}),u&&!this.unionHasOptional(i.types)&&(e.write("|"),e.writeNode(r.null()));break}case"reference":if(o){e.writeNode(this.internalType.value);let i=this.internalType.value.generics;i&&i.length>0&&(e.write("<"),i.forEach((s,u)=>{u>0&&e.write(", "),s.write(e,{comment:o})}),e.write(">"))}else e.writeNode(this.internalType.value);break;case"enumString":o?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;case"literal":if(o)e.writeNode(this.internalType.value);else switch(this.internalType.value.internalType.type){case"string":e.write("string");break;case"boolean":e.write("bool");break;default:de(this.internalType.value.internalType)}break;default:de(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}getClassReference(){switch(this.internalType.type){case"date":case"dateTime":return new _({name:"DateTime",namespace:""});case"enumString":case"reference":return this.internalType.value;case"int":case"string":case"bool":case"float":case"object":case"map":case"array":case"null":case"mixed":case"optional":case"typeDict":case"union":case"literal":throw new Error("Cannot get class reference for "+this.internalType.type);default:de(this.internalType)}}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,o){return new this({type:"map",keyType:e,valueType:o})}static typeDict(e,{multiline:o}={}){return new this({type:"typeDict",entries:e,multiline:o})}static union(e){let o=this.flattenUnionTypes(e),i=yt(o,xt);return new this({type:"union",types:i})}static flattenUnionTypes(e){let o=[];for(let i of e)i.internalType.type==="union"?o.push(...this.flattenUnionTypes(i.internalType.types)):o.push(i);return o}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static literalString(e){return new this({type:"literal",value:U.string(e)})}static literalBoolean(e){return new this({type:"literal",value:U.boolean(e)})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeUnion({writer:e,unionTypes:o,comment:i}){let s=this.getUniqueTypes({types:o,comment:i,writer:e}),u=this.unwrapOptionalTypes(s),l=u.filter(m=>m.underlyingType().internalType.type==="mixed").length>0;if(l&&!i){e.write("mixed");return}if(u.length>0&&i){e.writeLine("("),u.forEach((m,d)=>{d>0?e.write(" * |"):e.write(" * "),l&&(m=m.underlyingType()),m.write(e,{comment:i}),e.writeLine(),d++}),e.write(" * )");return}u.forEach((m,d)=>{d>0&&e.write("|"),l&&(m=m.underlyingType()),m.write(e,{comment:i}),d++})}writeTypeDictEntry({writer:e,entry:o,comment:i}){e.write(o.key),o.optional&&e.write("?"),e.write(": "),o.valueType.write(e,{comment:i})}getUniqueTypes({writer:e,types:o,comment:i}){let s=yt(o,xt),u=new Set;return s.filter(l=>{let m=l.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig,comment:i});return u.has(m)?!1:(u.add(m),!0)})}unwrapOptionalTypes(e){let o=!1,i=e.map(s=>s.internalType.type==="optional"?(o=!0,s.internalType.value):s);return o&&i.push(r.null()),i}unionHasOptional(e){return e.filter(o=>o.internalType.type==="optional").length>0}toString({namespace:e,rootNamespace:o,customConfig:i,comment:s}){let u=new j({namespace:e,rootNamespace:o,customConfig:i});return this.write(u,{comment:s!=null?s:!1}),u.toString()}},Mi=new _({namespace:"",name:"DateTime"});n();a();function Ui(r){return r.startsWith("$")?r.slice(1):r}var Bi="values",ge=class extends y{constructor({name:e,namespace:o,abstract:i,docs:s,parentClassReference:u,traits:l,constructorAccess:m}){super();c(this,"name");c(this,"namespace");c(this,"constructorAccess");c(this,"class_");this.name=e,this.namespace=o,this.constructorAccess=m!=null?m:"public",this.class_=new H({name:e,namespace:o,abstract:i,docs:s,parentClassReference:u,traits:l})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let o=fe(this.class_.fields).map(i=>Ye(ze({},i),{name:Ui(i.name)}));o.length>0&&this.class_.addConstructor({access:this.constructorAccess,parameters:this.getConstructorParameters({orderedFields:o}),body:je.codeblock(i=>{for(let s of o)i.write(`$this->${s.name} = $${Bi}['${s.name}']`),s.type.isOptional()&&i.write(" ?? null"),i.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new V({name:Bi,type:B.typeDict(e.map(o=>({key:o.name,valueType:o.type,optional:o.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new E("[]"):void 0})]}};n();a();n();a();var J=class extends y{constructor({name:e,access:o,parameters:i,throws:s,return_:u,body:l,docs:m,classReference:d,static_:h}){super();c(this,"name");c(this,"access");c(this,"parameters");c(this,"throws");c(this,"return_");c(this,"body");c(this,"docs");c(this,"classReference");c(this,"static_");this.name=e,this.access=o,this.parameters=i,this.throws=s!=null?s:[],this.return_=u,this.body=l,this.docs=m,this.classReference=d,this.static_=h!=null?h:!1}write(e){var u;this.writeComment(e),e.write(`${this.access}${this.static_?" static":""} function ${this.name}(`);let o=this.parameters.filter(l=>!l.type.isOptional()),i=this.parameters.filter(l=>l.type.isOptional());[...o,...i].forEach((l,m)=>{m>0&&e.write(", "),l.write(e)}),e.write("): "),this.return_!=null?e.writeNodeOrString(this.return_):e.write("void"),e.writeLine(" {"),e.indent(),(u=this.body)==null||u.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let o=new I({docs:this.docs});for(let i of this.parameters)o.addTag({tagType:"param",type:i.type,name:i.name,docs:i.docs});this.return_!=null&&this.return_!==Li&&this.return_!==Ri&&o.addTag({tagType:"return",type:this.return_});for(let i of this.throws)o.addTag({tagType:"throws",type:B.reference(i)});e.writeNode(o)}};var we=class extends y{constructor({name:e,namespace:o,backing:i,docs:s,serializable:u}){super();c(this,"name");c(this,"namespace");c(this,"backing");c(this,"docs");c(this,"members",[]);c(this,"serializable");this.name=e,this.namespace=o,this.backing=i,this.docs=s,this.serializable=u!=null?u:!1}addMember(e){this.members.push(e)}write(e){this.writeComment(e),e.write("enum "),e.writeLine(`${this.name}`),this.backing!=null&&e.write(` : ${this.backing}`),this.serializable&&(e.addReference(new _({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let o of this.members)e.write(`case ${o.name}`),o.value!=null&&(typeof o.value=="string"?e.write(` = "${o.value}"`):e.write(` = ${o.value}`)),e.writeTextStatement("");this.serializable&&(e.newLine(),e.writeNode(new J({name:"jsonSerialize",return_:B.string(),access:"public",parameters:[],body:new E("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new I({docs:this.docs}).write(e)}};n();a();var Te=class extends y{constructor({name:e,type:o,access:i,readonly_:s,initializer:u,docs:l,inlineDocs:m,attributes:d,inherited:h}){super();c(this,"name");c(this,"type");c(this,"access");c(this,"readonly_");c(this,"initializer");c(this,"docs");c(this,"inlineDocs");c(this,"attributes");c(this,"inherited");this.name=se(e),this.type=o,this.access=i,this.readonly_=s!=null?s:!1,this.initializer=u,this.docs=l,this.inlineDocs=m,this.attributes=d!=null?d:[],this.inherited=h!=null?h:!1}write(e){this.writeComment(e),this.writeAttributesIfPresent(e),e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null&&(e.write(" = "),this.initializer.write(e)),e.write(";"),this.inlineDocs!=null&&e.write(` // ${this.inlineDocs}`),e.newLine()}writeComment(e){let o=new I;o.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),o.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((o,i)=>{i>0&&e.write(", "),o.write(e)}),e.writeLine("]"))}};n();a();var be=class extends y{constructor({entries:e,multiline:o}){super();c(this,"entries");c(this,"multiline");this.entries=e!=null?e:[],this.multiline=o!=null?o:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:o,value:i}of this.entries)o.write(e),e.write(" => "),i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[o,{key:i,value:s}]of this.entries.entries())o>0&&e.write(", "),i.write(e),e.write(" => "),s.write(e);e.write("]")}};n();a();var Ae=class extends y{constructor({name:e,namespace:o,docs:i,traits:s}){super();c(this,"name");c(this,"namespace");c(this,"docs");c(this,"traits");c(this,"fields",[]);c(this,"methods",[]);this.name=e,this.namespace=o,this.docs=i,this.traits=s!=null?s:[]}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){this.writeComment(e),e.write(`trait ${this.name} `),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((o,i)=>{i>0&&e.write(","),e.writeNode(o)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:fe(this.fields)}),this.fields.length>0&&this.methods.length>0&&e.newLine(),this.writeMethods({writer:e,methods:fe(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){let o=new I({docs:this.docs});for(let i of this.fields)o.addTag({tagType:"property",type:i.type,name:i.name});o.write(e)}writeFields({writer:e,fields:o}){o.forEach((i,s)=>{s>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:o}){o.forEach((i,s)=>{s>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};n();a();var gt=class extends y{constructor(e){super();c(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),Oe({writer:e,arguments_:this.arrays.map(o=>ve(i=>{if(typeof o=="string"||o instanceof y){i.writeNodeOrString(o);return}i.writeNodeOrString(o.ref),o.fallback&&(i.write(" ?? "),i.writeNodeOrString(o.fallback))}))})}};function ol(r){return new xe(r)}function il(r){return new ye(r)}function nl(r){return new H(r)}function al(r){return new Ae(r)}function sl(r){return new _(r)}function ve(r){return new E(r)}function fl(r){return new ge(r)}function ul(r){return new we(r)}function pl(r){return new Te(r)}function ki(r){return new F(r)}function ll(r){return new K(r)}function cl(r){return ve(t=>{t.write("throw "),t.writeNode(ki(r))})}function ml(r){return new be(r)}function dl(r){return new J(r)}function hl(r){return new V(r)}function xl(r){return new De(r)}function yl(r,t){return ve(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function gl(r){return ve(se(r))}function wl(r){return ve(`"${r}"`)}function Tl(...r){return new gt(r)}function bl(){return new E(r=>{r.write("$this")})}export{ze as a,Ye as b,Al as c,vl as d,bt as e,_l as f,Yi as g,El as h,Sl as i,c as j,n as k,f as l,a as m,de as n,It as o,Ps as p,Vp as q,je as r};
19
- /*! Bundled license information:
20
-
21
- @esbuild-plugins/node-globals-polyfill/Buffer.js:
22
- (*!
23
- * The buffer module from node.js, for the browser.
24
- *
25
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
26
- * @license MIT
27
- *)
28
-
29
- lodash-es/lodash.js:
30
- (**
31
- * @license
32
- * Lodash (Custom Build) <https://lodash.com/>
33
- * Build: `lodash modularize exports="es" -o ./`
34
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
35
- * Released under MIT license <https://lodash.com/license>
36
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
37
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
38
- *)
39
- */
40
- //# sourceMappingURL=chunk-J4Y3S6QS.js.map