diff --git a/packages/cli/package.json b/packages/cli/package.json index 053d8096..2890d2a4 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -13,7 +13,7 @@ "dependencies": { "chalk": "^5.0.1", "chokidar": "^3.5.3", - "commander": "^9.3.0", + "commander": "^9.4.0", "fs": "^0.0.1-security", "glob": "^8.0.3", "indent-string": "^5.0.0" diff --git a/packages/components/package.json b/packages/components/package.json index 52a4ebc0..de3f86d5 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,31 +1,31 @@ { "name": "@quri/squiggle-components", - "version": "0.2.20", + "version": "0.2.23", "license": "MIT", "dependencies": { "@floating-ui/react-dom": "^0.7.2", "@floating-ui/react-dom-interactions": "^0.6.6", - "@headlessui/react": "^1.6.5", + "@headlessui/react": "^1.6.6", "@heroicons/react": "^1.0.6", - "@hookform/resolvers": "^2.9.3", + "@hookform/resolvers": "^2.9.6", "@quri/squiggle-lang": "^0.2.8", "@react-hook/size": "^2.1.2", - "clsx": "^1.1.1", - "framer-motion": "^6.4.1", + "clsx": "^1.2.1", + "framer-motion": "^6.5.1", "lodash": "^4.17.21", "react": "^18.1.0", "react-ace": "^10.1.0", - "react-hook-form": "^7.33.0", + "react-hook-form": "^7.33.1", "react-use": "^17.4.0", - "react-vega": "^7.5.1", + "react-vega": "^7.6.0", "vega": "^5.22.1", "vega-embed": "^6.21.0", - "vega-lite": "^5.2.0", + "vega-lite": "^5.3.0", "vscode-uri": "^3.0.3", "yup": "^0.32.11" }, "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "^7.17.12", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", "@storybook/addon-actions": "^6.5.9", "@storybook/addon-essentials": "^6.5.9", "@storybook/addon-links": "^6.5.9", @@ -36,29 +36,29 @@ "@storybook/react": "^6.5.9", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", - "@testing-library/user-event": "^14.2.1", + "@testing-library/user-event": "^14.2.6", "@types/jest": "^27.5.0", "@types/lodash": "^4.14.182", - "@types/node": "^18.0.0", + "@types/node": "^18.0.6", "@types/react": "^18.0.9", "@types/styled-components": "^5.1.24", "@types/webpack": "^5.28.0", "cross-env": "^7.0.3", "mini-css-extract-plugin": "^2.6.1", - "postcss-cli": "^9.1.0", + "postcss-cli": "^10.0.0", "postcss-import": "^14.1.0", - "postcss-loader": "^7.0.0", + "postcss-loader": "^7.0.1", "react": "^18.1.0", "react-scripts": "^5.0.1", "style-loader": "^3.3.1", - "tailwindcss": "^3.1.3", + "tailwindcss": "^3.1.6", "ts-loader": "^9.3.0", "tsconfig-paths-webpack-plugin": "^3.5.2", "typescript": "^4.7.4", "web-vitals": "^2.1.4", "webpack": "^5.73.0", "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.9.2" + "webpack-dev-server": "^4.9.3" }, "peerDependencies": { "react": "^16.8.0 || ^17 || ^18", diff --git a/packages/components/src/components/DistributionChart.tsx b/packages/components/src/components/DistributionChart.tsx index 961178ff..af644d29 100644 --- a/packages/components/src/components/DistributionChart.tsx +++ b/packages/components/src/components/DistributionChart.tsx @@ -5,18 +5,15 @@ import { distributionError, distributionErrorToString, } from "@quri/squiggle-lang"; -import { Vega, VisualizationSpec } from "react-vega"; -import * as chartSpecification from "../vega-specs/spec-distributions.json"; +import { Vega } from "react-vega"; import { ErrorAlert } from "./Alert"; import { useSize } from "react-use"; import clsx from "clsx"; import { - linearXScale, - logXScale, - linearYScale, - expYScale, -} from "./DistributionVegaScales"; + buildVegaSpec, + DistributionChartSpecOptions, +} from "../lib/distributionSpecBuilder"; import { NumberShower } from "./NumberShower"; export type DistributionPlottingSettings = { @@ -24,27 +21,26 @@ export type DistributionPlottingSettings = { showSummary: boolean; /** Whether to show the user graph controls (scale etc) */ showControls: boolean; - /** Set the x scale to be logarithmic by deault */ - logX: boolean; - /** Set the y scale to be exponential by deault */ - expY: boolean; -}; +} & DistributionChartSpecOptions; export type DistributionChartProps = { distribution: Distribution; width?: number; height: number; + actions?: boolean; } & DistributionPlottingSettings; -export const DistributionChart: React.FC = ({ - distribution, - height, - showSummary, - width, - showControls, - logX, - expY, -}) => { +export const DistributionChart: React.FC = (props) => { + const { + distribution, + height, + showSummary, + width, + showControls, + logX, + expY, + actions = false, + } = props; const [isLogX, setLogX] = React.useState(logX); const [isExpY, setExpY] = React.useState(expY); @@ -64,7 +60,7 @@ export const DistributionChart: React.FC = ({ const massBelow0 = shape.value.continuous.some((x) => x.x <= 0) || shape.value.discrete.some((x) => x.x <= 0); - const spec = buildVegaSpec(isLogX, isExpY); + const spec = buildVegaSpec(props); let widthProp = width ? width : size.width; if (widthProp < 20) { @@ -82,7 +78,7 @@ export const DistributionChart: React.FC = ({ data={{ con: shape.value.continuous, dis: shape.value.discrete }} width={widthProp - 10} height={height} - actions={false} + actions={actions} /> ) : ( @@ -116,16 +112,6 @@ export const DistributionChart: React.FC = ({ return sized; }; -function buildVegaSpec(isLogX: boolean, isExpY: boolean): VisualizationSpec { - return { - ...chartSpecification, - scales: [ - isLogX ? logXScale : linearXScale, - isExpY ? expYScale : linearYScale, - ], - } as VisualizationSpec; -} - interface CheckBoxProps { label: string; onChange: (x: boolean) => void; diff --git a/packages/components/src/components/FunctionChart.tsx b/packages/components/src/components/FunctionChart.tsx index 05e4d393..73378cd8 100644 --- a/packages/components/src/components/FunctionChart.tsx +++ b/packages/components/src/components/FunctionChart.tsx @@ -1,5 +1,10 @@ import * as React from "react"; -import { lambdaValue, environment, runForeign } from "@quri/squiggle-lang"; +import { + lambdaValue, + environment, + runForeign, + errorValueToString, +} from "@quri/squiggle-lang"; import { FunctionChart1Dist } from "./FunctionChart1Dist"; import { FunctionChart1Number } from "./FunctionChart1Number"; import { DistributionPlottingSettings } from "./DistributionChart"; @@ -45,10 +50,16 @@ export const FunctionChart: React.FC = ({ } }; const validResult = getValidResult(); - const resultType = - validResult.tag === "Ok" ? validResult.value.tag : ("Error" as const); - switch (resultType) { + if (validResult.tag === "Error") { + return ( + + {errorValueToString(validResult.value)} + + ); + } + + switch (validResult.value.tag) { case "distribution": return ( = ({ height={height} /> ); - case "Error": - return ( - The function failed to be run - ); default: return ( There is no function visualization for this type of output:{" "} - {resultType} + {validResult.value.tag} ); } diff --git a/packages/components/src/components/FunctionChart1Dist.tsx b/packages/components/src/components/FunctionChart1Dist.tsx index 650d2753..f8d072d7 100644 --- a/packages/components/src/components/FunctionChart1Dist.tsx +++ b/packages/components/src/components/FunctionChart1Dist.tsx @@ -88,7 +88,7 @@ let getPercentiles = ({ chartSettings, fn, environment }) => { let chartPointsData: point[] = chartPointsToRender.map((x) => { let result = runForeign(fn, [x], environment); if (result.tag === "Ok") { - if (result.value.tag == "distribution") { + if (result.value.tag === "distribution") { return { x, value: { tag: "Ok", value: result.value.value } }; } else { return { @@ -165,12 +165,14 @@ export const FunctionChart1Dist: React.FC = ({ setMouseOverlay(NaN); } const signalListeners = { mousemove: handleHover, mouseout: handleOut }; + + //TODO: This custom error handling is a bit hacky and should be improved. let mouseItem: result = !!mouseOverlay ? runForeign(fn, [mouseOverlay], environment) : { tag: "Error", value: { - tag: "REExpectedType", + tag: "RETodo", value: "Hover x-coordinate returned NaN. Expected a number.", }, }; diff --git a/packages/components/src/components/SquiggleChart.tsx b/packages/components/src/components/SquiggleChart.tsx index 7397cb7e..a3bb5e4c 100644 --- a/packages/components/src/components/SquiggleChart.tsx +++ b/packages/components/src/components/SquiggleChart.tsx @@ -41,6 +41,18 @@ export interface SquiggleChartProps { logX?: boolean; /** Set the y scale to be exponential by deault */ expY?: boolean; + /** How to format numbers on the x axis */ + tickFormat?: string; + /** Title of the graphed distribution */ + title?: string; + /** Color of the graphed distribution */ + color?: string; + /** Specify the lower bound of the x scale */ + minX?: number; + /** Specify the upper bound of the x scale */ + maxX?: number; + /** Whether to show vega actions to the user, so they can copy the chart spec */ + distributionChartActions?: boolean; } const defaultOnChange = () => {}; @@ -61,6 +73,12 @@ export const SquiggleChart: React.FC = React.memo( diagramStart = 0, diagramStop = 10, diagramCount = 100, + tickFormat, + minX, + maxX, + color, + title, + distributionChartActions, }) => { const result = useSquiggle({ code, @@ -75,6 +93,12 @@ export const SquiggleChart: React.FC = React.memo( showSummary, logX, expY, + format: tickFormat, + minX, + maxX, + color, + title, + actions: distributionChartActions, }; const chartSettings = { diff --git a/packages/components/src/components/SquigglePlayground.tsx b/packages/components/src/components/SquigglePlayground.tsx index 59389f17..ae3da135 100644 --- a/packages/components/src/components/SquigglePlayground.tsx +++ b/packages/components/src/components/SquigglePlayground.tsx @@ -18,7 +18,7 @@ import clsx from "clsx"; import { defaultBindings, environment } from "@quri/squiggle-lang"; -import { SquiggleChart } from "./SquiggleChart"; +import { SquiggleChart, SquiggleChartProps } from "./SquiggleChart"; import { CodeEditor } from "./CodeEditor"; import { JsonEditor } from "./JsonEditor"; import { ErrorAlert, SuccessAlert } from "./Alert"; @@ -27,26 +27,15 @@ import { Toggle } from "./ui/Toggle"; import { Checkbox } from "./ui/Checkbox"; import { StyledTab } from "./ui/StyledTab"; -interface PlaygroundProps { +type PlaygroundProps = SquiggleChartProps & { /** The initial squiggle string to put in the playground */ defaultCode?: string; - /** How many pixels high is the playground */ - height?: number; - /** Whether to show the log scale controls in the playground */ - showControls?: boolean; - /** Whether to show the summary table in the playground */ - showSummary?: boolean; - /** Whether to log the x coordinate on distribution charts */ - logX?: boolean; - /** Whether to exp the y coordinate on distribution charts */ - expY?: boolean; - /** If code is set, component becomes controlled */ - code?: string; onCodeChange?(expr: string): void; + /* When settings change */ onSettingsChange?(settings: any): void; /** Should we show the editor? */ showEditor?: boolean; -} +}; const schema = yup.object({}).shape({ sampleCount: yup @@ -79,6 +68,12 @@ const schema = yup.object({}).shape({ showEditor: yup.boolean().required(), logX: yup.boolean().required(), expY: yup.boolean().required(), + tickFormat: yup.string().default(".9~s"), + title: yup.string(), + color: yup.string().default("#739ECC").required(), + minX: yup.number(), + maxX: yup.number(), + distributionChartActions: yup.boolean(), showSettingsPage: yup.boolean().default(false), diagramStart: yup.number().required().positive().integer().default(0).min(0), diagramStop: yup.number().required().positive().integer().default(10).min(0), @@ -111,7 +106,7 @@ function InputItem({ }: { name: Path; label: string; - type: "number"; + type: "number" | "text" | "color"; register: UseFormRegister; }) { return ( @@ -119,7 +114,7 @@ function InputItem({
{label}
@@ -194,6 +189,11 @@ const ViewSettings: React.FC<{ register: UseFormRegister }> = ({ name="expY" label="Show y scale exponentially" /> + }> = ({ name="showSummary" label="Show summary statistics" /> + + + + + @@ -376,6 +406,12 @@ export const SquigglePlayground: FC = ({ showSummary = false, logX = false, expY = false, + title, + minX, + maxX, + color = "#739ECC", + tickFormat = ".9~s", + distributionChartActions, code: controlledCode, onCodeChange, onSettingsChange, @@ -398,6 +434,12 @@ export const SquigglePlayground: FC = ({ showControls, logX, expY, + title, + minX, + maxX, + color, + tickFormat, + distributionChartActions, showSummary, showEditor, leftSizePercent: 50, @@ -430,14 +472,7 @@ export const SquigglePlayground: FC = ({ @@ -477,7 +512,7 @@ export const SquigglePlayground: FC = ({ ); const withEditor = ( -
+
{tabs}
{squiggleChart}
diff --git a/packages/components/src/components/ui/Toggle.tsx b/packages/components/src/components/ui/Toggle.tsx index 510b86cb..90e73e08 100644 --- a/packages/components/src/components/ui/Toggle.tsx +++ b/packages/components/src/components/ui/Toggle.tsx @@ -23,8 +23,8 @@ export const Toggle: React.FC = ({ layout transition={{ duration: 0.2 }} className={clsx( - "rounded-full py-1 bg-indigo-500 text-white text-xs font-semibold flex items-center space-x-1", - status ? "bg-indigo-500" : "bg-gray-400", + "rounded-md py-0.5 bg-slate-500 text-white text-xs font-semibold flex items-center space-x-1", + status ? "bg-slate-500" : "bg-gray-400", status ? "pl-1 pr-3" : "pl-3 pr-1", !status && "flex-row-reverse space-x-reverse" )} diff --git a/packages/components/src/lib/distributionSpecBuilder.ts b/packages/components/src/lib/distributionSpecBuilder.ts new file mode 100644 index 00000000..d04f0c44 --- /dev/null +++ b/packages/components/src/lib/distributionSpecBuilder.ts @@ -0,0 +1,256 @@ +import { VisualizationSpec } from "react-vega"; +import type { LogScale, LinearScale, PowScale } from "vega"; + +export type DistributionChartSpecOptions = { + /** Set the x scale to be logarithmic by deault */ + logX: boolean; + /** Set the y scale to be exponential by deault */ + expY: boolean; + /** The minimum x coordinate shown on the chart */ + minX?: number; + /** The maximum x coordinate shown on the chart */ + maxX?: number; + /** The color of the chart */ + color?: string; + /** The title of the chart */ + title?: string; + /** The formatting of the ticks */ + format?: string; +}; + +export let linearXScale: LinearScale = { + name: "xscale", + clamp: true, + type: "linear", + range: "width", + zero: false, + nice: false, + domain: { + fields: [ + { + data: "con", + field: "x", + }, + { + data: "dis", + field: "x", + }, + ], + }, +}; +export let linearYScale: LinearScale = { + name: "yscale", + type: "linear", + range: "height", + zero: true, + domain: { + fields: [ + { + data: "con", + field: "y", + }, + { + data: "dis", + field: "y", + }, + ], + }, +}; + +export let logXScale: LogScale = { + name: "xscale", + type: "log", + range: "width", + zero: false, + base: 10, + nice: false, + clamp: true, + domain: { + fields: [ + { + data: "con", + field: "x", + }, + { + data: "dis", + field: "x", + }, + ], + }, +}; + +export let expYScale: PowScale = { + name: "yscale", + type: "pow", + exponent: 0.1, + range: "height", + zero: true, + nice: false, + domain: { + fields: [ + { + data: "con", + field: "y", + }, + { + data: "dis", + field: "y", + }, + ], + }, +}; + +export function buildVegaSpec( + specOptions: DistributionChartSpecOptions +): VisualizationSpec { + let { + format = ".9~s", + color = "#739ECC", + title, + minX, + maxX, + logX, + expY, + } = specOptions; + + let xScale = logX ? logXScale : linearXScale; + if (minX !== undefined && Number.isFinite(minX)) { + xScale = { ...xScale, domainMin: minX }; + } + + if (maxX !== undefined && Number.isFinite(maxX)) { + xScale = { ...xScale, domainMax: maxX }; + } + + let spec: VisualizationSpec = { + $schema: "https://vega.github.io/schema/vega/v5.json", + description: "A basic area chart example", + width: 500, + height: 100, + padding: 5, + data: [ + { + name: "con", + }, + { + name: "dis", + }, + ], + signals: [], + scales: [xScale, expY ? expYScale : linearYScale], + axes: [ + { + orient: "bottom", + scale: "xscale", + labelColor: "#727d93", + tickColor: "#fff", + tickOpacity: 0.0, + domainColor: "#fff", + domainOpacity: 0.0, + format: format, + tickCount: 10, + }, + ], + marks: [ + { + type: "area", + from: { + data: "con", + }, + encode: { + update: { + interpolate: { value: "linear" }, + x: { + scale: "xscale", + field: "x", + }, + y: { + scale: "yscale", + field: "y", + }, + y2: { + scale: "yscale", + value: 0, + }, + fill: { + value: color, + }, + fillOpacity: { + value: 1, + }, + }, + }, + }, + { + type: "rect", + from: { + data: "dis", + }, + encode: { + enter: { + width: { + value: 1, + }, + }, + update: { + x: { + scale: "xscale", + field: "x", + }, + y: { + scale: "yscale", + field: "y", + }, + y2: { + scale: "yscale", + value: 0, + }, + fill: { + value: "#2f65a7", + }, + }, + }, + }, + { + type: "symbol", + from: { + data: "dis", + }, + encode: { + enter: { + shape: { + value: "circle", + }, + size: [{ value: 100 }], + tooltip: { + signal: "{ probability: datum.y, value: datum.x }", + }, + }, + update: { + x: { + scale: "xscale", + field: "x", + }, + y: { + scale: "yscale", + field: "y", + }, + fill: { + value: "#1e4577", + }, + }, + }, + }, + ], + }; + if (title) { + spec = { + ...spec, + title: { + text: title, + }, + }; + } + + return spec; +} diff --git a/packages/components/src/stories/SquiggleChart.stories.mdx b/packages/components/src/stories/SquiggleChart.stories.mdx index 2483c985..2febfb6f 100644 --- a/packages/components/src/stories/SquiggleChart.stories.mdx +++ b/packages/components/src/stories/SquiggleChart.stories.mdx @@ -3,7 +3,7 @@ import { Canvas, Meta, Story, Props } from "@storybook/addon-docs"; -export const Template = SquiggleChart; +export const Template = (props) => ; /* We have to hardcode a width here, because otherwise some interaction with Storybook creates an infinite loop with the internal width diff --git a/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res b/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res index 60e74d74..5af6f8e0 100644 --- a/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res @@ -1,7 +1,7 @@ open Jest open Expect -let env: DistributionOperation.env = { +let env: GenericDist.env = { sampleCount: 100, xyPointLength: 100, } @@ -34,7 +34,7 @@ describe("sparkline", () => { expected: DistributionOperation.outputType, ) => { test(name, () => { - let result = DistributionOperation.run(~env, FromDist(ToString(ToSparkline(20)), dist)) + let result = DistributionOperation.run(~env, FromDist(#ToString(ToSparkline(20)), dist)) expect(result)->toEqual(expected) }) } @@ -81,8 +81,8 @@ describe("sparkline", () => { describe("toPointSet", () => { test("on symbolic normal distribution", () => { let result = - run(FromDist(ToDist(ToPointSet), normalDist5)) - ->outputMap(FromDist(ToFloat(#Mean))) + run(FromDist(#ToDist(ToPointSet), normalDist5)) + ->outputMap(FromDist(#ToFloat(#Mean))) ->toFloat ->toExt expect(result)->toBeSoCloseTo(5.0, ~digits=0) @@ -90,10 +90,10 @@ describe("toPointSet", () => { test("on sample set", () => { let result = - run(FromDist(ToDist(ToPointSet), normalDist5)) - ->outputMap(FromDist(ToDist(ToSampleSet(1000)))) - ->outputMap(FromDist(ToDist(ToPointSet))) - ->outputMap(FromDist(ToFloat(#Mean))) + run(FromDist(#ToDist(ToPointSet), normalDist5)) + ->outputMap(FromDist(#ToDist(ToSampleSet(1000)))) + ->outputMap(FromDist(#ToDist(ToPointSet))) + ->outputMap(FromDist(#ToFloat(#Mean))) ->toFloat ->toExt expect(result)->toBeSoCloseTo(5.0, ~digits=-1) diff --git a/packages/squiggle-lang/__tests__/Distributions/GenericDist_Fixtures.res b/packages/squiggle-lang/__tests__/Distributions/GenericDist_Fixtures.res index d184b61b..440d7681 100644 --- a/packages/squiggle-lang/__tests__/Distributions/GenericDist_Fixtures.res +++ b/packages/squiggle-lang/__tests__/Distributions/GenericDist_Fixtures.res @@ -19,7 +19,6 @@ exception MixtureFailed let float1 = 1.0 let float2 = 2.0 let float3 = 3.0 -let {mkDelta} = module(TestHelpers) -let point1 = mkDelta(float1) -let point2 = mkDelta(float2) -let point3 = mkDelta(float3) +let point1 = TestHelpers.mkDelta(float1) +let point2 = TestHelpers.mkDelta(float2) +let point3 = TestHelpers.mkDelta(float3) diff --git a/packages/squiggle-lang/__tests__/Distributions/Mixture_test.res b/packages/squiggle-lang/__tests__/Distributions/Mixture_test.res index ee048853..7dc1f5df 100644 --- a/packages/squiggle-lang/__tests__/Distributions/Mixture_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/Mixture_test.res @@ -11,7 +11,7 @@ describe("mixture", () => { let (mean1, mean2) = tup let meanValue = { run(Mixture([(mkNormal(mean1, 9e-1), 0.5), (mkNormal(mean2, 9e-1), 0.5)]))->outputMap( - FromDist(ToFloat(#Mean)), + FromDist(#ToFloat(#Mean)), ) } meanValue->unpackFloat->expect->toBeSoCloseTo((mean1 +. mean2) /. 2.0, ~digits=-1) @@ -28,7 +28,7 @@ describe("mixture", () => { let meanValue = { run( Mixture([(mkBeta(alpha, beta), betaWeight), (mkExponential(rate), exponentialWeight)]), - )->outputMap(FromDist(ToFloat(#Mean))) + )->outputMap(FromDist(#ToFloat(#Mean))) } let betaMean = 1.0 /. (1.0 +. beta /. alpha) let exponentialMean = 1.0 /. rate @@ -52,7 +52,7 @@ describe("mixture", () => { (mkUniform(low, high), uniformWeight), (mkLognormal(mu, sigma), lognormalWeight), ]), - )->outputMap(FromDist(ToFloat(#Mean))) + )->outputMap(FromDist(#ToFloat(#Mean))) } let uniformMean = (low +. high) /. 2.0 let lognormalMean = mu +. sigma ** 2.0 /. 2.0 diff --git a/packages/squiggle-lang/__tests__/Distributions/KlDivergence_test.res b/packages/squiggle-lang/__tests__/Distributions/Scoring/KlDivergence_test.res similarity index 93% rename from packages/squiggle-lang/__tests__/Distributions/KlDivergence_test.res rename to packages/squiggle-lang/__tests__/Distributions/Scoring/KlDivergence_test.res index fc528e08..f8793dc9 100644 --- a/packages/squiggle-lang/__tests__/Distributions/KlDivergence_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/Scoring/KlDivergence_test.res @@ -3,6 +3,7 @@ open Expect open TestHelpers open GenericDist_Fixtures +let klDivergence = DistributionOperation.Constructors.LogScore.distEstimateDistAnswer(~env) // integral from low to high of 1 / (high - low) log(normal(mean, stdev)(x) / (1 / (high - low))) dx let klNormalUniform = (mean, stdev, low, high): float => -.Js.Math.log((high -. low) /. Js.Math.sqrt(2.0 *. MagicNumbers.Math.pi *. stdev ** 2.0)) +. @@ -11,8 +12,6 @@ let klNormalUniform = (mean, stdev, low, high): float => (mean ** 2.0 -. (high +. low) *. mean +. (low ** 2.0 +. high *. low +. high ** 2.0) /. 3.0) describe("klDivergence: continuous -> continuous -> float", () => { - let klDivergence = DistributionOperation.Constructors.klDivergence(~env) - let testUniform = (lowAnswer, highAnswer, lowPrediction, highPrediction) => { test("of two uniforms is equal to the analytic expression", () => { let answer = @@ -58,7 +57,7 @@ describe("klDivergence: continuous -> continuous -> float", () => { let kl = E.R.liftJoin2(klDivergence, prediction, answer) switch kl { - | Ok(kl') => kl'->expect->toBeSoCloseTo(analyticalKl, ~digits=3) + | Ok(kl') => kl'->expect->toBeSoCloseTo(analyticalKl, ~digits=2) | Error(err) => { Js.Console.log(DistributionTypes.Error.toString(err)) raise(KlFailed) @@ -82,7 +81,6 @@ describe("klDivergence: continuous -> continuous -> float", () => { }) describe("klDivergence: discrete -> discrete -> float", () => { - let klDivergence = DistributionOperation.Constructors.klDivergence(~env) let mixture = a => DistributionTypes.DistributionOperation.Mixture(a) let a' = [(point1, 1e0), (point2, 1e0)]->mixture->run let b' = [(point1, 1e0), (point2, 1e0), (point3, 1e0)]->mixture->run @@ -117,7 +115,6 @@ describe("klDivergence: discrete -> discrete -> float", () => { }) describe("klDivergence: mixed -> mixed -> float", () => { - let klDivergence = DistributionOperation.Constructors.klDivergence(~env) let mixture' = a => DistributionTypes.DistributionOperation.Mixture(a) let mixture = a => { let dist' = a->mixture'->run @@ -189,15 +186,15 @@ describe("combineAlongSupportOfSecondArgument0", () => { uniformMakeR(lowPrediction, highPrediction)->E.R2.errMap(s => DistributionTypes.ArgumentError( s, )) - let answerWrapped = E.R.fmap(a => run(FromDist(ToDist(ToPointSet), a)), answer) - let predictionWrapped = E.R.fmap(a => run(FromDist(ToDist(ToPointSet), a)), prediction) + let answerWrapped = E.R.fmap(a => run(FromDist(#ToDist(ToPointSet), a)), answer) + let predictionWrapped = E.R.fmap(a => run(FromDist(#ToDist(ToPointSet), a)), prediction) let interpolator = XYShape.XtoY.continuousInterpolator(#Stepwise, #UseZero) - let integrand = PointSetDist_Scoring.KLDivergence.integrand + let integrand = PointSetDist_Scoring.WithDistAnswer.integrand let result = switch (answerWrapped, predictionWrapped) { | (Ok(Dist(PointSet(Continuous(a)))), Ok(Dist(PointSet(Continuous(b))))) => - Some(combineAlongSupportOfSecondArgument(integrand, interpolator, a.xyShape, b.xyShape)) + Some(combineAlongSupportOfSecondArgument(interpolator, integrand, a.xyShape, b.xyShape)) | _ => None } result diff --git a/packages/squiggle-lang/__tests__/Distributions/Scoring/WithScalarAnswer_test.res b/packages/squiggle-lang/__tests__/Distributions/Scoring/WithScalarAnswer_test.res new file mode 100644 index 00000000..f899f30d --- /dev/null +++ b/packages/squiggle-lang/__tests__/Distributions/Scoring/WithScalarAnswer_test.res @@ -0,0 +1,68 @@ +open Jest +open Expect +open TestHelpers +open GenericDist_Fixtures +exception ScoreFailed + +describe("WithScalarAnswer: discrete -> scalar -> score", () => { + let mixture = a => DistributionTypes.DistributionOperation.Mixture(a) + let pointA = mkDelta(3.0) + let pointB = mkDelta(2.0) + let pointC = mkDelta(1.0) + let pointD = mkDelta(0.0) + + test("score: agrees with analytical answer when finite", () => { + let prediction' = [(pointA, 0.25), (pointB, 0.25), (pointC, 0.25), (pointD, 0.25)]->mixture->run + let prediction = switch prediction' { + | Dist(PointSet(p)) => p + | _ => raise(MixtureFailed) + } + + let answer = 2.0 // So this is: assigning 100% probability to 2.0 + let result = PointSetDist_Scoring.WithScalarAnswer.score(~estimate=prediction, ~answer) + switch result { + | Ok(x) => x->expect->toEqual(-.Js.Math.log(0.25 /. 1.0)) + | _ => raise(ScoreFailed) + } + }) + + test("score: agrees with analytical answer when finite", () => { + let prediction' = [(pointA, 0.75), (pointB, 0.25)]->mixture->run + let prediction = switch prediction' { + | Dist(PointSet(p)) => p + | _ => raise(MixtureFailed) + } + let answer = 3.0 // So this is: assigning 100% probability to 2.0 + let result = PointSetDist_Scoring.WithScalarAnswer.score(~estimate=prediction, ~answer) + switch result { + | Ok(x) => x->expect->toEqual(-.Js.Math.log(0.75 /. 1.0)) + | _ => raise(ScoreFailed) + } + }) + + test("scoreWithPrior: agrees with analytical answer when finite", () => { + let prior' = [(pointA, 0.5), (pointB, 0.5)]->mixture->run + let prediction' = [(pointA, 0.75), (pointB, 0.25)]->mixture->run + + let prediction = switch prediction' { + | Dist(PointSet(p)) => p + | _ => raise(MixtureFailed) + } + + let prior = switch prior' { + | Dist(PointSet(p)) => p + | _ => raise(MixtureFailed) + } + + let answer = 3.0 // So this is: assigning 100% probability to 2.0 + let result = PointSetDist_Scoring.WithScalarAnswer.scoreWithPrior( + ~estimate=prediction, + ~answer, + ~prior, + ) + switch result { + | Ok(x) => x->expect->toEqual(-.Js.Math.log(0.75 /. 1.0) -. -.Js.Math.log(0.5 /. 1.0)) + | _ => raise(ScoreFailed) + } + }) +}) diff --git a/packages/squiggle-lang/__tests__/Distributions/Symbolic_test.res b/packages/squiggle-lang/__tests__/Distributions/Symbolic_test.res index 152b580d..976ee09f 100644 --- a/packages/squiggle-lang/__tests__/Distributions/Symbolic_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/Symbolic_test.res @@ -8,34 +8,34 @@ let mkNormal = (mean, stdev) => DistributionTypes.Symbolic(#Normal({mean: mean, describe("(Symbolic) normalize", () => { testAll("has no impact on normal distributions", list{-1e8, -1e-2, 0.0, 1e-4, 1e16}, mean => { let normalValue = mkNormal(mean, 2.0) - let normalizedValue = run(FromDist(ToDist(Normalize), normalValue)) + let normalizedValue = run(FromDist(#ToDist(Normalize), normalValue)) normalizedValue->unpackDist->expect->toEqual(normalValue) }) }) describe("(Symbolic) mean", () => { testAll("of normal distributions", list{-1e8, -16.0, -1e-2, 0.0, 1e-4, 32.0, 1e16}, mean => { - run(FromDist(ToFloat(#Mean), mkNormal(mean, 4.0)))->unpackFloat->expect->toBeCloseTo(mean) + run(FromDist(#ToFloat(#Mean), mkNormal(mean, 4.0)))->unpackFloat->expect->toBeCloseTo(mean) }) Skip.test("of normal(0, -1) (it NaNs out)", () => { - run(FromDist(ToFloat(#Mean), mkNormal(1e1, -1e0)))->unpackFloat->expect->ExpectJs.toBeFalsy + run(FromDist(#ToFloat(#Mean), mkNormal(1e1, -1e0)))->unpackFloat->expect->ExpectJs.toBeFalsy }) test("of normal(0, 1e-8) (it doesn't freak out at tiny stdev)", () => { - run(FromDist(ToFloat(#Mean), mkNormal(0.0, 1e-8)))->unpackFloat->expect->toBeCloseTo(0.0) + run(FromDist(#ToFloat(#Mean), mkNormal(0.0, 1e-8)))->unpackFloat->expect->toBeCloseTo(0.0) }) testAll("of exponential distributions", list{1e-7, 2.0, 10.0, 100.0}, rate => { let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Exponential({rate: rate}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Exponential({rate: rate}))), ) meanValue->unpackFloat->expect->toBeCloseTo(1.0 /. rate) // https://en.wikipedia.org/wiki/Exponential_distribution#Mean,_variance,_moments,_and_median }) test("of a cauchy distribution", () => { let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Cauchy({local: 1.0, scale: 1.0}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Cauchy({local: 1.0, scale: 1.0}))), ) meanValue->unpackFloat->expect->toBeSoCloseTo(1.0098094001641797, ~digits=5) //-> toBe(GenDistError(Other("Cauchy distributions may have no mean value."))) @@ -48,7 +48,7 @@ describe("(Symbolic) mean", () => { let (low, medium, high) = tup let meanValue = run( FromDist( - ToFloat(#Mean), + #ToFloat(#Mean), DistributionTypes.Symbolic(#Triangular({low: low, medium: medium, high: high})), ), ) @@ -63,7 +63,7 @@ describe("(Symbolic) mean", () => { tup => { let (alpha, beta) = tup let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Beta({alpha: alpha, beta: beta}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Beta({alpha: alpha, beta: beta}))), ) meanValue->unpackFloat->expect->toBeCloseTo(1.0 /. (1.0 +. beta /. alpha)) // https://en.wikipedia.org/wiki/Beta_distribution#Mean }, @@ -72,7 +72,7 @@ describe("(Symbolic) mean", () => { // TODO: When we have our theory of validators we won't want this to be NaN but to be an error. test("of beta(0, 0)", () => { let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Beta({alpha: 0.0, beta: 0.0}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Beta({alpha: 0.0, beta: 0.0}))), ) meanValue->unpackFloat->expect->ExpectJs.toBeFalsy }) @@ -85,7 +85,7 @@ describe("(Symbolic) mean", () => { let betaDistribution = SymbolicDist.Beta.fromMeanAndStdev(mean, stdev) let meanValue = betaDistribution->E.R2.fmap(d => - run(FromDist(ToFloat(#Mean), d->DistributionTypes.Symbolic)) + run(FromDist(#ToFloat(#Mean), d->DistributionTypes.Symbolic)) ) switch meanValue { | Ok(value) => value->unpackFloat->expect->toBeCloseTo(mean) @@ -100,7 +100,7 @@ describe("(Symbolic) mean", () => { tup => { let (mu, sigma) = tup let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Lognormal({mu: mu, sigma: sigma}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Lognormal({mu: mu, sigma: sigma}))), ) meanValue->unpackFloat->expect->toBeCloseTo(Js.Math.exp(mu +. sigma ** 2.0 /. 2.0)) // https://brilliant.org/wiki/log-normal-distribution/ }, @@ -112,14 +112,14 @@ describe("(Symbolic) mean", () => { tup => { let (low, high) = tup let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Uniform({low: low, high: high}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Uniform({low: low, high: high}))), ) meanValue->unpackFloat->expect->toBeCloseTo((low +. high) /. 2.0) // https://en.wikipedia.org/wiki/Continuous_uniform_distribution#Moments }, ) test("of a float", () => { - let meanValue = run(FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Float(7.7)))) + let meanValue = run(FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Float(7.7)))) meanValue->unpackFloat->expect->toBeCloseTo(7.7) }) }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res index 98192d31..65048ebb 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res @@ -21,6 +21,10 @@ describe("builtin", () => { "addOne(t)=t+1; toList(mapSamples(fromSamples([1,2,3,4,5,6]), addOne))", "Ok([2,3,4,5,6,7])", ) + testEval( + "toList(mapSamplesN([fromSamples([1,2,3,4,5,6]), fromSamples([6, 5, 4, 3, 2, 1])], {|x| x[0] > x[1] ? x[0] : x[1]}))", + "Ok([6,5,4,4,5,6])", + ) }) describe("builtin exception", () => { diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Helpers.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Helpers.res index 4fb1382f..05eb1b01 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Helpers.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Helpers.res @@ -2,15 +2,15 @@ module ErrorValue = Reducer_ErrorValue module ExternalExpressionValue = ReducerInterface.ExternalExpressionValue module InternalExpressionValue = ReducerInterface.InternalExpressionValue -module Module = Reducer_Module +module Bindings = Reducer_Bindings let removeDefaultsInternal = (iev: InternalExpressionValue.t) => { switch iev { - | InternalExpressionValue.IEvModule(nameSpace) => - Module.removeOther( + | InternalExpressionValue.IEvBindings(nameSpace) => + Bindings.removeOther( nameSpace, ReducerInterface.StdLib.internalStdLib, - )->InternalExpressionValue.IEvModule + )->InternalExpressionValue.IEvBindings | value => value } } diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Module/Reducer_Module_defineFFI_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Module/Reducer_Module_defineFFI_test.res deleted file mode 100644 index a06c7a57..00000000 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Module/Reducer_Module_defineFFI_test.res +++ /dev/null @@ -1,100 +0,0 @@ -module InternalExpressionValue = ReducerInterface_InternalExpressionValue -module ExpressionT = Reducer_Expression_T -module Module = Reducer_Module -module Bindings = Reducer_Module -module ErrorValue = Reducer_ErrorValue - -open Jest -open Expect - -// ---------------------- -// --- Start of Module File -// ---------------------- - -module FooImplementation = { - // As this is a Rescript module, functions can use other functions in this module - // and in other stdLib modules implemented this way. - // Embedding function definitions in to switch statements is a bad practice - // - to reduce line count or to - let fooNumber = 0.0 - let fooString = "Foo String" - let fooBool = true - let makeFoo = (a: string, b: string, _environment): string => `I am ${a}-foo and I am ${b}-foo` - let makeBar = (a: float, b: float, _environment): string => - `I am ${a->Js.Float.toString}-bar and I am ${b->Js.Float.toString}-bar` -} - -// There is a potential for type modules to define lift functions -// for their own type to get rid of switch statements. -module FooFFI = { - let makeFoo: ExpressionT.optionFfiFn = (args: array, environment) => { - switch args { - | [IEvString(a), IEvString(b)] => FooImplementation.makeFoo(a, b, environment)->IEvString->Some - | _ => None - } - } - let makeBar: ExpressionT.optionFfiFn = (args: array, environment) => - switch args { - | [IEvNumber(a), IEvNumber(b)] => FooImplementation.makeBar(a, b, environment)->IEvString->Some - | _ => None - } -} - -let fooModule: Module.t = - Module.emptyStdLib - ->Module.defineNumber("fooNumber", FooImplementation.fooNumber) - ->Module.defineString("fooString", FooImplementation.fooString) - ->Module.defineBool("fooBool", FooImplementation.fooBool) - ->Module.defineFunction("makeFoo", FooFFI.makeFoo) - ->Module.defineFunction("makeBar", FooFFI.makeBar) - -let makeBindings = (prevBindings: Bindings.t): Bindings.t => - prevBindings->Module.defineModule("Foo", fooModule) - -// ---------------------- -// --- End of Module File -// ---------------------- - -let stdLibWithFoo = Bindings.emptyBindings->makeBindings -let evalWithFoo = sourceCode => - Reducer_Expression.parse(sourceCode)->Belt.Result.flatMap(expr => - Reducer_Expression.reduceExpression( - expr, - stdLibWithFoo, - InternalExpressionValue.defaultEnvironment, - ) - ) -let evalToStringResultWithFoo = sourceCode => - evalWithFoo(sourceCode)->InternalExpressionValue.toStringResult - -describe("Module", () => { - test("fooNumber", () => { - let result = evalToStringResultWithFoo("Foo.fooNumber") - expect(result)->toEqual("Ok(0)") - }) - test("fooString", () => { - let result = evalToStringResultWithFoo("Foo.fooString") - expect(result)->toEqual("Ok('Foo String')") - }) - test("fooBool", () => { - let result = evalToStringResultWithFoo("Foo.fooBool") - expect(result)->toEqual("Ok(true)") - }) - test("fooBool", () => { - let result = evalToStringResultWithFoo("Foo.fooBool") - expect(result)->toEqual("Ok(true)") - }) - test("makeFoo", () => { - let result = evalToStringResultWithFoo("Foo.makeFoo('a', 'b')") - expect(result)->toEqual("Ok('I am a-foo and I am b-foo')") - }) - test("makeFoo wrong arguments", () => { - let result = evalToStringResultWithFoo("Foo.makeFoo(1, 2)") - // Notice the error with types - expect(result)->toEqual("Error(Function not found: makeFoo(Number,Number))") - }) - test("makeBar", () => { - let result = evalToStringResultWithFoo("Foo.makeBar(1, 2)") - expect(result)->toEqual("Ok('I am 1-bar and I am 2-bar')") - }) -}) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res index 4bf3747f..f17fe9aa 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res @@ -236,7 +236,8 @@ describe("Peggy parse", () => { testParse("1m+2cm", "{(::add (::fromUnit_m 1) (::fromUnit_cm 2))}") }) describe("Module", () => { - testParse("Math.pi", "{(::$_atIndex_$ @Math 'pi')}") + testParse("x", "{:x}") + testParse("Math.pi", "{:Math.pi}") }) }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_type_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_type_test.res index ea18effc..4f7dabdc 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_type_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_type_test.res @@ -20,7 +20,7 @@ describe("Peggy parse type", () => { "{(::$_typeOf_$ :f (::$_typeFunction_$ (::$_constructArray_$ (#number #number #number))))}", ) }) - describe("high priority modifier", () => { + describe("high priority contract", () => { testParse( "answer: number<-min<-max(100)|string", "{(::$_typeOf_$ :answer (::$_typeOr_$ (::$_constructArray_$ ((::$_typeModifier_max_$ (::$_typeModifier_min_$ #number) 100) #string))))}", @@ -30,7 +30,7 @@ describe("Peggy parse type", () => { "{(::$_typeOf_$ :answer (::$_typeModifier_memberOf_$ #number (::$_constructArray_$ (1 3 5))))}", ) }) - describe("low priority modifier", () => { + describe("low priority contract", () => { testParse( "answer: number | string $ opaque", "{(::$_typeOf_$ :answer (::$_typeModifier_opaque_$ (::$_typeOr_$ (::$_constructArray_$ (#number #string)))))}", @@ -63,14 +63,14 @@ describe("Peggy parse type", () => { "{(::$_typeOf_$ :weekend (::$_typeOr_$ (::$_constructArray_$ ((::$_typeConstructor_$ #Saturday (::$_constructArray_$ ())) (::$_typeConstructor_$ #Sunday (::$_constructArray_$ ()))))))}", ) }) - describe("type paranthesis", () => { - //$ is introduced to avoid paranthesis + describe("type parenthesis", () => { + //$ is introduced to avoid parenthesis testParse( "answer: (number|string)<-opaque", "{(::$_typeOf_$ :answer (::$_typeModifier_opaque_$ (::$_typeOr_$ (::$_constructArray_$ (#number #string)))))}", ) }) - describe("squiggle expressions in type modifiers", () => { + describe("squiggle expressions in type contracts", () => { testParse( "odds1 = [1,3,5]; odds2 = [7, 9]; type odds = number<-memberOf(concat(odds1, odds2))", "{:odds1 = {(::$_constructArray_$ (1 3 5))}; :odds2 = {(::$_constructArray_$ (7 9))}; (::$_typeAlias_$ #odds (::$_typeModifier_memberOf_$ #number (::concat :odds1 :odds2)))}", diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_TestHelpers.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_TestHelpers.res index 6d3ce663..b434fdb9 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_TestHelpers.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_TestHelpers.res @@ -4,6 +4,7 @@ module ExpressionValue = ReducerInterface.InternalExpressionValue module Parse = Reducer_Peggy_Parse module Result = Belt.Result module ToExpression = Reducer_Peggy_ToExpression +module Bindings = Reducer_Bindings open Jest open Expect diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res index 18e8121d..b8a81f25 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res @@ -1,9 +1,12 @@ +module Bindings = Reducer_Bindings +module InternalExpressionValue = ReducerInterface_InternalExpressionValue + open Jest open Reducer_Peggy_TestHelpers describe("Peggy to Expression", () => { describe("literals operators parenthesis", () => { - // Note that there is always an outer block. Otherwise, external bindings are ignrored at the first statement + // Note that there is always an outer block. Otherwise, external bindings are ignored at the first statement testToExpression("1", "{1}", ~v="1", ()) testToExpression("'hello'", "{'hello'}", ~v="'hello'", ()) testToExpression("true", "{true}", ~v="true", ()) @@ -183,6 +186,14 @@ describe("Peggy to Expression", () => { }) describe("module", () => { - testToExpression("Math.pi", "{(:$_atIndex_$ :Math 'pi')}", ~v="3.141592653589793", ()) + // testToExpression("Math.pi", "{:Math.pi}", ~v="3.141592653589793", ()) + // Only.test("stdlibrary", () => { + // ReducerInterface_StdLib.internalStdLib + // ->IEvBindings + // ->InternalExpressionValue.toString + // ->expect + // ->toBe("") + // }) + testToExpression("Math.pi", "{:Math.pi}", ~v="3.141592653589793", ()) }) }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_type_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_type_test.res index 12d2d62b..9849adb0 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_type_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_type_test.res @@ -40,7 +40,7 @@ describe("Peggy Types to Expression", () => { (), ) }) - describe("high priority modifier", () => { + describe("high priority contract", () => { testToExpression( "answer: number<-min(1)<-max(100)|string", "{(:$_typeOf_$ :answer (:$_typeOr_$ (:$_constructArray_$ ((:$_typeModifier_max_$ (:$_typeModifier_min_$ #number 1) 100) #string))))}", @@ -78,7 +78,7 @@ describe("Peggy Types to Expression", () => { (), ) }) - describe("low priority modifier", () => { + describe("low priority contract", () => { testToExpression( "answer: number | string $ opaque", "{(:$_typeOf_$ :answer (:$_typeModifier_opaque_$ (:$_typeOr_$ (:$_constructArray_$ (#number #string)))))}", @@ -86,7 +86,7 @@ describe("Peggy Types to Expression", () => { (), ) }) - describe("squiggle expressions in type modifiers", () => { + describe("squiggle expressions in type contracts", () => { testToExpression( "odds1 = [1,3,5]; odds2 = [7, 9]; type odds = number<-memberOf(concat(odds1, odds2))", "{(:$_let_$ :odds1 {(:$_constructArray_$ (1 3 5))}); (:$_let_$ :odds2 {(:$_constructArray_$ (7 9))}); (:$_typeAlias_$ #odds (:$_typeModifier_memberOf_$ #number (:concat :odds1 :odds2)))}", diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_TestMacroHelpers.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_TestMacroHelpers.res index 2337dde2..ffd5d964 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_TestMacroHelpers.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_TestMacroHelpers.res @@ -8,7 +8,7 @@ module InternalExpressionValue = ReducerInterface.InternalExpressionValue module ExpressionWithContext = Reducer_ExpressionWithContext module Macro = Reducer_Expression_Macro module T = Reducer_Expression_T -module Module = Reducer_Module +module Bindings = Reducer_Bindings let testMacro_ = ( tester, @@ -16,7 +16,7 @@ let testMacro_ = ( expr: T.expression, expectedCode: string, ) => { - let bindings = Module.fromArray(bindArray) + let bindings = Bindings.fromArray(bindArray) tester(expr->T.toString, () => expr ->Macro.expandMacroCall( @@ -36,7 +36,7 @@ let testMacroEval_ = ( expr: T.expression, expectedValue: string, ) => { - let bindings = Module.fromArray(bindArray) + let bindings = Bindings.fromArray(bindArray) tester(expr->T.toString, () => expr ->Macro.doMacroCall( diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_Compile_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_Compile_test.res new file mode 100644 index 00000000..71f90373 --- /dev/null +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_Compile_test.res @@ -0,0 +1,52 @@ +module Expression = Reducer_Expression +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings +module T = Reducer_Type_T +module TypeCompile = Reducer_Type_Compile + +open Jest +open Expect + +let myIevEval = (aTypeSourceCode: string) => + TypeCompile.ievFromTypeExpression(aTypeSourceCode, Expression.reduceExpression) +let myIevEvalToString = (aTypeSourceCode: string) => + myIevEval(aTypeSourceCode)->InternalExpressionValue.toStringResult + +let myIevExpectEqual = (aTypeSourceCode, answer) => + expect(myIevEvalToString(aTypeSourceCode))->toEqual(answer) + +let myIevTest = (test, aTypeSourceCode, answer) => + test(aTypeSourceCode, () => myIevExpectEqual(aTypeSourceCode, answer)) + +let myTypeEval = (aTypeSourceCode: string) => + TypeCompile.fromTypeExpression(aTypeSourceCode, Expression.reduceExpression) +let myTypeEvalToString = (aTypeSourceCode: string) => myTypeEval(aTypeSourceCode)->T.toStringResult + +let myTypeExpectEqual = (aTypeSourceCode, answer) => + expect(myTypeEvalToString(aTypeSourceCode))->toEqual(answer) + +let myTypeTest = (test, aTypeSourceCode, answer) => + test(aTypeSourceCode, () => myTypeExpectEqual(aTypeSourceCode, answer)) + +// | ItTypeIdentifier(string) +myTypeTest(test, "number", "number") +myTypeTest(test, "(number)", "number") +// | ItModifiedType({modifiedType: iType}) +myIevTest(test, "number<-min(0)", "Ok({min: 0,typeIdentifier: #number,typeTag: 'typeIdentifier'})") +myTypeTest(test, "number<-min(0)", "number<-min(0)") +// | ItTypeOr({typeOr: array}) +myTypeTest(test, "number | string", "(number | string)") +// | ItTypeFunction({inputs: array, output: iType}) +myTypeTest(test, "number => number => number", "(number => number => number)") +// | ItTypeArray({element: iType}) +myIevTest(test, "[number]", "Ok({element: #number,typeTag: 'typeArray'})") +myTypeTest(test, "[number]", "[number]") +// | ItTypeTuple({elements: array}) +myTypeTest(test, "[number, string]", "[number, string]") +// | ItTypeRecord({properties: Belt.Map.String.t}) +myIevTest( + test, + "{age: number, name: string}", + "Ok({properties: {age: #number,name: #string},typeTag: 'typeRecord'})", +) +myTypeTest(test, "{age: number, name: string}", "{age: number, name: string}") diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_arguments_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_arguments_test.res new file mode 100644 index 00000000..07da15bb --- /dev/null +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_arguments_test.res @@ -0,0 +1,41 @@ +module Expression = Reducer_Expression +module ExpressionT = Reducer_Expression_T +module ErrorValue = Reducer_ErrorValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings +module T = Reducer_Type_T +module TypeChecker = Reducer_Type_TypeChecker + +open Jest +open Expect + +let checkArgumentsSourceCode = (aTypeSourceCode: string, sourceCode: string): result< + 'v, + ErrorValue.t, +> => { + let reducerFn = Expression.reduceExpression + let rResult = + Reducer.parse(sourceCode)->Belt.Result.flatMap(expr => + reducerFn(expr, Bindings.emptyBindings, InternalExpressionValue.defaultEnvironment) + ) + rResult->Belt.Result.flatMap(result => + switch result { + | IEvArray(args) => TypeChecker.checkArguments(aTypeSourceCode, args, reducerFn) + | _ => Js.Exn.raiseError("Arguments has to be an array") + } + ) +} + +let myCheckArguments = (aTypeSourceCode: string, sourceCode: string): string => + switch checkArgumentsSourceCode(aTypeSourceCode, sourceCode) { + | Ok(_) => "Ok" + | Error(error) => ErrorValue.errorToString(error) + } + +let myCheckArgumentsExpectEqual = (aTypeSourceCode, sourceCode, answer) => + expect(myCheckArguments(aTypeSourceCode, sourceCode))->toEqual(answer) + +let myCheckArgumentsTest = (test, aTypeSourceCode, sourceCode, answer) => + test(aTypeSourceCode, () => myCheckArgumentsExpectEqual(aTypeSourceCode, sourceCode, answer)) + +myCheckArgumentsTest(test, "number=>number=>number", "[1,2]", "Ok") diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_test.res new file mode 100644 index 00000000..efd9bb18 --- /dev/null +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_test.res @@ -0,0 +1,70 @@ +module Expression = Reducer_Expression +module ExpressionT = Reducer_Expression_T +module ErrorValue = Reducer_ErrorValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings +module T = Reducer_Type_T +module TypeChecker = Reducer_Type_TypeChecker + +open Jest +open Expect + +// In development, you are expected to use TypeChecker.isTypeOf(aTypeSourceCode, result, reducerFn). +// isTypeOfSourceCode is written to use strings instead of expression values. + +let isTypeOfSourceCode = (aTypeSourceCode: string, sourceCode: string): result< + 'v, + ErrorValue.t, +> => { + let reducerFn = Expression.reduceExpression + let rResult = + Reducer.parse(sourceCode)->Belt.Result.flatMap(expr => + reducerFn(expr, Bindings.emptyBindings, InternalExpressionValue.defaultEnvironment) + ) + rResult->Belt.Result.flatMap(result => TypeChecker.isTypeOf(aTypeSourceCode, result, reducerFn)) +} + +let myTypeCheck = (aTypeSourceCode: string, sourceCode: string): string => + switch isTypeOfSourceCode(aTypeSourceCode, sourceCode) { + | Ok(_) => "Ok" + | Error(error) => ErrorValue.errorToString(error) + } + +let myTypeCheckExpectEqual = (aTypeSourceCode, sourceCode, answer) => + expect(myTypeCheck(aTypeSourceCode, sourceCode))->toEqual(answer) + +let myTypeCheckTest = (test, aTypeSourceCode, sourceCode, answer) => + test(aTypeSourceCode, () => myTypeCheckExpectEqual(aTypeSourceCode, sourceCode, answer)) + +myTypeCheckTest(test, "number", "1", "Ok") +myTypeCheckTest(test, "number", "'2'", "Expected type: number but got: '2'") +myTypeCheckTest(test, "string", "3", "Expected type: string but got: 3") +myTypeCheckTest(test, "string", "'a'", "Ok") +myTypeCheckTest(test, "[number]", "[1,2,3]", "Ok") +myTypeCheckTest(test, "[number]", "['a','a','a']", "Expected type: number but got: 'a'") +myTypeCheckTest(test, "[number]", "[1,'a',3]", "Expected type: number but got: 'a'") +myTypeCheckTest(test, "[number, string]", "[1,'a']", "Ok") +myTypeCheckTest(test, "[number, string]", "[1, 2]", "Expected type: string but got: 2") +myTypeCheckTest( + test, + "[number, string, string]", + "[1,'a']", + "Expected type: [number, string, string] but got: [1,'a']", +) +myTypeCheckTest( + test, + "[number, string]", + "[1,'a', 3]", + "Expected type: [number, string] but got: [1,'a',3]", +) +myTypeCheckTest(test, "{age: number, name: string}", "{age: 1, name: 'a'}", "Ok") +myTypeCheckTest( + test, + "{age: number, name: string}", + "{age: 1, name: 'a', job: 'IT'}", + "Expected type: {age: number, name: string} but got: {age: 1,job: 'IT',name: 'a'}", +) +myTypeCheckTest(test, "number | string", "1", "Ok") +myTypeCheckTest(test, "date | string", "1", "Expected type: (date | string) but got: 1") +myTypeCheckTest(test, "number<-min(10)", "10", "Ok") +myTypeCheckTest(test, "number<-min(10)", "0", "Expected type: number<-min(10) but got: 0") diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_ternaryOperator_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_ternaryOperator_test.res index 25353e89..22fa8328 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_ternaryOperator_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_ternaryOperator_test.res @@ -10,5 +10,5 @@ describe("Evaluate ternary operator", () => { testEvalToBe("false ? 'YES' : 'NO'", "Ok('NO')") testEvalToBe("2 > 1 ? 'YES' : 'NO'", "Ok('YES')") testEvalToBe("2 <= 1 ? 'YES' : 'NO'", "Ok('NO')") - testEvalToBe("1+1 ? 'YES' : 'NO'", "Error(Expected type: Boolean)") + testEvalToBe("1+1 ? 'YES' : 'NO'", "Error(Expected type: Boolean but got: )") }) diff --git a/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res b/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res new file mode 100644 index 00000000..d4f52e5c --- /dev/null +++ b/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res @@ -0,0 +1,80 @@ +open Jest +open Expect +open Reducer_TestHelpers + +let expectEvalToBeOk = (expr: string) => + Reducer.evaluate(expr)->Reducer_Helpers.rRemoveDefaultsExternal->E.R.isOk->expect->toBe(true) + +let registry = FunctionRegistry_Library.registry +let examples = E.A.to_list(FunctionRegistry_Core.Registry.allExamples(registry)) + +describe("FunctionRegistry Library", () => { + describe("Regular tests", () => { + testEvalToBe("List.make(3, 'HI')", "Ok(['HI','HI','HI'])") + testEvalToBe("make(3, 'HI')", "Error(Function not found: make(Number,String))") + testEvalToBe("List.upTo(1,3)", "Ok([1,2,3])") + testEvalToBe("List.first([3,5,8])", "Ok(3)") + testEvalToBe("List.last([3,5,8])", "Ok(8)") + testEvalToBe("List.reverse([3,5,8])", "Ok([8,5,3])") + testEvalToBe("Dist.normal(5,2)", "Ok(Normal(5,2))") + testEvalToBe("normal(5,2)", "Ok(Normal(5,2))") + testEvalToBe("normal({mean:5,stdev:2})", "Ok(Normal(5,2))") + testEvalToBe("-2 to 4", "Ok(Normal(1,1.8238704957353074))") + testEvalToBe("pointMass(5)", "Ok(PointMass(5))") + testEvalToBe("Number.floor(5.5)", "Ok(5)") + testEvalToBe("Number.ceil(5.5)", "Ok(6)") + testEvalToBe("floor(5.5)", "Ok(5)") + testEvalToBe("ceil(5.5)", "Ok(6)") + testEvalToBe("Number.abs(5.5)", "Ok(5.5)") + testEvalToBe("abs(5.5)", "Ok(5.5)") + testEvalToBe("Number.exp(10)", "Ok(22026.465794806718)") + testEvalToBe("Number.log10(10)", "Ok(1)") + testEvalToBe("Number.log2(10)", "Ok(3.321928094887362)") + testEvalToBe("Number.sum([2,5,3])", "Ok(10)") + testEvalToBe("sum([2,5,3])", "Ok(10)") + testEvalToBe("Number.product([2,5,3])", "Ok(30)") + testEvalToBe("Number.min([2,5,3])", "Ok(2)") + testEvalToBe("Number.max([2,5,3])", "Ok(5)") + testEvalToBe("Number.mean([0,5,10])", "Ok(5)") + testEvalToBe("Number.geomean([1,5,18])", "Ok(4.481404746557164)") + testEvalToBe("Number.stdev([0,5,10,15])", "Ok(5.5901699437494745)") + testEvalToBe("Number.variance([0,5,10,15])", "Ok(31.25)") + testEvalToBe("Number.sort([10,0,15,5])", "Ok([0,5,10,15])") + testEvalToBe("Number.cumsum([1,5,3])", "Ok([1,6,9])") + testEvalToBe("Number.cumprod([1,5,3])", "Ok([1,5,15])") + testEvalToBe("Number.diff([1,5,3])", "Ok([4,-2])") + testEvalToBe( + "Dist.logScore({estimate: normal(5,2), answer: normal(5.2,1), prior: normal(5.5,3)})", + "Ok(-0.33591375663884876)", + ) + testEvalToBe( + "Dist.logScore({estimate: normal(5,2), answer: normal(5.2,1)})", + "Ok(0.32244107041564646)", + ) + testEvalToBe("Dist.logScore({estimate: normal(5,2), answer: 4.5})", "Ok(1.6433360626394853)") + testEvalToBe("Dist.klDivergence(normal(5,2), normal(5,1.5))", "Ok(0.06874342818671068)") + }) + + describe("Fn auto-testing", () => { + testAll("tests of validity", examples, r => { + expectEvalToBeOk(r) + }) + + testAll( + "tests of type", + E.A.to_list( + FunctionRegistry_Core.Registry.allExamplesWithFns(registry)->E.A2.filter(((fn, _)) => + E.O.isSome(fn.output) + ), + ), + ((fn, example)) => { + let responseType = + example + ->Reducer.evaluate + ->E.R2.fmap(ReducerInterface_InternalExpressionValue.externalValueToValueType) + let expectedOutputType = fn.output |> E.O.toExn("") + expect(responseType)->toEqual(Ok(expectedOutputType)) + }, + ) + }) +}) diff --git a/packages/squiggle-lang/__tests__/TestHelpers.res b/packages/squiggle-lang/__tests__/TestHelpers.res index 71805c70..898bb3a9 100644 --- a/packages/squiggle-lang/__tests__/TestHelpers.res +++ b/packages/squiggle-lang/__tests__/TestHelpers.res @@ -29,7 +29,7 @@ let {toFloat, toDist, toString, toError, fmap} = module(DistributionOperation.Ou let fnImage = (theFn, inps) => Js.Array.map(theFn, inps) -let env: DistributionOperation.env = { +let env: GenericDist.env = { sampleCount: MagicNumbers.Environment.defaultSampleCount, xyPointLength: MagicNumbers.Environment.defaultXYPointLength, } diff --git a/packages/squiggle-lang/package.json b/packages/squiggle-lang/package.json index c9501b3b..75531a28 100644 --- a/packages/squiggle-lang/package.json +++ b/packages/squiggle-lang/package.json @@ -54,7 +54,7 @@ "chalk": "^5.0.1", "codecov": "^3.8.3", "fast-check": "^3.0.1", - "gentype": "^4.4.0", + "gentype": "^4.5.0", "jest": "^27.5.1", "moduleserve": "^0.9.1", "nyc": "^15.1.0", @@ -65,7 +65,7 @@ "rescript-fast-check": "^1.1.1", "ts-jest": "^27.1.4", "ts-loader": "^9.3.0", - "ts-node": "^10.8.1", + "ts-node": "^10.9.1", "typescript": "^4.7.4", "webpack": "^5.73.0", "webpack-cli": "^4.10.0" diff --git a/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.res b/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.res index 25eb70f2..319535c1 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.res +++ b/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.res @@ -4,12 +4,9 @@ type error = DistributionTypes.error // TODO: It could be great to use a cache for some calculations (basically, do memoization). Also, better analytics/tracking could go a long way. -type env = { - sampleCount: int, - xyPointLength: int, -} +type env = GenericDist.env -let defaultEnv = { +let defaultEnv: env = { sampleCount: MagicNumbers.Environment.defaultSampleCount, xyPointLength: MagicNumbers.Environment.defaultXYPointLength, } @@ -93,7 +90,7 @@ module OutputLocal = { } } -let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { +let rec run = (~env: env, functionCallInfo: functionCallInfo): outputType => { let {sampleCount, xyPointLength} = env let reCall = (~env=env, ~functionCallInfo=functionCallInfo, ()) => { @@ -101,14 +98,14 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { } let toPointSetFn = r => { - switch reCall(~functionCallInfo=FromDist(ToDist(ToPointSet), r), ()) { + switch reCall(~functionCallInfo=FromDist(#ToDist(ToPointSet), r), ()) { | Dist(PointSet(p)) => Ok(p) | e => Error(OutputLocal.toErrorOrUnreachable(e)) } } let toSampleSetFn = r => { - switch reCall(~functionCallInfo=FromDist(ToDist(ToSampleSet(sampleCount)), r), ()) { + switch reCall(~functionCallInfo=FromDist(#ToDist(ToSampleSet(sampleCount)), r), ()) { | Dist(SampleSet(p)) => Ok(p) | e => Error(OutputLocal.toErrorOrUnreachable(e)) } @@ -116,13 +113,13 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { let scaleMultiply = (r, weight) => reCall( - ~functionCallInfo=FromDist(ToDistCombination(Pointwise, #Multiply, #Float(weight)), r), + ~functionCallInfo=FromDist(#ToDistCombination(Pointwise, #Multiply, #Float(weight)), r), (), )->OutputLocal.toDistR let pointwiseAdd = (r1, r2) => reCall( - ~functionCallInfo=FromDist(ToDistCombination(Pointwise, #Add, #Dist(r2)), r1), + ~functionCallInfo=FromDist(#ToDistCombination(Pointwise, #Add, #Dist(r2)), r1), (), )->OutputLocal.toDistR @@ -131,49 +128,40 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { dist: genericDist, ): outputType => { let response = switch subFnName { - | ToFloat(distToFloatOperation) => + | #ToFloat(distToFloatOperation) => GenericDist.toFloatOperation(dist, ~toPointSetFn, ~distToFloatOperation) ->E.R2.fmap(r => Float(r)) ->OutputLocal.fromResult - | ToString(ToString) => dist->GenericDist.toString->String - | ToString(ToSparkline(bucketCount)) => + | #ToString(ToString) => dist->GenericDist.toString->String + | #ToString(ToSparkline(bucketCount)) => GenericDist.toSparkline(dist, ~sampleCount, ~bucketCount, ()) ->E.R2.fmap(r => String(r)) ->OutputLocal.fromResult - | ToDist(Inspect) => { + | #ToDist(Inspect) => { Js.log2("Console log requested: ", dist) Dist(dist) } - | ToDist(Normalize) => dist->GenericDist.normalize->Dist - | ToScore(KLDivergence(t2)) => - GenericDist.Score.klDivergence(dist, t2, ~toPointSetFn) - ->E.R2.fmap(r => Float(r)) + | #ToDist(Normalize) => dist->GenericDist.normalize->Dist + | #ToScore(LogScore(answer, prior)) => + GenericDist.Score.logScore(~estimate=dist, ~answer, ~prior, ~env) + ->E.R2.fmap(s => Float(s)) ->OutputLocal.fromResult - | ToScore(LogScore(answer, prior)) => - GenericDist.Score.logScoreWithPointResolution( - ~prediction=dist, - ~answer, - ~prior, - ~toPointSetFn, - ) - ->E.R2.fmap(r => Float(r)) - ->OutputLocal.fromResult - | ToBool(IsNormalized) => dist->GenericDist.isNormalized->Bool - | ToDist(Truncate(leftCutoff, rightCutoff)) => + | #ToBool(IsNormalized) => dist->GenericDist.isNormalized->Bool + | #ToDist(Truncate(leftCutoff, rightCutoff)) => GenericDist.truncate(~toPointSetFn, ~leftCutoff, ~rightCutoff, dist, ()) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDist(ToSampleSet(n)) => + | #ToDist(ToSampleSet(n)) => dist ->GenericDist.toSampleSetDist(n) ->E.R2.fmap(r => Dist(SampleSet(r))) ->OutputLocal.fromResult - | ToDist(ToPointSet) => + | #ToDist(ToPointSet) => dist ->GenericDist.toPointSet(~xyPointLength, ~sampleCount, ()) ->E.R2.fmap(r => Dist(PointSet(r))) ->OutputLocal.fromResult - | ToDist(Scale(#LogarithmWithThreshold(eps), f)) => + | #ToDist(Scale(#LogarithmWithThreshold(eps), f)) => dist ->GenericDist.pointwiseCombinationFloat( ~toPointSetFn, @@ -182,23 +170,23 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { ) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDist(Scale(#Multiply, f)) => + | #ToDist(Scale(#Multiply, f)) => dist ->GenericDist.pointwiseCombinationFloat(~toPointSetFn, ~algebraicCombination=#Multiply, ~f) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDist(Scale(#Logarithm, f)) => + | #ToDist(Scale(#Logarithm, f)) => dist ->GenericDist.pointwiseCombinationFloat(~toPointSetFn, ~algebraicCombination=#Logarithm, ~f) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDist(Scale(#Power, f)) => + | #ToDist(Scale(#Power, f)) => dist ->GenericDist.pointwiseCombinationFloat(~toPointSetFn, ~algebraicCombination=#Power, ~f) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDistCombination(Algebraic(_), _, #Float(_)) => GenDistError(NotYetImplemented) - | ToDistCombination(Algebraic(strategy), arithmeticOperation, #Dist(t2)) => + | #ToDistCombination(Algebraic(_), _, #Float(_)) => GenDistError(NotYetImplemented) + | #ToDistCombination(Algebraic(strategy), arithmeticOperation, #Dist(t2)) => dist ->GenericDist.algebraicCombination( ~strategy, @@ -209,12 +197,12 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { ) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDistCombination(Pointwise, algebraicCombination, #Dist(t2)) => + | #ToDistCombination(Pointwise, algebraicCombination, #Dist(t2)) => dist ->GenericDist.pointwiseCombination(~toPointSetFn, ~algebraicCombination, ~t2) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDistCombination(Pointwise, algebraicCombination, #Float(f)) => + | #ToDistCombination(Pointwise, algebraicCombination, #Float(f)) => dist ->GenericDist.pointwiseCombinationFloat(~toPointSetFn, ~algebraicCombination, ~f) ->E.R2.fmap(r => Dist(r)) @@ -225,8 +213,7 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { switch functionCallInfo { | FromDist(subFnName, dist) => fromDistFn(subFnName, dist) - | FromFloat(subFnName, float) => - reCall(~functionCallInfo=FromDist(subFnName, GenericDist.fromFloat(float)), ()) + | FromFloat(subFnName, x) => reCall(~functionCallInfo=FromFloat(subFnName, x), ()) | Mixture(dists) => dists ->GenericDist.mixture(~scaleMultiplyFn=scaleMultiply, ~pointwiseAddFn=pointwiseAdd) @@ -278,13 +265,16 @@ module Constructors = { let pdf = (~env, dist, f) => C.pdf(dist, f)->run(~env)->toFloatR let normalize = (~env, dist) => C.normalize(dist)->run(~env)->toDistR let isNormalized = (~env, dist) => C.isNormalized(dist)->run(~env)->toBoolR - let klDivergence = (~env, dist1, dist2) => C.klDivergence(dist1, dist2)->run(~env)->toFloatR - let logScoreWithPointResolution = ( - ~env, - ~prediction: DistributionTypes.genericDist, - ~answer: float, - ~prior: option, - ) => C.logScoreWithPointResolution(~prediction, ~answer, ~prior)->run(~env)->toFloatR + module LogScore = { + let distEstimateDistAnswer = (~env, estimate, answer) => + C.LogScore.distEstimateDistAnswer(estimate, answer)->run(~env)->toFloatR + let distEstimateDistAnswerWithPrior = (~env, estimate, answer, prior) => + C.LogScore.distEstimateDistAnswerWithPrior(estimate, answer, prior)->run(~env)->toFloatR + let distEstimateScalarAnswer = (~env, estimate, answer) => + C.LogScore.distEstimateScalarAnswer(estimate, answer)->run(~env)->toFloatR + let distEstimateScalarAnswerWithPrior = (~env, estimate, answer, prior) => + C.LogScore.distEstimateScalarAnswerWithPrior(estimate, answer, prior)->run(~env)->toFloatR + } let toPointSet = (~env, dist) => C.toPointSet(dist)->run(~env)->toDistR let toSampleSet = (~env, dist, n) => C.toSampleSet(dist, n)->run(~env)->toDistR let fromSamples = (~env, xs) => C.fromSamples(xs)->run(~env)->toDistR diff --git a/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.resi b/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.resi index bfa7b3ad..68da9534 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.resi +++ b/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.resi @@ -1,11 +1,5 @@ @genType -type env = { - sampleCount: int, - xyPointLength: int, -} - -@genType -let defaultEnv: env +let defaultEnv: GenericDist.env open DistributionTypes @@ -19,15 +13,18 @@ type outputType = | GenDistError(error) @genType -let run: (~env: env, DistributionTypes.DistributionOperation.genericFunctionCallInfo) => outputType +let run: ( + ~env: GenericDist.env, + DistributionTypes.DistributionOperation.genericFunctionCallInfo, +) => outputType let runFromDist: ( - ~env: env, + ~env: GenericDist.env, ~functionCallInfo: DistributionTypes.DistributionOperation.fromDist, genericDist, ) => outputType let runFromFloat: ( - ~env: env, - ~functionCallInfo: DistributionTypes.DistributionOperation.fromDist, + ~env: GenericDist.env, + ~functionCallInfo: DistributionTypes.DistributionOperation.fromFloat, float, ) => outputType @@ -42,79 +39,147 @@ module Output: { let toBool: t => option let toBoolR: t => result let toError: t => option - let fmap: (~env: env, t, DistributionTypes.DistributionOperation.singleParamaterFunction) => t + let fmap: ( + ~env: GenericDist.env, + t, + DistributionTypes.DistributionOperation.singleParamaterFunction, + ) => t } module Constructors: { @genType - let mean: (~env: env, genericDist) => result + let mean: (~env: GenericDist.env, genericDist) => result @genType - let stdev: (~env: env, genericDist) => result + let stdev: (~env: GenericDist.env, genericDist) => result @genType - let variance: (~env: env, genericDist) => result + let variance: (~env: GenericDist.env, genericDist) => result @genType - let sample: (~env: env, genericDist) => result + let sample: (~env: GenericDist.env, genericDist) => result @genType - let cdf: (~env: env, genericDist, float) => result + let cdf: (~env: GenericDist.env, genericDist, float) => result @genType - let inv: (~env: env, genericDist, float) => result + let inv: (~env: GenericDist.env, genericDist, float) => result @genType - let pdf: (~env: env, genericDist, float) => result + let pdf: (~env: GenericDist.env, genericDist, float) => result @genType - let normalize: (~env: env, genericDist) => result + let normalize: (~env: GenericDist.env, genericDist) => result @genType - let isNormalized: (~env: env, genericDist) => result + let isNormalized: (~env: GenericDist.env, genericDist) => result + module LogScore: { + @genType + let distEstimateDistAnswer: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result + @genType + let distEstimateDistAnswerWithPrior: ( + ~env: GenericDist.env, + genericDist, + genericDist, + genericDist, + ) => result + @genType + let distEstimateScalarAnswer: ( + ~env: GenericDist.env, + genericDist, + float, + ) => result + @genType + let distEstimateScalarAnswerWithPrior: ( + ~env: GenericDist.env, + genericDist, + float, + genericDist, + ) => result + } @genType - let klDivergence: (~env: env, genericDist, genericDist) => result + let toPointSet: (~env: GenericDist.env, genericDist) => result @genType - let logScoreWithPointResolution: ( - ~env: env, - ~prediction: genericDist, - ~answer: float, - ~prior: option, - ) => result + let toSampleSet: (~env: GenericDist.env, genericDist, int) => result @genType - let toPointSet: (~env: env, genericDist) => result + let fromSamples: (~env: GenericDist.env, SampleSetDist.t) => result @genType - let toSampleSet: (~env: env, genericDist, int) => result + let truncate: ( + ~env: GenericDist.env, + genericDist, + option, + option, + ) => result @genType - let fromSamples: (~env: env, SampleSetDist.t) => result + let inspect: (~env: GenericDist.env, genericDist) => result @genType - let truncate: (~env: env, genericDist, option, option) => result + let toString: (~env: GenericDist.env, genericDist) => result @genType - let inspect: (~env: env, genericDist) => result + let toSparkline: (~env: GenericDist.env, genericDist, int) => result @genType - let toString: (~env: env, genericDist) => result + let algebraicAdd: (~env: GenericDist.env, genericDist, genericDist) => result @genType - let toSparkline: (~env: env, genericDist, int) => result + let algebraicMultiply: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicAdd: (~env: env, genericDist, genericDist) => result + let algebraicDivide: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicMultiply: (~env: env, genericDist, genericDist) => result + let algebraicSubtract: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicDivide: (~env: env, genericDist, genericDist) => result + let algebraicLogarithm: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicSubtract: (~env: env, genericDist, genericDist) => result + let algebraicPower: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicLogarithm: (~env: env, genericDist, genericDist) => result + let scaleLogarithm: (~env: GenericDist.env, genericDist, float) => result @genType - let algebraicPower: (~env: env, genericDist, genericDist) => result + let scaleMultiply: (~env: GenericDist.env, genericDist, float) => result @genType - let scaleLogarithm: (~env: env, genericDist, float) => result + let scalePower: (~env: GenericDist.env, genericDist, float) => result @genType - let scaleMultiply: (~env: env, genericDist, float) => result + let pointwiseAdd: (~env: GenericDist.env, genericDist, genericDist) => result @genType - let scalePower: (~env: env, genericDist, float) => result + let pointwiseMultiply: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let pointwiseAdd: (~env: env, genericDist, genericDist) => result + let pointwiseDivide: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let pointwiseMultiply: (~env: env, genericDist, genericDist) => result + let pointwiseSubtract: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let pointwiseDivide: (~env: env, genericDist, genericDist) => result + let pointwiseLogarithm: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let pointwiseSubtract: (~env: env, genericDist, genericDist) => result - @genType - let pointwiseLogarithm: (~env: env, genericDist, genericDist) => result - @genType - let pointwisePower: (~env: env, genericDist, genericDist) => result + let pointwisePower: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result } diff --git a/packages/squiggle-lang/src/rescript/Distributions/DistributionTypes.res b/packages/squiggle-lang/src/rescript/Distributions/DistributionTypes.res index a23c2cd6..0c119ea4 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/DistributionTypes.res +++ b/packages/squiggle-lang/src/rescript/Distributions/DistributionTypes.res @@ -98,61 +98,86 @@ module DistributionOperation = { | ToString | ToSparkline(int) - type toScore = KLDivergence(genericDist) | LogScore(float, option) + type genericDistOrScalar = Score_Dist(genericDist) | Score_Scalar(float) - type fromDist = - | ToFloat(toFloat) - | ToDist(toDist) - | ToScore(toScore) - | ToDistCombination(direction, Operation.Algebraic.t, [#Dist(genericDist) | #Float(float)]) - | ToString(toString) - | ToBool(toBool) + type toScore = LogScore(genericDistOrScalar, option) + + type fromFloat = [ + | #ToFloat(toFloat) + | #ToDist(toDist) + | #ToDistCombination(direction, Operation.Algebraic.t, [#Dist(genericDist) | #Float(float)]) + | #ToString(toString) + | #ToBool(toBool) + ] + + type fromDist = [ + | fromFloat + | #ToScore(toScore) + ] type singleParamaterFunction = | FromDist(fromDist) - | FromFloat(fromDist) + | FromFloat(fromFloat) type genericFunctionCallInfo = | FromDist(fromDist, genericDist) - | FromFloat(fromDist, float) + | FromFloat(fromFloat, float) | FromSamples(array) | Mixture(array<(genericDist, float)>) - let distCallToString = (distFunction: fromDist): string => - switch distFunction { - | ToFloat(#Cdf(r)) => `cdf(${E.Float.toFixed(r)})` - | ToFloat(#Inv(r)) => `inv(${E.Float.toFixed(r)})` - | ToFloat(#Mean) => `mean` - | ToFloat(#Min) => `min` - | ToFloat(#Max) => `max` - | ToFloat(#Stdev) => `stdev` - | ToFloat(#Variance) => `variance` - | ToFloat(#Mode) => `mode` - | ToFloat(#Pdf(r)) => `pdf(${E.Float.toFixed(r)})` - | ToFloat(#Sample) => `sample` - | ToFloat(#IntegralSum) => `integralSum` - | ToScore(KLDivergence(_)) => `klDivergence` - | ToScore(LogScore(x, _)) => `logScore against ${E.Float.toFixed(x)}` - | ToDist(Normalize) => `normalize` - | ToDist(ToPointSet) => `toPointSet` - | ToDist(ToSampleSet(r)) => `toSampleSet(${E.I.toString(r)})` - | ToDist(Truncate(_, _)) => `truncate` - | ToDist(Inspect) => `inspect` - | ToDist(Scale(#Power, r)) => `scalePower(${E.Float.toFixed(r)})` - | ToDist(Scale(#Multiply, r)) => `scaleMultiply(${E.Float.toFixed(r)})` - | ToDist(Scale(#Logarithm, r)) => `scaleLog(${E.Float.toFixed(r)})` - | ToDist(Scale(#LogarithmWithThreshold(eps), r)) => + let floatCallToString = (floatFunction: fromFloat): string => + switch floatFunction { + | #ToFloat(#Cdf(r)) => `cdf(${E.Float.toFixed(r)})` + | #ToFloat(#Inv(r)) => `inv(${E.Float.toFixed(r)})` + | #ToFloat(#Mean) => `mean` + | #ToFloat(#Min) => `min` + | #ToFloat(#Max) => `max` + | #ToFloat(#Stdev) => `stdev` + | #ToFloat(#Variance) => `variance` + | #ToFloat(#Mode) => `mode` + | #ToFloat(#Pdf(r)) => `pdf(${E.Float.toFixed(r)})` + | #ToFloat(#Sample) => `sample` + | #ToFloat(#IntegralSum) => `integralSum` + | #ToDist(Normalize) => `normalize` + | #ToDist(ToPointSet) => `toPointSet` + | #ToDist(ToSampleSet(r)) => `toSampleSet(${E.I.toString(r)})` + | #ToDist(Truncate(_, _)) => `truncate` + | #ToDist(Inspect) => `inspect` + | #ToDist(Scale(#Power, r)) => `scalePower(${E.Float.toFixed(r)})` + | #ToDist(Scale(#Multiply, r)) => `scaleMultiply(${E.Float.toFixed(r)})` + | #ToDist(Scale(#Logarithm, r)) => `scaleLog(${E.Float.toFixed(r)})` + | #ToDist(Scale(#LogarithmWithThreshold(eps), r)) => `scaleLogWithThreshold(${E.Float.toFixed(r)}, epsilon=${E.Float.toFixed(eps)})` - | ToString(ToString) => `toString` - | ToString(ToSparkline(n)) => `sparkline(${E.I.toString(n)})` - | ToBool(IsNormalized) => `isNormalized` - | ToDistCombination(Algebraic(_), _, _) => `algebraic` - | ToDistCombination(Pointwise, _, _) => `pointwise` + | #ToString(ToString) => `toString` + | #ToString(ToSparkline(n)) => `sparkline(${E.I.toString(n)})` + | #ToBool(IsNormalized) => `isNormalized` + | #ToDistCombination(Algebraic(_), _, _) => `algebraic` + | #ToDistCombination(Pointwise, _, _) => `pointwise` + } + + let distCallToString = ( + distFunction: [ + | #ToFloat(toFloat) + | #ToDist(toDist) + | #ToDistCombination(direction, Operation.Algebraic.t, [#Dist(genericDist) | #Float(float)]) + | #ToString(toString) + | #ToBool(toBool) + | #ToScore(toScore) + ], + ): string => + switch distFunction { + | #ToScore(_) => `logScore` + | #ToFloat(x) => floatCallToString(#ToFloat(x)) + | #ToDist(x) => floatCallToString(#ToDist(x)) + | #ToString(x) => floatCallToString(#ToString(x)) + | #ToBool(x) => floatCallToString(#ToBool(x)) + | #ToDistCombination(x, y, z) => floatCallToString(#ToDistCombination(x, y, z)) } let toString = (d: genericFunctionCallInfo): string => switch d { - | FromDist(f, _) | FromFloat(f, _) => distCallToString(f) + | FromDist(f, _) => distCallToString(f) + | FromFloat(f, _) => floatCallToString(f) | Mixture(_) => `mixture` | FromSamples(_) => `fromSamples` } @@ -162,80 +187,93 @@ module Constructors = { module UsingDists = { @genType - let mean = (dist): t => FromDist(ToFloat(#Mean), dist) - let stdev = (dist): t => FromDist(ToFloat(#Stdev), dist) - let variance = (dist): t => FromDist(ToFloat(#Variance), dist) - let sample = (dist): t => FromDist(ToFloat(#Sample), dist) - let cdf = (dist, x): t => FromDist(ToFloat(#Cdf(x)), dist) - let inv = (dist, x): t => FromDist(ToFloat(#Inv(x)), dist) - let pdf = (dist, x): t => FromDist(ToFloat(#Pdf(x)), dist) - let normalize = (dist): t => FromDist(ToDist(Normalize), dist) - let isNormalized = (dist): t => FromDist(ToBool(IsNormalized), dist) - let toPointSet = (dist): t => FromDist(ToDist(ToPointSet), dist) - let toSampleSet = (dist, r): t => FromDist(ToDist(ToSampleSet(r)), dist) + let mean = (dist): t => FromDist(#ToFloat(#Mean), dist) + let stdev = (dist): t => FromDist(#ToFloat(#Stdev), dist) + let variance = (dist): t => FromDist(#ToFloat(#Variance), dist) + let sample = (dist): t => FromDist(#ToFloat(#Sample), dist) + let cdf = (dist, x): t => FromDist(#ToFloat(#Cdf(x)), dist) + let inv = (dist, x): t => FromDist(#ToFloat(#Inv(x)), dist) + let pdf = (dist, x): t => FromDist(#ToFloat(#Pdf(x)), dist) + let normalize = (dist): t => FromDist(#ToDist(Normalize), dist) + let isNormalized = (dist): t => FromDist(#ToBool(IsNormalized), dist) + let toPointSet = (dist): t => FromDist(#ToDist(ToPointSet), dist) + let toSampleSet = (dist, r): t => FromDist(#ToDist(ToSampleSet(r)), dist) let fromSamples = (xs): t => FromSamples(xs) - let truncate = (dist, left, right): t => FromDist(ToDist(Truncate(left, right)), dist) - let inspect = (dist): t => FromDist(ToDist(Inspect), dist) - let klDivergence = (dist1, dist2): t => FromDist(ToScore(KLDivergence(dist2)), dist1) - let logScoreWithPointResolution = (~prediction, ~answer, ~prior): t => FromDist( - ToScore(LogScore(answer, prior)), - prediction, - ) - let scaleMultiply = (dist, n): t => FromDist(ToDist(Scale(#Multiply, n)), dist) - let scalePower = (dist, n): t => FromDist(ToDist(Scale(#Power, n)), dist) - let scaleLogarithm = (dist, n): t => FromDist(ToDist(Scale(#Logarithm, n)), dist) + let truncate = (dist, left, right): t => FromDist(#ToDist(Truncate(left, right)), dist) + let inspect = (dist): t => FromDist(#ToDist(Inspect), dist) + module LogScore = { + let distEstimateDistAnswer = (estimate, answer): t => FromDist( + #ToScore(LogScore(Score_Dist(answer), None)), + estimate, + ) + let distEstimateDistAnswerWithPrior = (estimate, answer, prior): t => FromDist( + #ToScore(LogScore(Score_Dist(answer), Some(prior))), + estimate, + ) + let distEstimateScalarAnswer = (estimate, answer): t => FromDist( + #ToScore(LogScore(Score_Scalar(answer), None)), + estimate, + ) + let distEstimateScalarAnswerWithPrior = (estimate, answer, prior): t => FromDist( + #ToScore(LogScore(Score_Scalar(answer), Some(prior))), + estimate, + ) + } + let scaleMultiply = (dist, n): t => FromDist(#ToDist(Scale(#Multiply, n)), dist) + let scalePower = (dist, n): t => FromDist(#ToDist(Scale(#Power, n)), dist) + let scaleLogarithm = (dist, n): t => FromDist(#ToDist(Scale(#Logarithm, n)), dist) let scaleLogarithmWithThreshold = (dist, n, eps): t => FromDist( - ToDist(Scale(#LogarithmWithThreshold(eps), n)), + #ToDist(Scale(#LogarithmWithThreshold(eps), n)), dist, ) - let toString = (dist): t => FromDist(ToString(ToString), dist) - let toSparkline = (dist, n): t => FromDist(ToString(ToSparkline(n)), dist) + let toString = (dist): t => FromDist(#ToString(ToString), dist) + let toSparkline = (dist, n): t => FromDist(#ToString(ToSparkline(n)), dist) let algebraicAdd = (dist1, dist2: genericDist): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Add, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Add, #Dist(dist2)), dist1, ) let algebraicMultiply = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Multiply, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Multiply, #Dist(dist2)), dist1, ) let algebraicDivide = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Divide, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Divide, #Dist(dist2)), dist1, ) let algebraicSubtract = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Subtract, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Subtract, #Dist(dist2)), dist1, ) let algebraicLogarithm = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Logarithm, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Logarithm, #Dist(dist2)), dist1, ) let algebraicPower = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Power, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Power, #Dist(dist2)), dist1, ) let pointwiseAdd = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Add, #Dist(dist2)), + #ToDistCombination(Pointwise, #Add, #Dist(dist2)), dist1, ) let pointwiseMultiply = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Multiply, #Dist(dist2)), + #ToDistCombination(Pointwise, #Multiply, #Dist(dist2)), dist1, ) let pointwiseDivide = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Divide, #Dist(dist2)), + #ToDistCombination(Pointwise, #Divide, #Dist(dist2)), dist1, ) let pointwiseSubtract = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Subtract, #Dist(dist2)), + #ToDistCombination(Pointwise, #Subtract, #Dist(dist2)), dist1, ) let pointwiseLogarithm = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Logarithm, #Dist(dist2)), + #ToDistCombination(Pointwise, #Logarithm, #Dist(dist2)), dist1, ) let pointwisePower = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Power, #Dist(dist2)), + #ToDistCombination(Pointwise, #Power, #Dist(dist2)), dist1, ) } diff --git a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res index addbdaa1..f536d54d 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res @@ -6,6 +6,11 @@ type toSampleSetFn = t => result type scaleMultiplyFn = (t, float) => result type pointwiseAddFn = (t, t) => result +type env = { + sampleCount: int, + xyPointLength: int, +} + let isPointSet = (t: t) => switch t { | PointSet(_) => true @@ -61,46 +66,6 @@ let integralEndY = (t: t): float => let isNormalized = (t: t): bool => Js.Math.abs_float(integralEndY(t) -. 1.0) < 1e-7 -module Score = { - let klDivergence = (prediction, answer, ~toPointSetFn: toPointSetFn): result => { - let pointSets = E.R.merge(toPointSetFn(prediction), toPointSetFn(answer)) - pointSets |> E.R2.bind(((predi, ans)) => - PointSetDist.T.klDivergence(predi, ans)->E.R2.errMap(x => DistributionTypes.OperationError(x)) - ) - } - - let logScoreWithPointResolution = ( - ~prediction: DistributionTypes.genericDist, - ~answer: float, - ~prior: option, - ~toPointSetFn: toPointSetFn, - ): result => { - switch prior { - | Some(prior') => - E.R.merge(toPointSetFn(prior'), toPointSetFn(prediction))->E.R.bind((( - prior'', - prediction'', - )) => - PointSetDist.T.logScoreWithPointResolution( - ~prediction=prediction'', - ~answer, - ~prior=prior''->Some, - )->E.R2.errMap(x => DistributionTypes.OperationError(x)) - ) - | None => - prediction - ->toPointSetFn - ->E.R.bind(x => - PointSetDist.T.logScoreWithPointResolution( - ~prediction=x, - ~answer, - ~prior=None, - )->E.R2.errMap(x => DistributionTypes.OperationError(x)) - ) - } - } -} - let toFloatOperation = ( t, ~toPointSetFn: toPointSetFn, @@ -171,6 +136,70 @@ let toPointSet = ( } } +module Score = { + type genericDistOrScalar = DistributionTypes.DistributionOperation.genericDistOrScalar + + let argsMake = (~esti: t, ~answ: genericDistOrScalar, ~prior: option, ~env: env): result< + PointSetDist_Scoring.scoreArgs, + error, + > => { + let toPointSetFn = t => + toPointSet( + t, + ~xyPointLength=env.xyPointLength, + ~sampleCount=env.sampleCount, + ~xSelection=#ByWeight, + (), + ) + let prior': option> = switch prior { + | None => None + | Some(d) => toPointSetFn(d)->Some + } + let twoDists = (~toPointSetFn, esti': t, answ': t): result< + (PointSetTypes.pointSetDist, PointSetTypes.pointSetDist), + error, + > => E.R.merge(toPointSetFn(esti'), toPointSetFn(answ')) + switch (esti, answ, prior') { + | (esti', Score_Dist(answ'), None) => + twoDists(~toPointSetFn, esti', answ')->E.R2.fmap(((esti'', answ'')) => + {estimate: esti'', answer: answ'', prior: None}->PointSetDist_Scoring.DistAnswer + ) + | (esti', Score_Dist(answ'), Some(Ok(prior''))) => + twoDists(~toPointSetFn, esti', answ')->E.R2.fmap(((esti'', answ'')) => + { + estimate: esti'', + answer: answ'', + prior: Some(prior''), + }->PointSetDist_Scoring.DistAnswer + ) + | (esti', Score_Scalar(answ'), None) => + toPointSetFn(esti')->E.R2.fmap(esti'' => + { + estimate: esti'', + answer: answ', + prior: None, + }->PointSetDist_Scoring.ScalarAnswer + ) + | (esti', Score_Scalar(answ'), Some(Ok(prior''))) => + toPointSetFn(esti')->E.R2.fmap(esti'' => + { + estimate: esti'', + answer: answ', + prior: Some(prior''), + }->PointSetDist_Scoring.ScalarAnswer + ) + | (_, _, Some(Error(err))) => err->Error + } + } + + let logScore = (~estimate: t, ~answer: genericDistOrScalar, ~prior: option, ~env: env): result< + float, + error, + > => + argsMake(~esti=estimate, ~answ=answer, ~prior, ~env)->E.R.bind(x => + x->PointSetDist.logScore->E.R2.errMap(y => DistributionTypes.OperationError(y)) + ) +} /* PointSetDist.toSparkline calls "downsampleEquallyOverX", which downsamples it to n=bucketCount. It first needs a pointSetDist, so we convert to a pointSetDist. In this process we want the diff --git a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.resi b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.resi index fd9afa58..fd04212a 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.resi +++ b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.resi @@ -5,6 +5,9 @@ type toSampleSetFn = t => result type scaleMultiplyFn = (t, float) => result type pointwiseAddFn = (t, t) => result +@genType +type env = {sampleCount: int, xyPointLength: int} + let sampleN: (t, int) => array let sample: t => float @@ -25,12 +28,11 @@ let toFloatOperation: ( ) => result module Score: { - let klDivergence: (t, t, ~toPointSetFn: toPointSetFn) => result - let logScoreWithPointResolution: ( - ~prediction: t, - ~answer: float, + let logScore: ( + ~estimate: t, + ~answer: DistributionTypes.DistributionOperation.genericDistOrScalar, ~prior: option, - ~toPointSetFn: toPointSetFn, + ~env: env, ) => result } diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res index 3661a531..05d94ca9 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res @@ -120,7 +120,7 @@ let combinePointwise = ( let interpolator = XYShape.XtoY.continuousInterpolator(t1.interpolation, extrapolation) - combiner(fn, interpolator, t1.xyShape, t2.xyShape)->E.R2.fmap(x => + combiner(interpolator, fn, t1.xyShape, t2.xyShape)->E.R2.fmap(x => make(~integralSumCache=combinedIntegralSum, x) ) } @@ -270,20 +270,6 @@ module T = Dist({ } let variance = (t: t): float => XYShape.Analysis.getVarianceDangerously(t, mean, Analysis.getMeanOfSquares) - - let klDivergence = (prediction: t, answer: t) => { - let newShape = XYShape.PointwiseCombination.combineAlongSupportOfSecondArgument( - PointSetDist_Scoring.KLDivergence.integrand, - prediction.xyShape, - answer.xyShape, - ) - newShape->E.R2.fmap(x => x->make->integralEndY) - } - let logScoreWithPointResolution = (~prediction: t, ~answer: float, ~prior: option) => { - let priorPdf = prior->E.O2.fmap((shape, x) => XYShape.XtoY.linear(x, shape.xyShape)) - let predictionPdf = x => XYShape.XtoY.linear(x, prediction.xyShape) - PointSetDist_Scoring.LogScoreWithPointResolution.score(~priorPdf, ~predictionPdf, ~answer) - } }) let isNormalized = (t: t): bool => { diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res index 08874121..7e7c4981 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res @@ -49,7 +49,7 @@ let combinePointwise = ( // TODO: does it ever make sense to pointwise combine the integrals here? // It could be done for pointwise additions, but is that ever needed? - combiner(fn, XYShape.XtoY.discreteInterpolator, t1.xyShape, t2.xyShape)->E.R2.fmap(make) + combiner(XYShape.XtoY.discreteInterpolator, fn, t1.xyShape, t2.xyShape)->E.R2.fmap(make) } let reduce = ( @@ -222,15 +222,4 @@ module T = Dist({ let getMeanOfSquares = t => t |> shapeMap(XYShape.T.square) |> mean XYShape.Analysis.getVarianceDangerously(t, mean, getMeanOfSquares) } - - let klDivergence = (prediction: t, answer: t) => { - combinePointwise( - ~fn=PointSetDist_Scoring.KLDivergence.integrand, - prediction, - answer, - )->E.R2.fmap(integralEndY) - } - let logScoreWithPointResolution = (~prediction: t, ~answer: float, ~prior: option) => { - Error(Operation.NotYetImplemented) - } }) diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Distributions.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Distributions.res index 2d0358ec..3a35d57b 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Distributions.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Distributions.res @@ -33,12 +33,6 @@ module type dist = { let mean: t => float let variance: t => float - let klDivergence: (t, t) => result - let logScoreWithPointResolution: ( - ~prediction: t, - ~answer: float, - ~prior: option, - ) => result } module Dist = (T: dist) => { @@ -61,9 +55,6 @@ module Dist = (T: dist) => { let mean = T.mean let variance = T.variance let integralEndY = T.integralEndY - let klDivergence = T.klDivergence - let logScoreWithPointResolution = T.logScoreWithPointResolution - let updateIntegralCache = T.updateIntegralCache module Integral = { diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Mixed.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Mixed.res index 4d8542f4..c9f31dbf 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Mixed.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Mixed.res @@ -302,15 +302,6 @@ module T = Dist({ | _ => XYShape.Analysis.getVarianceDangerously(t, mean, getMeanOfSquares) } } - - let klDivergence = (prediction: t, answer: t) => { - let klDiscretePart = Discrete.T.klDivergence(prediction.discrete, answer.discrete) - let klContinuousPart = Continuous.T.klDivergence(prediction.continuous, answer.continuous) - E.R.merge(klDiscretePart, klContinuousPart)->E.R2.fmap(t => fst(t) +. snd(t)) - } - let logScoreWithPointResolution = (~prediction: t, ~answer: float, ~prior: option) => { - Error(Operation.NotYetImplemented) - } }) let combineAlgebraically = (op: Operation.convolutionOperation, t1: t, t2: t): t => { diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist.res index 74913d06..6fd2582d 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist.res @@ -66,6 +66,7 @@ let combineAlgebraically = (op: Operation.convolutionOperation, t1: t, t2: t): t } let combinePointwise = ( + ~combiner=XYShape.PointwiseCombination.combine, ~integralSumCachesFn: (float, float) => option=(_, _) => None, ~integralCachesFn: ( PointSetTypes.continuousShape, @@ -78,6 +79,7 @@ let combinePointwise = ( switch (t1, t2) { | (Continuous(m1), Continuous(m2)) => Continuous.combinePointwise( + ~combiner, ~integralSumCachesFn, fn, m1, @@ -85,6 +87,7 @@ let combinePointwise = ( )->E.R2.fmap(x => PointSetTypes.Continuous(x)) | (Discrete(m1), Discrete(m2)) => Discrete.combinePointwise( + ~combiner, ~integralSumCachesFn, ~fn, m1, @@ -195,25 +198,16 @@ module T = Dist({ | Discrete(m) => Discrete.T.variance(m) | Continuous(m) => Continuous.T.variance(m) } - - let klDivergence = (prediction: t, answer: t) => - switch (prediction, answer) { - | (Continuous(t1), Continuous(t2)) => Continuous.T.klDivergence(t1, t2) - | (Discrete(t1), Discrete(t2)) => Discrete.T.klDivergence(t1, t2) - | (m1, m2) => Mixed.T.klDivergence(m1->toMixed, m2->toMixed) - } - - let logScoreWithPointResolution = (~prediction: t, ~answer: float, ~prior: option) => { - switch (prior, prediction) { - | (Some(Continuous(t1)), Continuous(t2)) => - Continuous.T.logScoreWithPointResolution(~prediction=t2, ~answer, ~prior=t1->Some) - | (None, Continuous(t2)) => - Continuous.T.logScoreWithPointResolution(~prediction=t2, ~answer, ~prior=None) - | _ => Error(Operation.NotYetImplemented) - } - } }) +let logScore = (args: PointSetDist_Scoring.scoreArgs): result => + PointSetDist_Scoring.logScore( + args, + ~combineFn=combinePointwise, + ~integrateFn=T.Integral.sum, + ~toMixedFn=toMixed, + ) + let pdf = (f: float, t: t) => { let mixedPoint: PointSetTypes.mixedPoint = T.xToY(f, t) mixedPoint.continuous +. mixedPoint.discrete diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist_Scoring.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist_Scoring.res index 532bc76c..8e5d71a4 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist_Scoring.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist_Scoring.res @@ -1,46 +1,149 @@ -module KLDivergence = { - let logFn = Js.Math.log // base e - let integrand = (predictionElement: float, answerElement: float): result< +type pointSetDist = PointSetTypes.pointSetDist + +type scalar = float +type score = float +type abstractScoreArgs<'a, 'b> = {estimate: 'a, answer: 'b, prior: option<'a>} +type scoreArgs = + | DistAnswer(abstractScoreArgs) + | ScalarAnswer(abstractScoreArgs) + +let logFn = Js.Math.log // base e +let minusScaledLogOfQuotient = (~esti, ~answ): result => { + let quot = esti /. answ + quot < 0.0 ? Error(Operation.ComplexNumberError) : Ok(-.answ *. logFn(quot)) +} + +module WithDistAnswer = { + // The Kullback-Leibler divergence + let integrand = (estimateElement: float, answerElement: float): result< float, Operation.Error.t, > => - // We decided that negative infinity, not an error at answerElement = 0.0, is a desirable value. + // We decided that 0.0, not an error at answerElement = 0.0, is a desirable value. if answerElement == 0.0 { Ok(0.0) - } else if predictionElement == 0.0 { + } else if estimateElement == 0.0 { Ok(infinity) } else { - let quot = predictionElement /. answerElement - quot < 0.0 ? Error(Operation.ComplexNumberError) : Ok(-.answerElement *. logFn(quot)) + minusScaledLogOfQuotient(~esti=estimateElement, ~answ=answerElement) } -} -module LogScoreWithPointResolution = { - let logFn = Js.Math.log - let score = ( - ~priorPdf: option float>, - ~predictionPdf: float => float, - ~answer: float, - ): result => { - let numerator = answer->predictionPdf - if numerator < 0.0 { - Operation.PdfInvalidError->Error - } else if numerator == 0.0 { - infinity->Ok - } else { - -.( - switch priorPdf { - | None => numerator->logFn - | Some(f) => { - let priorDensityOfAnswer = f(answer) - if priorDensityOfAnswer == 0.0 { - neg_infinity - } else { - (numerator /. priorDensityOfAnswer)->logFn - } - } - } - )->Ok + let sum = ( + ~estimate: pointSetDist, + ~answer: pointSetDist, + ~combineFn, + ~integrateFn, + ~toMixedFn, + ): result => { + let combineAndIntegrate = (estimate, answer) => + combineFn(integrand, estimate, answer)->E.R2.fmap(integrateFn) + + let getMixedSums = (estimate: pointSetDist, answer: pointSetDist) => { + let esti = estimate->toMixedFn + let answ = answer->toMixedFn + switch ( + Mixed.T.toContinuous(esti), + Mixed.T.toDiscrete(esti), + Mixed.T.toContinuous(answ), + Mixed.T.toDiscrete(answ), + ) { + | ( + Some(estiContinuousPart), + Some(estiDiscretePart), + Some(answContinuousPart), + Some(answDiscretePart), + ) => + E.R.merge( + combineAndIntegrate( + PointSetTypes.Discrete(estiDiscretePart), + PointSetTypes.Discrete(answDiscretePart), + ), + combineAndIntegrate(Continuous(estiContinuousPart), Continuous(answContinuousPart)), + ) + | (_, _, _, _) => `unreachable state`->Operation.Other->Error + } + } + + switch (estimate, answer) { + | (Continuous(_), Continuous(_)) + | (Discrete(_), Discrete(_)) => + combineAndIntegrate(estimate, answer) + | (_, _) => + getMixedSums(estimate, answer)->E.R2.fmap(((discretePart, continuousPart)) => + discretePart +. continuousPart + ) } } + + let sumWithPrior = ( + ~estimate: pointSetDist, + ~answer: pointSetDist, + ~prior: pointSetDist, + ~combineFn, + ~integrateFn, + ~toMixedFn, + ): result => { + let kl1 = sum(~estimate, ~answer, ~combineFn, ~integrateFn, ~toMixedFn) + let kl2 = sum(~estimate=prior, ~answer, ~combineFn, ~integrateFn, ~toMixedFn) + E.R.merge(kl1, kl2)->E.R2.fmap(((kl1', kl2')) => kl1' -. kl2') + } } + +module WithScalarAnswer = { + let sum = (mp: PointSetTypes.MixedPoint.t): float => mp.continuous +. mp.discrete + let score = (~estimate: pointSetDist, ~answer: scalar): result => { + let _score = (~estimatePdf: float => option, ~answer: float): result< + score, + Operation.Error.t, + > => { + let density = answer->estimatePdf + switch density { + | None => Operation.PdfInvalidError->Error + | Some(density') => + if density' < 0.0 { + Operation.PdfInvalidError->Error + } else if density' == 0.0 { + infinity->Ok + } else { + density'->logFn->(x => -.x)->Ok + } + } + } + + let estimatePdf = x => + switch estimate { + | Continuous(esti) => Continuous.T.xToY(x, esti)->sum->Some + | Discrete(esti) => Discrete.T.xToY(x, esti)->sum->Some + | Mixed(_) => None + } + _score(~estimatePdf, ~answer) + } + + let scoreWithPrior = (~estimate: pointSetDist, ~answer: scalar, ~prior: pointSetDist): result< + score, + Operation.Error.t, + > => { + E.R.merge(score(~estimate, ~answer), score(~estimate=prior, ~answer))->E.R2.fmap(((s1, s2)) => + s1 -. s2 + ) + } +} + +let twoGenericDistsToTwoPointSetDists = (~toPointSetFn, estimate, answer): result< + (pointSetDist, pointSetDist), + 'e, +> => E.R.merge(toPointSetFn(estimate, ()), toPointSetFn(answer, ())) + +let logScore = (args: scoreArgs, ~combineFn, ~integrateFn, ~toMixedFn): result< + score, + Operation.Error.t, +> => + switch args { + | DistAnswer({estimate, answer, prior: None}) => + WithDistAnswer.sum(~estimate, ~answer, ~integrateFn, ~combineFn, ~toMixedFn) + | DistAnswer({estimate, answer, prior: Some(prior)}) => + WithDistAnswer.sumWithPrior(~estimate, ~answer, ~prior, ~integrateFn, ~combineFn, ~toMixedFn) + | ScalarAnswer({estimate, answer, prior: None}) => WithScalarAnswer.score(~estimate, ~answer) + | ScalarAnswer({estimate, answer, prior: Some(prior)}) => + WithScalarAnswer.scoreWithPrior(~estimate, ~answer, ~prior) + } diff --git a/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res b/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res index bfbaa795..dc15f7a1 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res @@ -117,6 +117,11 @@ let map3 = ( ): result => E.A.zip3(get(t1), get(t2), get(t3))->E.A2.fmap(E.Tuple3.toFnCall(fn))->_fromSampleResultArray +let mapN = (~fn: array => result, ~t1: array): result< + t, + sampleSetError, +> => E.A.transpose(E.A.fmap(get, t1))->E.A2.fmap(fn)->_fromSampleResultArray + let mean = t => T.get(t)->E.A.Floats.mean let geomean = t => T.get(t)->E.A.Floats.geomean let mode = t => T.get(t)->E.A.Floats.mode diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res index bbca7bc7..25eb87b7 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res @@ -1,4 +1,5 @@ type internalExpressionValue = ReducerInterface_InternalExpressionValue.t +type internalExpressionValueType = ReducerInterface_InternalExpressionValue.internalExpressionValueType /* Function Registry "Type". A type, without any other information. @@ -8,6 +9,7 @@ type rec frType = | FRTypeNumber | FRTypeNumeric | FRTypeDistOrNumber + | FRTypeDist | FRTypeLambda | FRTypeRecord(frTypeRecord) | FRTypeDict(frType) @@ -41,18 +43,26 @@ and frValueDistOrNumber = FRValueNumber(float) | FRValueDist(DistributionTypes.g type fnDefinition = { name: string, inputs: array, - run: (array, DistributionOperation.env) => result, + run: ( + array, + array, + GenericDist.env, + ) => result, } type function = { name: string, definitions: array, - examples: option, + requiresNamespace: bool, + nameSpace: string, + output: option, + examples: array, description: option, isExperimental: bool, } -type registry = array +type fnNameDict = Js.Dict.t> +type registry = {functions: array, fnNameDict: fnNameDict} module FRType = { type t = frType @@ -60,6 +70,7 @@ module FRType = { switch t { | FRTypeNumber => "number" | FRTypeNumeric => "numeric" + | FRTypeDist => "distribution" | FRTypeDistOrNumber => "distribution|number" | FRTypeRecord(r) => { let input = ((name, frType): frTypeRecordParam) => `${name}: ${toString(frType)}` @@ -98,6 +109,7 @@ module FRType = { | (FRTypeDistOrNumber, IEvDistribution(Symbolic(#Float(f)))) => Some(FRValueDistOrNumber(FRValueNumber(f))) | (FRTypeDistOrNumber, IEvDistribution(f)) => Some(FRValueDistOrNumber(FRValueDist(f))) + | (FRTypeDist, IEvDistribution(f)) => Some(FRValueDist(f)) | (FRTypeNumeric, IEvNumber(f)) => Some(FRValueNumber(f)) | (FRTypeNumeric, IEvDistribution(Symbolic(#Float(f)))) => Some(FRValueNumber(f)) | (FRTypeLambda, IEvLambda(f)) => Some(FRValueLambda(f)) @@ -262,7 +274,7 @@ module Matcher = { module Registry = { let _findExactMatches = (r: registry, fnName: string, args: array) => { - let functionMatchPairs = r->E.A2.fmap(l => (l, Function.match(l, fnName, args))) + let functionMatchPairs = r.functions->E.A2.fmap(l => (l, Function.match(l, fnName, args))) let fullMatch = functionMatchPairs->E.A.getBy(((_, match)) => Match.isFullMatch(match)) fullMatch->E.O.bind(((fn, match)) => switch match { @@ -273,7 +285,7 @@ module Matcher = { } let _findNameMatches = (r: registry, fnName: string, args: array) => { - let functionMatchPairs = r->E.A2.fmap(l => (l, Function.match(l, fnName, args))) + let functionMatchPairs = r.functions->E.A2.fmap(l => (l, Function.match(l, fnName, args))) let getNameMatches = functionMatchPairs ->E.A2.fmap(((fn, match)) => Match.isNameMatchOnly(match) ? Some((fn, match)) : None) @@ -292,10 +304,13 @@ module Matcher = { } let findMatches = (r: registry, fnName: string, args: array) => { - switch _findExactMatches(r, fnName, args) { + let fnNameInParts = Js.String.split(".", fnName) + let fnToSearch = E.A.get(fnNameInParts, 1) |> E.O.default(fnNameInParts[0]) + + switch _findExactMatches(r, fnToSearch, args) { | Some(r) => Match.FullMatch(r) | None => - switch _findNameMatches(r, fnName, args) { + switch _findNameMatches(r, fnToSearch, args) { | Some(r) => Match.SameNameDifferentArguments(r) | None => Match.DifferentName } @@ -305,7 +320,7 @@ module Matcher = { let matchToDef = (registry: registry, {fnName, inputIndex}: RegistryMatch.match): option< fnDefinition, > => - registry + registry.functions ->E.A.getBy(fn => fn.name === fnName) ->E.O.bind(fn => E.A.get(fn.definitions, inputIndex)) } @@ -319,15 +334,23 @@ module FnDefinition = { t.name ++ `(${inputs})` } - let run = (t: t, args: array, env: DistributionOperation.env) => { + let isMatch = (t: t, args: array) => { let argValues = FRType.matchWithExpressionValueArray(t.inputs, args) switch argValues { - | Some(values) => t.run(values, env) + | Some(_) => true + | None => false + } + } + + let run = (t: t, args: array, env: GenericDist.env) => { + let argValues = FRType.matchWithExpressionValueArray(t.inputs, args) + switch argValues { + | Some(values) => t.run(args, values, env) | None => Error("Incorrect Types") } } - let make = (~name, ~inputs, ~run): t => { + let make = (~name, ~inputs, ~run, ()): t => { name: name, inputs: inputs, run: run, @@ -340,16 +363,29 @@ module Function = { type functionJson = { name: string, definitions: array, - examples: option, + examples: array, description: option, isExperimental: bool, } - let make = (~name, ~definitions, ~examples=?, ~description=?, ~isExperimental=false, ()): t => { + let make = ( + ~name, + ~nameSpace, + ~requiresNamespace, + ~definitions, + ~examples=?, + ~output=?, + ~description=?, + ~isExperimental=false, + (), + ): t => { name: name, + nameSpace: nameSpace, definitions: definitions, - examples: examples, + output: output, + examples: examples |> E.O.default([]), isExperimental: isExperimental, + requiresNamespace: requiresNamespace, description: description, } @@ -362,22 +398,64 @@ module Function = { } } +module NameSpace = { + type t = {name: string, functions: array} + let definitions = (t: t) => t.functions->E.A2.fmap(f => f.definitions)->E.A.concatMany + let uniqueFnNames = (t: t) => definitions(t)->E.A2.fmap(r => r.name)->E.A.uniq + let nameToDefinitions = (t: t, name: string) => definitions(t)->E.A2.filter(r => r.name == name) +} + module Registry = { - let toJson = (r: registry) => r->E.A2.fmap(Function.toJson) + let toJson = (r: registry) => r.functions->E.A2.fmap(Function.toJson) + let allExamples = (r: registry) => r.functions->E.A2.fmap(r => r.examples)->E.A.concatMany + let allExamplesWithFns = (r: registry) => + r.functions->E.A2.fmap(fn => fn.examples->E.A2.fmap(example => (fn, example)))->E.A.concatMany + + let _buildFnNameDict = (r: array): fnNameDict => { + let allDefinitionsWithFns = + r + ->E.A2.fmap(fn => fn.definitions->E.A2.fmap(definitions => (fn, definitions))) + ->E.A.concatMany + let functionsWithFnNames = + allDefinitionsWithFns + ->E.A2.fmap(((fn, def)) => { + let nameWithNamespace = `${fn.nameSpace}.${def.name}` + let nameWithoutNamespace = def.name + fn.requiresNamespace + ? [(nameWithNamespace, fn)] + : [(nameWithNamespace, fn), (nameWithoutNamespace, fn)] + }) + ->E.A.concatMany + let uniqueNames = functionsWithFnNames->E.A2.fmap(((name, _)) => name)->E.A.uniq + let cacheAsArray: array<(string, array)> = uniqueNames->E.A2.fmap(uniqueName => { + let relevantItems = + E.A2.filter(functionsWithFnNames, ((defName, _)) => defName == uniqueName)->E.A2.fmap( + E.Tuple2.second, + ) + (uniqueName, relevantItems) + }) + cacheAsArray->Js.Dict.fromArray + } + + let make = (fns: array): registry => { + let dict = _buildFnNameDict(fns) + {functions: fns, fnNameDict: dict} + } /* There's a (potential+minor) bug here: If a function definition is called outside of the calls to the registry, then it's possible that there could be a match after the registry is called. However, for now, we could just call the registry last. */ - let matchAndRun = ( + let _matchAndRun = ( ~registry: registry, ~fnName: string, ~args: array, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { + let relevantFunctions = Js.Dict.get(registry.fnNameDict, fnName) |> E.O.default([]) + let modified = {functions: relevantFunctions, fnNameDict: registry.fnNameDict} let matchToDef = m => Matcher.Registry.matchToDef(registry, m) - //Js.log(toSimple(registry)) let showNameMatchDefinitions = matches => { let defs = matches @@ -388,10 +466,21 @@ module Registry = { ->E.A2.joinWith("; ") `There are function matches for ${fnName}(), but with different arguments: ${defs}` } - switch Matcher.Registry.findMatches(registry, fnName, args) { + + switch Matcher.Registry.findMatches(modified, fnName, args) { | Matcher.Match.FullMatch(match) => match->matchToDef->E.O2.fmap(FnDefinition.run(_, args, env)) | SameNameDifferentArguments(m) => Some(Error(showNameMatchDefinitions(m))) | _ => None } } + + let dispatch = ( + registry, + (fnName, args): ReducerInterface_InternalExpressionValue.functionCall, + env, + ) => { + _matchAndRun(~registry, ~fnName, ~args, ~env)->E.O2.fmap( + E.R2.errMap(_, s => Reducer_ErrorValue.RETodo(s)), + ) + } } diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Helpers.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Helpers.res index 46ae18f9..115d5307 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Helpers.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Helpers.res @@ -27,6 +27,12 @@ module Prepare = { | _ => Error(impossibleError) } + let threeArgs = (inputs: ts): result => + switch inputs { + | [FRValueRecord([(_, n1), (_, n2), (_, n3)])] => Ok([n1, n2, n3]) + | _ => Error(impossibleError) + } + let toArgs = (inputs: ts): result => switch inputs { | [FRValueRecord(args)] => args->E.A2.fmap(((_, b)) => b)->Ok @@ -57,6 +63,16 @@ module Prepare = { } } + let twoDist = (values: ts): result< + (DistributionTypes.genericDist, DistributionTypes.genericDist), + err, + > => { + switch values { + | [FRValueDist(a1), FRValueDist(a2)] => Ok(a1, a2) + | _ => Error(impossibleError) + } + } + let twoNumbers = (values: ts): result<(float, float), err> => { switch values { | [FRValueNumber(a1), FRValueNumber(a2)] => Ok(a1, a2) @@ -81,6 +97,11 @@ module Prepare = { module Record = { let twoDistOrNumber = (values: ts): result<(frValueDistOrNumber, frValueDistOrNumber), err> => values->ToValueArray.Record.twoArgs->E.R.bind(twoDistOrNumber) + + let twoDist = (values: ts): result< + (DistributionTypes.genericDist, DistributionTypes.genericDist), + err, + > => values->ToValueArray.Record.twoArgs->E.R.bind(twoDist) } } @@ -128,8 +149,7 @@ module Prepare = { module Process = { module DistOrNumberToDist = { module Helpers = { - let toSampleSet = (r, env: DistributionOperation.env) => - GenericDist.toSampleSetDist(r, env.sampleCount) + let toSampleSet = (r, env: GenericDist.env) => GenericDist.toSampleSetDist(r, env.sampleCount) let mapFnResult = r => switch r { @@ -166,7 +186,7 @@ module Process = { let oneValue = ( ~fn: float => result, ~value: frValueDistOrNumber, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): result => { switch value { | FRValueNumber(a1) => fn(a1) @@ -179,7 +199,7 @@ module Process = { let twoValues = ( ~fn: ((float, float)) => result, ~values: (frValueDistOrNumber, frValueDistOrNumber), - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): result => { switch values { | (FRValueNumber(a1), FRValueNumber(a2)) => fn((a1, a2)) @@ -193,72 +213,3 @@ module Process = { twoValues(~fn=Helpers.wrapSymbolic(fn), ~values) } } - -module TwoArgDist = { - let process = (~fn, ~env, r) => - r - ->E.R.bind(Process.DistOrNumberToDist.twoValuesUsingSymbolicDist(~fn, ~values=_, ~env)) - ->E.R2.fmap(Wrappers.evDistribution) - - let make = (name, fn) => { - FnDefinition.make(~name, ~inputs=[FRTypeDistOrNumber, FRTypeDistOrNumber], ~run=(inputs, env) => - inputs->Prepare.ToValueTuple.twoDistOrNumber->process(~fn, ~env) - ) - } - - let makeRecordP5P95 = (name, fn) => { - FnDefinition.make( - ~name, - ~inputs=[FRTypeRecord([("p5", FRTypeDistOrNumber), ("p95", FRTypeDistOrNumber)])], - ~run=(inputs, env) => inputs->Prepare.ToValueTuple.Record.twoDistOrNumber->process(~fn, ~env), - ) - } - - let makeRecordMeanStdev = (name, fn) => { - FnDefinition.make( - ~name, - ~inputs=[FRTypeRecord([("mean", FRTypeDistOrNumber), ("stdev", FRTypeDistOrNumber)])], - ~run=(inputs, env) => inputs->Prepare.ToValueTuple.Record.twoDistOrNumber->process(~fn, ~env), - ) - } -} - -module OneArgDist = { - let process = (~fn, ~env, r) => - r - ->E.R.bind(Process.DistOrNumberToDist.oneValueUsingSymbolicDist(~fn, ~value=_, ~env)) - ->E.R2.fmap(Wrappers.evDistribution) - - let make = (name, fn) => - FnDefinition.make(~name, ~inputs=[FRTypeDistOrNumber], ~run=(inputs, env) => - inputs->Prepare.ToValueTuple.oneDistOrNumber->process(~fn, ~env) - ) -} - -module ArrayNumberDist = { - let make = (name, fn) => { - FnDefinition.make(~name, ~inputs=[FRTypeArray(FRTypeNumber)], ~run=(inputs, _) => - Prepare.ToTypedArray.numbers(inputs) - ->E.R.bind(r => E.A.length(r) === 0 ? Error("List is empty") : Ok(r)) - ->E.R.bind(fn) - ) - } - let make2 = (name, fn) => { - FnDefinition.make(~name, ~inputs=[FRTypeArray(FRTypeAny)], ~run=(inputs, _) => - Prepare.ToTypedArray.numbers(inputs) - ->E.R.bind(r => E.A.length(r) === 0 ? Error("List is empty") : Ok(r)) - ->E.R.bind(fn) - ) - } -} - -module NumberToNumber = { - let make = (name, fn) => - FnDefinition.make(~name, ~inputs=[FRTypeNumber], ~run=(inputs, _) => { - inputs - ->getOrError(0) - ->E.R.bind(Prepare.oneNumber) - ->E.R2.fmap(fn) - ->E.R2.fmap(Wrappers.evNumber) - }) -} diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Library.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Library.res index a37b8dc4..9b0f6737 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Library.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Library.res @@ -1,512 +1,12 @@ -open FunctionRegistry_Core -open FunctionRegistry_Helpers +let fnList = Belt.Array.concatMany([ + FR_Dict.library, + FR_Dist.library, + FR_Fn.library, + FR_List.library, + FR_Number.library, + FR_Pointset.library, + FR_Scoring.library, +]) -let twoArgs = E.Tuple2.toFnCall - -module Declaration = { - let frType = FRTypeRecord([ - ("fn", FRTypeLambda), - ("inputs", FRTypeArray(FRTypeRecord([("min", FRTypeNumber), ("max", FRTypeNumber)]))), - ]) - - let fromExpressionValue = (e: frValue): result => { - switch FunctionRegistry_Helpers.Prepare.ToValueArray.Record.twoArgs([e]) { - | Ok([FRValueLambda(lambda), FRValueArray(inputs)]) => { - open FunctionRegistry_Helpers.Prepare - let getMinMax = arg => - ToValueArray.Record.toArgs([arg]) - ->E.R.bind(ToValueTuple.twoNumbers) - ->E.R2.fmap(((min, max)) => Declaration.ContinuousFloatArg.make(min, max)) - inputs - ->E.A2.fmap(getMinMax) - ->E.A.R.firstErrorOrOpen - ->E.R2.fmap(args => ReducerInterface_InternalExpressionValue.IEvDeclaration( - Declaration.make(lambda, args), - )) - } - | Error(r) => Error(r) - | Ok(_) => Error(FunctionRegistry_Helpers.impossibleError) - } - } -} - -let inputsTodist = (inputs: array, makeDist) => { - let array = inputs->getOrError(0)->E.R.bind(Prepare.ToValueArray.Array.openA) - let xyCoords = - array->E.R.bind(xyCoords => - xyCoords - ->E.A2.fmap(xyCoord => - [xyCoord]->Prepare.ToValueArray.Record.twoArgs->E.R.bind(Prepare.ToValueTuple.twoNumbers) - ) - ->E.A.R.firstErrorOrOpen - ) - let expressionValue = - xyCoords - ->E.R.bind(r => r->XYShape.T.makeFromZipped->E.R2.errMap(XYShape.Error.toString)) - ->E.R2.fmap(r => ReducerInterface_InternalExpressionValue.IEvDistribution( - PointSet(makeDist(r)), - )) - expressionValue -} - -let registry = [ - Function.make( - ~name="toContinuousPointSet", - ~definitions=[ - FnDefinition.make( - ~name="toContinuousPointSet", - ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], - ~run=(inputs, _) => inputsTodist(inputs, r => Continuous(Continuous.make(r))), - ), - ], - (), - ), - Function.make( - ~name="toDiscretePointSet", - ~definitions=[ - FnDefinition.make( - ~name="toDiscretePointSet", - ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], - ~run=(inputs, _) => inputsTodist(inputs, r => Discrete(Discrete.make(r))), - ), - ], - (), - ), - Function.make( - ~name="Declaration", - ~definitions=[ - FnDefinition.make(~name="declareFn", ~inputs=[Declaration.frType], ~run=(inputs, _) => { - inputs->getOrError(0)->E.R.bind(Declaration.fromExpressionValue) - }), - ], - (), - ), - Function.make( - ~name="Normal", - ~examples=`normal(5,1) -normal({p5: 4, p95: 10}) -normal({mean: 5, stdev: 2})`, - ~definitions=[ - TwoArgDist.make("normal", twoArgs(SymbolicDist.Normal.make)), - TwoArgDist.makeRecordP5P95("normal", r => - twoArgs(SymbolicDist.Normal.from90PercentCI, r)->Ok - ), - TwoArgDist.makeRecordMeanStdev("normal", twoArgs(SymbolicDist.Normal.make)), - ], - (), - ), - Function.make( - ~name="Lognormal", - ~examples=`lognormal(0.5, 0.8) -lognormal({p5: 4, p95: 10}) -lognormal({mean: 5, stdev: 2})`, - ~definitions=[ - TwoArgDist.make("lognormal", twoArgs(SymbolicDist.Lognormal.make)), - TwoArgDist.makeRecordP5P95("lognormal", r => - twoArgs(SymbolicDist.Lognormal.from90PercentCI, r)->Ok - ), - TwoArgDist.makeRecordMeanStdev("lognormal", twoArgs(SymbolicDist.Lognormal.fromMeanAndStdev)), - ], - (), - ), - Function.make( - ~name="Uniform", - ~examples=`uniform(10, 12)`, - ~definitions=[TwoArgDist.make("uniform", twoArgs(SymbolicDist.Uniform.make))], - (), - ), - Function.make( - ~name="Beta", - ~examples=`beta(20, 25) -beta({mean: 0.39, stdev: 0.1})`, - ~definitions=[ - TwoArgDist.make("beta", twoArgs(SymbolicDist.Beta.make)), - TwoArgDist.makeRecordMeanStdev("beta", twoArgs(SymbolicDist.Beta.fromMeanAndStdev)), - ], - (), - ), - Function.make( - ~name="Cauchy", - ~examples=`cauchy(5, 1)`, - ~definitions=[TwoArgDist.make("cauchy", twoArgs(SymbolicDist.Cauchy.make))], - (), - ), - Function.make( - ~name="Gamma", - ~examples=`gamma(5, 1)`, - ~definitions=[TwoArgDist.make("gamma", twoArgs(SymbolicDist.Gamma.make))], - (), - ), - Function.make( - ~name="Logistic", - ~examples=`gamma(5, 1)`, - ~definitions=[TwoArgDist.make("logistic", twoArgs(SymbolicDist.Logistic.make))], - (), - ), - Function.make( - ~name="To (Distribution)", - ~examples=`5 to 10 -to(5,10) --5 to 5`, - ~definitions=[ - TwoArgDist.make("to", twoArgs(SymbolicDist.From90thPercentile.make)), - TwoArgDist.make( - "credibleIntervalToDistribution", - twoArgs(SymbolicDist.From90thPercentile.make), - ), - ], - (), - ), - Function.make( - ~name="Exponential", - ~examples=`exponential(2)`, - ~definitions=[OneArgDist.make("exponential", SymbolicDist.Exponential.make)], - (), - ), - Function.make( - ~name="Bernoulli", - ~examples=`bernoulli(0.5)`, - ~definitions=[OneArgDist.make("bernoulli", SymbolicDist.Bernoulli.make)], - (), - ), - Function.make( - ~name="PointMass", - ~examples=`pointMass(0.5)`, - ~definitions=[OneArgDist.make("pointMass", SymbolicDist.Float.makeSafe)], - (), - ), - Function.make( - ~name="toContinuousPointSet", - ~description="Converts a set of points to a continuous distribution", - ~examples=`toContinuousPointSet([ - {x: 0, y: 0.1}, - {x: 1, y: 0.2}, - {x: 2, y: 0.15}, - {x: 3, y: 0.1} -])`, - ~definitions=[ - FnDefinition.make( - ~name="toContinuousPointSet", - ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], - ~run=(inputs, _) => inputsTodist(inputs, r => Continuous(Continuous.make(r))), - ), - ], - (), - ), - Function.make( - ~name="toDiscretePointSet", - ~description="Converts a set of points to a discrete distribution", - ~examples=`toDiscretePointSet([ - {x: 0, y: 0.1}, - {x: 1, y: 0.2}, - {x: 2, y: 0.15}, - {x: 3, y: 0.1} -])`, - ~definitions=[ - FnDefinition.make( - ~name="toDiscretePointSet", - ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], - ~run=(inputs, _) => inputsTodist(inputs, r => Discrete(Discrete.make(r))), - ), - ], - (), - ), - Function.make( - ~name="Declaration (Continuous Function)", - ~description="Adds metadata to a function of the input ranges. Works now for numeric and date inputs. This is useful when making predictions. It allows you to limit the domain that your prediction will be used and scored within.", - ~examples=`declareFn({ - fn: {|a,b| a }, - inputs: [ - {min: 0, max: 100}, - {min: 30, max: 50} - ] -})`, - ~definitions=[ - FnDefinition.make(~name="declareFn", ~inputs=[Declaration.frType], ~run=(inputs, _) => { - inputs->E.A.unsafe_get(0)->Declaration.fromExpressionValue - }), - ], - ~isExperimental=true, - (), - ), - Function.make( - ~name="Floor", - ~definitions=[NumberToNumber.make("floor", Js.Math.floor_float)], - (), - ), - Function.make( - ~name="Ceiling", - ~definitions=[NumberToNumber.make("ceil", Js.Math.ceil_float)], - (), - ), - Function.make( - ~name="Absolute Value", - ~definitions=[NumberToNumber.make("abs", Js.Math.abs_float)], - (), - ), - Function.make(~name="Exponent", ~definitions=[NumberToNumber.make("exp", Js.Math.exp)], ()), - Function.make(~name="Log", ~definitions=[NumberToNumber.make("log", Js.Math.log)], ()), - Function.make( - ~name="Log Base 10", - ~definitions=[NumberToNumber.make("log10", Js.Math.log10)], - (), - ), - Function.make(~name="Log Base 2", ~definitions=[NumberToNumber.make("log2", Js.Math.log2)], ()), - Function.make(~name="Round", ~definitions=[NumberToNumber.make("round", Js.Math.round)], ()), - Function.make( - ~name="Sum", - ~definitions=[ArrayNumberDist.make("sum", r => r->E.A.Floats.sum->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Product", - ~definitions=[ - ArrayNumberDist.make("product", r => r->E.A.Floats.product->Wrappers.evNumber->Ok), - ], - (), - ), - Function.make( - ~name="Min", - ~definitions=[ArrayNumberDist.make("min", r => r->E.A.Floats.min->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Max", - ~definitions=[ArrayNumberDist.make("max", r => r->E.A.Floats.max->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Mean", - ~definitions=[ArrayNumberDist.make("mean", r => r->E.A.Floats.mean->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Geometric Mean", - ~definitions=[ - ArrayNumberDist.make("geomean", r => r->E.A.Floats.geomean->Wrappers.evNumber->Ok), - ], - (), - ), - Function.make( - ~name="Standard Deviation", - ~definitions=[ArrayNumberDist.make("stdev", r => r->E.A.Floats.stdev->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Variance", - ~definitions=[ - ArrayNumberDist.make("variance", r => r->E.A.Floats.stdev->Wrappers.evNumber->Ok), - ], - (), - ), - Function.make( - ~name="First", - ~definitions=[ - ArrayNumberDist.make2("first", r => - r->E.A.first |> E.O.toResult(impossibleError) |> E.R.fmap(Wrappers.evNumber) - ), - ], - (), - ), - Function.make( - ~name="Last", - ~definitions=[ - ArrayNumberDist.make2("last", r => - r->E.A.last |> E.O.toResult(impossibleError) |> E.R.fmap(Wrappers.evNumber) - ), - ], - (), - ), - Function.make( - ~name="Sort", - ~definitions=[ - ArrayNumberDist.make("sort", r => - r->E.A.Floats.sort->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Reverse", - ~definitions=[ - ArrayNumberDist.make("reverse", r => - r->Belt_Array.reverse->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Cumulative Sum", - ~definitions=[ - ArrayNumberDist.make("cumsum", r => - r->E.A.Floats.cumsum->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Cumulative Prod", - ~definitions=[ - ArrayNumberDist.make("cumprod", r => - r->E.A.Floats.cumsum->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Diff", - ~definitions=[ - ArrayNumberDist.make("diff", r => - r->E.A.Floats.diff->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Dict.merge", - ~definitions=[ - FnDefinition.make( - ~name="merge", - ~inputs=[FRTypeDict(FRTypeAny), FRTypeDict(FRTypeAny)], - ~run=(inputs, _) => { - switch inputs { - | [FRValueDict(d1), FRValueDict(d2)] => { - let newDict = - E.Dict.concat(d1, d2) |> Js.Dict.map((. r) => - FunctionRegistry_Core.FRType.matchReverse(r) - ) - newDict->Js.Dict.entries->Belt.Map.String.fromArray->Wrappers.evRecord->Ok - } - | _ => Error(impossibleError) - } - }, - ), - ], - (), - ), - //TODO: Make sure that two functions can't have the same name. This causes chaos elsewhere. - Function.make( - ~name="Dict.mergeMany", - ~definitions=[ - FnDefinition.make(~name="mergeMany", ~inputs=[FRTypeArray(FRTypeDict(FRTypeAny))], ~run=( - inputs, - _, - ) => - inputs - ->Prepare.ToTypedArray.dicts - ->E.R2.fmap(E.Dict.concatMany) - ->E.R2.fmap(Js.Dict.map((. r) => FunctionRegistry_Core.FRType.matchReverse(r))) - ->E.R2.fmap(r => r->Js.Dict.entries->Belt.Map.String.fromArray) - ->E.R2.fmap(Wrappers.evRecord) - ), - ], - (), - ), - Function.make( - ~name="Dict.keys", - ~definitions=[ - FnDefinition.make(~name="keys", ~inputs=[FRTypeDict(FRTypeAny)], ~run=(inputs, _) => - switch inputs { - | [FRValueDict(d1)] => Js.Dict.keys(d1)->E.A2.fmap(Wrappers.evString)->Wrappers.evArray->Ok - | _ => Error(impossibleError) - } - ), - ], - (), - ), - Function.make( - ~name="Dict.values", - ~definitions=[ - FnDefinition.make(~name="values", ~inputs=[FRTypeDict(FRTypeAny)], ~run=(inputs, _) => - switch inputs { - | [FRValueDict(d1)] => - Js.Dict.values(d1) - ->E.A2.fmap(FunctionRegistry_Core.FRType.matchReverse) - ->Wrappers.evArray - ->Ok - | _ => Error(impossibleError) - } - ), - ], - (), - ), - Function.make( - ~name="Dict.toList", - ~definitions=[ - FnDefinition.make(~name="dictToList", ~inputs=[FRTypeDict(FRTypeAny)], ~run=(inputs, _) => - switch inputs { - | [FRValueDict(dict)] => - dict - ->Js.Dict.entries - ->E.A2.fmap(((key, value)) => - Wrappers.evArray([ - Wrappers.evString(key), - FunctionRegistry_Core.FRType.matchReverse(value), - ]) - ) - ->Wrappers.evArray - ->Ok - | _ => Error(impossibleError) - } - ), - ], - (), - ), - Function.make( - ~name="Dict.fromList", - ~definitions=[ - FnDefinition.make(~name="dictFromList", ~inputs=[FRTypeArray(FRTypeArray(FRTypeAny))], ~run=( - inputs, - _, - ) => { - let convertInternalItems = items => - items - ->E.A2.fmap(item => { - switch item { - | [FRValueString(string), value] => - (string, FunctionRegistry_Core.FRType.matchReverse(value))->Ok - | _ => Error(impossibleError) - } - }) - ->E.A.R.firstErrorOrOpen - ->E.R2.fmap(Belt.Map.String.fromArray) - ->E.R2.fmap(Wrappers.evRecord) - inputs->getOrError(0)->E.R.bind(Prepare.ToValueArray.Array.arrayOfArrays) - |> E.R2.bind(convertInternalItems) - }), - ], - (), - ), - Function.make( - ~name="List.make", - ~definitions=[ - //Todo: If the second item is a function with no args, it could be nice to run this function and return the result. - FnDefinition.make(~name="listMake", ~inputs=[FRTypeNumber, FRTypeAny], ~run=(inputs, _) => { - switch inputs { - | [FRValueNumber(number), value] => - Belt.Array.make(E.Float.toInt(number), value) - ->E.A2.fmap(FunctionRegistry_Core.FRType.matchReverse) - ->Wrappers.evArray - ->Ok - | _ => Error(impossibleError) - } - }), - ], - (), - ), - Function.make( - ~name="upTo", - ~definitions=[ - FnDefinition.make(~name="upTo", ~inputs=[FRTypeNumber, FRTypeNumber], ~run=(inputs, _) => - inputs - ->Prepare.ToValueTuple.twoNumbers - ->E.R2.fmap(((low, high)) => - E.A.Floats.range(low, high, (high -. low +. 1.0)->E.Float.toInt) - ->E.A2.fmap(Wrappers.evNumber) - ->Wrappers.evArray - ) - ), - ], - (), - ), -] +let registry = FunctionRegistry_Core.Registry.make(fnList) +let dispatch = FunctionRegistry_Core.Registry.dispatch(registry) diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dict.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dict.res new file mode 100644 index 00000000..4a52f187 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dict.res @@ -0,0 +1,169 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "Dict" + +module Internals = { + type t = ReducerInterface_InternalExpressionValue.map + + let keys = (a: t): internalExpressionValue => IEvArray( + Belt.Map.String.keysToArray(a)->E.A2.fmap(Wrappers.evString), + ) + + let values = (a: t): internalExpressionValue => IEvArray(Belt.Map.String.valuesToArray(a)) + + let toList = (a: t): internalExpressionValue => + Belt.Map.String.toArray(a) + ->E.A2.fmap(((key, value)) => Wrappers.evArray([IEvString(key), value])) + ->Wrappers.evArray + + let fromList = (items: array): result => + items + ->E.A2.fmap(item => { + switch (item: internalExpressionValue) { + | IEvArray([IEvString(string), value]) => (string, value)->Ok + | _ => Error(impossibleError) + } + }) + ->E.A.R.firstErrorOrOpen + ->E.R2.fmap(Belt.Map.String.fromArray) + ->E.R2.fmap(Wrappers.evRecord) + + let merge = (a: t, b: t): internalExpressionValue => IEvRecord( + Belt.Map.String.merge(a, b, (_, _, c) => c), + ) + + //Belt.Map.String has a function for mergeMany, but I couldn't understand how to use it yet. + let mergeMany = (a: array): internalExpressionValue => { + let mergedValues = + a->E.A2.fmap(Belt.Map.String.toArray)->Belt.Array.concatMany->Belt.Map.String.fromArray + IEvRecord(mergedValues) + } +} + +let library = [ + Function.make( + ~name="merge", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtRecord, + ~examples=[`Dict.merge({a: 1, b: 2}, {c: 3, d: 4})`], + ~definitions=[ + FnDefinition.make( + ~name="merge", + ~inputs=[FRTypeDict(FRTypeAny), FRTypeDict(FRTypeAny)], + ~run=(inputs, _, _) => { + switch inputs { + | [IEvRecord(d1), IEvRecord(d2)] => Internals.merge(d1, d2)->Ok + | _ => Error(impossibleError) + } + }, + (), + ), + ], + (), + ), + //TODO: Change to use new mergeMany() function. + Function.make( + ~name="mergeMany", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtRecord, + ~examples=[`Dict.mergeMany([{a: 1, b: 2}, {c: 3, d: 4}])`], + ~definitions=[ + FnDefinition.make( + ~name="mergeMany", + ~inputs=[FRTypeArray(FRTypeDict(FRTypeAny))], + ~run=(_, inputs, _) => + inputs + ->Prepare.ToTypedArray.dicts + ->E.R2.fmap(E.Dict.concatMany) + ->E.R2.fmap(Js.Dict.map((. r) => FunctionRegistry_Core.FRType.matchReverse(r))) + ->E.R2.fmap(r => r->Js.Dict.entries->Belt.Map.String.fromArray) + ->E.R2.fmap(Wrappers.evRecord), + (), + ), + ], + (), + ), + Function.make( + ~name="keys", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtArray, + ~examples=[`Dict.keys({a: 1, b: 2})`], + ~definitions=[ + FnDefinition.make( + ~name="keys", + ~inputs=[FRTypeDict(FRTypeAny)], + ~run=(inputs, _, _) => + switch inputs { + | [IEvRecord(d1)] => Internals.keys(d1)->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="values", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtArray, + ~examples=[`Dict.values({a: 1, b: 2})`], + ~definitions=[ + FnDefinition.make( + ~name="values", + ~inputs=[FRTypeDict(FRTypeAny)], + ~run=(inputs, _, _) => + switch inputs { + | [IEvRecord(d1)] => Internals.values(d1)->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="toList", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtArray, + ~examples=[`Dict.toList({a: 1, b: 2})`], + ~definitions=[ + FnDefinition.make( + ~name="toList", + ~inputs=[FRTypeDict(FRTypeAny)], + ~run=(inputs, _, _) => + switch inputs { + | [IEvRecord(dict)] => dict->Internals.toList->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="fromList", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtRecord, + ~examples=[`Dict.fromList([["a", 1], ["b", 2]])`], + ~definitions=[ + FnDefinition.make( + ~name="fromList", + ~inputs=[FRTypeArray(FRTypeArray(FRTypeAny))], + ~run=(inputs, _, _) => + switch inputs { + | [IEvArray(items)] => Internals.fromList(items) + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dist.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dist.res new file mode 100644 index 00000000..424983d8 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dist.res @@ -0,0 +1,152 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers +let twoArgs = E.Tuple2.toFnCall + +module DistributionCreation = { + let nameSpace = "Dist" + let output = ReducerInterface_InternalExpressionValue.EvtDistribution + let requiresNamespace = false + + let fnMake = (~name, ~examples, ~definitions) => { + Function.make(~name, ~nameSpace, ~output, ~examples, ~definitions, ~requiresNamespace, ()) + } + + module TwoArgDist = { + let process = (~fn, ~env, r) => + r + ->E.R.bind(Process.DistOrNumberToDist.twoValuesUsingSymbolicDist(~fn, ~values=_, ~env)) + ->E.R2.fmap(Wrappers.evDistribution) + + let make = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeDistOrNumber, FRTypeDistOrNumber], + ~run=(_, inputs, env) => inputs->Prepare.ToValueTuple.twoDistOrNumber->process(~fn, ~env), + (), + ) + } + + let makeRecordP5P95 = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeRecord([("p5", FRTypeDistOrNumber), ("p95", FRTypeDistOrNumber)])], + ~run=(_, inputs, env) => + inputs->Prepare.ToValueTuple.Record.twoDistOrNumber->process(~fn, ~env), + (), + ) + } + + let makeRecordMeanStdev = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeRecord([("mean", FRTypeDistOrNumber), ("stdev", FRTypeDistOrNumber)])], + ~run=(_, inputs, env) => + inputs->Prepare.ToValueTuple.Record.twoDistOrNumber->process(~fn, ~env), + (), + ) + } + } + + module OneArgDist = { + let process = (~fn, ~env, r) => + r + ->E.R.bind(Process.DistOrNumberToDist.oneValueUsingSymbolicDist(~fn, ~value=_, ~env)) + ->E.R2.fmap(Wrappers.evDistribution) + + let make = (name, fn) => + FnDefinition.make( + ~name, + ~inputs=[FRTypeDistOrNumber], + ~run=(_, inputs, env) => inputs->Prepare.ToValueTuple.oneDistOrNumber->process(~fn, ~env), + (), + ) + } + + let library = [ + fnMake( + ~name="normal", + ~examples=["normal(5,1)", "normal({p5: 4, p95: 10})", "normal({mean: 5, stdev: 2})"], + ~definitions=[ + TwoArgDist.make("normal", twoArgs(SymbolicDist.Normal.make)), + TwoArgDist.makeRecordP5P95("normal", r => + twoArgs(SymbolicDist.Normal.from90PercentCI, r)->Ok + ), + TwoArgDist.makeRecordMeanStdev("normal", twoArgs(SymbolicDist.Normal.make)), + ], + ), + fnMake( + ~name="lognormal", + ~examples=[ + "lognormal(0.5, 0.8)", + "lognormal({p5: 4, p95: 10})", + "lognormal({mean: 5, stdev: 2})", + ], + ~definitions=[ + TwoArgDist.make("lognormal", twoArgs(SymbolicDist.Lognormal.make)), + TwoArgDist.makeRecordP5P95("lognormal", r => + twoArgs(SymbolicDist.Lognormal.from90PercentCI, r)->Ok + ), + TwoArgDist.makeRecordMeanStdev( + "lognormal", + twoArgs(SymbolicDist.Lognormal.fromMeanAndStdev), + ), + ], + ), + fnMake( + ~name="uniform", + ~examples=[`uniform(10, 12)`], + ~definitions=[TwoArgDist.make("uniform", twoArgs(SymbolicDist.Uniform.make))], + ), + fnMake( + ~name="beta", + ~examples=[`beta(20, 25)`, `beta({mean: 0.39, stdev: 0.1})`], + ~definitions=[ + TwoArgDist.make("beta", twoArgs(SymbolicDist.Beta.make)), + TwoArgDist.makeRecordMeanStdev("beta", twoArgs(SymbolicDist.Beta.fromMeanAndStdev)), + ], + ), + fnMake( + ~name="cauchy", + ~examples=[`cauchy(5, 1)`], + ~definitions=[TwoArgDist.make("cauchy", twoArgs(SymbolicDist.Cauchy.make))], + ), + fnMake( + ~name="gamma", + ~examples=[`gamma(5, 1)`], + ~definitions=[TwoArgDist.make("gamma", twoArgs(SymbolicDist.Gamma.make))], + ), + fnMake( + ~name="logistic", + ~examples=[`logistic(5, 1)`], + ~definitions=[TwoArgDist.make("logistic", twoArgs(SymbolicDist.Logistic.make))], + ), + fnMake( + ~name="to (distribution)", + ~examples=[`5 to 10`, `to(5,10)`, `-5 to 5`], + ~definitions=[ + TwoArgDist.make("to", twoArgs(SymbolicDist.From90thPercentile.make)), + TwoArgDist.make( + "credibleIntervalToDistribution", + twoArgs(SymbolicDist.From90thPercentile.make), + ), + ], + ), + fnMake( + ~name="exponential", + ~examples=[`exponential(2)`], + ~definitions=[OneArgDist.make("exponential", SymbolicDist.Exponential.make)], + ), + fnMake( + ~name="bernoulli", + ~examples=[`bernoulli(0.5)`], + ~definitions=[OneArgDist.make("bernoulli", SymbolicDist.Bernoulli.make)], + ), + fnMake( + ~name="pointMass", + ~examples=[`pointMass(0.5)`], + ~definitions=[OneArgDist.make("pointMass", SymbolicDist.Float.makeSafe)], + ), + ] +} + +let library = DistributionCreation.library diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Fn.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Fn.res new file mode 100644 index 00000000..512d564a --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Fn.res @@ -0,0 +1,62 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +module Declaration = { + let frType = FRTypeRecord([ + ("fn", FRTypeLambda), + ("inputs", FRTypeArray(FRTypeRecord([("min", FRTypeNumber), ("max", FRTypeNumber)]))), + ]) + + let fromExpressionValue = (e: frValue): result => { + switch FunctionRegistry_Helpers.Prepare.ToValueArray.Record.twoArgs([e]) { + | Ok([FRValueLambda(lambda), FRValueArray(inputs)]) => { + open FunctionRegistry_Helpers.Prepare + let getMinMax = arg => + ToValueArray.Record.toArgs([arg]) + ->E.R.bind(ToValueTuple.twoNumbers) + ->E.R2.fmap(((min, max)) => Declaration.ContinuousFloatArg.make(min, max)) + inputs + ->E.A2.fmap(getMinMax) + ->E.A.R.firstErrorOrOpen + ->E.R2.fmap(args => ReducerInterface_InternalExpressionValue.IEvDeclaration( + Declaration.make(lambda, args), + )) + } + | Error(r) => Error(r) + | Ok(_) => Error(FunctionRegistry_Helpers.impossibleError) + } + } +} + +let nameSpace = "Function" + +let library = [ + Function.make( + ~name="declare", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtDeclaration, + ~description="Adds metadata to a function of the input ranges. Works now for numeric and date inputs. This is useful when making predictions. It allows you to limit the domain that your prediction will be used and scored within.", + ~examples=[ + `Function.declare({ + fn: {|a,b| a }, + inputs: [ + {min: 0, max: 100}, + {min: 30, max: 50} + ] +})`, + ], + ~isExperimental=true, + ~definitions=[ + FnDefinition.make( + ~name="declare", + ~inputs=[Declaration.frType], + ~run=(_, inputs, _) => { + inputs->getOrError(0)->E.R.bind(Declaration.fromExpressionValue) + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_List.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_List.res new file mode 100644 index 00000000..25924232 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_List.res @@ -0,0 +1,128 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "List" +let requiresNamespace = true + +module Internals = { + let makeFromNumber = ( + n: float, + value: internalExpressionValue, + ): internalExpressionValue => IEvArray(Belt.Array.make(E.Float.toInt(n), value)) + + let upTo = (low: float, high: float): internalExpressionValue => IEvArray( + E.A.Floats.range(low, high, (high -. low +. 1.0)->E.Float.toInt)->E.A2.fmap(Wrappers.evNumber), + ) + + let first = (v: array): result => + v->E.A.first |> E.O.toResult("No first element") + + let last = (v: array): result => + v->E.A.last |> E.O.toResult("No last element") + + let reverse = (array: array): internalExpressionValue => IEvArray( + Belt.Array.reverse(array), + ) +} + +let library = [ + Function.make( + ~name="make", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`List.make(2, "testValue")`], + ~definitions=[ + //Todo: If the second item is a function with no args, it could be nice to run this function and return the result. + FnDefinition.make( + ~name="make", + ~inputs=[FRTypeNumber, FRTypeAny], + ~run=(inputs, _, _) => { + switch inputs { + | [IEvNumber(number), value] => Internals.makeFromNumber(number, value)->Ok + | _ => Error(impossibleError) + } + }, + (), + ), + ], + (), + ), + Function.make( + ~name="upTo", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`List.upTo(1,4)`], + ~definitions=[ + FnDefinition.make( + ~name="upTo", + ~inputs=[FRTypeNumber, FRTypeNumber], + ~run=(_, inputs, _) => + inputs + ->Prepare.ToValueTuple.twoNumbers + ->E.R2.fmap(((low, high)) => Internals.upTo(low, high)), + (), + ), + ], + (), + ), + Function.make( + ~name="first", + ~nameSpace, + ~requiresNamespace, + ~examples=[`List.first([1,4,5])`], + ~definitions=[ + FnDefinition.make( + ~name="first", + ~inputs=[FRTypeArray(FRTypeAny)], + ~run=(inputs, _, _) => + switch inputs { + | [IEvArray(array)] => Internals.first(array) + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="last", + ~nameSpace, + ~requiresNamespace, + ~examples=[`List.last([1,4,5])`], + ~definitions=[ + FnDefinition.make( + ~name="last", + ~inputs=[FRTypeArray(FRTypeAny)], + ~run=(inputs, _, _) => + switch inputs { + | [IEvArray(array)] => Internals.last(array) + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="reverse", + ~nameSpace, + ~output=EvtArray, + ~requiresNamespace=false, + ~examples=[`List.reverse([1,4,5])`], + ~definitions=[ + FnDefinition.make( + ~name="reverse", + ~inputs=[FRTypeArray(FRTypeAny)], + ~run=(inputs, _, _) => + switch inputs { + | [IEvArray(array)] => Internals.reverse(array)->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res new file mode 100644 index 00000000..c7027f06 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res @@ -0,0 +1,251 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "Number" +let requiresNamespace = false + +module NumberToNumber = { + let make = (name, fn) => + FnDefinition.make( + ~name, + ~inputs=[FRTypeNumber], + ~run=(_, inputs, _) => { + inputs + ->getOrError(0) + ->E.R.bind(Prepare.oneNumber) + ->E.R2.fmap(fn) + ->E.R2.fmap(Wrappers.evNumber) + }, + (), + ) +} + +module ArrayNumberDist = { + let make = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeArray(FRTypeNumber)], + ~run=(_, inputs, _) => + Prepare.ToTypedArray.numbers(inputs) + ->E.R.bind(r => E.A.length(r) === 0 ? Error("List is empty") : Ok(r)) + ->E.R.bind(fn), + (), + ) + } + let make2 = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeArray(FRTypeAny)], + ~run=(_, inputs, _) => + Prepare.ToTypedArray.numbers(inputs) + ->E.R.bind(r => E.A.length(r) === 0 ? Error("List is empty") : Ok(r)) + ->E.R.bind(fn), + (), + ) + } +} + +let library = [ + Function.make( + ~name="floor", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`floor(3.5)`], + ~definitions=[NumberToNumber.make("floor", Js.Math.floor_float)], + (), + ), + Function.make( + ~name="ceiling", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`ceil(3.5)`], + ~definitions=[NumberToNumber.make("ceil", Js.Math.ceil_float)], + (), + ), + Function.make( + ~name="absolute value", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`abs(3.5)`], + ~definitions=[NumberToNumber.make("abs", Js.Math.abs_float)], + (), + ), + Function.make( + ~name="exponent", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`exp(3.5)`], + ~definitions=[NumberToNumber.make("exp", Js.Math.exp)], + (), + ), + Function.make( + ~name="log", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`log(3.5)`], + ~definitions=[NumberToNumber.make("log", Js.Math.log)], + (), + ), + Function.make( + ~name="log base 10", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`log10(3.5)`], + ~definitions=[NumberToNumber.make("log10", Js.Math.log10)], + (), + ), + Function.make( + ~name="log base 2", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`log2(3.5)`], + ~definitions=[NumberToNumber.make("log2", Js.Math.log2)], + (), + ), + Function.make( + ~name="round", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`round(3.5)`], + ~definitions=[NumberToNumber.make("round", Js.Math.round)], + (), + ), + Function.make( + ~name="sum", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`sum([3,5,2])`], + ~definitions=[ArrayNumberDist.make("sum", r => r->E.A.Floats.sum->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="product", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`product([3,5,2])`], + ~definitions=[ + ArrayNumberDist.make("product", r => r->E.A.Floats.product->Wrappers.evNumber->Ok), + ], + (), + ), + Function.make( + ~name="min", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`min([3,5,2])`], + ~definitions=[ArrayNumberDist.make("min", r => r->E.A.Floats.min->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="max", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`max([3,5,2])`], + ~definitions=[ArrayNumberDist.make("max", r => r->E.A.Floats.max->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="mean", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`mean([3,5,2])`], + ~definitions=[ArrayNumberDist.make("mean", r => r->E.A.Floats.mean->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="geometric mean", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`geomean([3,5,2])`], + ~definitions=[ + ArrayNumberDist.make("geomean", r => r->E.A.Floats.geomean->Wrappers.evNumber->Ok), + ], + (), + ), + Function.make( + ~name="standard deviation", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`stdev([3,5,2,3,5])`], + ~definitions=[ArrayNumberDist.make("stdev", r => r->E.A.Floats.stdev->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="variance", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`variance([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("variance", r => r->E.A.Floats.variance->Wrappers.evNumber->Ok), + ], + (), + ), + Function.make( + ~name="sort", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`sort([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("sort", r => + r->E.A.Floats.sort->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + ), + ], + (), + ), + Function.make( + ~name="cumulative sum", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`cumsum([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("cumsum", r => + r->E.A.Floats.cumSum->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + ), + ], + (), + ), + Function.make( + ~name="cumulative prod", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`cumprod([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("cumprod", r => + r->E.A.Floats.cumProd->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + ), + ], + (), + ), + Function.make( + ~name="diff", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`diff([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("diff", r => + r->E.A.Floats.diff->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res new file mode 100644 index 00000000..dc4daead --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res @@ -0,0 +1,73 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "Pointset" +let requiresNamespace = true + +let inputsTodist = (inputs: array, makeDist) => { + let array = inputs->getOrError(0)->E.R.bind(Prepare.ToValueArray.Array.openA) + let xyCoords = + array->E.R.bind(xyCoords => + xyCoords + ->E.A2.fmap(xyCoord => + [xyCoord]->Prepare.ToValueArray.Record.twoArgs->E.R.bind(Prepare.ToValueTuple.twoNumbers) + ) + ->E.A.R.firstErrorOrOpen + ) + let expressionValue = + xyCoords + ->E.R.bind(r => r->XYShape.T.makeFromZipped->E.R2.errMap(XYShape.Error.toString)) + ->E.R2.fmap(r => ReducerInterface_InternalExpressionValue.IEvDistribution( + PointSet(makeDist(r)), + )) + expressionValue +} + +let library = [ + Function.make( + ~name="makeContinuous", + ~nameSpace, + ~requiresNamespace, + ~examples=[ + `Pointset.makeContinuous([ + {x: 0, y: 0.2}, + {x: 1, y: 0.7}, + {x: 2, y: 0.8}, + {x: 3, y: 0.2} + ])`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="makeContinuous", + ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], + ~run=(_, inputs, _) => inputsTodist(inputs, r => Continuous(Continuous.make(r))), + (), + ), + ], + (), + ), + Function.make( + ~name="makeDiscrete", + ~nameSpace, + ~requiresNamespace, + ~examples=[ + `Pointset.makeDiscrete([ + {x: 0, y: 0.2}, + {x: 1, y: 0.7}, + {x: 2, y: 0.8}, + {x: 3, y: 0.2} + ])`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="makeDiscrete", + ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], + ~run=(_, inputs, _) => inputsTodist(inputs, r => Discrete(Discrete.make(r))), + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Scoring.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Scoring.res new file mode 100644 index 00000000..d8d5ddd0 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Scoring.res @@ -0,0 +1,89 @@ +open FunctionRegistry_Core + +let nameSpace = "Dist" +let requiresNamespace = true + +let runScoring = (estimate, answer, prior, env) => { + GenericDist.Score.logScore(~estimate, ~answer, ~prior, ~env) + ->E.R2.fmap(FunctionRegistry_Helpers.Wrappers.evNumber) + ->E.R2.errMap(DistributionTypes.Error.toString) +} + +let library = [ + Function.make( + ~name="logScore", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[ + "Dist.logScore({estimate: normal(5,2), answer: normal(5.2,1), prior: normal(5.5,3)})", + "Dist.logScore({estimate: normal(5,2), answer: normal(5.2,1)})", + "Dist.logScore({estimate: normal(5,2), answer: 4.5})", + ], + ~definitions=[ + FnDefinition.make( + ~name="logScore", + ~inputs=[ + FRTypeRecord([ + ("estimate", FRTypeDist), + ("answer", FRTypeDistOrNumber), + ("prior", FRTypeDist), + ]), + ], + ~run=(_, inputs, env) => { + switch FunctionRegistry_Helpers.Prepare.ToValueArray.Record.threeArgs(inputs) { + | Ok([FRValueDist(estimate), FRValueDistOrNumber(FRValueDist(d)), FRValueDist(prior)]) => + runScoring(estimate, Score_Dist(d), Some(prior), env) + | Ok([ + FRValueDist(estimate), + FRValueDistOrNumber(FRValueNumber(d)), + FRValueDist(prior), + ]) => + runScoring(estimate, Score_Scalar(d), Some(prior), env) + | Error(e) => Error(e) + | _ => Error(FunctionRegistry_Helpers.impossibleError) + } + }, + (), + ), + FnDefinition.make( + ~name="logScore", + ~inputs=[FRTypeRecord([("estimate", FRTypeDist), ("answer", FRTypeDistOrNumber)])], + ~run=(_, inputs, env) => { + switch FunctionRegistry_Helpers.Prepare.ToValueArray.Record.twoArgs(inputs) { + | Ok([FRValueDist(estimate), FRValueDistOrNumber(FRValueDist(d))]) => + runScoring(estimate, Score_Dist(d), None, env) + | Ok([FRValueDist(estimate), FRValueDistOrNumber(FRValueNumber(d))]) => + runScoring(estimate, Score_Scalar(d), None, env) + | Error(e) => Error(e) + | _ => Error(FunctionRegistry_Helpers.impossibleError) + } + }, + (), + ), + ], + (), + ), + Function.make( + ~name="klDivergence", + ~nameSpace, + ~output=EvtNumber, + ~requiresNamespace, + ~examples=["Dist.klDivergence(normal(5,2), normal(5,1.5))"], + ~definitions=[ + FnDefinition.make( + ~name="klDivergence", + ~inputs=[FRTypeDist, FRTypeDist], + ~run=(_, inputs, env) => { + switch inputs { + | [FRValueDist(estimate), FRValueDist(d)] => + runScoring(estimate, Score_Dist(d), None, env) + | _ => Error(FunctionRegistry_Helpers.impossibleError) + } + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Module/Reducer_Module.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Bindings/Reducer_Bindings.res similarity index 85% rename from packages/squiggle-lang/src/rescript/Reducer/Reducer_Module/Reducer_Module.res rename to packages/squiggle-lang/src/rescript/Reducer/Reducer_Bindings/Reducer_Bindings.res index 62f9d8c7..28175d7a 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Module/Reducer_Module.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Bindings/Reducer_Bindings.res @@ -1,3 +1,6 @@ +// Only Bindings as the global module is supported +// Other module operations such as import export will be prepreocessed jobs + module ExpressionT = Reducer_Expression_T module InternalExpressionValue = ReducerInterface_InternalExpressionValue open Reducer_ErrorValue @@ -75,10 +78,10 @@ let emptyBindings = emptyModule let fromTypeScriptBindings = ReducerInterface_InternalExpressionValue.nameSpaceFromTypeScriptBindings let toTypeScriptBindings = ReducerInterface_InternalExpressionValue.nameSpaceToTypeScriptBindings -let toExpressionValue = (nameSpace: t): internalExpressionValue => IEvModule(nameSpace) +let toExpressionValue = (nameSpace: t): internalExpressionValue => IEvBindings(nameSpace) let fromExpressionValue = (aValue: internalExpressionValue): t => switch aValue { - | IEvModule(nameSpace) => nameSpace + | IEvBindings(nameSpace) => nameSpace | _ => emptyModule } @@ -126,6 +129,17 @@ let functionNotFoundErrorFFIFn = (functionName: string): ExpressionT.ffiFn => { } } +let convertOptionToFfiFnReturningResult = ( + myFunctionName: string, + myFunction: ExpressionT.optionFfiFnReturningResult, +): ExpressionT.ffiFn => { + (args: array, environment) => { + myFunction(args, environment)->Belt.Option.getWithDefault( + functionNotFoundErrorFFIFn(myFunctionName)(args, environment), + ) + } +} + let convertOptionToFfiFn = ( myFunctionName: string, myFunction: ExpressionT.optionFfiFn, @@ -159,4 +173,15 @@ let defineFunction = (nameSpace: t, identifier: string, value: ExpressionT.optio nameSpace->define(identifier, convertOptionToFfiFn(identifier, value)->eLambdaFFIValue) } -let emptyStdLib: t = emptyModule->defineBool("stdlib", true) +let defineFunctionReturningResult = ( + nameSpace: t, + identifier: string, + value: ExpressionT.optionFfiFnReturningResult, +): t => { + nameSpace->define( + identifier, + convertOptionToFfiFnReturningResult(identifier, value)->eLambdaFFIValue, + ) +} + +let emptyStdLib: t = emptyModule->defineBool("_standardLibrary", true) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res index 484b0acb..0cefe5ee 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res @@ -3,15 +3,15 @@ module ExpressionT = Reducer_Expression_T module ExternalLibrary = ReducerInterface.ExternalLibrary module Lambda = Reducer_Expression_Lambda module MathJs = Reducer_MathJs -module Module = Reducer_Module +module Bindings = Reducer_Bindings module Result = Belt.Result module TypeBuilder = Reducer_Type_TypeBuilder open ReducerInterface_InternalExpressionValue open Reducer_ErrorValue /* - MathJs provides default implementations for builtins - This is where all the expected builtins like + = * / sin cos log ln etc are handled + MathJs provides default implementations for built-ins + This is where all the expected built-ins like + = * / sin cos log ln etc are handled DO NOT try to add external function mapping here! */ @@ -49,9 +49,9 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce } let moduleAtIndex = (nameSpace: nameSpace, sIndex) => - switch Module.get(nameSpace, sIndex) { + switch Bindings.get(nameSpace, sIndex) { | Some(value) => value->Ok - | None => RERecordPropertyNotFound("Module property not found", sIndex)->Error + | None => RERecordPropertyNotFound("Bindings property not found", sIndex)->Error } let recordAtIndex = (dict: Belt.Map.String.t, sIndex) => @@ -81,19 +81,19 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce } let doSetBindings = (bindings: nameSpace, symbol: string, value: internalExpressionValue) => { - Module.set(bindings, symbol, value)->IEvModule->Ok + Bindings.set(bindings, symbol, value)->IEvBindings->Ok } let doSetTypeAliasBindings = ( bindings: nameSpace, symbol: string, value: internalExpressionValue, - ) => Module.setTypeAlias(bindings, symbol, value)->IEvModule->Ok + ) => Bindings.setTypeAlias(bindings, symbol, value)->IEvBindings->Ok let doSetTypeOfBindings = (bindings: nameSpace, symbol: string, value: internalExpressionValue) => - Module.setTypeOf(bindings, symbol, value)->IEvModule->Ok + Bindings.setTypeOf(bindings, symbol, value)->IEvBindings->Ok - let doExportBindings = (bindings: nameSpace) => bindings->Module.toExpressionValue->Ok + let doExportBindings = (bindings: nameSpace) => bindings->Bindings.toExpressionValue->Ok let doKeepArray = (aValueArray, aLambdaValue) => { let rMappedList = aValueArray->Belt.Array.reduceReverse(Ok(list{}), (rAcc, elem) => @@ -149,6 +149,27 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce doLambdaCall(aLambdaValue, list{IEvNumber(a), IEvNumber(b), IEvNumber(c)}) SampleSetDist.map3(~fn, ~t1, ~t2, ~t3)->toType } + + let parseSampleSetArray = (arr: array): option< + array, + > => { + let parseSampleSet = (value: internalExpressionValue): option => + switch value { + | IEvDistribution(SampleSet(dist)) => Some(dist) + | _ => None + } + E.A.O.openIfAllSome(E.A.fmap(parseSampleSet, arr)) + } + + let mapN = (aValueArray: array, aLambdaValue) => { + switch parseSampleSetArray(aValueArray) { + | Some(t1) => + let fn = a => doLambdaCall(aLambdaValue, list{IEvArray(E.A.fmap(x => IEvNumber(x), a))}) + SampleSetDist.mapN(~fn, ~t1)->toType + | None => + Error(REFunctionNotFound(call->functionCallToCallSignature->functionCallSignatureToString)) + } + } } let doReduceArray = (aValueArray, initialValue, aLambdaValue) => { @@ -169,16 +190,16 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce switch call { | ("$_atIndex_$", [IEvArray(aValueArray), IEvNumber(fIndex)]) => arrayAtIndex(aValueArray, fIndex) - | ("$_atIndex_$", [IEvModule(dict), IEvString(sIndex)]) => moduleAtIndex(dict, sIndex) + | ("$_atIndex_$", [IEvBindings(dict), IEvString(sIndex)]) => moduleAtIndex(dict, sIndex) | ("$_atIndex_$", [IEvRecord(dict), IEvString(sIndex)]) => recordAtIndex(dict, sIndex) | ("$_constructArray_$", [IEvArray(aValueArray)]) => IEvArray(aValueArray)->Ok | ("$_constructRecord_$", [IEvArray(arrayOfPairs)]) => constructRecord(arrayOfPairs) - | ("$_exportBindings_$", [IEvModule(nameSpace)]) => doExportBindings(nameSpace) - | ("$_setBindings_$", [IEvModule(nameSpace), IEvSymbol(symbol), value]) => + | ("$_exportBindings_$", [IEvBindings(nameSpace)]) => doExportBindings(nameSpace) + | ("$_setBindings_$", [IEvBindings(nameSpace), IEvSymbol(symbol), value]) => doSetBindings(nameSpace, symbol, value) - | ("$_setTypeAliasBindings_$", [IEvModule(nameSpace), IEvTypeIdentifier(symbol), value]) => + | ("$_setTypeAliasBindings_$", [IEvBindings(nameSpace), IEvTypeIdentifier(symbol), value]) => doSetTypeAliasBindings(nameSpace, symbol, value) - | ("$_setTypeOfBindings_$", [IEvModule(nameSpace), IEvSymbol(symbol), value]) => + | ("$_setTypeOfBindings_$", [IEvBindings(nameSpace), IEvSymbol(symbol), value]) => doSetTypeOfBindings(nameSpace, symbol, value) | ("$_typeModifier_memberOf_$", [IEvTypeIdentifier(typeIdentifier), IEvArray(arr)]) => TypeBuilder.typeModifier_memberOf(IEvTypeIdentifier(typeIdentifier), IEvArray(arr)) @@ -198,7 +219,7 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce | ("$_typeFunction_$", [IEvArray(arr)]) => TypeBuilder.typeFunction(arr) | ("$_typeTuple_$", [IEvArray(elems)]) => TypeBuilder.typeTuple(elems) | ("$_typeArray_$", [elem]) => TypeBuilder.typeArray(elem) - | ("$_typeRecord_$", [IEvArray(arrayOfPairs)]) => TypeBuilder.typeRecord(arrayOfPairs) + | ("$_typeRecord_$", [IEvRecord(propertyMap)]) => TypeBuilder.typeRecord(propertyMap) | ("concat", [IEvArray(aValueArray), IEvArray(bValueArray)]) => doAddArray(aValueArray, bValueArray) | ("concat", [IEvString(aValueString), IEvString(bValueString)]) => @@ -230,6 +251,8 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce ], ) => SampleMap.map3(dist1, dist2, dist3, aLambdaValue) + | ("mapSamplesN", [IEvArray(aValueArray), IEvLambda(aLambdaValue)]) => + SampleMap.mapN(aValueArray, aLambdaValue) | ("reduce", [IEvArray(aValueArray), initialValue, IEvLambda(aLambdaValue)]) => doReduceArray(aValueArray, initialValue, aLambdaValue) | ("reduceReverse", [IEvArray(aValueArray), initialValue, IEvLambda(aLambdaValue)]) => @@ -246,7 +269,6 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce Error(REFunctionNotFound(call->functionCallToCallSignature->functionCallSignatureToString)) // Report full type signature as error } } - /* Reducer uses Result monad while reducing expressions */ @@ -255,11 +277,10 @@ let dispatch = (call: functionCall, environment, reducer: ExpressionT.reducerFn) errorValue, > => try { - let callInternalWithReducer = (call, environment) => callInternal(call, environment, reducer) let (fn, args) = call // There is a bug that prevents string match in patterns // So we have to recreate a copy of the string - ExternalLibrary.dispatch((Js.String.make(fn), args), environment, callInternalWithReducer) + ExternalLibrary.dispatch((Js.String.make(fn), args), environment, reducer, callInternal) } catch { | Js.Exn.Error(obj) => REJavaScriptExn(Js.Exn.message(obj), Js.Exn.name(obj))->Error | _ => RETodo("unhandled rescript exception")->Error diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res index e0e6902e..c4c76ce3 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res @@ -9,7 +9,7 @@ module ExpressionBuilder = Reducer_Expression_ExpressionBuilder module ExpressionT = Reducer_Expression_T module InternalExpressionValue = ReducerInterface_InternalExpressionValue module ExpressionWithContext = Reducer_ExpressionWithContext -module Module = Reducer_Module +module Bindings = Reducer_Bindings module Result = Belt.Result open Reducer_Expression_ExpressionBuilder @@ -28,7 +28,7 @@ let dispatchMacroCall = ( let rExternalBindingsValue = reduceExpression(bindingExpr, bindings, environment) rExternalBindingsValue->Result.flatMap(nameSpaceValue => { - let newBindings = Module.fromExpressionValue(nameSpaceValue) + let newBindings = Bindings.fromExpressionValue(nameSpaceValue) let rNewStatement = BindingsReplacer.replaceSymbols(newBindings, statement) rNewStatement->Result.map(boundStatement => @@ -144,7 +144,7 @@ let dispatchMacroCall = ( let ifTrueBlock = eBlock(list{ifTrue}) ExpressionWithContext.withContext(ifTrueBlock, bindings)->Ok } - | _ => REExpectedType("Boolean")->Error + | _ => REExpectedType("Boolean", "")->Error } ) } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_ErrorValue.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_ErrorValue.res index beaee7f7..211c9f53 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_ErrorValue.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_ErrorValue.res @@ -7,7 +7,7 @@ type errorValue = | REArrayIndexNotFound(string, int) | REAssignmentExpected | REDistributionError(DistributionTypes.error) - | REExpectedType(string) + | REExpectedType(string, string) | REExpressionExpected | REFunctionExpected(string) | REFunctionNotFound(string) @@ -55,6 +55,6 @@ let errorToString = err => | RESymbolNotFound(symbolName) => `${symbolName} is not defined` | RESyntaxError(desc, _) => `Syntax Error: ${desc}` | RETodo(msg) => `TODO: ${msg}` - | REExpectedType(typeName) => `Expected type: ${typeName}` + | REExpectedType(typeName, valueString) => `Expected type: ${typeName} but got: ${valueString}` | REUnitNotFound(unitName) => `Unit not found: ${unitName}` } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Exception.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Exception.res index d7ca335c..14db0843 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Exception.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Exception.res @@ -1,3 +1,3 @@ -// There are switch stament cases in the code which are impossible to reach by design. +// There are switch statement cases in the code which are impossible to reach by design. // ImpossibleException is a sign of programming error. -exception ImpossibleException +exception ImpossibleException(string) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res index 9df4ff28..6de4f74a 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res @@ -6,7 +6,7 @@ module InternalExpressionValue = ReducerInterface_InternalExpressionValue module Lambda = Reducer_Expression_Lambda module Macro = Reducer_Expression_Macro module MathJs = Reducer_MathJs -module Module = Reducer_Module +module Bindings = Reducer_Bindings module Result = Belt.Result module T = Reducer_Expression_T @@ -121,10 +121,10 @@ let evaluateUsingOptions = ( ReducerInterface_ExternalExpressionValue.defaultEnvironment, ) - let mergedBindings: InternalExpressionValue.nameSpace = Module.merge( + let mergedBindings: InternalExpressionValue.nameSpace = Bindings.merge( ReducerInterface_StdLib.internalStdLib, - Belt.Option.map(externalBindings, Module.fromTypeScriptBindings)->Belt.Option.getWithDefault( - Module.emptyModule, + Belt.Option.map(externalBindings, Bindings.fromTypeScriptBindings)->Belt.Option.getWithDefault( + Bindings.emptyModule, ), ) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_ExpressionWithContext.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_ExpressionWithContext.res index 7ab1ba05..44059e2b 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_ExpressionWithContext.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_ExpressionWithContext.res @@ -3,7 +3,7 @@ module ErrorValue = Reducer_ErrorValue module ExpressionT = Reducer_Expression_T module InternalExpressionValue = ReducerInterface_InternalExpressionValue module Result = Belt.Result -module Module = Reducer_Module +module Bindings = Reducer_Bindings type bindings = ExpressionT.bindings type context = bindings @@ -41,7 +41,7 @@ let toString = expressionWithContext => | ExpressionNoContext(expr) => ExpressionT.toString(expr) | ExpressionWithContext(expr, context) => `${ExpressionT.toString(expr)} context: ${context - ->Module.toExpressionValue + ->Bindings.toExpressionValue ->InternalExpressionValue.toString}` } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_BindingsReplacer.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_BindingsReplacer.res index 6e1ef774..15ecfe58 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_BindingsReplacer.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_BindingsReplacer.res @@ -2,7 +2,7 @@ module ErrorValue = Reducer_ErrorValue module ExpressionT = Reducer_Expression_T module InternalExpressionValue = ReducerInterface_InternalExpressionValue module Result = Belt.Result -module Module = Reducer_Module +module Bindings = Reducer_Bindings type errorValue = Reducer_ErrorValue.errorValue type expression = ExpressionT.expression @@ -42,8 +42,8 @@ and replaceSymbolsOnExpressionList = (bindings, list) => { } and replaceSymbolOnValue = (bindings, evValue: internalExpressionValue) => switch evValue { - | IEvSymbol(symbol) => Module.getWithDefault(bindings, symbol, evValue)->Ok - | IEvCall(symbol) => Module.getWithDefault(bindings, symbol, evValue)->checkIfCallable + | IEvSymbol(symbol) => Bindings.getWithDefault(bindings, symbol, evValue)->Ok + | IEvCall(symbol) => Bindings.getWithDefault(bindings, symbol, evValue)->checkIfCallable | _ => evValue->Ok } and checkIfCallable = (evValue: internalExpressionValue) => diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_ExpressionBuilder.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_ExpressionBuilder.res index 590cc99f..14ffe685 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_ExpressionBuilder.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_ExpressionBuilder.res @@ -2,7 +2,7 @@ module BBindingsReplacer = Reducer_Expression_BindingsReplacer module BErrorValue = Reducer_ErrorValue module BExpressionT = Reducer_Expression_T module BInternalExpressionValue = ReducerInterface_InternalExpressionValue -module BModule = Reducer_Module +module BBindings = Reducer_Bindings type errorValue = BErrorValue.errorValue type expression = BExpressionT.expression @@ -15,7 +15,7 @@ let eArray = anArray => anArray->BInternalExpressionValue.IEvArray->BExpressionT let eArrayString = anArray => anArray->BInternalExpressionValue.IEvArrayString->BExpressionT.EValue let eBindings = (anArray: array<(string, BInternalExpressionValue.t)>) => - anArray->BModule.fromArray->BModule.toExpressionValue->BExpressionT.EValue + anArray->BBindings.fromArray->BBindings.toExpressionValue->BExpressionT.EValue let eBool = aBool => aBool->BInternalExpressionValue.IEvBool->BExpressionT.EValue @@ -35,12 +35,12 @@ let eLambda = ( BInternalExpressionValue.IEvLambda({ parameters: parameters, context: context, - body: NotFFI(expr)->BModule.castExpressionToInternalCode, + body: NotFFI(expr)->BBindings.castExpressionToInternalCode, })->BExpressionT.EValue } let eLambdaFFI = (ffiFn: ffiFn) => { - ffiFn->BModule.eLambdaFFIValue->BExpressionT.EValue + ffiFn->BBindings.eLambdaFFIValue->BExpressionT.EValue } let eNumber = aNumber => aNumber->BInternalExpressionValue.IEvNumber->BExpressionT.EValue @@ -57,7 +57,7 @@ let eList = (list: list): expression => list->BExpressionT.EList let eBlock = (exprs: list): expression => eFunction("$$_block_$$", exprs) let eModule = (nameSpace: BInternalExpressionValue.nameSpace): expression => - nameSpace->BInternalExpressionValue.IEvModule->BExpressionT.EValue + nameSpace->BInternalExpressionValue.IEvBindings->BExpressionT.EValue let eLetStatement = (symbol: string, valueExpression: expression): expression => eFunction("$_let_$", list{eSymbol(symbol), valueExpression}) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Lambda.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Lambda.res index fabae269..59779484 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Lambda.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Lambda.res @@ -3,7 +3,7 @@ module ErrorValue = Reducer_ErrorValue module ExpressionBuilder = Reducer_Expression_ExpressionBuilder module ExpressionT = Reducer_Expression_T module ExpressionValue = ReducerInterface_InternalExpressionValue -module Module = Reducer_Module +module Bindings = Reducer_Bindings module Result = Belt.Result type environment = ReducerInterface_InternalExpressionValue.environment @@ -50,7 +50,7 @@ let caseNotFFI = (lambdaValue: ExpressionValue.lambdaValue, expr, args, environm let bindings = Belt.List.reduce(zippedParameterList, lambdaValue.context, ( acc, (variable, variableValue), - ) => acc->Module.set(variable, variableValue)) + ) => acc->Bindings.set(variable, variableValue)) let newExpression = ExpressionBuilder.eBlock(list{expr}) reducer(newExpression, bindings, environment) } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res index dee70c88..c9739be3 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res @@ -30,12 +30,12 @@ let rec toString = expression => switch expression { | EList(list{EValue(IEvCall("$$_block_$$")), ...statements}) => `{${Belt.List.map(statements, aValue => toString(aValue)) - ->Extra.List.interperse("; ") + ->Extra.List.intersperse("; ") ->Belt.List.toArray ->Js.String.concatMany("")}}` | EList(aList) => `(${Belt.List.map(aList, aValue => toString(aValue)) - ->Extra.List.interperse(" ") + ->Extra.List.intersperse(" ") ->Belt.List.toArray ->Js.String.concatMany("")})` | EValue(aValue) => InternalExpressionValue.toString(aValue) @@ -72,6 +72,10 @@ type ffiFn = ( ) => result type optionFfiFn = (array, environment) => option +type optionFfiFnReturningResult = ( + array, + environment, +) => option> type expressionOrFFI = | NotFFI(expression) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_Array.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_Array.res index 58dd4ffd..8c9f2fbb 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_Array.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_Array.res @@ -3,5 +3,5 @@ */ module ExtraList = Reducer_Extra_List -let interperse = (anArray, seperator) => - anArray->Belt.List.fromArray->ExtraList.interperse(seperator)->Belt.List.toArray +let intersperse = (anArray, seperator) => + anArray->Belt.List.fromArray->ExtraList.intersperse(seperator)->Belt.List.toArray diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_List.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_List.res index 9b3bcc3d..b723cca4 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_List.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_List.res @@ -1,9 +1,9 @@ /* Insert seperator between the elements of a list */ -let rec interperse = (aList, seperator) => +let rec intersperse = (aList, seperator) => switch aList { | list{} => list{} | list{a} => list{a} - | list{a, ...rest} => list{a, seperator, ...interperse(rest, seperator)} + | list{a, ...rest} => list{a, seperator, ...intersperse(rest, seperator)} } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Module/Reducer_Module_Lambda.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Module/Reducer_Module_Lambda.res deleted file mode 100644 index 922b5c6e..00000000 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Module/Reducer_Module_Lambda.res +++ /dev/null @@ -1,14 +0,0 @@ -module ExpressionBuilder = Reducer_Expression_ExpressionBuilder -module ExpressionT = Reducer_Expression_T - -type expression = ExpressionT.expression - -let defaultCaseFFI = (functionName: string): expression => { - ExpressionBuilder.eLambdaFFI(Reducer_Module.functionNotFoundErrorFFIFn(functionName)) -} - -let addGuard = ( - guard: expression, - expression: expression, - previousExpression: expression, -): expression => ExpressionBuilder.eTernary(guard, expression, previousExpression) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy index e2b5234e..f4acd4a3 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy @@ -187,13 +187,16 @@ basicLiteral / dollarIdentifier dollarIdentifierWithModule 'identifier' - = head:moduleIdentifier + = head:$moduleIdentifier tail:('.' _nl @$moduleIdentifier)* '.' _nl final:$dollarIdentifier - { tail.push(final); - return tail.reduce(function(result, element) { - return h.makeFunctionCall(h.postOperatorToFunction['[]'], [result, h.nodeString(element)]) - }, head)} + { + let modifiers = [...tail] + modifiers.unshift(head) + modifiers.push(final) + let modifiedIdentifier = modifiers.join('.') + return h.nodeIdentifier(modifiedIdentifier) + } identifier 'identifier' = ([_a-z]+[_a-z0-9]i*) {return h.nodeIdentifier(text(), location())} diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_Parse.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_Parse.res index 67873c61..a38c66e9 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_Parse.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_Parse.res @@ -91,7 +91,7 @@ let rec pgToString = (peggyNode: peggyNode): string => { args->Js.Array2.map(arg => PgNodeIdentifier(arg)->pgToString)->Js.Array2.toString let nodesToStringUsingSeparator = (nodes: array, separator: string): string => - nodes->Js.Array2.map(toString)->Extra.Array.interperse(separator)->Js.String.concatMany("") + nodes->Js.Array2.map(toString)->Extra.Array.intersperse(separator)->Js.String.concatMany("") switch peggyNode { | PgNodeBlock(node) => "{" ++ node["statements"]->nodesToStringUsingSeparator("; ") ++ "}" diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Compile.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Compile.res new file mode 100644 index 00000000..2119ee62 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Compile.res @@ -0,0 +1,40 @@ +module ErrorValue = Reducer_ErrorValue +module ExpressionT = Reducer_Expression_T +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings +module T = Reducer_Type_T + +let ievFromTypeExpression = ( + typeExpressionSourceCode: string, + reducerFn: ExpressionT.reducerFn, +): result => { + let sIndex = "compiled" + let sourceCode = `type ${sIndex}=${typeExpressionSourceCode}` + Reducer_Expression.parse(sourceCode)->Belt.Result.flatMap(expr => { + let rContext = reducerFn( + expr, + Bindings.emptyBindings, + InternalExpressionValue.defaultEnvironment, + ) + Belt.Result.map(rContext, context => + switch context { + | IEvBindings(nameSpace) => + switch Bindings.getType(nameSpace, sIndex) { + | Some(value) => value + | None => raise(Reducer_Exception.ImpossibleException("Reducer_Type_Compile-none")) + } + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_Compile-raise")) + } + ) + }) +} + +let fromTypeExpression = ( + typeExpressionSourceCode: string, + reducerFn: ExpressionT.reducerFn, +): result => { + ievFromTypeExpression( + (typeExpressionSourceCode: string), + (reducerFn: ExpressionT.reducerFn), + )->Belt.Result.map(T.fromIEvValue) +} diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Contracts.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Contracts.res new file mode 100644 index 00000000..7b68f178 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Contracts.res @@ -0,0 +1,53 @@ +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module T = Reducer_Type_T + +let isMin = (modifierArg: InternalExpressionValue.t, aValue: InternalExpressionValue.t): bool => { + let pair = (modifierArg, aValue) + switch pair { + | (IEvNumber(a), IEvNumber(b)) => a <= b + | _ => false + } +} + +let isMax = (modifierArg: InternalExpressionValue.t, aValue: InternalExpressionValue.t): bool => { + let pair = (modifierArg, aValue) + switch pair { + | (IEvNumber(a), IEvNumber(b)) => a >= b + | _ => false + } +} + +let isMemberOf = ( + modifierArg: InternalExpressionValue.t, + aValue: InternalExpressionValue.t, +): bool => { + let pair = (modifierArg, aValue) + switch pair { + | (ievA, IEvArray(b)) => Js.Array2.includes(b, ievA) + | _ => false + } +} + +let checkModifier = ( + key: string, + modifierArg: InternalExpressionValue.t, + aValue: InternalExpressionValue.t, +): bool => + switch key { + | "min" => isMin(modifierArg, aValue) + | "max" => isMax(modifierArg, aValue) + | "isMemberOf" => isMemberOf(modifierArg, aValue) + | _ => false + } + +let checkModifiers = ( + contracts: Belt.Map.String.t, + aValue: InternalExpressionValue.t, +): bool => { + contracts->Belt.Map.String.reduce(true, (acc, key, modifierArg) => + switch acc { + | true => checkModifier(key, modifierArg, aValue) + | _ => acc + } + ) +} diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_T.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_T.res index 9b847ca7..511fe815 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_T.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_T.res @@ -3,13 +3,42 @@ open InternalExpressionValue type rec iType = | ItTypeIdentifier(string) - | ItModifiedType({modifiedType: iType}) + | ItModifiedType({modifiedType: iType, contracts: Belt.Map.String.t}) | ItTypeOr({typeOr: array}) | ItTypeFunction({inputs: array, output: iType}) | ItTypeArray({element: iType}) | ItTypeTuple({elements: array}) | ItTypeRecord({properties: Belt.Map.String.t}) +type t = iType +type typeErrorValue = TypeMismatch(t, InternalExpressionValue.t) + +let rec toString = (t: t): string => { + switch t { + | ItTypeIdentifier(s) => s + | ItModifiedType({modifiedType, contracts}) => + `${toString(modifiedType)}${contracts->Belt.Map.String.reduce("", (acc, k, v) => + Js.String2.concatMany(acc, ["<-", k, "(", InternalExpressionValue.toString(v), ")"]) + )}` + | ItTypeOr({typeOr}) => `(${Js.Array2.map(typeOr, toString)->Js.Array2.joinWith(" | ")})` + | ItTypeFunction({inputs, output}) => + `(${inputs->Js.Array2.map(toString)->Js.Array2.joinWith(" => ")} => ${toString(output)})` + | ItTypeArray({element}) => `[${toString(element)}]` + | ItTypeTuple({elements}) => `[${Js.Array2.map(elements, toString)->Js.Array2.joinWith(", ")}]` + | ItTypeRecord({properties}) => + `{${properties + ->Belt.Map.String.toArray + ->Js.Array2.map(((k, v)) => Js.String2.concatMany(k, [": ", toString(v)])) + ->Js.Array2.joinWith(", ")}}` + } +} + +let toStringResult = (rt: result) => + switch rt { + | Ok(t) => toString(t) + | Error(e) => ErrorValue.errorToString(e) + } + let rec fromTypeMap = typeMap => { let default = IEvString("") let evTypeTag: InternalExpressionValue.t = Belt.Map.String.getWithDefault( @@ -52,31 +81,39 @@ let rec fromTypeMap = typeMap => { "properties", default, ) - //TODO: map type modifiers - switch evTypeTag { - | IEvString("typeIdentifier") => ItModifiedType({modifiedType: fromIEvValue(evTypeIdentifier)}) + + let contracts = + typeMap->Belt.Map.String.keep((k, _v) => ["min", "max", "memberOf"]->Js.Array2.includes(k)) + + let makeIt = switch evTypeTag { + | IEvString("typeIdentifier") => fromIEvValue(evTypeIdentifier) | IEvString("typeOr") => ItTypeOr({typeOr: fromIEvArray(evTypeOr)}) | IEvString("typeFunction") => ItTypeFunction({inputs: fromIEvArray(evInputs), output: fromIEvValue(evOutput)}) | IEvString("typeArray") => ItTypeArray({element: fromIEvValue(evElement)}) | IEvString("typeTuple") => ItTypeTuple({elements: fromIEvArray(evElements)}) | IEvString("typeRecord") => ItTypeRecord({properties: fromIEvRecord(evProperties)}) - | _ => raise(Reducer_Exception.ImpossibleException) + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_T-evTypeTag")) } + + Belt.Map.String.isEmpty(contracts) + ? makeIt + : ItModifiedType({modifiedType: makeIt, contracts: contracts}) } -and fromIEvValue = (ievValue: InternalExpressionValue.t) => + +and fromIEvValue = (ievValue: InternalExpressionValue.t): iType => switch ievValue { | IEvTypeIdentifier(typeIdentifier) => ItTypeIdentifier({typeIdentifier}) | IEvType(typeMap) => fromTypeMap(typeMap) - | _ => raise(Reducer_Exception.ImpossibleException) + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_T-ievValue")) } and fromIEvArray = (ievArray: InternalExpressionValue.t) => switch ievArray { | IEvArray(array) => array->Belt.Array.map(fromIEvValue) - | _ => raise(Reducer_Exception.ImpossibleException) + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_T-ievArray")) } and fromIEvRecord = (ievRecord: InternalExpressionValue.t) => switch ievRecord { | IEvRecord(record) => record->Belt.Map.String.map(fromIEvValue) - | _ => raise(Reducer_Exception.ImpossibleException) + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_T-ievRecord")) } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeBuilder.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeBuilder.res index e51f901a..d3906a38 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeBuilder.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeBuilder.res @@ -56,7 +56,7 @@ let typeFunction = anArray => { let typeArray = element => { let newRecord = Belt.Map.String.fromArray([ - ("typeTag", IEvString("typeTuple")), + ("typeTag", IEvString("typeArray")), ("element", element), ]) newRecord->IEvType->Ok @@ -64,22 +64,14 @@ let typeArray = element => { let typeTuple = anArray => { let newRecord = Belt.Map.String.fromArray([ - ("typeTag", IEvString("typeArray")), + ("typeTag", IEvString("typeTuple")), ("elements", IEvArray(anArray)), ]) newRecord->IEvType->Ok } -let typeRecord = arrayOfPairs => { - let newProperties = - Belt.Array.map(arrayOfPairs, pairValue => - switch pairValue { - | IEvArray([IEvString(key), valueValue]) => (key, valueValue) - | _ => ("wrong key type", pairValue->toStringWithType->IEvString) - } - ) - ->Belt.Map.String.fromArray - ->IEvRecord +let typeRecord = propertyMap => { + let newProperties = propertyMap->IEvRecord let newRecord = Belt.Map.String.fromArray([ ("typeTag", IEvString("typeRecord")), ("properties", newProperties), diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeChecker.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeChecker.res index 18cb804a..e4336df5 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeChecker.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeChecker.res @@ -1,81 +1,168 @@ module ExpressionT = Reducer_Expression_T module InternalExpressionValue = ReducerInterface_InternalExpressionValue module T = Reducer_Type_T -module TypeBuilder = Reducer_Type_TypeBuilder +module TypeContracts = Reducer_Type_Contracts open InternalExpressionValue -type typeErrorValue = - | TypeError(T.iType, InternalExpressionValue.t) - | TypeErrorWithPosition(T.iType, InternalExpressionValue.t, int) - | TypeErrorWithProperty(T.iType, InternalExpressionValue.t, string) - -let rec isOfResolvedIType = (anIType: T.iType, aValue): result => { +let rec isITypeOf = (anIType: T.iType, aValue): result => { let caseTypeIdentifier = (anUpperTypeName, aValue) => { let aTypeName = anUpperTypeName->Js.String2.toLowerCase let valueTypeName = aValue->valueToValueType->valueTypeToString->Js.String2.toLowerCase - switch aTypeName === valueTypeName { + switch aTypeName == valueTypeName { | true => Ok(true) - | false => TypeError(anIType, aValue)->Error + | false => T.TypeMismatch(anIType, aValue)->Error } } - let _caseRecord = (anIType, evValue, propertyMap, map) => { - Belt.Map.String.reduce(propertyMap, Ok(true), (acc, property, propertyType) => { + let caseRecord = (anIType, propertyMap: Belt.Map.String.t, evValue) => + switch evValue { + | IEvRecord(aRecord) => + if ( + Js.Array2.length(propertyMap->Belt.Map.String.keysToArray) == + Js.Array2.length(aRecord->Belt.Map.String.keysToArray) + ) { + Belt.Map.String.reduce(propertyMap, Ok(true), (acc, property, propertyType) => { + Belt.Result.flatMap(acc, _ => + switch Belt.Map.String.get(aRecord, property) { + | Some(propertyValue) => isITypeOf(propertyType, propertyValue) + | None => T.TypeMismatch(anIType, evValue)->Error + } + ) + }) + } else { + T.TypeMismatch(anIType, evValue)->Error + } + + | _ => T.TypeMismatch(anIType, evValue)->Error + } + + let caseArray = (anIType, elementType, evValue) => + switch evValue { + | IEvArray(anArray) => + Belt.Array.reduce(anArray, Ok(true), (acc, element) => + Belt.Result.flatMap(acc, _ => + switch isITypeOf(elementType, element) { + | Ok(_) => Ok(true) + | Error(error) => error->Error + } + ) + ) + | _ => T.TypeMismatch(anIType, evValue)->Error + } + + let caseTuple = (anIType, elementTypes, evValue) => + switch evValue { + | IEvArray(anArray) => + if Js.Array2.length(elementTypes) == Js.Array2.length(anArray) { + let zipped = Belt.Array.zip(elementTypes, anArray) + Belt.Array.reduce(zipped, Ok(true), (acc, (elementType, element)) => + switch acc { + | Ok(_) => + switch isITypeOf(elementType, element) { + | Ok(_) => acc + | Error(error) => Error(error) + } + | _ => acc + } + ) + } else { + T.TypeMismatch(anIType, evValue)->Error + } + | _ => T.TypeMismatch(anIType, evValue)->Error + } + + let caseOr = (anIType, anITypeArray, evValue) => + switch Belt.Array.reduce(anITypeArray, Ok(false), (acc, anIType) => Belt.Result.flatMap(acc, _ => - switch Belt.Map.String.get(map, property) { - | Some(propertyValue) => isOfResolvedIType(propertyType, propertyValue) - | None => TypeErrorWithProperty(anIType, evValue, property)->Error + switch acc { + | Ok(false) => + switch isITypeOf(anIType, evValue) { + | Ok(_) => Ok(true) + | Error(_) => acc + } + | _ => acc } ) - }) - } - let _caseArray = (anIType, evValue, elementType, anArray) => { - Belt.Array.reduceWithIndex(anArray, Ok(true), (acc, element, index) => { - switch isOfResolvedIType(elementType, element) { - | Ok(_) => acc - | Error(_) => TypeErrorWithPosition(anIType, evValue, index)->Error + ) { + | Ok(true) => Ok(true) + | Ok(false) => T.TypeMismatch(anIType, evValue)->Error + | Error(error) => Error(error) + } + + let caseModifiedType = ( + anIType: T.iType, + modifiedType: T.iType, + contracts: Belt.Map.String.t, + aValue: InternalExpressionValue.t, + ) => { + isITypeOf(modifiedType, aValue)->Belt.Result.flatMap(_result => { + if TypeContracts.checkModifiers(contracts, aValue) { + Ok(true) + } else { + T.TypeMismatch(anIType, aValue)->Error } }) } switch anIType { | ItTypeIdentifier(name) => caseTypeIdentifier(name, aValue) - // TODO: Work in progress. Code is commented to make an a release of other features - // | ItModifiedType({modifiedType: anIType}) => raise(Reducer_Exception.ImpossibleException) - // | ItTypeOr({typeOr: anITypeArray}) => raise(Reducer_Exception.ImpossibleException) - // | ItTypeFunction({inputs: anITypeArray, output: anIType}) => - // raise(Reducer_Exception.ImpossibleException) - // | ItTypeArray({element: anIType}) => raise(Reducer_Exception.ImpossibleException) - // | ItTypeTuple({elements: anITypeArray}) => raise(Reducer_Exception.ImpossibleException) - // | ItTypeRecord({properties: anITypeMap}) => raise(Reducer_Exception.ImpossibleException) - | _ => raise(Reducer_Exception.ImpossibleException) + | ItModifiedType({modifiedType, contracts}) => + caseModifiedType(anIType, modifiedType, contracts, aValue) //{modifiedType: iType, contracts: Belt.Map.String.t} + | ItTypeOr({typeOr}) => caseOr(anIType, typeOr, aValue) + | ItTypeFunction(_) => + raise( + Reducer_Exception.ImpossibleException( + "Reducer_TypeChecker-functions are without a type at the moment", + ), + ) + | ItTypeArray({element}) => caseArray(anIType, element, aValue) + | ItTypeTuple({elements}) => caseTuple(anIType, elements, aValue) + | ItTypeRecord({properties}) => caseRecord(anIType, properties, aValue) } } -let isOfResolvedType = (aType: InternalExpressionValue.t, aValue): result => - aType->T.fromIEvValue->isOfResolvedIType(aValue) +let isTypeOf = ( + typeExpressionSourceCode: string, + aValue: InternalExpressionValue.t, + reducerFn: ExpressionT.reducerFn, +): result => { + switch typeExpressionSourceCode->Reducer_Type_Compile.fromTypeExpression(reducerFn) { + | Ok(anIType) => + switch isITypeOf(anIType, aValue) { + | Ok(_) => Ok(aValue) + | Error(T.TypeMismatch(anIType, evValue)) => + Error( + ErrorValue.REExpectedType(anIType->T.toString, evValue->InternalExpressionValue.toString), + ) + } + | Error(error) => Error(error) // Directly propagating - err => err - causes type mismatch + } +} -// TODO: Work in progress. Code is commented to make an a release of other features -// let checkArguments = ( -// evFunctionType: InternalExpressionValue.t, -// args: array, -// ) => { -// let functionType = switch evFunctionType { -// | IEvRecord(functionType) => functionType -// | _ => raise(Reducer_Exception.ImpossibleException) -// } -// let evInputs = functionType->Belt.Map.String.getWithDefault("inputs", []->IEvArray) -// let inputs = switch evInputs { -// | IEvArray(inputs) => inputs -// | _ => raise(Reducer_Exception.ImpossibleException) -// } -// let rTupleType = TypeBuilder.typeTuple(inputs) -// Belt.Result.flatMap(rTupleType, tuppleType => isOfResolvedType(tuppleType, args->IEvArray)) -// } +let checkITypeArguments = (anIType: T.iType, args: array): result< + bool, + T.typeErrorValue, +> => { + switch anIType { + | T.ItTypeFunction({inputs}) => isITypeOf(T.ItTypeTuple({elements: inputs}), args->IEvArray) + | _ => T.TypeMismatch(anIType, args->IEvArray)->Error + } +} -// let compileTypeExpression = (typeExpression: string, bindings: ExpressionT.bindings, reducerFn: ExpressionT.reducerFn) => { -// statement = `type compiled=${typeExpression}` - -// } - -//TODO: asGuard +let checkArguments = ( + typeExpressionSourceCode: string, + args: array, + reducerFn: ExpressionT.reducerFn, +): result => { + switch typeExpressionSourceCode->Reducer_Type_Compile.fromTypeExpression(reducerFn) { + | Ok(anIType) => + switch checkITypeArguments(anIType, args) { + | Ok(_) => Ok(args->IEvArray) + | Error(T.TypeMismatch(anIType, evValue)) => + Error( + ErrorValue.REExpectedType(anIType->T.toString, evValue->InternalExpressionValue.toString), + ) + } + | Error(error) => Error(error) // Directly propagating - err => err - causes type mismatch + } +} diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Date.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Date.res index e84c26f4..3396d0f3 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Date.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Date.res @@ -1,7 +1,7 @@ module IEV = ReducerInterface_InternalExpressionValue type internalExpressionValue = IEV.t -let dispatch = (call: IEV.functionCall, _: DistributionOperation.env): option< +let dispatch = (call: IEV.functionCall, _: GenericDist.env): option< result, > => { switch call { diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Duration.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Duration.res index 838e4375..f9e06de4 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Duration.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Duration.res @@ -1,7 +1,7 @@ module IEV = ReducerInterface_InternalExpressionValue type internalExpressionValue = IEV.t -let dispatch = (call: IEV.functionCall, _: DistributionOperation.env): option< +let dispatch = (call: IEV.functionCall, _: GenericDist.env): option< result, > => { switch call { diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalExpressionValue.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalExpressionValue.res index 9bd356d4..b21ba3c6 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalExpressionValue.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalExpressionValue.res @@ -86,7 +86,7 @@ let toStringResult = x => } @genType -type environment = DistributionOperation.env +type environment = GenericDist.env @genType let defaultEnvironment: environment = DistributionOperation.defaultEnv diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res index 3e6172c9..d6a14dea 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res @@ -1,29 +1,10 @@ module InternalExpressionValue = ReducerInterface_InternalExpressionValue - type internalExpressionValue = InternalExpressionValue.t -// module Sample = { -// // In real life real libraries should be somewhere else -// /* -// For an example of mapping polymorphic custom functions. To be deleted after real integration -// */ -// let customAdd = (a: float, b: float): float => {a +. b} -// } - /* Map external calls of Reducer */ - -// I expect that it's important to build this first, so it doesn't get recalculated for each tryRegistry() call. -let registry = FunctionRegistry_Library.registry - -let tryRegistry = ((fnName, args): InternalExpressionValue.functionCall, env) => { - FunctionRegistry_Core.Registry.matchAndRun(~registry, ~fnName, ~args, ~env)->E.O2.fmap( - E.R2.errMap(_, s => Reducer_ErrorValue.RETodo(s)), - ) -} - -let dispatch = (call: InternalExpressionValue.functionCall, environment, chain): result< +let dispatch = (call: InternalExpressionValue.functionCall, environment, reducer, chain): result< internalExpressionValue, 'e, > => { @@ -32,9 +13,10 @@ let dispatch = (call: InternalExpressionValue.functionCall, environment, chain): () => ReducerInterface_Date.dispatch(call, environment), () => ReducerInterface_Duration.dispatch(call, environment), () => ReducerInterface_Number.dispatch(call, environment), - () => tryRegistry(call, environment), - ])->E.O2.default(chain(call, environment)) + () => FunctionRegistry_Library.dispatch(call, environment), + ])->E.O2.default(chain(call, environment, reducer)) } + /* If your dispatch is too big you can divide it into smaller dispatches and pass the call so that it gets called finally. diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res index 6ca0a440..a65edf2f 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res @@ -32,50 +32,38 @@ module Helpers = { let toFloatFn = ( fnCall: DistributionTypes.DistributionOperation.toFloat, dist: DistributionTypes.genericDist, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { - FromDist(DistributionTypes.DistributionOperation.ToFloat(fnCall), dist) - ->DistributionOperation.run(~env) - ->Some + FromDist(#ToFloat(fnCall), dist)->DistributionOperation.run(~env)->Some } let toStringFn = ( fnCall: DistributionTypes.DistributionOperation.toString, dist: DistributionTypes.genericDist, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { - FromDist(DistributionTypes.DistributionOperation.ToString(fnCall), dist) - ->DistributionOperation.run(~env) - ->Some + FromDist(#ToString(fnCall), dist)->DistributionOperation.run(~env)->Some } let toBoolFn = ( fnCall: DistributionTypes.DistributionOperation.toBool, dist: DistributionTypes.genericDist, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { - FromDist(DistributionTypes.DistributionOperation.ToBool(fnCall), dist) - ->DistributionOperation.run(~env) - ->Some + FromDist(#ToBool(fnCall), dist)->DistributionOperation.run(~env)->Some } let toDistFn = ( fnCall: DistributionTypes.DistributionOperation.toDist, dist, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { - FromDist(DistributionTypes.DistributionOperation.ToDist(fnCall), dist) - ->DistributionOperation.run(~env) - ->Some + FromDist(#ToDist(fnCall), dist)->DistributionOperation.run(~env)->Some } - let twoDiststoDistFn = (direction, arithmetic, dist1, dist2, ~env: DistributionOperation.env) => { + let twoDiststoDistFn = (direction, arithmetic, dist1, dist2, ~env: GenericDist.env) => { FromDist( - DistributionTypes.DistributionOperation.ToDistCombination( - direction, - arithmeticMap(arithmetic), - #Dist(dist2), - ), + #ToDistCombination(direction, arithmeticMap(arithmetic), #Dist(dist2)), dist1, )->DistributionOperation.run(~env) } @@ -109,7 +97,7 @@ module Helpers = { let mixtureWithGivenWeights = ( distributions: array, weights: array, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): DistributionOperation.outputType => E.A.length(distributions) == E.A.length(weights) ? Mixture(Belt.Array.zip(distributions, weights))->DistributionOperation.run(~env) @@ -119,7 +107,7 @@ module Helpers = { let mixtureWithDefaultWeights = ( distributions: array, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): DistributionOperation.outputType => { let length = E.A.length(distributions) let weights = Belt.Array.make(length, 1.0 /. Belt.Int.toFloat(length)) @@ -128,7 +116,7 @@ module Helpers = { let mixture = ( args: array, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): DistributionOperation.outputType => { let error = (err: string): DistributionOperation.outputType => err->DistributionTypes.ArgumentError->GenDistError @@ -167,20 +155,6 @@ module Helpers = { } } } - - let klDivergenceWithPrior = ( - prediction: DistributionTypes.genericDist, - answer: DistributionTypes.genericDist, - prior: DistributionTypes.genericDist, - env: DistributionOperation.env, - ) => { - let term1 = DistributionOperation.Constructors.klDivergence(~env, prediction, answer) - let term2 = DistributionOperation.Constructors.klDivergence(~env, prior, answer) - switch E.R.merge(term1, term2)->E.R2.fmap(((a, b)) => a -. b) { - | Ok(x) => x->DistributionOperation.Float->Some - | Error(_) => None - } - } } module SymbolicConstructors = { @@ -199,7 +173,7 @@ module SymbolicConstructors = { } } -let dispatchToGenericOutput = (call: IEV.functionCall, env: DistributionOperation.env): option< +let dispatchToGenericOutput = (call: IEV.functionCall, env: GenericDist.env): option< DistributionOperation.outputType, > => { let (fnName, args) = call @@ -239,35 +213,6 @@ let dispatchToGenericOutput = (call: IEV.functionCall, env: DistributionOperatio ~env, )->Some | ("normalize", [IEvDistribution(dist)]) => Helpers.toDistFn(Normalize, dist, ~env) - | ("klDivergence", [IEvDistribution(prediction), IEvDistribution(answer)]) => - Some(DistributionOperation.run(FromDist(ToScore(KLDivergence(answer)), prediction), ~env)) - | ( - "klDivergence", - [IEvDistribution(prediction), IEvDistribution(answer), IEvDistribution(prior)], - ) => - Helpers.klDivergenceWithPrior(prediction, answer, prior, env) - | ( - "logScoreWithPointAnswer", - [IEvDistribution(prediction), IEvNumber(answer), IEvDistribution(prior)], - ) - | ( - "logScoreWithPointAnswer", - [ - IEvDistribution(prediction), - IEvDistribution(Symbolic(#Float(answer))), - IEvDistribution(prior), - ], - ) => - DistributionOperation.run( - FromDist(ToScore(LogScore(answer, prior->Some)), prediction), - ~env, - )->Some - | ("logScoreWithPointAnswer", [IEvDistribution(prediction), IEvNumber(answer)]) - | ( - "logScoreWithPointAnswer", - [IEvDistribution(prediction), IEvDistribution(Symbolic(#Float(answer)))], - ) => - DistributionOperation.run(FromDist(ToScore(LogScore(answer, None)), prediction), ~env)->Some | ("isNormalized", [IEvDistribution(dist)]) => Helpers.toBoolFn(IsNormalized, dist, ~env) | ("toPointSet", [IEvDistribution(dist)]) => Helpers.toDistFn(ToPointSet, dist, ~env) | ("scaleLog", [IEvDistribution(dist)]) => diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_InternalExpressionValue.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_InternalExpressionValue.res index a6766071..914729a5 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_InternalExpressionValue.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_InternalExpressionValue.res @@ -15,7 +15,7 @@ type rec t = | IEvDeclaration(lambdaDeclaration) | IEvDistribution(DistributionTypes.genericDist) | IEvLambda(lambdaValue) - | IEvModule(nameSpace) + | IEvBindings(nameSpace) | IEvNumber(float) | IEvRecord(map) | IEvString(string) @@ -52,7 +52,7 @@ let rec toString = aValue => | IEvDeclaration(d) => Declaration.toString(d, r => toString(IEvLambda(r))) | IEvDistribution(dist) => GenericDist.toString(dist) | IEvLambda(lambdaValue) => `lambda(${Js.Array2.toString(lambdaValue.parameters)}=>internal code)` - | IEvModule(m) => `@${m->toStringNameSpace}` + | IEvBindings(m) => `@${m->toStringNameSpace}` | IEvNumber(aNumber) => Js.String.make(aNumber) | IEvRecord(aMap) => aMap->toStringMap | IEvString(aString) => `'${aString}'` @@ -84,7 +84,7 @@ let toStringWithType = aValue => | IEvDeclaration(_) => `Declaration::${toString(aValue)}` | IEvDistribution(_) => `Distribution::${toString(aValue)}` | IEvLambda(_) => `Lambda::${toString(aValue)}` - | IEvModule(_) => `Module::${toString(aValue)}` + | IEvBindings(_) => `Bindings::${toString(aValue)}` | IEvNumber(_) => `Number::${toString(aValue)}` | IEvRecord(_) => `Record::${toString(aValue)}` | IEvString(_) => `String::${toString(aValue)}` @@ -150,7 +150,7 @@ let valueToValueType = value => | IEvDeclaration(_) => EvtDeclaration | IEvDistribution(_) => EvtDistribution | IEvLambda(_) => EvtLambda - | IEvModule(_) => EvtModule + | IEvBindings(_) => EvtModule | IEvNumber(_) => EvtNumber | IEvRecord(_) => EvtRecord | IEvString(_) => EvtString @@ -160,6 +160,26 @@ let valueToValueType = value => | IEvTypeIdentifier(_) => EvtTypeIdentifier } +let externalValueToValueType = (value: ExternalExpressionValue.t) => + switch value { + | EvArray(_) => EvtArray + | EvArrayString(_) => EvtArrayString + | EvBool(_) => EvtBool + | EvCall(_) => EvtCall + | EvDate(_) => EvtDate + | EvDeclaration(_) => EvtDeclaration + | EvDistribution(_) => EvtDistribution + | EvLambda(_) => EvtLambda + | EvModule(_) => EvtModule + | EvNumber(_) => EvtNumber + | EvRecord(_) => EvtRecord + | EvString(_) => EvtString + | EvSymbol(_) => EvtSymbol + | EvTimeDuration(_) => EvtTimeDuration + | EvType(_) => EvtType + | EvTypeIdentifier(_) => EvtTypeIdentifier + } + let functionCallToCallSignature = (functionCall: functionCall): functionCallSignature => { let (fn, args) = functionCall CallSignature(fn, args->Js.Array2.map(valueToValueType)) @@ -211,7 +231,7 @@ let rec toExternal = (iev: t): ExternalExpressionValue.t => { | IEvTimeDuration(v) => EvTimeDuration(v) | IEvType(v) => v->mapToExternal->EvType | IEvTypeIdentifier(v) => EvTypeIdentifier(v) - | IEvModule(v) => v->nameSpaceToTypeScriptBindings->EvModule + | IEvBindings(v) => v->nameSpaceToTypeScriptBindings->EvModule } } and mapToExternal = v => @@ -243,7 +263,7 @@ let rec toInternal = (ev: ExternalExpressionValue.t): t => { } | EvDistribution(v) => IEvDistribution(v) | EvLambda(v) => IEvLambda(lambdaValueToInternal(v)) - | EvModule(v) => v->nameSpaceFromTypeScriptBindings->IEvModule + | EvModule(v) => v->nameSpaceFromTypeScriptBindings->IEvBindings | EvNumber(v) => IEvNumber(v) | EvRecord(v) => v->recordToInternal->IEvRecord | EvString(v) => IEvString(v) diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res index 900e6a2f..f22df39b 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res @@ -24,7 +24,7 @@ module ScientificUnit = { } } -let dispatch = (call: IEV.functionCall, _: DistributionOperation.env): option< +let dispatch = (call: IEV.functionCall, _: GenericDist.env): option< result, > => { switch call { diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_StdLib.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_StdLib.res index c08b7cb1..5c1a9c30 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_StdLib.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_StdLib.res @@ -1,6 +1,6 @@ -module Module = Reducer_Module +module Bindings = Reducer_Bindings -let internalStdLib = Module.emptyModule->SquiggleLibrary_Math.makeBindings +let internalStdLib = Bindings.emptyBindings->SquiggleLibrary_Math.makeBindings @genType -let externalStdLib = internalStdLib->Module.toTypeScriptBindings +let externalStdLib = internalStdLib->Bindings.toTypeScriptBindings diff --git a/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Math.res b/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Math.res index d85927a1..ce74f476 100644 --- a/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Math.res +++ b/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Math.res @@ -1,17 +1,16 @@ -module Bindings = Reducer_Module -module Module = Reducer_Module +module Bindings = Reducer_Bindings let availableNumbers: array<(string, float)> = [ - ("pi", Js.Math._PI), - ("e", Js.Math._E), - ("ln2", Js.Math._LN2), - ("ln10", Js.Math._LN10), - ("log2e", Js.Math._LOG2E), - ("log10e", Js.Math._LOG10E), - ("sqrt2", Js.Math._SQRT2), - ("sqrt1_2", Js.Math._SQRT1_2), - ("phi", 1.618033988749895), - ("tau", 6.283185307179586), + ("Math.pi", Js.Math._PI), + ("Math.e", Js.Math._E), + ("Math.ln2", Js.Math._LN2), + ("Math.ln10", Js.Math._LN10), + ("Math.log2e", Js.Math._LOG2E), + ("Math.log10e", Js.Math._LOG10E), + ("Math.sqrt2", Js.Math._SQRT2), + ("Math.sqrt1_2", Js.Math._SQRT1_2), + ("Math.phi", 1.618033988749895), + ("Math.tau", 6.283185307179586), ] let mathBindings: Bindings.t = @@ -20,4 +19,4 @@ let mathBindings: Bindings.t = ->Bindings.fromArray let makeBindings = (previousBindings: Bindings.t): Bindings.t => - previousBindings->Bindings.defineModule("Math", mathBindings) + previousBindings->Bindings.merge(mathBindings) diff --git a/packages/squiggle-lang/src/rescript/TypescriptInterface.res b/packages/squiggle-lang/src/rescript/TypescriptInterface.res index 3d2ce160..a1f5afe6 100644 --- a/packages/squiggle-lang/src/rescript/TypescriptInterface.res +++ b/packages/squiggle-lang/src/rescript/TypescriptInterface.res @@ -8,7 +8,7 @@ The below few seem to work fine. In the future there's definitely more work to d */ @genType -type samplingParams = DistributionOperation.env +type samplingParams = GenericDist.env @genType type genericDist = DistributionTypes.genericDist diff --git a/packages/squiggle-lang/src/rescript/Utility/E.res b/packages/squiggle-lang/src/rescript/Utility/E.res index 70ca4994..a3af26e9 100644 --- a/packages/squiggle-lang/src/rescript/Utility/E.res +++ b/packages/squiggle-lang/src/rescript/Utility/E.res @@ -547,6 +547,7 @@ module A = { let init = Array.init let reduce = Belt.Array.reduce let reducei = Belt.Array.reduceWithIndex + let some = Belt.Array.some let isEmpty = r => length(r) < 1 let stableSortBy = Belt.SortArray.stableSortBy let toNoneIfEmpty = r => isEmpty(r) ? None : Some(r) @@ -630,6 +631,19 @@ module A = { ) let filter = Js.Array.filter let joinWith = Js.Array.joinWith + let transpose = (xs: array>): array> => { + let arr: array> = [] + for i in 0 to length(xs) - 1 { + for j in 0 to length(xs[i]) - 1 { + if Js.Array.length(arr) <= j { + ignore(Js.Array.push([xs[i][j]], arr)) + } else { + ignore(Js.Array.push(xs[i][j], arr[j])) + } + } + } + arr + } let all = (p: 'a => bool, xs: array<'a>): bool => length(filter(p, xs)) == length(xs) let any = (p: 'a => bool, xs: array<'a>): bool => length(filter(p, xs)) > 0 @@ -751,7 +765,7 @@ module A = { let diff = (t: t): array => Belt.Array.zipBy(t, Belt.Array.sliceToEnd(t, 1), (left, right) => right -. left) - let cumsum = (t: t): array => accumulate((a, b) => a +. b, t) + let cumSum = (t: t): array => accumulate((a, b) => a +. b, t) let cumProd = (t: t): array => accumulate((a, b) => a *. b, t) exception RangeError(string) diff --git a/packages/squiggle-lang/src/rescript/Utility/XYShape.res b/packages/squiggle-lang/src/rescript/Utility/XYShape.res index 3fbe9f46..e94d24c6 100644 --- a/packages/squiggle-lang/src/rescript/Utility/XYShape.res +++ b/packages/squiggle-lang/src/rescript/Utility/XYShape.res @@ -327,8 +327,8 @@ module Zipped = { module PointwiseCombination = { // t1Interpolator and t2Interpolator are functions from XYShape.XtoY, e.g. linearBetweenPointsExtrapolateFlat. let combine: ( - (float, float) => result, interpolator, + (float, float) => result, T.t, T.t, ) => result = %raw(` @@ -337,7 +337,7 @@ module PointwiseCombination = { // and interpolates the value on the other side, thus accumulating xs and ys. // This is written in raw JS because this can still be a bottleneck, and using refs for the i and j indices is quite painful. - function(fn, interpolator, t1, t2) { + function(interpolator, fn, t1, t2) { let t1n = t1.xs.length; let t2n = t2.xs.length; let outX = []; @@ -399,11 +399,11 @@ module PointwiseCombination = { This is from an approach to kl divergence that was ultimately rejected. Leaving it in for now because it may help us factor `combine` out of raw javascript soon. */ let combineAlongSupportOfSecondArgument0: ( - (float, float) => result, interpolator, + (float, float) => result, T.t, T.t, - ) => result = (fn, interpolator, t1, t2) => { + ) => result = (interpolator, fn, t1, t2) => { let newYs = [] let newXs = [] let (l1, l2) = (E.A.length(t1.xs), E.A.length(t2.xs)) @@ -496,29 +496,9 @@ module PointwiseCombination = { let newYs = E.A.fmap(x => XtoY.linear(x, t), newXs) {xs: newXs, ys: newYs} } - // This function is used for klDivergence - let combineAlongSupportOfSecondArgument: ( - (float, float) => result, - T.t, - T.t, - ) => result = (fn, prediction, answer) => { - let combineWithFn = (answerX: float, i: int) => { - let answerY = answer.ys[i] - let predictionY = XtoY.linear(answerX, prediction) - fn(predictionY, answerY) - } - let newYsWithError = Js.Array.mapi((x, i) => combineWithFn(x, i), answer.xs) - let newYsOrError = E.A.R.firstErrorOrOpen(newYsWithError) - let result = switch newYsOrError { - | Ok(a) => Ok({xs: answer.xs, ys: a}) - | Error(b) => Error(b) - } - - result - } let addCombine = (interpolator: interpolator, t1: T.t, t2: T.t): T.t => - combine((a, b) => Ok(a +. b), interpolator, t1, t2)->E.R.toExn( + combine(interpolator, (a, b) => Ok(a +. b), t1, t2)->E.R.toExn( "Add operation should never fail", _, ) diff --git a/packages/vscode-ext/README.md b/packages/vscode-ext/README.md index 9d23c1e2..1c529ddd 100644 --- a/packages/vscode-ext/README.md +++ b/packages/vscode-ext/README.md @@ -1,21 +1,35 @@ # Squiggle For VS Code -_[marketplace](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)_ +## About -This extension provides support for [Squiggle](https://www.squiggle-language.com/) in VS Code. +This extension provides support for [Squiggle](https://www.squiggle-language.com/) in VS Code. It can be found in the VS code _[marketplace](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)_ Features: - Preview `.squiggle` files in a preview pane - Syntax highlighting for `.squiggle` and `.squiggleU` files -# Configuration +## Installation -Some preview settings, e.g. whether to show the summary table or types of outputs, can be configurable on in the VS Code settings and persist between different preview sessions. +You can install this extension by going to the "extensions" tab, searching for "Squiggle", and then installing it. + +![](./images/vs-code-install.png) + +## Usage + +After loading a `.squiggle` file, an "Open Preview" button will appear. If you click it, the squiggle model will be shown, and updated as you edit and save you file. + +![](./images/extension-screenshot.png) + +### Configuration (optional) + +Some preview settings, e.g. whether to show the summary table or types of outputs, can be configurable on in the VS Code settings and persist between different preview sessions. The VS Code settings can be accessed with the shortcut `Ctrl+,` with `Ctrl+Shift+P` + searching "Open Settings", or by accessing a file like `$HOME/.config/Code/User/settings.json` in Linux (see [here](https://stackoverflow.com/questions/65908987/how-can-i-open-visual-studio-codes-settings-json-file)) for other operating systems. + +![](./images/vs-code-settings.png) Check out the full list of Squiggle settings in the main VS Code settings. -# Build locally +## Build locally We assume you ran `yarn` at the monorepo level for all dependencies. diff --git a/packages/vscode-ext/images/extension-screenshot.png b/packages/vscode-ext/images/extension-screenshot.png new file mode 100644 index 00000000..f3cc3351 Binary files /dev/null and b/packages/vscode-ext/images/extension-screenshot.png differ diff --git a/packages/vscode-ext/images/vs-code-install.png b/packages/vscode-ext/images/vs-code-install.png new file mode 100644 index 00000000..e36b220a Binary files /dev/null and b/packages/vscode-ext/images/vs-code-install.png differ diff --git a/packages/vscode-ext/images/vs-code-settings.png b/packages/vscode-ext/images/vs-code-settings.png new file mode 100644 index 00000000..68568bd5 Binary files /dev/null and b/packages/vscode-ext/images/vs-code-settings.png differ diff --git a/packages/vscode-ext/package.json b/packages/vscode-ext/package.json index 2198c538..ef17bc39 100644 --- a/packages/vscode-ext/package.json +++ b/packages/vscode-ext/package.json @@ -133,18 +133,18 @@ "devDependencies": { "@types/glob": "^7.2.0", "@types/node": "18.x", - "@types/vscode": "^1.68.0", - "@typescript-eslint/eslint-plugin": "^5.30.4", - "@typescript-eslint/parser": "^5.30.4", - "eslint": "^8.18.0", + "@types/vscode": "^1.69.0", + "@typescript-eslint/eslint-plugin": "^5.30.6", + "@typescript-eslint/parser": "^5.30.6", + "eslint": "^8.20.0", "glob": "^8.0.3", "js-yaml": "^4.1.0", "typescript": "^4.7.4", "vsce-yarn-patch": "^1.66.2" }, "dependencies": { - "vscode-languageclient": "^8.0.1", - "vscode-languageserver": "^8.0.1", + "vscode-languageclient": "^8.0.2", + "vscode-languageserver": "^8.0.2", "vscode-languageserver-textdocument": "^1.0.5", "@quri/squiggle-lang": "^0.2.11" } diff --git a/packages/website/package.json b/packages/website/package.json index 5369fa96..621169f9 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -12,11 +12,11 @@ "format": "prettier --write ." }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.21", - "@docusaurus/preset-classic": "2.0.0-beta.21", + "@docusaurus/core": "2.0.0-rc.1", + "@docusaurus/preset-classic": "2.0.0-rc.1", "@quri/squiggle-components": "^0.2.20", "base64-js": "^1.5.1", - "clsx": "^1.2.0", + "clsx": "^1.2.1", "hast-util-is-element": "2.1.2", "pako": "^2.0.4", "prism-react-renderer": "^1.3.5", diff --git a/yarn.lock b/yarn.lock index a9c08c38..de15c073 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,17 +2,24 @@ # yarn lockfile v1 -"@algolia/autocomplete-core@1.6.3": - version "1.6.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.6.3.tgz#76832fffb6405ac2c87bac5a040b8a31a1cdef80" - integrity sha512-dqQqRt01fX3YuVFrkceHsoCnzX0bLhrrg8itJI1NM68KjrPYQPYsE+kY8EZTCM4y8VDnhqJErR73xe/ZsV+qAA== +"@algolia/autocomplete-core@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.7.1.tgz#025538b8a9564a9f3dd5bcf8a236d6951c76c7d1" + integrity sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg== dependencies: - "@algolia/autocomplete-shared" "1.6.3" + "@algolia/autocomplete-shared" "1.7.1" -"@algolia/autocomplete-shared@1.6.3": - version "1.6.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.6.3.tgz#52085ce89a755977841ed0a463aa31ce8f1dea97" - integrity sha512-UV46bnkTztyADFaETfzFC5ryIdGVb2zpAoYgu0tfcuYWjhg1KbLXveFffZIrGVoboqmAk1b+jMrl6iCja1i3lg== +"@algolia/autocomplete-preset-algolia@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.1.tgz#7dadc5607097766478014ae2e9e1c9c4b3f957c8" + integrity sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg== + dependencies: + "@algolia/autocomplete-shared" "1.7.1" + +"@algolia/autocomplete-shared@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.1.tgz#95c3a0b4b78858fed730cf9c755b7d1cd0c82c74" + integrity sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg== "@algolia/cache-browser-local-storage@4.13.1": version "4.13.1" @@ -147,11 +154,23 @@ dependencies: "@babel/highlight" "^7.16.7" +"@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.10": version "7.18.5" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.5.tgz#acac0c839e317038c73137fbb6ef71a1d6238471" integrity sha512-BxhE40PVCBxVEJsSBhB6UWyAuqJRxGsAw8BdHMJ3AKGydcwuWW4kOO3HmqBQAdcq/OP+/DlTVxLvsCzRTnZuGg== +"@babel/compat-data@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" + integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== + "@babel/core@7.12.9": version "7.12.9" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" @@ -174,21 +193,21 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.15.5", "@babel/core@^7.16.0", "@babel/core@^7.18.2", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.8.0": - version "7.18.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.5.tgz#c597fa680e58d571c28dda9827669c78cdd7f000" - integrity sha512-MGY8vg3DxMnctw0LdvSEojOsumc70g0t18gNyUdAZqB1Rpd1Bqo/svHGvt+UJ6JcGX+DIekGFDxxIWofBxLCnQ== +"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.15.5", "@babel/core@^7.16.0", "@babel/core@^7.18.6", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.8.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d" + integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ== dependencies: "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.18.2" - "@babel/helper-compilation-targets" "^7.18.2" - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helpers" "^7.18.2" - "@babel/parser" "^7.18.5" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.18.5" - "@babel/types" "^7.18.4" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.6" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helpers" "^7.18.6" + "@babel/parser" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -204,31 +223,31 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.0" -"@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.18.2", "@babel/generator@^7.7.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" - integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== +"@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.18.6", "@babel/generator@^7.18.7", "@babel/generator@^7.7.2": + version "7.18.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" + integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== dependencies: - "@babel/types" "^7.18.2" - "@jridgewell/gen-mapping" "^0.3.0" + "@babel/types" "^7.18.7" + "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" - integrity sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw== +"@babel/helper-annotate-as-pure@^7.16.7", "@babel/helper-annotate-as-pure@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" + integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.18.6" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz#38d138561ea207f0f69eb1626a418e4f7e6a580b" - integrity sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA== +"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz#f14d640ed1ee9246fb33b8255f08353acfe70e6a" + integrity sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw== dependencies: - "@babel/helper-explode-assignable-expression" "^7.16.7" - "@babel/types" "^7.16.7" + "@babel/helper-explode-assignable-expression" "^7.18.6" + "@babel/types" "^7.18.6" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.7", "@babel/helper-compilation-targets@^7.17.10", "@babel/helper-compilation-targets@^7.18.2": +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.17.10": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz#67a85a10cbd5fc7f1457fec2e7f45441dc6c754b" integrity sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ== @@ -238,18 +257,28 @@ browserslist "^4.20.2" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.17.12", "@babel/helper-create-class-features-plugin@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz#fac430912606331cb075ea8d82f9a4c145a4da19" - integrity sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg== +"@babel/helper-compilation-targets@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz#18d35bfb9f83b1293c22c55b3d576c1315b6ed96" + integrity sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg== dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.17.9" - "@babel/helper-member-expression-to-functions" "^7.17.7" - "@babel/helper-optimise-call-expression" "^7.16.7" - "@babel/helper-replace-supers" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/compat-data" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.20.2" + semver "^6.3.0" + +"@babel/helper-create-class-features-plugin@^7.17.12", "@babel/helper-create-class-features-plugin@^7.18.0", "@babel/helper-create-class-features-plugin@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz#6f15f8459f3b523b39e00a99982e2c040871ed72" + integrity sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-member-expression-to-functions" "^7.18.6" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.17.12": version "7.17.12" @@ -259,6 +288,14 @@ "@babel/helper-annotate-as-pure" "^7.16.7" regexpu-core "^5.0.1" +"@babel/helper-create-regexp-features-plugin@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz#3e35f4e04acbbf25f1b3534a657610a000543d3c" + integrity sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + regexpu-core "^5.1.0" + "@babel/helper-define-polyfill-provider@^0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz#3c2f91b7971b9fc11fe779c945c014065dea340e" @@ -292,14 +329,19 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz#8a6d2dedb53f6bf248e31b4baf38739ee4a637bd" integrity sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ== -"@babel/helper-explode-assignable-expression@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz#12a6d8522fdd834f194e868af6354e8650242b7a" - integrity sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ== - dependencies: - "@babel/types" "^7.16.7" +"@babel/helper-environment-visitor@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz#b7eee2b5b9d70602e59d1a6cad7dd24de7ca6cd7" + integrity sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q== -"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9": +"@babel/helper-explode-assignable-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" + integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-function-name@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== @@ -307,12 +349,20 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.17.0" -"@babel/helper-hoist-variables@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" - integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg== +"@babel/helper-function-name@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz#8334fecb0afba66e6d87a7e8c6bb7fed79926b83" + integrity sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw== dependencies: - "@babel/types" "^7.16.7" + "@babel/template" "^7.18.6" + "@babel/types" "^7.18.6" + +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" "@babel/helper-member-expression-to-functions@^7.17.7": version "7.17.7" @@ -321,6 +371,13 @@ dependencies: "@babel/types" "^7.17.0" +"@babel/helper-member-expression-to-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz#44802d7d602c285e1692db0bad9396d007be2afc" + integrity sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" @@ -328,7 +385,14 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.18.0": +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-module-transforms@^7.12.1": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz#baf05dec7a5875fb9235bd34ca18bad4e21221cd" integrity sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA== @@ -342,6 +406,20 @@ "@babel/traverse" "^7.18.0" "@babel/types" "^7.18.0" +"@babel/helper-module-transforms@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz#4f8408afead0188cfa48672f9d0e5787b61778c8" + integrity sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA== + dependencies: + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.8" + "@babel/types" "^7.18.8" + "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" @@ -349,26 +427,34 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-optimise-call-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" + integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-plugin-utils@7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" - integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz#9448974dd4fb1d80fefe72e8a0af37809cd30d6d" + integrity sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg== -"@babel/helper-remap-async-to-generator@^7.16.8": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz#29ffaade68a367e2ed09c90901986918d25e57e3" - integrity sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw== +"@babel/helper-remap-async-to-generator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz#fa1f81acd19daee9d73de297c0308783cd3cfc23" + integrity sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ== dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-wrap-function" "^7.16.8" - "@babel/types" "^7.16.8" + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-wrap-function" "^7.18.6" + "@babel/types" "^7.18.6" -"@babel/helper-replace-supers@^7.16.7", "@babel/helper-replace-supers@^7.18.2": +"@babel/helper-replace-supers@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.2.tgz#41fdfcc9abaf900e18ba6e5931816d9062a7b2e0" integrity sha512-XzAIyxx+vFnrOxiQrToSUOzUOn0e1J2Li40ntddek1Y69AXUTXoDJ40/D5RdjFu7s7qHiaeoTiempZcbuVXh2Q== @@ -379,13 +465,31 @@ "@babel/traverse" "^7.18.2" "@babel/types" "^7.18.2" -"@babel/helper-simple-access@^7.17.7", "@babel/helper-simple-access@^7.18.2": +"@babel/helper-replace-supers@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz#efedf51cfccea7b7b8c0f00002ab317e7abfe420" + integrity sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g== + dependencies: + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-member-expression-to-functions" "^7.18.6" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + +"@babel/helper-simple-access@^7.17.7": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz#4dc473c2169ac3a1c9f4a51cfcd091d1c36fcff9" integrity sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ== dependencies: "@babel/types" "^7.18.2" +"@babel/helper-simple-access@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz#0ee3388070147c3ae051e487eca3ebb0e2e8bb09" @@ -393,6 +497,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz#7dff00a5320ca4cf63270e5a0eca4b268b7380d9" + integrity sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-split-export-declaration@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" @@ -400,27 +511,44 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + "@babel/helper-validator-option@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== -"@babel/helper-wrap-function@^7.16.8": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz#58afda087c4cd235de92f7ceedebca2c41274200" - integrity sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw== - dependencies: - "@babel/helper-function-name" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.16.8" - "@babel/types" "^7.16.8" +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== -"@babel/helpers@^7.12.5", "@babel/helpers@^7.18.2": +"@babel/helper-wrap-function@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz#ec44ea4ad9d8988b90c3e465ba2382f4de81a073" + integrity sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw== + dependencies: + "@babel/helper-function-name" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + +"@babel/helpers@^7.12.5": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.2.tgz#970d74f0deadc3f5a938bfa250738eb4ac889384" integrity sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg== @@ -429,6 +557,15 @@ "@babel/traverse" "^7.18.2" "@babel/types" "^7.18.2" +"@babel/helpers@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.6.tgz#4c966140eaa1fcaa3d5a8c09d7db61077d4debfd" + integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ== + dependencies: + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + "@babel/highlight@^7.16.7": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351" @@ -438,37 +575,52 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.18.3", "@babel/parser@^7.18.5": +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7": version "7.18.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.5.tgz#337062363436a893a2d22faa60be5bb37091c83c" integrity sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw== -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.17.12.tgz#1dca338caaefca368639c9ffb095afbd4d420b1e" - integrity sha512-xCJQXl4EeQ3J9C4yOmpTrtVGmzpm2iSzyxbkZHw7UCnZBftHpF/hpII80uWVyVrc40ytIClHjgWGTG1g/yB+aw== - dependencies: - "@babel/helper-plugin-utils" "^7.17.12" +"@babel/parser@^7.18.6", "@babel/parser@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf" + integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA== -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.17.12.tgz#0d498ec8f0374b1e2eb54b9cb2c4c78714c77753" - integrity sha512-/vt0hpIw0x4b6BLKUkwlvEoiGZYYLNZ96CzyHYPbtG2jZGz6LBe7/V+drYrc/d+ovrF9NBi0pmtvmNb/FsWtRQ== +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" + integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" - "@babel/plugin-proposal-optional-chaining" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-proposal-async-generator-functions@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.17.12.tgz#094a417e31ce7e692d84bab06c8e2a607cbeef03" - integrity sha512-RWVvqD1ooLKP6IqWTA5GyFVX2isGEgC5iFxKzfYOIy/QEFdxYyCybBDtIGjipHpb9bDWHzcqGqFakf+mVmBTdQ== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz#b4e4dbc2cd1acd0133479918f7c6412961c9adb8" + integrity sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-remap-async-to-generator" "^7.16.8" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" + "@babel/plugin-proposal-optional-chaining" "^7.18.6" + +"@babel/plugin-proposal-async-generator-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz#aedac81e6fc12bb643374656dd5f2605bf743d17" + integrity sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w== + dependencies: + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-remap-async-to-generator" "^7.18.6" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.16.0", "@babel/plugin-proposal-class-properties@^7.17.12": +"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.16.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.17.12.tgz#84f65c0cc247d46f40a6da99aadd6438315d80a4" integrity sha512-U0mI9q8pW5Q9EaTHFPwSVusPMV/DV9Mm8p7csqROFLtIE9rBF5piLqyrBGigftALrBcsBGu4m38JneAe7ZDLXw== @@ -476,13 +628,21 @@ "@babel/helper-create-class-features-plugin" "^7.17.12" "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-proposal-class-static-block@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.0.tgz#7d02253156e3c3793bdb9f2faac3a1c05f0ba710" - integrity sha512-t+8LsRMMDE74c6sV7KShIw13sqbqd58tlqNrsWoWBTIMw7SVQ0cZ905wLNS/FBCy/3PyooRHLFFlfrUNyyz5lA== +"@babel/plugin-proposal-class-properties@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" + integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-class-static-block@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz#8aa81d403ab72d3962fc06c26e222dacfc9b9020" + integrity sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-proposal-decorators@^7.12.12", "@babel/plugin-proposal-decorators@^7.16.4": @@ -497,12 +657,12 @@ "@babel/plugin-syntax-decorators" "^7.17.12" charcodes "^0.2.0" -"@babel/plugin-proposal-dynamic-import@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz#c19c897eaa46b27634a00fee9fb7d829158704b2" - integrity sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg== +"@babel/plugin-proposal-dynamic-import@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" + integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-proposal-export-default-from@^7.12.1": @@ -513,31 +673,31 @@ "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-export-default-from" "^7.16.7" -"@babel/plugin-proposal-export-namespace-from@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.17.12.tgz#b22864ccd662db9606edb2287ea5fd1709f05378" - integrity sha512-j7Ye5EWdwoXOpRmo5QmRyHPsDIe6+u70ZYZrd7uz+ebPYFKfRcLcNu3Ro0vOlJ5zuv8rU7xa+GttNiRzX56snQ== +"@babel/plugin-proposal-export-namespace-from@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz#1016f0aa5ab383bbf8b3a85a2dcaedf6c8ee7491" + integrity sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-json-strings@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.17.12.tgz#f4642951792437233216d8c1af370bb0fbff4664" - integrity sha512-rKJ+rKBoXwLnIn7n6o6fulViHMrOThz99ybH+hKHcOZbnN14VuMnH9fo2eHE69C8pO4uX1Q7t2HYYIDmv8VYkg== +"@babel/plugin-proposal-json-strings@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" + integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.17.12.tgz#c64a1bcb2b0a6d0ed2ff674fd120f90ee4b88a23" - integrity sha512-EqFo2s1Z5yy+JeJu7SFfbIUtToJTVlC61/C7WLKDntSw4Sz6JNAIfL7zQ74VvirxpjB5kz/kIx0gCcb+5OEo2Q== +"@babel/plugin-proposal-logical-assignment-operators@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz#3b9cac6f1ffc2aa459d111df80c12020dfc6b665" + integrity sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.17.12": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.17.12.tgz#1e93079bbc2cbc756f6db6a1925157c4a92b94be" integrity sha512-ws/g3FSGVzv+VH86+QvgtuJL/kR67xaEIF2x0iPqdDfYW6ra6JF3lKVBkWynRLcNtIC1oCTfDRVxmm2mKzy+ag== @@ -545,7 +705,15 @@ "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-proposal-numeric-separator@^7.16.0", "@babel/plugin-proposal-numeric-separator@^7.16.7": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" + integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-proposal-numeric-separator@^7.16.0": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz#d6b69f4af63fb38b6ca2558442a7fb191236eba9" integrity sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw== @@ -553,6 +721,14 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-numeric-separator" "^7.10.4" +"@babel/plugin-proposal-numeric-separator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" + integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-proposal-object-rest-spread@7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069" @@ -562,7 +738,7 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-transform-parameters" "^7.12.1" -"@babel/plugin-proposal-object-rest-spread@^7.12.1", "@babel/plugin-proposal-object-rest-spread@^7.18.0": +"@babel/plugin-proposal-object-rest-spread@^7.12.1": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.0.tgz#79f2390c892ba2a68ec112eb0d895cfbd11155e8" integrity sha512-nbTv371eTrFabDfHLElkn9oyf9VG+VKK6WMzhY2o4eHKaG19BToD9947zzGMO6I/Irstx9d8CwX6njPNIAR/yw== @@ -573,15 +749,26 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.17.12" -"@babel/plugin-proposal-optional-catch-binding@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz#c623a430674ffc4ab732fd0a0ae7722b67cb74cf" - integrity sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA== +"@babel/plugin-proposal-object-rest-spread@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz#ec93bba06bfb3e15ebd7da73e953d84b094d5daf" + integrity sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/compat-data" "^7.18.6" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.18.6" + +"@babel/plugin-proposal-optional-catch-binding@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" + integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.12.7", "@babel/plugin-proposal-optional-chaining@^7.16.0", "@babel/plugin-proposal-optional-chaining@^7.17.12": +"@babel/plugin-proposal-optional-chaining@^7.12.7", "@babel/plugin-proposal-optional-chaining@^7.16.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.17.12.tgz#f96949e9bacace3a9066323a5cf90cfb9de67174" integrity sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ== @@ -590,7 +777,16 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-proposal-private-methods@^7.12.1", "@babel/plugin-proposal-private-methods@^7.16.0", "@babel/plugin-proposal-private-methods@^7.17.12": +"@babel/plugin-proposal-optional-chaining@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz#46d4f2ffc20e87fad1d98bc4fa5d466366f6aa0b" + integrity sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-proposal-private-methods@^7.12.1", "@babel/plugin-proposal-private-methods@^7.16.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.17.12.tgz#c2ca3a80beb7539289938da005ad525a038a819c" integrity sha512-SllXoxo19HmxhDWm3luPz+cPhtoTSKLJE9PXshsfrOzBqs60QP0r8OaJItrPhAj0d7mZMnNF0Y1UUggCDgMz1A== @@ -598,17 +794,33 @@ "@babel/helper-create-class-features-plugin" "^7.17.12" "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-proposal-private-property-in-object@^7.12.1", "@babel/plugin-proposal-private-property-in-object@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.17.12.tgz#b02efb7f106d544667d91ae97405a9fd8c93952d" - integrity sha512-/6BtVi57CJfrtDNKfK5b66ydK2J5pXUKBKSPD2G1whamMuEnZWgoOIfO8Vf9F/DoD4izBLD/Au4NMQfruzzykg== +"@babel/plugin-proposal-private-methods@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" + integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-create-class-features-plugin" "^7.17.12" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-private-property-in-object@^7.12.1", "@babel/plugin-proposal-private-property-in-object@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz#a64137b232f0aca3733a67eb1a144c192389c503" + integrity sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-proposal-unicode-property-regex@^7.17.12", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": +"@babel/plugin-proposal-unicode-property-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" + integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.17.12.tgz#3dbd7a67bd7f94c8238b394da112d86aaf32ad4d" integrity sha512-Wb9qLjXf3ZazqXA7IvI7ozqRIXIGPtSo+L5coFmEkhTQK18ao4UDDD0zdTGAarmbLj2urpRwrc6893cu5Bfh0A== @@ -679,12 +891,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-syntax-import-assertions@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.17.12.tgz#58096a92b11b2e4e54b24c6a0cc0e5e607abcedd" - integrity sha512-n/loy2zkq9ZEM8tEOwON9wTQSTNDTDEz6NujPtJGLU7qObzT1N4c4YZZf8E6ATB2AjNQg/Ib2AIpO03EZaCehw== +"@babel/plugin-syntax-import-assertions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz#cd6190500a4fa2fe31990a963ffab4b63e4505e4" + integrity sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -714,6 +926,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.17.12" +"@babel/plugin-syntax-jsx@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" + integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -770,44 +989,65 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.17.12", "@babel/plugin-syntax-typescript@^7.7.2": +"@babel/plugin-syntax-typescript@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285" + integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-syntax-typescript@^7.7.2": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz#b54fc3be6de734a56b87508f99d6428b5b605a7b" integrity sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-arrow-functions@^7.12.1", "@babel/plugin-transform-arrow-functions@^7.17.12": +"@babel/plugin-transform-arrow-functions@^7.12.1": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.17.12.tgz#dddd783b473b1b1537ef46423e3944ff24898c45" integrity sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-async-to-generator@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.17.12.tgz#dbe5511e6b01eee1496c944e35cdfe3f58050832" - integrity sha512-J8dbrWIOO3orDzir57NRsjg4uxucvhby0L/KZuGsWDj0g7twWK3g7JhJhOrXtuXiw8MeiSdJ3E0OW9H8LYEzLQ== +"@babel/plugin-transform-arrow-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz#19063fcf8771ec7b31d742339dac62433d0611fe" + integrity sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ== dependencies: - "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-remap-async-to-generator" "^7.16.8" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-block-scoped-functions@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz#4d0d57d9632ef6062cdf354bb717102ee042a620" - integrity sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg== +"@babel/plugin-transform-async-to-generator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz#ccda3d1ab9d5ced5265fdb13f1882d5476c71615" + integrity sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-remap-async-to-generator" "^7.18.6" -"@babel/plugin-transform-block-scoping@^7.12.12", "@babel/plugin-transform-block-scoping@^7.17.12": +"@babel/plugin-transform-block-scoped-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" + integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-block-scoping@^7.12.12": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.4.tgz#7988627b3e9186a13e4d7735dc9c34a056613fb9" integrity sha512-+Hq10ye+jlvLEogSOtq4mKvtk7qwcUQ1f0Mrueai866C82f844Yom2cttfJdMdqRLTxWpsbfbkIkOIfovyUQXw== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-classes@^7.12.1", "@babel/plugin-transform-classes@^7.17.12": +"@babel/plugin-transform-block-scoping@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz#b5f78318914615397d86a731ef2cc668796a726c" + integrity sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-classes@^7.12.1": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.4.tgz#51310b812a090b846c784e47087fa6457baef814" integrity sha512-e42NSG2mlKWgxKUAD9EJJSkZxR67+wZqzNxLSpc51T8tRU5SLFHsPmgYR5yr7sdgX4u+iHA1C5VafJ6AyImV3A== @@ -821,21 +1061,50 @@ "@babel/helper-split-export-declaration" "^7.16.7" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.17.12.tgz#bca616a83679698f3258e892ed422546e531387f" - integrity sha512-a7XINeplB5cQUWMg1E/GI1tFz3LfK021IjV1rj1ypE+R7jHm+pIHmHl25VNkZxtx9uuYp7ThGk8fur1HHG7PgQ== +"@babel/plugin-transform-classes@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.8.tgz#7e85777e622e979c85c701a095280360b818ce49" + integrity sha512-RySDoXdF6hgHSHuAW4aLGyVQdmvEX/iJtjVre52k0pxRq4hzqze+rAVP++NmNv596brBpYmaiKgTZby7ziBnVg== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + globals "^11.1.0" -"@babel/plugin-transform-destructuring@^7.12.1", "@babel/plugin-transform-destructuring@^7.18.0": +"@babel/plugin-transform-computed-properties@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz#5d15eb90e22e69604f3348344c91165c5395d032" + integrity sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-destructuring@^7.12.1": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.0.tgz#dc4f92587e291b4daa78aa20cc2d7a63aa11e858" integrity sha512-Mo69klS79z6KEfrLg/1WkmVnB8javh75HX4pi2btjvlIoasuxilEyjtsQW6XPrubNd7AQy0MMaNIaQE4e7+PQw== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-dotall-regex@^7.16.7", "@babel/plugin-transform-dotall-regex@^7.4.4": +"@babel/plugin-transform-destructuring@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz#a98b0e42c7ffbf5eefcbcf33280430f230895c6f" + integrity sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-dotall-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" + integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-dotall-regex@^7.4.4": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz#6b2d67686fab15fb6a7fd4bd895d5982cfc81241" integrity sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ== @@ -843,20 +1112,20 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-duplicate-keys@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.17.12.tgz#a09aa709a3310013f8e48e0e23bc7ace0f21477c" - integrity sha512-EA5eYFUG6xeerdabina/xIoB95jJ17mAkR8ivx6ZSu9frKShBjpOGZPn511MTDTkiCO+zXnzNczvUM69YSf3Zw== +"@babel/plugin-transform-duplicate-keys@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz#e6c94e8cd3c9dd8a88144f7b78ae22975a7ff473" + integrity sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-exponentiation-operator@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz#efa9862ef97e9e9e5f653f6ddc7b665e8536fe9b" - integrity sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA== +"@babel/plugin-transform-exponentiation-operator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" + integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-flow-strip-types@^7.16.0", "@babel/plugin-transform-flow-strip-types@^7.17.12": version "7.17.12" @@ -866,96 +1135,103 @@ "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-flow" "^7.17.12" -"@babel/plugin-transform-for-of@^7.12.1", "@babel/plugin-transform-for-of@^7.18.1": +"@babel/plugin-transform-for-of@^7.12.1": version "7.18.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.1.tgz#ed14b657e162b72afbbb2b4cdad277bf2bb32036" integrity sha512-+TTB5XwvJ5hZbO8xvl2H4XaMDOAK57zF4miuC9qQJgysPNEAZZ9Z69rdF5LJkozGdZrjBIUAIyKUWRMmebI7vg== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-function-name@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz#5ab34375c64d61d083d7d2f05c38d90b97ec65cf" - integrity sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA== +"@babel/plugin-transform-for-of@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" + integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== dependencies: - "@babel/helper-compilation-targets" "^7.16.7" - "@babel/helper-function-name" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-literals@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.17.12.tgz#97131fbc6bbb261487105b4b3edbf9ebf9c830ae" - integrity sha512-8iRkvaTjJciWycPIZ9k9duu663FT7VrBdNqNgxnVXEFwOIp55JWcZd23VBRySYbnS3PwQ3rGiabJBBBGj5APmQ== +"@babel/plugin-transform-function-name@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz#6a7e4ae2893d336fd1b8f64c9f92276391d0f1b4" + integrity sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-member-expression-literals@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz#6e5dcf906ef8a098e630149d14c867dd28f92384" - integrity sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw== +"@babel/plugin-transform-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz#9d6af353b5209df72960baf4492722d56f39a205" + integrity sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-modules-amd@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.0.tgz#7ef1002e67e36da3155edc8bf1ac9398064c02ed" - integrity sha512-h8FjOlYmdZwl7Xm2Ug4iX2j7Qy63NANI+NQVWQzv6r25fqgg7k2dZl03p95kvqNclglHs4FZ+isv4p1uXMA+QA== +"@babel/plugin-transform-member-expression-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" + integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== dependencies: - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-modules-amd@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz#8c91f8c5115d2202f277549848874027d7172d21" + integrity sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg== + dependencies: + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.18.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.2.tgz#1aa8efa2e2a6e818b6a7f2235fceaf09bdb31e9e" - integrity sha512-f5A865gFPAJAEE0K7F/+nm5CmAE3y8AWlMBG9unu5j9+tk50UQVK0QS8RNxSp7MJf0wh97uYyLWt3Zvu71zyOQ== +"@babel/plugin-transform-modules-commonjs@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" + integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== dependencies: - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-simple-access" "^7.18.2" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.18.0": - version "7.18.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.5.tgz#87f11c44fbfd3657be000d4897e192d9cb535996" - integrity sha512-SEewrhPpcqMF1V7DhnEbhVJLrC+nnYfe1E0piZMZXBpxi9WvZqWGwpsk7JYP7wPWeqaBh4gyKlBhHJu3uz5g4Q== +"@babel/plugin-transform-modules-systemjs@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz#026511b7657d63bf5d4cf2fd4aeb963139914a54" + integrity sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g== dependencies: - "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-validator-identifier" "^7.16.7" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-umd@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.0.tgz#56aac64a2c2a1922341129a4597d1fd5c3ff020f" - integrity sha512-d/zZ8I3BWli1tmROLxXLc9A6YXvGK8egMxHp+E/rRwMh1Kip0AP77VwZae3snEJ33iiWwvNv2+UIIhfalqhzZA== +"@babel/plugin-transform-modules-umd@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" + integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== dependencies: - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-named-capturing-groups-regex@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.17.12.tgz#9c4a5a5966e0434d515f2675c227fd8cc8606931" - integrity sha512-vWoWFM5CKaTeHrdUJ/3SIOTRV+MBVGybOC9mhJkaprGNt5demMymDW24yC74avb915/mIRe3TgNb/d8idvnCRA== +"@babel/plugin-transform-named-capturing-groups-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz#c89bfbc7cc6805d692f3a49bc5fc1b630007246d" + integrity sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.17.12" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-new-target@^7.17.12": - version "7.18.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.5.tgz#8c228c4a07501dd12c95c5f23d1622131cc23931" - integrity sha512-TuRL5uGW4KXU6OsRj+mLp9BM7pO8e7SGNTEokQRRxHFkXYMFiy2jlKSZPFtI/mKORDzciH+hneskcSOp0gU8hg== +"@babel/plugin-transform-new-target@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" + integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-object-super@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz#ac359cf8d32cf4354d27a46867999490b6c32a94" - integrity sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw== +"@babel/plugin-transform-object-super@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" + integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/helper-replace-supers" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.6" "@babel/plugin-transform-parameters@^7.12.1", "@babel/plugin-transform-parameters@^7.17.12": version "7.17.12" @@ -964,12 +1240,19 @@ dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-property-literals@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz#2dadac85155436f22c696c4827730e0fe1057a55" - integrity sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw== +"@babel/plugin-transform-parameters@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a" + integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-property-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" + integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-react-constant-elements@^7.12.1", "@babel/plugin-transform-react-constant-elements@^7.14.5": version "7.17.12" @@ -978,21 +1261,28 @@ dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-react-display-name@^7.16.0", "@babel/plugin-transform-react-display-name@^7.16.7": +"@babel/plugin-transform-react-display-name@^7.16.0": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz#7b6d40d232f4c0f550ea348593db3b21e2404340" integrity sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg== dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-react-jsx-development@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz#43a00724a3ed2557ed3f276a01a929e6686ac7b8" - integrity sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A== +"@babel/plugin-transform-react-display-name@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" + integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== dependencies: - "@babel/plugin-transform-react-jsx" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-react-jsx@^7.12.12", "@babel/plugin-transform-react-jsx@^7.16.7", "@babel/plugin-transform-react-jsx@^7.17.12": +"@babel/plugin-transform-react-jsx-development@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" + integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.18.6" + +"@babel/plugin-transform-react-jsx@^7.12.12": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.12.tgz#2aa20022709cd6a3f40b45d60603d5f269586dba" integrity sha512-Lcaw8bxd1DKht3thfD4A12dqo1X16he1Lm8rIv8sTwjAYNInRS1qHa9aJoqvzpscItXvftKDCfaEQzwoVyXpEQ== @@ -1003,49 +1293,67 @@ "@babel/plugin-syntax-jsx" "^7.17.12" "@babel/types" "^7.17.12" -"@babel/plugin-transform-react-pure-annotations@^7.16.7": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.0.tgz#ef82c8e310913f3522462c9ac967d395092f1954" - integrity sha512-6+0IK6ouvqDn9bmEG7mEyF/pwlJXVj5lwydybpyyH3D0A7Hftk+NCTdYjnLNZksn261xaOV5ksmp20pQEmc2RQ== +"@babel/plugin-transform-react-jsx@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.6.tgz#2721e96d31df96e3b7ad48ff446995d26bc028ff" + integrity sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw== dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-jsx" "^7.18.6" + "@babel/types" "^7.18.6" -"@babel/plugin-transform-regenerator@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.0.tgz#44274d655eb3f1af3f3a574ba819d3f48caf99d5" - integrity sha512-C8YdRw9uzx25HSIzwA7EM7YP0FhCe5wNvJbZzjVNHHPGVcDJ3Aie+qGYYdS1oVQgn+B3eAIJbWFLrJ4Jipv7nw== +"@babel/plugin-transform-react-pure-annotations@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz#561af267f19f3e5d59291f9950fd7b9663d0d844" + integrity sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-regenerator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz#585c66cb84d4b4bf72519a34cfce761b8676ca73" + integrity sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" regenerator-transform "^0.15.0" -"@babel/plugin-transform-reserved-words@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.17.12.tgz#7dbd349f3cdffba751e817cf40ca1386732f652f" - integrity sha512-1KYqwbJV3Co03NIi14uEHW8P50Md6KqFgt0FfpHdK6oyAHQVTosgPuPSiWud1HX0oYJ1hGRRlk0fP87jFpqXZA== +"@babel/plugin-transform-reserved-words@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" + integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-runtime@^7.16.4", "@babel/plugin-transform-runtime@^7.18.2": - version "7.18.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.5.tgz#f4d3188ba6a8815793993c71c2c225d0ee1d7743" - integrity sha512-Q17hHxXr2fplrE+5BSC1j1Fo5cOA8YeP8XW3/1paI8MzF/faZGh0MaH1KC4jLAvqLPamQWHB5/B7KqSLY1kuHA== +"@babel/plugin-transform-runtime@^7.16.4", "@babel/plugin-transform-runtime@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.6.tgz#77b14416015ea93367ca06979710f5000ff34ccb" + integrity sha512-8uRHk9ZmRSnWqUgyae249EJZ94b0yAGLBIqzZzl+0iEdbno55Pmlt/32JZsHwXD9k/uZj18Aqqk35wBX4CBTXA== dependencies: - "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.17.12" - babel-plugin-polyfill-corejs2 "^0.3.0" - babel-plugin-polyfill-corejs3 "^0.5.0" - babel-plugin-polyfill-regenerator "^0.3.0" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + babel-plugin-polyfill-corejs2 "^0.3.1" + babel-plugin-polyfill-corejs3 "^0.5.2" + babel-plugin-polyfill-regenerator "^0.3.1" semver "^6.3.0" -"@babel/plugin-transform-shorthand-properties@^7.12.1", "@babel/plugin-transform-shorthand-properties@^7.16.7": +"@babel/plugin-transform-shorthand-properties@^7.12.1": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz#e8549ae4afcf8382f711794c0c7b6b934c5fbd2a" integrity sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg== dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-spread@^7.12.1", "@babel/plugin-transform-spread@^7.17.12": +"@babel/plugin-transform-shorthand-properties@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" + integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-spread@^7.12.1": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.17.12.tgz#c112cad3064299f03ea32afed1d659223935d1f5" integrity sha512-9pgmuQAtFi3lpNUstvG9nGfk9DkrdmWNp9KeKPFmuZCpEnxRzYlS8JgwPjYj+1AWDOSvoGN0H30p1cBOmT/Svg== @@ -1053,83 +1361,98 @@ "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" -"@babel/plugin-transform-sticky-regex@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz#c84741d4f4a38072b9a1e2e3fd56d359552e8660" - integrity sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw== +"@babel/plugin-transform-spread@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz#82b080241965f1689f0a60ecc6f1f6575dbdb9d6" + integrity sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" -"@babel/plugin-transform-template-literals@^7.12.1", "@babel/plugin-transform-template-literals@^7.18.2": +"@babel/plugin-transform-sticky-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" + integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-template-literals@^7.12.1": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.2.tgz#31ed6915721864847c48b656281d0098ea1add28" integrity sha512-/cmuBVw9sZBGZVOMkpAEaVLwm4JmK2GZ1dFKOGGpMzEHWFmyZZ59lUU0PdRr8YNYeQdNzTDwuxP2X2gzydTc9g== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-typeof-symbol@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.17.12.tgz#0f12f57ac35e98b35b4ed34829948d42bd0e6889" - integrity sha512-Q8y+Jp7ZdtSPXCThB6zjQ74N3lj0f6TDh1Hnf5B+sYlzQ8i5Pjp8gW0My79iekSpT4WnI06blqP6DT0OmaXXmw== +"@babel/plugin-transform-template-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz#b763f4dc9d11a7cce58cf9a490d82e80547db9c2" + integrity sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-typescript@^7.17.12": - version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.4.tgz#587eaf6a39edb8c06215e550dc939faeadd750bf" - integrity sha512-l4vHuSLUajptpHNEOUDEGsnpl9pfRLsN1XUoDQDD/YBuXTM+v37SHGS+c6n4jdcZy96QtuUuSvZYMLSSsjH8Mw== +"@babel/plugin-transform-typeof-symbol@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz#486bb39d5a18047358e0d04dc0d2f322f0b92e92" + integrity sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/plugin-syntax-typescript" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-unicode-escapes@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz#da8717de7b3287a2c6d659750c964f302b31ece3" - integrity sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q== +"@babel/plugin-transform-typescript@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz#303feb7a920e650f2213ef37b36bbf327e6fa5a0" + integrity sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-typescript" "^7.18.6" -"@babel/plugin-transform-unicode-regex@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz#0f7aa4a501198976e25e82702574c34cfebe9ef2" - integrity sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q== +"@babel/plugin-transform-unicode-escapes@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz#0d01fb7fb2243ae1c033f65f6e3b4be78db75f27" + integrity sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.12.1", "@babel/preset-env@^7.12.11", "@babel/preset-env@^7.15.6", "@babel/preset-env@^7.16.4", "@babel/preset-env@^7.18.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.2.tgz#f47d3000a098617926e674c945d95a28cb90977a" - integrity sha512-PfpdxotV6afmXMU47S08F9ZKIm2bJIQ0YbAAtDfIENX7G1NUAXigLREh69CWDjtgUy7dYn7bsMzkgdtAlmS68Q== +"@babel/plugin-transform-unicode-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" + integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== dependencies: - "@babel/compat-data" "^7.17.10" - "@babel/helper-compilation-targets" "^7.18.2" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.17.12" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.17.12" - "@babel/plugin-proposal-async-generator-functions" "^7.17.12" - "@babel/plugin-proposal-class-properties" "^7.17.12" - "@babel/plugin-proposal-class-static-block" "^7.18.0" - "@babel/plugin-proposal-dynamic-import" "^7.16.7" - "@babel/plugin-proposal-export-namespace-from" "^7.17.12" - "@babel/plugin-proposal-json-strings" "^7.17.12" - "@babel/plugin-proposal-logical-assignment-operators" "^7.17.12" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.17.12" - "@babel/plugin-proposal-numeric-separator" "^7.16.7" - "@babel/plugin-proposal-object-rest-spread" "^7.18.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.16.7" - "@babel/plugin-proposal-optional-chaining" "^7.17.12" - "@babel/plugin-proposal-private-methods" "^7.17.12" - "@babel/plugin-proposal-private-property-in-object" "^7.17.12" - "@babel/plugin-proposal-unicode-property-regex" "^7.17.12" + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.12.1", "@babel/preset-env@^7.12.11", "@babel/preset-env@^7.15.6", "@babel/preset-env@^7.16.4", "@babel/preset-env@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.6.tgz#953422e98a5f66bc56cd0b9074eaea127ec86ace" + integrity sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw== + dependencies: + "@babel/compat-data" "^7.18.6" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.6" + "@babel/plugin-proposal-async-generator-functions" "^7.18.6" + "@babel/plugin-proposal-class-properties" "^7.18.6" + "@babel/plugin-proposal-class-static-block" "^7.18.6" + "@babel/plugin-proposal-dynamic-import" "^7.18.6" + "@babel/plugin-proposal-export-namespace-from" "^7.18.6" + "@babel/plugin-proposal-json-strings" "^7.18.6" + "@babel/plugin-proposal-logical-assignment-operators" "^7.18.6" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" + "@babel/plugin-proposal-numeric-separator" "^7.18.6" + "@babel/plugin-proposal-object-rest-spread" "^7.18.6" + "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" + "@babel/plugin-proposal-optional-chaining" "^7.18.6" + "@babel/plugin-proposal-private-methods" "^7.18.6" + "@babel/plugin-proposal-private-property-in-object" "^7.18.6" + "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.17.12" + "@babel/plugin-syntax-import-assertions" "^7.18.6" "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" @@ -1139,43 +1462,43 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.17.12" - "@babel/plugin-transform-async-to-generator" "^7.17.12" - "@babel/plugin-transform-block-scoped-functions" "^7.16.7" - "@babel/plugin-transform-block-scoping" "^7.17.12" - "@babel/plugin-transform-classes" "^7.17.12" - "@babel/plugin-transform-computed-properties" "^7.17.12" - "@babel/plugin-transform-destructuring" "^7.18.0" - "@babel/plugin-transform-dotall-regex" "^7.16.7" - "@babel/plugin-transform-duplicate-keys" "^7.17.12" - "@babel/plugin-transform-exponentiation-operator" "^7.16.7" - "@babel/plugin-transform-for-of" "^7.18.1" - "@babel/plugin-transform-function-name" "^7.16.7" - "@babel/plugin-transform-literals" "^7.17.12" - "@babel/plugin-transform-member-expression-literals" "^7.16.7" - "@babel/plugin-transform-modules-amd" "^7.18.0" - "@babel/plugin-transform-modules-commonjs" "^7.18.2" - "@babel/plugin-transform-modules-systemjs" "^7.18.0" - "@babel/plugin-transform-modules-umd" "^7.18.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.17.12" - "@babel/plugin-transform-new-target" "^7.17.12" - "@babel/plugin-transform-object-super" "^7.16.7" - "@babel/plugin-transform-parameters" "^7.17.12" - "@babel/plugin-transform-property-literals" "^7.16.7" - "@babel/plugin-transform-regenerator" "^7.18.0" - "@babel/plugin-transform-reserved-words" "^7.17.12" - "@babel/plugin-transform-shorthand-properties" "^7.16.7" - "@babel/plugin-transform-spread" "^7.17.12" - "@babel/plugin-transform-sticky-regex" "^7.16.7" - "@babel/plugin-transform-template-literals" "^7.18.2" - "@babel/plugin-transform-typeof-symbol" "^7.17.12" - "@babel/plugin-transform-unicode-escapes" "^7.16.7" - "@babel/plugin-transform-unicode-regex" "^7.16.7" + "@babel/plugin-transform-arrow-functions" "^7.18.6" + "@babel/plugin-transform-async-to-generator" "^7.18.6" + "@babel/plugin-transform-block-scoped-functions" "^7.18.6" + "@babel/plugin-transform-block-scoping" "^7.18.6" + "@babel/plugin-transform-classes" "^7.18.6" + "@babel/plugin-transform-computed-properties" "^7.18.6" + "@babel/plugin-transform-destructuring" "^7.18.6" + "@babel/plugin-transform-dotall-regex" "^7.18.6" + "@babel/plugin-transform-duplicate-keys" "^7.18.6" + "@babel/plugin-transform-exponentiation-operator" "^7.18.6" + "@babel/plugin-transform-for-of" "^7.18.6" + "@babel/plugin-transform-function-name" "^7.18.6" + "@babel/plugin-transform-literals" "^7.18.6" + "@babel/plugin-transform-member-expression-literals" "^7.18.6" + "@babel/plugin-transform-modules-amd" "^7.18.6" + "@babel/plugin-transform-modules-commonjs" "^7.18.6" + "@babel/plugin-transform-modules-systemjs" "^7.18.6" + "@babel/plugin-transform-modules-umd" "^7.18.6" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.18.6" + "@babel/plugin-transform-new-target" "^7.18.6" + "@babel/plugin-transform-object-super" "^7.18.6" + "@babel/plugin-transform-parameters" "^7.18.6" + "@babel/plugin-transform-property-literals" "^7.18.6" + "@babel/plugin-transform-regenerator" "^7.18.6" + "@babel/plugin-transform-reserved-words" "^7.18.6" + "@babel/plugin-transform-shorthand-properties" "^7.18.6" + "@babel/plugin-transform-spread" "^7.18.6" + "@babel/plugin-transform-sticky-regex" "^7.18.6" + "@babel/plugin-transform-template-literals" "^7.18.6" + "@babel/plugin-transform-typeof-symbol" "^7.18.6" + "@babel/plugin-transform-unicode-escapes" "^7.18.6" + "@babel/plugin-transform-unicode-regex" "^7.18.6" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.18.2" - babel-plugin-polyfill-corejs2 "^0.3.0" - babel-plugin-polyfill-corejs3 "^0.5.0" - babel-plugin-polyfill-regenerator "^0.3.0" + "@babel/types" "^7.18.6" + babel-plugin-polyfill-corejs2 "^0.3.1" + babel-plugin-polyfill-corejs3 "^0.5.2" + babel-plugin-polyfill-regenerator "^0.3.1" core-js-compat "^3.22.1" semver "^6.3.0" @@ -1199,26 +1522,26 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-react@^7.12.10", "@babel/preset-react@^7.12.5", "@babel/preset-react@^7.14.5", "@babel/preset-react@^7.16.0", "@babel/preset-react@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.17.12.tgz#62adbd2d1870c0de3893095757ed5b00b492ab3d" - integrity sha512-h5U+rwreXtZaRBEQhW1hOJLMq8XNJBQ/9oymXiCXTuT/0uOwpbT0gUt+sXeOqoXBgNuUKI7TaObVwoEyWkpFgA== +"@babel/preset-react@^7.12.10", "@babel/preset-react@^7.12.5", "@babel/preset-react@^7.14.5", "@babel/preset-react@^7.16.0", "@babel/preset-react@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.18.6.tgz#979f76d6277048dc19094c217b507f3ad517dd2d" + integrity sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-transform-react-display-name" "^7.16.7" - "@babel/plugin-transform-react-jsx" "^7.17.12" - "@babel/plugin-transform-react-jsx-development" "^7.16.7" - "@babel/plugin-transform-react-pure-annotations" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-transform-react-display-name" "^7.18.6" + "@babel/plugin-transform-react-jsx" "^7.18.6" + "@babel/plugin-transform-react-jsx-development" "^7.18.6" + "@babel/plugin-transform-react-pure-annotations" "^7.18.6" -"@babel/preset-typescript@^7.12.7", "@babel/preset-typescript@^7.15.0", "@babel/preset-typescript@^7.16.0", "@babel/preset-typescript@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz#40269e0a0084d56fc5731b6c40febe1c9a4a3e8c" - integrity sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg== +"@babel/preset-typescript@^7.12.7", "@babel/preset-typescript@^7.15.0", "@babel/preset-typescript@^7.16.0", "@babel/preset-typescript@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" + integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-transform-typescript" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-transform-typescript" "^7.18.6" "@babel/register@^7.12.1": version "7.17.7" @@ -1231,15 +1554,15 @@ pirates "^4.0.5" source-map-support "^0.5.16" -"@babel/runtime-corejs3@^7.10.2", "@babel/runtime-corejs3@^7.18.3": - version "7.18.3" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.3.tgz#52f0241a31e0ec61a6187530af6227c2846bd60c" - integrity sha512-l4ddFwrc9rnR+EJsHsh+TJ4A35YqQz/UqcjtlX2ov53hlJYG5CxtQmNZxyajwDVmCxwy++rtvGU5HazCK4W41Q== +"@babel/runtime-corejs3@^7.10.2", "@babel/runtime-corejs3@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz#6f02c5536911f4b445946a2179554b95c8838635" + integrity sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw== dependencies: core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.6", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.6", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ== @@ -1255,23 +1578,32 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.1.6", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.18.5", "@babel/traverse@^7.7.2": - version "7.18.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.5.tgz#94a8195ad9642801837988ab77f36e992d9a20cd" - integrity sha512-aKXj1KT66sBj0vVzk6rEeAO6Z9aiiQ68wfDgge3nHhA/my6xMM/7HGQUNumKZaoa2qUPQ5whJG9aAifsxUKfLA== +"@babel/template@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" + integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.18.2" - "@babel/helper-environment-visitor" "^7.18.2" - "@babel/helper-function-name" "^7.17.9" - "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.18.5" - "@babel/types" "^7.18.4" + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.6" + "@babel/types" "^7.18.6" + +"@babel/traverse@^7.1.6", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8", "@babel/traverse@^7.7.2": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.8.tgz#f095e62ab46abf1da35e5a2011f43aee72d8d5b0" + integrity sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.7" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.18.8" + "@babel/types" "^7.18.8" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.12", "@babel/types@^7.18.0", "@babel/types@^7.18.2", "@babel/types@^7.18.4", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.17.12", "@babel/types@^7.18.0", "@babel/types@^7.18.2", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== @@ -1279,6 +1611,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f" + integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz#371ba8be66d556812dc7fb169ebc3c08378f69d4" @@ -1411,43 +1751,44 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@docsearch/css@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.1.0.tgz#6781cad43fc2e034d012ee44beddf8f93ba21f19" - integrity sha512-bh5IskwkkodbvC0FzSg1AxMykfDl95hebEKwxNoq4e5QaGzOXSBgW8+jnMFZ7JU4sTBiB04vZWoUSzNrPboLZA== +"@docsearch/css@3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.1.1.tgz#e0976bf995e383f8ee8657306311b9cb95016330" + integrity sha512-utLgg7E1agqQeqCJn05DWC7XXMk4tMUUnL7MZupcknRu2OzGN13qwey2qA/0NAKkVBGugiWtON0+rlU0QIPojg== -"@docsearch/react@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.1.0.tgz#da943a64c01ee82b04e53b691806469272f943f7" - integrity sha512-bjB6ExnZzf++5B7Tfoi6UXgNwoUnNOfZ1NyvnvPhWgCMy5V/biAtLL4o7owmZSYdAKeFSvZ5Lxm0is4su/dBWg== +"@docsearch/react@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.1.1.tgz#3dffb5db8cf9eb95d6e732cf038264bfc10191ed" + integrity sha512-cfoql4qvtsVRqBMYxhlGNpvyy/KlCoPqjIsJSZYqYf9AplZncKjLBTcwBu6RXFMVCe30cIFljniI4OjqAU67pQ== dependencies: - "@algolia/autocomplete-core" "1.6.3" - "@docsearch/css" "3.1.0" + "@algolia/autocomplete-core" "1.7.1" + "@algolia/autocomplete-preset-algolia" "1.7.1" + "@docsearch/css" "3.1.1" algoliasearch "^4.0.0" -"@docusaurus/core@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-beta.21.tgz#50897317b22dbd94b1bf91bb30c2a0fddd15a806" - integrity sha512-qysDMVp1M5UozK3u/qOxsEZsHF7jeBvJDS+5ItMPYmNKvMbNKeYZGA0g6S7F9hRDwjIlEbvo7BaX0UMDcmTAWA== +"@docusaurus/core@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-rc.1.tgz#828d93d241171565d8947a9ab404091e04759141" + integrity sha512-b9FX0Z+EddfQ6wAiNh+Wx4fysKfcvEcWJrZ5USROn3C+EVU5P4luaa8mwWK//O+hTwD9ur7/A44IZ/tWCTAoLQ== dependencies: - "@babel/core" "^7.18.2" - "@babel/generator" "^7.18.2" + "@babel/core" "^7.18.6" + "@babel/generator" "^7.18.7" "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-transform-runtime" "^7.18.2" - "@babel/preset-env" "^7.18.2" - "@babel/preset-react" "^7.17.12" - "@babel/preset-typescript" "^7.17.12" - "@babel/runtime" "^7.18.3" - "@babel/runtime-corejs3" "^7.18.3" - "@babel/traverse" "^7.18.2" - "@docusaurus/cssnano-preset" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/mdx-loader" "2.0.0-beta.21" + "@babel/plugin-transform-runtime" "^7.18.6" + "@babel/preset-env" "^7.18.6" + "@babel/preset-react" "^7.18.6" + "@babel/preset-typescript" "^7.18.6" + "@babel/runtime" "^7.18.6" + "@babel/runtime-corejs3" "^7.18.6" + "@babel/traverse" "^7.18.8" + "@docusaurus/cssnano-preset" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" "@docusaurus/react-loadable" "5.5.2" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-common" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" - "@slorber/static-site-generator-webpack-plugin" "^4.0.4" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-common" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" + "@slorber/static-site-generator-webpack-plugin" "^4.0.7" "@svgr/webpack" "^6.2.1" autoprefixer "^10.4.7" babel-loader "^8.2.5" @@ -1460,10 +1801,10 @@ combine-promises "^1.1.0" commander "^5.1.0" copy-webpack-plugin "^11.0.0" - core-js "^3.22.7" + core-js "^3.23.3" css-loader "^6.7.1" css-minimizer-webpack-plugin "^4.0.0" - cssnano "^5.1.9" + cssnano "^5.1.12" del "^6.1.1" detect-port "^1.3.0" escape-html "^1.0.3" @@ -1476,7 +1817,7 @@ import-fresh "^3.3.0" leven "^3.1.0" lodash "^4.17.21" - mini-css-extract-plugin "^2.6.0" + mini-css-extract-plugin "^2.6.1" postcss "^8.4.14" postcss-loader "^7.0.0" prompts "^2.4.2" @@ -1487,49 +1828,48 @@ react-router "^5.3.3" react-router-config "^5.1.1" react-router-dom "^5.3.3" - remark-admonitions "^1.2.1" rtl-detect "^1.0.4" semver "^7.3.7" serve-handler "^6.1.3" shelljs "^0.8.5" - terser-webpack-plugin "^5.3.1" + terser-webpack-plugin "^5.3.3" tslib "^2.4.0" update-notifier "^5.1.0" url-loader "^4.1.1" wait-on "^6.0.1" - webpack "^5.72.1" + webpack "^5.73.0" webpack-bundle-analyzer "^4.5.0" - webpack-dev-server "^4.9.0" + webpack-dev-server "^4.9.3" webpack-merge "^5.8.0" webpackbar "^5.0.2" -"@docusaurus/cssnano-preset@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-beta.21.tgz#38113877a5857c3f9d493522085d20909dcec474" - integrity sha512-fhTZrg1vc6zYYZIIMXpe1TnEVGEjqscBo0s1uomSwKjjtMgu7wkzc1KKJYY7BndsSA+fVVkZ+OmL/kAsmK7xxw== +"@docusaurus/cssnano-preset@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-rc.1.tgz#76bbd7f6912779a0667f8f2fd8fc1a05618a6148" + integrity sha512-9/KmQvF+eTlMqUqG6UcXbRgxbGed/8bQInXuKEs+95/jI6jO/3xSzuRwuHHHP0naUvSVWjnNI9jngPrQerXE5w== dependencies: - cssnano-preset-advanced "^5.3.5" + cssnano-preset-advanced "^5.3.8" postcss "^8.4.14" postcss-sort-media-queries "^4.2.1" tslib "^2.4.0" -"@docusaurus/logger@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-2.0.0-beta.21.tgz#f6ab4133917965349ae03fd9111a940b24d4fd12" - integrity sha512-HTFp8FsSMrAj7Uxl5p72U+P7rjYU/LRRBazEoJbs9RaqoKEdtZuhv8MYPOCh46K9TekaoquRYqag2o23Qt4ggA== +"@docusaurus/logger@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-2.0.0-rc.1.tgz#db95e9b15bc243695830a5b791c0eff705ef1b54" + integrity sha512-daa3g+SXuO9K60PVMiSUmDEK9Vro+Ed7i7uF8CH6QQJLcNZy/zJc0Xz62eH7ip1x77fmeb6Rg4Us1TqTFc9AbQ== dependencies: chalk "^4.1.2" tslib "^2.4.0" -"@docusaurus/mdx-loader@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-beta.21.tgz#52af341e21f22be882d2155a7349bea10f5d77a3" - integrity sha512-AI+4obJnpOaBOAYV6df2ux5Y1YJCBS+MhXFf0yhED12sVLJi2vffZgdamYd/d/FwvWDw6QLs/VD2jebd7P50yQ== +"@docusaurus/mdx-loader@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-rc.1.tgz#e78d7d416aacc289f2427c5ccdb9145820acb0cb" + integrity sha512-8Fg0c/ceu39knmr7w0dutm7gq3YxKYCqWVS2cB/cPATzChCCNH/AGLfBT6sz/Z4tjVXE+NyREq2pfOFvkhjVXg== dependencies: - "@babel/parser" "^7.18.3" - "@babel/traverse" "^7.18.2" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" + "@babel/parser" "^7.18.8" + "@babel/traverse" "^7.18.8" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" "@mdx-js/mdx" "^1.6.22" escape-html "^1.0.3" file-loader "^6.2.0" @@ -1539,136 +1879,147 @@ remark-emoji "^2.2.0" stringify-object "^3.3.0" tslib "^2.4.0" + unified "^9.2.2" unist-util-visit "^2.0.3" url-loader "^4.1.1" - webpack "^5.72.1" + webpack "^5.73.0" -"@docusaurus/module-type-aliases@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-2.0.0-beta.21.tgz#345f1c1a99407775d1d3ffc1a90c2df93d50a9b8" - integrity sha512-gRkWICgQZiqSJgrwRKWjXm5gAB+9IcfYdUbCG0PRPP/G8sNs9zBIOY4uT4Z5ox2CWFEm44U3RTTxj7BiLVMBXw== +"@docusaurus/module-type-aliases@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-2.0.0-rc.1.tgz#c7839ac15b7712a8d86353a3253918f63ffbea09" + integrity sha512-la7D8ggFP8I5nOp/Epl6NqTeDWcbofPVMOaVisRxQbx5iuF9Al+AITbaDgm4CXpFLJACsqhsXD5W4BnKX8ZxfA== dependencies: - "@docusaurus/types" "2.0.0-beta.21" + "@docusaurus/react-loadable" "5.5.2" + "@docusaurus/types" "2.0.0-rc.1" + "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" "@types/react-router-dom" "*" react-helmet-async "*" + react-loadable "npm:@docusaurus/react-loadable@5.5.2" -"@docusaurus/plugin-content-blog@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-beta.21.tgz#86211deeea901ddcd77ca387778e121e93ee8d01" - integrity sha512-IP21yJViP3oBmgsWBU5LhrG1MZXV4mYCQSoCAboimESmy1Z11RCNP2tXaqizE3iTmXOwZZL+SNBk06ajKCEzWg== +"@docusaurus/plugin-content-blog@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-rc.1.tgz#8ae5d5ec2da08c583a057bf2754a5b9278b3eb08" + integrity sha512-BVVrAGZujpjS/0rarY2o24rlylRRh2NZuM65kg0JNkkViF79SeEHsepog7IuHyoqGWPm1N/I7LpEp7k+gowZzQ== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/mdx-loader" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-common" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" - cheerio "^1.0.0-rc.11" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-common" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" + cheerio "^1.0.0-rc.12" feed "^4.2.2" fs-extra "^10.1.0" lodash "^4.17.21" reading-time "^1.5.0" - remark-admonitions "^1.2.1" tslib "^2.4.0" unist-util-visit "^2.0.3" utility-types "^3.10.0" - webpack "^5.72.1" + webpack "^5.73.0" -"@docusaurus/plugin-content-docs@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-beta.21.tgz#b3171fa9aed99e367b6eb7111187bd0e3dcf2949" - integrity sha512-aa4vrzJy4xRy81wNskyhE3wzRf3AgcESZ1nfKh8xgHUkT7fDTZ1UWlg50Jb3LBCQFFyQG2XQB9N6llskI/KUnw== +"@docusaurus/plugin-content-docs@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-rc.1.tgz#2dda88166bf21b0eeb3821ef748059b20c8c49f7" + integrity sha512-Yk5Hu6uaw3tRplzJnbDygwRhmZ3PCzEXD4SJpBA6cPC73ylfqOEh6qhiU+BWhMTtDXNhY+athk5Kycfk3DW1aQ== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/mdx-loader" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/module-type-aliases" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" + "@types/react-router-config" "^5.0.6" combine-promises "^1.1.0" fs-extra "^10.1.0" import-fresh "^3.3.0" js-yaml "^4.1.0" lodash "^4.17.21" - remark-admonitions "^1.2.1" tslib "^2.4.0" utility-types "^3.10.0" - webpack "^5.72.1" + webpack "^5.73.0" -"@docusaurus/plugin-content-pages@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-beta.21.tgz#df6b4c5c4cde8a0ea491a30002e84941ca7bf0cf" - integrity sha512-DmXOXjqNI+7X5hISzCvt54QIK6XBugu2MOxjxzuqI7q92Lk/EVdraEj5mthlH8IaEH/VlpWYJ1O9TzLqX5vH2g== +"@docusaurus/plugin-content-pages@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-rc.1.tgz#2be82f53d6c77e6aa66787726c30dc60b210e6f8" + integrity sha512-FdO79WC5hfWDQu3/CTFLRQzTNc0e5n+HNzavm2MNkSzGV08BFJ6RAkbPbtra5CWef+6iXZav6D/tzv2jDPvLzA== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/mdx-loader" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" fs-extra "^10.1.0" - remark-admonitions "^1.2.1" tslib "^2.4.0" - webpack "^5.72.1" + webpack "^5.73.0" -"@docusaurus/plugin-debug@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-2.0.0-beta.21.tgz#dfa212fd90fe2f54439aacdc8c143e8ce96b0d27" - integrity sha512-P54J4q4ecsyWW0Jy4zbimSIHna999AfbxpXGmF1IjyHrjoA3PtuakV1Ai51XrGEAaIq9q6qMQkEhbUd3CffGAw== +"@docusaurus/plugin-debug@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-2.0.0-rc.1.tgz#73c06ad08d66810941e456d50b07be008f5235cb" + integrity sha512-aOsyYrPMbnsyqHwsVZ+0frrMRtnYqm4eaJpG4sC/6LYAJ07IDRQ9j3GOku2dKr5GsFK1Vx7VlE6ZLwe0MaGstg== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" fs-extra "^10.1.0" react-json-view "^1.21.3" tslib "^2.4.0" -"@docusaurus/plugin-google-analytics@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-beta.21.tgz#5475c58fb23603badf41d84298569f6c46b4e6b2" - integrity sha512-+5MS0PeGaJRgPuNZlbd/WMdQSpOACaxEz7A81HAxm6kE+tIASTW3l8jgj1eWFy/PGPzaLnQrEjxI1McAfnYmQw== +"@docusaurus/plugin-google-analytics@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-rc.1.tgz#0136cc7534573ca56e023178ec2bda5c1e89ce71" + integrity sha512-f+G8z5OJWfg5QqWDLIdcN2SDoK5J5Gg8HMrqCI6Pfl+rxPb5I1niA+/UkAM+kMCpnekvhSt5AWz2fgkRenkPLA== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" tslib "^2.4.0" -"@docusaurus/plugin-google-gtag@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-beta.21.tgz#a4a101089994a7103c1cc7cddb15170427b185d6" - integrity sha512-4zxKZOnf0rfh6myXLG7a6YZfQcxYDMBsWqANEjCX77H5gPdK+GHZuDrxK6sjFvRBv4liYCrNjo7HJ4DpPoT0zA== +"@docusaurus/plugin-google-gtag@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-rc.1.tgz#61698fdc41a4ace912fb8f6c834efd288edad3c0" + integrity sha512-yE1Et9hhhX9qMRnMJzpNq0854qIYiSEc2dZaXNk537HN7Q0rKkr/YONUHz2iqNYwPX2hGOY4LdpTxlMP88uVhA== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" tslib "^2.4.0" -"@docusaurus/plugin-sitemap@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-beta.21.tgz#8bfa695eada2ec95c9376a884641237ffca5dd3d" - integrity sha512-/ynWbcXZXcYZ6sT2X6vAJbnfqcPxwdGEybd0rcRZi4gBHq6adMofYI25AqELmnbBDxt0If+vlAeUHFRG5ueP7Q== +"@docusaurus/plugin-sitemap@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-rc.1.tgz#0b638e774b253d90e9f2d11663e961250f557bc4" + integrity sha512-5JmbNpssUF03odFM4ArvIsrO9bv7HnAJ0VtefXhh0WBpaFs8NgI3rTkCTFimvtRQjDR9U2bh23fXz2vjQQz6oA== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-common" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-common" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" fs-extra "^10.1.0" sitemap "^7.1.1" tslib "^2.4.0" -"@docusaurus/preset-classic@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.0.0-beta.21.tgz#1362d8650ebed22633db411caaba80075f7c86ce" - integrity sha512-KvBnIUu7y69pNTJ9UhX6SdNlK6prR//J3L4rhN897tb8xx04xHHILlPXko2Il+C3Xzgh3OCgyvkoz9K6YlFTDw== +"@docusaurus/preset-classic@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.0.0-rc.1.tgz#5e5b1cf80b3dd4e2c3f824c78a111f105858d853" + integrity sha512-5jjTVZkhArjyoNHwCI9x4PSG0zPmBJILjZLVrxPcHpm/K0ltkYcp6J3GxYpf5EbMuOh5+yCWM63cSshGcNOo3Q== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/plugin-content-blog" "2.0.0-beta.21" - "@docusaurus/plugin-content-docs" "2.0.0-beta.21" - "@docusaurus/plugin-content-pages" "2.0.0-beta.21" - "@docusaurus/plugin-debug" "2.0.0-beta.21" - "@docusaurus/plugin-google-analytics" "2.0.0-beta.21" - "@docusaurus/plugin-google-gtag" "2.0.0-beta.21" - "@docusaurus/plugin-sitemap" "2.0.0-beta.21" - "@docusaurus/theme-classic" "2.0.0-beta.21" - "@docusaurus/theme-common" "2.0.0-beta.21" - "@docusaurus/theme-search-algolia" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/plugin-content-blog" "2.0.0-rc.1" + "@docusaurus/plugin-content-docs" "2.0.0-rc.1" + "@docusaurus/plugin-content-pages" "2.0.0-rc.1" + "@docusaurus/plugin-debug" "2.0.0-rc.1" + "@docusaurus/plugin-google-analytics" "2.0.0-rc.1" + "@docusaurus/plugin-google-gtag" "2.0.0-rc.1" + "@docusaurus/plugin-sitemap" "2.0.0-rc.1" + "@docusaurus/theme-classic" "2.0.0-rc.1" + "@docusaurus/theme-common" "2.0.0-rc.1" + "@docusaurus/theme-search-algolia" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" "@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2": version "5.5.2" @@ -1678,115 +2029,125 @@ "@types/react" "*" prop-types "^15.6.2" -"@docusaurus/theme-classic@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.0.0-beta.21.tgz#6df5b9ea2d389dafb6f59badeabb3eda060b5017" - integrity sha512-Ge0WNdTefD0VDQfaIMRRWa8tWMG9+8/OlBRd5MK88/TZfqdBq7b/gnCSaalQlvZwwkj6notkKhHx72+MKwWUJA== +"@docusaurus/theme-classic@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.0.0-rc.1.tgz#4ab30745e6b03b0f277837debae786a0a83aee6a" + integrity sha512-qNiz7ieeq3AC+V8TbW6S63pWLJph1CbzWDDPTqxDLHgA8VQaNaSmJM8S92pH+yKALRb9u14ogjjYYc75Nj2JmQ== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/plugin-content-blog" "2.0.0-beta.21" - "@docusaurus/plugin-content-docs" "2.0.0-beta.21" - "@docusaurus/plugin-content-pages" "2.0.0-beta.21" - "@docusaurus/theme-common" "2.0.0-beta.21" - "@docusaurus/theme-translations" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-common" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/module-type-aliases" "2.0.0-rc.1" + "@docusaurus/plugin-content-blog" "2.0.0-rc.1" + "@docusaurus/plugin-content-docs" "2.0.0-rc.1" + "@docusaurus/plugin-content-pages" "2.0.0-rc.1" + "@docusaurus/theme-common" "2.0.0-rc.1" + "@docusaurus/theme-translations" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-common" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" "@mdx-js/react" "^1.6.22" - clsx "^1.1.1" + clsx "^1.2.1" copy-text-to-clipboard "^3.0.1" - infima "0.2.0-alpha.39" + infima "0.2.0-alpha.42" lodash "^4.17.21" nprogress "^0.2.0" postcss "^8.4.14" - prism-react-renderer "^1.3.3" + prism-react-renderer "^1.3.5" prismjs "^1.28.0" react-router-dom "^5.3.3" rtlcss "^3.5.0" tslib "^2.4.0" + utility-types "^3.10.0" -"@docusaurus/theme-common@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-2.0.0-beta.21.tgz#508478251982d01655ef505ccb2420db38623db8" - integrity sha512-fTKoTLRfjuFG6c3iwnVjIIOensxWMgdBKLfyE5iih3Lq7tQgkE7NyTGG9BKLrnTJ7cAD2UXdXM9xbB7tBf1qzg== +"@docusaurus/theme-common@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-2.0.0-rc.1.tgz#ea5d9732a16b03b488555e50107161bfa2abad98" + integrity sha512-1r9ZLKD9SeoCYVzWzcdR79Dia4ANlrlRjNl6uzETOEybjK6FF7yEa9Yra8EJcOCbi3coyYz5xFh/r1YHFTFHug== dependencies: - "@docusaurus/module-type-aliases" "2.0.0-beta.21" - "@docusaurus/plugin-content-blog" "2.0.0-beta.21" - "@docusaurus/plugin-content-docs" "2.0.0-beta.21" - "@docusaurus/plugin-content-pages" "2.0.0-beta.21" - clsx "^1.1.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/module-type-aliases" "2.0.0-rc.1" + "@docusaurus/plugin-content-blog" "2.0.0-rc.1" + "@docusaurus/plugin-content-docs" "2.0.0-rc.1" + "@docusaurus/plugin-content-pages" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@types/history" "^4.7.11" + "@types/react" "*" + "@types/react-router-config" "*" + clsx "^1.2.1" parse-numeric-range "^1.3.0" - prism-react-renderer "^1.3.3" + prism-react-renderer "^1.3.5" tslib "^2.4.0" utility-types "^3.10.0" -"@docusaurus/theme-search-algolia@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-beta.21.tgz#2891f11372e2542e4e1426c3100b72c2d30d4d68" - integrity sha512-T1jKT8MVSSfnztSqeebUOpWHPoHKtwDXtKYE0xC99JWoZ+mMfv8AFhVSoSddn54jLJjV36mxg841eHQIySMCpQ== +"@docusaurus/theme-search-algolia@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-rc.1.tgz#e78c0aeaea6a3717ae3a6ecd75a8652bd7c8e974" + integrity sha512-H5yq6V/B4qo6GZrDKMbeSpk3T9e9K2MliDzLonRu0w3QHW9orVGe0c/lZvRbGlDZjnsOo7XGddhXXIDWGwnpaA== dependencies: - "@docsearch/react" "^3.1.0" - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/plugin-content-docs" "2.0.0-beta.21" - "@docusaurus/theme-common" "2.0.0-beta.21" - "@docusaurus/theme-translations" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docsearch/react" "^3.1.1" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/plugin-content-docs" "2.0.0-rc.1" + "@docusaurus/theme-common" "2.0.0-rc.1" + "@docusaurus/theme-translations" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" algoliasearch "^4.13.1" - algoliasearch-helper "^3.8.2" - clsx "^1.1.1" + algoliasearch-helper "^3.10.0" + clsx "^1.2.1" eta "^1.12.3" fs-extra "^10.1.0" lodash "^4.17.21" tslib "^2.4.0" utility-types "^3.10.0" -"@docusaurus/theme-translations@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-2.0.0-beta.21.tgz#5da60ffc58de256b96316c5e0fe2733c1e83f22c" - integrity sha512-dLVT9OIIBs6MpzMb1bAy+C0DPJK3e3DNctG+ES0EP45gzEqQxzs4IsghpT+QDaOsuhNnAlosgJpFWX3rqxF9xA== +"@docusaurus/theme-translations@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-2.0.0-rc.1.tgz#bd647f78c741ee7f6c6d2cbbd3e3f282ef2f89ad" + integrity sha512-JLhNdlnbQhxVQzOnLyiCaTzKFa1lpVrM3nCrkGQKscoG2rY6ARGYMgMN2DkoH6hm7TflQ8+PE1S5MzzASeLs4Q== dependencies: fs-extra "^10.1.0" tslib "^2.4.0" -"@docusaurus/types@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-beta.21.tgz#36659c6c012663040dcd4cbc97b5d7a555dae229" - integrity sha512-/GH6Npmq81eQfMC/ikS00QSv9jNyO1RXEpNSx5GLA3sFX8Iib26g2YI2zqNplM8nyxzZ2jVBuvUoeODTIbTchQ== +"@docusaurus/types@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-rc.1.tgz#032f8afde6b4878e37f984b9949a96b150103c21" + integrity sha512-wX25FOZa/aKnCGA5ljWPaDpMW3TuTbs0BtjQ8WTC557p8zDvuz4r+g2/FPHsgWE0TKwUMf4usQU1m3XpJLPN+g== dependencies: + "@types/history" "^4.7.11" + "@types/react" "*" commander "^5.1.0" - history "^4.9.0" joi "^17.6.0" react-helmet-async "^1.3.0" utility-types "^3.10.0" - webpack "^5.72.1" + webpack "^5.73.0" webpack-merge "^5.8.0" -"@docusaurus/utils-common@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.0.0-beta.21.tgz#81e86ed04ad62b75e9ba6a5e7689dc23d5f36a0a" - integrity sha512-5w+6KQuJb6pUR2M8xyVuTMvO5NFQm/p8TOTDFTx60wt3p0P1rRX00v6FYsD4PK6pgmuoKjt2+Ls8dtSXc4qFpQ== +"@docusaurus/utils-common@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.0.0-rc.1.tgz#3e233a28794325d5d9d3af3f7b1c22b59aa8b847" + integrity sha512-+iZICpeFPZJ9oGJXuG92WTWee6WRnVx5BdzlcfuKf/f5KQX8PvwXR2tDME78FGGhShB8zr+vjuNEXuLvXT7j2A== dependencies: tslib "^2.4.0" -"@docusaurus/utils-validation@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-beta.21.tgz#10169661be5f8a233f4c12202ee5802ccb77400f" - integrity sha512-6NG1FHTRjv1MFzqW//292z7uCs77vntpWEbZBHk3n67aB1HoMn5SOwjLPtRDjbCgn6HCHFmdiJr6euCbjhYolg== +"@docusaurus/utils-validation@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-rc.1.tgz#dded12f036cda8a54a19e01694b35859fe0cf1d5" + integrity sha512-lj36gm9Ksu4tt/EUeLDWoMbXe3sfBxeIPIUUdqYcBYkF/rpQkh+uL/dncjNGiw6uvBOqXhOfsFVP045HtgShVw== dependencies: - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" joi "^17.6.0" js-yaml "^4.1.0" tslib "^2.4.0" -"@docusaurus/utils@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-beta.21.tgz#8fc4499c4cfedd29805025d930f8008cad255044" - integrity sha512-M/BrVCDmmUPZLxtiStBgzpQ4I5hqkggcpnQmEN+LbvbohjbtVnnnZQ0vptIziv1w8jry/woY+ePsyOO7O/yeLQ== +"@docusaurus/utils@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-rc.1.tgz#53584b800df9e13864d5ef1a76aa7655a90ec86e" + integrity sha512-ym9I1OwIYbKs1LGaUajaA/vDG8VweJj/6YoZjHp+eDQHhTRIrHXiYoGDqorafRhftKwnA1EnyomuXpNd9bq8Gg== dependencies: - "@docusaurus/logger" "2.0.0-beta.21" + "@docusaurus/logger" "2.0.0-rc.1" "@svgr/webpack" "^6.2.1" file-loader "^6.2.0" fs-extra "^10.1.0" @@ -1800,7 +2161,7 @@ shelljs "^0.8.5" tslib "^2.4.0" url-loader "^4.1.1" - webpack "^5.72.1" + webpack "^5.73.0" "@emotion/is-prop-valid@^0.8.2": version "0.8.8" @@ -1883,20 +2244,20 @@ dependencies: "@hapi/hoek" "^9.0.0" -"@headlessui/react@^1.6.5": - version "1.6.5" - resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.6.5.tgz#5587c537de809cf3146eb2ff263e5e940b1bf69c" - integrity sha512-3VkKteDxlxf3fE0KbfO9t60KC1lM7YNpZggLpwzVNg1J/zwL+h+4N7MBlFDVpInZI3rKlZGpNx0PWsG/9c2vQg== +"@headlessui/react@^1.6.6": + version "1.6.6" + resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.6.6.tgz#3073c066b85535c9d28783da0a4d9288b5354d0c" + integrity sha512-MFJtmj9Xh/hhBMhLccGbBoSk+sk61BlP6sJe4uQcVMtXZhCgGqd2GyIQzzmsdPdTEWGSF434CBi8mnhR6um46Q== "@heroicons/react@^1.0.6": version "1.0.6" resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-1.0.6.tgz#35dd26987228b39ef2316db3b1245c42eb19e324" integrity sha512-JJCXydOFWMDpCP4q13iEplA503MQO3xLoZiKum+955ZCtHINWnx26CUxVxxFQu/uLb4LW3ge15ZpzIkXKkJ8oQ== -"@hookform/resolvers@^2.9.3": - version "2.9.3" - resolved "https://registry.yarnpkg.com/@hookform/resolvers/-/resolvers-2.9.3.tgz#13f6934cfe705e24fac094da377e0621adcfc424" - integrity sha512-Eqc/qgjq0VX/TU0a5D2O+yR/kAKflnjaVlYFC1wI2qBm/sgjKTXxv27ijLwHUoHPIF+MUkB/VuQqHJ5DcmbCww== +"@hookform/resolvers@^2.9.6": + version "2.9.6" + resolved "https://registry.yarnpkg.com/@hookform/resolvers/-/resolvers-2.9.6.tgz#db4277a96d1817d94169108167014926d8a10398" + integrity sha512-f4VxF8w9rdX0WsDCk3FW1dGPj/Sj8+1Ulcgtm5ymgWEpbA/fjY+NUDh+L9hftmxDgP8+EJFtF+qFK4gPEXVrVQ== "@humanwhocodes/config-array@^0.9.2": version "0.9.5" @@ -2194,6 +2555,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.7" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe" @@ -2204,6 +2574,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea" integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ== +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + "@jridgewell/source-map@^0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" @@ -2278,56 +2653,56 @@ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== -"@motionone/animation@^10.10.1": - version "10.10.1" - resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.10.1.tgz#d3d3ecb11c6d7507a104b080f31b07be9bc7056d" - integrity sha512-iX839/Ir5wT7hVX0yCZYjcDhHAOkVR5hIhVBTf37qEUD693uVwrxC2i1BI9vMVPc1rIoFtftYjOtwoO9Oq/aog== +"@motionone/animation@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.12.0.tgz#bca8968d3d9c779f8a548678f24206bd36cc60b6" + integrity sha512-SCWkVjMChQwA4Cnt1pdmhCi0OC4cAR+rqsskNEqmbgfG59zmn50TfOP6vgqjkYbaSZXXLeEb03Mez362jIEHRg== dependencies: - "@motionone/easing" "^10.9.0" - "@motionone/types" "^10.9.0" - "@motionone/utils" "^10.9.0" + "@motionone/easing" "^10.12.0" + "@motionone/types" "^10.12.0" + "@motionone/utils" "^10.12.0" tslib "^2.3.1" -"@motionone/dom@^10.11.0": - version "10.11.0" - resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.11.0.tgz#dc2e46b0e21044cc9ae89a994cd6725eac09e48b" - integrity sha512-ST56HBslkeoeDwqRFWafkD+JT5FEwlHqB2K2KGaQh6wo6zfKQ9xwjQcqgDiBv2gg6s8ycjHAdFS6dnMHQ5hXKw== +"@motionone/dom@10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.12.0.tgz#ae30827fd53219efca4e1150a5ff2165c28351ed" + integrity sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw== dependencies: - "@motionone/animation" "^10.10.1" - "@motionone/generators" "^10.9.0" - "@motionone/types" "^10.9.0" - "@motionone/utils" "^10.9.0" + "@motionone/animation" "^10.12.0" + "@motionone/generators" "^10.12.0" + "@motionone/types" "^10.12.0" + "@motionone/utils" "^10.12.0" hey-listen "^1.0.8" tslib "^2.3.1" -"@motionone/easing@^10.9.0": - version "10.9.0" - resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.9.0.tgz#42910c70dd30e1bbba27a9612ce03bca022d0da7" - integrity sha512-FYIr3HlQEb7aE5LOpY6BPQUaPyKeJt6VfGA+npy73+JIGqoVOjbrdZ1ZQxzTXqO76mG3UZvv1+twrDamRQsxFw== +"@motionone/easing@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.12.0.tgz#cc10a00ed5ec9a7a05daf4ef985fcd14840b9a50" + integrity sha512-kdwcn1ja/0//BBHRElX3In1yfqMEhqUoL3G0njDan8R+gfPy3DanyuCtio4VruHQ1m3XN3LcrqavbClzcGo7IA== dependencies: - "@motionone/utils" "^10.9.0" + "@motionone/utils" "^10.12.0" tslib "^2.3.1" -"@motionone/generators@^10.9.0": - version "10.9.0" - resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.9.0.tgz#46f3e706f45a9566db7e0ce62d677c884813cdaa" - integrity sha512-BOkHx4qQswJV+z/6k05qdvRENE4hG606NI5cIPTsLtSuksnRn83utuj/15VTNoFeYHuTdhwzxvIPvlPVayIGTg== +"@motionone/generators@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.12.0.tgz#2a175c47c741ed3864dd834e6c98efa68798a866" + integrity sha512-QM8/ndOve80HLXImChwW8ogrEM/8m9xzZEl2Ci2ep1uGLAQ+ADiwzKtl11inGESrxiFDrUdD12WXacCn+y172Q== dependencies: - "@motionone/types" "^10.9.0" - "@motionone/utils" "^10.9.0" + "@motionone/types" "^10.12.0" + "@motionone/utils" "^10.12.0" tslib "^2.3.1" -"@motionone/types@^10.9.0": - version "10.9.0" - resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.9.0.tgz#7caa9c1b746dd30bcf6104ce9c82a5a928385da2" - integrity sha512-ZcEDfsrS2ym9+vExV7+59avkzEO/PLkNj16uaDvbWhi0Q/vOZ72j2LQTrtDLWVyZRIeUaB/i8DJP017Gj6UYQw== +"@motionone/types@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.12.0.tgz#06ede843d4c2990edbd22ecf8d5568d1fcd1f105" + integrity sha512-D9k7ijkAT6JJOCMUVn9IgJqWolp7N3oBbWRQTIRGGO41Bmr/JzLv4GzAb00PvkYAzZX+BpnSTKqXI19zrSjC5w== -"@motionone/utils@^10.9.0": - version "10.9.0" - resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.9.0.tgz#a68fe41fe37e4365b07dfc676f014a0e43b8beb2" - integrity sha512-5IgmwQ8TdH1HsQ9d2QZeBCu9+HkqjoYRYItRpmusoyiedPMZaKdU3pr3qFP5nbAj68Ww2sTUxgEZEOF20qJA6w== +"@motionone/utils@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.12.0.tgz#e8432a96bb7f91148987d0baaab6653ae727f9ee" + integrity sha512-2g3tCqYYwb/tgzCDRbILbD5edXJB45HV51NbnhwKVOOl0PhFraRDtehzLKo9wLHdaTnO/IjVn6cHQsw6RjdolA== dependencies: - "@motionone/types" "^10.9.0" + "@motionone/types" "^10.12.0" hey-listen "^1.0.8" tslib "^2.3.1" @@ -2523,7 +2898,7 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@slorber/static-site-generator-webpack-plugin@^4.0.4": +"@slorber/static-site-generator-webpack-plugin@^4.0.7": version "4.0.7" resolved "https://registry.yarnpkg.com/@slorber/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.7.tgz#fc1678bddefab014e2145cbe25b3ce4e1cfc36f3" integrity sha512-Ug7x6z5lwrz0WqdnNFOMYrDQNTPAprvHLSh6+/fmml3qUiz6l5eq+2MzLKWtn/q5K5NpSiFsZTP/fck/3vjSxA== @@ -4032,10 +4407,10 @@ "@testing-library/dom" "^8.5.0" "@types/react-dom" "^18.0.0" -"@testing-library/user-event@^14.2.1": - version "14.2.1" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.2.1.tgz#8c5ff2d004544bb2220e1d864f7267fe7eb6c556" - integrity sha512-HOr1QiODrq+0j9lKU5i10y9TbhxMBMRMGimNx10asdmau9cb8Xb1Vyg0GvTwyIL2ziQyh2kAloOtAQFBQVuecA== +"@testing-library/user-event@^14.2.6": + version "14.2.6" + resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.2.6.tgz#9ba313a212994eea66e018520e23542ac3eb6fbe" + integrity sha512-l/4W4x3Lm24wkWNkPasXqvEzG+a6n2X872XCUjhyfbNqcoOapaWyCxC5Fz+E4r7JPu8gysQKSSCrK0OO2x+D+A== "@tootallnate/once@1": version "1.1.2" @@ -4340,10 +4715,10 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@18.x", "@types/node@^18.0.0": - version "18.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.0.tgz#67c7b724e1bcdd7a8821ce0d5ee184d3b4dd525a" - integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA== +"@types/node@*", "@types/node@18.x", "@types/node@^18.0.6": + version "18.0.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.6.tgz#0ba49ac517ad69abe7a1508bc9b3a5483df9d5d7" + integrity sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw== "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0": version "16.11.41" @@ -4417,7 +4792,7 @@ dependencies: "@types/react" "*" -"@types/react-router-config@*": +"@types/react-router-config@*", "@types/react-router-config@^5.0.6": version "5.0.6" resolved "https://registry.yarnpkg.com/@types/react-router-config/-/react-router-config-5.0.6.tgz#87c5c57e72d241db900d9734512c50ccec062451" integrity sha512-db1mx37a1EJDf1XeX8jJN7R3PZABmJQXR8r28yUjVMFSjkmnQo6X6pOEEmNl+Tp2gYQOGPdYbFIipBtdElZ3Yg== @@ -4450,10 +4825,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@17.0.43", "@types/react@^18.0.9": - version "17.0.43" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.43.tgz#4adc142887dd4a2601ce730bc56c3436fdb07a55" - integrity sha512-8Q+LNpdxf057brvPu1lMtC5Vn7J119xrP1aq4qiaefNioQUYANF/CYeK4NsKorSZyUGJ66g0IM+4bbjwx45o2A== +"@types/react@*", "@types/react@^18.0.1", "@types/react@^18.0.9": + version "18.0.15" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.15.tgz#d355644c26832dc27f3e6cbf0c4f4603fc4ab7fe" + integrity sha512-iz3BtLuIYH1uWdsv6wXYdhozhqj20oD4/Hk2DNXIn1kFsmp9x8d9QB6FnPhfkbhd2PgEONt9Q1x/ebkwjfFLow== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -4553,10 +4928,10 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== -"@types/vscode@^1.68.0": - version "1.68.0" - resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.68.0.tgz#c0864e4ea43c509bfc6b53f4e91aa923fd0475b8" - integrity sha512-duBwEK5ta/eBBMJMQ7ECMEsMvlE3XJdRGh3xoS1uOO4jl2Z4LPBl5vx8WvBP10ERAgDRmIt/FaSD4RHyBGbChw== +"@types/vscode@^1.69.0": + version "1.69.0" + resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.69.0.tgz#a472011af392fbcf82cbb82f60b4c239c21b921c" + integrity sha512-RlzDAnGqUoo9wS6d4tthNyAdZLxOIddLiX3djMoWk29jFfSA1yJbIwr0epBYqqYarWB6s2Z+4VaZCQ80Jaa3kA== "@types/webpack-env@^1.16.0": version "1.17.0" @@ -4626,14 +5001,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.30.4", "@typescript-eslint/eslint-plugin@^5.5.0": - version "5.30.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.4.tgz#a46c8c0ab755a936cb63786a6222876ce51675e4" - integrity sha512-xjujQISAIa4HAaos8fcMZXmqkuZqMx6icdxkI88jMM/eNe4J8AuTLYnLK+zdm0mBYLyctdFf//UE4/xFCcQzYQ== +"@typescript-eslint/eslint-plugin@^5.30.6", "@typescript-eslint/eslint-plugin@^5.5.0": + version "5.30.6" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.6.tgz#9c6017b6c1d04894141b4a87816388967f64c359" + integrity sha512-J4zYMIhgrx4MgnZrSDD7sEnQp7FmhKNOaqaOpaoQ/SfdMfRB/0yvK74hTnvH+VQxndZynqs5/Hn4t+2/j9bADg== dependencies: - "@typescript-eslint/scope-manager" "5.30.4" - "@typescript-eslint/type-utils" "5.30.4" - "@typescript-eslint/utils" "5.30.4" + "@typescript-eslint/scope-manager" "5.30.6" + "@typescript-eslint/type-utils" "5.30.6" + "@typescript-eslint/utils" "5.30.6" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -4648,14 +5023,14 @@ dependencies: "@typescript-eslint/utils" "5.29.0" -"@typescript-eslint/parser@^5.30.4", "@typescript-eslint/parser@^5.5.0": - version "5.30.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.4.tgz#659411e8700b22c8d5400798ef24838425bf4567" - integrity sha512-/ge1HtU63wVoED4VnlU2o+FPFmi017bPYpeSrCmd8Ycsti4VSxXrmcpXXm7JpI4GT0Aa7qviabv1PEp6L5bboQ== +"@typescript-eslint/parser@^5.30.6", "@typescript-eslint/parser@^5.5.0": + version "5.30.6" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.6.tgz#add440db038fa9d777e4ebdaf66da9e7fb7abe92" + integrity sha512-gfF9lZjT0p2ZSdxO70Xbw8w9sPPJGfAdjK7WikEjB3fcUI/yr9maUVEdqigBjKincUYNKOmf7QBMiTf719kbrA== dependencies: - "@typescript-eslint/scope-manager" "5.30.4" - "@typescript-eslint/types" "5.30.4" - "@typescript-eslint/typescript-estree" "5.30.4" + "@typescript-eslint/scope-manager" "5.30.6" + "@typescript-eslint/types" "5.30.6" + "@typescript-eslint/typescript-estree" "5.30.6" debug "^4.3.4" "@typescript-eslint/scope-manager@5.29.0": @@ -4666,20 +5041,20 @@ "@typescript-eslint/types" "5.29.0" "@typescript-eslint/visitor-keys" "5.29.0" -"@typescript-eslint/scope-manager@5.30.4": - version "5.30.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.4.tgz#8140efd2bc12d41d74e8af23872a89f3edbe552e" - integrity sha512-DNzlQwGSiGefz71JwaHrpcaAX3zYkEcy8uVuan3YMKOa6qeW/y+7SaD8KIsIAruASwq6P+U4BjWBWtM2O+mwBQ== +"@typescript-eslint/scope-manager@5.30.6": + version "5.30.6" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.6.tgz#ce1b49ff5ce47f55518d63dbe8fc9181ddbd1a33" + integrity sha512-Hkq5PhLgtVoW1obkqYH0i4iELctEKixkhWLPTYs55doGUKCASvkjOXOd/pisVeLdO24ZX9D6yymJ/twqpJiG3g== dependencies: - "@typescript-eslint/types" "5.30.4" - "@typescript-eslint/visitor-keys" "5.30.4" + "@typescript-eslint/types" "5.30.6" + "@typescript-eslint/visitor-keys" "5.30.6" -"@typescript-eslint/type-utils@5.30.4": - version "5.30.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.4.tgz#00ff19073cd01f7d27e9af49ce08d6a69f1e4f01" - integrity sha512-55cf1dZviwwv+unDB+mF8vZkfta5muTK6bppPvenWWCD7slZZ0DEsXUjZerqy7Rq8s3J4SXdg4rMIY8ngCtTmA== +"@typescript-eslint/type-utils@5.30.6": + version "5.30.6" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.6.tgz#a64aa9acbe609ab77f09f53434a6af2b9685f3af" + integrity sha512-GFVVzs2j0QPpM+NTDMXtNmJKlF842lkZKDSanIxf+ArJsGeZUIaeT4jGg+gAgHt7AcQSFwW7htzF/rbAh2jaVA== dependencies: - "@typescript-eslint/utils" "5.30.4" + "@typescript-eslint/utils" "5.30.6" debug "^4.3.4" tsutils "^3.21.0" @@ -4688,10 +5063,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.29.0.tgz#7861d3d288c031703b2d97bc113696b4d8c19aab" integrity sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg== -"@typescript-eslint/types@5.30.4": - version "5.30.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.4.tgz#3bc99eca8ba3fcfd6a21480e216b09dab81c3999" - integrity sha512-NTEvqc+Vvu8Q6JeAKryHk2eqLKqsr2St3xhIjhOjQv5wQUBhaTuix4WOSacqj0ONWfKVU12Eug3LEAB95GBkMA== +"@typescript-eslint/types@5.30.6": + version "5.30.6" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.6.tgz#86369d0a7af8c67024115ac1da3e8fb2d38907e1" + integrity sha512-HdnP8HioL1F7CwVmT4RaaMX57RrfqsOMclZc08wGMiDYJBsLGBM7JwXM4cZJmbWLzIR/pXg1kkrBBVpxTOwfUg== "@typescript-eslint/typescript-estree@5.29.0": version "5.29.0" @@ -4706,13 +5081,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.30.4": - version "5.30.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.4.tgz#ac4be8a2f8fb1f1c3b346d5992a36163121ddb3f" - integrity sha512-V4VnEs6/J9/nNizaA12IeU4SAeEYaiKr7XndLNfV5+3zZSB4hIu6EhHJixTKhvIqA+EEHgBl6re8pivBMLLO1w== +"@typescript-eslint/typescript-estree@5.30.6": + version "5.30.6" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.6.tgz#a84a0d6a486f9b54042da1de3d671a2c9f14484e" + integrity sha512-Z7TgPoeYUm06smfEfYF0RBkpF8csMyVnqQbLYiGgmUSTaSXTP57bt8f0UFXstbGxKIreTwQCujtaH0LY9w9B+A== dependencies: - "@typescript-eslint/types" "5.30.4" - "@typescript-eslint/visitor-keys" "5.30.4" + "@typescript-eslint/types" "5.30.6" + "@typescript-eslint/visitor-keys" "5.30.6" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -4731,15 +5106,15 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/utils@5.30.4", "@typescript-eslint/utils@^5.13.0": - version "5.30.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.4.tgz#07a2b7ce80b2527ea506829f190591b76c70ba9f" - integrity sha512-a+GQrJzOUhn4WT1mUumXDyam+22Oo4c5K/jnZ+6r/4WTQF3q8e4CsC9PLHb4SnOClzOqo/5GLZWvkE1aa5UGKQ== +"@typescript-eslint/utils@5.30.6", "@typescript-eslint/utils@^5.13.0": + version "5.30.6" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.6.tgz#1de2da14f678e7d187daa6f2e4cdb558ed0609dc" + integrity sha512-xFBLc/esUbLOJLk9jKv0E9gD/OH966M40aY9jJ8GiqpSkP2xOV908cokJqqhVd85WoIvHVHYXxSFE4cCSDzVvA== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.30.4" - "@typescript-eslint/types" "5.30.4" - "@typescript-eslint/typescript-estree" "5.30.4" + "@typescript-eslint/scope-manager" "5.30.6" + "@typescript-eslint/types" "5.30.6" + "@typescript-eslint/typescript-estree" "5.30.6" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -4751,12 +5126,12 @@ "@typescript-eslint/types" "5.29.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@5.30.4": - version "5.30.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.4.tgz#b4969df1a440cc999d4bb7f7b7932dce05537089" - integrity sha512-ulKGse3mruSc8x6l8ORSc6+1ORyJzKmZeIaRTu/WpaF/jx3vHvEn5XZUKF9XaVg2710mFmTAUlLcLYLPp/Zf/Q== +"@typescript-eslint/visitor-keys@5.30.6": + version "5.30.6" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.6.tgz#94dd10bb481c8083378d24de1742a14b38a2678c" + integrity sha512-41OiCjdL2mCaSDi2SvYbzFLlqqlm5v1ZW9Ym55wXKL/Rx6OOB1IbuFGo71Fj6Xy90gJDFTlgOS+vbmtGHPTQQA== dependencies: - "@typescript-eslint/types" "5.30.4" + "@typescript-eslint/types" "5.30.6" eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": @@ -5222,10 +5597,10 @@ ajv@^8.0.0, ajv@^8.6.0, ajv@^8.8.0: require-from-string "^2.0.2" uri-js "^4.2.2" -algoliasearch-helper@^3.8.2: - version "3.9.0" - resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.9.0.tgz#1e99d351ecdcff48449644157a8d250c7c592828" - integrity sha512-siWWl8QYJ3sh1yzJf9h/cHHpZC8wuPoPdVx5OtQ8X62ruUembTwvsLYoicrL7pF7fsYxdyvJfV9Yb2/nrVGrfg== +algoliasearch-helper@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.10.0.tgz#59a0f645dd3c7e55cf01faa568d1af50c49d36f6" + integrity sha512-4E4od8qWWDMVvQ3jaRX6Oks/k35ywD011wAA4LbYMMjOtaZV6VWaTjRr4iN2bdaXP2o1BP7SLFMBf3wvnHmd8Q== dependencies: "@algolia/events" "^4.0.1" @@ -5480,11 +5855,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array-union@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-3.0.1.tgz#da52630d327f8b88cfbfb57728e2af5cd9b6b975" - integrity sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw== - array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -5766,7 +6136,7 @@ babel-plugin-named-exports-order@^0.0.2: resolved "https://registry.yarnpkg.com/babel-plugin-named-exports-order/-/babel-plugin-named-exports-order-0.0.2.tgz#ae14909521cf9606094a2048239d69847540cb09" integrity sha512-OgOYHOLoRK+/mvXU9imKHlG6GkPLYrUCvFXG/CM93R/aNNO8pOOF4aS+S8CCHMDQoNSeiOYEZb/G6RwL95Jktw== -babel-plugin-polyfill-corejs2@^0.3.0: +babel-plugin-polyfill-corejs2@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz#440f1b70ccfaabc6b676d196239b138f8a2cfba5" integrity sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w== @@ -5783,7 +6153,7 @@ babel-plugin-polyfill-corejs3@^0.1.0: "@babel/helper-define-polyfill-provider" "^0.1.5" core-js-compat "^3.8.1" -babel-plugin-polyfill-corejs3@^0.5.0: +babel-plugin-polyfill-corejs3@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz#aabe4b2fa04a6e038b688c5e55d44e78cd3a5f72" integrity sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ== @@ -5791,7 +6161,7 @@ babel-plugin-polyfill-corejs3@^0.5.0: "@babel/helper-define-polyfill-provider" "^0.3.1" core-js-compat "^3.21.0" -babel-plugin-polyfill-regenerator@^0.3.0: +babel-plugin-polyfill-regenerator@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz#2c0678ea47c75c8cc2fbb1852278d8fb68233990" integrity sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A== @@ -6461,7 +6831,7 @@ case-sensitive-paths-webpack-plugin@^2.3.0, case-sensitive-paths-webpack-plugin@ resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz#db64066c6422eed2e08cc14b986ca43796dbc6d4" integrity sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw== -ccount@^1.0.0, ccount@^1.0.3: +ccount@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== @@ -6554,7 +6924,7 @@ cheerio-select@^2.1.0: domhandler "^5.0.3" domutils "^3.0.1" -cheerio@^1.0.0-rc.1, cheerio@^1.0.0-rc.11: +cheerio@^1.0.0-rc.1: version "1.0.0-rc.11" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.11.tgz#1be84be1a126958366bcc57a11648cd9b30a60c2" integrity sha512-bQwNaDIBKID5ts/DsdhxrjqFXYfLw4ste+wMKqWA8DyKcS4qwsPP4Bk8ZNaTJjvpiX/qW3BT4sU7d6Bh5i+dag== @@ -6568,6 +6938,19 @@ cheerio@^1.0.0-rc.1, cheerio@^1.0.0-rc.11: parse5-htmlparser2-tree-adapter "^7.0.0" tslib "^2.4.0" +cheerio@^1.0.0-rc.12: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" + parse5-htmlparser2-tree-adapter "^7.0.0" + chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" @@ -6727,10 +7110,10 @@ clone@~2.1.2: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== -clsx@^1.1.1, clsx@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.0.tgz#b0e415ea7537dbac01b169c5cec1caeb11d86566" - integrity sha512-EPRP7XJsM1y0iCU3Z7C7jFKdQboXSeHgEfzQUTlz7m5NP3hDrlz48aUsmNGp4pC+JOW9WA3vIRqlYuo/bl4Drw== +clsx@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== co@^4.6.0: version "4.6.0" @@ -6866,10 +7249,10 @@ commander@^8.0.0, commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== -commander@^9.3.0: - version "9.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.3.0.tgz#f619114a5a2d2054e0d9ff1b31d5ccf89255e26b" - integrity sha512-hv95iU5uXPbK83mjrJKuZyFM/LBAoCV/XhVGkS5Je6tl7sxr6A0ITMw5WoRV46/UaJ46Nllm3Xt7IaJhXTIkzw== +commander@^9.3.0, commander@^9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.0.tgz#bc4a40918fefe52e22450c111ecd6b7acce6f11c" + integrity sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw== common-path-prefix@^3.0.0: version "3.0.0" @@ -6948,10 +7331,10 @@ confusing-browser-globals@^1.0.11: resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== -connect-history-api-fallback@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== +connect-history-api-fallback@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" + integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== consola@^2.15.3: version "2.15.3" @@ -7066,10 +7449,10 @@ core-js@^2.4.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== -core-js@^3.0.4, core-js@^3.19.2, core-js@^3.22.7, core-js@^3.6.5, core-js@^3.8.2: - version "3.23.2" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.2.tgz#e07a60ca8b14dd129cabdc3d2551baf5a01c76f0" - integrity sha512-ELJOWxNrJfOH/WK4VJ3Qd+fOqZuOuDNDJz0xG6Bt4mGg2eO/UT9CljCrbqDGovjLKUrGajEEBcoTOc0w+yBYeQ== +core-js@^3.0.4, core-js@^3.19.2, core-js@^3.23.3, core-js@^3.6.5, core-js@^3.8.2: + version "3.23.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.4.tgz#92d640faa7f48b90bbd5da239986602cfc402aa6" + integrity sha512-vjsKqRc1RyAJC3Ye2kYqgfdThb3zYnx9CrqoCcjMOENMtQPC7ZViBvlDxwYU/2z2NI/IPuiXw5mT4hWhddqjzQ== core-util-is@~1.0.0: version "1.0.3" @@ -7407,7 +7790,7 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-advanced@^5.3.5: +cssnano-preset-advanced@^5.3.8: version "5.3.8" resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.8.tgz#027b1d05ef896d908178c483f0ec4190cb50ef9a" integrity sha512-xUlLLnEB1LjpEik+zgRNlk8Y/koBPPtONZjp7JKbXigeAmCrFvq9H0pXW5jJV45bQWAlmJ0sKy+IMr0XxLYQZg== @@ -7459,7 +7842,7 @@ cssnano-utils@^3.1.0: resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-3.1.0.tgz#95684d08c91511edfc70d2636338ca37ef3a6861" integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA== -cssnano@^5.0.6, cssnano@^5.1.8, cssnano@^5.1.9: +cssnano@^5.0.6, cssnano@^5.1.12, cssnano@^5.1.8: version "5.1.12" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.12.tgz#bcd0b64d6be8692de79332c501daa7ece969816c" integrity sha512-TgvArbEZu0lk/dvg2ja+B7kYoD7BBCmn3+k58xD0qjrGHsFzXY/wKTo9M5egcUCabPol05e/PVoIu79s2JN4WQ== @@ -8587,10 +8970,10 @@ eslint-webpack-plugin@^3.1.1: normalize-path "^3.0.0" schema-utils "^3.1.1" -eslint@^8.18.0, eslint@^8.3.0: - version "8.18.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.18.0.tgz#78d565d16c993d0b73968c523c0446b13da784fd" - integrity sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA== +eslint@^8.20.0, eslint@^8.3.0: + version "8.20.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.20.0.tgz#048ac56aa18529967da8354a478be4ec0a2bc81b" + integrity sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA== dependencies: "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.9.2" @@ -8884,7 +9267,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.2.11, fast-glob@^3.2.7, fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -9250,12 +9633,12 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -framer-motion@^6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-6.4.1.tgz#d351a96d80bea5736af4175e6307bc63bb4daed1" - integrity sha512-JiVnG3p0mO9yWxjNx3xxJaKP4hTWdm6oIbzfMJZEMtoOahSNoDTRZA/mFPzfVNj2foKwFPOLFv/lw8UUZjyUqA== +framer-motion@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-6.5.1.tgz#802448a16a6eb764124bf36d8cbdfa6dd6b931a7" + integrity sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw== dependencies: - "@motionone/dom" "^10.11.0" + "@motionone/dom" "10.12.0" framesync "6.0.1" hey-listen "^1.0.8" popmotion "11.0.3" @@ -9398,10 +9781,10 @@ gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -gentype@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/gentype/-/gentype-4.4.0.tgz#20a61776703ce79c638c4db34b8808e1896d3267" - integrity sha512-hLcKmMhD3DJzHffDqwYUkEZfdGSWJk6ehYmdzGHBs35mTJa2dhiAp31WqmhjkZIqKvD+A+gFEE+//QHG5dZfwg== +gentype@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/gentype/-/gentype-4.5.0.tgz#460152da93db783626fd25bbd38fb574d886f5f3" + integrity sha512-XqHBQPS6Qb2HSgNJAwYRXbQJ4LSvz+MgNvuWnj8bz0teSorsy2kDxA6F1eZx5ft8cnfKAls4uNEgd5uNcPbQDg== get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" @@ -9603,19 +9986,7 @@ globby@^11.0.1, globby@^11.0.2, globby@^11.0.4, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -globby@^12.0.0: - version "12.2.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-12.2.0.tgz#2ab8046b4fba4ff6eede835b29f678f90e3d3c22" - integrity sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA== - dependencies: - array-union "^3.0.1" - dir-glob "^3.0.1" - fast-glob "^3.2.7" - ignore "^5.1.9" - merge2 "^1.4.1" - slash "^4.0.0" - -globby@^13.1.1: +globby@^13.0.0, globby@^13.1.1: version "13.1.2" resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.2.tgz#29047105582427ab6eca4f905200667b056da515" integrity sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ== @@ -9835,17 +10206,6 @@ hast-to-hyperscript@^9.0.0: unist-util-is "^4.0.0" web-namespaces "^1.0.0" -hast-util-from-parse5@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-5.0.3.tgz#3089dc0ee2ccf6ec8bc416919b51a54a589e097c" - integrity sha512-gOc8UB99F6eWVWFtM9jUikjN7QkWxB3nY0df5Z0Zq1/Nkwl5V4hAAsl0tmwlgWl/1shlTF8DnNYLO8X6wRV9pA== - dependencies: - ccount "^1.0.3" - hastscript "^5.0.0" - property-information "^5.0.0" - web-namespaces "^1.1.2" - xtend "^4.0.1" - hast-util-from-parse5@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz#554e34abdeea25ac76f5bd950a1f0180e0b3bc2a" @@ -9912,16 +10272,6 @@ hast-util-to-text@^2.0.0: repeat-string "^1.0.0" unist-util-find-after "^3.0.0" -hastscript@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.1.2.tgz#bde2c2e56d04c62dd24e8c5df288d050a355fb8a" - integrity sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ== - dependencies: - comma-separated-tokens "^1.0.0" - hast-util-parse-selector "^2.0.0" - property-information "^5.0.0" - space-separated-tokens "^1.0.0" - hastscript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640" @@ -10254,7 +10604,7 @@ ignore@^4.0.3: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.9, ignore@^5.2.0: +ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -10319,10 +10669,10 @@ infer-owner@^1.0.3, infer-owner@^1.0.4: resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== -infima@0.2.0-alpha.39: - version "0.2.0-alpha.39" - resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.39.tgz#054b13ac44f3e9a42bc083988f1a1586add2f59c" - integrity sha512-UyYiwD3nwHakGhuOUfpe3baJ8gkiPpRVx4a4sE/Ag+932+Y6swtLsdPoRR8ezhwqGnduzxmFkjumV9roz6QoLw== +infima@0.2.0-alpha.42: + version "0.2.0-alpha.42" + resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.42.tgz#f6e86a655ad40877c6b4d11b2ede681eb5470aa5" + integrity sha512-ift8OXNbQQwtbIt6z16KnSWP7uJ/SysSMFI4F87MNRTicypfl4Pv3E2OGVv6N3nSZFJvA8imYulCBS64iyHYww== inflight@^1.0.4: version "1.0.6" @@ -12352,7 +12702,7 @@ mini-create-react-context@^0.4.0: "@babel/runtime" "^7.12.1" tiny-warning "^1.0.3" -mini-css-extract-plugin@^2.4.5, mini-css-extract-plugin@^2.6.0, mini-css-extract-plugin@^2.6.1: +mini-css-extract-plugin@^2.4.5, mini-css-extract-plugin@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.1.tgz#9a1251d15f2035c342d99a468ab9da7a0451b71e" integrity sha512-wd+SD57/K6DiV7jIR34P+s3uckTRuQvx0tKPcvjFlrEylk6P4mQ2KSWk1hblj1Kxaqok7LogKOieygXqBczNlg== @@ -13262,11 +13612,6 @@ parse5@6.0.1, parse5@^6.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parse5@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" - integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== - parse5@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.0.0.tgz#51f74a5257f5fcc536389e8c2d0b3802e1bfa91a" @@ -13559,18 +13904,18 @@ postcss-clamp@^4.1.0: dependencies: postcss-value-parser "^4.2.0" -postcss-cli@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-9.1.0.tgz#1a86404cbe848e370127b4bdf5cd2be83bc45ebe" - integrity sha512-zvDN2ADbWfza42sAnj+O2uUWyL0eRL1V+6giM2vi4SqTR3gTYy8XzcpfwccayF2szcUif0HMmXiEaDv9iEhcpw== +postcss-cli@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-10.0.0.tgz#404e468d1ff39fb5ead3f707e2021be7cd3f8c9f" + integrity sha512-Wjy/00wBBEgQqnSToznxLWDnATznokFGXsHtF/3G8glRZpz5KYlfHcBW/VMJmWAeF2x49zjgy4izjM3/Wx1dKA== dependencies: chokidar "^3.3.0" dependency-graph "^0.11.0" fs-extra "^10.0.0" get-stdin "^9.0.0" - globby "^12.0.0" + globby "^13.0.0" picocolors "^1.0.0" - postcss-load-config "^3.0.0" + postcss-load-config "^4.0.0" postcss-reporter "^7.0.0" pretty-hrtime "^1.0.3" read-cache "^1.0.0" @@ -13758,7 +14103,7 @@ postcss-lab-function@^4.2.0: "@csstools/postcss-progressive-custom-properties" "^1.1.0" postcss-value-parser "^4.2.0" -postcss-load-config@^3.0.0, postcss-load-config@^3.1.4: +postcss-load-config@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== @@ -13766,6 +14111,14 @@ postcss-load-config@^3.0.0, postcss-load-config@^3.1.4: lilconfig "^2.0.5" yaml "^1.10.2" +postcss-load-config@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.1.tgz#152383f481c2758274404e4962743191d73875bd" + integrity sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA== + dependencies: + lilconfig "^2.0.5" + yaml "^2.1.1" + postcss-loader@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-4.3.0.tgz#2c4de9657cd4f07af5ab42bd60a673004da1b8cc" @@ -13786,10 +14139,10 @@ postcss-loader@^6.2.1: klona "^2.0.5" semver "^7.3.5" -postcss-loader@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.0.0.tgz#367d10eb1c5f1d93700e6b399683a6dc7c3af396" - integrity sha512-IDyttebFzTSY6DI24KuHUcBjbAev1i+RyICoPEWcAstZsj03r533uMXtDn506l6/wlsRYiS5XBdx7TpccCsyUg== +postcss-loader@^7.0.0, postcss-loader@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.0.1.tgz#4c883cc0a1b2bfe2074377b7a74c1cd805684395" + integrity sha512-VRviFEyYlLjctSM93gAZtcJJ/iSkPZ79zWbN/1fSH+NisBByEiVLqpdVDrPLVSi8DX0oJo12kL/GppTBdKVXiQ== dependencies: cosmiconfig "^7.0.0" klona "^2.0.5" @@ -14275,7 +14628,7 @@ pretty-time@^1.1.0: resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e" integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== -prism-react-renderer@^1.3.3, prism-react-renderer@^1.3.5: +prism-react-renderer@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz#786bb69aa6f73c32ba1ee813fbe17a0115435085" integrity sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg== @@ -14706,10 +15059,10 @@ react-helmet-async@*, react-helmet-async@^1.3.0: react-fast-compare "^3.2.0" shallowequal "^1.1.0" -react-hook-form@^7.33.0: - version "7.33.0" - resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.33.0.tgz#44a87ddd630f00ebeb0f15aa978f69ca74b8a77b" - integrity sha512-h8XoeUHQs1Snx1s/sSvM+eVTSKkWQt8TcrbL+3/Rt5gugxpy4ueL5ZZkubffyNpUyyTz0qM0kwOi2c+JgGTjLA== +react-hook-form@^7.33.1: + version "7.33.1" + resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.33.1.tgz#8c4410e3420788d3b804d62cc4c142915c2e46d0" + integrity sha512-ydTfTxEJdvgjCZBj5DDXRc58oTEfnFupEwwTAQ9FSKzykEJkX+3CiAkGtAMiZG7IPWHuzgT6AOBfogiKhUvKgg== react-inspector@^5.1.0: version "5.1.1" @@ -14898,17 +15251,17 @@ react-use@^17.4.0: ts-easing "^0.2.0" tslib "^2.1.0" -react-vega@^7.5.1: - version "7.5.1" - resolved "https://registry.yarnpkg.com/react-vega/-/react-vega-7.5.1.tgz#574ada8b53aa8bdae61a286c1e0fb5a8efdbd064" - integrity sha512-pbcSrLsqmUP2+1v+/im99GdGompT0jJwJo9Cjq3QQ9URUYMuEEvfTCergEtfVRcBjC6bPTN6sLbe+8yQSqB4jg== +react-vega@^7.6.0: + version "7.6.0" + resolved "https://registry.yarnpkg.com/react-vega/-/react-vega-7.6.0.tgz#b791c944046b20e02d366c7d0f8dcc21bdb4a6bb" + integrity sha512-2oMML4wH9qWLnZPRxJm06ozwrVN/K+nkjqdI5/ofWWsrBnnH4iB9rRKrsV8px0nlWgZrwfdCH4g5RUiyyJHWSA== dependencies: "@types/react" "*" fast-deep-equal "^3.1.1" prop-types "^15.8.1" vega-embed "^6.5.1" -react@^18.1.0: +react@^18.0.0, react@^18.1.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== @@ -15127,6 +15480,18 @@ regexpu-core@^5.0.1: unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.0.0" +regexpu-core@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.1.0.tgz#2f8504c3fd0ebe11215783a41541e21c79942c6d" + integrity sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA== + dependencies: + regenerate "^1.4.2" + regenerate-unicode-properties "^10.0.1" + regjsgen "^0.6.0" + regjsparser "^0.8.2" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" + registry-auth-token@^4.0.0: version "4.2.2" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.2.tgz#f02d49c3668884612ca031419491a13539e21fac" @@ -15165,15 +15530,6 @@ rehype-katex@^5: unified "^9.0.0" unist-util-visit "^2.0.0" -rehype-parse@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-6.0.2.tgz#aeb3fdd68085f9f796f1d3137ae2b85a98406964" - integrity sha512-0S3CpvpTAgGmnz8kiCyFLGuW5yA4OQhyNTm/nwPopZ7+PI11WnGl1TTWTGv/2hPEe/g2jRLlhVVSsoDH8waRug== - dependencies: - hast-util-from-parse5 "^5.0.0" - parse5 "^5.0.0" - xtend "^4.0.0" - rehype-parse@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-7.0.1.tgz#58900f6702b56767814afc2a9efa2d42b1c90c57" @@ -15194,15 +15550,6 @@ release-zalgo@^1.0.0: dependencies: es6-error "^4.0.1" -remark-admonitions@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/remark-admonitions/-/remark-admonitions-1.2.1.tgz#87caa1a442aa7b4c0cafa04798ed58a342307870" - integrity sha512-Ji6p68VDvD+H1oS95Fdx9Ar5WA2wcDA4kwrrhVU7fGctC6+d3uiMICu7w7/2Xld+lnU7/gi+432+rRbup5S8ow== - dependencies: - rehype-parse "^6.0.2" - unified "^8.4.2" - unist-util-visit "^2.0.1" - remark-emoji@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/remark-emoji/-/remark-emoji-2.2.0.tgz#1c702090a1525da5b80e15a8f963ef2c8236cac7" @@ -15414,7 +15761,7 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.3.2, resolve@^1.9.0: +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.3.2, resolve@^1.9.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -16664,10 +17011,10 @@ synchronous-promise@^2.0.15: resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.15.tgz#07ca1822b9de0001f5ff73595f3d08c4f720eb8e" integrity sha512-k8uzYIkIVwmT+TcglpdN50pS2y1BDcUnBPK9iJeGu0Pl1lOI8pD6wtzgw91Pjpe+RxtTncw32tLxs/R0yNL2Mg== -tailwindcss@^3.0.2, tailwindcss@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.4.tgz#64b09059805505902139fa805d97046080bd90b9" - integrity sha512-NrxbFV4tYsga/hpWbRyUfIaBrNMXDxx5BsHgBS4v5tlyjf+sDsgBg5m9OxjrXIqAS/uR9kicxLKP+bEHI7BSeQ== +tailwindcss@^3.0.2, tailwindcss@^3.1.6: + version "3.1.6" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.6.tgz#bcb719357776c39e6376a8d84e9834b2b19a49f1" + integrity sha512-7skAOY56erZAFQssT1xkpk+kWt2NrO45kORlxFPXUt3CiGsVPhH1smuH5XoDH6sGPXLyBv+zgCKA2HWBsgCytg== dependencies: arg "^5.0.2" chokidar "^3.5.3" @@ -16690,7 +17037,7 @@ tailwindcss@^3.0.2, tailwindcss@^3.1.3: postcss-selector-parser "^6.0.10" postcss-value-parser "^4.2.0" quick-lru "^5.1.1" - resolve "^1.22.0" + resolve "^1.22.1" tapable@^1.0.0, tapable@^1.1.3: version "1.1.3" @@ -16792,7 +17139,7 @@ terser-webpack-plugin@^4.2.3: terser "^5.3.4" webpack-sources "^1.4.3" -terser-webpack-plugin@^5.0.3, terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.2.5, terser-webpack-plugin@^5.3.1: +terser-webpack-plugin@^5.0.3, terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.2.5, terser-webpack-plugin@^5.3.3: version "5.3.3" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz#8033db876dd5875487213e87c627bca323e5ed90" integrity sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ== @@ -17064,10 +17411,10 @@ ts-loader@^9.3.0: micromatch "^4.0.0" semver "^7.3.4" -ts-node@^10.8.1: - version "10.8.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.1.tgz#ea2bd3459011b52699d7e88daa55a45a1af4f066" - integrity sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g== +ts-node@^10.9.1: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" @@ -17112,16 +17459,11 @@ tslib@^1.0.0, tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0, tslib@~2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -17304,18 +17646,7 @@ unified@9.2.0: trough "^1.0.0" vfile "^4.0.0" -unified@^8.4.2: - version "8.4.2" - resolved "https://registry.yarnpkg.com/unified/-/unified-8.4.2.tgz#13ad58b4a437faa2751a4a4c6a16f680c500fff1" - integrity sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA== - dependencies: - bail "^1.0.0" - extend "^3.0.0" - is-plain-obj "^2.0.0" - trough "^1.0.0" - vfile "^4.0.0" - -unified@^9.0.0: +unified@^9.0.0, unified@^9.2.2: version "9.2.2" resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.2.tgz#67649a1abfc3ab85d2969502902775eb03146975" integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ== @@ -17414,7 +17745,7 @@ unist-util-visit-parents@^3.0.0: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" -unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.1, unist-util-visit@^2.0.3: +unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.3.tgz#c3703893146df47203bb8a9795af47d7b971208c" integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== @@ -17810,10 +18141,10 @@ vega-label@~1.2.0: vega-scenegraph "^4.9.2" vega-util "^1.15.2" -vega-lite@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-5.2.0.tgz#bc3c5c70a38d9de8f3fb9644c7dd52f3b9f47a1b" - integrity sha512-Yxcg8MvYfxHcG6BbkaKT0oVCIMIcE19UvqIsEwBmyd/7h2nzW7oRnID81T8UrY7hpDrIr6wa2JADOT2dhGNErw== +vega-lite@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-5.3.0.tgz#b9b9ecd80e869e823e6848c67d0a8ad94954bdee" + integrity sha512-6giodZ/bJnWyLq6Gj4OyiDt7EndoGyC9f5xDQjo82yPpUiO4MuG9iiPMqR1SPKmG9/qPBf+klWQR0v/7Mgju0Q== dependencies: "@types/clone" "~2.1.1" array-flat-polyfill "^1.0.1" @@ -17821,11 +18152,11 @@ vega-lite@^5.2.0: fast-deep-equal "~3.1.3" fast-json-stable-stringify "~2.1.0" json-stringify-pretty-compact "~3.0.0" - tslib "~2.3.1" + tslib "~2.4.0" vega-event-selector "~3.0.0" vega-expression "~5.0.0" vega-util "~1.17.0" - yargs "~17.2.1" + yargs "~17.5.1" vega-loader@^4.3.2, vega-loader@^4.4.0, vega-loader@~4.5.0: version "4.5.0" @@ -18095,44 +18426,44 @@ vsce-yarn-patch@^1.66.2: yauzl "^2.3.1" yazl "^2.2.2" -vscode-jsonrpc@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.0.1.tgz#f30b0625ebafa0fb3bc53e934ca47b706445e57e" - integrity sha512-N/WKvghIajmEvXpatSzvTvOIz61ZSmOSa4BRA4pTLi+1+jozquQKP/MkaylP9iB68k73Oua1feLQvH3xQuigiQ== +vscode-jsonrpc@8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz#f239ed2cd6004021b6550af9fd9d3e47eee3cac9" + integrity sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ== -vscode-languageclient@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-8.0.1.tgz#bf5535c4463a78daeaca0bcb4f5868aec86bb301" - integrity sha512-9XoE+HJfaWvu7Y75H3VmLo5WLCtsbxEgEhrLPqwt7eyoR49lUIyyrjb98Yfa50JCMqF2cePJAEVI6oe2o1sIhw== +vscode-languageclient@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-8.0.2.tgz#f1f23ce8c8484aa11e4b7dfb24437d3e59bb61c6" + integrity sha512-lHlthJtphG9gibGb/y72CKqQUxwPsMXijJVpHEC2bvbFqxmkj9LwQ3aGU9dwjBLqsX1S4KjShYppLvg1UJDF/Q== dependencies: minimatch "^3.0.4" semver "^7.3.5" - vscode-languageserver-protocol "3.17.1" + vscode-languageserver-protocol "3.17.2" -vscode-languageserver-protocol@3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.1.tgz#e801762c304f740208b6c804a0cf21f2c87509ed" - integrity sha512-BNlAYgQoYwlSgDLJhSG+DeA8G1JyECqRzM2YO6tMmMji3Ad9Mw6AW7vnZMti90qlAKb0LqAlJfSVGEdqMMNzKg== +vscode-languageserver-protocol@3.17.2: + version "3.17.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz#beaa46aea06ed061576586c5e11368a9afc1d378" + integrity sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg== dependencies: - vscode-jsonrpc "8.0.1" - vscode-languageserver-types "3.17.1" + vscode-jsonrpc "8.0.2" + vscode-languageserver-types "3.17.2" vscode-languageserver-textdocument@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.5.tgz#838769940ece626176ec5d5a2aa2d0aa69f5095c" integrity sha512-1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg== -vscode-languageserver-types@3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.1.tgz#c2d87fa7784f8cac389deb3ff1e2d9a7bef07e16" - integrity sha512-K3HqVRPElLZVVPtMeKlsyL9aK0GxGQpvtAUTfX4k7+iJ4mc1M+JM+zQwkgGy2LzY0f0IAafe8MKqIkJrxfGGjQ== +vscode-languageserver-types@3.17.2: + version "3.17.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz#b2c2e7de405ad3d73a883e91989b850170ffc4f2" + integrity sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA== -vscode-languageserver@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-8.0.1.tgz#56bd7a01f5c88af075a77f1d220edcb30fc4bdc7" - integrity sha512-sn7SjBwWm3OlmLtgg7jbM0wBULppyL60rj8K5HF0ny/MzN+GzPBX1kCvYdybhl7UW63V5V5tRVnyB8iwC73lSQ== +vscode-languageserver@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-8.0.2.tgz#cfe2f0996d9dfd40d3854e786b2821604dfec06d" + integrity sha512-bpEt2ggPxKzsAOZlXmCJ50bV7VrxwCS5BI4+egUmure/oI/t4OlFzi/YNtVvY24A2UDOZAgwFGgnZPwqSJubkA== dependencies: - vscode-languageserver-protocol "3.17.1" + vscode-languageserver-protocol "3.17.2" vscode-uri@^3.0.3: version "3.0.3" @@ -18204,7 +18535,7 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" -web-namespaces@^1.0.0, web-namespaces@^1.1.2: +web-namespaces@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec" integrity sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw== @@ -18301,10 +18632,10 @@ webpack-dev-middleware@^5.3.1: range-parser "^1.2.1" schema-utils "^4.0.0" -webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.0, webpack-dev-server@^4.9.2: - version "4.9.2" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.9.2.tgz#c188db28c7bff12f87deda2a5595679ebbc3c9bc" - integrity sha512-H95Ns95dP24ZsEzO6G9iT+PNw4Q7ltll1GfJHV4fKphuHWgKFzGHWi4alTlTnpk1SPPk41X+l2RB7rLfIhnB9Q== +webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.3: + version "4.9.3" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.9.3.tgz#2360a5d6d532acb5410a668417ad549ee3b8a3c9" + integrity sha512-3qp/eoboZG5/6QgiZ3llN8TUzkSpYg1Ko9khWX1h40MIEUNS2mDoIa8aXsPfskER+GbTvs/IJZ1QTBBhhuetSw== dependencies: "@types/bonjour" "^3.5.9" "@types/connect-history-api-fallback" "^1.3.5" @@ -18318,7 +18649,7 @@ webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.0, webpack-dev-server@^4.9.2: chokidar "^3.5.3" colorette "^2.0.10" compression "^1.7.4" - connect-history-api-fallback "^1.6.0" + connect-history-api-fallback "^2.0.0" default-gateway "^6.0.3" express "^4.17.3" graceful-fs "^4.2.6" @@ -18437,7 +18768,7 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.64.4, webpack@^5.72.1, webpack@^5.73.0, webpack@^5.9.0: +"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.64.4, webpack@^5.73.0, webpack@^5.9.0: version "5.73.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.73.0.tgz#bbd17738f8a53ee5760ea2f59dce7f3431d35d38" integrity sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA== @@ -18894,6 +19225,11 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yaml@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.1.1.tgz#1e06fb4ca46e60d9da07e4f786ea370ed3c3cfec" + integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw== + yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" @@ -18942,7 +19278,7 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.0.0: +yargs@^17.0.0, yargs@~17.5.1: version "17.5.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== @@ -18955,19 +19291,6 @@ yargs@^17.0.0: y18n "^5.0.5" yargs-parser "^21.0.0" -yargs@~17.2.1: - version "17.2.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea" - integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - yauzl@^2.3.1: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"