{"version":3,"sources":["../../../../../../../kform-core/src/commonMain/kotlin/AbsolutePath.kt","../../../../../../../kform-core/src/commonMain/kotlin/Path.kt","common/src/generated/_Arrays.kt","js/src/kotlin/collectionJs.kt","src/kotlin/text/StringBuilder.kt","src/kotlin/util/Standard.kt","common/src/generated/_Collections.kt","../../../../../../../kform-core/src/commonMain/kotlin/Computations.kt","src/kotlin/util/Preconditions.kt","src/kotlin/collections/Maps.kt","../../../../../../../kform-core/src/commonMain/kotlin/ComputedValues.kt","../../../../../../../kform-core/src/commonMain/kotlin/Events.kt","../../../../../../../kform-core/src/commonMain/kotlin/Exceptions.kt","../../../../../../../kform-core/src/commonMain/kotlin/FormManager.kt","../../../../../../../kform-core/src/commonMain/kotlin/FormUtils.kt","../../../../../../../kform-core/src/commonMain/kotlin/Info.kt","src/kotlin/text/Char.kt","src/kotlin/text/Strings.kt","src/kotlin/collections/Collections.kt","src/kotlin/collections/MutableCollections.kt","../../../../../../../kform-core/src/commonMain/kotlin/PathFragments.kt","../../../../../../../kform-core/src/commonMain/kotlin/Schemas.kt","../../../../../../../kform-core/src/commonMain/kotlin/TypeInfo.kt","../../../../../../../kform-core/src/commonMain/kotlin/ValidationIssues.kt","common/src/generated/_Maps.kt","src/kotlin/collections/Sets.kt","../../../../../../../kform-core/src/commonMain/kotlin/Validations.kt","../../../../../../../kform-core/src/commonMain/kotlin/collections/PathMultimap.kt","../../../../../../../kform-core/src/commonMain/kotlin/collections/PathTrie.kt","common/src/generated/_Sequences.kt","../../../../../../../kform-core/src/commonMain/kotlin/datatypes/File.kt","../../../../../../../kform-core/src/commonMain/kotlin/datatypes/Table.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/ActionAccesses.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/ActionManager.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/ComputedValueDependencies.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/Exceptions.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/ExternalIssuesDependencies.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/FormManagerEventsBus.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/InfoImpl.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/SchemaEventsCallbackBus.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/SchemaEventsNoOpBus.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/StateImpl.kt","js/builtins/Library.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/Symbol.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/ValidationDaemon.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/ValidationDependencies.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/WriteValues.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/FormManagerAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/ValueStateAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/AddExternalIssuesAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/ComputeValuesAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/WriteValueStateAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/ReadValueStateAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/GetAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/GetCloneAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/GetExternalContextAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/HasAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/InfoAction.kt","../../../../../../../../../../agent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/flow/internal/SafeCollector.common.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/InvalidateValidationsAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/IsDirtyAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/IsTouchedAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/RemoveAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/RemoveCachedIssuesAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/RemoveDependingExternalIssuesAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/WriteExternalContextAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/RemoveExternalContextAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/RemoveExternalIssuesAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/SetAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/SetDirtyAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/SetExternalContextAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/SetPristineAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/SetTouchedAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/SetUntouchedAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/StartValidationDaemonAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/StopValidationDaemonAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/UpdateDescendantsDisplayingIssuesAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/UpdateStatefulComputedValuesStateAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/UpdateStatefulValidationsStateAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/ValidateAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/actions/ValueInfoAction.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/AbstractCollectionSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/AbstractSimpleSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/BigDecimalSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/BigIntegerSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/BooleanSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/ClassSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/DoubleSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/FileSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/ListSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/NullableSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/StringSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/TableSchema.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/AcceptedFileTypes.kt","js/src/kotlin/text/stringJs.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/AllowedValues.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/ComparableBounds.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/LengthBounds.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/Patterns.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/RequiredValues.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/Scale.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/SizeBounds.kt","../../../../../../../kform-core/src/commonMain/kotlin/validations/UniqueItems.kt","js/src/kotlin/math.kt","../../../../../../../../../../agent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/sync/Mutex.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/ComputationUtils.kt","../../../../../../../kform-core/src/jsMain/kotlin/internal/DelayImmediate.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/KTypeToString.kt","../../../../../../../kform-core/src/commonMain/kotlin/internal/PathUtils.kt","../../../../../../../../../../agent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/flow/operators/Transform.kt","../../../../../../../../../../agent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/flow/operators/Emitters.kt","js/src/kotlin/kotlin.kt","js/runtime/coroutineInternalJS.kt","../../../../../../../kform-core/src/commonMain/kotlin/schemas/util/SchemaRestrictions.kt","../../../../../../../kform-core/src/commonMain/kotlin/util/SchemaPathUtils.kt","../../../../../../../kform-core/src/commonMain/kotlin/util/TablePathUtils.kt"],"sourcesContent":["package io.kform\n\nimport kotlin.js.JsName\nimport kotlin.jvm.JvmField\nimport kotlin.jvm.JvmOverloads\nimport kotlin.math.min\nimport kotlinx.serialization.KSerializer\nimport kotlinx.serialization.Serializable\nimport kotlinx.serialization.descriptors.PrimitiveKind\nimport kotlinx.serialization.descriptors.PrimitiveSerialDescriptor\nimport kotlinx.serialization.descriptors.SerialDescriptor\nimport kotlinx.serialization.encoding.Decoder\nimport kotlinx.serialization.encoding.Encoder\n\n/**\n * Representation of an absolute path as a subtype of [Path] and as a list of absolute path\n * fragments. Absolute paths are always \"resolved\" (i.e. they contain no unnecessary fragments such\n * as current path fragments or consecutive recursive wildcard fragments).\n *\n * Absolute paths represent locations of data from a root location: e.g. the location of a value\n * within a value where the outer value is seen as the \"root\" value.\n *\n * Unlike regular paths, the root fragment is always implicit in absolute paths and is not visible\n * in the list of fragments.\n */\n@JsName(\"AbsolutePathKt\")\n@Serializable(with = AbsolutePath.Serializer::class)\npublic class AbsolutePath\nprivate constructor(fragments: List<PathFragment>, needsResolving: Boolean) :\n    Path(if (needsResolving) resolveImpl(listOf(PathFragment.Root), fragments) else fragments) {\n    // The [realFragments] have a [PathFragment.RootFragment] at index `0`\n    @Suppress(\"UNCHECKED_CAST\")\n    override val fragments: List<AbsolutePathFragment>\n        get() = realFragments.drop(1) as List<AbsolutePathFragment>\n\n    /** Size of the path (number of fragments it has). */\n    public val size: Int\n        get() = realFragments.size - 1\n\n    /** Whether this path represents the root path. */\n    public val isRoot: Boolean\n        get() = realFragments.size == 1\n\n    /** Last fragment of this path or `null` for the root path. */\n    public val lastFragment: AbsolutePathFragment?\n        get() = if (isRoot) null else realFragments.last() as AbsolutePathFragment\n\n    /** Creates an absolute path from a list of [fragments]. */\n    @JvmOverloads\n    public constructor(\n        fragments: List<AbsolutePathFragment> = emptyList()\n    ) : this(\n        // Remove consecutive recursive wildcard fragments\n        listOf(PathFragment.Root) +\n            fragments.filterIndexed { i, fragment ->\n                fragment != AbsolutePathFragment.RecursiveWildcard ||\n                    fragments.getOrNull(i + 1) != AbsolutePathFragment.RecursiveWildcard\n            },\n        needsResolving = false,\n    )\n\n    /**\n     * Creates an absolute path from a path [path]. The path will be resolved against the root path.\n     */\n    public constructor(\n        path: Path\n    ) : this(path.realFragments, needsResolving = path !is AbsolutePath)\n\n    /**\n     * Creates an absolute path from a string representation of a path [stringPath]. The string will\n     * first be converted into a path and then resolved against the root path.\n     */\n    public constructor(stringPath: String) : this(Path(stringPath))\n\n    /**\n     * Returns the fragment of this path with index [index].\n     *\n     * @throws IndexOutOfBoundsException When an out of bounds [index] is provided.\n     */\n    public override fun fragment(index: Int): AbsolutePathFragment =\n        realFragments[index + 1] as AbsolutePathFragment // Skip root fragment\n\n    /**\n     * Returns the fragment of this path with index [index].\n     *\n     * @throws IndexOutOfBoundsException When an out of bounds [index] is provided.\n     */\n    public override operator fun get(index: Int): AbsolutePathFragment = fragment(index)\n\n    /** Returns whether this path has at least one non-recursive wildcard. */\n    public fun hasWildcard(): Boolean =\n        realFragments.any { fragment -> fragment is AbsolutePathFragment.Wildcard }\n\n    /** Returns whether this path has at least one recursive wildcard. */\n    public fun hasRecursiveWildcard(): Boolean =\n        realFragments.any { fragment -> fragment is AbsolutePathFragment.RecursiveWildcard }\n\n    /** Returns whether this path has at least one wildcard (either recursive or not). */\n    public fun hasAnyWildcard(): Boolean =\n        realFragments.any { fragment ->\n            fragment is AbsolutePathFragment.Wildcard ||\n                fragment is AbsolutePathFragment.RecursiveWildcard\n        }\n\n    /**\n     * Returns an absolute path representing the parent of this path. Equivalent to `resolve(\"..\")`.\n     *\n     * Note that the parent of the root path is the root path itself.\n     */\n    override fun parent(): AbsolutePath =\n        AbsolutePath(parentImpl(realFragments), needsResolving = false)\n\n    /** Returns the absolute path resulting from appending [fragments] to this path. */\n    public fun append(vararg fragments: AbsolutePathFragment): AbsolutePath =\n        AbsolutePath(\n            // Remove consecutive recursive wildcard fragments\n            realFragments +\n                fragments.filterIndexed { i, fragment ->\n                    fragment != AbsolutePathFragment.RecursiveWildcard ||\n                        (if (i == 0) realFragments.last() else fragments[i - 1]) !=\n                            AbsolutePathFragment.RecursiveWildcard\n                },\n            needsResolving = false,\n        )\n\n    /** Returns the absolute path resulting from appending [fragment] to this path. */\n    public operator fun plus(fragment: AbsolutePathFragment): AbsolutePath = append(fragment)\n\n    /** Returns the absolute path resulting from resolving a list of [paths] against this path. */\n    override fun resolve(vararg paths: Path): AbsolutePath =\n        when {\n            paths.isEmpty() -> this\n            // Optimise case where last path (in most cases the only path) is an absolute path, in\n            // which case no resolving is needed\n            paths.last() is AbsolutePath -> paths.last() as AbsolutePath\n            else ->\n                AbsolutePath(\n                    resolveImpl(\n                        realFragments,\n                        *paths.map { path -> path.realFragments }.toTypedArray(),\n                    ),\n                    needsResolving = false,\n                )\n        }\n\n    /**\n     * Returns the absolute path resulting from resolving a list of paths in string notation\n     * [stringPaths] against this path.\n     */\n    override fun resolve(vararg stringPaths: String): AbsolutePath =\n        resolve(*stringPaths.map { str -> Path(str) }.toTypedArray())\n\n    /**\n     * Returns the absolute path resulting from resolving [path] against this path. Equivalent to\n     * `resolve(path)`.\n     */\n    public override operator fun plus(path: Path): AbsolutePath = resolve(path)\n\n    /**\n     * Returns the absolute path resulting from resolving the path in string notation [stringPath]\n     * against this path. Equivalent to `resolve(stringPath)`.\n     */\n    public override operator fun plus(stringPath: String): AbsolutePath = resolve(stringPath)\n\n    /**\n     * Returns whether this path matches with [path]. Note that [path] will be converted to an\n     * [absolute path][AbsolutePath] when it isn't one.\n     *\n     * For the purpose of matching, a [wildcard fragment][AbsolutePathFragment.Wildcard] matches\n     * against any other fragment and a [recursive wildcard fragment]\n     * [AbsolutePathFragment.RecursiveWildcard] matches against zero or more any other fragments.\n     * Non-wildcard fragments match against each other on a basis of equality (`==`).\n     */\n    public fun matches(path: Path): Boolean =\n        matchesImpl(fragments, path.toAbsolutePath().fragments)\n\n    /**\n     * Returns whether this path contains [path]. Note that [path] will be converted to an\n     * [absolute path][AbsolutePath] when it isn't one.\n     *\n     * We say that a path `p1` contains a path `p2` when all paths that [match][matches] against\n     * `p2` also [match][matches] against `p1`. I.e. `p1.contains(p2) == true` iff there does\n     * **not** exist a path `p3` such that `p3.matches(p2) == true` and `p3.matches(p1) == false`.\n     */\n    public operator fun contains(path: Path): Boolean =\n        containsImpl(fragments, path.toAbsolutePath().fragments)\n\n    /**\n     * Returns a relative path representing this path, but relative to [path]. Note that [path] will\n     * be converted to an [absolute path][AbsolutePath] when it isn't one.\n     *\n     * In other words, if `relPath1 = path1.relativeTo(path2)`, then `path2.resolve(relPath1) ==\n     * path1`.\n     */\n    public fun relativeTo(path: Path): Path =\n        Path(relativeImpl(path.toAbsolutePath().fragments, fragments))\n\n    override fun equals(other: Any?): Boolean =\n        when {\n            this === other -> true\n            other !is Path -> false\n            other is AbsolutePath -> realFragments == other.realFragments\n            else -> realFragments == other.resolve().realFragments\n        }\n\n    override fun hashCode(): Int = realFragments.hashCode()\n\n    override operator fun iterator(): Iterator<AbsolutePathFragment> = fragments.iterator()\n\n    public companion object {\n        // Common paths:\n        /** Absolute root path (`\"/\"`). */\n        @JvmField public val ROOT: AbsolutePath = AbsolutePath()\n\n        /** Absolute path that matches all other paths (`\"/\u2217\u2217\"`). */\n        @JvmField\n        public val MATCH_ALL: AbsolutePath =\n            AbsolutePath(listOf(AbsolutePathFragment.RecursiveWildcard))\n\n        /**\n         * Implementation of [matches]. Returns whether two lists of fragments match.\n         *\n         * The algorithm recursively matches the two lists taking into consideration recursive\n         * wildcard fragments. It implements the following pseudo-algorithm:\n         * ```\n         * matches l1 l2 = match (l1, l2):\n         * | ([], [])         -> true\n         * | ([**], [])       -> true\n         * | ([], [**])       -> true\n         * | (**::t1, h2::t2) -> matches(t1, h2::t2) || matches(**::t1, t2)\n         * | (h1::t1, **::t2) -> matches(h1::t1, t2) || matches(t1, **::t2)\n         * | (*::t1, _::t2)   -> matches(t1, t2)\n         * | (_::t1, *::t2)   -> matches(t1, t2)\n         * | (h::t1, h::t2)   -> matches(t1, t2)\n         * | _                -> false\n         * ```\n         *\n         * @param f1 First list of fragments.\n         * @param f2 Second list of fragments.\n         * @param i1 Index of `f1`'s head. `l1` in the above pseudocode is represented by\n         *   `f1.slice(i1)`.\n         * @param i2 Index of `f2`'s head. `l2` in the above pseudocode is represented by\n         *   `f2.slice(i2)`.\n         */\n        private fun matchesImpl(\n            f1: List<AbsolutePathFragment>,\n            f2: List<AbsolutePathFragment>,\n            i1: Int = 0,\n            i2: Int = 0,\n        ): Boolean {\n            // List sizes\n            val s1 = f1.size - i1\n            val s2 = f2.size - i2\n\n            // List heads\n            val h1 = f1.getOrNull(i1)\n            val h2 = f2.getOrNull(i2)\n\n            // Base cases:\n            // | ([], [])   -> true\n            // | ([**], []) -> true\n            // | ([], [**]) -> true\n            if (\n                (s1 == 0 && s2 == 0) ||\n                    (s1 == 1 && s2 == 0 && h1 is AbsolutePathFragment.RecursiveWildcard) ||\n                    (s1 == 0 && s2 == 1 && h2 is AbsolutePathFragment.RecursiveWildcard)\n            ) {\n                return true\n            }\n\n            // Cases where both lists have at least 1 element:\n            if (s1 > 0 && s2 > 0) {\n                // Recursive wildcard cases:\n                // | (**::t1, h2::t2) -> matches(t1, h2::t2) || matches(**::t1, t2)\n                // | (h1::t1, **::t2) -> matches(h1::t1, t2) || matches(t1, **::t2)\n                if (\n                    h1 is AbsolutePathFragment.RecursiveWildcard ||\n                        h2 is AbsolutePathFragment.RecursiveWildcard\n                ) {\n                    return matchesImpl(f1, f2, i1 + 1, i2) || matchesImpl(f1, f2, i1, i2 + 1)\n                }\n\n                // Other cases:\n                // | (*::t1, _::t2) -> matches(t1, t2)\n                // | (_::t1, *::t2) -> matches(t1, t2)\n                // | (h::t1, h::t2) -> matches(t1, t2)\n                if (\n                    h1 is AbsolutePathFragment.Wildcard ||\n                        h2 is AbsolutePathFragment.Wildcard ||\n                        h1 == h2\n                ) {\n                    return matchesImpl(f1, f2, i1 + 1, i2 + 1)\n                }\n            }\n\n            // _ -> false\n            return false\n        }\n\n        /**\n         * Implementation of [contains]. Returns whether the first list of fragments contains the\n         * second one.\n         *\n         * The algorithm recursively checks whether one list contains the other taking into\n         * consideration recursive wildcard fragments. It implements the following pseudo-algorithm:\n         * ```\n         * contains l1 l2 = match (l1, l2):\n         * | ([], [])         -> true\n         * | ([**], _)        -> true\n         * | (**::t1, h2::t2) -> contains(t1, h2::t2) || contains(**::t1, t2)\n         * | (*::t1, h2::t2)  -> h2 != ** && contains(t1, t2)\n         * | (h::t1, h::t2)   -> contains(t1, t2)\n         * | _                -> false\n         * ```\n         *\n         * @param f1 First list of fragments.\n         * @param f2 Second list of fragments.\n         * @param i1 Index of `f1`'s head. `l1` in the above pseudocode is represented by\n         *   `f1.slice(i1)`.\n         * @param i2 Index of `f2`'s head. `l2` in the above pseudocode is represented by\n         *   `f2.slice(i2)`.\n         */\n        private fun containsImpl(\n            f1: List<AbsolutePathFragment>,\n            f2: List<AbsolutePathFragment>,\n            i1: Int = 0,\n            i2: Int = 0,\n        ): Boolean {\n            // List sizes\n            val s1 = f1.size - i1\n            val s2 = f2.size - i2\n\n            // List heads\n            val h1 = f1.getOrNull(i1)\n            val h2 = f2.getOrNull(i2)\n\n            // Base cases:\n            // | ([], [])  -> true\n            // | ([**], _) -> true\n            if ((s1 == 0 && s2 == 0) || (s1 == 1 && h1 is AbsolutePathFragment.RecursiveWildcard)) {\n                return true\n            }\n\n            // Cases where both lists have at least 1 element:\n            if (s1 > 0 && s2 > 0) {\n                // Recursive wildcard case:\n                // | (**::t1, h2::t2) -> contains(**::t1, t2) || contains(t1, h2::t2)\n                if (h1 is AbsolutePathFragment.RecursiveWildcard) {\n                    return containsImpl(f1, f2, i1 + 1, i2) || containsImpl(f1, f2, i1, i2 + 1)\n                }\n\n                // Other cases:\n                // | (*::t1, h2::t2) -> h2 != ** && contains(t1, t2)\n                // | (h::t1, h::t2)  -> h != - && contains(t1, t2)\n                if (\n                    (h1 is AbsolutePathFragment.Wildcard &&\n                        h2 !is AbsolutePathFragment.RecursiveWildcard) || h1 == h2\n                ) {\n                    return containsImpl(f1, f2, i1 + 1, i2 + 1)\n                }\n            }\n\n            // _ -> false\n            return false\n        }\n    }\n\n    /** Returns the relative path from [from] to [to]. Used to implement [relativeTo]. */\n    private fun relativeImpl(\n        from: List<AbsolutePathFragment>,\n        to: List<AbsolutePathFragment>,\n    ): List<PathFragment> {\n        val result = mutableListOf<PathFragment>()\n        val size = min(from.size, to.size)\n        var samePartsSize = size\n        for (i in 0 until size) {\n            if (from[i] != to[i]) {\n                samePartsSize = i\n                break\n            }\n        }\n\n        for (i in samePartsSize until from.size) {\n            result += PathFragment.ParentPath\n        }\n        result += (to.slice(samePartsSize until to.size))\n        return result\n    }\n\n    /** Absolute path serialiser, serialising absolute paths as strings. */\n    public object Serializer : KSerializer<AbsolutePath> {\n        override val descriptor: SerialDescriptor =\n            PrimitiveSerialDescriptor(\"io.kform.AbsolutePath\", PrimitiveKind.STRING)\n\n        override fun serialize(encoder: Encoder, value: AbsolutePath): Unit =\n            encoder.encodeString(value.toString())\n\n        override fun deserialize(decoder: Decoder): AbsolutePath =\n            AbsolutePath(decoder.decodeString())\n    }\n}\n","@file:JvmName(\"Paths\")\n\npackage io.kform\n\nimport kotlin.js.JsName\nimport kotlin.jvm.JvmField\nimport kotlin.jvm.JvmName\nimport kotlin.jvm.JvmStatic\nimport kotlin.math.min\nimport kotlinx.serialization.KSerializer\nimport kotlinx.serialization.Serializable\nimport kotlinx.serialization.descriptors.PrimitiveKind\nimport kotlinx.serialization.descriptors.PrimitiveSerialDescriptor\nimport kotlinx.serialization.descriptors.SerialDescriptor\nimport kotlinx.serialization.encoding.Decoder\nimport kotlinx.serialization.encoding.Encoder\n\n/**\n * Typealias used to represent a type where either a [Path] or a [String] (representing a path) are\n * accepted.\n */\npublic typealias PathOrString = Any\n\n/**\n * Representation of a path as a list of path [fragments].\n *\n * Paths represent locations of data, possibly relatively to other locations: e.g. the location of a\n * value relative to the location of another value. They can also represent locations of data from\n * the root when they contain a root fragment.\n */\n@JsName(\"PathKt\")\n@Serializable(with = Path.Serializer::class)\npublic open class Path(fragments: List<PathFragment> = emptyList()) {\n    /**\n     * Internal list of \"real\" fragments. For the generic [Path], this list is the same as the\n     * public [fragments] one, however, [AbsolutePath] hides their internal representation (it hides\n     * its first \"root fragment\") and the two lists differ.\n     */\n    internal val realFragments: List<PathFragment> = ArrayList(fragments)\n\n    /** List of fragments representing this path. */\n    public open val fragments: List<PathFragment>\n        get() = realFragments\n\n    /** Creates a path from its string notation. E.g. `\"./path/to/somewhere\"`. */\n    public constructor(stringPath: String) : this(parse(stringPath))\n\n    /**\n     * Returns the fragment of this path with index [index].\n     *\n     * @throws IndexOutOfBoundsException When an out of bounds [index] is provided.\n     */\n    public open fun fragment(index: Int): PathFragment = realFragments[index]\n\n    /**\n     * Returns the fragment of this path with index [index].\n     *\n     * @throws IndexOutOfBoundsException When an out of bounds [index] is provided.\n     */\n    public open operator fun get(index: Int): PathFragment = fragment(index)\n\n    /**\n     * Returns a new path representing the parent of this path.\n     *\n     * Note that the parent of the root path is the root path itself.\n     */\n    public open fun parent(): Path = Path(parentImpl(realFragments))\n\n    /** Returns the path resulting from appending [fragments] to this path. */\n    public fun append(vararg fragments: PathFragment): Path = Path(realFragments + fragments)\n\n    /**\n     * Returns the path resulting from appending [fragment] to this path. Equivalent to\n     * `append(fragment)`.\n     */\n    public operator fun plus(fragment: PathFragment): Path = append(fragment)\n\n    /** Returns the path resulting from joining [paths] together with this path. */\n    public fun join(vararg paths: Path): Path =\n        Path(joinImpl(realFragments, *paths.map { path -> path.realFragments }.toTypedArray()))\n\n    /**\n     * Returns the path resulting from joining the provided paths in string notation [stringPaths]\n     * together with this path.\n     */\n    public fun join(vararg stringPaths: String): Path =\n        join(*stringPaths.map { str -> Path(str) }.toTypedArray())\n\n    /**\n     * Returns the path resulting from joining [path] together with this path. Equivalent to\n     * `join(path)`.\n     */\n    public open operator fun plus(path: Path): Path = join(path)\n\n    /**\n     * Returns the path resulting from joining the path in string notation [stringPath] together\n     * with this path. Equivalent to `join(stringPath)`.\n     */\n    public open operator fun plus(stringPath: String): Path = join(stringPath)\n\n    /**\n     * Returns the result of resolving this path. Resolving the path removes unnecessary fragments\n     * such as the [current path fragment][PathFragment.CurrentPath].\n     */\n    public fun resolve(): Path = Path(resolveImpl(realFragments))\n\n    /** Returns the path resulting from resolving a list of [paths] against this path. */\n    public open fun resolve(vararg paths: Path): Path =\n        Path(resolveImpl(realFragments, *paths.map { path -> path.realFragments }.toTypedArray()))\n\n    /**\n     * Returns the path resulting from resolving a list of paths in string notation [stringPaths]\n     * against this path.\n     */\n    public open fun resolve(vararg stringPaths: String): Path =\n        resolve(*stringPaths.map { str -> Path(str) }.toTypedArray())\n\n    /**\n     * Returns whether this path equals [other].\n     *\n     * Two paths are equal when they both resolve to paths with the exact same fragments.\n     */\n    override fun equals(other: Any?): Boolean =\n        when {\n            this === other -> true\n            other !is Path -> false\n            else -> resolve().realFragments == other.resolve().realFragments\n        }\n\n    /** Returns the hash code for this path. */\n    override fun hashCode(): Int = resolve().realFragments.hashCode()\n\n    /** Returns the path in string notation. */\n    override fun toString(): String = buildString {\n        for ((i, fragment) in realFragments.withIndex()) {\n            if (fragment is PathFragment.Root) {\n                clear()\n                append(SEPARATOR_CHARACTER)\n            } else {\n                append(fragmentToString(fragment))\n                // Add a trailing slash only when the last fragment is an empty id\n                if (\n                    i < realFragments.size - 1 ||\n                        (fragment is AbsolutePathFragment.Id && fragment.id == \"\")\n                ) {\n                    append(SEPARATOR_CHARACTER)\n                }\n            }\n        }\n    }\n\n    /** Returns an iterator over the path's fragments. */\n    public open operator fun iterator(): Iterator<PathFragment> = realFragments.iterator()\n\n    public companion object {\n        // Common paths:\n        /** Path representing the current path (`\".\"`). */\n        @JvmField public val CURRENT: Path = Path()\n\n        /** Path representing the current path and all of its descendants (`\"./\u2217\u2217\"`). */\n        @JvmField\n        public val CURRENT_DEEP: Path = Path(listOf(AbsolutePathFragment.RecursiveWildcard))\n\n        /** Path representing the parent path (`\"..\"`). */\n        @JvmField public val PARENT: Path = Path(listOf(PathFragment.ParentPath))\n\n        /** Path representing the children of a path (`\"./\u2217\"`). */\n        @JvmField public val CHILDREN: Path = Path(listOf(AbsolutePathFragment.Wildcard))\n\n        /** Path representing the descendants of a path (`\"./\u2217/\u2217\u2217\"`). */\n        @JvmField\n        public val DESCENDANTS: Path =\n            Path(listOf(AbsolutePathFragment.Wildcard, AbsolutePathFragment.RecursiveWildcard))\n\n        // Strings/characters to parse paths from strings:\n        /**\n         * Special fragment string representing the end of a collection. Use `\"~-\"` within a string\n         * representation of a path to represent the fragment with id `\"-\"` literally.\n         */\n        public const val COLLECTION_END_STRING: String = \"-\"\n\n        /**\n         * Special fragment string representing \"any\" fragment. Use `\"~*\"` within a string\n         * representation of a path to represent the fragment with id `\"*\"` literally.\n         */\n        public const val WILDCARD_STRING: String = \"*\"\n\n        /**\n         * Special fragment string representing zero or more fragments. Use `\"~**\"` within a string\n         * representation of a path to represent the fragment with id `\"**\"` literally.\n         */\n        public const val RECURSIVE_WILDCARD_STRING: String = \"**\"\n\n        /**\n         * Special fragment string representing the \"current\" path. Use `\"~.\"` within a string\n         * representation of a path to represent the fragment with id `\".\"` literally.\n         */\n        public const val CURRENT_PATH_STRING: String = \".\"\n\n        /**\n         * Special fragment string representing the \"parent\" path. Use `\"~..\"` within a string\n         * representation of a path to represent the fragment with id `\"..\"` literally.\n         */\n        public const val PARENT_PATH_STRING: String = \"..\"\n\n        /**\n         * Character used as part of an escape sequence in the string representation of paths. It\n         * may be used to escape the special fragments `\".\"`, `\"..\"`, `\"*\"`, and `\"**\"` with `\"~.\"`,\n         * `\"~..\"`, `\"~*\"`, and `\"~**\"` respectively, as well as escape characters such as `\"/\"`,\n         * `\"~\"`, `\"{\"`, `\"=\"`, `\";\"`, and `\"}\"`.\n         */\n        public const val ESCAPE_CHARACTER: Char = '~'\n\n        /**\n         * Character used to represent the root path in string form, as well as separate fragments,\n         * e.g. the path with id fragments `x` and `y` is represented in string form as `\"/x/y\"`\n         * whilst the one with no fragments (root) is represented as `\"/\"`.\n         */\n        public const val SEPARATOR_CHARACTER: Char = '/'\n\n        // Regular expressions used to escape fragments when converting a path to\n        // its string form\n        private val FRAGMENT_ESCAPE_REGEX = Regex(\"([~/])\")\n\n        /**\n         * Returns [fragment] in string notation (e.g. to be used in the string representation of a\n         * path). Id fragments may end up escaped when they would otherwise represent a different\n         * fragment.\n         */\n        @JvmStatic\n        public fun fragmentToString(fragment: PathFragment): String {\n            return when (fragment) {\n                is AbsolutePathFragment.Id -> {\n                    val id = fragment.id\n                    // Escape fragments that would have special meanings\n                    if (\n                        id == COLLECTION_END_STRING ||\n                            id == WILDCARD_STRING ||\n                            id == RECURSIVE_WILDCARD_STRING ||\n                            id == CURRENT_PATH_STRING ||\n                            id == PARENT_PATH_STRING\n                    ) {\n                        return ESCAPE_CHARACTER + id\n                    }\n                    // Escape the escape character and the path separator\n                    return id.replace(FRAGMENT_ESCAPE_REGEX, \"$ESCAPE_CHARACTER$1\")\n                }\n                is AbsolutePathFragment.CollectionEnd -> COLLECTION_END_STRING\n                is AbsolutePathFragment.Wildcard -> WILDCARD_STRING\n                is AbsolutePathFragment.RecursiveWildcard -> RECURSIVE_WILDCARD_STRING\n                is PathFragment.Root -> SEPARATOR_CHARACTER.toString()\n                is PathFragment.CurrentPath -> CURRENT_PATH_STRING\n                is PathFragment.ParentPath -> PARENT_PATH_STRING\n            }\n        }\n\n        /**\n         * Returns the list of path fragments represented by a path in string notation [stringPath].\n         */\n        private fun parse(stringPath: String): List<PathFragment> {\n            val fragmentList: MutableList<PathFragment> = mutableListOf()\n            var fragmentId = \"\"\n            var i = 0\n            val l = stringPath.length\n            mainLoop@ while (i < l) {\n                val c = stringPath[i]\n                // Unescape\n                if (c == ESCAPE_CHARACTER) {\n                    fragmentId += stringPath.getOrNull(++i)?.toString() ?: \"\"\n                    ++i\n                    continue\n                }\n                // Handle path separator\n                if (c == SEPARATOR_CHARACTER) {\n                    // Represent an absolute path by setting the first fragment as the\n                    // root\n                    if (i == 0) {\n                        fragmentList += PathFragment.Root\n                    } else {\n                        fragmentList += AbsolutePathFragment.Id(fragmentId)\n                        fragmentId = \"\"\n                    }\n                    ++i\n                    continue\n                }\n                if (fragmentId == \"\") {\n                    // Handle special fragments\n                    for (spFragment in\n                        listOf(\n                            PathFragment.CurrentPath,\n                            PathFragment.ParentPath,\n                            AbsolutePathFragment.CollectionEnd,\n                            AbsolutePathFragment.Wildcard,\n                            AbsolutePathFragment.RecursiveWildcard,\n                        )) {\n                        val spStr = fragmentToString(spFragment)\n                        val spLen = spStr.length\n                        if (\n                            stringPath.substring(i, min(i + spLen, l)) == spStr &&\n                                (i + spLen == l ||\n                                    stringPath.getOrNull(i + spLen) == SEPARATOR_CHARACTER)\n                        ) {\n                            fragmentList += spFragment\n                            i += spLen + 1\n                            continue@mainLoop\n                        }\n                    }\n                }\n                fragmentId += c\n                ++i\n            }\n            // Ignore trailing slash\n            if (fragmentId != \"\") {\n                fragmentList += AbsolutePathFragment.Id(fragmentId)\n            }\n            return fragmentList\n        }\n\n        /**\n         * Implementation of [parent]. Returns the parent of the path represented by the provided\n         * path [fragments].\n         */\n        internal fun parentImpl(fragments: List<PathFragment>): List<PathFragment> =\n            when {\n                fragments.isEmpty() || fragments.last() == PathFragment.ParentPath ->\n                    fragments + PathFragment.ParentPath\n                fragments.last() == PathFragment.Root -> fragments\n                else -> fragments.dropLast(1)\n            }\n\n        /**\n         * Implementation of [join]. Joins all lists of path fragments within an array\n         * [fragmentsArray] into a single list of path fragments.\n         */\n        internal fun joinImpl(vararg fragmentsArray: List<PathFragment>): List<PathFragment> {\n            val joined = mutableListOf<PathFragment>()\n            for (fragments in fragmentsArray) {\n                joined += fragments\n            }\n            return joined\n        }\n\n        /**\n         * Implementation of [resolve]. Resolves all provided lists of path fragments within an\n         * array [fragmentsArray] into a single list of path fragments, removing unnecessary\n         * fragments.\n         */\n        internal fun resolveImpl(vararg fragmentsArray: List<PathFragment>): List<PathFragment> {\n            val resolved = mutableListOf<PathFragment>()\n            for (fragments in fragmentsArray) {\n                for (fragment in fragments) {\n                    when (fragment) {\n                        is PathFragment.Root -> {\n                            resolved.clear()\n                            resolved += fragment\n                        }\n                        is PathFragment.ParentPath ->\n                            when {\n                                resolved.isEmpty() || resolved.last() == PathFragment.ParentPath ->\n                                    resolved += fragment\n                                resolved.last() != PathFragment.Root ->\n                                    resolved.removeAt(resolved.lastIndex)\n                            }\n                        is PathFragment.CurrentPath -> {\n                            /* Always unnecessary. */\n                        }\n                        is AbsolutePathFragment.RecursiveWildcard -> {\n                            // Consecutive recursive wildcards are redundant and may hurt\n                            // performance of matching algorithms\n                            if (resolved.last() != fragment) {\n                                resolved += fragment\n                            }\n                        }\n                        else -> resolved += fragment\n                    }\n                }\n            }\n            return resolved\n        }\n    }\n\n    /** Path serialiser, serialising paths as strings. */\n    public object Serializer : KSerializer<Path> {\n        override val descriptor: SerialDescriptor =\n            PrimitiveSerialDescriptor(\"io.kform.Path\", PrimitiveKind.STRING)\n\n        override fun serialize(encoder: Encoder, value: Path): Unit =\n            encoder.encodeString(value.toString())\n\n        override fun deserialize(decoder: Decoder): Path = Path(decoder.decodeString())\n    }\n}\n\n/** Converts the receiver path into an absolute path, if it wasn't one already. */\npublic fun Path.toAbsolutePath(): AbsolutePath =\n    if (this is AbsolutePath) this else AbsolutePath(this)\n\n/**\n * Converts the receiver [Path] or [String] into a path, if it wasn't one already.\n *\n * @throws IllegalArgumentException if the receiver is neither a [Path] nor a [String].\n */\npublic fun PathOrString.toPath(): Path =\n    when (this) {\n        is Path -> this\n        is String -> Path(this)\n        else -> throw IllegalArgumentException(\"The receiver must be either a path or a string.\")\n    }\n\n/**\n * Converts the receiver [Path] or [String] into an absolute path, if it wasn't one already.\n *\n * @throws IllegalArgumentException if the receiver is neither a [Path] nor a [String].\n */\npublic fun PathOrString.toAbsolutePath(): AbsolutePath =\n    when (this) {\n        is Path -> this.toAbsolutePath()\n        is String -> AbsolutePath(this)\n        else -> throw IllegalArgumentException(\"The receiver must be either a path or a string.\")\n    }\n",null,null,null,null,null,"@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform\n\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.reflect.KType\n\n/** Value information of a validation's dependencies. */\npublic typealias DependenciesValueInfo = Map<String, ValueInfo<*>?>\n\n/**\n * Context provided to a [form manager][FormManager] computation when running it, contains the\n * values of the computation's dependencies at the time the computation was executed.\n */\npublic abstract class ComputationContext(\n    private val schema: Schema<*>,\n    /** Path at which the computation is occurring. */\n    public val path: AbsolutePath,\n    /** Path of the schema at which the computation is occurring. */\n    public val schemaPath: AbsolutePath,\n    /**\n     * Value information for each dependency of the computation. Mapping of keys as declared in the\n     * [computation dependencies][Computation.dependencies] to their respective value information.\n     */\n    public val dependenciesInfo: DependenciesValueInfo,\n    public val externalContexts: ExternalContexts,\n) {\n    // internal var invalidateAfter: Duration? = null\n\n    /** Schema at which the computation is occurring. */\n    @Suppress(\"UNCHECKED_CAST\") public fun <T> schema(): Schema<T> = schema as Schema<T>\n\n    /**\n     * Obtains the value information of the dependency with key [dependencyKey] or `null` if the\n     * dependency could not be found in the form.\n     *\n     * @throws IllegalArgumentException If no dependency with key [dependencyKey] was defined in the\n     *   computation.\n     */\n    @Suppress(\"UNCHECKED_CAST\")\n    public fun <T> dependencyInfoOrNull(dependencyKey: String): ValueInfo<T>? {\n        require(dependencyKey in dependenciesInfo) {\n            \"No dependency found with key '$dependencyKey'.\"\n        }\n        return dependenciesInfo[dependencyKey] as ValueInfo<T>?\n    }\n\n    /**\n     * Obtains the value information of the dependency with key [dependencyKey].\n     *\n     * @throws DependencyNotFoundException If the dependency could not be found in the form.\n     * @throws IllegalArgumentException If no dependency with key [dependencyKey] was defined in the\n     *   computation.\n     */\n    public fun <T> dependencyInfo(dependencyKey: String): ValueInfo<T> =\n        dependencyInfoOrNull(dependencyKey) ?: throw DependencyNotFoundException(dependencyKey)\n\n    /**\n     * Returns the path of the dependency with key [dependencyKey] or `null` if the dependency could\n     * not be found in the form.\n     *\n     * @throws IllegalArgumentException If no dependency with key [dependencyKey] was defined in the\n     *   computation.\n     */\n    public fun dependencyPathOrNull(dependencyKey: String): AbsolutePath? =\n        dependencyInfoOrNull<Any?>(dependencyKey)?.path\n\n    /**\n     * Returns the path of the dependency with key [dependencyKey].\n     *\n     * @throws DependencyNotFoundException If the dependency could not be found in the form.\n     * @throws IllegalArgumentException If no dependency with key [dependencyKey] was defined in the\n     *   computation.\n     */\n    public fun dependencyPath(dependencyKey: String): AbsolutePath =\n        dependencyInfo<Any?>(dependencyKey).path\n\n    /**\n     * Returns the schema of the dependency with key [dependencyKey] or `null` if the dependency\n     * could not be found in the form.\n     *\n     * @throws IllegalArgumentException If no dependency with key [dependencyKey] was defined in the\n     *   computation.\n     */\n    public fun <T> dependencySchemaOrNull(dependencyKey: String): Schema<T>? =\n        dependencyInfoOrNull<T>(dependencyKey)?.schema\n\n    /**\n     * Returns the schema of the dependency with key [dependencyKey].\n     *\n     * @throws DependencyNotFoundException If the dependency could not be found in the form.\n     * @throws IllegalArgumentException If no dependency with key [dependencyKey] was defined in the\n     *   computation.\n     */\n    public fun <T> dependencySchema(dependencyKey: String): Schema<T> =\n        dependencyInfo<T>(dependencyKey).schema\n\n    /**\n     * Returns the value of the dependency with key [dependencyKey] or `null` if the dependency\n     * could not be found in the form.\n     *\n     * @throws IllegalArgumentException If no dependency with key [dependencyKey] was defined in the\n     *   computation.\n     */\n    public fun <T> dependencyOrNull(dependencyKey: String): T? =\n        dependencyInfoOrNull<T>(dependencyKey)?.value\n\n    /**\n     * Returns the value of the dependency with key [dependencyKey].\n     *\n     * @throws DependencyNotFoundException If the dependency could not be found in the form.\n     * @throws IllegalArgumentException If no dependency with key [dependencyKey] was defined in the\n     *   computation.\n     */\n    public fun <T> dependency(dependencyKey: String): T = dependencyInfo<T>(dependencyKey).value\n\n    /**\n     * Returns the external context with name [externalContextName] available to the computation or\n     * `null` if the external context could not be found.\n     *\n     * @throws IllegalArgumentException If no external context with key [externalContextName] was\n     *   defined in the computation.\n     */\n    @Suppress(\"UNCHECKED_CAST\")\n    public fun <T> externalContextOrNull(externalContextName: String): T? {\n        require(externalContextName in externalContexts) {\n            \"No external context found with name '$externalContextName'.\"\n        }\n        return externalContexts[externalContextName] as T?\n    }\n\n    /**\n     * Returns the external context with name [externalContextName] available to the computation.\n     *\n     * @throws ExternalContextNotFoundException If the external context could not be found during\n     *   the computation.\n     * @throws IllegalArgumentException If no external context with key [externalContextName] was\n     *   defined in the computation.\n     */\n    public fun <T> externalContext(externalContextName: String): T =\n        externalContextOrNull(externalContextName)\n            ?: throw ExternalContextNotFoundException(externalContextName)\n\n    // TODO: Implement something like this\n    // private fun invalidateAfter(duration: Duration) {\n    //     require(duration >= Duration.ZERO) { \"Duration must not be negative.\" }\n    //     invalidateAfter = duration\n    // }\n}\n\n/** Information about a validation dependency, includes its [path] and [type]. */\npublic data class DependencyInfo(val path: Path, val type: KType)\n\n/**\n * [Form manager][FormManager] computation.\n *\n * Computations depend on [FormManager] values. These dependencies should be defined via the\n * [dependency] function, by providing the path of the dependency relative to the path of the\n * computation.\n */\npublic interface Computation {\n    /**\n     * Dependencies of the computation. Mapping of keys to the paths this computation depends on.\n     * Keys can be used within a [ComputationContext] to access the value of the dependencies.\n     *\n     * Computation dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the computation should be reevaluated by the [form manager][FormManager] whenever a\n     * child value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    public val dependencies: Map<String, DependencyInfo>\n\n    /**\n     * Set of external context dependencies of the computation.\n     *\n     * Each entry of this set represents the name of the external context being depended upon.\n     */\n    public val externalContextDependencies: Set<String>\n}\n\n/**\n * Function used to update the state of a stateful computation.\n *\n * This function is used to update the computation's state given the previous `state` and the\n * `event` whose path matches the path being observed.\n */\npublic typealias UpdateStateFn<T, TState> = suspend (state: TState, event: ValueEvent<T>) -> TState\n\n/**\n * Observer used within a stateful computation.\n *\n * Defines a path to observe and a function to update the state of the computation whenever an event\n * with a path matching the one being observed occurs.\n */\npublic open class Observer<T, TState>(\n    /** Path to observe. */\n    public val toObserve: Path,\n\n    /**\n     * Updates the computation's state given the previous state and the event whose path matches the\n     * path being observed.\n     *\n     * This function must return the new computation state which, unless it hasn't changed, should\n     * be different ([equals]-wise) from the previous computation state (as such, when using an\n     * object as state, a new instance should be returned when the state is updated). If the new\n     * state differs from the old one (using [equals]), a re-computation will be scheduled.\n     */\n    public val updateState: UpdateStateFn<T, TState>,\n)\n\n/**\n * Computation of values of type [T] where the [form manager][FormManager] maintains a state of type\n * [TState] for each managed computation.\n *\n * Stateful computations are useful when they require expensive computations over data and if it is\n * possible to save the result of such expensive computation and tweak it as data changes instead of\n * running the expensive computation all over again.\n */\npublic interface StatefulComputation<TContext : ComputationContext, TState> : Computation {\n    /**\n     * List of observers.\n     *\n     * Each observer contains a path to be observed and a function to update the state of the\n     * computation, which will be called whenever an event with a path matching the one being\n     * observed occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     */\n    public val observers: List<Observer<Any?, TState>>\n\n    /**\n     * Initialises and returns the computation's state, within a [TContext] containing the values of\n     * all declared dependencies.\n     *\n     * This method is called whenever a new value that needs to be computed is initialised.\n     */\n    public suspend fun TContext.initState(): TState\n\n    /**\n     * Destroys the computation's [state].\n     *\n     * Called by the [form manager][FormManager] whenever a state is no longer needed (i.e. when a\n     * newer state has been produced or when the computation has been destroyed).\n     */\n    public suspend fun destroyState(state: TState)\n}\n",null,null,"@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform\n\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.js.JsName\nimport kotlin.jvm.JvmName\nimport kotlin.properties.PropertyDelegateProvider\nimport kotlin.properties.ReadOnlyProperty\nimport kotlin.reflect.typeOf\n\n/**\n * Context provided to a computed value when running it, contains the values of the computed value's\n * dependencies at the time the computed value was executed.\n */\npublic open class ComputedValueContext(\n    schema: Schema<*>,\n    /** Path of the value being computed. */\n    path: AbsolutePath,\n    /** Path of the schema of the value being computed. */\n    schemaPath: AbsolutePath,\n    /**\n     * Value information for each dependency of the computed value. Mapping of keys as declared in\n     * the [computed value dependencies][ComputedValue.dependencies] to their respective value\n     * information.\n     */\n    dependenciesInfo: DependenciesValueInfo,\n    externalContexts: ExternalContexts,\n) : ComputationContext(schema, path, schemaPath, dependenciesInfo, externalContexts)\n\n/**\n * ComputedValue for values of type [T].\n *\n * ComputedValues may depend on other values. These dependencies may be defined via the [dependency]\n * function, by providing the path of the dependency relative to the value being computed.\n *\n * Example computed value that emits an error when the integer being computed is odd if the value of\n * a dependency `allowOdd` is `false`:\n * ```kotlin\n * object DisallowOdd : ComputedValue<Int>() {\n *     private val ComputedValueContext.allowOdd: Boolean by dependency(\"../allowOdd\")\n *\n *     ComputedValueContext.compute() = flow {\n *         if (!allowOdd && value % 2 != 0) {\n *             emit(ComputedValueError(\"oddNotAllowed\"))\n *         }\n *     }\n * }\n * ```\n */\n@JsName(\"ComputedValueKt\")\npublic abstract class ComputedValue<out T> : Computation {\n    /** Schema of the value being computed. */\n    protected inline val ComputedValueContext.schema: Schema<@UnsafeVariance T>\n        get() = schema()\n\n    /**\n     * Dependencies of the computed value. Mapping of keys to the paths this computed value depends\n     * on. Keys can be used within a [ComputedValueContext] to access the value of the dependencies.\n     *\n     * Computed value dependency paths may contain a single recursive wildcard at the end,\n     * indicating that the computed value should be reevaluated by the [form manager][FormManager]\n     * whenever a child value of the dependency changes. Otherwise, a dependency must contain no\n     * wildcards.\n     */\n    public override val dependencies: Map<String, DependencyInfo> = hashMapOf()\n\n    /**\n     * Set of external context dependencies of the computed value.\n     *\n     * Each entry of this set represents the name of the external context being depended upon.\n     */\n    public override val externalContextDependencies: Set<String> = hashSetOf()\n\n    /**\n     * Declares a dependency to [path], accessible in the computed value's context via key\n     * [dependencyKey].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    @JvmName(\"reifiedAddDependency\")\n    protected inline fun <reified TDependency> addDependency(dependencyKey: String, path: Path) {\n        (dependencies as MutableMap<String, DependencyInfo>)[dependencyKey] =\n            DependencyInfo(path, typeOf<TDependency>())\n    }\n\n    /**\n     * Declares a dependency to [path], accessible in the computed value's context via key\n     * [dependencyKey].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun addDependency(dependencyKey: String, path: Path): Unit =\n        addDependency<Any?>(dependencyKey, path)\n\n    /**\n     * Declares a dependency to [path], accessible in the computed value's context via key\n     * [dependencyKey].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    @JvmName(\"reifiedAddDependency\")\n    protected inline fun <reified TDependency> addDependency(\n        dependencyKey: String,\n        path: String,\n    ): Unit = addDependency<TDependency>(dependencyKey, Path(path))\n\n    /**\n     * Declares a dependency to [path], accessible in the computed value's context via key\n     * [dependencyKey].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun addDependency(dependencyKey: String, path: String): Unit =\n        addDependency<Any?>(dependencyKey, path)\n\n    /**\n     * Declares an external context dependency to [externalContextName].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun addExternalContextDependency(externalContextName: String) {\n        (externalContextDependencies as MutableSet<String>).add(externalContextName)\n    }\n\n    /**\n     * Function used to declare a dependency to a [path] and delegate access to its value within a\n     * [ComputedValueContext].\n     *\n     * If the dependency could not be found in the form during the execution of the computed value,\n     * then accessing this dependency will return `null`.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ComputedValueContext.dependencyKey: Type? by dependencyOrNull(path)\n     * ```\n     *\n     * ComputedValue dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the computed value should be reevaluated by the [form manager][FormManager] whenever a\n     * child value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    protected inline fun <reified TDependency> dependencyOrNull(\n        path: Path,\n        dependencyKey: String? = null,\n    ): PropertyDelegateProvider<\n        ComputedValue<@UnsafeVariance T>,\n        ReadOnlyProperty<ComputedValueContext, TDependency?>,\n    > = PropertyDelegateProvider { computedValue, property ->\n        computedValue.addDependency<TDependency>(dependencyKey ?: property.name, path)\n        // Return a delegate to the dependency value within a [ComputedValueContext]\n        ReadOnlyProperty { ctx, prop -> ctx.dependencyOrNull(dependencyKey ?: prop.name) }\n    }\n\n    /**\n     * Function used to declare a dependency to a [path] and delegate access to its value within a\n     * [ComputedValueContext].\n     *\n     * If the dependency could not be found in the form during the execution of the computed value,\n     * then accessing this dependency will return `null`.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ComputedValueContext.dependencyKey: Type? by dependencyOrNull(path)\n     * ```\n     *\n     * ComputedValue dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the computed value should be reevaluated by the [form manager][FormManager] whenever a\n     * child value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    protected inline fun <reified TDependency> dependencyOrNull(\n        path: String,\n        dependencyKey: String? = null,\n    ): PropertyDelegateProvider<\n        ComputedValue<@UnsafeVariance T>,\n        ReadOnlyProperty<ComputedValueContext, TDependency?>,\n    > = dependencyOrNull(Path(path), dependencyKey)\n\n    /**\n     * Function used to declare a dependency to a [path] and delegate access to its value within a\n     * [ComputedValueContext].\n     *\n     * If the dependency could not be found in the form during the execution of the computed value,\n     * then accessing this dependency will throw [DependencyNotFoundException].\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ComputedValueContext.dependencyKey: Type by dependency(path)\n     * ```\n     *\n     * ComputedValue dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the computed value should be reevaluated by the [form manager][FormManager] whenever a\n     * child value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    protected inline fun <reified TDependency> dependency(\n        path: Path,\n        dependencyKey: String? = null,\n    ): PropertyDelegateProvider<\n        ComputedValue<@UnsafeVariance T>,\n        ReadOnlyProperty<ComputedValueContext, TDependency>,\n    > = PropertyDelegateProvider { computedValue, property ->\n        computedValue.addDependency<TDependency>(dependencyKey ?: property.name, path)\n        // Return a delegate to the dependency value within a [ComputedValueContext]\n        ReadOnlyProperty { ctx, prop -> ctx.dependency(dependencyKey ?: prop.name) }\n    }\n\n    /**\n     * Function used to declare a dependency to a [path] and delegate access to its value within a\n     * [ComputedValueContext].\n     *\n     * If the dependency could not be found in the form during the execution of the computed value,\n     * then accessing this dependency will throw [DependencyNotFoundException].\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ComputedValueContext.dependencyKey: Type by dependency(path)\n     * ```\n     *\n     * ComputedValue dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the computed value should be reevaluated by the [form manager][FormManager] whenever a\n     * child value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    protected inline fun <reified TDependency> dependency(\n        path: String,\n        dependencyKey: String? = null,\n    ): PropertyDelegateProvider<\n        ComputedValue<@UnsafeVariance T>,\n        ReadOnlyProperty<ComputedValueContext, TDependency>,\n    > = dependency(Path(path), dependencyKey)\n\n    /**\n     * Function used to declare a dependency to an external context and delegate access to its value\n     * within a [ComputedValueContext].\n     *\n     * If the external context could not be found during the execution of the computed value, then\n     * accessing this external context will return `null`.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ComputedValueContext.externalContextName: Type? by externalContextOrNull()\n     * ```\n     */\n    protected fun <TContext> externalContextOrNull(\n        externalContextName: String? = null\n    ): PropertyDelegateProvider<\n        ComputedValue<@UnsafeVariance T>,\n        ReadOnlyProperty<ComputedValueContext, TContext?>,\n    > = PropertyDelegateProvider { computedValue, property ->\n        computedValue.addExternalContextDependency(externalContextName ?: property.name)\n        // Return a delegate to the external context dependency value within a\n        // [ComputedValueContext]\n        ReadOnlyProperty { ctx, prop ->\n            ctx.externalContextOrNull(externalContextName ?: prop.name)\n        }\n    }\n\n    /**\n     * Function used to declare a dependency to an external context and delegate access to its value\n     * within a [ComputedValueContext].\n     *\n     * If the external context could not be found during the execution of the computed value, then\n     * accessing this external context will throw [ExternalContextNotFoundException].\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ComputedValueContext.externalContextName: Type by externalContext()\n     * ```\n     */\n    protected fun <TContext> externalContext(\n        externalContextName: String? = null\n    ): PropertyDelegateProvider<\n        ComputedValue<@UnsafeVariance T>,\n        ReadOnlyProperty<ComputedValueContext, TContext>,\n    > = PropertyDelegateProvider { computedValue, property ->\n        computedValue.addExternalContextDependency(externalContextName ?: property.name)\n        // Return a delegate to the external context dependency value within a\n        // [ComputedValueContext]\n        ReadOnlyProperty { ctx, prop -> ctx.externalContext(externalContextName ?: prop.name) }\n    }\n\n    /**\n     * Runs the computed value within a [ComputedValueContext] containing the [value] being computed\n     * and the value of all declared dependencies. Returns a flow over all found issues.\n     */\n    public abstract suspend fun ComputedValueContext.compute(): T\n\n    // Default [toString] implementation\n    public override fun toString(): String = this::class.simpleName ?: super.toString()\n}\n\n/**\n * ComputedValue for values of type [T] where the [form manager][FormManager] maintains a computed\n * value state of type [TState] for each managed value.\n *\n * Stateful computed values are useful when computed values require an expensive computation over\n * data and if it is possible to save the result of such expensive computation and tweak it as data\n * changes instead of running the expensive computation all over again.\n *\n * As an example, imagine that we have a list of people and that we want to compute that the average\n * age of all people isn't over a certain age. Instead of iterating over the whole list every time a\n * person is added or removed, we can use a stateful computed value to save, as state, the sum of\n * all ages, and simply tweak this sum as people are added or removed. Having access to the sum of\n * all ages as state allows us to implement the computed value function with a complexity of O(1) as\n * opposed to O(N).\n *\n * The following snippet implements the example above of making sure that the average age of all\n * people doesn't surpass a dependency `maxAvgAge`:\n * ```kotlin\n * object AvgAgeNotOverMax : StatefulComputedValue<List<Person>, Int>() {\n *     private val ComputedValueContext.maxAvgAge: Int by dependency(\"../maxAvgAge\")\n *\n *     override suspend fun ComputedValueContext.initState(value: List<Person>): Int =\n *         value.fold(0) { sum, person -> sum + person.age }\n *\n *     private val ageObserver by observe<Int>(\"\u2217/age\") { agesSum, event ->\n *         when (event) {\n *             is ValueEvent.Init<Int> -> agesSum + event.newValue\n *             is ValueEvent.Change<Int> -> agesSum + event.newValue - event.oldValue\n *             is ValueEvent.Destroy<Int> -> agesSum - event.oldValue\n *             else -> agesSum\n *         }\n *     }\n *\n *     override fun ComputedValueContext.computeFromState(value: List<Person>, state: Int) = flow {\n *         val avgAge = state / value.size\n *         if (avgAge > maxAvgAge) {\n *             emit(ComputedValueError(\"avgAgeOverMax\"))\n *         }\n *     }\n * }\n * ```\n */\n@JsName(\"StatefulComputedValueKt\")\npublic abstract class StatefulComputedValue<out T, TState> :\n    StatefulComputation<ComputedValueContext, TState>, ComputedValue<T>() {\n    /**\n     * List of observers.\n     *\n     * Each observer contains a path to be observed and a function to update the state of the\n     * computed value, which will be called whenever an event with a path matching the one being\n     * observed occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     */\n    public override val observers: List<Observer<Any?, TState>> = mutableListOf()\n\n    /**\n     * Adds an [observer] to the path [observer.toObserve][Observer.toObserve] to update the\n     * computed value state via [observer.updateState][Observer.updateState] whenever an event with\n     * a path matching [observer.toObserve][Observer.toObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun <TValue> addObserver(observer: Observer<TValue, TState>) {\n        @Suppress(\"UNCHECKED_CAST\")\n        (observers as MutableList<Observer<*, TState>>) += observer\n    }\n\n    /**\n     * Adds an observer to the path [pathToObserve] to update the computed value state via\n     * [updateState] whenever an event with a path matching [pathToObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun <TValue> addObserver(\n        pathToObserve: Path,\n        @BuilderInference updateState: UpdateStateFn<TValue, TState>,\n    ): Unit = addObserver(Observer(pathToObserve, updateState))\n\n    /**\n     * Adds an observer to the path [pathToObserve] to update the computed value state via\n     * [updateState] whenever an event with a path matching [pathToObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun <TValue> addObserver(\n        pathToObserve: String,\n        @BuilderInference updateState: UpdateStateFn<TValue, TState>,\n    ): Unit = addObserver(Path(pathToObserve), updateState)\n\n    /**\n     * Function used to observe the path [pathToObserve] and update the computed value state via\n     * [updateState] whenever an event with a path matching [pathToObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val observer by observe<Type>(path) { state, event ->\n     *     when (event) {\n     *         is ValueEvent.Init<Type>      -> // Compute new state\n     *         is ValueEvent.Change<Type>    -> // Compute new state\n     *         is ValueEvent.Destroy<Type>   -> // Compute new state\n     *\n     *         // These events only occur when observing a collection:\n     *         is ValueEvent.Add<Type, *>    -> // Compute new state\n     *         is ValueEvent.Remove<Type, *> -> // Compute new state\n     *     }\n     * }\n     * ```\n     *\n     * The provided function must return the new computed value state which, unless it hasn't\n     * changed, should be different ([equals]-wise) from the previous computed value state (as such,\n     * when using an object as state, a new instance should be returned when the state is updated).\n     * If the new state differs from the old one (using [equals]), the value will need to be\n     * recomputed by the [form manager][FormManager] using [computeFromState].\n     */\n    protected fun <TValue> observe(\n        pathToObserve: Path,\n        @BuilderInference updateState: UpdateStateFn<TValue, TState>,\n    ): PropertyDelegateProvider<\n        StatefulComputedValue<@UnsafeVariance T, TState>,\n        ReadOnlyProperty<StatefulComputedValue<@UnsafeVariance T, TState>, Observer<TValue, TState>>,\n    > = PropertyDelegateProvider { computedValue, _ ->\n        val observer = Observer(pathToObserve, updateState)\n        computedValue.addObserver(observer)\n        ReadOnlyProperty { _, _ -> observer }\n    }\n\n    /**\n     * Function used to observe the path [pathToObserve] and update the computed value state via\n     * [updateState] whenever an event with a path matching [pathToObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val observer by observe<Type>(path) { state, event ->\n     *     when (event) {\n     *         is ValueEvent.Init<Type>      -> // Compute new state\n     *         is ValueEvent.Change<Type>    -> // Compute new state\n     *         is ValueEvent.Destroy<Type>   -> // Compute new state\n     *\n     *         // These events only occur when observing a collection:\n     *         is ValueEvent.Add<Type, *>    -> // Compute new state\n     *         is ValueEvent.Remove<Type, *> -> // Compute new state\n     *     }\n     * }\n     * ```\n     *\n     * The provided function must return the new computed value state which, unless it hasn't\n     * changed, should be different ([equals]-wise) from the previous computed value state (as such,\n     * when using an object as state, a new instance should be returned when the state is updated).\n     * If the new state differs from the old one (using [equals]), the value will need to be\n     * recomputed by the [form manager][FormManager] using [computeFromState].\n     */\n    protected fun <TValue> observe(\n        pathToObserve: String,\n        @BuilderInference updateState: UpdateStateFn<TValue, TState>,\n    ): PropertyDelegateProvider<\n        StatefulComputedValue<@UnsafeVariance T, TState>,\n        ReadOnlyProperty<StatefulComputedValue<@UnsafeVariance T, TState>, Observer<TValue, TState>>,\n    > = observe(Path(pathToObserve), updateState)\n\n    /**\n     * Initialises and returns the computed value's state, within a [ComputedValueContext]\n     * containing the values of all declared dependencies.\n     *\n     * This method is called whenever a new value that needs to be computed by this computed value\n     * is initialised.\n     */\n    public abstract override suspend fun ComputedValueContext.initState(): TState\n\n    /**\n     * Destroys the comptued value's [state].\n     *\n     * Called whenever a state is no longer needed (i.e. when a newer state has been produced or\n     * when the value being validated has been destroyed).\n     */\n    public override suspend fun destroyState(state: TState): Unit = Unit\n\n    /**\n     * Runs the computed value, given its [state], within a [ComputedValueContext] containing the\n     * [value] being computed and the value of all declared dependencies. Returns a flow over all\n     * found issues.\n     *\n     * This method is called instead of [compute] when computing stateful computed values.\n     */\n    public abstract suspend fun ComputedValueContext.computeFromState(state: TState): T\n\n    // Default [compute] implementation for stateful computed values.\n    override suspend fun ComputedValueContext.compute(): T = computeFromState(initState())\n}\n","package io.kform\n\n/**\n * Event emitted by the form manager. Events can be of one of two \"main\" types: [ValueEvent]\n * (signaling a change in a value of the form) or [StateEvent] (signaling a change in the form's\n * state).\n */\npublic sealed interface FormManagerEvent<T> {\n    /** Path associated with the event. */\n    public val path: AbsolutePath\n    /** Schema of the value associated with the event. */\n    public val schema: Schema<T>\n}\n\n/** Event emitted by the form manager signaling a change in a value of type [T] of the form. */\npublic sealed class ValueEvent<T>(override val path: AbsolutePath, override val schema: Schema<T>) :\n    FormManagerEvent<T> {\n    /** Value before the event occurred. */\n    public abstract val oldValue: T?\n\n    /** Value after the event occurred, as found in the [form manager][FormManager]. */\n    public abstract val value: T?\n\n    /**\n     * Event that indicates the initialisation of a value of type [T].\n     *\n     * @property value Initialised value.\n     */\n    public data class Init<T>(\n        override val value: T,\n        override val path: AbsolutePath,\n        override val schema: Schema<T>,\n    ) : ValueEvent<T>(path, schema) {\n        override val oldValue: Nothing? = null\n\n        override fun toString(): String = \"Init(path=$path, value=$value)\"\n    }\n\n    /**\n     * Event that indicates that a certain value of type [T] has changed.\n     *\n     * @property value Value after the change, as found in the [form manager][FormManager].\n     * @property oldValue Old [form manager][FormManager] value.\n     */\n    public data class Change<T>(\n        override val oldValue: T,\n        override val value: T,\n        override val path: AbsolutePath,\n        override val schema: Schema<T>,\n    ) : ValueEvent<T>(path, schema) {\n        override fun toString(): String = \"Change(path=$path, oldValue=$oldValue, value=$value)\"\n    }\n\n    /**\n     * Event that indicates that a value of type [T] has been destroyed.\n     *\n     * @property value Value destroyed from the [form manager][FormManager].\n     */\n    public data class Destroy<T>(\n        override val oldValue: T,\n        override val path: AbsolutePath,\n        override val schema: Schema<T>,\n    ) : ValueEvent<T>(path, schema) {\n        override val value: Nothing? = null\n\n        override fun toString(): String = \"Destroy(path=$path, oldValue=$oldValue)\"\n    }\n\n    /**\n     * Event that indicates the addition of elements of type [TChildren] to a collection of type\n     * [T].\n     *\n     * @property value Collection, as found in the [form manager][FormManager], after the addition\n     *   of the element.\n     * @property addedValue Added value.\n     * @property id Identifier of added value.\n     */\n    public data class Add<T, TChildren>(\n        override val value: T,\n        val addedValue: TChildren,\n        val id: AbsolutePathFragment.Id,\n        override val path: AbsolutePath,\n        override val schema: CollectionSchema<T, TChildren>,\n    ) : ValueEvent<T>(path, schema) {\n        override val oldValue: Nothing? = null\n\n        override fun toString(): String = \"Add(path=$path, addedValue=$addedValue, id=$id)\"\n    }\n\n    /**\n     * Event that indicates the removal of elements of type [TChildren] from a collection of type\n     * [T].\n     *\n     * @property value Collection, as found in the [form manager][FormManager], after the removal of\n     *   the element.\n     * @property removedValue Removed value.\n     * @property id Identifier of removed value.\n     */\n    public data class Remove<T, TChildren>(\n        override val value: T,\n        val removedValue: TChildren,\n        val id: AbsolutePathFragment.Id,\n        override val path: AbsolutePath,\n        override val schema: CollectionSchema<T, TChildren>,\n    ) : ValueEvent<T>(path, schema) {\n        override val oldValue: Nothing? = null\n\n        override fun toString(): String = \"Remove(path=$path, removedValue=$removedValue, id=$id)\"\n    }\n}\n\n/** Event emitted by the form manager signaling a change in the form's state. */\npublic sealed class StateEvent<T>(override val path: AbsolutePath, override val schema: Schema<T>) :\n    FormManagerEvent<T> {\n    /**\n     * Event emitted when the validation status of a value has changed.\n     *\n     * @property status New validation status of the value.\n     * @property issues Issues of the value.\n     */\n    public data class ValidationChange<T>(\n        val status: ValidationStatus,\n        val issues: List<ValidationIssue>,\n        override val path: AbsolutePath,\n        override val schema: Schema<T>,\n    ) : StateEvent<T>(path, schema) {\n        override fun toString(): String =\n            \"ValidationChange(path=$path, status=$status, issues=$issues)\"\n    }\n\n    /**\n     * Event emitted when the display status of a value has changed.\n     *\n     * @property status New display status.\n     */\n    public data class DisplayChange<T>(\n        val status: DisplayStatus,\n        override val path: AbsolutePath,\n        override val schema: Schema<T>,\n    ) : StateEvent<T>(path, schema) {\n        override fun toString(): String = \"DisplayChange(path=$path, status=$status)\"\n    }\n\n    /**\n     * Event emitted when the dirty status of a value has changed.\n     *\n     * @property status New dirty status (`true` if dirty, `false` if not).\n     */\n    public data class DirtyChange<T>(\n        val status: Boolean,\n        override val path: AbsolutePath,\n        override val schema: Schema<T>,\n    ) : StateEvent<T>(path, schema) {\n        override fun toString(): String = \"DirtyChange(path=$path, status=$status)\"\n    }\n\n    /**\n     * Event emitted when the touched status of a value has changed.\n     *\n     * @property status New touched status (`true` if touched, `false` if not).\n     */\n    public data class TouchedChange<T>(\n        val status: Boolean,\n        override val path: AbsolutePath,\n        override val schema: Schema<T>,\n    ) : StateEvent<T>(path, schema) {\n        override fun toString(): String = \"TouchedChange(path=$path, status=$status)\"\n    }\n}\n","package io.kform\n\nimport io.kform.internal.kTypeToString\nimport kotlin.reflect.KType\n\n/**\n * Exception with occurring at the provided [path] with the given [message].\n *\n * @property path Path where the exception occurred.\n */\npublic open class ExceptionAtPath(public val path: AbsolutePath, message: String?) :\n    RuntimeException(\"At '$path'${if (message != null) \": $message\" else \"\"}\")\n\n/** Exception with message [message] thrown when an invalid [path] was provided. */\npublic open class InvalidPathException(path: AbsolutePath, message: String) :\n    ExceptionAtPath(path, message)\n\n/**\n * Exception thrown when a [computation] at path [path] has a dependency with an invalid path.\n *\n * @property computation Computation containing the invalid dependency.\n * @property dependencyKey Key of the invalid dependency.\n * @property dependencyPath Path of the invalid dependency.\n */\npublic class InvalidDependencyPathException(\n    path: AbsolutePath,\n    public val computation: Computation,\n    public val dependencyKey: String,\n    public val dependencyPath: Path,\n) :\n    InvalidPathException(\n        path,\n        \"At '$computation': At dependency '$dependencyKey': Invalid path '$dependencyPath'.\",\n    )\n\n/**\n * Exception thrown when a [computation] at path [path] has a dependency with an invalid type.\n *\n * @property computation Computation containing the invalid dependency.\n * @property expectedType Expected type of the dependency.\n * @property dependencyKey Key of the invalid dependency.\n * @property dependencyType Type of the invalid dependency.\n */\npublic class InvalidDependencyTypeException(\n    path: AbsolutePath,\n    public val computation: Computation,\n    public val expectedType: String,\n    public val dependencyKey: String,\n    public val dependencyType: KType,\n) :\n    InvalidPathException(\n        path,\n        \"At '$computation': At dependency '$dependencyKey': \" +\n            \"Expected type: '$expectedType', actual type: '${kTypeToString(dependencyType)}'.\",\n    )\n\n/**\n * Exception thrown when a [stateful computation][computation] at path [path] has an invalid path to\n * observe [toObserve].\n *\n * @property computation Computation containing the invalid path to observe.\n * @property toObserve Path to observe.\n */\npublic class InvalidPathToObserveException(\n    path: AbsolutePath,\n    public val computation: StatefulComputation<*, *>,\n    public val toObserve: Path,\n) : InvalidPathException(path, \"At '$computation': Invalid path to observe '$toObserve'.\")\n\n/**\n * Exception thrown when attempting to access a dependency with key [dependencyKey] that could not\n * be found during the execution of a computation.\n *\n * @property dependencyKey Key of the dependency as defined in the computation.\n */\npublic class DependencyNotFoundException(public val dependencyKey: String) :\n    RuntimeException(\"Dependency '$dependencyKey' was not found.\")\n\n/**\n * Exception thrown when attempting to access an external context with name [externalContextName]\n * that could not be found during the execution of a computation.\n *\n * @property externalContextName Name of the external context as defined in the computation.\n */\npublic class ExternalContextNotFoundException(public val externalContextName: String) :\n    RuntimeException(\"External context '$externalContextName' was not found.\")\n","@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform\n\nimport io.github.oshai.kotlinlogging.KotlinLogging\nimport io.kform.internal.*\nimport io.kform.internal.actions.*\nimport kotlin.coroutines.CoroutineContext\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.js.JsName\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.*\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.StateFlow\nimport kotlinx.coroutines.flow.toList\nimport kotlinx.coroutines.sync.Mutex\nimport kotlinx.coroutines.sync.withLock\n\n/** Function used to handle the flow of value information related to some path. */\npublic typealias ValueInfoHandler<TResult> = suspend (infoFlow: Flow<ValueInfo<*>>) -> TResult\n\n/** Function used to handle the flow of information related to some path. */\npublic typealias InfoHandler<TResult> = suspend (infoFlow: Flow<Info<*>>) -> TResult\n\n/** Function used to handle a gotten value. */\npublic typealias ValueHandler<T, TResult> = suspend (value: T) -> TResult\n\n/** Function used to handle the flow of located validation issues. */\npublic typealias IssuesHandler<TResult> =\n    suspend (issuesFlow: Flow<LocatedValidationIssue>) -> TResult\n\n/** Function used to handle the gotten external context. */\npublic typealias ExternalContextHandler<T, TResult> = suspend (externalContext: T) -> TResult\n\n/** Function used to subscribe to form manager events. */\npublic typealias EventHandler = suspend (event: FormManagerEvent<*>) -> Unit\n\n/** Function to run during a form manager subscription. */\npublic typealias OnSubscription = suspend () -> Unit\n\n/** Function used to unsubscribe from a form manager subscription. */\npublic typealias Unsubscribe = suspend () -> Unit\n\n/** Form manager validation mode. */\npublic enum class ValidationMode {\n    /** Automatic validations. A background process is launched that runs validations as needed. */\n    Auto,\n    /**\n     * Manual validations. Validations only run when [FormManager.validate] (or\n     * [FormManager.isValid]) is called.\n     */\n    Manual,\n}\n\n/**\n * Class responsible for managing the data and state of a form.\n *\n * The form manager stores, provides access, and allows manipulating the content of a form with a\n * provided [formSchema] in a concurrent and controlled manner. It further manages state associated\n * with the different fields of the form such as keeping track of validation issues, \"dirty\" and\n * \"touched\" states, and others.\n *\n * All form value/state accesses and manipulations should go through an instance of the form\n * manager, to make sure that changes are tracked and no \"dangerous\" concurrent operations are\n * performed. As such, storing non-copied form values outside the form manager is highly\n * discouraged. Certain methods like [valueInfo], [get], and [validate] take lambdas as arguments to\n * guarantee that data access only happens within a \"controlled environment\", i.e. during the\n * lifetime of the lambda.\n *\n * A `coroutineContext` may be provided to specify the context of coroutines launched by the form\n * manager.\n */\n@JsName(\"FormManagerKt\")\npublic class FormManager\n@JvmOverloads\npublic constructor(\n    internal val formSchema: Schema<*>,\n    private val initialValue: Any?,\n    externalContexts: ExternalContexts? = null,\n    validationMode: ValidationMode = ValidationMode.Auto,\n    coroutineContext: CoroutineContext = Dispatchers.Default,\n    autoInit: Boolean = true,\n) {\n    @JvmOverloads\n    public constructor(\n        formSchema: Schema<*>,\n        externalContexts: ExternalContexts? = null,\n        validationMode: ValidationMode = ValidationMode.Auto,\n        coroutineContext: CoroutineContext = Dispatchers.Default,\n        autoInit: Boolean = true,\n    ) : this(\n        formSchema,\n        INITIAL_VALUE,\n        externalContexts,\n        validationMode,\n        coroutineContext,\n        autoInit,\n    )\n\n    // Information on validation dependencies:\n    internal val validationDependencies: ValidationDependencies =\n        buildValidationDependencies(formSchema).also {\n            logger.debug { \"Validation dependencies: $it\" }\n        }\n    internal val validationObservedDependencies: ObservedValidationDependencies =\n        buildObservedValidationDependencies(formSchema).also {\n            logger.debug { \"Observed validation dependencies: $it\" }\n        }\n    internal val externalContextValidationDependencies: ExternalContextValidationDependencies =\n        buildExternalContextValidationDependencies(formSchema).also {\n            logger.debug { \"External context validation dependencies: $it\" }\n        }\n    internal val externalIssuesDependencies: ExternalIssuesDependencies =\n        ExternalIssuesDependencies()\n\n    // Information on computed value dependencies:\n    internal val computedValueDependencies: ComputedValueDependencies =\n        buildComputedValueDependencies(formSchema).also {\n            logger.debug { \"Computed value dependencies: $it\" }\n        }\n    internal val computedValueObservedDependencies: ObservedComputedValueDependencies =\n        buildObservedComputedValueDependencies(formSchema).also {\n            logger.debug { \"Observed computed value dependencies: $it\" }\n        }\n    internal val externalContextComputedValueDependencies:\n        ExternalContextComputedValueDependencies =\n        buildExternalContextComputedValueDependencies(formSchema).also {\n            logger.debug { \"External context computed value dependencies: $it\" }\n        }\n\n    internal lateinit var supervisorJob: CompletableJob\n    internal lateinit var scope: CoroutineScope\n\n    private lateinit var actionManager: ActionManager\n    internal lateinit var eventsBus: FormManagerEventsBus\n    private val validationDaemon: ValidationDaemon = ValidationDaemon(this)\n\n    // Global form manager state:\n    internal var formValue: Any? = UNINITIALIZED\n    internal var formState: State? = null\n    internal var externalContexts: HashMap<String, Any?> = HashMap()\n\n    // Initialisation state:\n    private val initMutex = Mutex()\n    private var initted = false // Whether [init] has run\n    // Whether the form manager can be subscribed to\n    private var subscribable: CompletableDeferred<Unit> = CompletableDeferred()\n    // Whether the form manager is fully initialised (with completed initial action)\n    private var initialized: CompletableDeferred<Unit> = CompletableDeferred()\n\n    init {\n        if (autoInit && initMutex.tryLock()) {\n            syncInit(externalContexts, validationMode, coroutineContext)\n            initMutex.unlock()\n        }\n    }\n\n    private fun syncInit(\n        externalContexts: ExternalContexts?,\n        validationMode: ValidationMode,\n        coroutineContext: CoroutineContext,\n    ) {\n        if (initted) return\n        initted = true\n\n        supervisorJob = SupervisorJob()\n        scope = CoroutineScope(CoroutineName(\"Form manager\") + supervisorJob + coroutineContext)\n        actionManager = ActionManager(scope)\n        eventsBus = FormManagerEventsBus()\n        if (externalContexts != null) {\n            this.externalContexts += externalContexts\n        }\n        subscribable.complete(Unit)\n\n        // Initialise the form manager and, if required, the validation daemon; mark the form\n        // manager as initialised once these initial actions succeed\n        val completableInitialized = initialized\n        scope\n            .launch {\n                scheduleActionAndAwait(SetAction(this@FormManager, null, null, null, initialValue))\n                if (validationMode == ValidationMode.Auto) {\n                    scheduleActionAndAwait(\n                        StartValidationDaemonAction(this@FormManager, validationDaemon)\n                    )\n                }\n                completableInitialized.complete(Unit)\n                logger.debug { \"Initialized form manager\" }\n            }\n            .invokeOnCompletion { ex ->\n                if (ex != null) {\n                    completableInitialized.completeExceptionally(ex)\n                    if (ex is CancellationException) {\n                        logger.debug { \"Cancelled initialization of form manager ($ex)\" }\n                    } else {\n                        logger.error(ex) { \"Failed to initialize form manager\" }\n                    }\n                }\n            }\n    }\n\n    /**\n     * Initialises the form manager.\n     *\n     * This method is automatically called when constructing a new form manager instance when\n     * `autoInit` is set to `true` (the default). Calling [init] on an already initted form manager\n     * has no effect.\n     */\n    public suspend fun init(\n        externalContexts: ExternalContexts? = null,\n        validationMode: ValidationMode = ValidationMode.Auto,\n        coroutineContext: CoroutineContext = Dispatchers.Default,\n    ) {\n        initMutex.withLock { syncInit(externalContexts, validationMode, coroutineContext) }\n    }\n\n    /**\n     * Destroys this form manager instance by cancelling its coroutine scope.\n     *\n     * Destroying an already destroyed form manager has no effect.\n     */\n    public suspend fun destroy() {\n        initMutex.withLock {\n            if (!initted) return\n            initted = false\n\n            withContext(NonCancellable) {\n                val cancellationException = CancellationException(\"Destroyed form manager.\")\n                subscribable.completeExceptionally(cancellationException)\n                subscribable = CompletableDeferred()\n                initialized.completeExceptionally(cancellationException)\n                initialized = CompletableDeferred()\n                scope.cancel(cancellationException)\n                supervisorJob.join()\n                validationDaemon.stop()\n                formValue = UNINITIALIZED\n                formState = null\n                externalContexts.clear()\n                logger.debug { \"Destroyed form manager\" }\n            }\n        }\n    }\n\n    /**\n     * Awaits initialisation of the form manager: in practice, it waits for the initial `SetAction`\n     * to be scheduled.\n     */\n    private suspend fun awaitInitialization() = initialized.await()\n\n    /** Awaits for the form manager to become subscribable. */\n    private suspend fun awaitSubscribable() = subscribable.await()\n\n    /** Schedules an [action] to run and returns it without waiting for its resolution. */\n    internal suspend fun <TResult, TAction : Action<TResult>> scheduleAction(\n        action: TAction\n    ): TAction = action.also { actionManager.scheduleAction(action) }\n\n    /**\n     * Schedules an [action] to run and awaits for its resolution, returning the result of the\n     * action.\n     */\n    internal suspend fun <TResult, TAction : Action<TResult>> scheduleActionAndAwait(\n        action: TAction\n    ): TResult = scheduleAction(action).await()\n\n    /** Status of the automatic validations. */\n    public val autoValidationStatus: StateFlow<AutoValidationStatus>\n        get() = validationDaemon.status\n\n    /** Sets the validation mode. */\n    public suspend fun setValidationMode(validationMode: ValidationMode) {\n        awaitInitialization()\n        scheduleActionAndAwait(\n            if (validationMode == ValidationMode.Auto)\n                StartValidationDaemonAction(this, validationDaemon)\n            else StopValidationDaemonAction(this, validationDaemon)\n        )\n    }\n\n    private fun schemaInfoImpl(path: AbsolutePath): Sequence<SchemaInfo<*>> =\n        schemaInfoImpl(formSchema, path)\n\n    // Throws when [path] doesn't match any schema path\n    private fun validatePath(path: AbsolutePath) {\n        if (!schemaInfoImpl(path).any()) {\n            throw InvalidPathException(path, \"No schema path matches this path.\")\n        }\n    }\n\n    /**\n     * Returns whether there exists at least one schema at a path matching [path].\n     *\n     * Paths that match no schema paths are deemed invalid by the form manager and most methods\n     * called with them will throw.\n     */\n    public fun isValidPath(path: Path): Boolean = schemaInfoImpl(path.toAbsolutePath()).any()\n\n    /**\n     * Returns whether there exists at least one schema at a path matching [path].\n     *\n     * Paths that match no schema paths are deemed invalid by the form manager and most methods\n     * called with them will throw.\n     */\n    public fun isValidPath(path: String): Boolean = isValidPath(AbsolutePath(path))\n\n    /**\n     * Returns a sequence of information about the schemas at paths matching [path].\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public fun schemaInfo(path: Path = AbsolutePath.MATCH_ALL): Sequence<SchemaInfo<*>> =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            schemaInfoImpl(absolutePath)\n        }\n\n    /**\n     * Returns a sequence of information about the schemas at paths matching [path].\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public fun schemaInfo(path: String): Sequence<SchemaInfo<*>> = schemaInfo(AbsolutePath(path))\n\n    /**\n     * Runs the [infoHandler] lambda with the value-information of values at paths matching [path].\n     * Returns the result of [infoHandler].\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun <TResult> valueInfo(\n        path: Path = AbsolutePath.MATCH_ALL,\n        @BuilderInference infoHandler: ValueInfoHandler<TResult>,\n    ): TResult =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(ValueInfoAction(this, absolutePath, infoHandler))\n        }\n\n    /**\n     * Runs the [infoHandler] lambda with the value-information of values at paths matching [path].\n     * Returns the result of [infoHandler].\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun <TResult> valueInfo(\n        path: String,\n        @BuilderInference infoHandler: ValueInfoHandler<TResult>,\n    ): TResult = valueInfo(AbsolutePath(path), infoHandler)\n\n    /**\n     * Runs [infoHandler] with all information of values at paths matching [path]. Returns the\n     * result of [infoHandler].\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun <TResult> info(\n        path: Path = AbsolutePath.MATCH_ALL,\n        @BuilderInference infoHandler: InfoHandler<TResult>,\n    ): TResult =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(InfoAction(this, absolutePath, infoHandler))\n        }\n\n    /**\n     * Runs [infoHandler] with all information of values at paths matching [path]. Returns the\n     * result of [infoHandler].\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun <TResult> info(\n        path: String,\n        @BuilderInference infoHandler: InfoHandler<TResult>,\n    ): TResult = info(AbsolutePath(path), infoHandler)\n\n    /**\n     * Returns the single schema matching [path].\n     *\n     * To get information about all schemas at paths matching a given path use [schemaInfo] instead.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths or more than one schema path.\n     */\n    public fun schema(path: Path = AbsolutePath.ROOT): Schema<*> =\n        path.toAbsolutePath().let { absolutePath ->\n            try {\n                schemaInfo(absolutePath).single().schema\n            } catch (ex: IllegalArgumentException) {\n                throw InvalidPathException(absolutePath, \"Path matches more than one schema path.\")\n            }\n        }\n\n    /**\n     * Returns the single schema matching [path].\n     *\n     * To get information about all schemas at paths matching a given path use [schemaInfo] instead.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths or more than one schema path.\n     */\n    public fun schema(path: String): Schema<*> = schema(AbsolutePath(path))\n\n    /**\n     * Returns whether there exists at least one value at a path matching [path].\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun has(path: Path): Boolean =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(HasAction(this, absolutePath))\n        }\n\n    /**\n     * Returns whether there exists at least one value at a path matching [path].\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun has(path: String): Boolean = has(AbsolutePath(path))\n\n    /**\n     * Runs the provided [valueHandler] with the single value at [path]. Returns the result of\n     * [valueHandler].\n     *\n     * Because this method is meant to return a single value, paths with wildcards are not accepted.\n     * To get all values at paths matching a path containing wildcards, use [valueInfo] instead.\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     *\n     * @throws InvalidPathException If [path] contains wildcards, matches no schemas, or matches\n     *   more than one value.\n     * @throws IllegalStateException If [path] matches more than one value.\n     * @throws NoSuchElementException If no value matches [path].\n     */\n    public suspend fun <T, TResult> get(\n        path: Path = AbsolutePath.ROOT,\n        @BuilderInference valueHandler: ValueHandler<T, TResult>,\n    ): TResult =\n        path.toAbsolutePath().let { absolutePath ->\n            if (absolutePath.hasAnyWildcard()) {\n                throw InvalidPathException(absolutePath, \"Path cannot contain wildcards.\")\n            }\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(GetAction(this, absolutePath, valueHandler))\n        }\n\n    /**\n     * Runs the provided [valueHandler] with the single value at [path]. Returns the result of\n     * [valueHandler].\n     *\n     * Because this method is meant to return a single value, paths with wildcards are not accepted.\n     * To get all values at paths matching a path containing wildcards, use [valueInfo] instead.\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     *\n     * @throws InvalidPathException If [path] contains wildcards, matches no schemas, or matches\n     *   more than one value.\n     * @throws IllegalStateException If [path] matches more than one value.\n     * @throws NoSuchElementException If no value matches [path].\n     */\n    public suspend fun <T, TResult> get(\n        path: String,\n        @BuilderInference valueHandler: ValueHandler<T, TResult>,\n    ): TResult = get(AbsolutePath(path), valueHandler)\n\n    /**\n     * Returns a clone (deep copy) of the single value at [path]. Equivalent to:\n     * ```kotlin\n     * get(path) { value -> schema(path).clone(value) }\n     * ```\n     *\n     * @throws InvalidPathException If [path] contains wildcards or matches no schemas.\n     * @throws IllegalStateException If [path] matches more than one value.\n     * @throws NoSuchElementException If no value matches [path].\n     */\n    public suspend fun <T> getClone(path: Path = AbsolutePath.ROOT): T =\n        path.toAbsolutePath().let { absolutePath ->\n            if (absolutePath.hasAnyWildcard()) {\n                throw InvalidPathException(absolutePath, \"Path cannot contain wildcards.\")\n            }\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(GetCloneAction(this, absolutePath))\n        }\n\n    /**\n     * Returns a clone (deep copy) of the single value at [path]. Equivalent to:\n     * ```kotlin\n     * get(path) { value -> schema(path).clone(value) }\n     * ```\n     *\n     * @throws InvalidPathException If [path] contains wildcards or matches no schemas.\n     * @throws IllegalStateException If [path] matches more than one value.\n     * @throws NoSuchElementException If no value matches [path].\n     */\n    public suspend fun <T> getClone(path: String): T = getClone(AbsolutePath(path))\n\n    /**\n     * Sets values at [path] with [toSet].\n     *\n     * If the path has a trailing non-recursive wildcard, then all existing children of its parent\n     * value are set to [toSet]. E.g. assume that the list `[1, 2, 3]` exists at `\"/list\"`; setting\n     * the value `5` at `\"/list/\u2217\"` will cause `\"/list\"` to end up with `[5, 5, 5]`.\n     *\n     * Setting a value on a path with a trailing recursive wildcard is considered equivalent to\n     * setting the value on said path without such wildcard. E.g. setting the value at `\"/x/\u2217\u2217\"` is\n     * equivalent to setting the same value at `\"/x\"`.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun set(path: Path = AbsolutePath.ROOT, toSet: Any?): Unit =\n        path.toAbsolutePath().let { absolutePath ->\n            // Normalise the path by removing trailing recursive wildcards\n            val normalizedPath =\n                if (absolutePath.lastFragment is AbsolutePathFragment.RecursiveWildcard)\n                    absolutePath.parent()\n                else absolutePath\n\n            validatePath(normalizedPath)\n            awaitInitialization()\n\n            // Schedule a set action per different targeted parent schema; knowing that an action is\n            // being performed on a single parent schema allows for some optimisations (it allows us\n            // to have the schema specify whether it supports concurrent operations; as a result,\n            // for example, the class schema allows concurrent reads/writes to different members)\n            val actions = mutableListOf<SetAction>()\n            if (normalizedPath.isRoot) {\n                actions += scheduleAction(SetAction(this, null, null, null, toSet))\n            } else {\n                val fragment = normalizedPath.lastFragment\n                val parentPath = normalizedPath.parent()\n                for ((parentSchema, _, parentQueriedPath) in schemaInfo(parentPath)) {\n                    @Suppress(\"UNCHECKED_CAST\") (parentSchema as ParentSchema<Any?>)\n                    actions +=\n                        scheduleAction(\n                            SetAction(this, parentQueriedPath, parentSchema, fragment, toSet)\n                        )\n                }\n            }\n\n            for (action in actions) {\n                try {\n                    action.await()\n                } catch (_: OverriddenActionException) {}\n            }\n        }\n\n    /**\n     * Sets values at [path] with [toSet].\n     *\n     * If the path has a trailing non-recursive wildcard, then all existing children of its parent\n     * value are set to [toSet]. E.g. assume that the list `[1, 2, 3]` exists at `\"/list\"`; setting\n     * the value `5` at `\"/list/\u2217\"` will cause `\"/list\"` to end up with `[5, 5, 5]`.\n     *\n     * Setting a value on a path with a trailing recursive wildcard is considered equivalent to\n     * setting the value on said path without such wildcard. E.g. setting the value at `\"/x/\u2217\u2217\"` is\n     * equivalent to setting the same value at `\"/x\"`.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun set(path: String, toSet: Any?): Unit = set(AbsolutePath(path), toSet)\n\n    /**\n     * Resets the values at [path] to their initial value.\n     *\n     * If the path has a trailing non-recursive wildcard, then all existing children of its parent\n     * value will have their value reset. E.g. assume that the list `[1, 2, 3]` exists at `\"/list\"`\n     * and that the schema of `\"/list/\u2217\"` has an initial value of `0`; resetting `\"/list/\u2217\"` will\n     * thus cause `\"/list\"` to end up with `[0, 0, 0]`.\n     *\n     * Resetting the value on a path with a trailing recursive wildcard is considered equivalent to\n     * resetting the value on said path without such wildcard. E.g. resetting the value at `\"/x/\u2217\u2217\"`\n     * is equivalent to resetting the value at `\"/x\"`.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun reset(path: Path = AbsolutePath.ROOT): Unit = set(path, INITIAL_VALUE)\n\n    /**\n     * Resets the values at [path] to their initial value.\n     *\n     * If the path has a trailing non-recursive wildcard, then all existing children of its parent\n     * value will have their value reset. E.g. assume that the list `[1, 2, 3]` exists at `\"/list\"`\n     * and that the schema of `\"/list/\u2217\"` has an initial value of `0`; resetting `\"/list/\u2217\"` will\n     * thus cause `\"/list\"` to end up with `[0, 0, 0]`.\n     *\n     * Resetting the value on a path with a trailing recursive wildcard is considered equivalent to\n     * resetting the value on said path without such wildcard. E.g. resetting the value at `\"/x/\u2217\u2217\"`\n     * is equivalent to resetting the value at `\"/x\"`.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun reset(path: String): Unit = reset(AbsolutePath(path))\n\n    /**\n     * Removes the values matching [path] from their parent collection(s).\n     *\n     * It is possible to clear a collection by providing a path with a trailing wildcard.\n     *\n     * Removing the value on a path with a trailing recursive wildcard is considered equivalent to\n     * removing the value on said path without such wildcard. E.g. removing the value at `\"/x/\u2217\u2217\"`\n     * is equivalent to removing the value at `\"/x\"`.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths, when attempting to remove the\n     *   root value, or when a parent of [path] is not a collection.\n     */\n    public suspend fun remove(path: Path): Unit =\n        path.toAbsolutePath().let { absolutePath ->\n            // Normalise the path by removing trailing recursive wildcards\n            val normalizedPath =\n                if (absolutePath.lastFragment is AbsolutePathFragment.RecursiveWildcard)\n                    absolutePath.parent()\n                else absolutePath\n\n            if (normalizedPath.isRoot) {\n                throw InvalidPathException(normalizedPath, \"Cannot remove root value.\")\n            }\n            validatePath(normalizedPath)\n            val parentPath = normalizedPath.parent()\n            val parentSchemasInfo = schemaInfo(parentPath)\n            for ((parentSchema, _, parentQueriedPath) in parentSchemasInfo) {\n                if (parentSchema !is CollectionSchema<*, *>) {\n                    throw InvalidPathException(\n                        normalizedPath,\n                        \"Schema at '$parentQueriedPath' is not a collection schema.\",\n                    )\n                }\n            }\n            awaitInitialization()\n\n            // Issue a remove action per different targeted parent schema (same reason as written\n            // within [set]).\n            val actions = mutableListOf<RemoveAction>()\n            val fragment = normalizedPath.lastFragment!!\n            for ((parentSchema, _, parentQueriedPath) in parentSchemasInfo) {\n                @Suppress(\"UNCHECKED_CAST\") (parentSchema as CollectionSchema<Any?, Any?>)\n                actions +=\n                    scheduleAction(RemoveAction(this, parentQueriedPath, parentSchema, fragment))\n            }\n\n            for (action in actions) {\n                try {\n                    action.await()\n                } catch (_: OverriddenActionException) {}\n            }\n        }\n\n    /**\n     * Removes the values matching [path] from their parent collection(s).\n     *\n     * It is possible to clear a collection by providing a path with a trailing wildcard.\n     *\n     * Removing the value on a path with a trailing recursive wildcard is considered equivalent to\n     * removing the value on said path without such wildcard. E.g. removing the value at `\"/x/\u2217\u2217\"`\n     * is equivalent to removing the value at `\"/x\"`.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths, when attempting to remove the\n     *   root value, or when a parent of [path] is not a collection.\n     */\n    public suspend fun remove(path: String): Unit = remove(AbsolutePath(path))\n\n    /**\n     * Runs [externalContextHandler] with the external context named [externalContextName] currently\n     * available to validations.\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     */\n    public suspend fun <T, TResult> getExternalContext(\n        externalContextName: String,\n        @BuilderInference externalContextHandler: ExternalContextHandler<T, TResult>,\n    ): TResult =\n        scheduleActionAndAwait(\n            GetExternalContextAction(this, externalContextName, externalContextHandler)\n        )\n\n    /**\n     * Sets an [external context][externalContext] with name [externalContextName] to be available\n     * to validations and returns the previous external context associated with the same name if one\n     * existed.\n     */\n    public suspend fun <T> setExternalContext(externalContextName: String, externalContext: T): T? =\n        scheduleActionAndAwait(SetExternalContextAction(this, externalContextName, externalContext))\n\n    /**\n     * Removes the external context with name [externalContextName] available to validations and\n     * returns it if it existed.\n     */\n    public suspend fun <T> removeExternalContext(externalContextName: String): T? =\n        scheduleActionAndAwait(RemoveExternalContextAction(this, externalContextName))\n\n    /**\n     * Validates all values at paths matching [path] by running a function [issuesHandler] with the\n     * flow of all found [validation issues][LocatedValidationIssue]. Returns the result of\n     * [issuesHandler].\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun <TResult> validate(\n        path: Path = AbsolutePath.MATCH_ALL,\n        @BuilderInference issuesHandler: IssuesHandler<TResult>,\n    ): TResult =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(ValidateAction(this, absolutePath, issuesHandler))\n        }\n\n    /**\n     * Validates all values at paths matching [path] by running a function [issuesHandler] with the\n     * flow of all found [validation issues][LocatedValidationIssue]. Returns the result of\n     * [issuesHandler].\n     *\n     * This method receives a lambda to ensure that no conflicting concurrent operations occur\n     * during the lifetime of said lambda.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun <TResult> validate(\n        path: String,\n        @BuilderInference issuesHandler: IssuesHandler<TResult>,\n    ): TResult = validate(AbsolutePath(path), issuesHandler)\n\n    /**\n     * Validates all values at paths matching [path] and returns a list of all found\n     * [validation issues][LocatedValidationIssue].\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun validate(path: Path = AbsolutePath.MATCH_ALL): List<LocatedValidationIssue> =\n        validate(path) { issues: Flow<LocatedValidationIssue> -> issues.toList() }\n\n    /**\n     * Validates all values at paths matching [path] and returns a list of all found\n     * [validation issues][LocatedValidationIssue].\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun validate(path: String): List<LocatedValidationIssue> =\n        validate(AbsolutePath(path))\n\n    /**\n     * Returns whether the values at paths matching [path] are valid according to their schemas.\n     *\n     * Values are said to be valid if they contain no validation errors.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isValid(path: Path = AbsolutePath.MATCH_ALL): Boolean =\n        validate(path) { issues -> issues.containsNoErrors() }\n\n    /**\n     * Returns whether the values at paths matching [path] are valid according to their schemas.\n     *\n     * Values are said to be valid if they contain no validation errors.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isValid(path: String): Boolean = isValid(AbsolutePath(path))\n\n    /**\n     * Adds external issues to the form manager. Once added, each issue can be removed either\n     * manually via [removeExternalIssues] or automatically when the value referenced by the issue\n     * or one of the values referenced by the issue's dependencies change.\n     *\n     * @throws InvalidPathException If any of the issue's paths match no schema paths.\n     */\n    public suspend fun addExternalIssues(issues: Iterable<LocatedValidationIssue>) {\n        for (issue in issues) {\n            validatePath(issue.path)\n            for (dependency in issue.dependencies) {\n                validatePath(dependency)\n            }\n        }\n        awaitInitialization()\n\n        scheduleActionAndAwait(AddExternalIssuesAction(this, issues))\n    }\n\n    /**\n     * Removes all external issues currently added to the form manager with paths matching [path].\n     * If a [code] is provided, only the issues with the provided code are removed.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun removeExternalIssues(\n        path: Path = AbsolutePath.MATCH_ALL,\n        code: String? = null,\n    ): Unit =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(RemoveExternalIssuesAction(this, absolutePath, code))\n        }\n\n    /**\n     * Removes all external issues currently added to the form manager with paths matching [path].\n     * If a [code] is provided, only the issues with the provided code are removed.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun removeExternalIssues(path: String, code: String? = null): Unit =\n        removeExternalIssues(AbsolutePath(path), code)\n\n    /**\n     * Returns whether at least one value at a path matching [path] is dirty.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isDirty(path: Path = AbsolutePath.ROOT): Boolean =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(IsDirtyAction(this, absolutePath))\n        }\n\n    /**\n     * Returns whether at least one value at a path matching [path] is dirty.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isDirty(path: String): Boolean = isDirty(AbsolutePath(path))\n\n    /**\n     * Returns whether all values at a path matching [path] are pristine (i.e. are not dirty).\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isPristine(path: Path = AbsolutePath.ROOT): Boolean = !isDirty(path)\n\n    /**\n     * Returns whether all values at a path matching [path] are pristine (i.e. are not dirty).\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isPristine(path: String): Boolean = isPristine(AbsolutePath(path))\n\n    /**\n     * Sets all values at a path matching [path] as dirty, as well as their parents.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun setDirty(path: Path = AbsolutePath.MATCH_ALL): Unit =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(SetDirtyAction(this, absolutePath))\n        }\n\n    /**\n     * Sets all values at a path matching [path] as dirty, as well as their parents.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun setDirty(path: String): Unit = setDirty(AbsolutePath(path))\n\n    /**\n     * Sets all values at paths matching [path] as pristine (i.e. as not dirty), as well as their\n     * descendents.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun setPristine(path: Path = AbsolutePath.ROOT): Unit =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(SetPristineAction(this, absolutePath))\n        }\n\n    /**\n     * Sets all values at paths matching [path] as pristine (i.e. as not dirty), as well as their\n     * descendents.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun setPristine(path: String): Unit = setPristine(AbsolutePath(path))\n\n    /**\n     * Returns whether at least one value at a path matching [path] has been touched.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isTouched(path: Path = AbsolutePath.ROOT): Boolean =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(IsTouchedAction(this, absolutePath))\n        }\n\n    /**\n     * Returns whether at least one value at a path matching [path] has been touched.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isTouched(path: String): Boolean = isTouched(AbsolutePath(path))\n\n    /**\n     * Returns whether all values at paths matching [path] are untouched (i.e. are not touched).\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isUntouched(path: Path = AbsolutePath.ROOT): Boolean = !isTouched(path)\n\n    /**\n     * Returns whether all values at paths matching [path] are untouched (i.e. are not touched).\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun isUntouched(path: String): Boolean = isUntouched(AbsolutePath(path))\n\n    /**\n     * Sets all values at paths matching [path] as touched, as well as their parents.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun setTouched(path: Path = AbsolutePath.MATCH_ALL): Unit =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(SetTouchedAction(this, absolutePath))\n        }\n\n    /**\n     * Sets all values at paths matching [path] as touched, as well as their parents.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun setTouched(path: String): Unit = setTouched(AbsolutePath(path))\n\n    /**\n     * Sets all values at paths matching [path] as untouched (i.e. as not touched), as well as their\n     * descendents.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun setUntouched(path: Path = AbsolutePath.ROOT): Unit =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitInitialization()\n\n            scheduleActionAndAwait(SetUntouchedAction(this, absolutePath))\n        }\n\n    /**\n     * Sets all values at paths matching [path] as untouched (i.e. as not touched), as well as their\n     * descendents.\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun setUntouched(path: String): Unit = setUntouched(AbsolutePath(path))\n\n    /**\n     * Subscribes to all events with paths matching [path] by running [eventHandler] for each event.\n     * Returns a function that should be called to unsubscribe from the subscription.\n     *\n     * An [onSubscription] function may be provided, which is guaranteed to run after the\n     * subscription has completed but before any events are emitted to the [eventHandler].\n     *\n     * All subscriptions are automatically cancelled when the form manager is [destroyed][destroy].\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun subscribe(\n        path: Path = AbsolutePath.MATCH_ALL,\n        onSubscription: OnSubscription? = null,\n        eventHandler: EventHandler,\n    ): Unsubscribe =\n        path.toAbsolutePath().let { absolutePath ->\n            validatePath(absolutePath)\n            awaitSubscribable()\n\n            eventsBus.subscribe(absolutePath, onSubscription, eventHandler)\n        }\n\n    /**\n     * Subscribes to all events with paths matching [path] by running [eventHandler] for each event.\n     * Returns a function that should be called to unsubscribe from the subscription.\n     *\n     * An [onSubscription] function may be provided, which is guaranteed to run after the\n     * subscription has completed but before any events are emitted to the [eventHandler].\n     *\n     * All subscriptions are automatically cancelled when the form manager is [destroyed][destroy].\n     *\n     * @throws InvalidPathException If [path] matches no schema paths.\n     */\n    public suspend fun subscribe(\n        path: String,\n        onSubscription: OnSubscription? = null,\n        eventHandler: EventHandler,\n    ): Unsubscribe = subscribe(AbsolutePath(path), onSubscription, eventHandler)\n\n    public companion object {\n        /** Logger used by the form manager (and internal classes used by it). */\n        internal val logger = KotlinLogging.logger {}\n    }\n}\n","@file:JvmName(\"FormUtils\")\n\npackage io.kform\n\nimport io.github.oshai.kotlinlogging.KotlinLogging\nimport io.kform.internal.*\nimport io.kform.internal.INITIAL_VALUE\nimport io.kform.internal.SchemaEventsNoOpBus\nimport io.kform.internal.computationDependenciesInfo\nimport io.kform.internal.schemaInfoImpl\nimport io.kform.internal.validateComputation\nimport io.kform.internal.valueInfoImpl\nimport kotlin.jvm.JvmName\nimport kotlinx.coroutines.CancellationException\nimport kotlinx.coroutines.flow.*\n\n/** Logger used by the form util. */\nprivate val logger = KotlinLogging.logger {}\n\n/** External contexts. */\npublic typealias ExternalContexts = Map<String, Any?>\n\n/** External validations. */\npublic typealias ExternalValidations = Map<PathOrString, Iterable<Validation<*>>>\n\n/**\n * Validates that the provided [path] points to a schema of [formSchema].\n *\n * @throws InvalidPathException If the path is invalid.\n */\npublic fun validatePath(formSchema: Schema<*>, path: Path): Unit =\n    path.toAbsolutePath().let { absolutePath ->\n        if (!schemaInfoImpl(formSchema, absolutePath).any()) {\n            throw InvalidPathException(absolutePath, \"No schema matches this path.\")\n        }\n    }\n\n/**\n * Validates all validations of the provided [formSchema] by checking that all validation\n * dependencies are valid (i.e. that they point to valid locations and have valid types).\n *\n * @throws InvalidDependencyPathException If a validation has an invalid dependency path.\n * @throws InvalidDependencyTypeException If a validation has an invalid dependency type.\n */\npublic fun validateSchemaValidations(formSchema: Schema<*>) {\n    for ((schema, path) in schemaInfo(formSchema, AbsolutePath.MATCH_ALL)) {\n        for (validation in schema.validations) {\n            validateComputation(formSchema, path, validation)\n        }\n    }\n}\n\n/**\n * Validates the provided [external validations][externalValidations] in the context of the given\n * [formSchema] by checking that all validation dependencies are valid (i.e. that they point to\n * valid locations and have valid types).\n *\n * @throws InvalidPathException If an external validation path is invalid.\n * @throws InvalidDependencyPathException If a validation has an invalid dependency path.\n * @throws InvalidDependencyTypeException If a validation has an invalid dependency type.\n */\npublic fun validateExternalValidations(\n    formSchema: Schema<*>,\n    externalValidations: Map<PathOrString, Iterable<Validation<*>>>,\n) {\n    for ((path, validations) in externalValidations) {\n        val absolutePath = path.toAbsolutePath()\n        validatePath(formSchema, absolutePath)\n        for (validation in validations) {\n            validateComputation(formSchema, absolutePath, validation)\n        }\n    }\n}\n\n/**\n * Returns whether there exists at least one schema within [formSchema] matching [path].\n *\n * Paths that match no schemas are deemed invalid, and most functions called with them will throw.\n */\npublic fun isValidPath(formSchema: Schema<*>, path: Path): Boolean =\n    schemaInfoImpl(formSchema, AbsolutePath(path)).any()\n\n/**\n * Returns whether there exists at least one schema within [formSchema] matching [path].\n *\n * Paths that match no schemas are deemed invalid, and most functions called with them will throw.\n */\npublic fun isValidPath(formSchema: Schema<*>, path: String): Boolean =\n    isValidPath(formSchema, AbsolutePath(path))\n\n/**\n * Returns a sequence of information about the schemas within [formSchema] matching [path].\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic fun schemaInfo(\n    formSchema: Schema<*>,\n    path: Path = AbsolutePath.MATCH_ALL,\n): Sequence<SchemaInfo<*>> =\n    path.toAbsolutePath().let { absolutePath ->\n        validatePath(formSchema, absolutePath)\n        schemaInfoImpl(formSchema, absolutePath)\n    }\n\n/**\n * Returns a sequence of information about the schemas within [formSchema] matching [path].\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic fun schemaInfo(formSchema: Schema<*>, path: String): Sequence<SchemaInfo<*>> =\n    schemaInfo(formSchema, AbsolutePath(path))\n\n/**\n * Returns the single schema within [formSchema] matching [path].\n *\n * To get information about all schemas matching a path use [schemaInfo] instead.\n *\n * @throws InvalidPathException If [path] matches no schemas or more than one schema.\n */\npublic fun schema(formSchema: Schema<*>, path: Path): Schema<*> =\n    path.toAbsolutePath().let { absolutePath ->\n        try {\n            schemaInfo(formSchema, absolutePath).single().schema\n        } catch (ex: IllegalArgumentException) {\n            throw InvalidPathException(absolutePath, \"Path matches more than one schema.\")\n        }\n    }\n\n/**\n * Returns the single schema within [formSchema] matching [path].\n *\n * To get information about all schemas matching a path use [schemaInfo] instead.\n *\n * @throws InvalidPathException If [path] matches no schemas or more than one schema.\n */\npublic fun schema(formSchema: Schema<*>, path: String): Schema<*> =\n    schema(formSchema, AbsolutePath(path))\n\n/**\n * Returns a flow of information about the parts of the form value [formValue] (with schema\n * [formSchema]) matching [path].\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic fun <T> valueInfo(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: Path = AbsolutePath.MATCH_ALL,\n): Flow<ValueInfo<*>> =\n    path.toAbsolutePath().let { absolutePath ->\n        validatePath(formSchema, absolutePath)\n        valueInfoImpl(formSchema, formValue, absolutePath)\n    }\n\n/**\n * Returns a flow of information about the parts of the form value [formValue] (with schema\n * [formSchema]) matching [path].\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic fun <T> valueInfo(formSchema: Schema<T>, formValue: T, path: String): Flow<ValueInfo<*>> =\n    valueInfo(formSchema, formValue, AbsolutePath(path))\n\n/**\n * Returns whether there exists a part of the form value [formValue] (with schema [formSchema])\n * matching [path].\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic suspend fun <T> has(formSchema: Schema<T>, formValue: T, path: Path): Boolean =\n    valueInfo(formSchema, formValue, path).firstOrNull() != null\n\n/**\n * Returns whether there exists a part of the form value [formValue] (with schema [formSchema])\n * matching [path].\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic suspend fun <T> has(formSchema: Schema<T>, formValue: T, path: String): Boolean =\n    has(formSchema, formValue, AbsolutePath(path))\n\n/**\n * Returns the single part of the form value [formValue] (with schema [formSchema]) matching [path].\n *\n * To get information about multiple parts of a form value at once, use [valueInfo] instead.\n *\n * @throws InvalidPathException If [path] contains wildcards or matches no schemas.\n * @throws IllegalStateException If [path] matches more than one value.\n * @throws NoSuchElementException If no part of [formValue] matches [path].\n */\npublic suspend fun <T> get(formSchema: Schema<T>, formValue: T, path: Path): Any? =\n    path.toAbsolutePath().let { absolutePath ->\n        if (absolutePath.hasAnyWildcard()) {\n            throw InvalidPathException(absolutePath, \"Path cannot contain wildcards.\")\n        }\n        validatePath(formSchema, absolutePath)\n        valueInfoImpl(formSchema, formValue, absolutePath).single().value\n    }\n\n/**\n * Returns the single part of the form value [formValue] (with schema [formSchema]) matching [path].\n *\n * To get information about multiple parts of a form value at once, use [valueInfo] instead.\n *\n * @throws InvalidPathException If [path] contains wildcards or matches no schemas.\n * @throws IllegalStateException If [path] matches more than one value.\n * @throws NoSuchElementException If no part of [formValue] matches [path].\n */\npublic suspend fun <T> get(formSchema: Schema<T>, formValue: T, path: String): Any? =\n    get(formSchema, formValue, AbsolutePath(path))\n\n/**\n * Returns a clone (deep copy) of the single part of the form value [formValue] (with schema\n * [formSchema]) matching [path].\n *\n * @throws InvalidPathException If [path] contains wildcards or matches no schemas.\n * @throws IllegalStateException If [path] matches more than one value.\n * @throws NoSuchElementException If no part of [formValue] matches [path].\n */\npublic suspend fun <T> getClone(formSchema: Schema<T>, formValue: T, path: Path): Any? =\n    path.toAbsolutePath().let { absolutePath ->\n        if (absolutePath.hasAnyWildcard()) {\n            throw InvalidPathException(absolutePath, \"Path cannot contain wildcards.\")\n        }\n        validatePath(formSchema, absolutePath)\n        @Suppress(\"UNCHECKED_CAST\")\n        val info = valueInfoImpl(formSchema, formValue, absolutePath).single() as ValueInfo<Any?>\n        info.schema.clone(info.value)\n    }\n\n/**\n * Returns a clone (deep copy) of the single part of the form value [formValue] (with schema\n * [formSchema]) matching [path].\n *\n * @throws InvalidPathException If [path] contains wildcards or matches no schemas.\n * @throws IllegalStateException If [path] matches more than one value.\n * @throws NoSuchElementException If no part of [formValue] matches [path].\n */\npublic suspend fun <T> getClone(formSchema: Schema<T>, formValue: T, path: String): Any? =\n    getClone(formSchema, formValue, AbsolutePath(path))\n\n/**\n * Sets values at [path] that are part of the form value [formValue] (with schema [formSchema]) with\n * value [toSet].\n *\n * If the path has a trailing non-recursive wildcard, then all existing children of its parent value\n * are set to [toSet]. E.g. assume that the list `[1, 2, 3]` exists at `\"/list\"`; setting the value\n * `5` at `\"/list/\u2217\"` will cause `\"/list\"` to end up with `[5, 5, 5]`.\n *\n * Setting a value on a path with a trailing recursive wildcard is considered equivalent to setting\n * the value on said path without such wildcard. E.g. setting the value at `\"/x/\u2217\u2217\"` is equivalent\n * to setting the same value at `\"/x\"`.\n *\n * @throws InvalidPathException If [path] matches no schemas, or when attempting to set the root\n *   value.\n */\npublic suspend fun <T> set(formSchema: Schema<T>, formValue: T, path: Path, toSet: Any?): Unit =\n    path.toAbsolutePath().let { absolutePath ->\n        // Normalise the path by removing trailing recursive wildcards\n        val normalizedPath =\n            if (absolutePath.lastFragment is AbsolutePathFragment.RecursiveWildcard)\n                absolutePath.parent()\n            else absolutePath\n\n        if (normalizedPath.isRoot) {\n            throw InvalidPathException(normalizedPath, \"Cannot set root value.\")\n        }\n        validatePath(formSchema, normalizedPath)\n\n        val fragment = normalizedPath.lastFragment!!\n        val parentPath = normalizedPath.parent()\n        valueInfoImpl(formSchema, formValue, parentPath).collect { parentInfo ->\n            setOnParent(parentInfo, fragment, toSet, SchemaEventsNoOpBus)\n        }\n    }\n\n/**\n * Sets values at [path] that are part of the form value [formValue] (with schema [formSchema]) with\n * value [toSet].\n *\n * If the path has a trailing non-recursive wildcard, then all existing children of its parent value\n * are set to [toSet]. E.g. assume that the list `[1, 2, 3]` exists at `\"/list\"`; setting the value\n * `5` at `\"/list/\u2217\"` will cause `\"/list\"` to end up with `[5, 5, 5]`.\n *\n * Setting a value on a path with a trailing recursive wildcard is considered equivalent to setting\n * the value on said path without such wildcard. E.g. setting the value at `\"/x/\u2217\u2217\"` is equivalent\n * to setting the same value at `\"/x\"`.\n *\n * @throws InvalidPathException If [path] matches no schemas, or when attempting to set the root\n *   value.\n */\npublic suspend fun <T> set(formSchema: Schema<T>, formValue: T, path: String, toSet: Any?): Unit =\n    set(formSchema, formValue, AbsolutePath(path), toSet)\n\n/**\n * Resets the values at [path] that are part of the form value [formValue] (with schema\n * [formSchema]) to their initial value.\n *\n * If the path has a trailing non-recursive wildcard, then all existing children of its parent value\n * will have their value reset. E.g. assume that the list `[1, 2, 3]` exists at `\"/list\"` and that\n * the schema of `\"/list/\u2217\"` has an initial value of `0`; resetting `\"/list/\u2217\"` will thus cause\n * `\"/list\"` to end up with `[0, 0, 0]`.\n *\n * Resetting the value on a path with a trailing recursive wildcard is considered equivalent to\n * resetting the value on said path without such wildcard. E.g. resetting the value at `\"/x/\u2217\u2217\"` is\n * equivalent to resetting the value at `\"/x\"`.\n *\n * @throws InvalidPathException If [path] matches no schemas, or when attempting to reset the root\n *   value.\n */\npublic suspend fun <T> reset(formSchema: Schema<T>, formValue: T, path: Path): Unit =\n    set(formSchema, formValue, AbsolutePath(path), INITIAL_VALUE)\n\n/**\n * Resets the values at [path] that are part of the form value [formValue] (with schema\n * [formSchema]) to their initial value.\n *\n * If the path has a trailing non-recursive wildcard, then all existing children of its parent value\n * will have their value reset. E.g. assume that the list `[1, 2, 3]` exists at `\"/list\"` and that\n * the schema of `\"/list/\u2217\"` has an initial value of `0`; resetting `\"/list/\u2217\"` will thus cause\n * `\"/list\"` to end up with `[0, 0, 0]`.\n *\n * Resetting the value on a path with a trailing recursive wildcard is considered equivalent to\n * resetting the value on said path without such wildcard. E.g. resetting the value at `\"/x/\u2217\u2217\"` is\n * equivalent to resetting the value at `\"/x\"`.\n *\n * @throws InvalidPathException If [path] matches no schemas, or when attempting to reset the root\n *   value.\n */\npublic suspend fun <T> reset(formSchema: Schema<T>, formValue: T, path: String): Unit =\n    reset(formSchema, formValue, AbsolutePath(path))\n\n/**\n * Removes the values matching [path] that are part of the form value [formValue] (with schema\n * [formSchema]) from their parent collection(s).\n *\n * It is possible to clear a collection by providing a path with a trailing wildcard.\n *\n * Removing the value on a path with a trailing recursive wildcard is considered equivalent to\n * removing the value on said path without such wildcard. E.g. removing the value at `\"/x/\u2217\u2217\"` is\n * equivalent to removing the value at `\"/x\"`.\n *\n * @throws InvalidPathException If [path] matches no schema paths, when attempting to remove the\n *   root value, or when a parent of [path] is not a collection.\n */\npublic suspend fun <T> remove(formSchema: Schema<T>, formValue: T, path: Path): Unit =\n    path.toAbsolutePath().let { absolutePath ->\n        // Normalise the path by removing trailing recursive wildcards\n        val normalizedPath =\n            if (absolutePath.lastFragment is AbsolutePathFragment.RecursiveWildcard)\n                absolutePath.parent()\n            else absolutePath\n\n        if (normalizedPath.isRoot) {\n            throw InvalidPathException(normalizedPath, \"Cannot remove root value.\")\n        }\n        validatePath(formSchema, normalizedPath)\n\n        val parentPath = normalizedPath.parent()\n        val parentSchemasInfo = schemaInfoImpl(formSchema, parentPath)\n        for ((parentSchema, _, parentQueriedPath) in parentSchemasInfo) {\n            if (parentSchema !is CollectionSchema<*, *>) {\n                throw InvalidPathException(\n                    normalizedPath,\n                    \"Schema at '$parentQueriedPath' is not a collection schema.\",\n                )\n            }\n        }\n\n        val fragment = normalizedPath.lastFragment!!\n        for (parentSchemaInfo in parentSchemasInfo) {\n            valueInfoImpl(formSchema, formValue, parentSchemaInfo.queriedPath).collect { parentInfo\n                ->\n                removeFromParent(parentInfo, fragment, SchemaEventsNoOpBus)\n            }\n        }\n    }\n\n/**\n * Removes the values matching [path] that are part of the form value [formValue] (with schema\n * [formSchema]) from their parent collection(s).\n *\n * It is possible to clear a collection by providing a path with a trailing wildcard.\n *\n * Removing the value on a path with a trailing recursive wildcard is considered equivalent to\n * removing the value on said path without such wildcard. E.g. removing the value at `\"/x/\u2217\u2217\"` is\n * equivalent to removing the value at `\"/x\"`.\n *\n * @throws InvalidPathException If [path] matches no schema paths, when attempting to remove the\n *   root value, or when a parent of [path] is not a collection.\n */\npublic suspend fun <T> remove(formSchema: Schema<T>, formValue: T, path: String): Unit =\n    remove(formSchema, formValue, AbsolutePath(path))\n\n/**\n * Validates the parts of the form value [formValue] matching [path] against [formSchema]. Returns a\n * flow of found [validation issues][LocatedValidationIssue].\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic fun <T> validate(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: Path,\n    externalContexts: ExternalContexts? = null,\n): Flow<LocatedValidationIssue> =\n    path.toAbsolutePath().let { absolutePath ->\n        validatePath(formSchema, absolutePath)\n        flow {\n            valueInfoImpl(formSchema, formValue, absolutePath).collect { info ->\n                for (validation in info.schema.validations) {\n                    emitAll(\n                        @Suppress(\"UNCHECKED_CAST\")\n                        runValidation(\n                            formSchema,\n                            formValue,\n                            externalContexts,\n                            validation as Validation<Any?>,\n                            info,\n                        )\n                    )\n                }\n            }\n        }\n    }\n\n/**\n * Validates the parts of the form value [formValue] matching [path] against [formSchema]. Returns a\n * flow of found [validation issues][LocatedValidationIssue].\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * [External validations][externalValidations] may be provided to further validate the form against\n * validations not present in the schema.\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic fun <T> validate(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: String,\n    externalContexts: ExternalContexts? = null,\n): Flow<LocatedValidationIssue> =\n    validate(formSchema, formValue, AbsolutePath(path), externalContexts)\n\n/**\n * Validates all parts of the form value [formValue] against [formSchema]. Returns a flow of found\n * [validation issues][LocatedValidationIssue].\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * [External validations][externalValidations] may be provided to further validate the form against\n * validations not present in the schema.\n */\npublic fun <T> validate(\n    formSchema: Schema<T>,\n    formValue: T,\n    externalContexts: ExternalContexts? = null,\n): Flow<LocatedValidationIssue> =\n    validate(formSchema, formValue, AbsolutePath.MATCH_ALL, externalContexts)\n\n/**\n * Validates the parts of the form value [formValue] matching [path] with schema [formSchema]\n * against a map of external validations [externalValidations].\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic fun <T> validateExternally(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: Path,\n    externalValidations: ExternalValidations,\n    externalContexts: ExternalContexts? = null,\n): Flow<LocatedValidationIssue> =\n    path.toAbsolutePath().let { absolutePath ->\n        validatePath(formSchema, absolutePath)\n        flow {\n            for ((validatingPath, validations) in externalValidations) {\n                val validatingAbsolutePath = validatingPath.toAbsolutePath()\n                if (validatingAbsolutePath in absolutePath) {\n                    valueInfoImpl(formSchema, formValue, validatingAbsolutePath).collect { info ->\n                        for (validation in validations) {\n                            emitAll(\n                                @Suppress(\"UNCHECKED_CAST\")\n                                runValidation(\n                                    formSchema,\n                                    formValue,\n                                    externalContexts,\n                                    validation as Validation<Any?>,\n                                    info,\n                                )\n                            )\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n/**\n * Validates the parts of the form value [formValue] matching [path] with schema [formSchema]\n * against a map of external validations [externalValidations].\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic fun <T> validateExternally(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: String,\n    externalValidations: ExternalValidations,\n    externalContexts: ExternalContexts? = null,\n): Flow<LocatedValidationIssue> =\n    validateExternally(\n        formSchema,\n        formValue,\n        AbsolutePath(path),\n        externalValidations,\n        externalContexts,\n    )\n\n/**\n * Validates all parts of the form value [formValue] with schema [formSchema] against a map of\n * external validations [externalValidations].\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n */\npublic fun <T> validateExternally(\n    formSchema: Schema<T>,\n    formValue: T,\n    externalValidations: ExternalValidations,\n    externalContexts: ExternalContexts? = null,\n): Flow<LocatedValidationIssue> =\n    validateExternally(\n        formSchema,\n        formValue,\n        AbsolutePath.MATCH_ALL,\n        externalValidations,\n        externalContexts,\n    )\n\n/** Runs a single validation and returns a flow over its validation issues. */\nprivate fun <T, TValidated> runValidation(\n    formSchema: Schema<T>,\n    formValue: T,\n    externalContexts: ExternalContexts?,\n    validation: Validation<TValidated>,\n    info: ValueInfo<TValidated>,\n): Flow<LocatedValidationIssue> = flow {\n    val validationContext =\n        ValidationContext(\n            info.value,\n            info.schema,\n            info.path,\n            info.schemaPath,\n            computationDependenciesInfo(formSchema, formValue, info.path, validation.dependencies),\n            validation.externalContextDependencies.associateWith { externalContexts?.get(it) },\n        )\n\n    suspend fun handleException(ex: Throwable) {\n        if (ex !is CancellationException) {\n            logger.error(ex) { \"At '${info.path}': Failed to run validation '$validation'\" }\n            emit(LocatedValidationIssue(info.path, validation, ValidationExceptionError(ex)))\n        }\n    }\n\n    // Wrap code in `try/catch` since we're calling user code (`validate`) and an error may\n    // occur when **creating** the flow. Typically, however, if an error occurs, it will be\n    // within the flow.\n    var issuesFlow: Flow<ValidationIssue>? = null\n    try {\n        issuesFlow = validation.run { validationContext.validate() }\n    } catch (ex: Throwable) {\n        handleException(ex)\n    }\n    // If the validation throws, we still emit the issues up to the point it threw, plus a\n    // \"validation exception error\" issue\n    issuesFlow\n        ?.catch { ex -> handleException(ex) }\n        ?.collect { issue -> emit(LocatedValidationIssue(info.path, validation, issue)) }\n}\n\n/**\n * Returns whether the parts of the form value [formValue] (with schema [formSchema]) matching\n * [path] are valid according to their schemas. These parts are said to be valid if they contain no\n * validation errors.\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic suspend fun <T> isValid(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: Path,\n    externalContexts: ExternalContexts? = null,\n): Boolean = validate(formSchema, formValue, path, externalContexts).containsNoErrors()\n\n/**\n * Returns whether the parts of the form value [formValue] (with schema [formSchema]) matching\n * [path] are valid according to their schemas. These parts are said to be valid if they contain no\n * validation errors.\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic suspend fun <T> isValid(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: String,\n    externalContexts: ExternalContexts? = null,\n): Boolean = isValid(formSchema, formValue, AbsolutePath(path), externalContexts)\n\n/**\n * Returns whether all parts of the form value [formValue] (with schema [formSchema]) are valid\n * according to their schemas. These parts are said to be valid if they contain no validation\n * errors.\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n */\npublic suspend fun <T> isValid(\n    formSchema: Schema<T>,\n    formValue: T,\n    externalContexts: ExternalContexts? = null,\n): Boolean = isValid(formSchema, formValue, AbsolutePath.MATCH_ALL, externalContexts)\n\n/**\n * Returns whether the parts of the form value [formValue] (with schema [formSchema]) matching\n * [path] are valid according to the provided [external validations][externalValidations]. These\n * parts are said to be valid if they contain no validation errors.\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic suspend fun <T> isValidExternally(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: Path,\n    externalValidations: ExternalValidations,\n    externalContexts: ExternalContexts? = null,\n): Boolean =\n    validateExternally(formSchema, formValue, path, externalValidations, externalContexts)\n        .containsNoErrors()\n\n/**\n * Returns whether the parts of the form value [formValue] (with schema [formSchema]) matching\n * [path] are valid according to the provided [external validations][externalValidations]. These\n * parts are said to be valid if they contain no validation errors.\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n *\n * @throws InvalidPathException If [path] matches no schemas.\n */\npublic suspend fun <T> isValidExternally(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: String,\n    externalValidations: ExternalValidations,\n    externalContexts: ExternalContexts? = null,\n): Boolean =\n    isValidExternally(\n        formSchema,\n        formValue,\n        AbsolutePath(path),\n        externalValidations,\n        externalContexts,\n    )\n\n/**\n * Returns whether all parts of the form value [formValue] (with schema [formSchema]) are valid\n * according to the provided [external validations][externalValidations]. These parts are said to be\n * valid if they contain no validation errors.\n *\n * A map of [external contexts][externalContexts] may be provided for validations that depend on\n * them.\n */\npublic suspend fun <T> isValidExternally(\n    formSchema: Schema<T>,\n    formValue: T,\n    externalValidations: ExternalValidations,\n    externalContexts: ExternalContexts? = null,\n): Boolean =\n    isValidExternally(\n        formSchema,\n        formValue,\n        AbsolutePath.MATCH_ALL,\n        externalValidations,\n        externalContexts,\n    )\n","package io.kform\n\nimport kotlin.js.JsName\n\n/**\n * Information about a schema of values of type [T]: the [schema] instance, and its [path].\n *\n * @property schema Schema itself.\n * @property path Absolute path of the schema within a [form validator][FormValidator] or\n *   [manager][FormManager].\n * @property queriedPath Absolute path of the queried value within a [form validator][FormValidator]\n *   or [manager][FormManager].\n *\n * This path may be either equal to the [schema path][path], or a more specific path contained by\n * it.\n */\n@JsName(\"SchemaInfoKt\")\npublic data class SchemaInfo<T>(\n    public val schema: Schema<T>,\n    public val path: AbsolutePath,\n    public val queriedPath: AbsolutePath = path,\n)\n\n/**\n * Information about a value of type [T]: the [value] itself, its absolute [path], and its [schema].\n *\n * @property value Value itself.\n * @property schema Schema of the value.\n * @property path Absolute path of the value within a [form manager][FormManager] or within the\n *   value passed to a [form validator][FormValidator].\n * @property schemaPath Absolute path of the schema within a [form validator][FormValidator] or\n *   [manager][FormManager].\n */\n@JsName(\"ValueInfoKt\")\npublic data class ValueInfo<T>(\n    public val value: T,\n    public val schema: Schema<T>,\n    public val path: AbsolutePath,\n    public val schemaPath: AbsolutePath,\n)\n\n/**\n * Information about the state of a value.\n *\n * @property state State itself.\n * @property schema Schema of the value.\n * @property path Absolute path of the value with this state within a [form manager][FormManager].\n */\n@JsName(\"StateInfoKt\")\npublic data class StateInfo<T>(\n    public val state: State?,\n    public val schema: Schema<T>,\n    public val path: AbsolutePath,\n)\n\n/**\n * Information about a value of type [T] and its state: the [value] itself, its [state], its\n * absolute [path], and its [schema].\n *\n * @property value Value itself.\n * @property state State of the value.\n * @property schema Schema of the value.\n * @property path Absolute path of the value within a [form manager][FormManager] or within the\n *   value passed to a [form validator][FormValidator].\n * @property schemaPath Absolute path of the schema within a [form validator][FormValidator] or\n *   [manager][FormManager].\n */\n@JsName(\"ValueStateInfoKt\")\ninternal data class ValueStateInfo<T>(\n    val value: T,\n    val state: State?,\n    val schema: Schema<T>,\n    val path: AbsolutePath,\n    val schemaPath: AbsolutePath,\n)\n\n/**\n * Information about a value in the [form manager][FormManager].\n *\n * @property value Value itself.\n * @property schema Schema of the value.\n * @property path Absolute path of the value within a [form manager][FormManager].\n * @property schemaPath Absolute path of the schema within a [form manager][FormManager].\n * @property dirty Whether the value is considered dirty.\n * @property touched Whether the value is considered touched.\n * @property issues Issues associated with the value or `null` when the value has not yet been\n *   validated.\n * @property validationStatus Validation status of the value.\n * @property displayStatus Display status of the value.\n */\n@JsName(\"InfoKt\")\npublic data class Info<T>(\n    public val value: T,\n    public val schema: Schema<T>,\n    public val path: AbsolutePath,\n    public val schemaPath: AbsolutePath,\n    public val dirty: Boolean,\n    public val touched: Boolean,\n    public val issues: List<ValidationIssue>,\n    public val validationStatus: ValidationStatus,\n    public val displayStatus: DisplayStatus,\n)\n",null,null,null,null,"package io.kform\n\nimport kotlin.js.JsName\n\n/** Fragment of a path. */\n@JsName(\"PathFragmentKt\")\npublic sealed class PathFragment {\n    /** Path fragment representing the root path. */\n    public data object Root : PathFragment()\n\n    /** Path fragment representing the current path (`\".\"` in string notation). */\n    public data object CurrentPath : PathFragment()\n\n    /** Parent fragment representing the parent path (`\"..\"` in string notation). */\n    public data object ParentPath : PathFragment()\n}\n\n/** Fragment of an absolute path. */\n@JsName(\"AbsolutePathFragmentKt\")\npublic sealed class AbsolutePathFragment : PathFragment() {\n    /**\n     * Path fragment representing an identifier [id]. In string notation, the id fragment with [id]\n     * `\"x\"` would be represented as `x`; if the string version of the fragment conflicts with a\n     * different fragment, then the fragment is escaped, e.g. the id fragment with [id] `\"*\"` would\n     * be represented as `~*` in string notation.\n     */\n    public data class Id(val id: String) : AbsolutePathFragment() {\n        /**\n         * Creates a new [Id] path fragment with [id] transformed into a string via `id.toString()`.\n         */\n        public constructor(id: Any) : this(id.toString())\n    }\n\n    /**\n     * Path fragment representing the \"end\" of a collection (`\"-\"` in string notation).\n     *\n     * This fragment represents the fictional element after the last element of a collection.\n     */\n    public data object CollectionEnd : AbsolutePathFragment()\n\n    /**\n     * Wildcard fragment (`\"*\"` in string notation).\n     *\n     * Wildcard fragments match against any other fragments.\n     */\n    public data object Wildcard : AbsolutePathFragment()\n\n    /**\n     * Recursive wildcard fragment (`\"**\"` in string notation).\n     *\n     * Recursive wildcard fragments match against zero or more any other fragments.\n     */\n    public data object RecursiveWildcard : AbsolutePathFragment()\n}\n","package io.kform\n\nimport kotlin.js.JsName\nimport kotlin.reflect.KType\nimport kotlinx.coroutines.flow.Flow\n\n/** Bus used by schemas to emit events representing \"what happened\" to values. */\npublic interface SchemaEventsBus {\n    /** Emit the event representing \"what happened\" with the value. */\n    public suspend fun emit(event: ValueEvent<*>)\n}\n\n/**\n * Schema representing metadata on values of type [T].\n *\n * The schema of a form is responsible for specifying which validations to run on it, as well as how\n * to \"manage\" the form data. If a certain form contains a field of, for example, type [Int], then\n * there should be a schema of type `Schema<Int>` that holds the metadata required for knowing how\n * to, for example, initialise said field and validate it.\n *\n * The [form manager][FormManager] uses schemas extensively to, amongst others, initialise data, set\n * data, and validate data; the schema is responsible for specifying **how** each different type of\n * data is initialised or set.\n */\n@JsName(\"SchemaKt\")\npublic interface Schema<T> {\n    /** Information about the type of value represented by this schema. */\n    public val typeInfo: TypeInfo\n\n    /** List of validations used to validate this schema. */\n    public val validations: List<Validation<T>>\n\n    /**\n     * Initial value for a value of this schema.\n     *\n     * New values of this schema will hold this value by default. Moreover, when a value of this\n     * schema is [reset][FormManager.reset] by the [form manager][FormManager], it is set to this\n     * value.\n     */\n    public val initialValue: T\n\n    /** Returns a clone (deep copy) of [value]. */\n    public suspend fun clone(value: T): T\n\n    /**\n     * Whether a value of this schema can be assigned to a variable with the provided [type].\n     *\n     * This is used by [validations][Validation] to check, at runtime, whether dependency values can\n     * be assigned to variables of a certain [type].\n     *\n     * Unless overriden, this function simply returns `true`, meaning that values can be assigned to\n     * any type.\n     */\n    public fun assignableTo(type: KType): Boolean = true\n\n    /**\n     * Initialises and sets a value of this schema from a given value [fromValue] to be stored by\n     * the [form manager][FormManager], sending events about the initialisation of the value through\n     * [eventsBus]. The provided [path] represents the path of the value being initialised within\n     * the [form manager][FormManager]. The value must be set via [setValue], which should always be\n     * called.\n     *\n     * Initialisation events should be emitted \"bottom up\": this means that an event signaling the\n     * initialisation of a parent value must only be emitted **after** all events signaling the\n     * initialisation of its children. As a side effect of this, implementations of [init] may bail\n     * when their coroutine context is no longer active (meaning that the coroutine was cancelled\n     * due to another operation that \"overrides\" this operation) and perform less work than\n     * necessary (e.g. when initialising a list, we may stop initialising more elements).\n     */\n    public suspend fun init(\n        path: AbsolutePath,\n        fromValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: T) -> Unit,\n    )\n\n    /**\n     * Changes [value], a value of this schema stored by the [form manager][FormManager] into the\n     * given value [intoValue], sending events about the change through [eventsBus]. The provided\n     * [path] represents the path of the value being changed within the [form manager][FormManager].\n     * The value must be set via [setValue], even if it hasn't changed; for parent schemas, it\n     * should typically be the same instance of [value], but mutated to resemble [intoValue].\n     *\n     * Because the value being set is the \"real\" value stored by the [form manager][FormManager],\n     * emitted events should **never** reference it or any of its children, as doing so would bypass\n     * the [form manager][FormManager]'s protections against concurrent access to its data. Events\n     * should instead reference parts of [intoValue], and the set value should resemble it.\n     */\n    public suspend fun change(\n        path: AbsolutePath,\n        value: T,\n        intoValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: T) -> Unit,\n    )\n\n    /**\n     * Destroys and removes [value], a value of this schema stored by the\n     * [form manager][FormManager], sending events about the destruction through [eventsBus]. The\n     * provided [path] represents the path of the value being destroyed within the\n     * [form manager][FormManager]. [removeValue] should always be called to remove the value.\n     *\n     * Destruction events should be emitted \"top down\": this means that an event signaling the\n     * destruction of a parent value must be emitted **before** all events signaling the destruction\n     * of its children. As a side effect of this, implementations of [destroy] **must not** bail\n     * when their coroutine context is no longer active, since the early signaling of the parent\n     * value being destroyed means that all children must also have their destruction signaled.\n     *\n     * Because the value is being removed from the [form manager][FormManager], emitted events can\n     * (and should) reference parts of [value].\n     */\n    public suspend fun destroy(\n        path: AbsolutePath,\n        value: T,\n        eventsBus: SchemaEventsBus,\n        removeValue: suspend (value: T) -> Unit,\n    )\n}\n\n/**\n * Schema representing metadata on parent values of type [T].\n *\n * \"Parent\" values, in this context, simply means values with children (children themselves also\n * represented by their own schemas).\n */\n@JsName(\"ParentSchemaKt\")\npublic interface ParentSchema<T> : Schema<T> {\n    /** Whether this schema supports setting values concurrently. */\n    public val supportsConcurrentSets: Boolean\n        get() = false\n\n    /**\n     * Returns whether [fragment] is a valid identifier for a child schema of this schema.\n     *\n     * A wildcard fragment is always assumed valid (representing all valid children schemas) and the\n     * [form manager][FormManager] will never call this function with one. Similarly, a recursive\n     * wildcard fragment will never be passed to this function.\n     */\n    public fun isValidChildSchemaFragment(fragment: AbsolutePathFragment): Boolean\n\n    /**\n     * Returns a sequence of information on the schemas matching [fragment] that are children of\n     * this schema. The provided [path] and [queried path][queriedPath] respectively represent the\n     * path of this schema and the path of the queried value within the [form manager][FormManager].\n     *\n     * The provided fragment will either be a wildcard or a valid fragment according to\n     * [isValidChildSchemaFragment]. If the function is called with a wildcard fragment, then all\n     * children schemas should be yielded. A recursive wildcard fragment will never be passed to\n     * this function by the form manager.\n     */\n    public fun childrenSchemas(\n        path: AbsolutePath,\n        queriedPath: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<SchemaInfo<*>>\n\n    /**\n     * Returns whether [fragment] is a valid identifier for a child of [value]: a value of this\n     * schema.\n     *\n     * A wildcard fragment is always assumed valid (representing all valid children) and the\n     * [form manager][FormManager] will never call this function with one. Similarly, a recursive\n     * wildcard fragment will never be passed to this function.\n     */\n    public suspend fun isValidChildFragment(value: T, fragment: AbsolutePathFragment): Boolean\n\n    /**\n     * Returns a flow of information on the values matching [fragment] that are children of [value],\n     * a value of this schema.\n     *\n     * The provided fragment will either be a wildcard or a valid fragment according to\n     * [isValidChildFragment]. If the function is called with a wildcard fragment, then all children\n     * should be emitted. A recursive wildcard fragment will never be passed to this function by the\n     * [form manager][FormManager].\n     */\n    public fun children(\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n        value: T,\n        fragment: AbsolutePathFragment,\n    ): Flow<ValueInfo<*>>\n\n    /**\n     * Returns whether [fragment] can be used to set a child of [value], a value of this schema.\n     *\n     * Wildcard fragments (recursive or otherwise) will never be passed to this method by the\n     * [form manager][FormManager].\n     */\n    public suspend fun isValidSetFragment(value: T, fragment: AbsolutePathFragment): Boolean\n\n    /**\n     * Sets the child(ren) of [value], a value of this schema, identified by [fragment] with\n     * [childValue], sending events about all modifications through [eventsBus]. The provided [path]\n     * represents the path of [value] within the [form manager][FormManager].\n     *\n     * The provided fragment is either a wildcard fragment or a valid fragment according to\n     * [isValidSetFragment]. A recursive wildcard fragment will never be passed to this function by\n     * the [form manager][FormManager]. If a simple wildcard fragment is passed, then all children\n     * should be set to [childValue].\n     */\n    public suspend fun set(\n        path: AbsolutePath,\n        value: T,\n        fragment: AbsolutePathFragment,\n        childValue: Any?,\n        eventsBus: SchemaEventsBus,\n    )\n\n    /** Returns a \"container\" used to hold the states of the children of a value of this schema. */\n    public fun childrenStatesContainer(): ParentState\n}\n\n/**\n * Schema representing metadata on collections of type [T] with children of type [TChildren].\n *\n * \"Collections\", in this context, simply means data structures that hold children of the same type\n * and that support the addition and removal of values. Collection schemas may represent structures\n * other than [Kotlin collections][Collection], e.g. a `MapSchema` can be created that represents\n * [maps][Map] (even though they don't extend [Collection]) since they allow addition and removal of\n * values and all values must be of the same type.\n */\n@JsName(\"CollectionSchemaKt\")\npublic interface CollectionSchema<T, TChildren> : ParentSchema<T> {\n    /** Whether this schema supports removing values concurrently. */\n    public val supportsConcurrentRemoves: Boolean\n        get() = false\n\n    public override fun childrenSchemas(\n        path: AbsolutePath,\n        queriedPath: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<SchemaInfo<TChildren>>\n\n    public override fun children(\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n        value: T,\n        fragment: AbsolutePathFragment,\n    ): Flow<ValueInfo<TChildren>>\n\n    /**\n     * Returns whether [fragment] can be used to remove a child of [value], a value of this schema.\n     *\n     * Wildcard fragments (recursive or otherwise) will never be passed to this method by the\n     * [form manager][FormManager].\n     */\n    public suspend fun isValidRemoveFragment(value: T, fragment: AbsolutePathFragment): Boolean\n\n    /**\n     * Removes from [value], a value of this schema, all children identified by [fragment], sending\n     * events about all modifications through [eventsBus]. The provided [path] represents the path\n     * of [value] within the [form manager][FormManager].\n     *\n     * The provided fragment is either a wildcard fragment or a valid fragment according to\n     * [isValidRemoveFragment]. A recursive wildcard fragment will never be passed to this function\n     * by the [form manager][FormManager]. If a simple wildcard fragment is passed, then all\n     * children of [value] should be removed.\n     */\n    public suspend fun remove(\n        path: AbsolutePath,\n        value: T,\n        fragment: AbsolutePathFragment,\n        eventsBus: SchemaEventsBus,\n    )\n\n    public override fun childrenStatesContainer(): CollectionState\n}\n","package io.kform\n\nimport kotlin.js.JsName\nimport kotlin.reflect.KClass\n\n/** Type of value represented by a schema. */\n@JsName(\"TypeInfoKt\")\npublic data class TypeInfo(\n    /** Name of the type. */\n    public val name: String,\n    /** Whether the type is nullable. */\n    public val nullable: Boolean = false,\n    /** Type arguments. */\n    public val arguments: List<TypeInfo> = emptyList(),\n    /** Type and validation related \"simple\" restrictions, e.g. (\"required\", \"min\", \"max\", etc.). */\n    public val restrictions: Map<String, Any?> = emptyMap(),\n) {\n    public constructor(\n        kClass: KClass<*>?,\n        nullable: Boolean = false,\n        arguments: List<TypeInfo> = emptyList(),\n        restrictions: Map<String, Any?> = emptyMap(),\n    ) : this(kClass?.simpleName ?: ANONYMOUS_CLASS_NAME, nullable, arguments, restrictions)\n\n    public override fun toString(): String = buildString {\n        append(name)\n        if (arguments.isNotEmpty()) {\n            append(arguments.joinToString(separator = \", \", prefix = \"<\", postfix = \">\"))\n        }\n        if (nullable) {\n            append(\"?\")\n        }\n    }\n\n    public companion object {\n        /** Name of type exposed when a class is anonymous. */\n        public const val ANONYMOUS_CLASS_NAME: String = \"anonymous\"\n    }\n}\n","@file:JvmName(\"ValidationIssues\")\n\npackage io.kform\n\nimport io.kform.ValidationExceptionError.Companion.DEFAULT_CODE\nimport kotlin.js.JsName\nimport kotlin.jvm.JvmName\nimport kotlin.jvm.JvmOverloads\nimport kotlin.jvm.JvmStatic\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.firstOrNull\nimport kotlinx.serialization.SerialName\nimport kotlinx.serialization.Serializable\n\n/**\n * Data associated with a validation issue. Useful, for example, for displaying (possibly located)\n * messages associated with the issue.\n */\n// TODO: Possibly allow entry values other than string (currently not supported to simplify\n//  serialisation); related: https://github.com/Kotlin/kotlinx.serialization/issues/49\n//  Could use `@Polymorphic Any?` and provide a serialisation module to be used by apps.\npublic typealias ValidationIssueData = Map<String, String?> // Map<String, @Polymorphic Any?>?\n\n/** Severity of a validation issue. */\npublic enum class ValidationIssueSeverity {\n    Error,\n    Warning,\n}\n\n/**\n * Validation issue emitted by a validation indicating a (potential) problem with the form data.\n *\n * A validation issue can be either a [ValidationError], [ValidationWarning], or, exceptionally, a\n * [ValidationExceptionError].\n */\n@JsName(\"ValidationIssueKt\")\n@Serializable\npublic sealed class ValidationIssue {\n    /** Code representing the issue. */\n    public abstract val code: String\n\n    /**\n     * Additional issue data. This additional data can be used, for example, to help write a\n     * user-friendly message associated with the issue.\n     */\n    public abstract val data: ValidationIssueData\n\n    /** Severity of the validation issue. */\n    public val severity: ValidationIssueSeverity\n        get() =\n            when (this) {\n                is ValidationError,\n                is ValidationExceptionError -> ValidationIssueSeverity.Error\n                is ValidationWarning -> ValidationIssueSeverity.Warning\n            }\n\n    override fun equals(other: Any?): Boolean =\n        when {\n            this === other -> true\n            other !is ValidationIssue -> false\n            else -> code == other.code && severity == other.severity && data == other.data\n        }\n\n    override fun hashCode(): Int {\n        var result = code.hashCode()\n        result = 31 * result + severity.hashCode()\n        result = 31 * result + data.hashCode()\n        return result\n    }\n\n    /**\n     * Whether this validation issue \"contains\" [issue].\n     *\n     * This validation issue is said to contain [issue] if both have the same code, the same\n     * severity, and if the [issue]'s data is either `null` or every one of its entries exists in\n     * this issue's data.\n     */\n    public fun contains(issue: ValidationIssue): Boolean =\n        code == issue.code &&\n            severity == issue.severity &&\n            issue.data.all { (key, value) -> key in data && data[key] == value }\n\n    public companion object {\n        /**\n         * Creates a [ValidationIssue] with the provided [code], [severity], and [data].\n         *\n         * When [severity] is [ValidationIssueSeverity.Error], a [ValidationError] is created;\n         * otherwise, a [ValidationWarning] is created.\n         */\n        @JvmOverloads\n        @JvmStatic\n        @JvmName(\"create\")\n        public operator fun invoke(\n            code: String,\n            severity: ValidationIssueSeverity,\n            data: ValidationIssueData = emptyMap(),\n        ): ValidationIssue =\n            when (severity) {\n                ValidationIssueSeverity.Error -> ValidationError(code, data)\n                ValidationIssueSeverity.Warning -> ValidationWarning(code, data)\n            }\n    }\n}\n\n/**\n * Validation error emitted by a validation indicating a problem with the form data.\n *\n * A form is considered invalid if it contains at least one validation error.\n */\n@JsName(\"ValidationErrorKt\")\n@Serializable\n@SerialName(\"error\")\npublic class ValidationError\n@JvmOverloads\nconstructor(override val code: String, override val data: ValidationIssueData = emptyMap()) :\n    ValidationIssue() {\n    override fun toString(): String =\n        \"ValidationError(code=$code${if (data.isEmpty()) \"\" else \", data=$data\"})\"\n}\n\n/**\n * Validation warning emitted by a validation indicating a potential problem with the form data.\n *\n * A form is **not** considered invalid if it contains only warnings.\n */\n@JsName(\"ValidationWarningKt\")\n@Serializable\n@SerialName(\"warning\")\npublic class ValidationWarning\n@JvmOverloads\nconstructor(override val code: String, override val data: ValidationIssueData = emptyMap()) :\n    ValidationIssue() {\n    override fun toString(): String =\n        \"ValidationWarning(code=$code${if (data.isEmpty()) \"\" else \", data=$data\"})\"\n}\n\n/**\n * Validation issue built by the [manager][FormManager] when a validation throws an exception. The\n * code of this validation error is the \"simple name\" of the thrown exception, or [DEFAULT_CODE] if\n * the exception has no \"simple name\".\n *\n * The validation error [data] contains entries with keys `\"exception\"`, `\"exceptionName\"`, and\n * `\"exceptionMessage\"` containing information on the exception that caused the validation to fail.\n */\n@JsName(\"ValidationExceptionErrorKt\")\n@Serializable\n@SerialName(\"exceptionError\")\npublic class ValidationExceptionError\ninternal constructor(\n    override val code: String,\n    override val data: ValidationIssueData = emptyMap(),\n) : ValidationIssue() {\n    internal constructor(\n        throawble: Throwable\n    ) : this(\n        throawble::class.simpleName ?: DEFAULT_CODE,\n        mapOf(\n            \"exception\" to throawble.toString(),\n            \"exceptionName\" to throawble::class.simpleName,\n            \"exceptionMessage\" to throawble.message,\n        ),\n    )\n\n    override fun toString(): String = \"ValidationExceptionError(code=$code)\"\n\n    public companion object {\n        /** Default validation error code representing that the validation failed to run. */\n        public const val DEFAULT_CODE: String = \"exception\"\n    }\n}\n\n/**\n * Validation issue emitted by a [form validator][FormValidator] or [manager][FormManager]\n * containing location information.\n *\n * A located validation issue can be either a [LocatedValidationError] or a\n * [LocatedValidationWarning].\n */\n@JsName(\"LocatedValidationIssueKt\")\n@Serializable\npublic sealed class LocatedValidationIssue {\n    /** Path of the value containing the issue. */\n    public abstract val path: AbsolutePath\n\n    /** Code representing the issue. */\n    public abstract val code: String\n\n    /** Paths of values that the validation that produced this issue depends on. */\n    public abstract val dependencies: Set<AbsolutePath>\n\n    /**\n     * Whether the validation that produced this issue depends on the descendants of the validated\n     * value.\n     */\n    public abstract val dependsOnDescendants: Boolean\n\n    /** External contexts that the validation that produced this issue depends on. */\n    public abstract val externalContextDependencies: Set<String>\n\n    /**\n     * Additional issue data. This additional data can be used, for example, to help write a\n     * user-friendly message associated with the issue.\n     */\n    public abstract val data: ValidationIssueData\n\n    /** Severity of the located validation issue. */\n    public val severity: ValidationIssueSeverity\n        get() =\n            when (this) {\n                is LocatedValidationError,\n                is LocatedValidationExceptionError -> ValidationIssueSeverity.Error\n                is LocatedValidationWarning -> ValidationIssueSeverity.Warning\n            }\n\n    override fun equals(other: Any?): Boolean =\n        when {\n            this === other -> true\n            other !is LocatedValidationIssue -> false\n            else ->\n                path == other.path &&\n                    code == other.code &&\n                    severity == other.severity &&\n                    dependencies == other.dependencies &&\n                    dependsOnDescendants == other.dependsOnDescendants &&\n                    data == other.data\n        }\n\n    override fun hashCode(): Int {\n        var result = path.hashCode()\n        result = 31 * result + code.hashCode()\n        result = 31 * result + severity.hashCode()\n        result = 31 * result + dependencies.hashCode()\n        result = 31 * result + dependsOnDescendants.hashCode()\n        result = 31 * result + data.hashCode()\n        return result\n    }\n\n    /**\n     * Whether this located validation issue \"contains\" [issue].\n     *\n     * This validation issue is said to contain [issue] if both have the same path, the same code,\n     * the same severity, if the set of this issue's dependencies contains the set of [issue]'s\n     * dependencies, if the [issue]'s [dependsOnDescendants] is either `false` or equal to this\n     * issue's [dependsOnDescendants], and if the [issue]'s data is either `null` or every one of\n     * its entries exists in this issue's data.\n     */\n    public fun contains(issue: LocatedValidationIssue): Boolean =\n        path == issue.path &&\n            code == issue.code &&\n            severity == issue.severity &&\n            (dependsOnDescendants || dependsOnDescendants == issue.dependsOnDescendants) &&\n            dependencies.containsAll(issue.dependencies) &&\n            issue.data.all { (key, value) -> key in data && data[key] == value }\n\n    public companion object {\n        /**\n         * Creates a [LocatedValidationIssue] with the provided [path], [code], [severity],\n         * [dependencies], whether it [dependsOnDescendants], [externalContextDependencies], and\n         * [data].\n         *\n         * When [severity] is [ValidationIssueSeverity.Error], a [LocatedValidationError] is\n         * created; otherwise, a [LocatedValidationWarning] is created.\n         */\n        @JvmOverloads\n        @JvmStatic\n        @JvmName(\"create\")\n        public operator fun invoke(\n            path: Path,\n            code: String,\n            severity: ValidationIssueSeverity,\n            dependencies: Iterable<Path> = emptySet(),\n            dependsOnDescendants: Boolean = false,\n            externalContextDependencies: Iterable<String> = emptySet(),\n            data: ValidationIssueData = emptyMap(),\n        ): LocatedValidationIssue =\n            when (severity) {\n                ValidationIssueSeverity.Error ->\n                    LocatedValidationError(\n                        path,\n                        code,\n                        dependencies,\n                        dependsOnDescendants,\n                        externalContextDependencies,\n                        data,\n                    )\n                ValidationIssueSeverity.Warning ->\n                    LocatedValidationWarning(\n                        path,\n                        code,\n                        dependencies,\n                        dependsOnDescendants,\n                        externalContextDependencies,\n                        data,\n                    )\n            }\n\n        /**\n         * Creates a [LocatedValidationIssue] with the provided [path], [code], [severity],\n         * [dependencies], whether it [dependsOnDescendants], [externalContextDependencies], and\n         * [data].\n         *\n         * When [severity] is [ValidationIssueSeverity.Error], a [LocatedValidationError] is\n         * created; otherwise, a [LocatedValidationWarning] is created.\n         */\n        @JvmOverloads\n        @JvmStatic\n        @JvmName(\"create\")\n        public operator fun invoke(\n            path: String,\n            code: String,\n            severity: ValidationIssueSeverity,\n            dependencies: Iterable<String> = emptySet(),\n            dependsOnDescendants: Boolean = false,\n            externalContextDependencies: Iterable<String> = emptySet(),\n            data: ValidationIssueData = emptyMap(),\n        ): LocatedValidationIssue =\n            LocatedValidationIssue(\n                AbsolutePath(path),\n                code,\n                severity,\n                dependencies.map { Path(it) },\n                dependsOnDescendants,\n                externalContextDependencies,\n                data,\n            )\n\n        /** Creates a [LocatedValidationIssue] given a [path] and an [issue]. */\n        internal operator fun invoke(\n            path: Path,\n            validation: Validation<*>,\n            issue: ValidationIssue,\n        ): LocatedValidationIssue {\n            val absolutePath = path.toAbsolutePath()\n            val dependencies =\n                resolveDependencies(absolutePath, validation.dependencies.values.map { it.path })\n            return when (issue) {\n                is ValidationError ->\n                    LocatedValidationError(\n                        absolutePath,\n                        issue.code,\n                        dependencies,\n                        validation.dependsOnDescendants,\n                        validation.externalContextDependencies,\n                        issue.data,\n                    )\n                is ValidationWarning ->\n                    LocatedValidationWarning(\n                        absolutePath,\n                        issue.code,\n                        dependencies,\n                        validation.dependsOnDescendants,\n                        validation.externalContextDependencies,\n                        issue.data,\n                    )\n                is ValidationExceptionError ->\n                    LocatedValidationExceptionError(\n                        absolutePath,\n                        issue.code,\n                        dependencies,\n                        validation.dependsOnDescendants,\n                        validation.externalContextDependencies,\n                        issue.data,\n                    )\n            }\n        }\n\n        /**\n         * Utility function that creates a set of absolute dependency paths given the issue path and\n         * the collection of dependency paths.\n         */\n        internal fun resolveDependencies(\n            path: Path,\n            dependencies: Iterable<Path>,\n        ): Set<AbsolutePath> =\n            if (dependencies.none()) emptySet()\n            else\n                path.toAbsolutePath().let { absolutePath ->\n                    dependencies.mapTo(mutableSetOf()) { absolutePath.resolve(it) }\n                }\n    }\n}\n\n/**\n * Validation error emitted by a [form validator][FormValidator] or [manager][FormManager]\n * containing location information.\n */\n@JsName(\"LocatedValidationErrorKt\")\n@Serializable\n@SerialName(\"error\")\npublic class LocatedValidationError\n@JvmOverloads\nconstructor(\n    override val path: AbsolutePath,\n    override val code: String,\n    override val dependencies: Set<AbsolutePath> = emptySet(),\n    override val dependsOnDescendants: Boolean = false,\n    override val externalContextDependencies: Set<String> = emptySet(),\n    override val data: ValidationIssueData = emptyMap(),\n) : LocatedValidationIssue() {\n    @JvmOverloads\n    public constructor(\n        path: Path,\n        code: String,\n        dependencies: Iterable<Path> = emptySet(),\n        dependsOnDescendants: Boolean = false,\n        externalContextDependencies: Iterable<String> = emptySet(),\n        data: ValidationIssueData = emptyMap(),\n    ) : this(\n        AbsolutePath(path),\n        code,\n        resolveDependencies(path, dependencies),\n        dependsOnDescendants,\n        externalContextDependencies.toSet(),\n        data,\n    )\n\n    @JvmOverloads\n    public constructor(\n        path: String,\n        code: String,\n        dependencies: Iterable<String> = emptySet(),\n        dependsOnDescendants: Boolean = false,\n        externalContextDependencies: Iterable<String> = emptySet(),\n        data: ValidationIssueData = emptyMap(),\n    ) : this(\n        AbsolutePath(path),\n        code,\n        dependencies.map { Path(it) },\n        dependsOnDescendants,\n        externalContextDependencies,\n        data,\n    )\n\n    override fun toString(): String =\n        \"LocatedValidationError(path=$path, code=$code${\n            if (dependencies.isEmpty()) \"\" else \", dependencies=$dependencies\"}${\n            if (!dependsOnDescendants) \"\" else \", dependsOnDescendants=true\"}${\n            if (externalContextDependencies.isEmpty()) \"\"\n            else \", externalContextDependencies=$externalContextDependencies\"}${\n            if (data.isEmpty()) \"\" else \", data=$data\"})\"\n}\n\n/**\n * Validation warning emitted by a [form validator][FormValidator] or [manager][FormManager]\n * containing location information.\n */\n@JsName(\"LocatedValidationWarningKt\")\n@Serializable\n@SerialName(\"warning\")\npublic class LocatedValidationWarning\n@JvmOverloads\nconstructor(\n    override val path: AbsolutePath,\n    override val code: String,\n    override val dependencies: Set<AbsolutePath> = emptySet(),\n    override val dependsOnDescendants: Boolean = false,\n    override val externalContextDependencies: Set<String> = emptySet(),\n    override val data: ValidationIssueData = emptyMap(),\n) : LocatedValidationIssue() {\n    @JvmOverloads\n    public constructor(\n        path: Path,\n        code: String,\n        dependencies: Iterable<Path> = emptySet(),\n        dependsOnDescendants: Boolean = false,\n        externalContextDependencies: Iterable<String> = emptySet(),\n        data: ValidationIssueData = emptyMap(),\n    ) : this(\n        AbsolutePath(path),\n        code,\n        resolveDependencies(path, dependencies),\n        dependsOnDescendants,\n        externalContextDependencies.toSet(),\n        data,\n    )\n\n    @JvmOverloads\n    public constructor(\n        path: String,\n        code: String,\n        dependencies: Iterable<String> = emptySet(),\n        dependsOnDescendants: Boolean = false,\n        externalContextDependencies: Iterable<String> = emptySet(),\n        data: ValidationIssueData = emptyMap(),\n    ) : this(\n        AbsolutePath(path),\n        code,\n        dependencies.map { Path(it) },\n        dependsOnDescendants,\n        externalContextDependencies,\n        data,\n    )\n\n    override fun toString(): String =\n        \"LocatedValidationWarning(path=$path, code=$code${\n            if (dependencies.isEmpty()) \"\" else \", dependencies=$dependencies\"}${\n            if (!dependsOnDescendants) \"\" else \", dependsOnDescendants=true\"}${\n            if (externalContextDependencies.isEmpty()) \"\"\n            else \", externalContextDependencies=$externalContextDependencies\"}${\n            if (data.isEmpty()) \"\" else \", data=$data\"})\"\n}\n\n/**\n * Localised validation error emitted by a [form validator][FormValidator] or [manager][FormManager]\n * when a validation throws an exception. The code of this validation error is the \"simple name\" of\n * the thrown exception, or [ValidationExceptionError.DEFAULT_CODE] if the exception has no \"simple\n * name\".\n *\n * The validation error [data] contains entries with keys `\"exception\"`, `\"exceptionName\"`, and\n * `\"exceptionMessage\"` containing information on the exception that caused the validation to fail.\n */\n@JsName(\"LocatedValidationExceptionErrorKt\")\n@Serializable\n@SerialName(\"exceptionError\")\npublic class LocatedValidationExceptionError\ninternal constructor(\n    override val path: AbsolutePath,\n    override val code: String,\n    override val dependencies: Set<AbsolutePath> = emptySet(),\n    override val dependsOnDescendants: Boolean = false,\n    override val externalContextDependencies: Set<String> = emptySet(),\n    override val data: ValidationIssueData = emptyMap(),\n) : LocatedValidationIssue() {\n    override fun toString(): String =\n        \"LocatedValidationExceptionError(path=$path, code=$code${\n            if (dependencies.isEmpty()) \"\" else \", dependencies=$dependencies\"}${\n            if (!dependsOnDescendants) \"\" else \", dependsOnDescendants=true\"}${\n            if (externalContextDependencies.isEmpty()) \"\"\n            else \", externalContextDependencies=$externalContextDependencies\"})\"\n}\n\n/** Returns whether a flow of located validation issues contains any issues at all. */\npublic suspend fun Flow<LocatedValidationIssue>.containsIssues(): Boolean = firstOrNull() != null\n\n/** Returns whether a flow of located validation issues contains no issues at all. */\npublic suspend fun Flow<LocatedValidationIssue>.containsNoIssues(): Boolean = !containsIssues()\n\n/** Returns whether a flow of located validation issues contains any errors. */\npublic suspend fun Flow<LocatedValidationIssue>.containsErrors(): Boolean =\n    firstOrNull { issue -> issue.severity == ValidationIssueSeverity.Error } != null\n\n/** Returns whether a flow of located validation issues contains no errors. */\npublic suspend fun Flow<LocatedValidationIssue>.containsNoErrors(): Boolean = !containsErrors()\n\n/** Returns whether a flow of located validation issues contains any warnings. */\npublic suspend fun Flow<LocatedValidationIssue>.containsWarnings(): Boolean =\n    firstOrNull { issue -> issue.severity == ValidationIssueSeverity.Warning } != null\n\n/** Returns whether a flow of located validation issues contains no warnings. */\npublic suspend fun Flow<LocatedValidationIssue>.containsNoWarnings(): Boolean = !containsWarnings()\n\n/** Returns whether a collection of located validation issues contains any issues at all. */\npublic fun Iterable<LocatedValidationIssue>.containsIssues(): Boolean = any()\n\n/** Returns whether a collection of located validation issues contains no issues at all. */\npublic fun Iterable<LocatedValidationIssue>.containsNoIssues(): Boolean = !containsIssues()\n\n/** Returns whether a collection of located validation issues contains any errors. */\npublic fun Iterable<LocatedValidationIssue>.containsErrors(): Boolean = any { issue ->\n    issue.severity == ValidationIssueSeverity.Error\n}\n\n/** Returns whether a collection of located validation issues contains no errors. */\npublic fun Iterable<LocatedValidationIssue>.containsNoErrors(): Boolean = !containsErrors()\n\n/** Returns whether a collection of located validation issues contains any warnings. */\npublic fun Iterable<LocatedValidationIssue>.containsWarnings(): Boolean = any { issue ->\n    issue.severity == ValidationIssueSeverity.Warning\n}\n\n/** Returns whether a collection of located validation issues contains no warnings. */\npublic fun Iterable<LocatedValidationIssue>.containsNoWarnings(): Boolean = !containsWarnings()\n",null,null,"@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform\n\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.js.JsName\nimport kotlin.jvm.JvmName\nimport kotlin.properties.PropertyDelegateProvider\nimport kotlin.properties.ReadOnlyProperty\nimport kotlin.reflect.typeOf\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.emitAll\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Context provided to a validation when running it, contains the values of the validation's\n * dependencies at the time the validation was executed.\n */\npublic open class ValidationContext(\n    private val value: Any?,\n    schema: Schema<*>,\n    /** Path of the value being validated. */\n    path: AbsolutePath,\n    /** Path of the schema of the value being validated. */\n    schemaPath: AbsolutePath,\n    /**\n     * Value information for each dependency of the validation. Mapping of keys as declared in the\n     * [validation dependencies][Validation.dependencies] to their respective value information.\n     */\n    dependenciesInfo: DependenciesValueInfo,\n    externalContexts: ExternalContexts,\n) : ComputationContext(schema, path, schemaPath, dependenciesInfo, externalContexts) {\n    /** Value being validated. */\n    @Suppress(\"UNCHECKED_CAST\") public fun <T> value(): T = value as T\n}\n\n/**\n * Validation for values of type [T].\n *\n * Validations may depend on other values. These dependencies may be defined via the [dependency]\n * function, by providing the path of the dependency relative to the value being validated.\n *\n * Example validation that emits an error when the integer being validated is odd if the value of a\n * dependency `allowOdd` is `false`:\n * ```kotlin\n * object DisallowOdd : Validation<Int>() {\n *     private val ValidationContext.allowOdd: Boolean by dependency(\"../allowOdd\")\n *\n *     ValidationContext.validate() = flow {\n *         if (!allowOdd && value % 2 != 0) {\n *             emit(ValidationError(\"oddNotAllowed\"))\n *         }\n *     }\n * }\n * ```\n */\n@JsName(\"ValidationKt\")\npublic abstract class Validation<in T> : Computation {\n    /** Schema of the value being validated. */\n    protected inline val ValidationContext.schema: Schema<@UnsafeVariance T>\n        get() = schema()\n\n    /** Value being validated. */\n    protected inline val ValidationContext.value: @UnsafeVariance T\n        get() = value()\n\n    /**\n     * Dependencies of the validation. Mapping of keys to the paths this validation depends on. Keys\n     * can be used within a [ValidationContext] to access the value of the dependencies.\n     *\n     * Validation dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the validation should be reevaluated by the [form manager][FormManager] whenever a child\n     * value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    public override val dependencies: Map<String, DependencyInfo> = hashMapOf()\n\n    /**\n     * Whether the [form manager][FormManager] should reevaluate this validation whenever a\n     * descendant of the value being validated changes. This is `false` by default.\n     *\n     * Conceptually, when `false`, it is as if the validation has an implicit dependency on the path\n     * `\".\"` (itself). When `true`, this dependency becomes `\"./\u2217\u2217\"` (itself and all of its\n     * descendants).\n     */\n    public open val dependsOnDescendants: Boolean = false\n\n    /**\n     * Set of external context dependencies of the validation.\n     *\n     * Each entry of this set represents the name of the external context being depended upon.\n     */\n    public override val externalContextDependencies: Set<String> = hashSetOf()\n\n    /**\n     * Declares a dependency to [path], accessible in the validation's context via key\n     * [dependencyKey].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    @JvmName(\"reifiedAddDependency\")\n    protected inline fun <reified TDependency> addDependency(dependencyKey: String, path: Path) {\n        (dependencies as MutableMap<String, DependencyInfo>)[dependencyKey] =\n            DependencyInfo(path, typeOf<TDependency>())\n    }\n\n    /**\n     * Declares a dependency to [path], accessible in the validation's context via key\n     * [dependencyKey].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun addDependency(dependencyKey: String, path: Path): Unit =\n        addDependency<Any?>(dependencyKey, path)\n\n    /**\n     * Declares a dependency to [path], accessible in the validation's context via key\n     * [dependencyKey].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    @JvmName(\"reifiedAddDependency\")\n    protected inline fun <reified TDependency> addDependency(\n        dependencyKey: String,\n        path: String,\n    ): Unit = addDependency<TDependency>(dependencyKey, Path(path))\n\n    /**\n     * Declares a dependency to [path], accessible in the validation's context via key\n     * [dependencyKey].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun addDependency(dependencyKey: String, path: String): Unit =\n        addDependency<Any?>(dependencyKey, path)\n\n    /**\n     * Declares an external context dependency to [externalContextName].\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun addExternalContextDependency(externalContextName: String) {\n        (externalContextDependencies as MutableSet<String>).add(externalContextName)\n    }\n\n    /**\n     * Function used to declare a dependency to a [path] and delegate access to its value within a\n     * [ValidationContext].\n     *\n     * If the dependency could not be found in the form during the execution of the validation, then\n     * accessing this dependency will return `null`.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ValidationContext.dependencyKey: Type? by dependencyOrNull(path)\n     * ```\n     *\n     * Validation dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the validation should be reevaluated by the [form manager][FormManager] whenever a child\n     * value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    protected inline fun <reified TDependency> dependencyOrNull(\n        path: Path,\n        dependencyKey: String? = null,\n    ): PropertyDelegateProvider<\n        Validation<@UnsafeVariance T>,\n        ReadOnlyProperty<ValidationContext, TDependency?>,\n    > = PropertyDelegateProvider { validation, property ->\n        validation.addDependency<TDependency>(dependencyKey ?: property.name, path)\n        // Return a delegate to the dependency value within a [ValidationContext]\n        ReadOnlyProperty { ctx, prop -> ctx.dependencyOrNull(dependencyKey ?: prop.name) }\n    }\n\n    /**\n     * Function used to declare a dependency to a [path] and delegate access to its value within a\n     * [ValidationContext].\n     *\n     * If the dependency could not be found in the form during the execution of the validation, then\n     * accessing this dependency will return `null`.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ValidationContext.dependencyKey: Type? by dependencyOrNull(path)\n     * ```\n     *\n     * Validation dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the validation should be reevaluated by the [form manager][FormManager] whenever a child\n     * value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    protected inline fun <reified TDependency> dependencyOrNull(\n        path: String,\n        dependencyKey: String? = null,\n    ): PropertyDelegateProvider<\n        Validation<@UnsafeVariance T>,\n        ReadOnlyProperty<ValidationContext, TDependency?>,\n    > = dependencyOrNull(Path(path), dependencyKey)\n\n    /**\n     * Function used to declare a dependency to a [path] and delegate access to its value within a\n     * [ValidationContext].\n     *\n     * If the dependency could not be found in the form during the execution of the validation, then\n     * accessing this dependency will throw [DependencyNotFoundException].\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ValidationContext.dependencyKey: Type by dependency(path)\n     * ```\n     *\n     * Validation dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the validation should be reevaluated by the [form manager][FormManager] whenever a child\n     * value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    protected inline fun <reified TDependency> dependency(\n        path: Path,\n        dependencyKey: String? = null,\n    ): PropertyDelegateProvider<\n        Validation<@UnsafeVariance T>,\n        ReadOnlyProperty<ValidationContext, TDependency>,\n    > = PropertyDelegateProvider { validation, property ->\n        validation.addDependency<TDependency>(dependencyKey ?: property.name, path)\n        // Return a delegate to the dependency value within a [ValidationContext]\n        ReadOnlyProperty { ctx, prop -> ctx.dependency(dependencyKey ?: prop.name) }\n    }\n\n    /**\n     * Function used to declare a dependency to a [path] and delegate access to its value within a\n     * [ValidationContext].\n     *\n     * If the dependency could not be found in the form during the execution of the validation, then\n     * accessing this dependency will throw [DependencyNotFoundException].\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ValidationContext.dependencyKey: Type by dependency(path)\n     * ```\n     *\n     * Validation dependency paths may contain a single recursive wildcard at the end, indicating\n     * that the validation should be reevaluated by the [form manager][FormManager] whenever a child\n     * value of the dependency changes. Otherwise, a dependency must contain no wildcards.\n     */\n    protected inline fun <reified TDependency> dependency(\n        path: String,\n        dependencyKey: String? = null,\n    ): PropertyDelegateProvider<\n        Validation<@UnsafeVariance T>,\n        ReadOnlyProperty<ValidationContext, TDependency>,\n    > = dependency(Path(path), dependencyKey)\n\n    /**\n     * Function used to declare a dependency to an external context and delegate access to its value\n     * within a [ValidationContext].\n     *\n     * If the external context could not be found during the execution of the validation, then\n     * accessing this external context will return `null`.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ValidationContext.externalContextName: Type? by externalContextOrNull()\n     * ```\n     */\n    protected fun <TContext> externalContextOrNull(\n        externalContextName: String? = null\n    ): PropertyDelegateProvider<\n        Validation<@UnsafeVariance T>,\n        ReadOnlyProperty<ValidationContext, TContext?>,\n    > = PropertyDelegateProvider { validation, property ->\n        validation.addExternalContextDependency(externalContextName ?: property.name)\n        // Return a delegate to the external context dependency value within a [ValidationContext]\n        ReadOnlyProperty { ctx, prop ->\n            ctx.externalContextOrNull(externalContextName ?: prop.name)\n        }\n    }\n\n    /**\n     * Function used to declare a dependency to an external context and delegate access to its value\n     * within a [ValidationContext].\n     *\n     * If the external context could not be found during the execution of the validation, then\n     * accessing this external context will throw [ExternalContextNotFoundException].\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val ValidationContext.externalContextName: Type by externalContext()\n     * ```\n     */\n    protected fun <TContext> externalContext(\n        externalContextName: String? = null\n    ): PropertyDelegateProvider<\n        Validation<@UnsafeVariance T>,\n        ReadOnlyProperty<ValidationContext, TContext>,\n    > = PropertyDelegateProvider { validation, property ->\n        validation.addExternalContextDependency(externalContextName ?: property.name)\n        // Return a delegate to the external context dependency value within a [ValidationContext]\n        ReadOnlyProperty { ctx, prop -> ctx.externalContext(externalContextName ?: prop.name) }\n    }\n\n    /**\n     * Runs the validation within a [ValidationContext] containing the [value] being validated and\n     * the value of all declared dependencies. Returns a flow over all found issues.\n     */\n    public abstract fun ValidationContext.validate(): Flow<ValidationIssue>\n\n    // Default [toString] implementation\n    public override fun toString(): String = this::class.simpleName ?: super.toString()\n}\n\n/**\n * Validation for values of type [T] where the [form manager][FormManager] maintains a validation\n * state of type [TState] for each managed value.\n *\n * Stateful validations are useful when validations require an expensive computation over data and\n * if it is possible to save the result of such expensive computation and tweak it as data changes\n * instead of running the expensive computation all over again.\n *\n * As an example, imagine that we have a list of people and that we want to validate that the\n * average age of all people isn't over a certain age. Instead of iterating over the whole list\n * every time a person is added or removed, we can use a stateful validation to save, as state, the\n * sum of all ages, and simply tweak this sum as people are added or removed. Having access to the\n * sum of all ages as state allows us to implement the validation function with a complexity of O(1)\n * as opposed to O(N).\n *\n * The following snippet implements the example above of making sure that the average age of all\n * people doesn't surpass a dependency `maxAvgAge`:\n * ```kotlin\n * object AvgAgeNotOverMax : StatefulValidation<List<Person>, Int>() {\n *     private val ValidationContext.maxAvgAge: Int by dependency(\"../maxAvgAge\")\n *\n *     override suspend fun ValidationContext.initState(value: List<Person>): Int =\n *         value.fold(0) { sum, person -> sum + person.age }\n *\n *     private val ageObserver by observe<Int>(\"\u2217/age\") { agesSum, event ->\n *         when (event) {\n *             is ValueEvent.Init<Int> -> agesSum + event.newValue\n *             is ValueEvent.Change<Int> -> agesSum + event.newValue - event.oldValue\n *             is ValueEvent.Destroy<Int> -> agesSum - event.oldValue\n *             else -> agesSum\n *         }\n *     }\n *\n *     override fun ValidationContext.validateFromState(value: List<Person>, state: Int) = flow {\n *         val avgAge = state / value.size\n *         if (avgAge > maxAvgAge) {\n *             emit(ValidationError(\"avgAgeOverMax\"))\n *         }\n *     }\n * }\n * ```\n */\n@JsName(\"StatefulValidationKt\")\npublic abstract class StatefulValidation<in T, TState> :\n    StatefulComputation<ValidationContext, TState>, Validation<T>() {\n    /**\n     * List of observers.\n     *\n     * Each observer contains a path to be observed and a function to update the state of the\n     * validation, which will be called whenever an event with a path matching the one being\n     * observed occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     */\n    public override val observers: List<Observer<Any?, TState>> = mutableListOf()\n\n    /**\n     * Adds an [observer] to the path [observer.toObserve][Observer.toObserve] to update the\n     * validation state via [observer.updateState][Observer.updateState] whenever an event with a\n     * path matching [observer.toObserve][Observer.toObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun <TValue> addObserver(observer: Observer<TValue, TState>) {\n        @Suppress(\"UNCHECKED_CAST\")\n        (observers as MutableList<Observer<*, TState>>) += observer\n    }\n\n    /**\n     * Adds an observer to the path [pathToObserve] to update the validation state via [updateState]\n     * whenever an event with a path matching [pathToObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun <TValue> addObserver(\n        pathToObserve: Path,\n        @BuilderInference updateState: UpdateStateFn<TValue, TState>,\n    ): Unit = addObserver(Observer(pathToObserve, updateState))\n\n    /**\n     * Adds an observer to the path [pathToObserve] to update the validation state via [updateState]\n     * whenever an event with a path matching [pathToObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * **NOTE**: This method must only be called during the initialization of the class.\n     */\n    protected fun <TValue> addObserver(\n        pathToObserve: String,\n        @BuilderInference updateState: UpdateStateFn<TValue, TState>,\n    ): Unit = addObserver(Path(pathToObserve), updateState)\n\n    /**\n     * Function used to observe the path [pathToObserve] and update the validation state via\n     * [updateState] whenever an event with a path matching [pathToObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val observer by observe<Type>(path) { state, event ->\n     *     when (event) {\n     *         is ValueEvent.Init<Type>      -> // Compute new state\n     *         is ValueEvent.Change<Type>    -> // Compute new state\n     *         is ValueEvent.Destroy<Type>   -> // Compute new state\n     *\n     *         // These events only occur when observing a collection:\n     *         is ValueEvent.Add<Type, *>    -> // Compute new state\n     *         is ValueEvent.Remove<Type, *> -> // Compute new state\n     *     }\n     * }\n     * ```\n     *\n     * The provided function must return the new validation state which, unless it hasn't changed,\n     * should be different ([equals]-wise) from the previous validation state (as such, when using\n     * an object as state, a new instance should be returned when the state is updated). If the new\n     * state differs from the old one (using [equals]), the value will need to be revalidated by the\n     * [form manager][FormManager] using [validateFromState].\n     */\n    protected fun <TValue> observe(\n        pathToObserve: Path,\n        @BuilderInference updateState: UpdateStateFn<TValue, TState>,\n    ): PropertyDelegateProvider<\n        StatefulValidation<@UnsafeVariance T, TState>,\n        ReadOnlyProperty<StatefulValidation<@UnsafeVariance T, TState>, Observer<TValue, TState>>,\n    > = PropertyDelegateProvider { validation, _ ->\n        val observer = Observer(pathToObserve, updateState)\n        validation.addObserver(observer)\n        ReadOnlyProperty { _, _ -> observer }\n    }\n\n    /**\n     * Function used to observe the path [pathToObserve] and update the validation state via\n     * [updateState] whenever an event with a path matching [pathToObserve] occurs.\n     *\n     * If an event path matches multiple observers, only the **first** observer will be called.\n     *\n     * It should be used as follows:\n     * ```kotlin\n     * private val observer by observe<Type>(path) { state, event ->\n     *     when (event) {\n     *         is ValueEvent.Init<Type>      -> // Compute new state\n     *         is ValueEvent.Change<Type>    -> // Compute new state\n     *         is ValueEvent.Destroy<Type>   -> // Compute new state\n     *\n     *         // These events only occur when observing a collection:\n     *         is ValueEvent.Add<Type, *>    -> // Compute new state\n     *         is ValueEvent.Remove<Type, *> -> // Compute new state\n     *     }\n     * }\n     * ```\n     *\n     * The provided function must return the new validation state which, unless it hasn't changed,\n     * should be different ([equals]-wise) from the previous validation state (as such, when using\n     * an object as state, a new instance should be returned when the state is updated). If the new\n     * state differs from the old one (using [equals]), the value will need to be revalidated by the\n     * [form manager][FormManager] using [validateFromState].\n     */\n    protected fun <TValue> observe(\n        pathToObserve: String,\n        @BuilderInference updateState: UpdateStateFn<TValue, TState>,\n    ): PropertyDelegateProvider<\n        StatefulValidation<@UnsafeVariance T, TState>,\n        ReadOnlyProperty<StatefulValidation<@UnsafeVariance T, TState>, Observer<TValue, TState>>,\n    > = observe(Path(pathToObserve), updateState)\n\n    /**\n     * Initialises and returns the validation's state, given the [value] to validate within a\n     * [ValidationContext] containing the values of all declared dependencies.\n     *\n     * This method is called by the [form manager][FormManager] whenever a new value that needs to\n     * be validated by this validation is initialised.\n     */\n    public abstract override suspend fun ValidationContext.initState(): TState\n\n    /**\n     * Destroys the validation [state].\n     *\n     * Called by the [form manager][FormManager] whenever a state is no longer needed (i.e. when a\n     * newer state has been produced or when the value being validated has been destroyed).\n     */\n    public override suspend fun destroyState(state: TState): Unit = Unit\n\n    /**\n     * Runs the validation, given its [state], within a [ValidationContext] containing the [value]\n     * being validated and the value of all declared dependencies. Returns a flow over all found\n     * issues.\n     *\n     * This method is called by the [form manager][FormManager] instead of [validate] when\n     * validating stateful validations.\n     *\n     * Note that the form utilities [validate][io.kform.validate] function (and, by consequence, the\n     * [form validator][FormValidator]) does **not** maintain validation states and, as such, does\n     * **not** ever explicitly call any methods specific to stateful validations like\n     * [validateFromState]. This is why we provide the following default implementation of\n     * [validate]:\n     * ```kotlin\n     * override fun ValidationContext.validate(): Flow<Issue> = flow {\n     *     emitAll(validateFromState(initState(value)))\n     * }\n     * ```\n     */\n    public abstract fun ValidationContext.validateFromState(state: TState): Flow<ValidationIssue>\n\n    // Default [validate] implementation for stateful validations.\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        emitAll(validateFromState(initState()))\n    }\n}\n","@file:JvmName(\"PathMultimaps\")\n\npackage io.kform.collections\n\nimport io.kform.AbsolutePath\nimport io.kform.Path\nimport io.kform.PathOrString\nimport io.kform.toAbsolutePath\nimport kotlin.jvm.JvmName\n\n/** Identifier of an entry in a path multimap. */\npublic typealias PathMultimapEntryId = Int\n\n/** An entry of the path multimap with values of type [T]. */\npublic interface PathMultimapEntry<out T> {\n    /** Path of the multimap entry. */\n    public val path: AbsolutePath\n\n    public operator fun component1(): AbsolutePath = path\n\n    /** Value of the multimap entry. */\n    public val value: T\n\n    public operator fun component2(): T = value\n\n    /** Unique identified of the entry in the multimap. */\n    public val id: PathMultimapEntryId\n\n    public operator fun component3(): PathMultimapEntryId = id\n}\n\n/**\n * Multimap implementation mapping paths to values of type [T].\n *\n * It is a multimap in the sense that multiple values may be associated with the same path. However,\n * each entry in the multimap is represented by an id [PathMultimapEntryId] and the multimap allows\n * operations on said ids.\n *\n * Operations on the multimap that receive paths follow the path semantics of\n * [matching][AbsolutePath.matches] (for [contains], [get], and [entries]). This allows us to, for\n * example, get all values matching a certain path that contains wildcards; or to have entries\n * containing paths with wildcards in the multimap whose value will be returned when getting a path\n * without wildcards that matches it.\n */\npublic interface PathMultimap<out T> {\n    /** Number of entries in the multimap. */\n    public val size: Int\n\n    /** Whether the multimap is empty. */\n    public fun isEmpty(): Boolean = size == 0\n\n    /** Sequence of all entries in the multimap (may have repeated entries). */\n    public val entries: Sequence<PathMultimapEntry<T>>\n        get() = entries(AbsolutePath.MATCH_ALL)\n\n    /** Sequence of values in the multimap (may have repeated values). */\n    public val values: Sequence<T>\n        get() = entries.map { entry -> entry.value }\n\n    /**\n     * Returns whether there exists at least one entry with a path matching [path] (following the\n     * semantics of [path matching][AbsolutePath.matches]).\n     */\n    public fun containsPath(path: Path): Boolean\n\n    /**\n     * Returns whether there exists at least one entry with a path matching [path] (following the\n     * semantics of [path matching][AbsolutePath.matches]).\n     */\n    public fun containsPath(path: String): Boolean = containsPath(AbsolutePath(path))\n\n    /**\n     * Returns whether there exists at least one entry with a path matching [path] (following the\n     * semantics of [path matching][AbsolutePath.matches]). Equivalent to `containsPath(path)`.\n     */\n    public operator fun contains(path: Path): Boolean = containsPath(path)\n\n    /**\n     * Returns whether there exists at least one entry with a path matching [path] (following the\n     * semantics of [path matching][AbsolutePath.matches]). Equivalent to `containsPath(path)`.\n     */\n    public operator fun contains(path: String): Boolean = containsPath(path)\n\n    /** Returns whether there exists an entry identified by [entryId] in the multimap. */\n    public fun containsEntry(entryId: PathMultimapEntryId): Boolean\n\n    /**\n     * Returns whether there exists an entry identified by [entryId] in the multimap. Equivalent to\n     * `containsEntry(entryId)`.\n     */\n    public operator fun contains(entryId: PathMultimapEntryId): Boolean = containsEntry(entryId)\n\n    /** Returns whether there exists at least one value equal to [value] in the multimap. */\n    public fun containsValue(value: @UnsafeVariance T): Boolean\n\n    /**\n     * Returns whether there exists at least one value equal to [value] in the multimap. Equivalent\n     * to `containsValue(value)`.\n     */\n    public operator fun contains(value: @UnsafeVariance T): Boolean = containsValue(value)\n\n    /**\n     * Returns a sequence over all values with a path matching [path] (following the semantics of\n     * [path matching][AbsolutePath.matches]).\n     */\n    public operator fun get(path: Path): Sequence<T>\n\n    /**\n     * Returns a sequence over all values with a path matching [path] (following the semantics of\n     * [path matching][AbsolutePath.matches]).\n     */\n    public operator fun get(path: String): Sequence<T> = get(AbsolutePath(path))\n\n    /** Returns the entry identified by [entryId] or `null` when no such entry exists. */\n    public fun getEntry(entryId: PathMultimapEntryId): PathMultimapEntry<T>?\n\n    /**\n     * Returns the entry identified by [entryId] or `null` when no such entry exists. Equivalent to\n     * `getEntry(entryId)`.\n     */\n    public operator fun get(entryId: PathMultimapEntryId): PathMultimapEntry<T>? = getEntry(entryId)\n\n    /**\n     * Returns one value matching [path] or `null` when no such value exists. Equivalent to\n     * `get(path).firstOrNull()`.\n     */\n    public fun getOne(path: Path): T? = get(path).firstOrNull()\n\n    /**\n     * Returns one value matching [path] or `null` when no such value exists. Equivalent to\n     * `get(path).firstOrNull()`.\n     */\n    public fun getOne(path: String): T? = getOne(AbsolutePath(path))\n\n    /**\n     * Returns a sequence over all entries with a path matching [path] (following the semantics of\n     * [path matching][AbsolutePath.matches]).\n     */\n    public fun entries(path: Path = AbsolutePath.MATCH_ALL): Sequence<PathMultimapEntry<T>>\n\n    /**\n     * Returns a sequence over all entries with a path matching [path] (following the semantics of\n     * [path matching][AbsolutePath.matches]).\n     */\n    public fun entries(path: String): Sequence<PathMultimapEntry<T>> = entries(AbsolutePath(path))\n}\n\n/**\n * Mutable multimap implementation mapping paths to values of type [T]. Extends [PathMultimap] with\n * operations to mutate the multimap.\n */\npublic interface MutablePathMultimap<T> : PathMultimap<T> {\n    /**\n     * Inserts a new entry in the multimap with the given [path] and [value] and returns an\n     * identifier that identifies the inserted entry in the multimap.\n     *\n     * The returned identifier can be used to remove the inserted entry from the multimap.\n     */\n    public fun put(path: Path, value: T): PathMultimapEntryId\n\n    /**\n     * Inserts a new entry in the multimap with the given [path] and [value] and returns an\n     * identifier that identifies the inserted entry in the multimap.\n     *\n     * The returned identifier can be used to remove the inserted entry from the multimap.\n     */\n    public fun put(path: String, value: T): PathMultimapEntryId = put(AbsolutePath(path), value)\n\n    /**\n     * Inserts all entries of [pathMultimap] into this multimap and returns a list with the\n     * identifiers of each inserted entry.\n     */\n    public fun putAll(pathMultimap: PathMultimap<T>): List<PathMultimapEntryId> {\n        val removeFuns = mutableListOf<PathMultimapEntryId>()\n        for ((path, value) in pathMultimap.entries) {\n            removeFuns += put(path, value)\n        }\n        return removeFuns\n    }\n\n    /**\n     * Removes all entries with a path contained by [path] (following the semantics of\n     * [path containment][AbsolutePath.contains]) and returns a list of said entries.\n     */\n    public fun remove(path: Path): List<PathMultimapEntry<T>>\n\n    /**\n     * Removes all entries with a path contained by [path] (following the semantics of\n     * [path containment][AbsolutePath.contains]) and returns a list of said entries.\n     */\n    public fun remove(path: String): List<PathMultimapEntry<T>> = remove(AbsolutePath(path))\n\n    /**\n     * Removes the entry identified by [entryId] and returns it or `null` when no such entry exists.\n     */\n    public fun removeEntry(entryId: PathMultimapEntryId): PathMultimapEntry<T>?\n\n    /** Removes all entries from the path multimap. */\n    public fun clear()\n}\n\n/**\n * Inserts a new entry in the multimap with the given [path] and [value] and returns an identifier\n * that identifies the inserted entry in the multimap.\n *\n * The returned identifier can be used to remove the inserted entry from the multimap.\n */\npublic operator fun <T> MutablePathMultimap<T>.set(path: Path, value: T): PathMultimapEntryId =\n    put(path, value)\n\n/**\n * Inserts a new entry in the multimap with the given [path] and [value] and returns an identifier\n * that identifies the inserted entry in the multimap.\n *\n * The returned identifier can be used to remove the inserted entry from the multimap.\n */\npublic operator fun <T> MutablePathMultimap<T>.set(path: String, value: T): PathMultimapEntryId =\n    put(AbsolutePath(path), value)\n\n/**\n * Returns a new read-only path multimap given a list of [pairs] where the first value is the path\n * and the second is the value.\n */\npublic fun <T> pathMultimapOf(vararg pairs: Pair<PathOrString, T>): PathMultimap<T> =\n    mutablePathMultimapOf(*pairs)\n\n/**\n * Returns a new mutable path multimap given a list of [pairs] where the first value is the path and\n * the second is the value.\n *\n * For removal purposes and for operations on ids, the first entry has id `0L`, the second entry id\n * `1L`, etc.\n */\npublic fun <T> mutablePathMultimapOf(vararg pairs: Pair<PathOrString, T>): MutablePathMultimap<T> {\n    val trie: PathTrie<T> = if (pairs.isEmpty()) PathTrie() else PathTrie(pairs.size)\n    for (pair in pairs) {\n        trie[pair.first.toAbsolutePath()] = pair.second\n    }\n    return trie\n}\n\n/** Transforms the multimap into a mapping of paths to lists of values associated with them. */\npublic fun <T> PathMultimap<T>.toMap(): MutableMap<AbsolutePath, MutableList<T>> {\n    val map: MutableMap<AbsolutePath, MutableList<T>> = LinkedHashMap(size)\n    for (entry in entries) {\n        map.getOrPut(entry.path) { mutableListOf() } += entry.value\n    }\n    return map\n}\n","package io.kform.collections\n\nimport io.kform.AbsolutePath\nimport io.kform.AbsolutePathFragment\nimport io.kform.Path\nimport io.kform.toAbsolutePath\n\n/** Entry in a path trie holding values of type [T]. */\npublic data class PathTrieEntry<T>(\n    override val path: AbsolutePath,\n    override val value: T,\n    override val id: PathMultimapEntryId,\n) : PathMultimapEntry<T>\n\n/**\n * Implementation of a mutable path multimap as a trie. Held values are of type [T].\n *\n * Each node of the trie represents a path fragment. As such, a path can be represented by\n * navigating through the trie's nodes. Each node contains the values associated with the path they\n * represent.\n *\n * A trie is a good structure to implement a path multimap due to the intended semantics of the\n * [get(path)][get] and [remove(path)][removeEntry] functions: the `get` function should return all\n * values matching a given path, whilst the `remove` function removes values contained by a given\n * path (following the [matching][AbsolutePath.matches] and [containment][AbsolutePath.contains]\n * semantics of paths).\n *\n * As an example, imagine the following operations on the trie (with simplified notation for the\n * paths):\n * ```kotlin\n * trie[\"/\"] = 0\n * trie[\"/path/x\"] = 1\n * trie[\"/path/y\"] = 2\n * trie[\"/path/x/z\"] = 3\n * trie[\"/\u2217/path\"] = 4\n * trie[\"/\u2217/path\"] = 5\n * ```\n *\n * The resulting structure would look similar to the following, where the right side represents the\n * values associated with each trie node:\n * ```\n * /          -> [0]\n * \u251c\u2500 path    -> []\n * \u2502  \u251c\u2500 x    -> [1]\n * \u2502  \u2502  \u2514\u2500 z -> [3]\n * \u2502  \u2514\u2500 y    -> [2]\n * \u2514\u2500 \u2217       -> []\n *    \u2514\u2500 path -> [4, 5]\n * ```\n *\n * Getting values associated with the path `\"/\u2217/\u2217\"` would return a sequence with values `[1, 2, 4,\n * 5]`.\n *\n * @constructor Creates a new path trie given an `initialCapacity` (defaults to 100).\n */\npublic class PathTrie<T>(initialCapacity: Int = 100) : MutablePathMultimap<T> {\n    /**\n     * Class representing a node of the trie representing the fragment [fragment] and whose parent\n     * node is [parent].\n     */\n    private class PathTrieNode<T>(\n        val parent: PathTrieNode<T>? = null,\n        val fragment: AbsolutePathFragment? = null,\n    ) {\n        /** Child nodes. */\n        val childNodes: MutableMap<AbsolutePathFragment, PathTrieNode<T>> =\n            HashMap(CHILD_NODES_MAP_INITIAL_CAPACITY)\n\n        /** Entries of this node. */\n        val entries: MutableMap<PathMultimapEntryId, Pair<AbsolutePath, T>> =\n            HashMap(ENTRIES_MAP_INITIAL_CAPACITY)\n\n        /** Creates and returns a new child node for the fragment [fragment]. */\n        fun newChildNode(fragment: AbsolutePathFragment): PathTrieNode<T> {\n            val newNode = PathTrieNode(this, fragment)\n            childNodes[fragment] = newNode\n            return newNode\n        }\n\n        /** Clears this node. */\n        fun clear() {\n            childNodes.clear()\n            entries.clear()\n        }\n\n        /** Cleans up this node by removing itself from its parent when it is empty. */\n        fun cleanUp() {\n            if (parent != null && childNodes.isEmpty() && entries.isEmpty()) {\n                parent.childNodes.remove(fragment!!)\n                parent.cleanUp()\n            }\n        }\n\n        private companion object {\n            // Initial capacities for the node maps\n            const val CHILD_NODES_MAP_INITIAL_CAPACITY = 10\n\n            // Assumes that typically only one value is associated with each\n            const val ENTRIES_MAP_INITIAL_CAPACITY = 1\n        }\n    }\n\n    /** Root node of the trie. */\n    private val rootNode: PathTrieNode<T> = PathTrieNode()\n\n    /** Nodes containing each key, for fast access via key. */\n    private val nodesById: MutableMap<PathMultimapEntryId, PathTrieNode<T>> =\n        HashMap(initialCapacity)\n\n    /** Next entry identifier to use. */\n    private var entryId: PathMultimapEntryId = 0\n\n    override val size: Int\n        get() = nodesById.size\n\n    /**\n     * Formats the trie as a mapping of paths to the list of values associated with them.\n     *\n     * Example: `\"{/path1=[val1, val2], /path2=[val3, val4]}\"`.\n     */\n    override fun toString(): String = toMap().toString()\n\n    override fun containsPath(path: Path): Boolean =\n        path.toAbsolutePath().let { absolutePath -> entriesImpl(absolutePath).any() }\n\n    override fun containsEntry(entryId: PathMultimapEntryId): Boolean =\n        nodesById.containsKey(entryId)\n\n    override fun containsValue(value: T): Boolean =\n        entriesImpl(AbsolutePath.MATCH_ALL).any { (_, value2) -> value == value2 }\n\n    override fun get(path: Path): Sequence<T> =\n        path.toAbsolutePath().let { absolutePath ->\n            entriesImpl(absolutePath).map { (_, value) -> value }\n        }\n\n    override fun getEntry(entryId: PathMultimapEntryId): PathTrieEntry<T>? {\n        val node = nodesById[entryId] ?: return null\n        val pair = node.entries[entryId]!!\n        return PathTrieEntry(pair.first, pair.second, entryId)\n    }\n\n    override fun put(path: Path, value: T): PathMultimapEntryId =\n        path.toAbsolutePath().let { absolutePath ->\n            val newId = entryId++\n            var curNode = this.rootNode\n            for (fragment in absolutePath) {\n                var nextNode = curNode.childNodes[fragment]\n                if (nextNode == null) {\n                    nextNode = curNode.newChildNode(fragment)\n                }\n                curNode = nextNode\n            }\n            nodesById[newId] = curNode\n            curNode.entries[newId] = absolutePath to value\n            return newId\n        }\n\n    override fun remove(path: Path): List<PathTrieEntry<T>> =\n        path.toAbsolutePath().let { absolutePath ->\n            val removedEntries = mutableListOf<PathTrieEntry<T>>()\n            val cache = mutableSetOf<PathTrieNode<T>>()\n            removeImpl(absolutePath, removedEntries, cache)\n            // Clean up all nodes from which we may have removed an entry since we cannot clean them\n            // up\n            // whilst iterating on them in [removeImpl]\n            for (node in cache) {\n                node.cleanUp()\n            }\n            return removedEntries\n        }\n\n    override fun removeEntry(entryId: PathMultimapEntryId): PathTrieEntry<T>? {\n        val node = nodesById[entryId] ?: return null\n        val pair = node.entries.remove(entryId)!!\n        node.cleanUp()\n        nodesById.remove(entryId)\n        return PathTrieEntry(pair.first, pair.second, entryId)\n    }\n\n    override fun clear() {\n        rootNode.clear()\n        nodesById.clear()\n    }\n\n    override fun entries(path: Path): Sequence<PathTrieEntry<T>> =\n        path.toAbsolutePath().let { absolutePath -> entriesImpl(absolutePath) }\n\n    /**\n     * Returns a sequence over all entries matching [path] (recursive implementation).\n     *\n     * @param cache Set containing the nodes whose entries we've already yielded. The algorithm can\n     *   end up analysing the same node more than once, hence the need to keep track of the nodes\n     *   with entries already yielded.\n     * @param i Index of the fragment of the path being analysed.\n     * @param node Current node being analysed.\n     */\n    private fun entriesImpl(\n        path: AbsolutePath,\n        cache: MutableSet<PathTrieNode<T>> = mutableSetOf(),\n        i: Int = 0,\n        node: PathTrieNode<T> = rootNode,\n    ): Sequence<PathTrieEntry<T>> = sequence {\n        // Base case (whole path matched)\n        if (i == path.size) {\n            if (!cache.contains(node)) {\n                cache += node\n                for ((id, pair) in node.entries) {\n                    yield(PathTrieEntry(pair.first, pair.second, id))\n                }\n            }\n        } else {\n            when (val fragment = path[i]) {\n                AbsolutePathFragment.RecursiveWildcard -> {\n                    // Match next fragment against same node\n                    yieldAll(entriesImpl(path, cache, i + 1, node))\n                    // Match same fragment against all next nodes except the recursive wildcard one\n                    // (which is matched against at the end of the method)\n                    for ((nextFragment, nextNode) in node.childNodes.entries) {\n                        if (nextFragment != AbsolutePathFragment.RecursiveWildcard) {\n                            yieldAll(entriesImpl(path, cache, i, nextNode))\n                        }\n                    }\n                }\n                AbsolutePathFragment.Wildcard -> {\n                    // Match next fragment against all next nodes except the recursive wildcard one\n                    // (which is matched against at the end of the method)\n                    for ((nextFragment, nextNode) in node.childNodes.entries) {\n                        if (nextFragment !== AbsolutePathFragment.RecursiveWildcard) {\n                            yieldAll(entriesImpl(path, cache, i + 1, nextNode))\n                        }\n                    }\n                }\n                else -> {\n                    // Match next fragment against matching node\n                    val nextNode = node.childNodes[fragment]\n                    if (nextNode != null) {\n                        yieldAll(entriesImpl(path, cache, i + 1, nextNode))\n                    }\n                    // Match next fragment against non-recursive wildcard node\n                    val wildcardNode = node.childNodes[AbsolutePathFragment.Wildcard]\n                    if (wildcardNode != null) {\n                        yieldAll(entriesImpl(path, cache, i + 1, wildcardNode))\n                    }\n                }\n            }\n        }\n\n        // Match same fragment and all next fragments against the recursive wildcard node\n        val recWildcardNode = node.childNodes[AbsolutePathFragment.RecursiveWildcard]\n        if (recWildcardNode != null) {\n            for (j in i..path.size) {\n                yieldAll(entriesImpl(path, cache, j, recWildcardNode))\n            }\n        }\n    }\n\n    /**\n     * Removes all entries with a path contained by [path] and adds them to a list of removed\n     * entries provided in [removedEntries].\n     *\n     * Because we cannot clean up nodes whilst iterating on them, this function's caller should\n     * clean up all nodes in the [cache] after calling this function (and as such it has to provide\n     * the cache itself as well).\n     *\n     * @param cache Set containing the nodes whose entries we've already removed. The algorithm can\n     *   end up analysing the same node more than once, hence the need to keep track of the nodes\n     *   with entries already removed.\n     * @param i Index of the fragment of the path being analysed.\n     * @param node Current node being analysed.\n     */\n    private fun removeImpl(\n        path: AbsolutePath,\n        removedEntries: MutableList<PathTrieEntry<T>>,\n        cache: MutableSet<PathTrieNode<T>>,\n        i: Int = 0,\n        node: PathTrieNode<T> = rootNode,\n    ) {\n        // Base case (whole path matched)\n        if (i == path.size) {\n            if (!cache.contains(node)) {\n                cache += node\n                if (node.entries.isNotEmpty()) {\n                    for ((id, pair) in node.entries) {\n                        removedEntries += PathTrieEntry(pair.first, pair.second, id)\n                        nodesById.remove(id)\n                    }\n                    node.entries.clear()\n                }\n            }\n        } else {\n            when (val fragment = path[i]) {\n                AbsolutePathFragment.RecursiveWildcard -> {\n                    // Match next fragment against same node\n                    removeImpl(path, removedEntries, cache, i + 1, node)\n                    // Match same fragment against all next nodes\n                    for (nextNode in node.childNodes.values) {\n                        removeImpl(path, removedEntries, cache, i, nextNode)\n                    }\n                }\n                AbsolutePathFragment.Wildcard -> {\n                    // Match next fragment against all next nodes except the recursive wildcard one\n                    for ((nextFragment, nextNode) in node.childNodes.entries) {\n                        if (nextFragment != AbsolutePathFragment.RecursiveWildcard) {\n                            removeImpl(path, removedEntries, cache, i + 1, nextNode)\n                        }\n                    }\n                }\n                else -> {\n                    // Match next fragment against matching node\n                    val nextNode = node.childNodes[fragment]\n                    if (nextNode != null) {\n                        removeImpl(path, removedEntries, cache, i + 1, nextNode)\n                    }\n                }\n            }\n        }\n    }\n}\n",null,"@file:JvmName(\"Files\")\n\npackage io.kform.datatypes\n\nimport kotlin.io.encoding.Base64\nimport kotlin.io.encoding.ExperimentalEncodingApi\nimport kotlin.jvm.JvmName\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.serialization.KSerializer\nimport kotlinx.serialization.SerialName\nimport kotlinx.serialization.Serializable\nimport kotlinx.serialization.descriptors.SerialDescriptor\nimport kotlinx.serialization.encoding.Decoder\nimport kotlinx.serialization.encoding.Encoder\n\n/**\n * Representation of a file to be used in a form.\n *\n * @property name Name of the file.\n * @property data File content.\n * @property type File MIME type.\n */\n@Serializable\npublic data class File\n@JvmOverloads\npublic constructor(\n    public val name: String = DEFAULT_FILE_NAME,\n    public val data: ByteArray = byteArrayOf(),\n    public val type: String? = null,\n) {\n    @JvmOverloads\n    public constructor(data: ByteArray, type: String? = null) : this(DEFAULT_FILE_NAME, data, type)\n\n    init {\n        require(name.isNotEmpty()) { \"File name cannot be empty.\" }\n    }\n\n    /** Size of the file's data, in bytes. */\n    public val size: Int\n        get() = data.size\n\n    override fun equals(other: Any?): Boolean =\n        when {\n            this === other -> true\n            other !is File -> false\n            name != other.name -> false\n            !data.contentEquals(other.data) -> false\n            type != other.type -> false\n            else -> true\n        }\n\n    override fun hashCode(): Int {\n        var result = name.hashCode()\n        result = 31 * result + data.contentHashCode()\n        result = 31 * result + (type?.hashCode() ?: 0)\n        return result\n    }\n\n    override fun toString(): String =\n        \"File(name=$name, data=ByteArray(size=${data.size})${\n            if (type == null) \"\" else \", type=$type\"\n        })\"\n\n    public companion object {\n        /** Default file name. */\n        public const val DEFAULT_FILE_NAME: String = \"unnamed_file\"\n\n        /** Empty placeholder file instance. */\n        internal val EMPTY_PLACEHOLDER_FILE = File(\"empty_file\")\n    }\n\n    /**\n     * Serializer used to serialize the file's [data] as base 64. Useful when using formats such as\n     * JSON which do not support binary data.\n     *\n     * Example usage:\n     * ```kotlin\n     * @Serializable\n     * data class Person(\n     *   val name: String,\n     *   val address: String,\n     *   @Serializable(with = File.Base64Serializer::class)\n     *   val proofOfAddress: File?\n     * )\n     * ```\n     */\n    @OptIn(ExperimentalEncodingApi::class)\n    public object Base64Serializer : KSerializer<File> {\n        /** Helper class used to serialise a file with its data in base 64. */\n        @Serializable\n        @SerialName(\"io.kform.datatypes.File\")\n        private class Surrogate(val name: String, val data: String = \"\", val type: String? = null)\n\n        override val descriptor: SerialDescriptor = Surrogate.serializer().descriptor\n\n        override fun serialize(encoder: Encoder, value: File): Unit =\n            encoder.encodeSerializableValue(\n                Surrogate.serializer(),\n                Surrogate(value.name, Base64.encode(value.data), value.type),\n            )\n\n        override fun deserialize(decoder: Decoder): File {\n            val surrogate = decoder.decodeSerializableValue(Surrogate.serializer())\n            return File(surrogate.name, Base64.decode(surrogate.data), surrogate.type)\n        }\n    }\n}\n\n/** Function returning an empty, placeholder file. */\npublic fun emplyPlaceholderFile(): File = File.EMPTY_PLACEHOLDER_FILE\n","@file:OptIn(ExperimentalSerializationApi::class)\n@file:JvmName(\"Tables\")\n@file:Suppress(\"NOTHING_TO_INLINE\")\n\npackage io.kform.datatypes\n\nimport kotlin.concurrent.Volatile\nimport kotlin.jvm.JvmName\nimport kotlin.jvm.JvmSynthetic\nimport kotlinx.serialization.ExperimentalSerializationApi\nimport kotlinx.serialization.KSerializer\nimport kotlinx.serialization.Serializable\nimport kotlinx.serialization.builtins.ListSerializer\nimport kotlinx.serialization.builtins.MapSerializer\nimport kotlinx.serialization.builtins.serializer\nimport kotlinx.serialization.descriptors.SerialDescriptor\nimport kotlinx.serialization.encoding.Decoder\nimport kotlinx.serialization.encoding.Encoder\n\n/** Identifier of a table row. */\npublic typealias TableRowId = Int\n\n/**\n * Row of a table containing a value and its associated identifier.\n *\n * @property id Row identifier.\n * @property value Row Value.\n */\npublic data class TableRow<T>(public val id: TableRowId, public var value: T)\n\n/** Collection where each value has a stable identifier. */\n@Serializable(with = Table.RowsSerializer::class)\npublic class Table<T>\nprivate constructor(\n    private val list: ArrayList<TableRow<T>>,\n    private val map: HashMap<TableRowId, TableRow<T>>,\n) {\n    public constructor() : this(ArrayList(), HashMap())\n\n    public constructor(\n        initialCapacity: Int\n    ) : this(ArrayList(initialCapacity), HashMap(initialCapacity))\n\n    public constructor(table: Table<T>) : this(table.size) {\n        for ((id, value) in table.rows) {\n            this[id] = value\n        }\n    }\n\n    public constructor(map: Map<TableRowId, T>) : this(map.size) {\n        for ((key, value) in map) {\n            this[key] = value\n        }\n    }\n\n    public constructor(values: Collection<T>) : this(values.size) {\n        addAll(values)\n    }\n\n    private var _nextId: TableRowId = 0\n\n    /** Identifier of the next row (when incremented automatically). */\n    public val nextId: TableRowId\n        get() = _nextId\n\n    /** Computes the next id. */\n    private fun computeNextId() {\n        while (_nextId in map) {\n            ++_nextId\n        }\n    }\n\n    /** Size of the table. */\n    public val size: Int\n        get() = list.size\n\n    /** Set of all rows of the table. */\n    public val rows: Set<TableRow<T>>\n        get() {\n            if (_rows == null) {\n                _rows =\n                    object : AbstractSet<TableRow<T>>() {\n                        override val size\n                            get() = this@Table.size\n\n                        override operator fun contains(element: TableRow<T>): Boolean {\n                            val rowWithMatchingId = map[element.id]\n                            return rowWithMatchingId != null &&\n                                rowWithMatchingId.value == element.value\n                        }\n\n                        override fun iterator() = list.iterator()\n                    }\n            }\n            return _rows!!\n        }\n\n    @Volatile private var _rows: Set<TableRow<T>>? = null\n\n    /** Set of all identifiers of the table. */\n    public val ids: Set<TableRowId>\n        get() {\n            if (_ids == null) {\n                _ids =\n                    object : AbstractSet<TableRowId>() {\n                        override val size\n                            get() = this@Table.size\n\n                        override operator fun contains(element: TableRowId) = containsId(element)\n\n                        override fun iterator(): Iterator<TableRowId> {\n                            val iterator = list.iterator()\n                            return object : Iterator<TableRowId> {\n                                override fun hasNext() = iterator.hasNext()\n\n                                override fun next() = iterator.next().id\n                            }\n                        }\n                    }\n            }\n            return _ids!!\n        }\n\n    @Volatile private var _ids: Set<TableRowId>? = null\n\n    /** Collection of all values of the table. */\n    public val values: Collection<T>\n        get() {\n            if (_values == null) {\n                _values =\n                    object : AbstractCollection<T>() {\n                        override val size: Int\n                            get() = this@Table.size\n\n                        override operator fun contains(element: T) = containsValue(element)\n\n                        override fun iterator(): Iterator<T> {\n                            val iterator = list.iterator()\n                            return object : Iterator<T> {\n                                override fun hasNext() = iterator.hasNext()\n\n                                override fun next() = iterator.next().value\n                            }\n                        }\n                    }\n            }\n            return _values!!\n        }\n\n    @Volatile private var _values: Collection<T>? = null\n\n    override fun equals(other: Any?): Boolean =\n        when {\n            this === other -> true\n            other !is Table<*> -> false\n            else -> list == other.list\n        }\n\n    override fun hashCode(): Int = list.hashCode()\n\n    override fun toString(): String =\n        list.joinToString(prefix = \"[\", postfix = \"]\") { \"${it.id}=${it.value}\" }\n\n    /** Whether the table is empty. */\n    public fun isEmpty(): Boolean = list.isEmpty()\n\n    /** Whether the table contains a row with the provided [id]. */\n    public fun containsId(id: TableRowId): Boolean = id in map\n\n    /** Whether the table contains a row with the provided [value]. */\n    public fun containsValue(value: T): Boolean = list.any { it.value == value }\n\n    /** Whether the table contains a row with the provided [id]. */\n    @JvmSynthetic public inline operator fun contains(id: TableRowId): Boolean = containsId(id)\n\n    /** Whether the table contains a row with the provided [value]. */\n    @JvmSynthetic public inline operator fun contains(value: T): Boolean = containsValue(value)\n\n    /** Returns the index of the row with the provided [id] or `-1` when no such row exists. */\n    public fun indexOfId(id: TableRowId): Int = list.indexOfFirst { row -> row.id == id }\n\n    /** Returns the index of the row with the provided [id] or `-1` when no such row exists. */\n    public fun indexOfValue(value: T): Int = list.indexOfFirst { row -> row.value == value }\n\n    /** Returns the last index of the row with the provided [id] or `-1` when no such row exists. */\n    public fun lastIndexOfValue(value: T): Int = list.indexOfLast { row -> row.value == value }\n\n    /** Returns the row at the provided [index]. */\n    public fun rowAt(index: Int): TableRow<T> = list[index]\n\n    /** Returns the identifier of the row at the provided [index]. */\n    public fun idAt(index: Int): TableRowId = rowAt(index).id\n\n    /** Returns the value of the row at the provided [index]. */\n    public fun valueAt(index: Int): T = rowAt(index).value\n\n    private fun getRow(id: TableRowId): TableRow<T> =\n        map.getOrElse(id) { throw NoSuchElementException(\"No row found with id '$id'.\") }\n\n    /** Returns the value of the row with the provided [id]. */\n    public operator fun get(id: TableRowId): T? = map[id]?.value\n\n    private fun setRowValue(row: TableRow<T>, value: T): T {\n        val oldValue = row.value\n        row.value = value\n        return oldValue\n    }\n\n    /**\n     * Sets the value of a row with the provided [id]. If no such row exists, then it will be\n     * created. Returns the value previously at said row or `null` if no such row existed.\n     */\n    public operator fun set(id: TableRowId, value: T): T? =\n        if (id in map) setRowValue(getRow(id), value)\n        else {\n            val row = TableRow(id, value)\n            list.add(row)\n            map[id] = row\n            computeNextId()\n            null\n        }\n\n    /**\n     * Sets the value of the row at the provided [index]. If `index == size`, a new row is added.\n     * Returns the value previously at said row or `null` if no such row existed.\n     */\n    public fun setAt(index: Int, value: T): T? =\n        if (index == size) {\n            addAt(size, value)\n            null\n        } else setRowValue(rowAt(index), value)\n\n    /**\n     * Adds a new row with the provided [value] to the table. This simply calls [add] while ignoring\n     * the returned identifier. If you require knowing the identifier of the newly added row, use\n     * [add] instead.\n     */\n    @JvmSynthetic\n    public inline operator fun plusAssign(value: T) {\n        add(value)\n    }\n\n    /**\n     * Adds a new row with the provided [value] to the table. Returns the identifier of the newly\n     * added row.\n     */\n    public fun add(value: T): TableRowId = addAt(size, value)\n\n    /**\n     * Adds a new row with the provided [value] at the provided [index]. Returns the identifier of\n     * the newly added row.\n     */\n    public fun addAt(index: Int, value: T): TableRowId {\n        val newId = nextId\n        val row = TableRow(newId, value)\n        list.add(index, row)\n        map[newId] = row\n        computeNextId()\n        return newId\n    }\n\n    /**\n     * Adds all provided [values] to the table. Returns a list with the identifiers of all newly\n     * added rows.\n     */\n    public fun addAll(values: Collection<T>): List<TableRowId> = addAllAt(size, values)\n\n    /**\n     * Adds all provided [values] to the table at the provided [index]. Returns a list with the\n     * identifiers of all newly added rows.\n     */\n    public fun addAllAt(index: Int, values: Collection<T>): List<TableRowId> {\n        val rows = ArrayList<TableRow<T>>(values.size)\n        for (value in values) {\n            val row = TableRow(nextId, value)\n            map[nextId] = row\n            computeNextId()\n            rows += row\n        }\n        list.addAll(index, rows)\n        return rows.map { it.id }\n    }\n\n    /**\n     * Removes the row with the provided [id]. This simply calls [remove] while ignoring the\n     * returned element. If you require knowing which element was removed, use [remove] instead.\n     */\n    @JvmSynthetic\n    public inline operator fun minusAssign(id: TableRowId) {\n        remove(id)\n    }\n\n    /**\n     * Removes the row with the provided [id]. Returns the element of the removed row or `null` if\n     * no such row exists.\n     */\n    public fun remove(id: TableRowId): T? =\n        indexOfId(id).let { if (it == -1) null else removeAt(it).value }\n\n    /** Removes the row at the provided [index]. Returns the removed row. */\n    public fun removeAt(index: Int): TableRow<T> {\n        val row = list.removeAt(index)\n        map.remove(row.id)\n        return row\n    }\n\n    /** Clears the table by removing all of its rows. */\n    public fun clear() {\n        list.clear()\n        map.clear()\n    }\n\n    /**\n     * Returns a sub-list representation of the table from index [fromIndex] (inclusive) to index\n     * [toIndex] (exclusive).\n     */\n    public fun subList(fromIndex: Int, toIndex: Int): List<TableRow<T>> =\n        list.subList(fromIndex, toIndex)\n\n    /**\n     * Table serialiser that serialises the table as a map, mapping each row id to its respective\n     * value.\n     */\n    public class RowsSerializer<T>(valueSerializer: KSerializer<T>) : KSerializer<Table<T>> {\n        private val mapSerializer = MapSerializer(Int.serializer(), valueSerializer)\n\n        override val descriptor: SerialDescriptor =\n            SerialDescriptor(\"io.kform.datatypes.Table\", mapSerializer.descriptor)\n\n        override fun serialize(encoder: Encoder, value: Table<T>): Unit =\n            encoder.encodeSerializableValue(mapSerializer, value.toMap())\n\n        override fun deserialize(decoder: Decoder): Table<T> =\n            decoder.decodeSerializableValue(mapSerializer).toTable()\n    }\n\n    /**\n     * Table serialiser that serialises the values of the table as a list, ignoring the ids of all\n     * table rows.\n     */\n    public class ValuesSerializer<T>(valueSerializer: KSerializer<T>) : KSerializer<Table<T>> {\n        private val listSerializer = ListSerializer(valueSerializer)\n\n        override val descriptor: SerialDescriptor =\n            SerialDescriptor(\"io.kform.datatypes.Table\", listSerializer.descriptor)\n\n        override fun serialize(encoder: Encoder, value: Table<T>): Unit =\n            encoder.encodeSerializableValue(listSerializer, value.values.toList())\n\n        override fun deserialize(decoder: Decoder): Table<T> =\n            decoder.decodeSerializableValue(listSerializer).toTable()\n    }\n}\n\n/**\n * Function used to disambiguate between the two [tableOf] implementations, in case of 0 arguments.\n */\npublic fun <T> tableOf(): Table<T> = Table()\n\n/** Creates a new table from a list of elements, using auto-generated identifiers. */\npublic fun <T> tableOf(vararg values: T): Table<T> {\n    val table = Table<T>(values.size)\n    for (value in values) {\n        table += value\n    }\n    return table\n}\n\n/** Creates a new table from a list of pairs mapping an identifier to its respective element. */\npublic fun <T> tableOf(vararg pairs: Pair<TableRowId, T>): Table<T> {\n    val table = Table<T>(pairs.size)\n    for ((id, elem) in pairs) {\n        table[id] = elem\n    }\n    return table\n}\n\n/** Creates a table from an [Iterable], using auto-generated identifiers. */\npublic fun <T> Iterable<T>.toTable(): Table<T> {\n    val table = Table<T>()\n    for (element in this) {\n        table += element\n    }\n    return table\n}\n\n/** Creates a copy of the provided table. */\npublic fun <T> Table<T>.toTable(): Table<T> = Table(this)\n\n/** Creates a table from a [Map]. */\npublic fun <T> Map<TableRowId, T>.toTable(): Table<T> = Table(this)\n\n/** Creates a table from a [Collection], using auto-generated identifiers. */\npublic fun <T> Collection<T>.toTable(): Table<T> = Table(this)\n\n/** Creates a table from an [Array], using auto-generated identifiers. */\npublic fun <T> Array<T>.toTable(): Table<T> {\n    val table = Table<T>(size)\n    for (value in this) {\n        table += value\n    }\n    return table\n}\n\n/** Creates a new [Map] from a table. */\npublic fun <T> Table<T>.toMap(): MutableMap<TableRowId, T> {\n    val map = LinkedHashMap<TableRowId, T>(size)\n    for ((id, value) in this.rows) {\n        map[id] = value\n    }\n    return map\n}\n","package io.kform.internal\n\n/** Access to the value/state tree. */\ninternal class AccessValueStateTree(override val accessType: ActionAccessType) : ActionAccess {\n    override fun conflictsWith(access: ActionAccess) = access is AccessValueStateTree\n}\n\n/** Accesses the validation state of a value and allows access to its cached issues. */\ninternal class AccessValidationState(override val accessType: ActionAccessType) : ActionAccess {\n    override fun conflictsWith(access: ActionAccess) = access is AccessValidationState\n}\n\n/** Access the validation deferred states within the state of a value. */\ninternal class AccessStatefulValidationDeferredState(override val accessType: ActionAccessType) :\n    ActionAccess {\n    override fun conflictsWith(access: ActionAccess) =\n        access is AccessStatefulValidationDeferredState\n}\n\n/** Access computed value deferred state. */\ninternal class AccessStatefulComputedValueDeferredState(override val accessType: ActionAccessType) :\n    ActionAccess {\n    override fun conflictsWith(access: ActionAccess) =\n        access is AccessStatefulComputedValueDeferredState\n}\n\n/** Access the dirty status within the state of a value. */\ninternal class AccessIsDirty(override val accessType: ActionAccessType) : ActionAccess {\n    override fun conflictsWith(access: ActionAccess) = access is AccessIsDirty\n}\n\n/** Access the touched status within the state of a value. */\ninternal class AccessIsTouched(override val accessType: ActionAccessType) : ActionAccess {\n    override fun conflictsWith(access: ActionAccess) = access is AccessIsTouched\n}\n\n/** Access the number of descendants displaying issues (both errors and warnings). */\ninternal class AccessDescendantsDisplayingIssues(override val accessType: ActionAccessType) :\n    ActionAccess {\n    override fun conflictsWith(access: ActionAccess) = access is AccessDescendantsDisplayingIssues\n}\n\n/** Access the external context. */\ninternal class AccessExternalContext(override val accessType: ActionAccessType) : ActionAccess {\n    override fun conflictsWith(access: ActionAccess): Boolean = access is AccessExternalContext\n}\n\n/** Access the validation daemon. */\ninternal class AccessValidationDaemon(override val accessType: ActionAccessType) : ActionAccess {\n    override fun conflictsWith(access: ActionAccess): Boolean = access is AccessValidationDaemon\n}\n","package io.kform.internal\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.collections.PathMultimapEntryId\nimport io.kform.collections.mutablePathMultimapOf\nimport kotlin.time.TimeMark\nimport kotlin.time.TimeSource\nimport kotlinx.coroutines.*\nimport kotlinx.coroutines.sync.Mutex\nimport kotlinx.coroutines.sync.withLock\n\n/** Type of access: read or write. Read accesses can always run concurrently. */\ninternal enum class ActionAccessType {\n    Read,\n    Write,\n}\n\n/**\n * Representation of an access a certain action makes. Accesses of type `Read` never conflict with\n * one another. Accesses of type `Write` may conflict with other accesses based on [conflictsWith].\n */\ninternal interface ActionAccess {\n    /** Type of access (`Read` or `Write`). */\n    val accessType: ActionAccessType\n\n    /**\n     * Returns whether this access conflicts with the provided [access]. Either this or the provided\n     * access will be of type `Write` when this method is called, so no need to confirm that.\n     */\n    fun conflictsWith(access: ActionAccess): Boolean\n}\n\n/**\n * Representation of an action to be performed (emitted by the form manager) with return type [T].\n */\ninternal interface Action<T> {\n    /**\n     * Accesses that this action makes. The action manager uses these accesses together with\n     * [accessedPaths] to know which actions conflict.\n     */\n    val accesses: Iterable<ActionAccess>\n\n    /**\n     * Paths representing the resources that this action accesses. Other actions will possibly\n     * conflict with this action when the intersection of accessed paths between both actions isn't\n     * empty.\n     */\n    // TODO: Consider moving accessed paths to within accesses (might complicate the algorithm)\n    val accessedPaths: Iterable<AbsolutePath>\n\n    /**\n     * Priority of the action (`>= 0`). A smaller number means greater priority and `0` (the\n     * default) represents maximum priority.\n     *\n     * If this action conflicts with another action with a lower priority, then that other action\n     * will be cancelled by the action manager.\n     */\n    val priority: Int\n        get() = 0\n\n    /** Result of the action. */\n    val result: CompletableDeferred<T>\n\n    /**\n     * Returns whether this action overrides the provided [action]. If so, the action manager will\n     * cancel that action in favor of this one.\n     */\n    fun overridesConflictingAction(action: Action<*>): Boolean = false\n\n    /** Function called by the action manager that runs the action and returns its result. */\n    suspend fun run(): T\n\n    /** Awaits for this action to finish running and awaits its result. */\n    suspend fun await(): T = result.await()\n\n    /** Cancels the action. */\n    fun cancel(cause: CancellationException? = null): Unit = result.cancel(cause)\n}\n\n/**\n * Job representing a scheduled or running action. [waitingFor] denotes the number of jobs this\n * action is waiting to complete before it can run. [waitedBy] contains\n */\nprivate class ActionJob<T>(val action: Action<T>) {\n    /** Job running the action. When `null`, the action is not yet running. */\n    var job: Job? = null\n\n    /** Set of jobs this job is waiting for before it can run. */\n    val waitingFor = mutableSetOf<ActionJob<*>>()\n\n    /** Set of jobs that are waiting for this job to finish before being allowed to run. */\n    val waitedBy = mutableSetOf<ActionJob<*>>()\n\n    /**\n     * Identifiers of the paths we have \"locked\" to be able to run. After the completion of this job\n     * we use them to \"unlock\" the paths.\n     */\n    val lockedPathsIds = mutableListOf<PathMultimapEntryId>()\n}\n\n/**\n * Manager of actions emitted by the form manager: it is responsible for launching actions in a safe\n * manner, possibly concurrently.\n */\ninternal class ActionManager(private val scope: CoroutineScope) {\n    private val actionJobsMutex = Mutex()\n    /**\n     * Action jobs currently being processed. Each job is associated with one or more paths,\n     * representing the resources that each job has \"locked\".\n     */\n    private val actionJobs = mutablePathMultimapOf<ActionJob<*>>()\n\n    /**\n     * Schedules the provided [action] to run and returns a [Job] that completes once the action has\n     * been actually scheduled.\n     */\n    suspend fun <T> scheduleAction(action: Action<T>) =\n        actionJobsMutex.withLock {\n            val actionJob = ActionJob(action)\n\n            // Check which actions conflict with this action and wait for them to finish\n            val conflicts = conflicts(action)\n            FormManager.logger.trace {\n                val waitingFor =\n                    conflicts.joinToString { job -> \"${job.action} (${job.waitingFor.size})\" }\n                \"Scheduling action: $action (waiting for: [$waitingFor])\"\n            }\n            for (conflict in conflicts) {\n                actionJob.waitingFor += conflict\n                conflict.waitedBy += actionJob\n            }\n\n            // Add action's accessed paths to the action jobs structure, basically stating that they\n            // are \"in use\" by this action and thus preventing conflicting actions from running\n            // concurrently\n            for (accessedPath in action.accessedPaths) {\n                actionJob.lockedPathsIds += actionJobs.put(accessedPath, actionJob)\n            }\n\n            // Launch when the action is waiting for no jobs to complete\n            if (actionJob.waitingFor.isEmpty()) {\n                launchActionJob(actionJob)\n            }\n        }\n\n    /**\n     * Returns the set of action jobs that conflict with [action], cancelling conflicting actions\n     * when appropriate.\n     */\n    private fun conflicts(action: Action<*>): Set<ActionJob<*>> {\n        val conflicts = mutableSetOf<ActionJob<*>>()\n        for (accessedPath in action.accessedPaths) {\n            // Sort the jobs topologically in order to cancel as many jobs as possible. If not\n            // topologically sorted, we may end up not cancelling a job that this action overrides\n            // because it is being waited by another job that this action has priority over. By\n            // topologically sorting the jobs first, we make sure that in such a scenario, we would\n            // first cancel the job that this action has priority over and when we reach the job\n            // that this action overrides it no longer has any jobs waiting for it, so we can also\n            // cancel it.\n            for (conflictingActionJob in sortActionJobsTopologically(actionJobs[accessedPath])) {\n                val conflictingAction = conflictingActionJob.action\n                if (!actionsConflict(action, conflictingAction)) {\n                    continue\n                }\n\n                // Whether to cancel the conflicting action and why\n                var shouldCancel = false\n                var cancelCause: CancellationException? = null\n                if (action.priority < conflictingAction.priority) {\n                    shouldCancel = true\n                } else if (\n                    conflictingActionJob.waitedBy.isEmpty() &&\n                        action.overridesConflictingAction(conflictingAction)\n                ) {\n                    shouldCancel = true\n                    cancelCause = OverriddenActionException(action)\n                }\n\n                // If we cancel a job that hasn't started running yet, it is immediately cleaned up\n                // and, as such, there is no need to depend on it\n                var conflictHasBeenCleanedUp = false\n                if (shouldCancel) {\n                    conflictHasBeenCleanedUp = cancelActionJob(conflictingActionJob, cancelCause)\n                }\n                if (!conflictHasBeenCleanedUp) {\n                    conflicts += conflictingActionJob\n                }\n            }\n        }\n        return conflicts\n    }\n\n    /** Whether two actions conflict with each other based on their accesses. */\n    private fun actionsConflict(action1: Action<*>, action2: Action<*>) =\n        action1.accesses.any { access1 ->\n            action2.accesses.any { access2 ->\n                (access1.accessType == ActionAccessType.Write ||\n                    access2.accessType == ActionAccessType.Write) && access1.conflictsWith(access2)\n            }\n        }\n\n    /** Launches the action job [actionJob]. */\n    private fun <T> launchActionJob(actionJob: ActionJob<T>) {\n        val action = actionJob.action\n        val job =\n            scope.launch(CoroutineName(\"Action job\")) {\n                // Measure the time it took to run the action when logging in debug level\n                val mark =\n                    if (FormManager.logger.isDebugEnabled()) TimeSource.Monotonic.markNow()\n                    else null\n                try {\n                    FormManager.logger.debug { \"Action started: $action\" }\n                    action.result.complete(action.run())\n                    FormManager.logger.debug {\n                        \"Action completed successfully${timeTag(mark)}: $action\"\n                    }\n                } catch (ex: Throwable) {\n                    if (ex is CancellationException) {\n                        FormManager.logger.debug {\n                            \"Action completed by cancellation${timeTag(mark)}: $action ($ex)\"\n                        }\n                    } else {\n                        FormManager.logger.error(ex) {\n                            \"Action completed exceptionally${timeTag(mark)}: $action\"\n                        }\n                    }\n                    action.result.completeExceptionally(ex)\n                }\n            }\n        actionJob.job = job\n        // If the action was cancelled (by cancelling its result), then we cancel the job\n        action.result.invokeOnCompletion { ex ->\n            if (ex is CancellationException) {\n                job.cancel(ex)\n            }\n        }\n        // Cleanup the action job\n        job.invokeOnCompletion {\n            scope.launch { actionJobsMutex.withLock { cleanUpActionJob(actionJob) } }\n        }\n    }\n\n    /**\n     * Cancels the [action job][actionJob] and returns whether it was immediately cleaned up (i.e.\n     * if the job was cancelled before it started running).\n     *\n     * @param cause Cause of the cancellation.\n     */\n    private fun <T> cancelActionJob(\n        actionJob: ActionJob<T>,\n        cause: CancellationException? = null,\n    ): Boolean {\n        val action = actionJob.action\n        val job = actionJob.job\n        if (job != null) {\n            if (job.isActive) {\n                FormManager.logger.debug { \"Action cancelled after launching: $action\" }\n                job.cancel(cause)\n            }\n            // Cancel the `result` here since the job may be cancelled before it even starts and, as\n            // such, `result` would never complete. It's fine for the job to try to complete an\n            // already completed deferred.\n            action.result.cancel(cause)\n        } else {\n            if (action.result.isActive) {\n                FormManager.logger.debug { \"Action cancelled before launching: $action\" }\n                action.result.cancel(cause)\n            }\n            for (waitedByJob in actionJob.waitingFor) {\n                waitedByJob.waitedBy -= actionJob\n            }\n            cleanUpActionJob(actionJob)\n        }\n        return job == null\n    }\n\n    /**\n     * Cleans up [actionJob] by removing it from [actionJobs] (thus \"unlocking\" the paths in use by\n     * this action) and launching jobs that were waiting for it when appropriate.\n     */\n    private fun cleanUpActionJob(actionJob: ActionJob<*>) {\n        FormManager.logger.trace {\n            val actionsWaiting =\n                actionJob.waitedBy.joinToString { job -> \"${job.action} (${job.waitingFor.size})\" }\n            \"Cleaning up action: ${actionJob.action} (waited by: [$actionsWaiting])\"\n        }\n        for (id in actionJob.lockedPathsIds) {\n            actionJobs.removeEntry(id)\n        }\n        for (waitingJob in actionJob.waitedBy) {\n            waitingJob.waitingFor -= actionJob\n            if (waitingJob.waitingFor.isEmpty()) {\n                launchActionJob(waitingJob)\n            }\n        }\n    }\n\n    /**\n     * Sorts the provided sequence of [actionJobs] topologically so that if one job in the sequence\n     * depends on another, the job being depended on will appear after the depending job in the\n     * resulting list.\n     */\n    private fun sortActionJobsTopologically(\n        actionJobs: Sequence<ActionJob<*>>\n    ): List<ActionJob<*>> {\n        val actionJobsSet = actionJobs.toSet()\n        val visited = HashSet<ActionJob<*>>(actionJobsSet.size)\n        val deque = ArrayDeque<ActionJob<*>>(actionJobsSet.size)\n\n        // Depth first search where nodes are prepended to the deque\n        fun dfs(actionJob: ActionJob<*>) {\n            visited += actionJob\n            for (waitedByJob in actionJob.waitingFor) {\n                if (waitedByJob in actionJobsSet && waitedByJob !in visited) {\n                    dfs(waitedByJob)\n                }\n            }\n            deque.addFirst(actionJob)\n        }\n\n        for (actionJob in actionJobsSet) {\n            if (actionJob !in visited) {\n                dfs(actionJob)\n            }\n        }\n\n        return deque\n    }\n\n    private fun timeTag(mark: TimeMark?): String =\n        mark?.elapsedNow()?.inWholeMilliseconds?.let { \" [${it}ms]\" } ?: \"\"\n}\n","package io.kform.internal\n\nimport io.kform.*\nimport io.kform.collections.PathMultimap\nimport io.kform.collections.mutablePathMultimapOf\nimport io.kform.collections.set\nimport io.kform.schemas.ComputedSchema\n\n/**\n * Multimap mapping paths of values being depended upon to information about what computed values\n * depend on them.\n *\n * Example: if the computed value `c` of a computed schema with path `\"/x/y/z\"` depends on path\n * `\"../a\"`, then there will be an entry in this multimap mapping `\"/x/y/a\"` to\n * `ComputedValueDependencyInfo(\"../z\", c)`.\n */\ninternal typealias ComputedValueDependencies = PathMultimap<ComputedValueDependencyInfo>\n\n/**\n * Multimap mapping paths of values being observed to information about what computed values are\n * observing them.\n *\n * Example: if the stateful computed value `c` of a computed schema with path `\"/x/y/z\"` needs to\n * observe a single path `\"../a\"`, then there will be an entry in this multimap mapping `\"/x/y/a\"`\n * to `ObservedComputedValueDependencyInfo(\"../z\", c)`.\n */\ninternal typealias ObservedComputedValueDependencies =\n    PathMultimap<ObservedComputedValueDependencyInfo>\n\n/** Map with information on the list of computedValues depending on each external context. */\ninternal typealias ExternalContextComputedValueDependencies =\n    Map<String, List<ExternalContextComputedValueDependantInfo>>\n\n/** Information about a computed value depending on a certain path. */\ninternal data class ComputedValueDependencyInfo(\n    val path: Path,\n    val computedValue: ComputedValue<*>,\n) {\n    override fun toString() = \"$computedValue@$path\"\n}\n\n/** Information about a stateful computed value observing a certain path. */\ninternal data class ObservedComputedValueDependencyInfo(\n    val path: Path,\n    val computedValue: StatefulComputedValue<*, *>,\n    val toObserveIndex: Int,\n) {\n    override fun toString() = \"$computedValue@$path\"\n}\n\n/** Information about a computed value that depends on external context. */\ninternal data class ExternalContextComputedValueDependantInfo(\n    val path: AbsolutePath,\n    val computedValue: ComputedValue<*>,\n) {\n    override fun toString() = \"$computedValue@$path\"\n}\n\n/**\n * Builds and returns the multimap with information on path dependencies for all computedValues in\n * [formSchema].\n */\ninternal fun buildComputedValueDependencies(formSchema: Schema<*>): ComputedValueDependencies {\n    val pathDependencies = mutablePathMultimapOf<ComputedValueDependencyInfo>()\n    for ((schema, path) in schemaInfoImpl(formSchema, AbsolutePath.MATCH_ALL)) {\n        if (schema is ComputedSchema) {\n            val computedValue = schema.computedValue\n\n            validateComputation(formSchema, path, computedValue)\n            for (dependencyInfo in computedValue.dependencies.values) {\n                val resolvedDep = path.resolve(dependencyInfo.path)\n                pathDependencies[resolvedDep] =\n                    ComputedValueDependencyInfo(\n                        path.relativeTo(resolvedDep.withoutDescendants()),\n                        computedValue,\n                    )\n            }\n        }\n    }\n    return pathDependencies\n}\n\n/**\n * Builds and returns the multimap with information on observed path dependencies for all stateful\n * computed values in [formSchema].\n */\ninternal fun buildObservedComputedValueDependencies(\n    formSchema: Schema<*>\n): ObservedComputedValueDependencies {\n    val observedPathDependencies = mutablePathMultimapOf<ObservedComputedValueDependencyInfo>()\n    for ((schema, path) in schemaInfoImpl(formSchema, AbsolutePath.MATCH_ALL)) {\n        if (schema is ComputedSchema && schema.computedValue is StatefulComputedValue<*, *>) {\n            val computedValue = schema.computedValue as StatefulComputedValue<*, *>\n\n            // Paths to observe must be contained by one of these paths\n            val toObserveContainers =\n                listOf(path + AbsolutePathFragment.RecursiveWildcard) +\n                    computedValue.dependencies.values.map {\n                        path.resolve(it.path) + AbsolutePathFragment.RecursiveWildcard\n                    }\n\n            for ((observedIndex, observer) in computedValue.observers.withIndex()) {\n                val resolvedToObserve = path.resolve(observer.toObserve)\n\n                if (\n                    toObserveContainers.all { resolvedToObserve !in it } ||\n                        !schemaInfoImpl(formSchema, resolvedToObserve).any()\n                ) {\n                    throw InvalidPathToObserveException(path, computedValue, observer.toObserve)\n                }\n\n                for (resolvedInfo in schemaInfoImpl(formSchema, resolvedToObserve)) {\n                    observedPathDependencies[resolvedInfo.queriedPath] =\n                        ObservedComputedValueDependencyInfo(\n                            path.relativeTo(resolvedInfo.queriedPath),\n                            computedValue,\n                            observedIndex,\n                        )\n                }\n            }\n        }\n    }\n    return observedPathDependencies\n}\n\n/**\n * Builds and returns the map with information on computed values depending on external contexts.\n */\ninternal fun buildExternalContextComputedValueDependencies(\n    formSchema: Schema<*>\n): ExternalContextComputedValueDependencies {\n    val externalContextDependencies =\n        hashMapOf<String, MutableList<ExternalContextComputedValueDependantInfo>>()\n    for ((schema, path) in schemaInfoImpl(formSchema, AbsolutePath.MATCH_ALL)) {\n        if (schema is ComputedSchema) {\n            val computedValue = schema.computedValue\n\n            for (externalContextName in computedValue.externalContextDependencies) {\n                externalContextDependencies.getOrPut(externalContextName) { mutableListOf() } +=\n                    ExternalContextComputedValueDependantInfo(path, computedValue)\n            }\n        }\n    }\n    return externalContextDependencies\n}\n","package io.kform.internal\n\nimport kotlinx.coroutines.CancellationException\n\n/**\n * Exception thrown when an action is cancelled because it became redundant thanks to a new action\n * [newAction].\n */\ninternal class OverriddenActionException(val newAction: Action<*>) :\n    CancellationException(\"Action cancelled due to: '$newAction'.\")\n","package io.kform.internal\n\nimport io.kform.AbsolutePath\nimport io.kform.LocatedValidationIssue\nimport io.kform.Path\nimport io.kform.collections.mutablePathMultimapOf\nimport io.kform.collections.set\nimport kotlinx.coroutines.sync.Mutex\nimport kotlinx.coroutines.sync.withLock\n\n/**\n * Class tracking dependencies of a form manager's external issues, providing coroutine-safe methods\n * to get, add, and remove them.\n */\ninternal class ExternalIssuesDependencies {\n    /** Maps paths to the external issues depending on them. */\n    private val pathDependencies = mutablePathMultimapOf<LocatedValidationIssue>()\n    /** Maps external contexts to the external issues depending on them. */\n    private val externalContextDependencies =\n        mutableMapOf<String, MutableSet<LocatedValidationIssue>>()\n\n    private val mutex = Mutex()\n\n    /** Gets and removes all external issues dependent on [path]. */\n    suspend fun getAndRemoveExternalIssuesDependentOnPath(\n        path: AbsolutePath\n    ): Set<LocatedValidationIssue> {\n        mutex.withLock {\n            val entriesToRemove = pathDependencies.entries(path).toList()\n            for (entry in entriesToRemove) {\n                pathDependencies.removeEntry(entry.id)\n            }\n            val removedIssues = entriesToRemove.mapTo(HashSet(entriesToRemove.size)) { it.value }\n            for (issue in removedIssues) {\n                removeExternalContextDependencies(issue)\n            }\n            return removedIssues\n        }\n    }\n\n    /** Gets and removes all external issues dependent on the external context [externalContext]. */\n    suspend fun getAndRemoveExternalIssuesDependentOnExternalContext(\n        externalContext: String\n    ): Set<LocatedValidationIssue> {\n        mutex.withLock {\n            val removedIssues = externalContextDependencies.remove(externalContext) ?: emptySet()\n            for (issue in removedIssues) {\n                removePathDependencies(issue)\n            }\n            return removedIssues\n        }\n    }\n\n    /** Adds dependencies from all provided [externalIssues]. */\n    suspend fun addDependenciesOfExternalIssues(externalIssues: Iterable<LocatedValidationIssue>) {\n        mutex.withLock {\n            for (issue in externalIssues) {\n                val dependencies = pathDependencies(issue)\n                for (dependency in dependencies) {\n                    pathDependencies[dependency] = issue\n                }\n                for (contextDependency in issue.externalContextDependencies) {\n                    externalContextDependencies.getOrPut(contextDependency) { mutableSetOf() } +=\n                        issue\n                }\n            }\n        }\n    }\n\n    /** Removes all dependencies of all provided [externalIssues]. */\n    suspend fun removeDependenciesOfExternalIssues(\n        externalIssues: Iterable<LocatedValidationIssue>\n    ) {\n        mutex.withLock {\n            for (issue in externalIssues) {\n                removePathDependencies(issue)\n                removeExternalContextDependencies(issue)\n            }\n        }\n    }\n\n    /**\n     * Returns the path dependencies of [externalIssue] taking into consideration whether it\n     * [depends on descendants][LocatedValidationIssue.dependsOnDescendants].\n     */\n    private fun pathDependencies(externalIssue: LocatedValidationIssue): Set<AbsolutePath> {\n        val dependencies = externalIssue.dependencies.toMutableSet()\n        if (externalIssue.dependsOnDescendants) {\n            dependencies += externalIssue.path + Path.DESCENDANTS\n        }\n        return dependencies\n    }\n\n    /** Removes all path dependencies of [externalIssue] from [pathDependencies]. */\n    private fun removePathDependencies(externalIssue: LocatedValidationIssue) {\n        val dependencies = pathDependencies(externalIssue)\n        for (dependency in dependencies) {\n            val entriesToRemove =\n                pathDependencies.entries(dependency).filter { it.value == externalIssue }\n            for (entry in entriesToRemove) {\n                pathDependencies.removeEntry(entry.id)\n            }\n        }\n    }\n\n    /**\n     * Removes all external context dependencies of [externalIssue] from\n     * [externalContextDependencies].\n     */\n    private fun removeExternalContextDependencies(externalIssue: LocatedValidationIssue) {\n        for (externalContext in externalIssue.externalContextDependencies) {\n            externalContextDependencies[externalContext]?.remove(externalIssue)\n        }\n    }\n}\n","package io.kform.internal\n\nimport io.kform.*\nimport io.kform.collections.MutablePathMultimap\nimport io.kform.collections.PathMultimapEntryId\nimport io.kform.collections.mutablePathMultimapOf\nimport io.kform.collections.set\nimport kotlinx.coroutines.sync.Mutex\nimport kotlinx.coroutines.sync.withLock\n\n/** Number of events to process before allowing the browser to \"breathe\". */\nprivate const val BREATHING_COUNT = 10_000\n\n/** Bus used to emit events to the user. */\ninternal class FormManagerEventsBus {\n    private val subscriptionsMutex = Mutex()\n    private val subscriptions: MutablePathMultimap<EventHandler> = mutablePathMultimapOf()\n\n    private var delayCounter = 0\n\n    suspend fun emit(event: FormManagerEvent<*>) {\n        // Allow browser to \"breathe\" every [BREATHING_COUNT] events\n        if (++delayCounter % BREATHING_COUNT == 0) delayImmediate()\n\n        subscriptionsMutex.withLock {\n            FormManager.logger.trace {\n                val subscriptionPaths = subscriptions.entries(event.path).map { it.path }.toList()\n                \"Emitting event to subscriptions $subscriptionPaths: $event\"\n            }\n            for (handler in subscriptions[event.path]) {\n                handler(event)\n            }\n        }\n    }\n\n    suspend fun subscribe(\n        path: AbsolutePath,\n        onSubscription: OnSubscription? = null,\n        eventsHandler: EventHandler,\n    ): Unsubscribe =\n        subscriptionsMutex.withLock {\n            val id = subscriptions.set(path, eventsHandler)\n            FormManager.logger.trace {\n                \"Subscribed to '$path' (total subscriptions: ${subscriptions.size})\"\n            }\n            onSubscription?.invoke()\n            return@withLock { unsubscribe(id, path) }\n        }\n\n    private suspend fun unsubscribe(id: PathMultimapEntryId, path: AbsolutePath) =\n        subscriptionsMutex.withLock {\n            subscriptions.removeEntry(id)\n            FormManager.logger.trace {\n                \"Unsubscribed from '$path' (total subscriptions: ${subscriptions.size})\"\n            }\n        }\n}\n","package io.kform.internal\n\nimport io.kform.*\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.emitAll\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Returns information about the inner schemas of [formSchema] matching [path] (recursive\n * implementation).\n *\n * @param curInfo Information of schema being currently analysed.\n * @param i Index of the fragment of the path being analysed.\n */\ninternal fun <T> schemaInfoImpl(\n    formSchema: Schema<T>,\n    path: AbsolutePath,\n    curInfo: SchemaInfo<*> = SchemaInfo(formSchema, AbsolutePath.ROOT),\n    i: Int = 0,\n): Sequence<SchemaInfo<*>> = sequence {\n    if (i == path.size) {\n        yield(curInfo)\n    } else {\n        val (curSchema, curPath, curQueriedPath) = curInfo\n        val fragment = path[i]\n        if (fragment is AbsolutePathFragment.RecursiveWildcard) {\n            yieldAll(schemaInfoImpl(formSchema, path, curInfo, i + 1))\n            if (curSchema is ParentSchema<*>) {\n                for (childSchemaInfo in\n                    curSchema.childrenSchemas(\n                        curPath,\n                        curQueriedPath,\n                        AbsolutePathFragment.Wildcard,\n                    )) {\n                    yieldAll(schemaInfoImpl(formSchema, path, childSchemaInfo, i))\n                }\n            }\n        } else if (\n            curSchema is ParentSchema<*> &&\n                (fragment == AbsolutePathFragment.Wildcard ||\n                    curSchema.isValidChildSchemaFragment(fragment))\n        ) {\n            for (childSchemaInfo in curSchema.childrenSchemas(curPath, curQueriedPath, fragment)) {\n                yieldAll(schemaInfoImpl(formSchema, path, childSchemaInfo, i + 1))\n            }\n        }\n    }\n}\n\n/**\n * Returns a flow of information about the parts of a value [formValue] with schema [formSchema]\n * matching [path] (recursive implementation).\n *\n * @param curInfo Information of value being currently analysed.\n * @param i Index of the fragment of the path being analysed.\n */\ninternal fun <T> valueInfoImpl(\n    formSchema: Schema<T>,\n    formValue: T,\n    path: AbsolutePath,\n    curInfo: ValueInfo<*> = ValueInfo(formValue, formSchema, AbsolutePath.ROOT, AbsolutePath.ROOT),\n    i: Int = 0,\n): Flow<ValueInfo<*>> = flow {\n    if (i == path.size) {\n        emit(curInfo)\n    } else {\n        val (curValue, curSchema, curPath, curSchemaPath) = curInfo\n        val fragment = path[i]\n        if (fragment is AbsolutePathFragment.RecursiveWildcard) {\n            emitAll(valueInfoImpl(formSchema, formValue, path, curInfo, i + 1))\n            if (curSchema is ParentSchema<*>) {\n                @Suppress(\"UNCHECKED_CAST\") (curSchema as ParentSchema<Any?>)\n                curSchema\n                    .children(curPath, curSchemaPath, curValue, AbsolutePathFragment.Wildcard)\n                    .collect { childInfo: ValueInfo<*> ->\n                        @Suppress(\"UNCHECKED_CAST\") (childInfo as ValueInfo<Any?>)\n                        emitAll(valueInfoImpl(formSchema, formValue, path, childInfo, i))\n                    }\n            }\n        } else if (curSchema is ParentSchema<*>) {\n            @Suppress(\"UNCHECKED_CAST\") (curSchema as ParentSchema<Any?>)\n            if (\n                fragment == AbsolutePathFragment.Wildcard ||\n                    curSchema.isValidChildFragment(curValue, fragment)\n            ) {\n                curSchema.children(curPath, curSchemaPath, curValue, fragment).collect {\n                    childInfo: ValueInfo<*> ->\n                    @Suppress(\"UNCHECKED_CAST\") (childInfo as ValueInfo<Any?>)\n                    emitAll(valueInfoImpl(formSchema, formValue, path, childInfo, i + 1))\n                }\n            }\n        }\n    }\n}\n\n/**\n * Returns a sequence of information about the parts of [formState] of schema [formSchema] matching\n * [path] (recursive implementation).\n *\n * @param curInfo Information of value being currently analysed.\n * @param i Index of the fragment of the path being analysed.\n */\ninternal fun <T> stateInfoImpl(\n    formSchema: Schema<T>,\n    formState: State,\n    path: AbsolutePath,\n    curInfo: StateInfo<*> = StateInfo(formState, formSchema, AbsolutePath.ROOT),\n    i: Int = 0,\n): Sequence<StateInfo<*>> = sequence {\n    if (i == path.size) {\n        yield(curInfo)\n    } else {\n        val (curState, _, curPath) = curInfo\n        val fragment = path[i]\n        if (fragment is AbsolutePathFragment.RecursiveWildcard) {\n            yieldAll(stateInfoImpl(formSchema, formState, path, curInfo, i + 1))\n            if (curState is ParentState) {\n                for (childInfo in curState.childrenStates(curPath, AbsolutePathFragment.Wildcard)) {\n                    yieldAll(stateInfoImpl(formSchema, formState, path, childInfo, i))\n                }\n            }\n        } else if (curState is ParentState) {\n            for (childInfo in curState.childrenStates(curPath, fragment)) {\n                yieldAll(stateInfoImpl(formSchema, formState, path, childInfo, i + 1))\n            }\n        }\n    }\n}\n\n/**\n * Returns a flow of information about the parts of a value [formValue] with schema [formSchema]\n * matching [path] (recursive implementation).\n *\n * @param curInfo Information of value being currently analysed.\n * @param i Index of the fragment of the path being analysed.\n */\n@Suppress(\"UNCHECKED_CAST\")\ninternal fun <T> valueStateInfoImpl(\n    formSchema: Schema<T>,\n    formValue: T,\n    formState: State,\n    path: AbsolutePath,\n    curInfo: ValueStateInfo<*> =\n        ValueStateInfo(formValue, formState, formSchema, AbsolutePath.ROOT, AbsolutePath.ROOT),\n    i: Int = 0,\n): Flow<ValueStateInfo<*>> = flow {\n    if (i == path.size) {\n        emit(curInfo)\n    } else {\n        val (curValue, curState, curSchema, curPath, curSchemaPath) = curInfo\n        val fragment = path[i]\n        if (fragment is AbsolutePathFragment.RecursiveWildcard) {\n            emitAll(valueStateInfoImpl(formSchema, formValue, formState, path, curInfo, i + 1))\n            if (curSchema is ParentSchema<*>) {\n                curSchema as ParentSchema<Any?>\n                curSchema\n                    .children(curPath, curSchemaPath, curValue, AbsolutePathFragment.Wildcard)\n                    .collect { childValueInfo: ValueInfo<*> ->\n                        childValueInfo as ValueInfo<Any?>\n                        val childStateInfo =\n                            (curState as ParentState)\n                                .childrenStates(curPath, childValueInfo.path.lastFragment!!)\n                                .single()\n                        emitAll(\n                            valueStateInfoImpl(\n                                formSchema,\n                                formValue,\n                                formState,\n                                path,\n                                ValueStateInfo(\n                                    childValueInfo.value,\n                                    childStateInfo.state,\n                                    childValueInfo.schema,\n                                    childValueInfo.path,\n                                    childValueInfo.schemaPath,\n                                ),\n                                i,\n                            )\n                        )\n                    }\n            }\n        } else if (curSchema is ParentSchema<*>) {\n            curSchema as ParentSchema<Any?>\n            if (\n                fragment == AbsolutePathFragment.Wildcard ||\n                    curSchema.isValidChildFragment(curValue, fragment)\n            ) {\n                curSchema.children(curPath, curSchemaPath, curValue, fragment).collect {\n                    childValueInfo: ValueInfo<*> ->\n                    childValueInfo as ValueInfo<Any?>\n                    val childStateInfo =\n                        (curState as ParentState)\n                            .childrenStates(curPath, childValueInfo.path.lastFragment!!)\n                            .single()\n                    emitAll(\n                        valueStateInfoImpl(\n                            formSchema,\n                            formValue,\n                            formState,\n                            path,\n                            ValueStateInfo(\n                                childValueInfo.value,\n                                childStateInfo.state,\n                                childValueInfo.schema,\n                                childValueInfo.path,\n                                childValueInfo.schemaPath,\n                            ),\n                            i + 1,\n                        )\n                    )\n                }\n            }\n        }\n    }\n}\n","package io.kform.internal\n\nimport io.kform.SchemaEventsBus\nimport io.kform.ValueEvent\n\n/** Implementation of the schema events bus using a callback. */\ninternal class SchemaEventsCallbackBus(\n    private val eventHandler: suspend (event: ValueEvent<*>) -> Unit\n) : SchemaEventsBus {\n    override suspend fun emit(event: ValueEvent<*>) = eventHandler(event)\n}\n","package io.kform.internal\n\nimport io.kform.SchemaEventsBus\nimport io.kform.ValueEvent\n\n/** Implementation of the schema events bus where each [emit] is a no-op. */\ninternal object SchemaEventsNoOpBus : SchemaEventsBus {\n    override suspend fun emit(event: ValueEvent<*>) = Unit\n}\n","package io.kform.internal\n\nimport io.kform.*\nimport kotlinx.coroutines.CompletableDeferred\nimport kotlinx.coroutines.cancel\n\n/**\n * Implementation of the state associated with a value in the form manager.\n *\n * The value associated with this state is being validated by a provided number of validations\n * `nValidations` and a provided number of stateful validations `nStatefulValidations`.\n */\ninternal open class StateImpl(nValidations: Int, nStatefulValidations: Int) : State {\n    /**\n     * Cached issues of each validation. Elements are `null` when the issues of a certain validation\n     * are unknown.\n     */\n    private val cachedIssues: Array<Array<ValidationIssue>?>? =\n        if (nValidations == 0) null else arrayOfNulls(nValidations)\n\n    /**\n     * Deferred state of each stateful validation. Elements are `null` when the state hasn't been\n     * initialised.\n     */\n    private val statefulValidationsDeferredState: Array<CompletableDeferred<Any?>?>? =\n        if (nStatefulValidations == 0) null else arrayOfNulls(nStatefulValidations)\n\n    /** Validation status of the value. */\n    var validationStatus: ValidationStatus =\n        if (nValidations > 0) ValidationStatus.Unvalidated else ValidationStatus.Validated\n\n    /** External issues added to the value. */\n    var externalIssues: Array<LocatedValidationIssue>? = null\n\n    /**\n     * Deferred state of the stateful computed value. `null` when the state hasn't been initialised.\n     */\n    var statefulComputedValueDeferredState: CompletableDeferred<Any?>? = null\n\n    /** Whether the value associated with this state instance is dirty. */\n    var isDirty = false\n\n    /** Whether the value associated with this state instance has been touched. */\n    var isTouched = false\n\n    /**\n     * Returns the cached issues of the validation with index [validationIndex], or `null` if no\n     * issues have been cached for that validation.\n     */\n    fun getCachedIssues(validationIndex: Int): Array<ValidationIssue>? =\n        cachedIssues!![validationIndex]\n\n    /** Returns a list with all cached issues. */\n    private fun getAllCachedIssues(): Sequence<ValidationIssue> = sequence {\n        cachedIssues ?: return@sequence\n        for (issues in cachedIssues) {\n            issues ?: continue\n            for (issue in issues) {\n                yield(issue)\n            }\n        }\n    }\n\n    /** Caches the [issues] of the validation with index [validationIndex]. */\n    fun cacheIssues(validationIndex: Int, issues: Array<ValidationIssue>) {\n        cachedIssues!![validationIndex] = issues\n    }\n\n    /**\n     * Removes the cached issues of the validation with index [validationIndex] or all cached issues\n     * when [validationIndex] is `-1`.\n     */\n    fun removeCachedIssues(validationIndex: Int? = null) {\n        if (validationIndex == null) {\n            cachedIssues?.fill(null)\n        } else {\n            cachedIssues!![validationIndex] = null\n        }\n    }\n\n    /**\n     * Returns a list of all (distinct) issues that should be visible to the user. I.e. all chached\n     * issues (if the validation status is validated) + all external issues.\n     */\n    fun getAllVisibleIssues(): List<ValidationIssue> {\n        val nonLocatedExternalIssues =\n            externalIssues?.map { ValidationIssue(it.code, it.severity, it.data) } ?: emptyList()\n        val visibleIssues =\n            if (\n                validationStatus == ValidationStatus.Validated ||\n                    validationStatus == ValidationStatus.ValidatedExceptionally\n            )\n                getAllCachedIssues().toList() + nonLocatedExternalIssues\n            else nonLocatedExternalIssues\n        return visibleIssues.distinct()\n    }\n\n    /** Adds external issues to the value. */\n    fun addExternalIssues(issues: Iterable<LocatedValidationIssue>) {\n        externalIssues =\n            if (externalIssues != null)\n                externalIssues!!.toMutableSet().let {\n                    it.addAll(issues)\n                    it.toTypedArray()\n                }\n            else issues.toSet().toTypedArray()\n    }\n\n    /**\n     * Removed all external issues from the value with the provided code, or all issues if no code\n     * is provided. Returns a list containing the removed issues.\n     */\n    fun removeExternalIssues(code: String? = null): List<LocatedValidationIssue> {\n        if (externalIssues == null) {\n            return emptyList()\n        }\n        if (code == null) {\n            val toRemove = externalIssues!!.toList()\n            externalIssues = null\n            return toRemove\n        }\n        val (toRemove, toKeep) = externalIssues!!.partition { it.code == code }\n        externalIssues = if (toKeep.isEmpty()) null else toKeep.toTypedArray()\n        return toRemove\n    }\n\n    /**\n     * Removes the provided external issues from the list of external issues. Returns whether at\n     * least one issue was removed.\n     */\n    fun removeExternalIssues(issues: Iterable<LocatedValidationIssue>): Boolean {\n        if (externalIssues == null) {\n            return false\n        }\n        val toRemove = issues.toSet()\n        val toKeep = externalIssues!!.filter { it !in toRemove }\n        if (externalIssues!!.size != toKeep.size) {\n            externalIssues = toKeep.toTypedArray()\n            return true\n        }\n        return false\n    }\n\n    /**\n     * Returns the deferred validation state of the stateful validation with index\n     * [statefulValidationIndex].\n     */\n    fun getStatefulValidationDeferredState(statefulValidationIndex: Int) =\n        statefulValidationsDeferredState!![statefulValidationIndex]\n\n    /**\n     * Sets the deferred validation state of the stateful validation with index\n     * [statefulValidationIndex].\n     */\n    fun setStatefulValidationDeferredState(\n        statefulValidationDeferredState: CompletableDeferred<Any?>?,\n        statefulValidationIndex: Int,\n    ) {\n        statefulValidationsDeferredState!![statefulValidationIndex] =\n            statefulValidationDeferredState\n    }\n\n    /** Destroy the state by cancelling all deferred computation states. */\n    fun destroy() {\n        if (statefulValidationsDeferredState != null) {\n            for (deferredState in statefulValidationsDeferredState) {\n                deferredState?.cancel()\n            }\n        }\n        statefulComputedValueDeferredState?.cancel()\n    }\n\n    /**\n     * Dominant issue severity of the all issues (cached + external): error severity if at least one\n     * issue is an error, or warning severity when all issues are warnings.\n     *\n     * Returns `null` when the value has no external issues and either has not been fully validated\n     * or is valid.\n     */\n    fun dominantIssueSeverity(): ValidationIssueSeverity? {\n        if (validationStatus == ValidationStatus.ValidatedExceptionally) {\n            return ValidationIssueSeverity.Error\n        }\n        var severity: ValidationIssueSeverity? = null\n        if (externalIssues != null) {\n            for (externalIssue in externalIssues!!) {\n                if (externalIssue.severity == ValidationIssueSeverity.Error) {\n                    return ValidationIssueSeverity.Error\n                } else {\n                    severity = ValidationIssueSeverity.Warning\n                }\n            }\n        }\n        if (validationStatus == ValidationStatus.Validated) {\n            for (cachedIssue in getAllCachedIssues()) {\n                if (cachedIssue.severity == ValidationIssueSeverity.Error) {\n                    return ValidationIssueSeverity.Error\n                } else {\n                    severity = ValidationIssueSeverity.Warning\n                }\n            }\n        }\n        return severity\n    }\n\n    /**\n     * Local display status of the value, ignoring display status of descendants. This function\n     * reads validation status, external issues, and touched status.\n     */\n    fun localDisplayStatus(): DisplayStatus {\n        if (!isTouched) {\n            return DisplayStatus.Valid\n        }\n        return when (dominantIssueSeverity()) {\n            ValidationIssueSeverity.Error -> DisplayStatus.Error\n            ValidationIssueSeverity.Warning -> DisplayStatus.Warning\n            null -> DisplayStatus.Valid\n        }\n    }\n\n    /**\n     * Current display status of the value. This function reads validation status, touched status,\n     * and (when a parent state) the number of descendants displaying issues.\n     */\n    open fun displayStatus(): DisplayStatus = localDisplayStatus()\n}\n\n/** Implementation of the state associated with a parent value in the form manager. */\ninternal open class ParentStateImpl(\n    parentState: ParentState,\n    nValidations: Int,\n    nStatefulValidations: Int,\n) : StateImpl(nValidations, nStatefulValidations), ParentState by parentState {\n    /** Number of descendants displaying errors. */\n    var descendantsDisplayingErrors: Int = 0\n\n    /** Number of descendants displaying warnings. */\n    var descendantsDisplayingWarnings: Int = 0\n\n    override fun displayStatus(): DisplayStatus {\n        if (!isTouched) {\n            return DisplayStatus.Valid\n        }\n        if (descendantsDisplayingErrors > 0) {\n            return DisplayStatus.Error\n        }\n        val dominantSeverity = dominantIssueSeverity()\n        if (dominantSeverity != null) {\n            return when (dominantSeverity) {\n                ValidationIssueSeverity.Error -> DisplayStatus.Error\n                ValidationIssueSeverity.Warning -> DisplayStatus.Warning\n            }\n        }\n        if (descendantsDisplayingWarnings > 0) {\n            return DisplayStatus.Warning\n        }\n        return DisplayStatus.Valid\n    }\n}\n\n/** Implementation of the state associated with a collection in the form manager. */\ninternal class CollectionStateImpl(\n    private val collectionState: CollectionState,\n    nValidations: Int,\n    nStatefulValidations: Int,\n) :\n    ParentStateImpl(collectionState, nValidations, nStatefulValidations),\n    CollectionState by collectionState {\n    override fun childrenStates(\n        path: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<StateInfo<*>> = collectionState.childrenStates(path, fragment)\n\n    override fun setState(fragment: AbsolutePathFragment.Id, state: State?) =\n        collectionState.setState(fragment, state)\n}\n",null,"package io.kform.internal\n\n/** Class representing unique constants. */\ninternal class Symbol(val name: String) {\n    override fun toString() = \"<$name>\"\n}\n\n/** Mock value representing an uninitialized variable. */\ninternal val UNINITIALIZED = Symbol(\"UNINITIALIZED\")\n\n/** Mock value used to set a value to its initial value. */\ninternal val INITIAL_VALUE = Symbol(\"INITIAL_VALUE\")\n","package io.kform.internal\n\nimport io.kform.*\nimport io.kform.collections.mutablePathMultimapOf\nimport io.kform.collections.set\nimport io.kform.internal.actions.ValidateAction\nimport kotlinx.coroutines.*\nimport kotlinx.coroutines.channels.Channel\nimport kotlinx.coroutines.flow.MutableStateFlow\nimport kotlinx.coroutines.flow.StateFlow\nimport kotlinx.coroutines.flow.collect\n\n/** Messages used by the validation daemon. */\nprivate sealed class ValidationDaemonMsg {\n    data object ValidateNext : ValidationDaemonMsg()\n\n    data object RetryValidate : ValidationDaemonMsg()\n\n    data class HandleInitEvent(val event: ValueEvent.Init<*>) : ValidationDaemonMsg()\n\n    data class HandleDestroyEvent(val event: ValueEvent.Destroy<*>) : ValidationDaemonMsg()\n\n    data class HandleValidationChangeEvent(val event: StateEvent.ValidationChange<*>) :\n        ValidationDaemonMsg()\n}\n\n/** Maximum number of paths of a certain schema allowed in \"unvalidated paths\". */\nprivate const val PATH_LIMIT_PER_SCHEMA = 64\n\n/** Daemon responsible for validating the form manager in the background. */\ninternal class ValidationDaemon(private val formManager: FormManager) {\n    // Validation daemon status\n    private val _status = MutableStateFlow(AutoValidationStatus.Inactive)\n    val status: StateFlow<AutoValidationStatus> = _status\n\n    // Assignment to these variables is synchronised by the action manager (start/stop)\n    private var channel: Channel<ValidationDaemonMsg>? = null\n    private var messagesHandlerJob: Job? = null\n    private var unsubscribeEventsHandler: Unsubscribe? = null\n\n    // Access to these variables is synchronised by [channel] and [messagesHandlerJob]\n    private var validateAction: Action<Unit>? = null\n    private val unvalidatedPaths = mutablePathMultimapOf<Unit>()\n    private var validating = false\n    private var validatingPath: AbsolutePath? = null\n\n    /** Starts the validation daemon. */\n    suspend fun start() {\n        if (status.value != AutoValidationStatus.Inactive) {\n            return\n        }\n\n        val newChannel = Channel<ValidationDaemonMsg>(Channel.BUFFERED)\n        channel = newChannel\n        messagesHandlerJob =\n            formManager.scope.launch(CoroutineName(\"Validation daemon messages handler\")) {\n                for (msg in newChannel) {\n                    when (msg) {\n                        is ValidationDaemonMsg.ValidateNext -> validateNext()\n                        is ValidationDaemonMsg.RetryValidate -> retryValidate()\n                        is ValidationDaemonMsg.HandleInitEvent -> handleInitEvent(msg.event)\n                        is ValidationDaemonMsg.HandleDestroyEvent -> handleDestroyEvent(msg.event)\n                        is ValidationDaemonMsg.HandleValidationChangeEvent ->\n                            handleValidationChangeEvent(msg.event)\n                    }\n                }\n            }\n\n        unsubscribeEventsHandler =\n            formManager.subscribe(\n                onSubscription = {\n                    for (schemaInfo in formManager.schemaInfo(AbsolutePath.MATCH_ALL)) {\n                        addUnvalidatedPath(schemaInfo.queriedPath, false)\n                    }\n                }\n            ) { event ->\n                if (event.schema.validations.isEmpty()) {\n                    return@subscribe\n                }\n                when (event) {\n                    is ValueEvent.Init<*> ->\n                        formManager.scope.launch {\n                            newChannel.send(ValidationDaemonMsg.HandleInitEvent(event))\n                        }\n                    is ValueEvent.Destroy<*> ->\n                        formManager.scope.launch { ValidationDaemonMsg.HandleDestroyEvent(event) }\n                    is StateEvent.ValidationChange<*> ->\n                        formManager.scope.launch {\n                            newChannel.send(ValidationDaemonMsg.HandleValidationChangeEvent(event))\n                        }\n                    else -> {} // Other events are irrelevant\n                }\n            }\n    }\n\n    /** Stops the validation daemon. */\n    suspend fun stop() {\n        if (status.value == AutoValidationStatus.Inactive) {\n            return\n        }\n\n        // Cancel runnings jobs and channel\n        channel!!.cancel()\n        validateAction?.cancel()\n        messagesHandlerJob!!.cancelAndJoin()\n        unsubscribeEventsHandler!!()\n\n        channel = null\n        messagesHandlerJob = null\n        unsubscribeEventsHandler = null\n\n        validateAction = null\n        unvalidatedPaths.clear()\n        validating = false\n        validatingPath = null\n\n        _status.emit(AutoValidationStatus.Inactive)\n        FormManager.logger.debug {\n            \"Validation daemon status changed to: ${AutoValidationStatus.Inactive}\"\n        }\n    }\n\n    /**\n     * Validates the next unvalidated path if there is one. The path being validated is set as\n     * [validatingPath].\n     *\n     * This is the only function that sets [validating] to `false` when there is nothing left to\n     * validate.\n     */\n    private suspend fun validateNext() {\n        if (!unvalidatedPaths.isEmpty()) {\n            val (path, _, id) = unvalidatedPaths.entries.first()\n            FormManager.logger.trace { \"Validation daemon: validating next ($path)\" }\n            unvalidatedPaths.removeEntry(id)\n            validatingPath = path\n            validate(path)\n        } else {\n            _status.emit(AutoValidationStatus.ActiveIdle)\n            validating = false\n            FormManager.logger.debug {\n                \"Validation daemon status changed to: ${AutoValidationStatus.ActiveIdle}\"\n            }\n        }\n    }\n\n    /**\n     * Retries validating the [validatingPath].\n     *\n     * If no [validatingPath] exists, it means that it was destroyed (and handled by\n     * [handleDestroyEvent]) so we validate the next unvalidated path instead.\n     */\n    private suspend fun retryValidate() {\n        if (validatingPath != null) {\n            FormManager.logger.trace { \"Validation daemon: retrying validation ($validatingPath)\" }\n            unvalidatedPaths.remove(validatingPath!!)\n            validate(validatingPath!!)\n        } else {\n            validateNext()\n        }\n    }\n\n    /**\n     * Validates [path].\n     *\n     * In case of success, schedules the validation of the next unvalidated path. Otherwise, when\n     * the validation was cancelled, schedules a retry of the current validation.\n     */\n    private fun validate(path: AbsolutePath) {\n        val channel = channel!!\n        val action = ValidateAction(formManager, path, { issuesFlow -> issuesFlow.collect() }, 1)\n        validateAction = action\n        formManager.scope.launch(CoroutineName(\"Validation daemon: validate '$path'\")) {\n            try {\n                // Schedule a validate action with low priority (so it gets cancelled by user-input)\n                formManager.scheduleActionAndAwait(action)\n                channel.send(ValidationDaemonMsg.ValidateNext)\n            } catch (_: CancellationException) {\n                channel.send(ValidationDaemonMsg.RetryValidate)\n            }\n        }\n    }\n\n    private suspend fun handleInitEvent(event: ValueEvent.Init<*>) {\n        FormManager.logger.trace { \"Validation daemon: handling init event (${event.path})\" }\n        if (event.path !in unvalidatedPaths) {\n            addUnvalidatedPath(event.path)\n        }\n    }\n\n    private fun handleDestroyEvent(event: ValueEvent.Destroy<*>) {\n        FormManager.logger.trace { \"Validation daemon: handling destroy event (${event.path})\" }\n        removeUnvalidatedPath(event.path + AbsolutePathFragment.RecursiveWildcard)\n    }\n\n    private suspend fun handleValidationChangeEvent(event: StateEvent.ValidationChange<*>) {\n        FormManager.logger.trace { \"Validation daemon: handling validation change event\" }\n        if (\n            event.status == ValidationStatus.Validated ||\n                event.status == ValidationStatus.ValidatedExceptionally\n        ) {\n            removeUnvalidatedPath(event.path)\n        } else if (\n            event.status == ValidationStatus.Unvalidated && event.path !in unvalidatedPaths\n        ) {\n            addUnvalidatedPath(event.path)\n        }\n    }\n\n    private suspend fun addUnvalidatedPath(path: AbsolutePath, bundlePerSchema: Boolean = true) {\n        val wasEmpty = unvalidatedPaths.isEmpty()\n\n        // When there are already too many values of the path's schema needing to be validated, we\n        // validate all of them at once instead\n        if (bundlePerSchema) {\n            val schemaPath = formManager.schemaInfo(path).single().path\n            if (\n                schemaPath.hasWildcard() &&\n                    unvalidatedPaths.entries(schemaPath).count() > PATH_LIMIT_PER_SCHEMA\n            ) {\n                unvalidatedPaths.remove(schemaPath)\n                unvalidatedPaths[schemaPath] = Unit\n            } else {\n                unvalidatedPaths[path] = Unit\n            }\n        } else {\n            unvalidatedPaths[path] = Unit\n        }\n\n        if (!validating && wasEmpty) {\n            validating = true\n            _status.emit(AutoValidationStatus.ActiveRunning)\n            FormManager.logger.debug {\n                \"Validation daemon status changed to: ${AutoValidationStatus.ActiveRunning}\"\n            }\n            val channel = channel!!\n            formManager.scope.launch { channel.send(ValidationDaemonMsg.ValidateNext) }\n        }\n    }\n\n    private fun removeUnvalidatedPath(path: AbsolutePath) {\n        unvalidatedPaths.remove(path)\n\n        if (validating && validatingPath != null && validatingPath!! in path) {\n            validatingPath = null\n        }\n    }\n}\n","package io.kform.internal\n\nimport io.kform.*\nimport io.kform.collections.PathMultimap\nimport io.kform.collections.mutablePathMultimapOf\nimport io.kform.collections.set\n\n/**\n * Multimap mapping paths of values being depended upon to information about what validations depend\n * on them.\n *\n * Example: if a schema with path `\"/x/y/z\"` has a single validation `v` depending on the path\n * `\"../a\"`, then there will be an entry in this multimap mapping `\"/x/y/a\"` to\n * `ValidationDependencyInfo(\"../z\", v, 0)`.\n */\ninternal typealias ValidationDependencies = PathMultimap<ValidationDependencyInfo>\n\n/**\n * Multimap mapping paths of values being observed to information about what validations are\n * observing them.\n *\n * Example: if a schema with path `\"/x/y/z\"` has a single validation `v` (that validation being\n * stateful) needing to observe a single path `\"../a\"`, then there will be an entry in this multimap\n * mapping `\"/x/y/a\"` to `ObservedValidationDependencyInfo(\"../z\", v, 0, 0, 0)`.\n */\ninternal typealias ObservedValidationDependencies = PathMultimap<ObservedValidationDependencyInfo>\n\n/** Map with information on the list of validations depending on each external context. */\ninternal typealias ExternalContextValidationDependencies =\n    Map<String, List<ExternalContextValidationDependantInfo>>\n\n/** Information about a validation depending on a certain path. */\ninternal data class ValidationDependencyInfo(\n    val path: Path,\n    val validation: Validation<*>,\n    val validationIndex: Int,\n) {\n    override fun toString() = \"$validation@$path\"\n}\n\n/** Information about a stateful validation observing a certain path. */\ninternal data class ObservedValidationDependencyInfo(\n    val path: Path,\n    val validation: StatefulValidation<*, *>,\n    val validationIndex: Int,\n    val statefulValidationIndex: Int,\n    val toObserveIndex: Int,\n) {\n    override fun toString() = \"$validation@$path\"\n}\n\n/** Information about a validation that depends on external context. */\ninternal data class ExternalContextValidationDependantInfo(\n    val path: AbsolutePath,\n    val validation: Validation<*>,\n    val validationIndex: Int,\n) {\n    override fun toString() = \"$validation@$path\"\n}\n\n/**\n * Builds and returns the multimap with information on path dependencies for all validations in\n * [formSchema].\n */\ninternal fun buildValidationDependencies(formSchema: Schema<*>): ValidationDependencies {\n    val pathDependencies = mutablePathMultimapOf<ValidationDependencyInfo>()\n    for ((schema, path) in schemaInfoImpl(formSchema, AbsolutePath.MATCH_ALL)) {\n        for ((validationIndex, validation) in schema.validations.withIndex()) {\n            // Have all descendants depend on [validation] when [dependsOnDescendants] is set, e.g.,\n            // if the validation path is `/a/b`, then this results in `/a/b/*/** -> ..`\n            if (validation.dependsOnDescendants) {\n                pathDependencies[path + Path.DESCENDANTS] =\n                    ValidationDependencyInfo(Path.PARENT, validation, validationIndex)\n            }\n\n            validateComputation(formSchema, path, validation)\n            for (dependencyInfo in validation.dependencies.values) {\n                val resolvedDep = path.resolve(dependencyInfo.path)\n                pathDependencies[resolvedDep] =\n                    ValidationDependencyInfo(\n                        path.relativeTo(resolvedDep.withoutDescendants()),\n                        validation,\n                        validationIndex,\n                    )\n            }\n        }\n    }\n    return pathDependencies\n}\n\n/**\n * Builds and returns the multimap with information on observed path dependencies for all stateful\n * validations in [formSchema].\n */\ninternal fun buildObservedValidationDependencies(\n    formSchema: Schema<*>\n): ObservedValidationDependencies {\n    val observedPathDependencies = mutablePathMultimapOf<ObservedValidationDependencyInfo>()\n    for ((schema, path) in schemaInfoImpl(formSchema, AbsolutePath.MATCH_ALL)) {\n        var statefulValidationIndex = 0\n        for ((validationIndex, validation) in schema.validations.withIndex()) {\n            if (validation is StatefulValidation<*, *>) {\n                // Paths to observe must be contained by one of these paths\n                val toObserveContainers =\n                    listOf(path + AbsolutePathFragment.RecursiveWildcard) +\n                        validation.dependencies.values.map {\n                            path.resolve(it.path) + AbsolutePathFragment.RecursiveWildcard\n                        }\n\n                for ((observedIndex, observer) in validation.observers.withIndex()) {\n                    val resolvedToObserve = path.resolve(observer.toObserve)\n\n                    if (\n                        toObserveContainers.all { resolvedToObserve !in it } ||\n                            !schemaInfoImpl(formSchema, resolvedToObserve).any()\n                    ) {\n                        throw InvalidPathToObserveException(path, validation, observer.toObserve)\n                    }\n\n                    for (resolvedInfo in schemaInfoImpl(formSchema, resolvedToObserve)) {\n                        observedPathDependencies[resolvedInfo.queriedPath] =\n                            ObservedValidationDependencyInfo(\n                                path.relativeTo(resolvedInfo.queriedPath),\n                                validation,\n                                validationIndex,\n                                statefulValidationIndex,\n                                observedIndex,\n                            )\n                    }\n                }\n                ++statefulValidationIndex\n            }\n        }\n    }\n    return observedPathDependencies\n}\n\n/** Builds and returns the map with information on validations depending on external contexts. */\ninternal fun buildExternalContextValidationDependencies(\n    formSchema: Schema<*>\n): ExternalContextValidationDependencies {\n    val externalContextDependencies =\n        hashMapOf<String, MutableList<ExternalContextValidationDependantInfo>>()\n    for ((schema, path) in schemaInfoImpl(formSchema, AbsolutePath.MATCH_ALL)) {\n        for ((validationIndex, validation) in schema.validations.withIndex()) {\n            for (externalContextName in validation.externalContextDependencies) {\n                externalContextDependencies.getOrPut(externalContextName) { mutableListOf() } +=\n                    ExternalContextValidationDependantInfo(path, validation, validationIndex)\n            }\n        }\n    }\n    return externalContextDependencies\n}\n","package io.kform.internal\n\nimport io.kform.*\n\n/** Sets value [toSet] at [fragment] on parent with info [parentInfo]. */\ninternal suspend fun setOnParent(\n    parentInfo: ValueInfo<*>,\n    fragment: AbsolutePathFragment,\n    toSet: Any?,\n    eventsBus: SchemaEventsBus,\n) {\n    val (parentValue, parentSchema, parentPath, parentSchemaPath) = parentInfo\n\n    @Suppress(\"UNCHECKED_CAST\") (parentSchema as ParentSchema<Any?>)\n    // Always support setting all children via a wildcard\n    if (\n        fragment !is AbsolutePathFragment.Wildcard &&\n            !parentSchema.isValidSetFragment(parentValue, fragment)\n    ) {\n        throw ExceptionAtPath(parentPath, \"Cannot set child fragment: '$fragment'.\")\n    }\n    // Disallow resetting a value that doesn't exist\n    if (fragment is AbsolutePathFragment.CollectionEnd && toSet === INITIAL_VALUE) {\n        throw ExceptionAtPath(parentPath, \"Cannot reset child fragment: '$fragment'.\")\n    }\n    // Set all children\n    if (fragment is AbsolutePathFragment.Wildcard) {\n        parentSchema.children(parentPath, parentSchemaPath, parentValue, fragment).collect {\n            (_, childSchema, childPath) ->\n            val valueToSet = if (toSet === INITIAL_VALUE) childSchema.initialValue else toSet\n            parentSchema.set(\n                parentPath,\n                parentValue,\n                childPath.lastFragment!!,\n                valueToSet,\n                eventsBus,\n            )\n        }\n    }\n    // Set single child\n    else {\n        val valueToSet =\n            if (toSet === INITIAL_VALUE)\n                parentSchema\n                    .childrenSchemas(parentSchemaPath, parentPath, fragment)\n                    .single()\n                    .schema\n                    .initialValue\n            else toSet\n        parentSchema.set(parentPath, parentValue, fragment, valueToSet, eventsBus)\n    }\n}\n\n/** Removes values at [fragment] from parent with info [parentInfo]. */\ninternal suspend fun removeFromParent(\n    parentInfo: ValueInfo<*>,\n    fragment: AbsolutePathFragment,\n    eventsBus: SchemaEventsBus,\n) {\n    val (parentValue, parentSchema, parentPath) = parentInfo\n\n    @Suppress(\"UNCHECKED_CAST\") (parentSchema as CollectionSchema<Any?, Any?>)\n    // Always support removing all children via a wildcard\n    if (\n        fragment !is AbsolutePathFragment.Wildcard &&\n            !parentSchema.isValidRemoveFragment(parentValue, fragment)\n    ) {\n        throw ExceptionAtPath(parentPath, \"Cannot remove child fragment: '$fragment'.\")\n    }\n    parentSchema.remove(parentPath, parentValue, fragment, eventsBus)\n}\n","package io.kform.internal.actions\n\nimport io.kform.FormManager\nimport io.kform.internal.Action\nimport kotlinx.coroutines.CompletableDeferred\n\n/** Base action implementation with result, default priority, and utility methods. */\ninternal abstract class FormManagerAction<T>(val formManager: FormManager) : Action<T> {\n    override val result = CompletableDeferred<T>(formManager.supervisorJob)\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\n\n/** Action performed on values and/or their state. */\ninternal abstract class ValueStateAction<T>(formManager: FormManager) :\n    FormManagerAction<T>(formManager) {\n    // Map of descendants displaying issues to update\n    val descendantsDisplayingIssuesToUpdate =\n        mutableMapOf<AbsolutePath, DescendantsDisplayingIssuesToUpdate>()\n\n    final override suspend fun run(): T =\n        runValueState().also {\n            if (descendantsDisplayingIssuesToUpdate.isNotEmpty()) {\n                formManager.scheduleAction(\n                    UpdateDescendantsDisplayingIssuesAction(\n                        formManager,\n                        descendantsDisplayingIssuesToUpdate.values,\n                    )\n                )\n            }\n        }\n\n    /** Run function that should be implemented by the concrete action. */\n    abstract suspend fun runValueState(): T\n\n    /**\n     * List of the parents of [path]. When marking values as dirty/touched or changing the number of\n     * touched descendants with issues, all parent values must also be marked as dirty/touched; this\n     * function helps with locking them.\n     */\n    fun parentPaths(path: AbsolutePath): List<AbsolutePath> =\n        if (path.isRoot) emptyList()\n        else\n            buildList {\n                var currentPath = path.parent()\n                add(currentPath)\n                while (!currentPath.isRoot) {\n                    currentPath = currentPath.parent()\n                    add(currentPath)\n                }\n            }\n\n    fun schemaInfo(path: AbsolutePath) = schemaInfoImpl(formManager.formSchema, path)\n\n    fun valueInfo(path: AbsolutePath) =\n        @Suppress(\"UNCHECKED_CAST\")\n        valueInfoImpl(formManager.formSchema as Schema<Any?>, formManager.formValue, path)\n\n    fun stateInfo(path: AbsolutePath) =\n        @Suppress(\"UNCHECKED_CAST\")\n        stateInfoImpl(formManager.formSchema as Schema<Any?>, formManager.formState!!, path)\n\n    fun valueStateInfo(path: AbsolutePath) =\n        @Suppress(\"UNCHECKED_CAST\")\n        valueStateInfoImpl(\n            formManager.formSchema as Schema<Any?>,\n            formManager.formValue,\n            formManager.formState!!,\n            path,\n        )\n\n    suspend fun dependenciesInfo(\n        path: AbsolutePath,\n        dependencies: Map<String, DependencyInfo>,\n    ): Map<String, ValueInfo<*>?> =\n        @Suppress(\"UNCHECKED_CAST\")\n        computationDependenciesInfo(\n            formManager.formSchema as Schema<Any?>,\n            formManager.formValue,\n            path,\n            dependencies,\n        )\n\n    companion object {\n        fun updateDescendantsDisplayingIssues(\n            descendantsDisplayingIssuesToUpdate:\n                MutableMap<AbsolutePath, DescendantsDisplayingIssuesToUpdate>,\n            path: AbsolutePath,\n            displayingErrors: Int = 0,\n            displayingWarnings: Int = 0,\n        ) {\n            val toUpdate =\n                descendantsDisplayingIssuesToUpdate.getOrPut(path) {\n                    DescendantsDisplayingIssuesToUpdate(path)\n                }\n            toUpdate.displayingErrors += displayingErrors\n            toUpdate.displayingWarnings += displayingWarnings\n        }\n\n        fun updateDescendantsDisplayingIssues(\n            descendantsDisplayingIssuesToUpdate:\n                MutableMap<AbsolutePath, DescendantsDisplayingIssuesToUpdate>,\n            path: AbsolutePath,\n            severity: ValidationIssueSeverity,\n            amount: Int,\n        ) =\n            updateDescendantsDisplayingIssues(\n                descendantsDisplayingIssuesToUpdate,\n                path,\n                if (severity == ValidationIssueSeverity.Error) amount else 0,\n                if (severity == ValidationIssueSeverity.Warning) amount else 0,\n            )\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.FormManager\nimport io.kform.LocatedValidationIssue\nimport io.kform.internal.*\n\n/** Action that adds external issues to the form manager. */\ninternal class AddExternalIssuesAction(\n    formManager: FormManager,\n    private val externalIssues: Iterable<LocatedValidationIssue>,\n) : ValueStateAction<Unit>(formManager) {\n    override fun toString() = \"AddExternalIssues(${externalIssues.toList()})\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessValidationState(ActionAccessType.Write),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n    override val accessedPaths = externalIssues.mapTo(HashSet()) { it.path }\n\n    override suspend fun runValueState() {\n        for ((path, issues) in externalIssues.groupBy { it.path }) {\n            val (state, schema) = stateInfo(path).single()\n            state as StateImpl\n\n            val oldLocalDisplayStatus = state.localDisplayStatus()\n            val oldDisplayStatus = state.displayStatus()\n\n            // Add external issues to state\n            state.addExternalIssues(issues)\n            formManager.externalIssuesDependencies.addDependenciesOfExternalIssues(issues)\n\n            ValidateAction.updateValidationState(\n                formManager,\n                schema,\n                path,\n                state,\n                oldLocalDisplayStatus,\n                oldDisplayStatus,\n                descendantsDisplayingIssuesToUpdate,\n            )\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\nimport io.kform.schemas.ComputedSchema\nimport kotlinx.coroutines.CancellationException\nimport kotlinx.coroutines.CompletableDeferred\n\n/** Action that computes and sets the computed values of all values at paths [toCompute]. */\ninternal class ComputeValuesAction(\n    formManager: FormManager,\n    val toCompute: Iterable<AbsolutePath>,\n) : WriteValueStateAction<Unit>(formManager) {\n    override fun toString() = \"ComputeValues(${toCompute.joinToString()})\"\n\n    override val accesses =\n        mutableListOf(\n            AccessValueStateTree(ActionAccessType.Write),\n            AccessStatefulComputedValueDeferredState(ActionAccessType.Read),\n        )\n\n    override val accessedPaths: Set<AbsolutePath>\n\n    init {\n        // Iterate over all computed values that need to run and determine the accessed paths and\n        // whether access to external context is required\n        var requiresAccessToExternalContext = false\n        val paths = mutableSetOf<AbsolutePath>()\n\n        for (path in toCompute) {\n            for ((schema, _, queriedPath) in schemaInfo(path)) {\n                if (schema !is ComputedSchema) {\n                    throw ExceptionAtPath(path, \"Schema is not computed.\")\n                }\n\n                // Parent required for setting the value\n                paths += queriedPath.parent()\n                paths += queriedPath + AbsolutePathFragment.RecursiveWildcard\n                for (dependency in schema.computedValue.dependencies.values) {\n                    paths +=\n                        queriedPath.resolve(dependency.path) +\n                            AbsolutePathFragment.RecursiveWildcard\n                }\n                if (schema.computedValue.externalContextDependencies.isNotEmpty()) {\n                    requiresAccessToExternalContext = true\n                }\n            }\n        }\n\n        if (requiresAccessToExternalContext) {\n            accesses += AccessExternalContext(ActionAccessType.Read)\n        }\n        accessedPaths = paths\n    }\n\n    override suspend fun runWriteValueState() =\n        toCompute.forEach {\n            valueStateInfo(it).collect { (_, state, schema, path, schemaPath) ->\n                compute(state as StateImpl?, schema as ComputedSchema<*>, path, schemaPath)\n            }\n        }\n\n    /** Computes all computed values matching the action's path. */\n    private suspend fun compute(\n        state: StateImpl?,\n        schema: ComputedSchema<*>,\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n    ) {\n        state ?: return\n\n        try {\n            val result = runComputedValue(schema, path, schemaPath, state, schema.computedValue)\n            setOnParent(path.parent(), path.lastFragment, result)\n        } catch (_: Throwable) {}\n    }\n\n    /** Computes a single computed value. This function may throw a `CancellationException`. */\n    private suspend fun runComputedValue(\n        schema: ComputedSchema<*>,\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n        state: StateImpl,\n        computedValue: ComputedValue<*>,\n    ): Any? {\n        val computedValueContext =\n            ComputedValueContext(\n                schema,\n                path,\n                schemaPath,\n                dependenciesInfo(path, computedValue.dependencies),\n                computedValue.externalContextDependencies.associateWith {\n                    formManager.externalContexts[it]\n                },\n            )\n\n        var result: Any?\n        try {\n            if (computedValue is StatefulComputedValue<*, *>) {\n                @Suppress(\"UNCHECKED_CAST\")\n                computedValue as StatefulComputedValue<Any?, Any?>\n\n                var deferredState = state.statefulComputedValueDeferredState\n                // Initialise computed value state if it has not yet been initialised; this may\n                // fail due to an error in the `initState` function or due to cancellation\n                if (deferredState == null) {\n                    deferredState =\n                        initStatefulComputedValueState(\n                            path,\n                            state,\n                            computedValue,\n                            computedValueContext,\n                        )\n                }\n                // Wait for the computed value state in case ongoing state updates exist; this may\n                // fail due to an error during the state update, in which case we remove the\n                // deferred state so that the state is reinitialised the next time this computed\n                // value runs\n                val computedValueState: Any?\n                try {\n                    computedValueState = deferredState.await()\n                    FormManager.logger.trace {\n                        \"At '$path': Obtained computed value '$computedValue' state: $computedValueState\"\n                    }\n                } catch (ex: Throwable) {\n                    FormManager.logger.trace {\n                        \"At '$path': Failed to obtain computed value '$computedValue' state ($ex)\"\n                    }\n                    // [ex] cannot be a [CancellationException] because state updates should\n                    // never be cancellable\n                    state.statefulComputedValueDeferredState = null\n                    throw ex\n                }\n\n                FormManager.logger.trace { \"At '$path': Computing value '$computedValue'\" }\n                result =\n                    computedValue.run { computedValueContext.computeFromState(computedValueState) }\n            } else {\n                FormManager.logger.trace { \"At '$path': Computing value '$computedValue'\" }\n                result = computedValue.run { computedValueContext.compute() }\n            }\n        } catch (ex: Throwable) {\n            // The initialisation of the state of a stateful validation may be cancelled\n            if (ex !is CancellationException) {\n                FormManager.logger.error(ex) {\n                    \"At '$path': Failed to compute value '$computedValue'\"\n                }\n            }\n            throw ex\n        }\n\n        return result\n    }\n\n    /** Initialises the state of a computed value. */\n    private suspend fun initStatefulComputedValueState(\n        path: AbsolutePath,\n        state: StateImpl,\n        computedValue: StatefulComputedValue<Any?, Any?>,\n        computedValueContext: ComputedValueContext,\n    ): CompletableDeferred<Any?> {\n        FormManager.logger.trace {\n            \"At '$path': Initializing computed value '$computedValue' state\"\n        }\n        val computedValueState = computedValue.run { computedValueContext.initState() }\n        val deferredState = CompletableDeferred(computedValueState)\n        state.statefulComputedValueDeferredState = deferredState\n        FormManager.logger.debug {\n            \"At '$path': Initialized computed value '$computedValue' state: $computedValueState\"\n        }\n        return deferredState\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\nimport io.kform.schemas.ComputedSchema\nimport io.kform.validations.MatchesStatefulComputedValue\nimport kotlinx.coroutines.CoroutineName\nimport kotlinx.coroutines.launch\n\n/** Action writing values and their state. */\ninternal abstract class WriteValueStateAction<T>(formManager: FormManager) :\n    ValueStateAction<T>(formManager) {\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Write),\n            AccessValidationState(ActionAccessType.Write),\n            AccessStatefulValidationDeferredState(ActionAccessType.Read),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n\n    // Keep track of validations to invalidate, stateful validations to update, and external issues\n    // to remove\n    val validationsToInvalidate = mutableSetOf<ValidationToInvalidate>()\n    val statefulValidationsToUpdate = mutableSetOf<StatefulValidationToUpdate>()\n    val externalIssuesToRemove = mutableListOf<LocatedValidationIssue>()\n    val computedValuesToUpdate = mutableSetOf<AbsolutePath>()\n    val statefulComputedValuesToUpdate = mutableSetOf<StatefulComputedValueToUpdate>()\n\n    /**\n     * Runs [runWriteValueState] and finishes up by scheduling actions to invalidate validations,\n     * update stateful validations, and remove external issues.\n     */\n    final override suspend fun runValueState(): T =\n        runWriteValueState().also {\n            if (statefulValidationsToUpdate.isNotEmpty()) {\n                formManager.scheduleAction(\n                    UpdateStatefulValidationsStateAction(formManager, statefulValidationsToUpdate)\n                )\n            }\n            if (validationsToInvalidate.isNotEmpty()) {\n                formManager.scheduleAction(\n                    InvalidateValidationsAction(formManager, validationsToInvalidate)\n                )\n            }\n            if (statefulComputedValuesToUpdate.isNotEmpty()) {\n                formManager.scheduleAction(\n                    UpdateStatefulComputedValuesStateAction(\n                        formManager,\n                        statefulComputedValuesToUpdate,\n                    )\n                )\n            }\n            if (computedValuesToUpdate.isNotEmpty()) {\n                formManager.scheduleAction(ComputeValuesAction(formManager, computedValuesToUpdate))\n            }\n            if (externalIssuesToRemove.isNotEmpty()) {\n                formManager.scheduleAction(\n                    RemoveDependingExternalIssuesAction(formManager, externalIssuesToRemove)\n                )\n            }\n        }\n\n    /** Run function that should be implemented by the concrete action. */\n    abstract suspend fun runWriteValueState(): T\n\n    /**\n     * Runs [fn] with an events bus to be passed to schemas, where each event emitted to it is\n     * appropriately handled. This is used by [SetAction] and [RemoveAction] to handle events\n     * emitted by schemas. Returns the result of [fn] after all events have been handled.\n     */\n    protected suspend fun <TResult> withSchemaEventsBus(\n        fn: suspend (eventsChannel: SchemaEventsBus) -> TResult\n    ): TResult = fn(SchemaEventsCallbackBus { event -> handleSchemaEvent(event) })\n\n    /** Handles an event emitted by a schema. */\n    private suspend fun handleSchemaEvent(event: ValueEvent<*>) {\n        FormManager.logger.trace { \"Handling schema event: $event\" }\n        @Suppress(\"UNCHECKED_CAST\")\n        when (event) {\n            is ValueEvent.Init<*> -> handleSchemaInitEvent(event as ValueEvent.Init<Any?>)\n            is ValueEvent.Change<*> -> handleSchemaChangeEvent(event as ValueEvent.Change<Any?>)\n            is ValueEvent.Destroy<*> -> handleSchemaDestroyAction(event as ValueEvent.Destroy<Any?>)\n            is ValueEvent.Add<*, *> -> handleSchemaAddAction(event as ValueEvent.Add<Any?, Any?>)\n            is ValueEvent.Remove<*, *> ->\n                handleSchemaRemoveAction(event as ValueEvent.Remove<Any?, Any?>)\n        }\n    }\n\n    protected suspend fun setOnParent(\n        parentPath: AbsolutePath?,\n        fragment: AbsolutePathFragment?,\n        toSet: Any?,\n    ) {\n        // Set root value\n        if (parentPath == null) {\n            @Suppress(\"UNCHECKED_CAST\")\n            return withSchemaEventsBus { eventsBus ->\n                val formSchema = formManager.formSchema as Schema<Any?>\n                val valueToSet = if (toSet === INITIAL_VALUE) formSchema.initialValue else toSet\n                if (formManager.formValue === UNINITIALIZED) {\n                    formSchema.init(AbsolutePath.ROOT, valueToSet, eventsBus) {\n                        formManager.formValue = it\n                    }\n                } else {\n                    formSchema.change(\n                        AbsolutePath.ROOT,\n                        formManager.formValue,\n                        valueToSet,\n                        eventsBus,\n                    ) {\n                        formManager.formValue = it\n                    }\n                }\n            }\n        }\n\n        fragment ?: error(\"Fragment cannot be null when [parentPath] is not null.\")\n        valueInfo(parentPath).collect { parentInfo ->\n            withSchemaEventsBus { eventsBus -> setOnParent(parentInfo, fragment, toSet, eventsBus) }\n        }\n    }\n\n    /**\n     * Returns the state of the value with the provided [path] and [schema], creating it and its\n     * parent states when necessary.\n     */\n    private fun initState(path: AbsolutePath, schema: Schema<*>): StateImpl {\n        var parentState: ParentState? = null\n        var fragment: AbsolutePathFragment.Id? = null\n        var state =\n            if (path == AbsolutePath.ROOT) formManager.formState\n            else {\n                parentState =\n                    path.parent().let {\n                        initState(it, schemaInfo(it).single().schema) as ParentState\n                    }\n                fragment = path.lastFragment as AbsolutePathFragment.Id\n                parentState.childrenStates(path, fragment).singleOrNull()?.state\n            }\n                as StateImpl?\n        if (state == null) {\n            val nValidations = schema.validations.size\n            val nStatefulValidations =\n                schema.validations.count { validation ->\n                    validation is StatefulValidation<*, *> ||\n                        validation is MatchesStatefulComputedValue<*, *>\n                }\n            state =\n                when (schema) {\n                    is CollectionSchema<*, *> ->\n                        CollectionStateImpl(\n                            schema.childrenStatesContainer(),\n                            nValidations,\n                            nStatefulValidations,\n                        )\n                    is ParentSchema<*> ->\n                        ParentStateImpl(\n                            schema.childrenStatesContainer(),\n                            nValidations,\n                            nStatefulValidations,\n                        )\n                    else -> StateImpl(nValidations, nStatefulValidations)\n                }\n            if (path == AbsolutePath.ROOT) {\n                formManager.formState = state\n            } else {\n                parentState!!.setState(fragment!!, state)\n            }\n        }\n        return state\n    }\n\n    /**\n     * Destroys the state of the value with the provided [path] and all children states. This\n     * function **can** be called with the path of a value whose state has already been destroyed.\n     */\n    private fun destroyState(path: AbsolutePath) {\n        // Keep track of how many values were destroyed that were displaying local errors/warnings\n        var destroyedDisplayingLocalError = 0\n        var destroyedDisplayingLocalWarning = 0\n\n        for (info in stateInfo(path + AbsolutePathFragment.RecursiveWildcard)) {\n            val state = info.state as StateImpl? ?: continue\n\n            when (state.localDisplayStatus()) {\n                DisplayStatus.Error -> ++destroyedDisplayingLocalError\n                DisplayStatus.Warning -> ++destroyedDisplayingLocalWarning\n                else -> {}\n            }\n\n            // Destroy state (cancels deferred validation states)\n            state.destroy()\n\n            // Destroy stateful validation states (if the validation state was in the process of\n            // being updated, then the above `state.destroy()` will cause the validation state to be\n            // destroyed by the update state action, otherwise we destroy it here)\n            var statefulValidationIndex = 0\n            for (validation in info.schema.validations) {\n                if (validation is StatefulValidation<*, *>) {\n                    val deferredState =\n                        state.getStatefulValidationDeferredState(statefulValidationIndex++)\n                            ?: continue\n                    @Suppress(\"UNCHECKED_CAST\") (validation as StatefulValidation<Any?, Any?>)\n                    formManager.scope.launch(CoroutineName(\"Destroy stateful validation state\")) {\n                        try {\n                            // This can throw due to the above `cancel` or due to an error while\n                            // updating the state, in which case we don't need to do anything as\n                            // explained above; otherwise, we destroy the validation state\n                            val validationState = deferredState.await()\n\n                            FormManager.logger.trace {\n                                \"At '$path': Destroying validation '$validation' state: \" +\n                                    \"$validationState\"\n                            }\n                            validation.destroyState(validationState)\n                        } catch (_: Throwable) {}\n                    }\n                }\n            }\n\n            // Destroy stateful computed value state, similarly to above\n            if (\n                info.schema is ComputedSchema &&\n                    info.schema.computedValue is StatefulComputedValue<*, *>\n            ) {\n                @Suppress(\"UNCHECKED_CAST\")\n                val computedValue = info.schema.computedValue as StatefulComputedValue<Any?, Any?>\n                val deferredState = state.statefulComputedValueDeferredState ?: continue\n                formManager.scope.launch(CoroutineName(\"Destroy stateful computed value state\")) {\n                    try {\n                        // This can throw due to the above `cancel` or due to an error while\n                        // updating the state, in which case we don't need to do anything as\n                        // explained above; otherwise, we destroy the computed value state\n                        val computedValueState = deferredState.await()\n\n                        FormManager.logger.trace {\n                            \"At '$path': Destroying computed value '${computedValue}' state: \" +\n                                \"$computedValueState\"\n                        }\n                        computedValue.destroyState(computedValueState)\n                    } catch (_: Throwable) {}\n                }\n            }\n        }\n\n        // Update \"descendants displaying issues\" of ancestors\n        if (\n            (destroyedDisplayingLocalError != 0 || destroyedDisplayingLocalWarning != 0) &&\n                path != AbsolutePath.ROOT\n        ) {\n            updateDescendantsDisplayingIssues(\n                descendantsDisplayingIssuesToUpdate,\n                path.parent(),\n                -destroyedDisplayingLocalError,\n                -destroyedDisplayingLocalWarning,\n            )\n        }\n    }\n\n    /** Removes all cached/external issues at [path]. */\n    private suspend fun invalidateLocalValidations(path: AbsolutePath) {\n        val (state, schema) = stateInfo(path).single()\n        state as StateImpl\n\n        val wasValidated =\n            state.validationStatus == ValidationStatus.Validated ||\n                state.validationStatus == ValidationStatus.ValidatedExceptionally\n        val oldLocalDisplayStatus = state.localDisplayStatus()\n        val oldDisplayStatus = state.displayStatus()\n\n        state.removeCachedIssues()\n        val removedExternalIssues = state.removeExternalIssues()\n        if (removedExternalIssues.isNotEmpty()) {\n            formManager.externalIssuesDependencies.removeDependenciesOfExternalIssues(\n                removedExternalIssues\n            )\n        }\n\n        // Update validation state as needed\n        if (wasValidated) {\n            state.validationStatus = ValidationStatus.Unvalidated\n        }\n        ValidateAction.updateValidationState(\n            formManager,\n            schema,\n            path,\n            state,\n            oldLocalDisplayStatus,\n            oldDisplayStatus,\n            descendantsDisplayingIssuesToUpdate,\n            emitValidationChange = wasValidated || removedExternalIssues.isNotEmpty(),\n        )\n    }\n\n    /** Updates the set of validations to invalidate with the validations that depend on [path]. */\n    private fun updateValidationsToInvalidate(path: AbsolutePath) {\n        for ((dependedPath, dependencyInfo) in formManager.validationDependencies.entries(path)) {\n            // Depended path, with wildcards replaced by the ids of the provided [path]\n            val mappedDependedPath =\n                AbsolutePath(\n                    dependedPath.withoutDescendants().fragments.mapIndexed { index, fragment ->\n                        if (fragment is AbsolutePathFragment.Wildcard) path[index] else fragment\n                    }\n                )\n            validationsToInvalidate +=\n                ValidationToInvalidate(\n                    mappedDependedPath.resolve(dependencyInfo.path),\n                    dependencyInfo.validation,\n                    dependencyInfo.validationIndex,\n                )\n        }\n    }\n\n    /**\n     * Updates the set of computed values to update with the computed values that depend on the\n     * [event]'s path.\n     */\n    private fun updateComputedValuesToCompute(event: ValueEvent<*>) {\n        if (event.schema is ComputedSchema) {\n            computedValuesToUpdate += event.path\n        }\n        for ((dependedPath, dependencyInfo) in\n            formManager.computedValueDependencies.entries(event.path)) {\n            // Depended path, with wildcards replaced by the ids of the provided [path]\n            val mappedDependedPath =\n                AbsolutePath(\n                    dependedPath.withoutDescendants().fragments.mapIndexed { index, fragment ->\n                        if (fragment is AbsolutePathFragment.Wildcard) event.path[index]\n                        else fragment\n                    }\n                )\n            computedValuesToUpdate += mappedDependedPath.resolve(dependencyInfo.path)\n        }\n    }\n\n    /**\n     * Updates the list of external issues to remove with the external issues depending on (but not\n     * set on) [path].\n     */\n    private suspend fun updateExternalIssuesToRemove(path: AbsolutePath) {\n        externalIssuesToRemove +=\n            formManager.externalIssuesDependencies.getAndRemoveExternalIssuesDependentOnPath(path)\n    }\n\n    /**\n     * Updates the set of stateful validations that need updating with the stateful validations\n     * observing the given [path].\n     */\n    private fun updateStatefulValidationsToUpdate(event: ValueEvent<*>) {\n        for ((\n            observingPath, validation, validationIndex, statefulValidationIndex, toObserveIndex) in\n            formManager.validationObservedDependencies[event.path]) {\n            val resolvedObservingPath = event.path.resolve(observingPath)\n\n            // Mustn't update state with `init`/`destroy` events of the value being validated\n            if (\n                (event.path != resolvedObservingPath ||\n                    (event !is ValueEvent.Init && event !is ValueEvent.Destroy))\n            ) {\n                @Suppress(\"UNCHECKED_CAST\")\n                statefulValidationsToUpdate +=\n                    StatefulValidationToUpdate(\n                        resolvedObservingPath,\n                        validation as StatefulValidation<Any?, Any?>,\n                        validationIndex,\n                        statefulValidationIndex,\n                        toObserveIndex,\n                        event as ValueEvent<Any?>,\n                    )\n            }\n        }\n    }\n\n    /**\n     * Updates the set of stateful computed values that need updating with the stateful computed\n     * values observing the given [path].\n     */\n    private fun updateStatefulComputedValuesToUpdate(event: ValueEvent<*>) {\n        for ((observingPath, computedValue, toObserveIndex) in\n            formManager.computedValueObservedDependencies[event.path]) {\n            val resolvedObservingPath = event.path.resolve(observingPath)\n\n            // Mustn't update state with `init`/`destroy` events of the value being computed\n            if (\n                (event.path != resolvedObservingPath ||\n                    (event !is ValueEvent.Init && event !is ValueEvent.Destroy))\n            ) {\n                @Suppress(\"UNCHECKED_CAST\")\n                statefulComputedValuesToUpdate +=\n                    StatefulComputedValueToUpdate(\n                        resolvedObservingPath,\n                        computedValue as StatefulComputedValue<Any?, Any?>,\n                        toObserveIndex,\n                        event as ValueEvent<Any?>,\n                    )\n            }\n        }\n    }\n\n    /** Updates all dependents related to the provided [event]. */\n    private suspend fun updateDependents(event: ValueEvent<Any?>) {\n        updateValidationsToInvalidate(event.path)\n        updateStatefulValidationsToUpdate(event)\n        updateExternalIssuesToRemove(event.path)\n        updateComputedValuesToCompute(event)\n        updateStatefulComputedValuesToUpdate(event)\n    }\n\n    /** Handles an \"init [event]\" emitted by a schema. */\n    private suspend fun handleSchemaInitEvent(event: ValueEvent.Init<Any?>) {\n        // Initialise state and possibly parent states\n        initState(event.path, event.schema)\n\n        updateDependents(event)\n        formManager.eventsBus.emit(event)\n    }\n\n    /** Handles a \"change [event]\" emitted by a schema. */\n    private suspend fun handleSchemaChangeEvent(event: ValueEvent.Change<Any?>) {\n        invalidateLocalValidations(event.path)\n        updateDependents(event)\n        formManager.eventsBus.emit(event)\n    }\n\n    /** Handles a \"destroy [event]\" emitted by a schema. */\n    private suspend fun handleSchemaDestroyAction(event: ValueEvent.Destroy<Any?>) {\n        // Destroy state of destroyed value (state may already have been destroyed by a remove)\n        destroyState(event.path)\n\n        // Set state to `null` in parent state when the child state exists\n        val parentState = stateInfo(event.path.parent()).singleOrNull()?.state as ParentState?\n        val id = event.path.lastFragment as AbsolutePathFragment.Id\n        if (parentState != null && (parentState !is CollectionState || parentState.hasState(id))) {\n            parentState.setState(id, null)\n        }\n\n        updateDependents(event)\n        formManager.eventsBus.emit(event)\n    }\n\n    /** Handles an \"add [event]\" emitted by a schema. */\n    private suspend fun handleSchemaAddAction(event: ValueEvent.Add<Any?, Any?>) {\n        invalidateLocalValidations(event.path)\n        updateDependents(event)\n        formManager.eventsBus.emit(event)\n    }\n\n    /** Handles a \"remove [event]\" emitted by a schema. */\n    private suspend fun handleSchemaRemoveAction(event: ValueEvent.Remove<Any?, Any?>) {\n        // Destroy state of removed value and remove its state from parent state\n        val parentState = stateInfo(event.path).single().state as CollectionState\n        destroyState(event.path + event.id)\n        parentState.removeState(event.id)\n\n        invalidateLocalValidations(event.path)\n        updateDependents(event)\n        formManager.eventsBus.emit(event)\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.AbsolutePathFragment\nimport io.kform.FormManager\nimport io.kform.internal.AccessValueStateTree\nimport io.kform.internal.ActionAccess\nimport io.kform.internal.ActionAccessType\n\n/** Action reading values and/or their state. */\ninternal abstract class ReadValueStateAction<T>(formManager: FormManager, val path: AbsolutePath) :\n    ValueStateAction<T>(formManager) {\n    override val accesses: List<ActionAccess> =\n        mutableListOf(AccessValueStateTree(ActionAccessType.Read))\n\n    override val accessedPaths: List<AbsolutePath> =\n        mutableListOf(path + AbsolutePathFragment.RecursiveWildcard)\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.ValueHandler\nimport kotlinx.coroutines.flow.single\n\n/**\n * Action that calls [valueHandler] with the single value matching [path] and holds a lock over said\n * value until [valueHandler] finishes.\n */\ninternal class GetAction<T, TResult>(\n    formManager: FormManager,\n    path: AbsolutePath,\n    val valueHandler: ValueHandler<T, TResult>,\n) : ReadValueStateAction<TResult>(formManager, path) {\n    override fun toString() = \"Get($path)\"\n\n    @Suppress(\"UNCHECKED_CAST\")\n    override suspend fun runValueState() = valueHandler(valueInfo(path).single().value as T)\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.ValueInfo\nimport kotlinx.coroutines.flow.single\n\n/** Action that returns a clone of the single value matching [path]. */\ninternal class GetCloneAction<T>(formManager: FormManager, path: AbsolutePath) :\n    ReadValueStateAction<T>(formManager, path) {\n    override fun toString() = \"GetClone($path)\"\n\n    override suspend fun runValueState(): T {\n        @Suppress(\"UNCHECKED_CAST\") val info = valueInfo(path).single() as ValueInfo<T>\n        return info.schema.clone(info.value)\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.ExternalContextHandler\nimport io.kform.FormManager\nimport io.kform.internal.AccessExternalContext\nimport io.kform.internal.ActionAccessType\n\n/**\n * Action that returns the external context with name [externalContextName] available to\n * validations.\n */\ninternal class GetExternalContextAction<TContext, T>(\n    formManager: FormManager,\n    private val externalContextName: String,\n    private val externalContextHandler: ExternalContextHandler<TContext, T>,\n) : FormManagerAction<T>(formManager) {\n    override fun toString() = \"GetExternalContext($externalContextName)\"\n\n    override val accesses = listOf(AccessExternalContext(ActionAccessType.Read))\n    override val accessedPaths: List<AbsolutePath> = emptyList()\n\n    override suspend fun run(): T =\n        @Suppress(\"UNCHECKED_CAST\")\n        externalContextHandler(formManager.externalContexts[externalContextName] as TContext)\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport kotlinx.coroutines.flow.firstOrNull\n\n/** Action that returns whether a value exists matching [path]. */\ninternal class HasAction(formManager: FormManager, path: AbsolutePath) :\n    ReadValueStateAction<Boolean>(formManager, path) {\n    override fun toString() = \"Has($path)\"\n\n    override suspend fun runValueState() = valueInfo(path).firstOrNull() != null\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\nimport kotlinx.coroutines.flow.map\n\n/**\n * Action that calls [infoHandler] with all info of values at [path] and holds a lock over said info\n * until [infoHandler] finishes.\n */\ninternal class InfoAction<T>(\n    formManager: FormManager,\n    path: AbsolutePath,\n    val infoHandler: InfoHandler<T>,\n) : ReadValueStateAction<T>(formManager, path) {\n    override fun toString() = \"Info($path)\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessIsDirty(ActionAccessType.Read),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessValidationState(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n\n    override suspend fun runValueState() =\n        infoHandler(\n            valueStateInfo(path).map { info ->\n                val state = info.state as StateImpl\n\n                @Suppress(\"UNCHECKED_CAST\")\n                Info(\n                    info.value,\n                    info.schema as Schema<Any?>,\n                    info.path,\n                    info.schemaPath,\n                    state.isDirty,\n                    state.isTouched,\n                    state.getAllVisibleIssues(),\n                    state.validationStatus,\n                    state.displayStatus(),\n                )\n            }\n        )\n}\n",null,"package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.Schema\nimport io.kform.Validation\nimport io.kform.internal.*\n\n/** Information about a validation to be invalidated. */\ninternal class ValidationToInvalidate(\n    val path: AbsolutePath,\n    val validation: Validation<*>,\n    val validationIndex: Int,\n) {\n    override fun equals(other: Any?) =\n        when {\n            this === other -> true\n            other !is ValidationToInvalidate -> false\n            else -> path == other.path && validationIndex == other.validationIndex\n        }\n\n    override fun hashCode(): Int {\n        var result = path.hashCode()\n        result = 31 * result + validationIndex\n        return result\n    }\n}\n\n/**\n * Action that invalidates all provided validations by removing their cached issues and marking the\n * values as unvalidated when necessary.\n */\ninternal class InvalidateValidationsAction(\n    formManager: FormManager,\n    private val toInvalidate: Set<ValidationToInvalidate>,\n) : ValueStateAction<Unit>(formManager) {\n    override fun toString(): String =\n        \"InvalidateValidations(${toInvalidate.joinToString { \"${it.validation}@${it.path}\" }})\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessValidationState(ActionAccessType.Write),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n    override val accessedPaths = toInvalidate.map { it.path }.toHashSet()\n\n    override fun overridesConflictingAction(action: Action<*>): Boolean =\n        action is InvalidateValidationsAction && toInvalidate.containsAll(action.toInvalidate)\n\n    override suspend fun runValueState() =\n        toInvalidate.forEach { validationInfo ->\n            stateInfo(validationInfo.path).forEach { info ->\n                invalidateValidation(\n                    info.path,\n                    info.schema,\n                    info.state as StateImpl?,\n                    validationInfo.validationIndex,\n                )\n            }\n        }\n\n    private suspend fun invalidateValidation(\n        path: AbsolutePath,\n        schema: Schema<*>,\n        state: StateImpl?,\n        validationIndex: Int,\n    ) {\n        state ?: return\n        RemoveCachedIssuesAction.removeCachedIssues(\n            formManager,\n            path,\n            schema,\n            state,\n            validationIndex,\n        )\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.AbsolutePathFragment\nimport io.kform.FormManager\nimport io.kform.internal.AccessIsDirty\nimport io.kform.internal.AccessValueStateTree\nimport io.kform.internal.ActionAccessType\nimport io.kform.internal.StateImpl\n\n/** Action that returns whether at least one value matching [path] is dirty. */\ninternal class IsDirtyAction(formManager: FormManager, private val path: AbsolutePath) :\n    ValueStateAction<Boolean>(formManager) {\n    override fun toString() = \"IsDirty($path)\"\n\n    override val accesses =\n        listOf(AccessValueStateTree(ActionAccessType.Read), AccessIsDirty(ActionAccessType.Read))\n    override val accessedPaths = listOf(path + AbsolutePathFragment.RecursiveWildcard)\n\n    override suspend fun runValueState(): Boolean =\n        stateInfo(path).any { info -> (info.state as StateImpl).isDirty }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.AbsolutePathFragment\nimport io.kform.FormManager\nimport io.kform.internal.AccessIsTouched\nimport io.kform.internal.AccessValueStateTree\nimport io.kform.internal.ActionAccessType\nimport io.kform.internal.StateImpl\n\n/** Action that returns whether at least one value matching [path] has been touched. */\ninternal class IsTouchedAction(formManager: FormManager, private val path: AbsolutePath) :\n    ValueStateAction<Boolean>(formManager) {\n    override fun toString() = \"IsTouched($path)\"\n\n    override val accesses =\n        listOf(AccessValueStateTree(ActionAccessType.Read), AccessIsTouched(ActionAccessType.Read))\n    override val accessedPaths = listOf(path + AbsolutePathFragment.RecursiveWildcard)\n\n    override suspend fun runValueState(): Boolean =\n        stateInfo(path).any { info -> (info.state as StateImpl).isTouched }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.Action\nimport io.kform.internal.removeFromParent\n\n/**\n * Action that removes the values matching [fragment] from the collections that match [parentPath].\n */\ninternal class RemoveAction(\n    formManager: FormManager,\n    val parentPath: AbsolutePath,\n    parentSchema: CollectionSchema<Any?, Any?>,\n    val fragment: AbsolutePathFragment,\n) : WriteValueStateAction<Unit>(formManager) {\n    override fun toString() = \"Remove($path)\"\n\n    override val accessedPaths =\n        listOf(\n            (if (parentSchema.supportsConcurrentRemoves) path else parentPath) +\n                AbsolutePathFragment.RecursiveWildcard\n        )\n\n    val path\n        get() = parentPath + fragment\n\n    override fun overridesConflictingAction(action: Action<*>): Boolean =\n        (action is SetAction &&\n            (path + AbsolutePathFragment.RecursiveWildcard).contains(action.path)) ||\n            (action is RemoveAction &&\n                (path + AbsolutePathFragment.RecursiveWildcard).contains(action.parentPath))\n\n    override suspend fun runWriteValueState() {\n        valueInfo(parentPath).collect { parentInfo ->\n            withSchemaEventsBus { eventsBus -> removeFromParent(parentInfo, fragment, eventsBus) }\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\n\n/**\n * Action that removes the cached issues of the validation of the value at [path] with index\n * [validationIndex] given the [state] of the value.\n */\ninternal class RemoveCachedIssuesAction(\n    formManager: FormManager,\n    private val path: AbsolutePath,\n    private val schema: Schema<*>,\n    private val state: StateImpl,\n    private val validation: Validation<*>,\n    private val validationIndex: Int,\n) : FormManagerAction<Unit>(formManager) {\n    override fun toString(): String = \"RemoveCachedIssues($validation@$path)\"\n\n    override val accesses =\n        listOf(\n            AccessValidationState(ActionAccessType.Write),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n    override val accessedPaths = listOf(path)\n\n    override suspend fun run() =\n        removeCachedIssues(formManager, path, schema, state, validationIndex)\n\n    companion object {\n        /**\n         * Function that removes the cached issues of validation with index [validationIndex] (or of\n         * all validations when [validationIndex] is `null`) at [path].\n         *\n         * When appropriate, emits events about a change of validation/display status and emits an\n         * action to update the number of descendants displaying issues on the parent value.\n         */\n        suspend fun removeCachedIssues(\n            formManager: FormManager,\n            path: AbsolutePath,\n            schema: Schema<*>,\n            state: StateImpl,\n            validationIndex: Int? = null,\n        ) {\n            val wasValidated =\n                state.validationStatus == ValidationStatus.Validated ||\n                    state.validationStatus == ValidationStatus.ValidatedExceptionally\n            val oldLocalDisplayStatus = state.localDisplayStatus()\n            val oldDisplayStatus = state.displayStatus()\n\n            state.removeCachedIssues(validationIndex)\n\n            // Update validation state as needed\n            if (wasValidated) {\n                state.validationStatus = ValidationStatus.Unvalidated\n            }\n\n            val descendantsDisplayingIssuesToUpdate =\n                mutableMapOf<AbsolutePath, DescendantsDisplayingIssuesToUpdate>()\n            ValidateAction.updateValidationState(\n                formManager,\n                schema,\n                path,\n                state,\n                oldLocalDisplayStatus,\n                oldDisplayStatus,\n                descendantsDisplayingIssuesToUpdate,\n                emitValidationChange = wasValidated,\n            )\n\n            if (descendantsDisplayingIssuesToUpdate.isNotEmpty()) {\n                formManager.scheduleAction(\n                    UpdateDescendantsDisplayingIssuesAction(\n                        formManager,\n                        descendantsDisplayingIssuesToUpdate.values,\n                    )\n                )\n            }\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.LocatedValidationIssue\nimport io.kform.Schema\nimport io.kform.internal.*\n\n/** Action that removes all provided external issues from the form manager. */\ninternal class RemoveDependingExternalIssuesAction(\n    formManager: FormManager,\n    private val externalIssues: Iterable<LocatedValidationIssue>,\n) : ValueStateAction<Unit>(formManager) {\n    override fun toString() = \"RemoveDependingExternalIssuesAction(${externalIssues})\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessValidationState(ActionAccessType.Write),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n    override val accessedPaths = externalIssues.mapTo(HashSet()) { it.path }\n\n    override suspend fun runValueState() =\n        externalIssues\n            .groupBy { it.path }\n            .forEach { (path, issues) ->\n                stateInfo(path).forEach { info ->\n                    removeDependingExternalIssues(\n                        info.state as StateImpl?,\n                        info.schema,\n                        info.path,\n                        issues,\n                    )\n                }\n            }\n\n    private suspend fun removeDependingExternalIssues(\n        state: StateImpl?,\n        schema: Schema<*>,\n        path: AbsolutePath,\n        issues: Iterable<LocatedValidationIssue>,\n    ) {\n        state ?: return\n\n        val oldLocalDisplayStatus = state.localDisplayStatus()\n        val oldDisplayStatus = state.displayStatus()\n\n        if (state.removeExternalIssues(issues)) {\n            // Update validation state with the new external issues\n            ValidateAction.updateValidationState(\n                formManager,\n                schema,\n                path,\n                state,\n                oldLocalDisplayStatus,\n                oldDisplayStatus,\n                descendantsDisplayingIssuesToUpdate,\n            )\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.internal.AccessExternalContext\nimport io.kform.internal.ActionAccessType\n\n/**\n * Action that writes the external context with name [externalContextName] available to validations.\n */\ninternal abstract class WriteExternalContextAction<T>(formManager: FormManager) :\n    FormManagerAction<T>(formManager) {\n    abstract val externalContextName: String\n\n    override val accesses = listOf(AccessExternalContext(ActionAccessType.Write))\n    override val accessedPaths: List<AbsolutePath> = emptyList()\n\n    // FIXME: Cannot add function below due to the external contexts map not being thread-safe\n    // override fun overridesConflictingAction(action: Action<*>): Boolean =\n    //     action is WriteExternalContextAction\n    //         && action.externalContextName == externalContextName\n\n    /**\n     * Invalidate all validations and recompute all computed values depending on the external\n     * context, as well as remove external issues depending on it.\n     */\n    protected suspend fun updateDependents() {\n        // Invalidate depending validations\n        val toInvalidate = mutableSetOf<ValidationToInvalidate>()\n        for ((path, validation, validationIndex) in\n            formManager.externalContextValidationDependencies[externalContextName] ?: emptyList()) {\n            toInvalidate += ValidationToInvalidate(path, validation, validationIndex)\n        }\n        if (toInvalidate.isNotEmpty()) {\n            formManager.scheduleAction(InvalidateValidationsAction(formManager, toInvalidate))\n        }\n\n        // Remove depending external issues\n        val dependingExternalIssues =\n            formManager.externalIssuesDependencies\n                .getAndRemoveExternalIssuesDependentOnExternalContext(externalContextName)\n        if (dependingExternalIssues.isNotEmpty()) {\n            formManager.scheduleAction(\n                RemoveDependingExternalIssuesAction(formManager, dependingExternalIssues)\n            )\n        }\n\n        // Recompute computed values\n        val dependingComputedValues =\n            formManager.externalContextComputedValueDependencies[externalContextName] ?: emptyList()\n        if (dependingComputedValues.isNotEmpty()) {\n            formManager.scheduleAction(\n                ComputeValuesAction(formManager, dependingComputedValues.map { it.path })\n            )\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.FormManager\n\n/**\n * Action that removes the external context with name [externalContextName] available to\n * validations.\n */\ninternal class RemoveExternalContextAction<T>(\n    formManager: FormManager,\n    override val externalContextName: String,\n) : WriteExternalContextAction<T?>(formManager) {\n    override fun toString() = \"RemoveExternalContext($externalContextName)\"\n\n    override suspend fun run(): T? {\n        val hadExternalContext = externalContextName in formManager.externalContexts\n        var removedExternalContext: T? = null\n\n        if (hadExternalContext) {\n            @Suppress(\"UNCHECKED_CAST\")\n            removedExternalContext = formManager.externalContexts.remove(externalContextName) as T?\n            updateDependents()\n        }\n\n        return removedExternalContext\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.Schema\nimport io.kform.internal.*\n\n/**\n * Action that clears all external issues at paths matching [path] and with code [code] from the\n * form manager.\n */\ninternal class RemoveExternalIssuesAction(\n    formManager: FormManager,\n    private val path: AbsolutePath,\n    private val code: String?,\n) : ValueStateAction<Unit>(formManager) {\n    override fun toString() =\n        \"RemoveExternalIssues($path${if (code == null) \"\" else \", code=$code\"})\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessValidationState(ActionAccessType.Write),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n    override val accessedPaths = listOf(path)\n\n    override suspend fun runValueState() =\n        stateInfo(path).forEach { info ->\n            removeExternalIssues(info.state as StateImpl?, info.schema, info.path)\n        }\n\n    private suspend fun removeExternalIssues(\n        state: StateImpl?,\n        schema: Schema<*>,\n        path: AbsolutePath,\n    ) {\n        state ?: return\n\n        // Old statuses\n        val oldLocalDisplayStatus = state.localDisplayStatus()\n        val oldDisplayStatus = state.displayStatus()\n\n        val removedIssues = state.removeExternalIssues(code)\n        if (removedIssues.isNotEmpty()) {\n            formManager.externalIssuesDependencies.removeDependenciesOfExternalIssues(removedIssues)\n\n            // Update validation state with the new external issues\n            ValidateAction.updateValidationState(\n                formManager,\n                schema,\n                path,\n                state,\n                oldLocalDisplayStatus,\n                oldDisplayStatus,\n                descendantsDisplayingIssuesToUpdate,\n            )\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.Action\nimport io.kform.internal.INITIAL_VALUE\nimport io.kform.internal.setOnParent\nimport kotlin.plus\nimport kotlin.text.contains\n\n/**\n * Action that sets [toSet] as children of parent values matching [parentPath]. The children to set\n * are represented by [fragment]. [fragment] **cannot** be a recursive wildcard.\n *\n * To reset a value to its initial value, set [toSet] as [INITIAL_VALUE].\n */\ninternal class SetAction(\n    formManager: FormManager,\n    val parentPath: AbsolutePath?,\n    parentSchema: ParentSchema<Any?>?,\n    val fragment: AbsolutePathFragment?,\n    val toSet: Any?,\n) : WriteValueStateAction<Unit>(formManager) {\n    override fun toString() = if (toSet === INITIAL_VALUE) \"Reset($path)\" else \"Set($path, $toSet)\"\n\n    // When the parent schema supports concurrent sets, then we can simply lock the exact child\n    // being set instead of the whole parent value\n    override val accessedPaths =\n        listOf(\n            (if (parentSchema?.supportsConcurrentSets == true) path\n            else parentPath ?: AbsolutePath.ROOT) + AbsolutePathFragment.RecursiveWildcard\n        )\n\n    val path\n        get() = if (parentPath != null) parentPath + fragment!! else AbsolutePath.ROOT\n\n    override fun overridesConflictingAction(action: Action<*>): Boolean =\n        (action is SetAction &&\n            fragment !is AbsolutePathFragment.CollectionEnd &&\n            (path + AbsolutePathFragment.RecursiveWildcard).contains(action.path)) ||\n            (action is RemoveAction &&\n                (path + AbsolutePathFragment.RecursiveWildcard).contains(action.parentPath))\n\n    override suspend fun runWriteValueState() = setOnParent(parentPath, fragment, toSet)\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.StateEvent\nimport io.kform.StateInfo\nimport io.kform.internal.AccessIsDirty\nimport io.kform.internal.AccessValueStateTree\nimport io.kform.internal.ActionAccessType\nimport io.kform.internal.StateImpl\n\n/** Action that sets all values whose path matches [path] as dirty, as well as their parents. */\ninternal class SetDirtyAction(formManager: FormManager, private val path: AbsolutePath) :\n    ValueStateAction<Unit>(formManager) {\n    override fun toString() = \"SetDirty($path)\"\n\n    override val accesses =\n        listOf(AccessValueStateTree(ActionAccessType.Read), AccessIsDirty(ActionAccessType.Write))\n    override val accessedPaths = parentPaths(path) + path\n\n    override suspend fun runValueState() = stateInfo(path).forEach { info -> setDirty(info) }\n\n    private tailrec suspend fun setDirty(info: StateInfo<*>) {\n        val (state, schema, path) = info\n        state as StateImpl?\n        if (state != null && !state.isDirty) {\n            state.isDirty = true\n            formManager.eventsBus.emit(StateEvent.DirtyChange(true, path, schema))\n            if (info.path != AbsolutePath.ROOT) {\n                setDirty(stateInfo(info.path.parent()).single())\n            }\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.FormManager\n\n/**\n * Action that sets the external context with name [externalContextName] available to validations.\n */\ninternal class SetExternalContextAction<T>(\n    formManager: FormManager,\n    override val externalContextName: String,\n    private val externalContext: Any?,\n) : WriteExternalContextAction<T?>(formManager) {\n    override fun toString() = \"SetExternalContext($externalContextName, $externalContext)\"\n\n    override suspend fun run(): T? {\n        val hadExternalContext = externalContextName in formManager.externalContexts\n        @Suppress(\"UNCHECKED_CAST\")\n        val oldExternalContext =\n            formManager.externalContexts.put(externalContextName, externalContext) as T?\n\n        if (!hadExternalContext || oldExternalContext != externalContext) {\n            updateDependents()\n        }\n\n        return oldExternalContext\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.AccessIsDirty\nimport io.kform.internal.AccessValueStateTree\nimport io.kform.internal.ActionAccessType\nimport io.kform.internal.StateImpl\n\n/** Action that sets all values whose path matches [path] as pristine, as well as their children. */\ninternal class SetPristineAction(formManager: FormManager, private val path: AbsolutePath) :\n    ValueStateAction<Unit>(formManager) {\n    override fun toString() = \"SetPristine($path)\"\n\n    override val accesses =\n        listOf(AccessValueStateTree(ActionAccessType.Read), AccessIsDirty(ActionAccessType.Write))\n    override val accessedPaths = listOf(path + AbsolutePathFragment.RecursiveWildcard)\n\n    override suspend fun runValueState() =\n        stateInfo(path).forEach { info ->\n            setPristine(info.path, info.schema, info.state as StateImpl?)\n        }\n\n    private suspend fun setPristine(path: AbsolutePath, schema: Schema<*>, state: StateImpl?) {\n        if (state != null && state.isDirty) {\n            state.isDirty = false\n            formManager.eventsBus.emit(StateEvent.DirtyChange(false, path, schema))\n            if (state is ParentState) {\n                for (childInfo in state.childrenStates(path, AbsolutePathFragment.Wildcard)) {\n                    if (childInfo.state != null) {\n                        setPristine(childInfo.path, childInfo.schema, childInfo.state as StateImpl)\n                    }\n                }\n            }\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\n\n/** Action that sets all values whose path matches [path] as touched, as well as their parents. */\ninternal class SetTouchedAction(formManager: FormManager, private val path: AbsolutePath) :\n    ValueStateAction<Unit>(formManager) {\n    override fun toString() = \"SetTouched($path)\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessIsTouched(ActionAccessType.Write),\n            AccessValidationState(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Write),\n        )\n    override val accessedPaths = parentPaths(path) + path\n\n    override suspend fun runValueState() = stateInfo(path).forEach { info -> setTouched(info) }\n\n    private tailrec suspend fun setTouched(info: StateInfo<*>) {\n        val (state, schema, path) = info\n        state as StateImpl?\n        if (state != null && !state.isTouched) {\n            state.isTouched = true\n            formManager.eventsBus.emit(StateEvent.TouchedChange(true, path, schema))\n\n            val newDisplayStatus = state.displayStatus()\n            if (newDisplayStatus != DisplayStatus.Valid) {\n                formManager.eventsBus.emit(StateEvent.DisplayChange(newDisplayStatus, path, schema))\n            }\n\n            if (info.path != AbsolutePath.ROOT) {\n                val parentPath = path.parent()\n                // Once the value has been touched, if it has issues, we need to increment the count\n                // of \"descendants displaying issues\" for all ancestors\n                val dominantSeverity = state.dominantIssueSeverity()\n                if (dominantSeverity != null) {\n                    incrementDescendantsDisplayingIssues(parentPath, dominantSeverity)\n                }\n\n                setTouched(stateInfo(parentPath).single())\n            }\n        }\n    }\n\n    private tailrec suspend fun incrementDescendantsDisplayingIssues(\n        path: AbsolutePath,\n        dominantSeverity: ValidationIssueSeverity,\n    ) {\n        val info = stateInfo(path).single()\n        val state = info.state as ParentStateImpl\n\n        val oldDisplayStatus = state.displayStatus()\n        if (dominantSeverity == ValidationIssueSeverity.Error) {\n            ++state.descendantsDisplayingErrors\n        } else {\n            ++state.descendantsDisplayingWarnings\n        }\n        val newDisplayStatus = state.displayStatus()\n\n        if (oldDisplayStatus != newDisplayStatus) {\n            formManager.eventsBus.emit(\n                StateEvent.DisplayChange(newDisplayStatus, path, info.schema)\n            )\n        }\n        if (path != AbsolutePath.ROOT) {\n            incrementDescendantsDisplayingIssues(path.parent(), dominantSeverity)\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\n\n/**\n * Action that sets all values whose path matches [path] as untouched, as well as their children.\n */\ninternal class SetUntouchedAction(formManager: FormManager, private val path: AbsolutePath) :\n    ValueStateAction<Unit>(formManager) {\n    override fun toString() = \"SetUntouched($path)\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessIsTouched(ActionAccessType.Write),\n            AccessValidationState(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n    override val accessedPaths = listOf(path + AbsolutePathFragment.RecursiveWildcard)\n\n    override suspend fun runValueState() =\n        stateInfo(path).forEach { info ->\n            setUntouched(info.path, info.schema, info.state as StateImpl?)\n        }\n\n    private suspend fun setUntouched(path: AbsolutePath, schema: Schema<*>, state: StateImpl?) {\n        if (state != null && state.isTouched) {\n            val oldDisplayStatus = state.displayStatus()\n            state.isTouched = false\n            formManager.eventsBus.emit(StateEvent.TouchedChange(false, path, schema))\n\n            if (oldDisplayStatus != DisplayStatus.Valid) {\n                formManager.eventsBus.emit(\n                    StateEvent.DisplayChange(DisplayStatus.Valid, path, schema)\n                )\n            }\n\n            if (path != AbsolutePath.ROOT) {\n                val dominantSeverity = state.dominantIssueSeverity()\n                if (dominantSeverity != null) {\n                    updateDescendantsDisplayingIssues(\n                        descendantsDisplayingIssuesToUpdate,\n                        path.parent(),\n                        dominantSeverity,\n                        -1,\n                    )\n                }\n            }\n\n            if (state is ParentState) {\n                for (childInfo in state.childrenStates(path, AbsolutePathFragment.Wildcard)) {\n                    if (childInfo.state != null) {\n                        setUntouched(childInfo.path, childInfo.schema, childInfo.state as StateImpl)\n                    }\n                }\n            }\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.internal.AccessValidationDaemon\nimport io.kform.internal.ActionAccessType\nimport io.kform.internal.ValidationDaemon\n\n/** Action that starts the validation daemon. */\ninternal class StartValidationDaemonAction(\n    formManager: FormManager,\n    private val validationDaemon: ValidationDaemon,\n) : FormManagerAction<Unit>(formManager) {\n    override fun toString() = \"StartValidationDaemon\"\n\n    override val accesses = listOf(AccessValidationDaemon(ActionAccessType.Write))\n    override val accessedPaths = listOf(AbsolutePath.MATCH_ALL)\n\n    override suspend fun run() = validationDaemon.start()\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.internal.AccessValidationDaemon\nimport io.kform.internal.ActionAccessType\nimport io.kform.internal.ValidationDaemon\n\n/** Action that stops the validation daemon. */\ninternal class StopValidationDaemonAction(\n    formManager: FormManager,\n    private val validationDaemon: ValidationDaemon,\n) : FormManagerAction<Unit>(formManager) {\n    override fun toString() = \"StopValidationDaemon\"\n\n    override val accesses = listOf(AccessValidationDaemon(ActionAccessType.Write))\n    override val accessedPaths = listOf(AbsolutePath.MATCH_ALL)\n\n    override suspend fun run() = validationDaemon.stop()\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.StateEvent\nimport io.kform.internal.*\n\n/** Information about descendants displaying issues to update. */\ninternal class DescendantsDisplayingIssuesToUpdate(val path: AbsolutePath) {\n    var displayingErrors: Int = 0\n    var displayingWarnings: Int = 0\n}\n\n/**\n * Action that updates the number of descendants displaying issues of each severity at each provided\n * path, as well as their parents.\n */\ninternal class UpdateDescendantsDisplayingIssuesAction(\n    formManager: FormManager,\n    private val toUpdate: Iterable<DescendantsDisplayingIssuesToUpdate>,\n) : ValueStateAction<Unit>(formManager) {\n    private fun signedNumber(n: Int) = if (n < 0) \"$n\" else \"+$n\"\n\n    override fun toString() =\n        \"UpdateDesdendantsDisplayingIssues(${toUpdate.joinToString {\n            \"${it.path} ${\n                if (it.displayingErrors == 0) \"\" else \"${signedNumber(it.displayingErrors)}E\"\n            }${\n                if (it.displayingWarnings == 0) \"\" else \"${signedNumber(it.displayingWarnings)}W\"\n            }\"\n        }})\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessValidationState(ActionAccessType.Read),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Write),\n        )\n    override val accessedPaths = toUpdate.flatMap { parentPaths(it.path) + it.path }.toSet()\n\n    override suspend fun runValueState() =\n        toUpdate.forEach {\n            updateDescendantsDisplayingIssues(it.path, it.displayingErrors, it.displayingWarnings)\n        }\n\n    private tailrec suspend fun updateDescendantsDisplayingIssues(\n        path: AbsolutePath,\n        displayingErrors: Int,\n        displayingWarnings: Int,\n    ) {\n        val info = stateInfo(path).single()\n        val state = info.state as ParentStateImpl\n\n        val oldDisplayStatus = state.displayStatus()\n        state.descendantsDisplayingErrors += displayingErrors\n        state.descendantsDisplayingWarnings += displayingWarnings\n        val newDisplayStatus = state.displayStatus()\n\n        if (oldDisplayStatus != newDisplayStatus) {\n            formManager.eventsBus.emit(\n                StateEvent.DisplayChange(newDisplayStatus, path, info.schema)\n            )\n        }\n        if (path != AbsolutePath.ROOT) {\n            updateDescendantsDisplayingIssues(path.parent(), displayingErrors, displayingWarnings)\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\nimport kotlinx.coroutines.CompletableDeferred\nimport kotlinx.coroutines.CoroutineName\nimport kotlinx.coroutines.launch\n\n/** Information about a stateful computed value needing updating. */\ninternal class StatefulComputedValueToUpdate(\n    val path: AbsolutePath,\n    val computedValue: StatefulComputedValue<Any?, Any?>,\n    val observerIndex: Int,\n    val event: ValueEvent<Any?>,\n) {\n    override fun equals(other: Any?) =\n        when {\n            this === other -> true\n            other !is StatefulComputedValueToUpdate -> false\n            else -> path == other.path && event == other.event\n        }\n\n    override fun hashCode(): Int {\n        var result = path.hashCode()\n        result = 31 * result + event.hashCode()\n        return result\n    }\n}\n\n/**\n * Action that updates the state of all provided stateful computed values. This action runs at\n * normal priority since the updates are done in new coroutines that this action does not wait for.\n */\ninternal class UpdateStatefulComputedValuesStateAction(\n    formManager: FormManager,\n    private val toUpdate: Set<StatefulComputedValueToUpdate>,\n) : ValueStateAction<Unit>(formManager) {\n    override fun toString(): String =\n        \"UpdateStatefulComputedValuesState(${toUpdate.joinToString {\n            \"${it.computedValue}@${it.path} \u2190 ${it.event}\"\n        }})\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessStatefulComputedValueDeferredState(ActionAccessType.Write),\n        )\n    override val accessedPaths = toUpdate.map { it.path }.toHashSet()\n\n    override suspend fun runValueState() =\n        toUpdate.forEach { validationInfo ->\n            stateInfo(validationInfo.path).forEach { info ->\n                updateStatefulComputedValueState(\n                    info.state as StateImpl?,\n                    info.path,\n                    validationInfo.computedValue,\n                    validationInfo.observerIndex,\n                    validationInfo.event,\n                )\n            }\n        }\n\n    private fun updateStatefulComputedValueState(\n        state: StateImpl?,\n        path: AbsolutePath,\n        computedValue: StatefulComputedValue<Any?, Any?>,\n        observerIndex: Int,\n        event: ValueEvent<Any?>,\n    ) {\n        state ?: return\n\n        // Do nothing if the computed value state hasn't yet been initialised\n        val oldDeferredComputedValueState = state.statefulComputedValueDeferredState ?: return\n        val newDeferredComputedValueState = CompletableDeferred<Any?>(formManager.supervisorJob)\n        state.statefulComputedValueDeferredState = newDeferredComputedValueState\n\n        // Propagate cancellation downwards (when a value is destroyed before an up-to-date\n        // computed value state has been computed)\n        newDeferredComputedValueState.invokeOnCompletion { oldDeferredComputedValueState.cancel() }\n\n        formManager.scope.launch(CoroutineName(\"Update stateful computed value state\")) {\n            FormManager.logger.trace {\n                \"At '$path': Handling computed value '$computedValue' event: $event\"\n            }\n            val oldComputedValueState: Any?\n            try {\n                oldComputedValueState = oldDeferredComputedValueState.await()\n            } catch (ex: Throwable) {\n                // Propagate exception upwards, so that exceptions on previous computed value\n                // states always propagate to the latest one\n                newDeferredComputedValueState.completeExceptionally(ex)\n                return@launch\n            }\n\n            try {\n                val newComputedValueState =\n                    computedValue.observers[observerIndex].updateState(oldComputedValueState, event)\n                if (newDeferredComputedValueState.complete(newComputedValueState)) {\n                    if (oldComputedValueState != newComputedValueState) {\n                        formManager.scheduleAction(ComputeValuesAction(formManager, listOf(path)))\n                    }\n                    FormManager.logger.debug {\n                        \"At '$path': Updated computed value '$computedValue' state: \" +\n                            \"$oldComputedValueState -> $newComputedValueState\"\n                    }\n                } else {\n                    // Deferred was cancelled before we completed, so new state is useless\n                    FormManager.logger.trace {\n                        \"At '$path': Destroying computed value '$computedValue' new state: \" +\n                            \"$newComputedValueState\"\n                    }\n                    computedValue.destroyState(newComputedValueState)\n                }\n            } catch (ex: Throwable) {\n                // An error occurred during [updateState]\n                FormManager.logger.debug {\n                    \"At '$path': Failed to update computed value '$computedValue' state ($ex)\"\n                }\n                newDeferredComputedValueState.completeExceptionally(ex)\n            }\n\n            // Always destroy old state\n            FormManager.logger.trace {\n                \"At '$path': Destroying computed value '$computedValue' old state: \" +\n                    \"$oldComputedValueState\"\n            }\n            computedValue.destroyState(oldComputedValueState)\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\nimport kotlinx.coroutines.CompletableDeferred\nimport kotlinx.coroutines.CoroutineName\nimport kotlinx.coroutines.launch\n\n/** Information about a stateful validation needing updating. */\ninternal class StatefulValidationToUpdate(\n    val path: AbsolutePath,\n    val validation: StatefulValidation<Any?, Any?>,\n    val validationIndex: Int,\n    val statefulValidationIndex: Int,\n    val observerIndex: Int,\n    val event: ValueEvent<Any?>,\n) {\n    override fun equals(other: Any?) =\n        when {\n            this === other -> true\n            other !is StatefulValidationToUpdate -> false\n            else ->\n                path == other.path &&\n                    validationIndex == other.validationIndex &&\n                    event == other.event\n        }\n\n    override fun hashCode(): Int {\n        var result = path.hashCode()\n        result = 31 * result + validationIndex\n        result = 31 * result + event.hashCode()\n        return result\n    }\n}\n\n/**\n * Action that updates the state of all provided stateful validations. This action runs at normal\n * priority since the updates are done in new coroutines that this action does not wait for.\n */\ninternal class UpdateStatefulValidationsStateAction(\n    formManager: FormManager,\n    private val toUpdate: Set<StatefulValidationToUpdate>,\n) : ValueStateAction<Unit>(formManager) {\n    override fun toString(): String =\n        \"UpdateStatefulValidationsState(${toUpdate.joinToString {\n            \"${it.validation}@${it.path} \u2190 ${it.event}\"\n        }})\"\n\n    override val accesses =\n        listOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessValidationState(ActionAccessType.Read),\n            AccessStatefulValidationDeferredState(ActionAccessType.Write),\n        )\n    override val accessedPaths = toUpdate.map { it.path }.toHashSet()\n\n    override suspend fun runValueState() =\n        toUpdate.forEach { validationInfo ->\n            stateInfo(validationInfo.path).forEach { info ->\n                updateStatefulValidationState(\n                    info.state as StateImpl?,\n                    info.schema,\n                    info.path,\n                    validationInfo.validation,\n                    validationInfo.validationIndex,\n                    validationInfo.statefulValidationIndex,\n                    validationInfo.observerIndex,\n                    validationInfo.event,\n                )\n            }\n        }\n\n    private fun updateStatefulValidationState(\n        state: StateImpl?,\n        schema: Schema<*>,\n        path: AbsolutePath,\n        validation: StatefulValidation<Any?, Any?>,\n        validationIndex: Int,\n        statefulValidationIndex: Int,\n        observerIndex: Int,\n        event: ValueEvent<Any?>,\n    ) {\n        state ?: return\n\n        // Do nothing if the validation state hasn't yet been initialised\n        val oldDeferredValidationState =\n            state.getStatefulValidationDeferredState(statefulValidationIndex) ?: return\n        val newDeferredValidationState = CompletableDeferred<Any?>(formManager.supervisorJob)\n        state.setStatefulValidationDeferredState(\n            newDeferredValidationState,\n            statefulValidationIndex,\n        )\n\n        // Propagate cancellation downwards (when a value is destroyed before an up-to-date\n        // validation state has been computed)\n        newDeferredValidationState.invokeOnCompletion { oldDeferredValidationState.cancel() }\n\n        // By the time we update the validation state, a `ValidateAction` may be waiting for the new\n        // state; this only happens when the validation wasn't previously (successfully) validated.\n        // This means that we cannot always issue a `RemoveCachedIssuesAction` since we may be\n        // removing issues that were cached **after** the validation state was set. Thus, we check\n        // whether the validation was previously validated before issuing a\n        // `RemoveCachedIssuesAction`.\n        val validationWasValidated =\n            state.getCachedIssues(validationIndex).let { cachedIssues ->\n                cachedIssues != null && !cachedIssues.any { it is ValidationExceptionError }\n            }\n\n        formManager.scope.launch(CoroutineName(\"Update stateful validation state\")) {\n            FormManager.logger.trace {\n                \"At '$path': Handling validation '$validation' event: $event\"\n            }\n            val oldValidationState: Any?\n            try {\n                oldValidationState = oldDeferredValidationState.await()\n            } catch (ex: Throwable) {\n                // Propagate exception upwards, so that exceptions on previous validation\n                // states always propagate to the latest one\n                newDeferredValidationState.completeExceptionally(ex)\n                return@launch\n            }\n\n            try {\n                val newValidationState =\n                    validation.observers[observerIndex].updateState(oldValidationState, event)\n                if (newDeferredValidationState.complete(newValidationState)) {\n                    if (oldValidationState != newValidationState) {\n                        if (validationWasValidated) {\n                            formManager.scheduleAction(\n                                RemoveCachedIssuesAction(\n                                    formManager,\n                                    path,\n                                    schema,\n                                    state,\n                                    validation,\n                                    validationIndex,\n                                )\n                            )\n                        }\n                    }\n                    FormManager.logger.debug {\n                        \"At '$path': Updated validation '$validation' state: \" +\n                            \"$oldValidationState -> $newValidationState\"\n                    }\n                } else {\n                    // Deferred was cancelled before we completed, so new state is useless\n                    FormManager.logger.trace {\n                        \"At '$path': Destroying validation '$validation' new state: \" +\n                            \"$newValidationState\"\n                    }\n                    validation.destroyState(newValidationState)\n                }\n            } catch (ex: Throwable) {\n                // An error occurred during [updateState]\n                FormManager.logger.debug {\n                    \"At '$path': Failed to update validation '$validation' state ($ex)\"\n                }\n                newDeferredValidationState.completeExceptionally(ex)\n            }\n\n            // Always destroy old state\n            FormManager.logger.trace {\n                \"At '$path': Destroying validation '$validation' old state: \" +\n                    \"$oldValidationState\"\n            }\n            validation.destroyState(oldValidationState)\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.*\nimport io.kform.internal.*\nimport kotlinx.coroutines.CancellationException\nimport kotlinx.coroutines.CompletableDeferred\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.catch\nimport kotlinx.coroutines.flow.flow\nimport kotlinx.coroutines.flow.onCompletion\n\n/**\n * Action that calls [issuesHandler] with a flow over the validation issues found when validating\n * all values matching [path].\n */\ninternal class ValidateAction<T>(\n    formManager: FormManager,\n    private val path: AbsolutePath,\n    private val issuesHandler: IssuesHandler<T>,\n    override val priority: Int = 0,\n) : ValueStateAction<T>(formManager) {\n    override fun toString() = \"Validate($path)\"\n\n    override val accesses =\n        mutableListOf(\n            AccessValueStateTree(ActionAccessType.Read),\n            AccessValidationState(ActionAccessType.Write),\n            AccessStatefulValidationDeferredState(ActionAccessType.Read),\n            AccessIsTouched(ActionAccessType.Read),\n            AccessDescendantsDisplayingIssues(ActionAccessType.Read),\n        )\n\n    override val accessedPaths: Set<AbsolutePath>\n\n    init {\n        // Iterate over all validations that need to run and determine the accessed paths and\n        // whether access to external context is required\n        var requiresAccessToExternalContext = false\n        val paths = mutableSetOf<AbsolutePath>()\n        for ((schema, _, queriedPath) in schemaInfo(path)) {\n            val validations = schema.validations\n            if (validations.isNotEmpty()) {\n                paths += queriedPath + AbsolutePathFragment.RecursiveWildcard\n            }\n            for (validation in validations) {\n                for (dependency in validation.dependencies.values) {\n                    paths +=\n                        queriedPath.resolve(dependency.path) +\n                            AbsolutePathFragment.RecursiveWildcard\n                }\n                if (validation.externalContextDependencies.isNotEmpty()) {\n                    requiresAccessToExternalContext = true\n                }\n            }\n        }\n\n        if (requiresAccessToExternalContext) {\n            accesses += AccessExternalContext(ActionAccessType.Read)\n        }\n        accessedPaths = paths\n    }\n\n    override suspend fun runValueState(): T = issuesHandler(validate())\n\n    /** Validates all values matching the action's path. */\n    // TODO: Possibly run validations with some concurrency\n    private fun validate(): Flow<LocatedValidationIssue> = flow {\n        valueStateInfo(path).collect { (value, state, schema, path, schemaPath) ->\n            state as StateImpl\n\n            // Old statuses\n            val oldLocalDisplayStatus = state.localDisplayStatus()\n            val oldDisplayStatus = state.displayStatus()\n\n            // When not already (successfully) validated, set status as \"validating\"\n            val wasSuccessfullyValidated = state.validationStatus === ValidationStatus.Validated\n            if (!wasSuccessfullyValidated) {\n                state.validationStatus = ValidationStatus.Validating\n                formManager.eventsBus.emit(\n                    StateEvent.ValidationChange(\n                        ValidationStatus.Validating,\n                        state.getAllVisibleIssues(),\n                        path,\n                        schema,\n                    )\n                )\n            }\n            var validationCancelled = false\n            var validationFailed = false\n\n            // Keep track of emitted issues in order to prevent emitting repeated ones\n            val emittedIssues = mutableSetOf<LocatedValidationIssue>()\n\n            var statefulValidationIndex = 0\n            for ((validationIndex, validation) in schema.validations.withIndex()) {\n                val issues = state.getCachedIssues(validationIndex)\n                // Rerun the validation if the previous run failed (validation threw an exception)\n                if (issues != null && !issues.any { it is ValidationExceptionError }) {\n                    FormManager.logger.trace {\n                        \"At '$path': Emitting cached issues for validation '$validation'\"\n                    }\n                    // Emit cached issues\n                    for (issue in issues) {\n                        val locatedIssue = LocatedValidationIssue(path, validation, issue)\n                        if (emittedIssues.add(locatedIssue)) {\n                            emit(locatedIssue)\n                        }\n                    }\n                } else {\n                    runValidation(\n                            value,\n                            schema,\n                            path,\n                            schemaPath,\n                            state,\n                            validation,\n                            validationIndex,\n                            statefulValidationIndex,\n                        )\n                        .onCompletion { ex ->\n                            if (ex is CancellationException) {\n                                validationCancelled = true\n                            }\n                        }\n                        .collect { issue ->\n                            if (issue is ValidationExceptionError) {\n                                validationFailed = true\n                            }\n                            val locatedIssue = LocatedValidationIssue(path, validation, issue)\n                            if (emittedIssues.add(locatedIssue)) {\n                                emit(locatedIssue)\n                            }\n                        }\n                }\n\n                if (validation is StatefulValidation<*, *>) {\n                    ++statefulValidationIndex\n                }\n            }\n\n            // Emit external issues\n            for (externalIssue in state.externalIssues ?: emptyArray()) {\n                if (emittedIssues.add(externalIssue)) {\n                    emit(externalIssue)\n                }\n            }\n\n            // When it wasn't already (successfully) validated, update the statuses\n            if (!wasSuccessfullyValidated) {\n                state.validationStatus =\n                    when {\n                        validationCancelled -> ValidationStatus.Unvalidated\n                        validationFailed -> ValidationStatus.ValidatedExceptionally\n                        else -> ValidationStatus.Validated\n                    }\n            }\n            updateValidationState(\n                formManager,\n                schema,\n                path,\n                state,\n                oldLocalDisplayStatus,\n                oldDisplayStatus,\n                descendantsDisplayingIssuesToUpdate,\n                emitValidationChange = !wasSuccessfullyValidated,\n            )\n        }\n    }\n\n    /**\n     * Runs a single validation and returns a flow over its validation issues. This function may\n     * throw a `CancellationException`. The [statefulValidationIndex] is unused when the validation\n     * isn't stateful, so any number can be provided.\n     */\n    private fun runValidation(\n        value: Any?,\n        schema: Schema<*>,\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n        state: StateImpl,\n        validation: Validation<*>,\n        validationIndex: Int,\n        statefulValidationIndex: Int,\n    ): Flow<ValidationIssue> = flow {\n        val validationContext =\n            ValidationContext(\n                value,\n                schema,\n                path,\n                schemaPath,\n                dependenciesInfo(path, validation.dependencies),\n                validation.externalContextDependencies.associateWith {\n                    formManager.externalContexts[it]\n                },\n            )\n\n        // Wrap code in `try/catch` since we're calling user code (`validate` or\n        // `validateFromState`) and an error may occur when **creating** the flow; an error may also\n        // occur while initialising or accessing the state of a stateful validation\n        val issuesFlow: Flow<ValidationIssue>?\n        try {\n            @Suppress(\"UNCHECKED_CAST\")\n            issuesFlow =\n                if (validation is StatefulValidation<*, *>) {\n                    validation as StatefulValidation<Any?, Any?>\n                    var deferredState =\n                        state.getStatefulValidationDeferredState(statefulValidationIndex)\n                    // Initialise validation state if it has not yet been initialised; this may fail\n                    // due to an error in the `initState` function or due to cancellation\n                    if (deferredState == null) {\n                        deferredState =\n                            initStatefulValidationState(\n                                path,\n                                state,\n                                validation,\n                                statefulValidationIndex,\n                                validationContext,\n                            )\n                    }\n                    // Wait for the validation state in case ongoing state updates exist; this may\n                    // fail due to an error during the state update, in which case we remove the\n                    // deferred state so that the state is reinitialised the next time this\n                    // validation runs\n                    val validationState: Any?\n                    try {\n                        validationState = deferredState.await()\n                        FormManager.logger.trace {\n                            \"At '$path': Obtained validation '$validation' state: $validationState\"\n                        }\n                    } catch (ex: Throwable) {\n                        FormManager.logger.trace {\n                            \"At '$path': Failed to obtain validation '$validation' state ($ex)\"\n                        }\n                        // [ex] cannot be a [CancellationException] because state updates should\n                        // never be cancellable\n                        state.setStatefulValidationDeferredState(null, statefulValidationIndex)\n                        throw ex\n                    }\n                    validation.run { validationContext.validateFromState(validationState) }\n                } else {\n                    validation as Validation<Any?>\n                    validation.run { validationContext.validate() }\n                }\n        } catch (ex: Throwable) {\n            // The initialisation of the state of a stateful validation may be cancelled\n            if (ex !is CancellationException) {\n                FormManager.logger.error(ex) {\n                    \"At '$path': Failed to run validation '$validation'\"\n                }\n                ValidationExceptionError(ex).let {\n                    state.cacheIssues(validationIndex, arrayOf(it))\n                    emit(it)\n                }\n            }\n            return@flow\n        }\n\n        FormManager.logger.trace { \"At '$path': Running validation '$validation'\" }\n        // If the validation throws, we still emit the issues up to the point it threw, plus a\n        // [ValidationExceptionError] error\n        val issuesToCache = mutableSetOf<ValidationIssue>()\n        issuesFlow\n            .catch { ex ->\n                if (ex !is CancellationException) {\n                    FormManager.logger.error(ex) {\n                        \"At '$path': Failed to run validation '$validation'\"\n                    }\n                    val exceptionError = ValidationExceptionError(ex)\n                    issuesToCache += exceptionError\n                    emit(exceptionError)\n                }\n            }\n            .onCompletion { ex ->\n                // We mustn't cache issues during a cancellation as the cached issues must be\n                // \"complete\"\n                if (ex !is CancellationException) {\n                    state.cacheIssues(validationIndex, issuesToCache.toTypedArray())\n                }\n            }\n            .collect { issue ->\n                issuesToCache += issue\n                emit(issue)\n            }\n    }\n\n    /** Initialises the state of a stateful validation. */\n    private suspend fun initStatefulValidationState(\n        path: AbsolutePath,\n        state: StateImpl,\n        validation: StatefulValidation<Any?, Any?>,\n        statefulValidationIndex: Int,\n        validationContext: ValidationContext,\n    ): CompletableDeferred<Any?> {\n        FormManager.logger.trace { \"At '$path': Initializing validation '$validation' state\" }\n        val validationState = validation.run { validationContext.initState() }\n        val deferredState = CompletableDeferred(validationState)\n        state.setStatefulValidationDeferredState(deferredState, statefulValidationIndex)\n        FormManager.logger.debug {\n            \"At '$path': Initialized validation '$validation' state: $validationState\"\n        }\n        return deferredState\n    }\n\n    companion object {\n        /** Updates the validation state, emitting events as needed. */\n        suspend fun updateValidationState(\n            formManager: FormManager,\n            schema: Schema<*>,\n            path: AbsolutePath,\n            state: StateImpl,\n            oldLocalDisplayStatus: DisplayStatus,\n            oldDisplayStatus: DisplayStatus,\n            descendantsDisplayingIssuesToUpdate:\n                MutableMap<AbsolutePath, DescendantsDisplayingIssuesToUpdate>,\n            emitValidationChange: Boolean = true,\n        ) {\n            if (emitValidationChange) {\n                formManager.eventsBus.emit(\n                    StateEvent.ValidationChange(\n                        state.validationStatus,\n                        state.getAllVisibleIssues(),\n                        path,\n                        schema,\n                    )\n                )\n            }\n\n            // Update display status if it changed\n            val newDisplayStatus = state.displayStatus()\n            if (oldDisplayStatus != newDisplayStatus) {\n                formManager.eventsBus.emit(StateEvent.DisplayChange(newDisplayStatus, path, schema))\n            }\n\n            // Update count of \"descendants displaying issues\" on all ancestors, if necessary\n            if (path != AbsolutePath.ROOT) {\n                val newLocalDisplayStatus = state.localDisplayStatus()\n                if (oldLocalDisplayStatus != newLocalDisplayStatus) {\n                    updateDescendantsDisplayingIssues(\n                        descendantsDisplayingIssuesToUpdate,\n                        path.parent(),\n                        if (oldLocalDisplayStatus == DisplayStatus.Error) -1\n                        else if (newLocalDisplayStatus == DisplayStatus.Error) 1 else 0,\n                        if (oldLocalDisplayStatus == DisplayStatus.Warning) -1\n                        else if (newLocalDisplayStatus == DisplayStatus.Warning) 1 else 0,\n                    )\n                }\n            }\n        }\n    }\n}\n","package io.kform.internal.actions\n\nimport io.kform.AbsolutePath\nimport io.kform.FormManager\nimport io.kform.ValueInfoHandler\n\n/**\n * Action that calls [infoHandler] with the value-info of values at [path] and holds a lock over\n * said info until [infoHandler] finishes.\n */\ninternal class ValueInfoAction<T>(\n    formManager: FormManager,\n    path: AbsolutePath,\n    val infoHandler: ValueInfoHandler<T>,\n) : ReadValueStateAction<T>(formManager, path) {\n    override fun toString() = \"ValueInfo($path)\"\n\n    override suspend fun runValueState() = infoHandler(valueInfo(path))\n}\n","package io.kform.schemas\n\nimport io.kform.*\n\n/**\n * Abstract schema representing collections of type [T] with elements of type [TChildren] whose\n * schema is of type [TSchema].\n *\n * @property elementsSchema Schema of the collection's elements.\n */\npublic abstract class AbstractCollectionSchema<T, TChildren, TSchema : Schema<TChildren>>(\n    public val elementsSchema: TSchema\n) : CollectionSchema<T, TChildren> {\n    override fun childrenSchemas(\n        path: AbsolutePath,\n        queriedPath: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<SchemaInfo<TChildren>> = sequence {\n        yield(\n            SchemaInfo(\n                elementsSchema,\n                path.append(AbsolutePathFragment.Wildcard),\n                queriedPath.append(fragment),\n            )\n        )\n    }\n}\n","package io.kform.schemas\n\nimport io.kform.*\n\n/**\n * Abstract schema representing simple (non-parent) values of type [T].\n *\n * **Note**: schemas representing non-primitive values extending this class might need to implement\n * [clone], as the default implementation might not be desirable when values are mutable.\n */\npublic abstract class AbstractSimpleSchema<T>(validations: Iterable<Validation<T>>) : Schema<T> {\n    override val validations: List<Validation<T>> = validations.toList()\n\n    // Default implementation which is valid for non-mutable values; simple schemas holding\n    // mutable values should override this function\n    override suspend fun clone(value: T): T = value\n\n    @Suppress(\"UNCHECKED_CAST\") public open suspend fun fromAny(value: Any?): T = clone(value as T)\n\n    override suspend fun init(\n        path: AbsolutePath,\n        fromValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: T) -> Unit,\n    ) {\n        val newValue = fromAny(fromValue)\n        setValue(newValue)\n        eventsBus.emit(ValueEvent.Init(newValue, path, this))\n    }\n\n    override suspend fun change(\n        path: AbsolutePath,\n        value: T,\n        intoValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: T) -> Unit,\n    ) {\n        val newValue = fromAny(intoValue)\n        if (value != newValue) {\n            setValue(newValue)\n            eventsBus.emit(ValueEvent.Change(value, newValue, path, this))\n        } else {\n            setValue(value)\n        }\n    }\n\n    override suspend fun destroy(\n        path: AbsolutePath,\n        value: T,\n        eventsBus: SchemaEventsBus,\n        removeValue: suspend (value: T) -> Unit,\n    ) {\n        removeValue(value)\n        eventsBus.emit(ValueEvent.Destroy(value, path, this))\n    }\n}\n","package io.kform.schemas\n\nimport io.kform.TypeInfo\nimport io.kform.Validation\nimport io.kform.datatypes.BigDecimal\nimport io.kform.datatypes.BigInteger\nimport io.kform.schemas.util.commonRestrictions\nimport io.kform.schemas.util.comparableBoundsRestrictions\nimport io.kform.schemas.util.scaleRestriction\nimport io.kform.validations.Scale\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\nimport org.gciatto.kt.math.RoundingMode\n\n/** Schema representing numeric values of type [BigDecimal]. */\npublic open class BigDecimalSchema(\n    validations: Iterable<Validation<BigDecimal>> = emptyList(),\n    override val initialValue: BigDecimal = zeroOfPreferredScale(validations),\n) : AbstractSimpleSchema<BigDecimal>(validations) {\n    public val preferredScale: Int? = preferredScale(validations)\n\n    public constructor(\n        vararg validations: Validation<BigDecimal>,\n        initialValue: BigDecimal = zeroOfPreferredScale(validations.asIterable()),\n    ) : this(validations.asIterable(), initialValue)\n\n    override val typeInfo: TypeInfo =\n        TypeInfo(\n            BigDecimal::class,\n            restrictions =\n                commonRestrictions(validations) +\n                    comparableBoundsRestrictions(validations) +\n                    scaleRestriction(validations),\n        )\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(BigDecimal.ZERO) == true\n\n    override suspend fun fromAny(value: Any?): BigDecimal {\n        val bigDecimal =\n            when (value) {\n                is BigDecimal -> return value\n                is BigInteger -> BigDecimal.of(value)\n                is Byte -> BigDecimal.of(value.toInt())\n                is Short -> BigDecimal.of(value.toInt())\n                is Int -> BigDecimal.of(value)\n                is Long -> BigDecimal.of(value)\n                is Float -> BigDecimal.of(value)\n                is Double -> BigDecimal.of(value)\n                is String -> BigDecimal.of(value)\n                else ->\n                    throw IllegalArgumentException(\"Cannot convert value '$value' to BigDecimal.\")\n            }\n        return if (preferredScale == null || bigDecimal.scale >= preferredScale) bigDecimal\n        else bigDecimal.setScale(preferredScale, RoundingMode.UNNECESSARY)\n    }\n\n    internal companion object {\n        /**\n         * Returns the preferred scale of the big decimal schema inferred from the provided\n         * validations.\n         */\n        private fun preferredScale(validations: Iterable<Validation<BigDecimal>>): Int? {\n            val requiredScales =\n                validations.filterIsInstance<Scale>().map { it.requiredScale }.toSet()\n            return if (requiredScales.size == 1) requiredScales.first() else null\n        }\n\n        /**\n         * Returns a big decimal representation of zero with the preferred scale inferred from the\n         * provided validations.\n         */\n        internal fun zeroOfPreferredScale(\n            validations: Iterable<Validation<BigDecimal>>\n        ): BigDecimal {\n            val preferredScale = preferredScale(validations)\n            return if (preferredScale == null) BigDecimal.ZERO\n            else BigDecimal.ZERO.setScale(preferredScale)\n        }\n    }\n}\n","package io.kform.schemas\n\nimport io.kform.TypeInfo\nimport io.kform.Validation\nimport io.kform.datatypes.BigDecimal\nimport io.kform.datatypes.BigInteger\nimport io.kform.schemas.util.commonRestrictions\nimport io.kform.schemas.util.comparableBoundsRestrictions\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\n\n/** Schema representing numeric values of type [BigInteger]. */\npublic open class BigIntegerSchema(\n    validations: Iterable<Validation<BigInteger>> = emptyList(),\n    override val initialValue: BigInteger = BigInteger.ZERO,\n) : AbstractSimpleSchema<BigInteger>(validations) {\n    public constructor(\n        vararg validations: Validation<BigInteger>,\n        initialValue: BigInteger = BigInteger.ZERO,\n    ) : this(validations.asIterable(), initialValue)\n\n    override val typeInfo: TypeInfo =\n        TypeInfo(\n            BigInteger::class,\n            restrictions =\n                commonRestrictions(validations) + comparableBoundsRestrictions(validations),\n        )\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(BigInteger.ZERO) == true\n\n    override suspend fun fromAny(value: Any?): BigInteger =\n        when (value) {\n            is BigInteger -> value\n            is BigDecimal -> value.toBigInteger()\n            is Byte -> BigInteger.of(value.toInt())\n            is Short -> BigInteger.of(value.toInt())\n            is Int -> BigInteger.of(value)\n            is Long -> BigInteger.of(value)\n            is Float -> BigInteger.of(value.toLong())\n            is Double -> BigInteger.of(value.toLong())\n            is String -> BigInteger.of(value)\n            else -> throw IllegalArgumentException(\"Cannot convert value '$value' to BigInteger.\")\n        }\n}\n","package io.kform.schemas\n\nimport io.kform.TypeInfo\nimport io.kform.Validation\nimport io.kform.schemas.util.commonRestrictions\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\n\n/** Schema representing values of type [Boolean]. */\npublic open class BooleanSchema(\n    validations: Iterable<Validation<Boolean>> = emptyList(),\n    override val initialValue: Boolean = false,\n) : AbstractSimpleSchema<Boolean>(validations) {\n    public constructor(\n        vararg validations: Validation<Boolean>,\n        initialValue: Boolean = false,\n    ) : this(validations.asIterable(), initialValue)\n\n    override val typeInfo: TypeInfo =\n        TypeInfo(Boolean::class, restrictions = commonRestrictions(validations))\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(false) == true\n\n    override suspend fun fromAny(value: Any?): Boolean =\n        when (value) {\n            is Boolean -> value\n            is String -> value.toBoolean()\n            else -> throw IllegalArgumentException(\"Cannot convert value '$value' to Boolean.\")\n        }\n}\n","@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform.schemas\n\nimport io.kform.*\nimport io.kform.internal.constructFromKClass\nimport io.kform.schemas.util.commonRestrictions\nimport kotlin.coroutines.coroutineContext\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KMutableProperty1\nimport kotlin.reflect.KType\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\nimport kotlinx.coroutines.isActive\n\n/** Child property schema. */\nprivate data class ChildPropSchema<T>(\n    val property: KMutableProperty1<T, Any?>,\n    val schema: Schema<Any?>,\n)\n\n/**\n * Function responsible for creating an instance of type `T` from two maps mapping children names to\n * their values and properties.\n *\n * @param T Type of instance being created.\n */\npublic typealias ConstructorFunction<T> =\n    (childValues: Map<String, Any?>, childProps: Map<String, KMutableProperty1<T, Any?>>) -> T\n\n/**\n * Implementation of a schema representing values of a given class [T] with [KClass] [kClass]. Use\n * the [ClassSchema.invoke] function to create an instance of this class.\n *\n * @property kClass [KClass] of the represented class.\n * @property childrenSchemas Map of children schemas.\n * @property construct Function used to construct values of type [T].\n */\npublic open class ClassSchema<T : Any>\n@PublishedApi\ninternal constructor(\n    public val kClass: KClass<T>,\n    public val childrenSchemas: Map<KMutableProperty1<T, *>, Schema<*>>,\n    validations: Iterable<Validation<T>> = emptyList(),\n    initialValue: T? = null,\n    public val construct: ConstructorFunction<T>? = null,\n) : ParentSchema<T> {\n    override val typeInfo: TypeInfo =\n        TypeInfo(kClass, restrictions = commonRestrictions(validations))\n\n    override val validations: List<Validation<T>> = validations.toList()\n\n    override val supportsConcurrentSets: Boolean = true\n\n    /** Children information by name. */\n    private val childrenInfoByName: Map<String, ChildPropSchema<T>> = run {\n        val map = LinkedHashMap<String, ChildPropSchema<T>>(childrenSchemas.size)\n        @Suppress(\"UNCHECKED_CAST\")\n        for ((property, schema) in childrenSchemas) {\n            map[property.name] =\n                ChildPropSchema(property as KMutableProperty1<T, Any?>, schema as Schema<Any?>)\n        }\n        map\n    }\n\n    override val initialValue: T =\n        initialValue\n            ?: run {\n                val childValues = LinkedHashMap<String, Any?>(childrenSchemas.size)\n                val childProps =\n                    LinkedHashMap<String, KMutableProperty1<T, Any?>>(childrenSchemas.size)\n                for ((name, childInfo) in childrenInfoByName) {\n                    childValues[name] = childInfo.schema.initialValue\n                    childProps[name] = childInfo.property\n                }\n                newInstance(childValues, childProps)\n            }\n\n    override suspend fun clone(value: T): T {\n        val childValues = LinkedHashMap<String, Any?>(childrenSchemas.size)\n        val childProps = LinkedHashMap<String, KMutableProperty1<T, Any?>>(childrenSchemas.size)\n        for ((name, childInfo) in childrenInfoByName) {\n            childValues[name] = childInfo.schema.clone(childInfo.property.get(value))\n            childProps[name] = childInfo.property\n        }\n        return newInstance(childValues, childProps)\n    }\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(initialValue) == true\n\n    override fun isValidChildSchemaFragment(fragment: AbsolutePathFragment): Boolean =\n        fragment is AbsolutePathFragment.Id && childrenInfoByName.containsKey(fragment.id)\n\n    override fun childrenSchemas(\n        path: AbsolutePath,\n        queriedPath: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<SchemaInfo<*>> = sequence {\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for ((name, childInfo) in childrenInfoByName) {\n                yield(\n                    SchemaInfo(\n                        childInfo.schema,\n                        path.append(AbsolutePathFragment.Id(name)),\n                        queriedPath.append(AbsolutePathFragment.Id(name)),\n                    )\n                )\n            }\n        } else {\n            fragment as AbsolutePathFragment.Id\n            val childInfo =\n                childrenInfoByName[fragment.id] ?: error(\"Invalid fragment '$fragment'.\")\n            yield(SchemaInfo(childInfo.schema, path.append(fragment), queriedPath.append(fragment)))\n        }\n    }\n\n    override suspend fun isValidChildFragment(value: T, fragment: AbsolutePathFragment): Boolean =\n        isValidChildSchemaFragment(fragment)\n\n    override fun children(\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n        value: T,\n        fragment: AbsolutePathFragment,\n    ): Flow<ValueInfo<Any?>> = flow {\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for ((name, childInfo) in childrenInfoByName) {\n                val childId = AbsolutePathFragment.Id(name)\n                emit(\n                    ValueInfo(\n                        childInfo.property.get(value),\n                        childInfo.schema,\n                        path.append(childId),\n                        schemaPath.append(childId),\n                    )\n                )\n            }\n        } else {\n            fragment as AbsolutePathFragment.Id\n            val childInfo =\n                childrenInfoByName[fragment.id] ?: error(\"Invalid fragment '$fragment'.\")\n            emit(\n                ValueInfo(\n                    childInfo.property.get(value),\n                    childInfo.schema,\n                    path.append(fragment),\n                    schemaPath.append(fragment),\n                )\n            )\n        }\n    }\n\n    @Suppress(\"UNCHECKED_CAST\")\n    override suspend fun init(\n        path: AbsolutePath,\n        fromValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: T) -> Unit,\n    ) {\n        fromValue as? T ?: error(\"Cannot initialise value from '$fromValue'.\")\n        val childValues = LinkedHashMap<String, Any?>(childrenSchemas.size)\n        val childProps = LinkedHashMap<String, KMutableProperty1<T, Any?>>(childrenSchemas.size)\n        for ((name, childInfo) in childrenInfoByName) {\n            childInfo.schema.init(\n                path.append(AbsolutePathFragment.Id(name)),\n                childInfo.property.get(fromValue),\n                eventsBus,\n            ) {\n                childValues[name] = it\n            }\n            childProps[name] = childInfo.property\n        }\n        val newValue = newInstance(childValues, childProps)\n        setValue(newValue)\n        eventsBus.emit(ValueEvent.Init(newValue, path, this))\n    }\n\n    @Suppress(\"UNCHECKED_CAST\")\n    override suspend fun change(\n        path: AbsolutePath,\n        value: T,\n        intoValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: T) -> Unit,\n    ) {\n        intoValue as? T ?: error(\"Cannot initialise value from '$intoValue'.\")\n        for ((name, childInfo) in childrenInfoByName) {\n            if (!coroutineContext.isActive) break // Don't do more work than necessary\n            childInfo.schema.change(\n                path.append(AbsolutePathFragment.Id(name)),\n                childInfo.property.get(value),\n                childInfo.property.get(intoValue),\n                eventsBus,\n            ) {\n                childInfo.property.set(value, it)\n            }\n        }\n        setValue(value)\n    }\n\n    override suspend fun destroy(\n        path: AbsolutePath,\n        value: T,\n        eventsBus: SchemaEventsBus,\n        removeValue: suspend (value: T) -> Unit,\n    ) {\n        removeValue(value)\n        eventsBus.emit(ValueEvent.Destroy(value, path, this))\n        for ((name, childInfo) in childrenInfoByName) {\n            childInfo.schema.destroy(\n                path.append(AbsolutePathFragment.Id(name)),\n                childInfo.property.get(value),\n                eventsBus,\n            ) {}\n        }\n    }\n\n    override suspend fun isValidSetFragment(value: T, fragment: AbsolutePathFragment): Boolean =\n        isValidChildFragment(value, fragment)\n\n    override suspend fun set(\n        path: AbsolutePath,\n        value: T,\n        fragment: AbsolutePathFragment,\n        childValue: Any?,\n        eventsBus: SchemaEventsBus,\n    ) {\n        fragment as AbsolutePathFragment.Id\n        val childInfo = childrenInfoByName[fragment.id] ?: error(\"Invalid fragment '$fragment'.\")\n        childInfo.schema.change(\n            path.append(fragment),\n            childInfo.property.get(value),\n            childValue,\n            eventsBus,\n        ) {\n            childInfo.property.set(value, it)\n        }\n    }\n\n    override fun childrenStatesContainer(): ParentState =\n        ClassState(childrenInfoByName.mapValues { (_, info) -> info.schema })\n\n    /**\n     * Returns a new instance of the class represented by this schema given a map of [childValues]\n     * and their [childProps], mapping the name of the arguments to their values and properties\n     * respectively.\n     */\n    private fun newInstance(\n        childValues: Map<String, Any?>,\n        childProps: Map<String, KMutableProperty1<T, Any?>>,\n    ): T =\n        construct?.invoke(childValues, childProps)\n            ?: constructFromKClass(kClass, childValues, childProps)\n\n    public companion object {\n        /**\n         * Function used to build a schema representing values of a given class [T]. The children\n         * schemas are built via a class schema builder.\n         *\n         * Example defining a `PersonSchema` for a class `Person` with `name` and `married`\n         * properties:\n         * ```kotlin\n         * data class Person(var name: String, var married: Boolean)\n         *\n         * val personSchema = ClassSchema {\n         *     Person::name { StringSchema() }\n         *     Person::married { BooleanSchema() }\n         * }\n         * ```\n         *\n         * This schema will attempt to create values of the provided class by calling its primary\n         * constructor and matching argument names to children names. E.g. the above `PersonSchema`\n         * will attempt to create an instance of `Person` by calling `Person(name, married)`. If the\n         * class' primary constructor has parameters with different names or requires other\n         * non-default arguments, then the user must provide a [construct] function, instructing how\n         * to properly construct the class.\n         */\n        public inline operator fun <reified T : Any> invoke(\n            validations: Iterable<Validation<T>> = emptyList(),\n            initialValue: T? = null,\n            noinline construct: ConstructorFunction<T>? = null,\n            @BuilderInference builder: ClassSchemaBuilder<T>.() -> Unit,\n        ): ClassSchema<T> {\n            val schemaBuilder = ClassSchemaBuilder<T>()\n            schemaBuilder.builder()\n            return ClassSchema(\n                T::class,\n                schemaBuilder.childrenSchemas,\n                validations,\n                initialValue,\n                construct,\n            )\n        }\n\n        public inline operator fun <reified T : Any> invoke(\n            vararg validations: Validation<T>,\n            initialValue: T? = null,\n            noinline construct: ConstructorFunction<T>? = null,\n            @BuilderInference builder: ClassSchemaBuilder<T>.() -> Unit,\n        ): ClassSchema<T> = ClassSchema(validations.asIterable(), initialValue, construct, builder)\n    }\n}\n\n/**\n * Builder of a class schema. Use the [ClassSchema] constructor function to build a class schema.\n */\npublic class ClassSchemaBuilder<T : Any> {\n    @PublishedApi\n    internal val childrenSchemas: MutableMap<KMutableProperty1<T, *>, Schema<*>> = mutableMapOf()\n\n    /** Declare that the child schema of property [property] is [schema]. */\n    public fun <TChild> childSchema(\n        property: KMutableProperty1<T, TChild>,\n        schema: Schema<TChild>,\n    ) {\n        childrenSchemas[property] = schema\n    }\n\n    /**\n     * Declare that the child schema of the receiving property is the one returned by\n     * [schemaBuilder].\n     */\n    public inline operator fun <TChild> KMutableProperty1<T, TChild>.invoke(\n        @BuilderInference schemaBuilder: () -> Schema<TChild>\n    ) {\n        childSchema(this, schemaBuilder())\n    }\n}\n\n/** Class responsible for holding the states of the children of a class. */\npublic class ClassState(private val childrenSchemas: Map<String, Schema<*>>) : ParentState {\n    /** Map containing the state of each child of the class. */\n    private val childrenStates = HashMap<String, State?>(childrenSchemas.size)\n\n    override fun childrenStates(\n        path: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<StateInfo<*>> = sequence {\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for ((name, schema) in childrenSchemas) {\n                yield(StateInfo(childrenStates[name], schema, path + AbsolutePathFragment.Id(name)))\n            }\n        } else {\n            fragment as AbsolutePathFragment.Id\n            val schema = childrenSchemas[fragment.id] ?: error(\"Invalid fragment '$fragment'.\")\n            yield(StateInfo(childrenStates[fragment.id], schema, path + fragment))\n        }\n    }\n\n    override fun setState(fragment: AbsolutePathFragment.Id, state: State?) {\n        childrenStates[fragment.id] = state\n    }\n}\n","package io.kform.schemas\n\nimport io.kform.TypeInfo\nimport io.kform.Validation\nimport io.kform.schemas.util.commonRestrictions\nimport io.kform.schemas.util.comparableBoundsRestrictions\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\n\n/** Schema representing numeric values of type [Double]. */\npublic open class DoubleSchema(\n    validations: Iterable<Validation<Double>> = emptyList(),\n    override val initialValue: Double = 0.0,\n) : AbstractSimpleSchema<Double>(validations) {\n    public constructor(\n        vararg validations: Validation<Double>,\n        initialValue: Double = 0.0,\n    ) : this(validations.asIterable(), initialValue)\n\n    override val typeInfo: TypeInfo =\n        TypeInfo(\n            Double::class,\n            restrictions =\n                commonRestrictions(validations) + comparableBoundsRestrictions(validations),\n        )\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(0.0) == true\n\n    override suspend fun fromAny(value: Any?): Double =\n        when (value) {\n            is Number -> value.toDouble()\n            is String -> value.toDouble()\n            else -> throw IllegalArgumentException(\"Cannot convert value '$value' to Double.\")\n        }\n}\n","package io.kform.schemas\n\nimport io.kform.TypeInfo\nimport io.kform.Validation\nimport io.kform.datatypes.File\nimport io.kform.datatypes.emplyPlaceholderFile\nimport io.kform.schemas.util.acceptedFileTypesRestrictions\nimport io.kform.schemas.util.commonRestrictions\nimport io.kform.schemas.util.sizeBoundsRestrictions\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\n\n/** Schema representing values of type [File]. */\npublic open class FileSchema(\n    validations: Iterable<Validation<File>> = emptyList(),\n    override val initialValue: File = emplyPlaceholderFile(),\n) : AbstractSimpleSchema<File>(validations) {\n    public constructor(\n        vararg validations: Validation<File>,\n        initialValue: File = emplyPlaceholderFile(),\n    ) : this(validations.asIterable(), initialValue)\n\n    override val typeInfo: TypeInfo =\n        TypeInfo(\n            File::class,\n            restrictions =\n                commonRestrictions(validations) +\n                    sizeBoundsRestrictions(validations) +\n                    acceptedFileTypesRestrictions(validations),\n        )\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(emplyPlaceholderFile()) == true\n}\n","@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform.schemas\n\nimport io.kform.*\nimport io.kform.datatypes.Table\nimport io.kform.schemas.util.commonRestrictions\nimport io.kform.schemas.util.sizeBoundsRestrictions\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.math.min\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\nimport kotlinx.coroutines.currentCoroutineContext\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\nimport kotlinx.coroutines.isActive\n\n/** Schema representing lists of values of type [T] with a schema of type [TSchema]. */\npublic open class ListSchema<T, TSchema : Schema<T>>(\n    elementsSchema: TSchema,\n    validations: Iterable<Validation<List<T>>> = emptyList(),\n    override val initialValue: List<T> = emptyList(),\n) : AbstractCollectionSchema<List<T>, T, TSchema>(elementsSchema) {\n    override val typeInfo: TypeInfo =\n        TypeInfo(\n            List::class,\n            arguments = listOf(elementsSchema.typeInfo),\n            restrictions = commonRestrictions(validations) + sizeBoundsRestrictions(validations),\n        )\n\n    override val validations: List<Validation<List<T>>> = validations.toList()\n\n    public constructor(\n        validations: Iterable<Validation<List<T>>> = emptyList(),\n        initialValue: List<T> = emptyList(),\n        @BuilderInference builder: () -> TSchema,\n    ) : this(builder(), validations, initialValue)\n\n    public constructor(\n        vararg validations: Validation<List<T>>,\n        initialValue: List<T> = emptyList(),\n        @BuilderInference builder: () -> TSchema,\n    ) : this(builder(), validations.asIterable(), initialValue)\n\n    override suspend fun clone(value: List<T>): List<T> =\n        value.map { el -> elementsSchema.clone(el) }\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(emptyList<T>()) == true &&\n            (if (type.classifier == List::class)\n                type.arguments[0].type == null ||\n                    elementsSchema.assignableTo(type.arguments[0].type!!)\n            else true)\n\n    /** Whether the provided id fragment can be converted to an integer. */\n    private fun isValidIndexId(fragment: AbsolutePathFragment.Id): Boolean =\n        fragment.id.matches(INDEX_REGEX)\n\n    override fun isValidChildSchemaFragment(fragment: AbsolutePathFragment): Boolean =\n        fragment is AbsolutePathFragment.CollectionEnd ||\n            (fragment is AbsolutePathFragment.Id && isValidIndexId(fragment))\n\n    override suspend fun isValidChildFragment(\n        value: List<T>,\n        fragment: AbsolutePathFragment,\n    ): Boolean =\n        (fragment is AbsolutePathFragment.Id &&\n            isValidIndexId(fragment) &&\n            fragment.id.toInt() < value.size)\n\n    override fun children(\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n        value: List<T>,\n        fragment: AbsolutePathFragment,\n    ): Flow<ValueInfo<T>> = flow {\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for ((i, elem) in value.withIndex()) {\n                emit(\n                    ValueInfo(\n                        elem,\n                        elementsSchema,\n                        path.append(AbsolutePathFragment.Id(i)),\n                        schemaPath.append(AbsolutePathFragment.Wildcard),\n                    )\n                )\n            }\n        } else {\n            fragment as AbsolutePathFragment.Id\n            val idx = fragment.id.toInt()\n            if (idx < value.size) { // `idx == value.size` is considered valid\n                emit(\n                    ValueInfo(\n                        value[idx],\n                        elementsSchema,\n                        path.append(fragment),\n                        schemaPath.append(AbsolutePathFragment.Wildcard),\n                    )\n                )\n            }\n        }\n    }\n\n    @Suppress(\"UNCHECKED_CAST\")\n    private fun fromAny(value: Any?): List<T> =\n        when (value) {\n            is List<*> -> value as List<T>\n            is Collection<*> -> (value as Collection<T>).toList()\n            is Table<*> -> (value as Table<T>).values.toList()\n            is Array<*> -> (value as Array<T>).toList()\n            else -> throw IllegalArgumentException(\"Cannot convert value '$value' to List.\")\n        }\n\n    override suspend fun init(\n        path: AbsolutePath,\n        fromValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: List<T>) -> Unit,\n    ) {\n        val fromList = fromAny(fromValue)\n        val newValue = ArrayList<T>(fromList.size)\n        for ((i, elem) in fromList.withIndex()) {\n            if (!currentCoroutineContext().isActive) break // Don't do more work than necessary\n            elementsSchema.init(path.append(AbsolutePathFragment.Id(i)), elem, eventsBus) {\n                newValue += it\n            }\n        }\n        setValue(newValue)\n        eventsBus.emit(ValueEvent.Init(newValue, path, this))\n    }\n\n    override suspend fun change(\n        path: AbsolutePath,\n        value: List<T>,\n        intoValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: List<T>) -> Unit,\n    ) {\n        val intoList = fromAny(intoValue)\n        value as ArrayList<T>\n        val curSize = value.size\n        val newSize = intoList.size\n        for (i in 0 until min(curSize, newSize)) {\n            if (!currentCoroutineContext().isActive) break // Don't do more work than necessary\n            elementsSchema.change(\n                path.append(AbsolutePathFragment.Id(i)),\n                value[i],\n                intoList[i],\n                eventsBus,\n            ) {\n                value[i] = it\n            }\n        }\n        if (curSize > newSize) {\n            for (i in curSize - 1 downTo newSize) {\n                if (!currentCoroutineContext().isActive) break // Don't do more work than necessary\n                val id = AbsolutePathFragment.Id(i)\n                val oldChild = value[i]\n                elementsSchema.destroy(path.append(id), oldChild, eventsBus) { value.removeLast() }\n                eventsBus.emit(ValueEvent.Remove(value, oldChild, id, path, this))\n            }\n        } else if (curSize < newSize) {\n            value.ensureCapacity(newSize)\n            for (i in curSize until newSize) {\n                if (!currentCoroutineContext().isActive) break // Don't do more work than necessary\n                val id = AbsolutePathFragment.Id(i)\n                elementsSchema.init(path.append(id), intoList[i], eventsBus) { value += it }\n                eventsBus.emit(ValueEvent.Add(value, value[i], id, path, this))\n            }\n        }\n        setValue(value)\n    }\n\n    override suspend fun destroy(\n        path: AbsolutePath,\n        value: List<T>,\n        eventsBus: SchemaEventsBus,\n        removeValue: suspend (value: List<T>) -> Unit,\n    ) {\n        removeValue(value)\n        eventsBus.emit(ValueEvent.Destroy(value, path, this))\n        for (i in value.lastIndex downTo 0) {\n            elementsSchema.destroy(path.append(AbsolutePathFragment.Id(i)), value[i], eventsBus) {}\n        }\n    }\n\n    override suspend fun isValidSetFragment(\n        value: List<T>,\n        fragment: AbsolutePathFragment,\n    ): Boolean =\n        fragment is AbsolutePathFragment.CollectionEnd ||\n            (fragment is AbsolutePathFragment.Id &&\n                isValidIndexId(fragment) &&\n                fragment.id.toInt() < value.size)\n\n    override suspend fun set(\n        path: AbsolutePath,\n        value: List<T>,\n        fragment: AbsolutePathFragment,\n        childValue: Any?,\n        eventsBus: SchemaEventsBus,\n    ) {\n        value as ArrayList<T>\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for ((idx, elem) in value.withIndex()) {\n                elementsSchema.change(\n                    path.append(AbsolutePathFragment.Id(idx)),\n                    elem,\n                    childValue,\n                    eventsBus,\n                ) {\n                    value[idx] = it\n                }\n            }\n        } else {\n            val size = value.size\n            val id =\n                if (fragment is AbsolutePathFragment.CollectionEnd) AbsolutePathFragment.Id(size)\n                else fragment\n            val idx = (id as AbsolutePathFragment.Id).id.toInt()\n            if (idx == size) {\n                elementsSchema.init(path.append(id), childValue, eventsBus) { value += it }\n                eventsBus.emit(ValueEvent.Add(value, value[idx], id, path, this))\n            } else {\n                elementsSchema.change(path.append(id), value[idx], childValue, eventsBus) {\n                    value[idx] = it\n                }\n            }\n        }\n    }\n\n    override suspend fun isValidRemoveFragment(\n        value: List<T>,\n        fragment: AbsolutePathFragment,\n    ): Boolean =\n        (fragment is AbsolutePathFragment.Id &&\n            isValidIndexId(fragment) &&\n            fragment.id.toInt() < value.size)\n\n    override suspend fun remove(\n        path: AbsolutePath,\n        value: List<T>,\n        fragment: AbsolutePathFragment,\n        eventsBus: SchemaEventsBus,\n    ) {\n        value as ArrayList<T>\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for (i in value.lastIndex downTo 0) {\n                val id = AbsolutePathFragment.Id(i)\n                val oldChild = value.last()\n                elementsSchema.destroy(path.append(id), oldChild, eventsBus) { value.removeLast() }\n                eventsBus.emit(ValueEvent.Remove(value, oldChild, id, path, this))\n            }\n        } else {\n            val idx = (fragment as AbsolutePathFragment.Id).id.toInt()\n            for (i in idx until value.lastIndex) {\n                elementsSchema.change(\n                    path.append(AbsolutePathFragment.Id(i)),\n                    value[i],\n                    value[i + 1],\n                    eventsBus,\n                ) {\n                    value[i] = it\n                }\n            }\n            val id = AbsolutePathFragment.Id(value.lastIndex)\n            val oldChild = value.last()\n            elementsSchema.destroy(path.append(id), oldChild, eventsBus) { value.removeLast() }\n            eventsBus.emit(ValueEvent.Remove(value, oldChild, id, path, this))\n        }\n    }\n\n    override fun childrenStatesContainer(): CollectionState = ListState(elementsSchema)\n\n    public companion object {\n        /** Regex used to determine if a certain identifier can be converted to an index. */\n        private val INDEX_REGEX = Regex(\"^(0|[1-9]\\\\d*)\\$\")\n    }\n}\n\n/** Class responsible for holding the states of the children of a list. */\npublic class ListState(private val elementsSchema: Schema<*>) : CollectionState {\n    /** List containing the state of each element of the list. */\n    private val childrenStatesList = mutableListOf<State?>()\n\n    override fun childrenStates(\n        path: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<StateInfo<*>> = sequence {\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for ((idx, state) in childrenStatesList.withIndex()) {\n                yield(StateInfo(state, elementsSchema, path + AbsolutePathFragment.Id(idx)))\n            }\n        } else {\n            fragment as AbsolutePathFragment.Id\n            val idx = fragment.id.toInt()\n            if (idx < childrenStatesList.size) {\n                yield(StateInfo(childrenStatesList[idx], elementsSchema, path + fragment))\n            }\n        }\n    }\n\n    override fun hasState(fragment: AbsolutePathFragment.Id): Boolean =\n        fragment.id.toInt() < childrenStatesList.size\n\n    override fun setState(fragment: AbsolutePathFragment.Id, state: State?) {\n        val idx = fragment.id.toInt()\n        if (idx < childrenStatesList.size) {\n            childrenStatesList[idx] = state\n        } else if (idx == childrenStatesList.size) {\n            childrenStatesList.add(state)\n        }\n    }\n\n    override fun removeState(fragment: AbsolutePathFragment.Id) {\n        childrenStatesList.removeAt(fragment.id.toInt())\n    }\n}\n","@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform.schemas\n\nimport io.kform.*\nimport io.kform.schemas.util.commonRestrictions\nimport io.kform.validations.*\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.jvm.JvmName\nimport kotlin.jvm.JvmOverloads\nimport kotlin.jvm.JvmStatic\nimport kotlin.reflect.KType\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.emitAll\nimport kotlinx.coroutines.flow.emptyFlow\nimport kotlinx.coroutines.flow.flow\n\n/** Schema representing nullable values. */\npublic interface NullableSchema<T> : Schema<T?> {\n    public val innerSchema: Schema<T>\n\n    public companion object {\n        /** Function that builds a schema representing nullable values of type [T]. */\n        @JvmOverloads\n        @JvmStatic\n        @JvmName(\"create\")\n        @Suppress(\"UNCHECKED_CAST\")\n        public operator fun <T> invoke(\n            validations: Iterable<Validation<T?>> = emptyList(),\n            initialValue: T? = null,\n            @BuilderInference builder: () -> Schema<T>,\n        ): NullableSchema<T> =\n            when (val schema = builder()) {\n                is CollectionSchema<*, *> -> {\n                    schema as CollectionSchema<T, Any?>\n                    NullableCollectionSchema(schema, validations, initialValue)\n                }\n                is ParentSchema<*> -> {\n                    schema as ParentSchema<T>\n                    NullableParentSchema<T, Any?, ParentSchema<T>>(\n                        schema,\n                        validations,\n                        initialValue,\n                    )\n                }\n                else -> NullableSimpleSchema(schema, validations, initialValue)\n            }\n\n        /** Function that builds a schema representing nullable values of type [T]. */\n        @JvmOverloads\n        @JvmStatic\n        @JvmName(\"create\")\n        public operator fun <T> invoke(\n            vararg validations: Validation<T?>,\n            initialValue: T? = null,\n            @BuilderInference builder: () -> Schema<T>,\n        ): NullableSchema<T> = NullableSchema(validations.asIterable(), initialValue, builder)\n    }\n}\n\n/**\n * Schema representing nullable simple values of type [T] represented by schemas of type [TSchema].\n */\ninternal open class NullableSimpleSchema<T, TSchema : Schema<T>>(\n    final override val innerSchema: TSchema,\n    validations: Iterable<Validation<T?>> = emptyList(),\n    override val initialValue: T? = null,\n) : Schema<T?>, NullableSchema<T> {\n    init {\n        require(innerSchema !is NullableSchema<*>) {\n            \"Cannot create a nullable schema of a nullable schema.\"\n        }\n    }\n\n    override val typeInfo: TypeInfo =\n        innerSchema.typeInfo.copy(\n            nullable = true,\n            restrictions =\n                buildMap {\n                    putAll(innerSchema.typeInfo.restrictions)\n                    // Merge allowed and disallowed values of this schema with the inner schema's,\n                    // overwriting the restrictions added above, if necessary\n                    putAll(commonRestrictions(validations + innerSchema.validations))\n                    // If this schema doesn't have a [Required] validation, then `null` values may\n                    // be allowed, in which case the schema shouldn't be marked as required, even if\n                    // the inner schema is\n                    if (validations.none { it is Required }) {\n                        remove(\"required\")\n                    }\n                },\n        )\n\n    /** Wrapper over [validation] in order to handle `null` values. */\n    class WrappedNullableValidation<T>(val validation: Validation<T>) : Validation<T?>() {\n        override val dependencies: Map<String, DependencyInfo> = validation.dependencies\n        override val dependsOnDescendants: Boolean = validation.dependsOnDescendants\n        override val externalContextDependencies: Set<String> =\n            validation.externalContextDependencies\n\n        override fun toString(): String = \"$validation?\"\n\n        override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n            if (value != null) {\n                validation.run { emitAll(validate()) }\n            }\n        }\n    }\n\n    /**\n     * Class holding the state of a stateful validation. Used to be able to change the state during\n     * `validateFromState`.\n     */\n    // NOTE: We wrap the state in order to be able to update it during [validateFromState]; this is\n    //  safe because the manager keeps a lock on the state during validation, so no concurrent\n    //  updating of state can occur\n    data class WrappedState<TState>(var innerState: TState?, var isKnown: Boolean) {\n        fun setKnownState(state: TState) {\n            innerState = state\n            isKnown = true\n        }\n\n        fun setUnknownState() {\n            innerState = null\n            isKnown = false\n        }\n    }\n\n    /** Wrapper over a [stateful validation][validation] in order to handle `null` values. */\n    class WrappedNullableStatefulValidation<T, TState>(\n        private val nullableSchema: Schema<T?>,\n        private val schema: Schema<T>,\n        val validation: StatefulValidation<T, TState>,\n    ) : StatefulValidation<T?, WrappedState<TState>>() {\n        override val dependencies: Map<String, DependencyInfo> = validation.dependencies\n        override val dependsOnDescendants: Boolean = validation.dependsOnDescendants\n        override val externalContextDependencies: Set<String> =\n            validation.externalContextDependencies\n\n        override val observers: List<Observer<Any?, WrappedState<TState>>> =\n            validation.observers.map { observer ->\n                Observer(observer.toObserve, updateStateFn(observer))\n            }\n\n        override fun toString(): String = \"$validation?\"\n\n        override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n            if (value != null) {\n                validation.run { emitAll(validate()) }\n            }\n        }\n\n        override suspend fun ValidationContext.initState(): WrappedState<TState> =\n            if (value != null) WrappedState(validation.run { initState() }, true)\n            else WrappedState(null, false)\n\n        private fun updateStateFn(\n            observer: Observer<Any?, TState>\n        ): UpdateStateFn<Any?, WrappedState<TState>> = fn@{ state, event ->\n            // Do nothing if we don't know the state of the validation (it will be set by\n            // [validateFromState] when appropriate).\n            if (!state.isKnown) {\n                return@fn state\n            }\n\n            // In case the stateful validation is observing the path of the value it is\n            // validating,\n            // we need to replace the event's schema and make sure that it never sees `null`.\n            @Suppress(\"UNCHECKED_CAST\")\n            val replacedEvent =\n                if (event.schema !== nullableSchema) event\n                else\n                    when (event) {\n                        // This should never happen (the manager should never emit init/destroy\n                        // events for the value being validated).\n                        is ValueEvent.Init,\n                        is ValueEvent.Destroy ->\n                            error(\n                                \"Nullable stateful validation received an [init]/[destroy] \" +\n                                    \"event for the value being validated.\"\n                            )\n                        is ValueEvent.Change<*> -> {\n                            event as ValueEvent.Change<T?>\n                            if (event.oldValue == null || event.value == null) {\n                                return@fn WrappedState(null, false)\n                            }\n                            ValueEvent.Change(event.oldValue, event.value, event.path, schema)\n                        }\n                        is ValueEvent.Add<*, *> ->\n                            ValueEvent.Add(\n                                event.value as T,\n                                event.addedValue,\n                                event.id,\n                                event.path,\n                                schema as CollectionSchema<T, Any?>,\n                            )\n                        is ValueEvent.Remove<*, *> ->\n                            ValueEvent.Remove(\n                                event.value as T,\n                                event.removedValue,\n                                event.id,\n                                event.path,\n                                schema as CollectionSchema<T, Any?>,\n                            )\n                    }\n\n            @Suppress(\"UNCHECKED_CAST\")\n            return@fn WrappedState(\n                observer.updateState(state.innerState as TState, replacedEvent as ValueEvent<Any?>),\n                true,\n            )\n        }\n\n        @Suppress(\"UNCHECKED_CAST\")\n        override suspend fun destroyState(state: WrappedState<TState>): Unit =\n            if (state.isKnown) validation.destroyState(state.innerState as TState) else Unit\n\n        override fun ValidationContext.validateFromState(\n            state: WrappedState<TState>\n        ): Flow<ValidationIssue> = flow {\n            if (value != null) {\n                if (!state.isKnown) {\n                    state.setKnownState(validation.run { initState() })\n                }\n                @Suppress(\"UNCHECKED_CAST\")\n                validation.run { emitAll(validateFromState(state.innerState as TState)) }\n            } else if (state.isKnown) {\n                state.setUnknownState()\n            }\n        }\n    }\n\n    override val validations: List<Validation<T?>> =\n        validations +\n            buildList {\n                for (validation in innerSchema.validations) {\n                    // Wrap the inner schema validations\n                    add(\n                        if (validation is StatefulValidation<*, *>) {\n                            @Suppress(\"UNCHECKED_CAST\") (validation as StatefulValidation<T, Any?>)\n                            WrappedNullableStatefulValidation(\n                                this@NullableSimpleSchema,\n                                innerSchema,\n                                validation,\n                            )\n                        } else WrappedNullableValidation(validation)\n                    )\n                }\n            }\n\n    override suspend fun clone(value: T?): T? =\n        if (value == null) null else innerSchema.clone(value)\n\n    override fun assignableTo(type: KType): Boolean =\n        type.isMarkedNullable && innerSchema.assignableTo(type)\n\n    /**\n     * Changes [event] when its path is [path] (the path of this schema) so that it references this\n     * (nullable) schema instead of [innerSchema]. Returns [event] when nothing needs to be changed\n     * or the new (replaced) event otherwise.\n     *\n     * @param replaceWithChange `Init` and `Destroy` events are replaced with `Change` to/from\n     *   `null`.\n     */\n    protected open fun replaceEvent(\n        path: AbsolutePath,\n        event: ValueEvent<*>,\n        replaceWithChange: Boolean,\n    ): ValueEvent<*> {\n        if (path != event.path) {\n            return event\n        }\n        @Suppress(\"UNCHECKED_CAST\")\n        return when (event) {\n            is ValueEvent.Init<*> ->\n                if (replaceWithChange) ValueEvent.Change(null, event.value as T, path, this)\n                else ValueEvent.Init(event.value as T, path, this)\n            is ValueEvent.Change<*> ->\n                ValueEvent.Change(event.oldValue as T, event.value as T, path, this)\n            is ValueEvent.Destroy<*> ->\n                if (replaceWithChange) ValueEvent.Change(event.oldValue as T, null, path, this)\n                else ValueEvent.Destroy(event.oldValue as T, path, this)\n            else -> event\n        }\n    }\n\n    /**\n     * Runs [fn] with a custom events bus where all events emitted to [eventsBus] are mapped through\n     * [replaceEvent]: this makes sure that no schema event whose path is [path] (the path of this\n     * schema) references a schema that isn't this one.\n     *\n     * @param replaceWithChange `Init` and `Destroy` events are replaced with `Change` to/from\n     *   `null`.\n     */\n    protected suspend inline fun withReplacedEvents(\n        path: AbsolutePath,\n        eventsBus: SchemaEventsBus,\n        replaceWithChange: Boolean,\n        crossinline fn: suspend (eventsBus: SchemaEventsBus) -> Unit,\n    ) =\n        fn(\n            object : SchemaEventsBus {\n                override suspend fun emit(event: ValueEvent<*>) {\n                    eventsBus.emit(replaceEvent(path, event, replaceWithChange))\n                }\n            }\n        )\n\n    override suspend fun init(\n        path: AbsolutePath,\n        fromValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: T?) -> Unit,\n    ) {\n        if (fromValue == null) {\n            setValue(null)\n            eventsBus.emit(ValueEvent.Init(fromValue, path, this))\n        } else {\n            withReplacedEvents(path, eventsBus, false) { replacedEventsBus ->\n                innerSchema.init(path, fromValue, replacedEventsBus, setValue)\n            }\n        }\n    }\n\n    override suspend fun change(\n        path: AbsolutePath,\n        value: T?,\n        intoValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: T?) -> Unit,\n    ) {\n        if (value == null && intoValue == null) {\n            setValue(null)\n        } else {\n            withReplacedEvents(path, eventsBus, true) { replacedEventsBus ->\n                if (value == null) {\n                    innerSchema.init(path, intoValue, replacedEventsBus, setValue)\n                } else if (intoValue == null) {\n                    innerSchema.destroy(path, value, replacedEventsBus) { setValue(null) }\n                } else {\n                    innerSchema.change(path, value, intoValue, replacedEventsBus, setValue)\n                }\n            }\n        }\n    }\n\n    override suspend fun destroy(\n        path: AbsolutePath,\n        value: T?,\n        eventsBus: SchemaEventsBus,\n        removeValue: suspend (value: T?) -> Unit,\n    ) {\n        if (value == null) {\n            removeValue(null)\n            eventsBus.emit(ValueEvent.Destroy(null, path, this))\n        } else {\n            withReplacedEvents(path, eventsBus, false) { replacedEventsBus ->\n                innerSchema.destroy(path, value, replacedEventsBus, removeValue)\n            }\n        }\n    }\n}\n\n/**\n * Schema representing nullable parent values of type [T] and schema [TSchema] with children of type\n * [TChildren].\n */\ninternal open class NullableParentSchema<T, TChildren, TSchema : ParentSchema<T>>(\n    schema: TSchema,\n    validations: Iterable<Validation<T?>> = emptyList(),\n    initialValue: T? = null,\n) : NullableSimpleSchema<T, TSchema>(schema, validations, initialValue), ParentSchema<T?> {\n    override val supportsConcurrentSets: Boolean = innerSchema.supportsConcurrentSets\n\n    override fun isValidChildSchemaFragment(fragment: AbsolutePathFragment): Boolean =\n        innerSchema.isValidChildSchemaFragment(fragment)\n\n    @Suppress(\"UNCHECKED_CAST\")\n    override fun childrenSchemas(\n        path: AbsolutePath,\n        queriedPath: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<SchemaInfo<TChildren>> =\n        innerSchema.childrenSchemas(path, queriedPath, fragment) as Sequence<SchemaInfo<TChildren>>\n\n    override suspend fun isValidChildFragment(value: T?, fragment: AbsolutePathFragment): Boolean =\n        value != null && innerSchema.isValidChildFragment(value, fragment)\n\n    @Suppress(\"UNCHECKED_CAST\")\n    override fun children(\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n        value: T?,\n        fragment: AbsolutePathFragment,\n    ): Flow<ValueInfo<TChildren>> =\n        if (value != null)\n            innerSchema.children(path, schemaPath, value, fragment) as Flow<ValueInfo<TChildren>>\n        else emptyFlow()\n\n    override suspend fun isValidSetFragment(value: T?, fragment: AbsolutePathFragment): Boolean =\n        value != null && innerSchema.isValidSetFragment(value, fragment)\n\n    override suspend fun set(\n        path: AbsolutePath,\n        value: T?,\n        fragment: AbsolutePathFragment,\n        childValue: Any?,\n        eventsBus: SchemaEventsBus,\n    ) {\n        if (value == null) {\n            throw ExceptionAtPath(path, \"Cannot set child of null.\")\n        }\n        withReplacedEvents(path, eventsBus, false) { replacedEventsBus ->\n            innerSchema.set(path, value, fragment, childValue, replacedEventsBus)\n        }\n    }\n\n    override fun childrenStatesContainer(): ParentState = innerSchema.childrenStatesContainer()\n}\n\n/**\n * Schema representing nullable collections of type [T] and schema [TSchema] with children of type\n * [TChildren].\n */\ninternal open class NullableCollectionSchema<\n    T,\n    TChildren,\n    TSchema : CollectionSchema<T, TChildren>,\n>(schema: TSchema, validations: Iterable<Validation<T?>> = emptyList(), initialValue: T? = null) :\n    NullableParentSchema<T, TChildren, TSchema>(schema, validations, initialValue),\n    CollectionSchema<T?, TChildren> {\n    override val supportsConcurrentRemoves: Boolean = innerSchema.supportsConcurrentRemoves\n\n    // Replace additional actions (`Add` and `Remove`)\n    override fun replaceEvent(\n        path: AbsolutePath,\n        event: ValueEvent<*>,\n        replaceWithChange: Boolean,\n    ): ValueEvent<*> {\n        if (path != event.path) {\n            return event\n        }\n        @Suppress(\"UNCHECKED_CAST\")\n        return when (event) {\n            is ValueEvent.Add<*, *> ->\n                ValueEvent.Add(\n                    event.value as T,\n                    event.addedValue as TChildren,\n                    event.id,\n                    path,\n                    this,\n                )\n            is ValueEvent.Remove<*, *> ->\n                ValueEvent.Remove(\n                    event.value as T,\n                    event.removedValue as TChildren,\n                    event.id,\n                    path,\n                    this,\n                )\n            else -> super.replaceEvent(path, event, replaceWithChange)\n        }\n    }\n\n    override suspend fun isValidRemoveFragment(value: T?, fragment: AbsolutePathFragment): Boolean =\n        value != null && innerSchema.isValidRemoveFragment(value, fragment)\n\n    override suspend fun remove(\n        path: AbsolutePath,\n        value: T?,\n        fragment: AbsolutePathFragment,\n        eventsBus: SchemaEventsBus,\n    ) {\n        if (value == null) {\n            throw ExceptionAtPath(path, \"Cannot remove children from null.\")\n        }\n        withReplacedEvents(path, eventsBus, false) { replacedEventsBus ->\n            innerSchema.remove(path, value, fragment, replacedEventsBus)\n        }\n    }\n\n    override fun childrenStatesContainer(): CollectionState = innerSchema.childrenStatesContainer()\n}\n","package io.kform.schemas\n\nimport io.kform.TypeInfo\nimport io.kform.Validation\nimport io.kform.schemas.util.commonRestrictions\nimport io.kform.schemas.util.lengthBoundsRestrictions\nimport io.kform.schemas.util.patternRestrictions\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\n\n/** Schema representing values of type [String]. */\npublic open class StringSchema(\n    validations: Iterable<Validation<String>> = emptyList(),\n    override val initialValue: String = \"\",\n) : AbstractSimpleSchema<String>(validations) {\n    public constructor(\n        vararg validations: Validation<String>,\n        initialValue: String = \"\",\n    ) : this(validations.asIterable(), initialValue)\n\n    override val typeInfo: TypeInfo =\n        TypeInfo(\n            String::class,\n            restrictions =\n                commonRestrictions(validations) +\n                    lengthBoundsRestrictions(validations) +\n                    patternRestrictions(validations),\n        )\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(\"\") == true\n\n    override suspend fun fromAny(value: Any?): String = value.toString()\n}\n","@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform.schemas\n\nimport io.kform.*\nimport io.kform.datatypes.*\nimport io.kform.schemas.util.commonRestrictions\nimport io.kform.schemas.util.sizeBoundsRestrictions\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\nimport kotlinx.coroutines.currentCoroutineContext\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\nimport kotlinx.coroutines.isActive\n\n/** Schema representing a table of values of type [T] with a schema of type [TSchema]. */\npublic open class TableSchema<T, TSchema : Schema<T>>(\n    elementsSchema: TSchema,\n    validations: Iterable<Validation<Table<T>>> = emptyList(),\n    override val initialValue: Table<T> = tableOf(),\n) : AbstractCollectionSchema<Table<T>, T, TSchema>(elementsSchema) {\n    override val typeInfo: TypeInfo =\n        TypeInfo(\n            Table::class,\n            arguments = listOf(elementsSchema.typeInfo),\n            restrictions = commonRestrictions(validations) + sizeBoundsRestrictions(validations),\n        )\n\n    override val validations: List<Validation<Table<T>>> = validations.toList()\n\n    public constructor(\n        validations: List<Validation<Table<T>>> = emptyList(),\n        initialValue: Table<T> = tableOf(),\n        @BuilderInference builder: () -> TSchema,\n    ) : this(builder(), validations, initialValue)\n\n    public constructor(\n        vararg validations: Validation<Table<T>>,\n        initialValue: Table<T> = tableOf(),\n        @BuilderInference builder: () -> TSchema,\n    ) : this(builder(), validations.asIterable(), initialValue)\n\n    override suspend fun clone(value: Table<T>): Table<T> {\n        val table = Table<T>(value.size)\n        for ((id, rowValue) in value.rows) {\n            table[id] = elementsSchema.clone(rowValue)\n        }\n        return table\n    }\n\n    override fun assignableTo(type: KType): Boolean =\n        (type.classifier as? KClass<*>)?.isInstance(initialValue) == true &&\n            (if (type.classifier == Table::class)\n                type.arguments[0].type == null ||\n                    elementsSchema.assignableTo(type.arguments[0].type!!)\n            else true)\n\n    /** Whether the provided id fragment can be converted to a table row id. */\n    private fun isValidRowId(fragment: AbsolutePathFragment.Id): Boolean =\n        fragment.id.matches(ROW_ID_REGEX)\n\n    override fun isValidChildSchemaFragment(fragment: AbsolutePathFragment): Boolean =\n        fragment is AbsolutePathFragment.CollectionEnd ||\n            (fragment is AbsolutePathFragment.Id && isValidRowId(fragment))\n\n    override suspend fun isValidChildFragment(\n        value: Table<T>,\n        fragment: AbsolutePathFragment,\n    ): Boolean =\n        (fragment is AbsolutePathFragment.Id &&\n            isValidRowId(fragment) &&\n            fragment.id.toInt() in value)\n\n    override fun children(\n        path: AbsolutePath,\n        schemaPath: AbsolutePath,\n        value: Table<T>,\n        fragment: AbsolutePathFragment,\n    ): Flow<ValueInfo<T>> = flow {\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for ((id, elem) in value.rows) {\n                emit(\n                    ValueInfo(\n                        elem,\n                        elementsSchema,\n                        path.append(AbsolutePathFragment.Id(id)),\n                        schemaPath.append(AbsolutePathFragment.Wildcard),\n                    )\n                )\n            }\n        } else {\n            fragment as AbsolutePathFragment.Id\n            val id = fragment.id.toInt()\n            if (id in value) {\n                emit(\n                    ValueInfo(\n                        value[id]!!,\n                        elementsSchema,\n                        path.append(fragment),\n                        schemaPath.append(AbsolutePathFragment.Wildcard),\n                    )\n                )\n            }\n        }\n    }\n\n    @Suppress(\"UNCHECKED_CAST\")\n    private fun fromAny(value: Any?): Table<T> =\n        when (value) {\n            is Table<*> -> value as Table<T>\n            is Map<*, *> -> (value as Map<TableRowId, T>).toTable()\n            is Collection<*> -> (value as Collection<T>).toTable()\n            is Array<*> -> (value as Array<T>).toTable()\n            else -> throw IllegalArgumentException(\"Cannot convert value '$value' to Table.\")\n        }\n\n    override suspend fun init(\n        path: AbsolutePath,\n        fromValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: Table<T>) -> Unit,\n    ) {\n        val fromTable = fromAny(fromValue)\n        val newValue = Table<T>(fromTable.size)\n        for ((id, elem) in fromTable.rows) {\n            if (!currentCoroutineContext().isActive) break // Don't do more work than necessary\n            elementsSchema.init(path.append(AbsolutePathFragment.Id(id)), elem, eventsBus) {\n                newValue[id] = it\n            }\n        }\n        setValue(newValue)\n        eventsBus.emit(ValueEvent.Init(newValue, path, this))\n    }\n\n    override suspend fun change(\n        path: AbsolutePath,\n        value: Table<T>,\n        intoValue: Any?,\n        eventsBus: SchemaEventsBus,\n        setValue: suspend (value: Table<T>) -> Unit,\n    ) {\n        val intoTable = fromAny(intoValue)\n        val newValue = Table<T>(intoTable.size)\n        for ((id, elem) in intoTable.rows) {\n            val elPath = path.append(AbsolutePathFragment.Id(id))\n            if (id in value)\n                elementsSchema.change(elPath, value[id]!!, elem, eventsBus) { newValue[id] = it }\n            else elementsSchema.init(elPath, elem, eventsBus) { newValue[id] = it }\n        }\n        for ((id, elem) in value.rows) {\n            if (id !in intoTable) {\n                elementsSchema.destroy(path.append(AbsolutePathFragment.Id(id)), elem, eventsBus) {}\n            }\n        }\n        setValue(newValue)\n        eventsBus.emit(ValueEvent.Change(value, newValue, path, this))\n    }\n\n    override suspend fun destroy(\n        path: AbsolutePath,\n        value: Table<T>,\n        eventsBus: SchemaEventsBus,\n        removeValue: suspend (value: Table<T>) -> Unit,\n    ) {\n        removeValue(value)\n        eventsBus.emit(ValueEvent.Destroy(value, path, this))\n        for (i in value.size - 1 downTo 0) {\n            val row = value.rowAt(i)\n            elementsSchema.destroy(\n                path.append(AbsolutePathFragment.Id(row.id)),\n                row.value,\n                eventsBus,\n            ) {}\n        }\n    }\n\n    override suspend fun isValidSetFragment(\n        value: Table<T>,\n        fragment: AbsolutePathFragment,\n    ): Boolean =\n        fragment is AbsolutePathFragment.CollectionEnd ||\n            (fragment is AbsolutePathFragment.Id && isValidRowId(fragment))\n\n    override suspend fun set(\n        path: AbsolutePath,\n        value: Table<T>,\n        fragment: AbsolutePathFragment,\n        childValue: Any?,\n        eventsBus: SchemaEventsBus,\n    ) {\n        if (fragment == AbsolutePathFragment.Wildcard) {\n            for ((id, elem) in value.rows) {\n                elementsSchema.change(\n                    path.append(AbsolutePathFragment.Id(id)),\n                    elem,\n                    childValue,\n                    eventsBus,\n                ) {\n                    value[id] = it\n                }\n            }\n        }\n        val idFragment: AbsolutePathFragment.Id =\n            if (fragment is AbsolutePathFragment.CollectionEnd)\n                AbsolutePathFragment.Id(value.nextId)\n            else fragment as AbsolutePathFragment.Id\n        val id = idFragment.id.toInt()\n        if (id !in value) {\n            elementsSchema.init(path.append(idFragment), childValue, eventsBus) { value[id] = it }\n            eventsBus.emit(ValueEvent.Add(value, value[id]!!, idFragment, path, this))\n        } else {\n            elementsSchema.change(path.append(idFragment), value[id]!!, childValue, eventsBus) {\n                value[id] = it\n            }\n        }\n    }\n\n    override suspend fun isValidRemoveFragment(\n        value: Table<T>,\n        fragment: AbsolutePathFragment,\n    ): Boolean =\n        (fragment is AbsolutePathFragment.Id &&\n            isValidRowId(fragment) &&\n            fragment.id.toInt() in value)\n\n    override suspend fun remove(\n        path: AbsolutePath,\n        value: Table<T>,\n        fragment: AbsolutePathFragment,\n        eventsBus: SchemaEventsBus,\n    ) {\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for (i in value.size - 1 downTo 0) {\n                val (id, elem) = value.rowAt(i)\n                val idFragment = AbsolutePathFragment.Id(id)\n                elementsSchema.destroy(path.append(idFragment), elem, eventsBus) {\n                    value.removeAt(i)\n                }\n                eventsBus.emit(ValueEvent.Remove(value, elem, idFragment, path, this))\n            }\n        } else {\n            val id = (fragment as AbsolutePathFragment.Id).id.toInt()\n            val elem = value[id]!!\n            elementsSchema.destroy(path.append(fragment), elem, eventsBus) { value -= id }\n            eventsBus.emit(ValueEvent.Remove(value, elem, fragment, path, this))\n        }\n    }\n\n    override fun childrenStatesContainer(): CollectionState = TableState(elementsSchema)\n\n    public companion object {\n        /**\n         * Regex used to determine if a certain identifier can be converted to a table row\n         * identifier.\n         */\n        private val ROW_ID_REGEX = Regex(\"^(0|-?[1-9]\\\\d*)\\$\")\n    }\n}\n\n/** Class responsible for holding the states of the children of a list. */\npublic class TableState(private val elementsSchema: Schema<*>) : CollectionState {\n    /** List containing the state of each element of the list. */\n    private val childrenStatesMap = hashMapOf<TableRowId, State?>()\n\n    override fun childrenStates(\n        path: AbsolutePath,\n        fragment: AbsolutePathFragment,\n    ): Sequence<StateInfo<*>> = sequence {\n        if (fragment is AbsolutePathFragment.Wildcard) {\n            for ((id, state) in childrenStatesMap) {\n                yield(StateInfo(state, elementsSchema, path + AbsolutePathFragment.Id(id)))\n            }\n        } else {\n            fragment as AbsolutePathFragment.Id\n            val id = fragment.id.toInt()\n            if (id in childrenStatesMap) {\n                yield(StateInfo(childrenStatesMap[id], elementsSchema, path + fragment))\n            }\n        }\n    }\n\n    override fun hasState(fragment: AbsolutePathFragment.Id): Boolean =\n        fragment.id.toInt() in childrenStatesMap\n\n    override fun setState(fragment: AbsolutePathFragment.Id, state: State?) {\n        childrenStatesMap[fragment.id.toInt()] = state\n    }\n\n    override fun removeState(fragment: AbsolutePathFragment.Id) {\n        childrenStatesMap.remove(fragment.id.toInt())\n    }\n}\n","package io.kform.validations\n\nimport io.kform.Validation\nimport io.kform.ValidationContext\nimport io.kform.ValidationIssue\nimport io.kform.ValidationIssueSeverity\nimport io.kform.datatypes.File\nimport io.kform.validations.Accepts.Companion.DEFAULT_CODE\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/** Representation of a MIME type as a pair of type/subtype. */\nprivate typealias MimeType = Pair<String, String>\n\n/**\n * Validation that checks that a [file][File]'s type is one of the [acceptedFileTypes].\n *\n * Each provided file type to accept must match one of the following:\n * - A MIME type, indicating that files of the specified type are accepted (provided MIME types may\n *   contain wildcards such as `image/\u2217`).\n * - A string whose first character is a full stop (`.`), indicating that files with the specified\n *   file extension are accepted.\n *\n * When the type of the file being validated does not match one of the [acceptedFileTypes], then an\n * issue is emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a\n * `fileName` data property with the name of the file that was validated, a `mimeType` data property\n * with the MIME type of the file that was validated, and an `accepted` data property with the\n * [acceptedFileTypes].\n *\n * Example usage:\n * ```\n * Accepts(\"image/\u2217\", \".pdf\")\n * ```\n *\n * @property acceptedFileTypes Accepted file types (each accepted file type must be either a MIME\n *   type or a file extension starting with a full stop).\n * @property code Issue code to use when the file's type does not match one of the accepted file\n *   types.\n * @property severity Severity of the issue emitted when the file's type does not match one of the\n *   accepted file types.\n */\npublic open class Accepts\n@JvmOverloads\nconstructor(\n    acceptedFileTypes: Iterable<String>,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<File>() {\n    init {\n        require(acceptedFileTypes.any()) {\n            \"At least one type of file to be accepted must be provided.\"\n        }\n    }\n\n    private val acceptedMimeTypes: MutableSet<MimeType> = mutableSetOf()\n    private val acceptedFileExtensions: MutableSet<String> = mutableSetOf()\n\n    init {\n        for (type in acceptedFileTypes) {\n            if (type.startsWith('.')) {\n                acceptedFileExtensions += type.lowercase()\n            } else {\n                acceptedMimeTypes +=\n                    type.toMimeTypeOrNull()\n                        ?: throw IllegalArgumentException(\"Invalid file type: '$type'.\")\n            }\n        }\n    }\n\n    public val acceptedFileTypes: Set<String>\n        get() = buildSet {\n            addAll(acceptedMimeTypes.map { it.toMimeTypeString() })\n            addAll(acceptedFileExtensions)\n        }\n\n    @JvmOverloads\n    public constructor(\n        vararg acceptedFileTypes: String,\n        code: String = DEFAULT_CODE,\n        severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n    ) : this(acceptedFileTypes.asIterable(), code, severity)\n\n    override fun toString(): String = \"Accepts(${acceptedFileTypes.joinToString(\", \")})\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        val fileExtension = getFileExtension(value.name)\n        val fileMimeType = value.type?.toMimeTypeOrNull()\n        if (\n            (fileExtension == null || acceptedFileExtensions.none { fileExtension.endsWith(it) }) &&\n                (fileMimeType == null ||\n                    acceptedMimeTypes.none { mimeTypesMatch(fileMimeType, it) })\n        ) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\n                        \"fileName\" to value.name,\n                        \"mimeType\" to fileMimeType?.toMimeTypeString(),\n                        \"acceptedFileTypes\" to acceptedFileTypes.joinToString(\", \"),\n                    ),\n                )\n            )\n        }\n    }\n\n    /** Gets the file extension of a file (including the leading full stop). */\n    private fun getFileExtension(fileName: String): String? {\n        val fullStopIdx = fileName.indexOf('.')\n        return if (fullStopIdx == -1) null else fileName.drop(fullStopIdx).lowercase()\n    }\n\n    /** Transforms a string into a MIME type (represented as a pair). */\n    private fun String.toMimeTypeOrNull(): MimeType? {\n        val slashIdx = indexOf('/')\n        return if (slashIdx == -1) null\n        else MimeType(take(slashIdx).lowercase(), drop(slashIdx + 1).lowercase())\n    }\n\n    /** Transforms a MIME type (represented as a pair) into a string. */\n    private fun MimeType.toMimeTypeString(): String = \"$first/$second\"\n\n    /** Whether the file's MIME type matches the provided accepted MIME type. */\n    private fun mimeTypesMatch(fileMimeType: MimeType, acceptedMimeType: MimeType): Boolean {\n        val (fileType, fileSubtype) = fileMimeType\n        val (acceptedType, acceptedSubtype) = acceptedMimeType\n        return (acceptedType == \"*\" || fileType == acceptedType) &&\n            (acceptedSubtype == \"*\" || fileSubtype == acceptedSubtype)\n    }\n\n    public companion object {\n        /**\n         * Default issue code representing that the file's type does not match one of the\n         * [acceptedFileTypes] file types.\n         */\n        public const val DEFAULT_CODE: String = \"fileTypeMismatch\"\n    }\n}\n",null,"package io.kform.validations\n\nimport io.kform.Validation\nimport io.kform.ValidationContext\nimport io.kform.ValidationIssue\nimport io.kform.ValidationIssueSeverity\nimport io.kform.validations.MustEqual.Companion.DEFAULT_CODE\nimport io.kform.validations.NotOneOf.Companion.DEFAULT_CODE\nimport io.kform.validations.OneOf.Companion.DEFAULT_CODE\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Validation that checks that a value equals a given [requiredValue].\n *\n * When the value being validated is different from [requiredValue], then an issue is emitted with\n * the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data property\n * with the value that was validated and a `requiredValue` data property with the value of\n * [requiredValue].\n *\n * @property requiredValue Value to equal.\n * @property code Issue code to use when the value is different from [requiredValue].\n * @property severity Severity of the issue emitted when the value is different from\n *   [requiredValue].\n */\npublic open class MustEqual<T>\n@JvmOverloads\nconstructor(\n    public val requiredValue: T,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<T>() {\n    override fun toString(): String = \"MustEqual($requiredValue)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value != requiredValue) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"value\" to \"$value\", \"requiredValue\" to \"$requiredValue\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value is different from [requiredValue]. */\n        public const val DEFAULT_CODE: String = \"valueDisallowed\"\n    }\n}\n\n/**\n * Validation that checks that a value does not equal a given [forbiddenValue].\n *\n * When the value being validated is equal to [forbiddenValue], then an issue is emitted with the\n * provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data property with\n * the value that was validated and a `forbiddenValue` data property with the value of\n * [forbiddenValue].\n *\n * @property forbiddenValue Value to differ from.\n * @property code Issue code to use when the value is equal to [forbiddenValue].\n * @property severity Severity of the issue emitted when the value is equal to [forbiddenValue].\n */\npublic open class MustNotEqual<T>\n@JvmOverloads\nconstructor(\n    public val forbiddenValue: T,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<T>() {\n    override fun toString(): String = \"MustNotEqual($forbiddenValue)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value == forbiddenValue) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"value\" to \"$value\", \"forbiddenValue\" to \"$forbiddenValue\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value is equal to [forbiddenValue]. */\n        public const val DEFAULT_CODE: String = \"valueDisallowed\"\n    }\n}\n\n/**\n * Validation that checks that a value is one of the [allowedValues].\n *\n * When the value being validated is not one of the [allowedValues], then an issue is emitted with\n * the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data property\n * with the value that was validated and an `allowedValues` data property with the [allowedValues].\n *\n * @property allowedValues Allowed values.\n * @property code Issue code to use when the value is not one of the allowed values.\n * @property severity Severity of the issue emitted when the value is not one of the allowed values.\n */\npublic open class OneOf<T>\n@JvmOverloads\nconstructor(\n    allowedValues: Iterable<T>,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<T>() {\n    init {\n        require(allowedValues.any()) { \"At least one allowed value must be provided.\" }\n    }\n\n    public val allowedValues: Set<T> = allowedValues.toSet()\n\n    @JvmOverloads\n    public constructor(\n        vararg allowedValues: T,\n        code: String = DEFAULT_CODE,\n        severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n    ) : this(allowedValues.asIterable(), code, severity)\n\n    override fun toString(): String = \"OneOf(${allowedValues.joinToString(\", \")})\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value !in allowedValues) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"value\" to \"$value\", \"allowedValues\" to allowedValues.joinToString(\", \")),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value is not one of the [allowedValues]. */\n        public const val DEFAULT_CODE: String = \"valueDisallowed\"\n    }\n}\n\n/**\n * Validation that checks that a value is **not** one of the [disallowedValues].\n *\n * When the value being validated is one of the [disallowedValues], then an issue is emitted with\n * the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data property\n * with the value that was validated and a `disallowedValues` data property with the\n * [disallowedValues].\n *\n * @property disallowedValues Disallowed values.\n * @property code Issue code to use when the value is one of the disallowed values.\n * @property severity Severity of the issue emitted when the value is one of the disallowed values.\n */\npublic open class NotOneOf<T>\n@JvmOverloads\nconstructor(\n    disallowedValues: Iterable<T>,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<T>() {\n    init {\n        require(disallowedValues.any()) { \"At least one disallowed value must be provided.\" }\n    }\n\n    public val disallowedValues: Set<T> = disallowedValues.toSet()\n\n    @JvmOverloads\n    public constructor(\n        vararg disallowedValues: T,\n        code: String = DEFAULT_CODE,\n        severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n    ) : this(disallowedValues.asIterable(), code, severity)\n\n    override fun toString(): String = \"NotOneOf(${disallowedValues.joinToString(\", \")})\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value in disallowedValues) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\n                        \"value\" to \"$value\",\n                        \"disallowedValues\" to disallowedValues.joinToString(\", \"),\n                    ),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value is one of the [disallowedValues]. */\n        public const val DEFAULT_CODE: String = \"valueDisallowed\"\n    }\n}\n","package io.kform.validations\n\nimport io.kform.Validation\nimport io.kform.ValidationContext\nimport io.kform.ValidationIssue\nimport io.kform.ValidationIssueSeverity\nimport io.kform.validations.ExclusiveMax.Companion.DEFAULT_CODE\nimport io.kform.validations.ExclusiveMin.Companion.DEFAULT_CODE\nimport io.kform.validations.Max.Companion.DEFAULT_CODE\nimport io.kform.validations.Min.Companion.DEFAULT_CODE\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Validation that checks that a value is at least a given [min] value.\n *\n * When the value being validated is less than [min], then an issue is emitted with the provided\n * [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data property with the value\n * that was validated and a `min` data property with the value of [min].\n *\n * @property min Minimum value allowed.\n * @property code Issue code to use when the value is less than [min].\n * @property severity Severity of the issue emitted when the value is less than [min].\n */\npublic open class Min<T : Comparable<T>>\n@JvmOverloads\nconstructor(\n    public val min: T,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<T>() {\n    override fun toString(): String = \"Min($min)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value < min) {\n            emit(ValidationIssue(code, severity, mapOf(\"value\" to \"$value\", \"min\" to \"$min\")))\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value is less than [min]. */\n        public const val DEFAULT_CODE: String = \"rangeUnderflow\"\n    }\n}\n\n/**\n * Validation that checks that a value is at most a given [max] value.\n *\n * When the value being validated is greater than [max], then an issue is emitted with the provided\n * [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data property with the value\n * that was validated and a `max` data property with the value of [max].\n *\n * @property max Maximum value allowed.\n * @property code Issue code to use when the value is greater than [max].\n * @property severity Severity of the issue emitted when the value is greater than [max].\n */\npublic open class Max<T : Comparable<T>>\n@JvmOverloads\nconstructor(\n    public val max: T,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<T>() {\n    override fun toString(): String = \"Max($max)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value > max) {\n            emit(ValidationIssue(code, severity, mapOf(\"value\" to \"$value\", \"max\" to \"$max\")))\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value is greater than [max]. */\n        public const val DEFAULT_CODE: String = \"rangeOverflow\"\n    }\n}\n\n/**\n * Validation that checks that a value is greater than a given [exclusiveMin] value.\n *\n * When the value being validated is less than or equal to [exclusiveMin], then an issue is emitted\n * with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data\n * property with the value that was validated and an `exclusiveMin` data property with the value of\n * [exclusiveMin].\n *\n * @property exclusiveMin Value that the value being validated must be greater than.\n * @property code Issue code to use when the value is less than or equal to [exclusiveMin].\n * @property severity Severity of the issue emitted when the value is less than or equal to\n *   [exclusiveMin].\n */\npublic open class ExclusiveMin<T : Comparable<T>>\n@JvmOverloads\nconstructor(\n    public val exclusiveMin: T,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<T>() {\n    override fun toString(): String = \"ExclusiveMin($exclusiveMin)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value <= exclusiveMin) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"value\" to \"$value\", \"exclusiveMin\" to \"$exclusiveMin\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /**\n         * Default issue code representing that the value is less than or equal to [exclusiveMin].\n         */\n        public const val DEFAULT_CODE: String = \"rangeUnderflow\"\n    }\n}\n\n/**\n * Validation that checks that a value is less than a given [exclusiveMax] value.\n *\n * When the value being validated is greater than or equal to [exclusiveMax], then an issue is\n * emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data\n * property with the value that was validated and an `exclusiveMax` data property with the value of\n * [exclusiveMax].\n *\n * @property exclusiveMax Value that the value being validated must be less than.\n * @property code Issue code to use when the value is greater than or equal to [exclusiveMax].\n * @property severity Severity of the issue emitted when the value is greater than or equal to\n *   [exclusiveMax].\n */\npublic open class ExclusiveMax<T : Comparable<T>>\n@JvmOverloads\nconstructor(\n    public val exclusiveMax: T,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<T>() {\n    override fun toString(): String = \"ExclusiveMax($exclusiveMax)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value >= exclusiveMax) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"value\" to \"$value\", \"exclusiveMax\" to \"$exclusiveMax\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /**\n         * Default issue code representing that the value is greater than or equal to\n         * [exclusiveMax].\n         */\n        public const val DEFAULT_CODE: String = \"rangeOverflow\"\n    }\n}\n","package io.kform.validations\n\nimport io.kform.Validation\nimport io.kform.ValidationContext\nimport io.kform.ValidationIssue\nimport io.kform.ValidationIssueSeverity\nimport io.kform.validations.Length.Companion.DEFAULT_CODE\nimport io.kform.validations.MaxLength.Companion.DEFAULT_CODE\nimport io.kform.validations.MinLength.Companion.DEFAULT_CODE\nimport io.kform.validations.Required.Companion.DEFAULT_CODE\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Validation that checks that a string's length is exactly [requiredLength], when it is not empty.\n *\n * When the string being validated is not empty and its length is different from [requiredLength],\n * then an issue is emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue\n * contains a `length` data property with the length of the string that was validated and a\n * `requiredLength` data property with the value of [requiredLength].\n *\n * To also validate that a string is not empty, use [Required] (preferred) or [NotEmpty] (if the\n * value is nullable and `null` is an acceptable value) together with [Length].\n *\n * Example values accepted by schema `StringSchema(Length(4))`:\n * - `\"abcd\"`\n * - `\"\"`\n *\n * Example values rejected by schema `StringSchema(Length(4))`:\n * - `\"abc\"`\n * - `\"abcde\"`\n *\n * @property requiredLength Required length for non-empty strings (must be >= 0).\n * @property code Issue code to use when the string is not empty and its length is different from\n *   [requiredLength].\n * @property severity Severity of the issue emitted when the string is not empty and its length is\n *   different from [requiredLength].\n */\npublic open class Length\n@JvmOverloads\nconstructor(\n    public val requiredLength: Int,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<CharSequence>() {\n    init {\n        require(requiredLength >= 0) { \"Provided length must be >= 0.\" }\n    }\n\n    override fun toString(): String = \"Length($requiredLength)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value.isNotEmpty() && value.length != requiredLength) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"length\" to \"${value.length}\", \"requiredLength\" to \"$requiredLength\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /**\n         * Default issue code representing that the string is not empty and its length is different\n         * from [requiredLength].\n         */\n        public const val DEFAULT_CODE: String = \"lengthMismatch\"\n    }\n}\n\n/**\n * Validation that checks that a string's length is at least a given [minLength], when it is not\n * empty.\n *\n * When the string being validated is not empty and its length is less than [minLength], then an\n * issue is emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a\n * `length` data property with the length of the string that was validated and a `minLength` data\n * property with the value of [minLength].\n *\n * To also validate that a string is not empty, use [Required] (preferred) or [NotEmpty] (if the\n * value is nullable and `null` is an acceptable value) together with [MinLength].\n *\n * Example values accepted by schema `StringSchema(MinLength(4))`:\n * - `\"abcd\"`\n * - `\"abcdefgh\"`\n * - `\"\"`\n *\n * Example values rejected by schema `StringSchema(MinLength(4))`:\n * - `\"a\"`\n * - `\"abc\"`\n *\n * @property minLength Minimum length required for non-empty strings (must be >= 0).\n * @property code Issue code to use when the string is not empty and its length is less than\n *   [minLength].\n * @property severity Severity of the issue emitted when the string is not empty and its length is\n *   less than [minLength].\n */\npublic open class MinLength\n@JvmOverloads\nconstructor(\n    public val minLength: Int,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<CharSequence>() {\n    init {\n        require(minLength >= 0) { \"Provided minimum length must be >= 0.\" }\n    }\n\n    override fun toString(): String = \"MinLength($minLength)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value.isNotEmpty() && value.length < minLength) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"length\" to \"${value.length}\", \"minLength\" to \"$minLength\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the string's length is less than [minLength]. */\n        public const val DEFAULT_CODE: String = \"tooShort\"\n    }\n}\n\n/**\n * Validation that checks that a string's length is at most a given [maxLength].\n *\n * When the length of the string being validated is greater than [maxLength], then an issue is\n * emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `length`\n * data property with the length of the string that was validated and a `maxLength` data property\n * with the value of [maxLength].\n *\n * Example values accepted by schema `StringSchema(MaxLength(4))`:\n * - `\"ab\"`\n * - `\"abcd\"`\n * - `\"\"`\n *\n * Example values rejected by schema `StringSchema(MaxLength(4))`:\n * - `\"abcde\"`\n * - `\"abcdefgh\"`\n *\n * @property maxLength Maximum length allowed (must be >= 0).\n * @property code Issue code to use when the string's length is greater than [maxLength].\n * @property severity Severity of the issue emitted when the string's length is greater than\n *   [maxLength].\n */\npublic open class MaxLength\n@JvmOverloads\nconstructor(\n    public val maxLength: Int,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<CharSequence>() {\n    init {\n        require(maxLength >= 0) { \"Provided maximum length must be >= 0.\" }\n    }\n\n    override fun toString(): String = \"MaxLength($maxLength)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value.length > maxLength) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"length\" to \"${value.length}\", \"maxLength\" to \"$maxLength\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the string's length is greater than [maxLength]. */\n        public const val DEFAULT_CODE: String = \"tooLong\"\n    }\n}\n","package io.kform.validations\n\nimport io.kform.Validation\nimport io.kform.ValidationContext\nimport io.kform.ValidationIssue\nimport io.kform.ValidationIssueSeverity\nimport io.kform.validations.Matches.Companion.DEFAULT_CODE\nimport io.kform.validations.MatchesEmail.Companion.DEFAULT_CODE\nimport io.kform.validations.MatchesEmail.Companion.EMAIL_REGEX\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Validation that checks that a string matches a given [regex], when it is not empty.\n *\n * When the string is not empty and does not match [regex], then an issue is emitted with the\n * provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data property with\n * the value that was validated and a `pattern` data property with the pattern of the [regex] that\n * should have been matched.\n *\n * @property regex Regular expression that the string must match.\n * @property code Issue code to use when the string is not empty and does not match [regex].\n * @property severity Severity of the issue emitted when the string is not empty and does not match\n *   [regex].\n */\npublic open class Matches\n@JvmOverloads\nconstructor(\n    public val regex: Regex,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<String>() {\n    public constructor(\n        pattern: String,\n        code: String = DEFAULT_CODE,\n        severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n    ) : this(Regex(pattern), code, severity)\n\n    public constructor(\n        pattern: String,\n        option: RegexOption,\n        code: String = DEFAULT_CODE,\n        severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n    ) : this(Regex(pattern, option), code, severity)\n\n    public constructor(\n        pattern: String,\n        options: Set<RegexOption>,\n        code: String = DEFAULT_CODE,\n        severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n    ) : this(Regex(pattern, options), code, severity)\n\n    override fun toString(): String = \"Matches(${regex.pattern})\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value.isNotEmpty() && !value.matches(regex)) {\n            emit(\n                ValidationIssue(code, severity, mapOf(\"value\" to value, \"pattern\" to regex.pattern))\n            )\n        }\n    }\n\n    public companion object {\n        /** Issue code representing that the string is not empty and does not match [regex]. */\n        public const val DEFAULT_CODE: String = \"patternMismatch\"\n    }\n}\n\n/**\n * Validation that checks that a string matches an email according to [regex] (which defaults to\n * [EMAIL_REGEX]) when it is not empty.\n *\n * When the string is not empty and does not match an email according to [regex], then an issue is\n * emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `value` data\n * property with the value that was validated and a `pattern` data property with the email regular\n * expression that should have been matched.\n *\n * @param code Issue code to use when the string is not empty and does not match [regex].\n * @param severity Severity of the issue emitted when the string is not empty and does not match\n *   [regex].\n * @param regex Email regular expression that the string must match, defaults to [EMAIL_REGEX].\n */\npublic open class MatchesEmail\n@JvmOverloads\nconstructor(\n    code: String = DEFAULT_CODE,\n    severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n    regex: Regex = EMAIL_REGEX,\n) : Matches(regex, code, severity) {\n    override fun toString(): String = \"MatchesEmail\"\n\n    public companion object {\n        /**\n         * Email regular expression used by default to match an email. It matches emails according\n         * to the W3C HTML5 spec (see:\n         * https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).\n         */\n        // [Matches] regex patterns may end up used in the `pattern` attribute of HTML inputs.\n        // Regexes compiled from an HTML input's `pattern` use JS's `v` regex flag, which forbids\n        // some unescaped special characters that we escape below (and that IJ complains about\n        // without this suppression).\n        @Suppress(\"RegExpRedundantEscape\")\n        public val EMAIL_REGEX: Regex =\n            Regex(\n                \"^[a-zA-Z0-9.!#$%&'*+\\\\/=?^_`\\\\{\\\\|\\\\}~\\\\-]+@\" +\n                    \"[a-zA-Z0-9](?:[a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?\" +\n                    \"(?:\\\\.[a-zA-Z0-9](?:[a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?)*$\"\n            )\n\n        /** Issue code representing that the string is not empty and does not match [regex]. */\n        public const val DEFAULT_CODE: String = \"emailPatternMismatch\"\n    }\n}\n","@file:JvmName(\"RequiredValues\")\n\npackage io.kform.validations\n\nimport io.kform.*\nimport io.kform.datatypes.File\nimport io.kform.datatypes.Table\nimport kotlin.jvm.JvmName\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Returns whether a value is missing (this checks whether the value is `null`, `false`, or empty).\n * The emptiness of values of type [String], [Collection], [Array] (and variants), [Map], and\n * [Table] is checked.\n *\n * This notion of \"missing\" portraited by this function is the same one used by the [Required]\n * validation.\n */\npublic fun Any?.isMissing(): Boolean =\n    this == null ||\n        this == false ||\n        when (this) {\n            is CharSequence -> this.isEmpty()\n            is Collection<*> -> this.isEmpty()\n            is Array<*> -> this.isEmpty()\n            is Map<*, *> -> this.isEmpty()\n            is Table<*> -> this.isEmpty()\n            // Array variants\n            is BooleanArray -> this.isEmpty()\n            is ByteArray -> this.isEmpty()\n            is CharArray -> this.isEmpty()\n            is DoubleArray -> this.isEmpty()\n            is FloatArray -> this.isEmpty()\n            is IntArray -> this.isEmpty()\n            is LongArray -> this.isEmpty()\n            is ShortArray -> this.isEmpty()\n            else -> false\n        }\n\n/**\n * Returns whether a value is not missing (this checks that the value is not `null`, `false`, or\n * empty). The emptiness of values of type [String], [Collection], [Array] (and variants), [Map],\n * and [Table] is checked.\n *\n * This notion of \"missing\" portraited by this function is the same one used by the [Required]\n * validation.\n */\npublic fun Any?.isNotMissing(): Boolean = !this.isMissing()\n\n/**\n * Validation that checks that a value is not [missing][isMissing] (this checks that the value is\n * not `null`, `false`, or empty). This validation checks the emptiness of values of type [String],\n * [Collection], [Array] (and variants), [Map], and [Table].\n *\n * When the value being validated is missing, then an issue is emitted with the provided [code]\n * (defaults to [DEFAULT_CODE]).\n *\n * A few notes on the [Required] validation:\n * - This validation tries to match the expected notion of what it means for a value to be\n *   \"required\": this can be thought of as the (\u2217) icon typically shown in user interfaces to denote\n *   required fields.\n * - If a value is not nullable, and you want to forbid it from being empty, this validation should\n *   be preferred over [NotEmpty] since it is the semantic way of signalling that the value is\n *   required (even though both validations would acchieve the same result).\n * - When a value is nullable and `null` values are not to be allowed, then this validation must be\n *   set on the [NullableSchema][io.kform.schemas.NullableSchema] itself, rather than on its inner\n *   schema.\n * - Custom validations may use the [isMissing]/[isNotMissing] functions to match the notion of\n *   \"missing\" values used by this validation.\n * - Empty [files][File] (files with size 0) are not considered missing values. This is due to the\n *   fact that empty files still contain some information (the file name itself) and is consistent\n *   with how empty files are treated in web forms. To forbid both the `null` value and empty files,\n *   use [Required] together with [NotEmpty].\n * - To only validate that a value is not `null` or `false`, use [MustNotEqual] instead.\n * - To allow `null` but not empty values, use [NotEmpty] instead.\n * - To prevent both empty and blank strings, use [Required] together with [NotBlank].\n *\n * @param code Issue code to use when the value is missing.\n * @param severity Severity of the issue emitted when the value is missing.\n */\npublic open class Required\n@JvmOverloads\nconstructor(\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<Any?>() {\n    override fun toString(): String = \"Required\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value.isMissing()) {\n            emit(ValidationIssue(code, severity))\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value is missing. */\n        public const val DEFAULT_CODE: String = \"valueMissing\"\n    }\n}\n\n/**\n * Validation that checks that a value is not empty. Values of type [String], [Collection], [Array]\n * (and variants), [Map], [Table], and [File] are supported.\n *\n * When the value being validated is empty, then an issue is emitted with the provided [code]\n * (defaults to [DEFAULT_CODE]).\n *\n * The [Required] validation should be preferred over this validation to semantically signal that a\n * value is required. Otherwise, this validation should be used when:\n * - The value is nullable and `null` values are accepted, but not empty values.\n * - The value is a [File] and empty files should not be accepted, since [Required] does not forbid\n *   empty files. To forbid both the `null` value and empty files, use [Required] together with\n *   [NotEmpty].\n *\n * @param code Issue code to use when the value is empty.\n * @param severity Severity of the issue emitted when the value is empty.\n */\npublic open class NotEmpty\n@JvmOverloads\nconstructor(\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<Any>() {\n    override fun toString(): String = \"NotEmpty\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (isEmpty(value)) {\n            emit(ValidationIssue(code, severity))\n        }\n    }\n\n    private fun isEmpty(value: Any): Boolean =\n        when (value) {\n            is CharSequence -> value.isEmpty()\n            is Collection<*> -> value.isEmpty()\n            is Array<*> -> value.isEmpty()\n            is Map<*, *> -> value.isEmpty()\n            is Table<*> -> value.isEmpty()\n            is File -> value.size == 0\n            // Array variants\n            is BooleanArray -> value.isEmpty()\n            is ByteArray -> value.isEmpty()\n            is CharArray -> value.isEmpty()\n            is DoubleArray -> value.isEmpty()\n            is FloatArray -> value.isEmpty()\n            is IntArray -> value.isEmpty()\n            is LongArray -> value.isEmpty()\n            is ShortArray -> value.isEmpty()\n            else ->\n                error(\n                    \"Unsupported value type: supported types are `String`, `Collection`, `Array` \" +\n                        \"(including variants), `Map`, `Table`, and `File`.\"\n                )\n        }\n\n    public companion object {\n        /** Default issue code representing that the value is empty. */\n        public const val DEFAULT_CODE: String = \"valueMissing\"\n    }\n}\n\n/**\n * Validation that checks that a string is not blank (according to [String.isBlank]) when it is also\n * not empty.\n *\n * When the string being validated is not empty and is blank, then an issue is emitted with the\n * provided [code] (defaults to [DEFAULT_CODE]).\n *\n * To forbid both empty and blank values, use this validation together with [Required] (preferred)\n * or [NotEmpty] (if the value is nullable and `null` values should be accepted).\n *\n * @param code Issue code to use when the string is not empty and blank.\n * @param severity Severity of the issue emitted when the string is not empty and blank.\n */\npublic open class NotBlank\n@JvmOverloads\nconstructor(\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<CharSequence>() {\n    override fun toString(): String = \"NotBlank\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value.isNotEmpty() && value.isBlank()) {\n            emit(ValidationIssue(code, severity))\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the string is not empty and blank. */\n        public const val DEFAULT_CODE: String = \"valueMissing\"\n    }\n}\n","package io.kform.validations\n\nimport io.kform.Validation\nimport io.kform.ValidationContext\nimport io.kform.ValidationIssue\nimport io.kform.ValidationIssueSeverity\nimport io.kform.datatypes.BigDecimal\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Validation that checks that a big decimal value's scale is [requiredScale].\n *\n * When the scale of the big decimal being validated is different from [requiredScale], then an\n * issue is emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a\n * `value` data property with the value that was validated and a `requiredScale` data property with\n * the value of [requiredScale].\n *\n * @property requiredScale Required scale.\n * @property code Issue code to use when the value's scale is different from [requiredScale].\n * @property severity Severity of the issue emitted when the value's scale is different from\n *   [requiredScale].\n */\npublic open class Scale\n@JvmOverloads\nconstructor(\n    public val requiredScale: Int,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<BigDecimal>() {\n    override fun toString(): String = \"Scale($requiredScale)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        if (value.scale != requiredScale) {\n            println(\"value: $value, scale: ${value.scale}, required: $requiredScale\")\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"value\" to \"$value\", \"requiredScale\" to \"$requiredScale\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /**\n         * Default issue code representing that the value's scale is different from [requiredScale].\n         */\n        public const val DEFAULT_CODE: String = \"scaleMismatch\"\n    }\n}\n","package io.kform.validations\n\nimport io.kform.Validation\nimport io.kform.ValidationContext\nimport io.kform.ValidationIssue\nimport io.kform.ValidationIssueSeverity\nimport io.kform.datatypes.File\nimport io.kform.datatypes.Table\nimport io.kform.validations.MaxSize.Companion.DEFAULT_CODE\nimport io.kform.validations.MinSize.Companion.DEFAULT_CODE\nimport io.kform.validations.Size.Companion.DEFAULT_CODE\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Validation that checks that a value's size is exactly [requiredSize], when it is not empty.\n * Values of type [Collection], [Array] (including variants), [Map], [Table], and [File] are\n * supported.\n *\n * When the value being validated is not empty, and its size is different from [requiredSize], then\n * an issue is emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a\n * `size` data property with the size of the value that was validated and a `requiredSize` data\n * property with the value of [requiredSize].\n *\n * To also validate that a value is not empty, use [Required] (preferred) or [NotEmpty] (if the\n * value is nullable and `null` is an acceptable value) together with [Size].\n *\n * Example values accepted by schema `ListSchema(Size(4)) { IntSchema() }`:\n * - `listOf(1, 2, 3, 4)`\n * - `emptyList()`\n *\n * Example values rejected by schema `ListSchema(Size(4)) { IntSchema() }`:\n * - `listOf(1, 2, 3)`\n * - `listOf(1, 2, 3, 4, 5)`\n *\n * @property requiredSize Expected size of the value (must be >= 0).\n * @property code Issue code to use when the value is not empty and its size is different from\n *   [requiredSize].\n * @property severity Severity of the issue emitted when the value is not empty and its size is\n *   different from [requiredSize].\n */\npublic open class Size\n@JvmOverloads\nconstructor(\n    public val requiredSize: Int,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<Any>() {\n    init {\n        require(requiredSize > 0) { \"Provided size must be >= 0.\" }\n    }\n\n    override fun toString(): String = \"Size($requiredSize)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        val size = size(value)\n        if (size != 0 && size != requiredSize) {\n            emit(\n                ValidationIssue(\n                    code,\n                    severity,\n                    mapOf(\"size\" to \"$size\", \"requiredSize\" to \"$requiredSize\"),\n                )\n            )\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value's size is less than [requiredSize]. */\n        public const val DEFAULT_CODE: String = \"sizeMismatch\"\n    }\n}\n\n/**\n * Validation that checks that a value's size is at least a given [minSize], when it is not empty.\n * Values of type [Collection], [Array] (including variants), [Map], [Table], and [File] are\n * supported.\n *\n * When the value being validated is not empty and its size is less than [minSize], then an issue is\n * emitted with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `size` data\n * property with the size of the value that was validated and a `minSize` data property with the\n * value of [minSize].\n *\n * To also validate that a value is not empty, use [Required] (preferred) or [NotEmpty] (if the\n * value is nullable and `null` is an acceptable value) together with [MinSize].\n *\n * Example values accepted by schema `ListSchema(MinSize(4)) { IntSchema() }`:\n * - `listOf(1, 2, 3, 4)`\n * - `listOf(1, 2, 3, 4, 5, 6, 7)`\n * - `emptyList()`\n *\n * Example values rejected by schema `ListSchema(MinSize(4)) { IntSchema() }`:\n * - `listOf(1)`\n * - `listOf(1, 2, 3)`\n *\n * @property minSize Minimum size allowed (must be >= 0).\n * @property code Issue code to use when the value is not empty and its size is less than [minSize].\n * @property severity Severity of the issue emitted when the value is not empty and its size is less\n *   than [minSize].\n */\npublic open class MinSize\n@JvmOverloads\nconstructor(\n    public val minSize: Int,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<Any>() {\n    init {\n        require(minSize > 0) { \"Provided minimum size must be >= 0.\" }\n    }\n\n    override fun toString(): String = \"MinSize($minSize)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        val size = size(value)\n        if (size != 0 && size < minSize) {\n            emit(ValidationIssue(code, severity, mapOf(\"size\" to \"$size\", \"minSize\" to \"$minSize\")))\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value's size is less than [minSize]. */\n        public const val DEFAULT_CODE: String = \"tooSmall\"\n    }\n}\n\n/**\n * Validation that checks that a value's size is at most a given [maxSize]. Values of type\n * [Collection], [Array] (including variants), [Map], [Table], and [File] are supported.\n *\n * When the size of the value being validated is greater than [maxSize], then an issue is emitted\n * with the provided [code] (defaults to [DEFAULT_CODE]). This issue contains a `size` data property\n * with the size of the value that was validated and a `maxSize` data property with the value of\n * [maxSize].\n *\n * Example values accepted by schema `ListSchema(MaxSize(4)) { IntSchema() }`:\n * - `listOf(1, 2)`\n * - `listOf(1, 2, 3, 4)`\n * - `emptyList()`\n *\n * Example values rejected by schema `ListSchema(MaxSize(4)) { IntSchema() }`:\n * - `listOf(1, 2, 3, 4, 5)`\n * - `listOf(1, 2, 3, 4, 5, 6, 7)`\n *\n * @property maxSize Maximum size allowed.\n * @property code Issue code to use when the value's size is greater than [maxSize].\n * @property severity Severity of the issue emitted when the value's size is greater than [maxSize].\n */\npublic open class MaxSize\n@JvmOverloads\nconstructor(\n    public val maxSize: Int,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) : Validation<Any>() {\n    init {\n        require(maxSize >= 0) { \"Provided maximum size must be >= 0.\" }\n    }\n\n    override fun toString(): String = \"MaxSize($maxSize)\"\n\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        val size = size(value)\n        if (size > maxSize) {\n            emit(ValidationIssue(code, severity, mapOf(\"size\" to \"$size\", \"maxSize\" to \"$maxSize\")))\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that the value's size is greater than [maxSize]. */\n        public const val DEFAULT_CODE: String = \"tooLarge\"\n    }\n}\n\n/** Size of a [Collection], [Array] (including variants), [Map], [Table], or [File]. */\nprivate fun size(value: Any): Int =\n    when (value) {\n        is Collection<*> -> value.size\n        is Array<*> -> value.size\n        is Map<*, *> -> value.size\n        is Table<*> -> value.size\n        is File -> value.size\n        // Array variants\n        is BooleanArray -> value.size\n        is ByteArray -> value.size\n        is CharArray -> value.size\n        is DoubleArray -> value.size\n        is FloatArray -> value.size\n        is IntArray -> value.size\n        is LongArray -> value.size\n        is ShortArray -> value.size\n        else ->\n            error(\n                \"Unsupported value type: supported types are `Collection`, `Array` \" +\n                    \"(including variants), `Map`, `Table`, and `File`.\"\n            )\n    }\n","@file:OptIn(ExperimentalTypeInference::class)\n\npackage io.kform.validations\n\nimport io.kform.Validation\nimport io.kform.ValidationContext\nimport io.kform.ValidationIssue\nimport io.kform.ValidationIssueSeverity\nimport io.kform.datatypes.Table\nimport io.kform.datatypes.TableRow\nimport io.kform.validations.UniqueItems.Companion.DEFAULT_CODE\nimport io.kform.validations.UniqueItemsBy.Companion.DEFAULT_CODE\nimport kotlin.experimental.ExperimentalTypeInference\nimport kotlin.jvm.JvmOverloads\nimport kotlinx.coroutines.flow.Flow\nimport kotlinx.coroutines.flow.flow\n\n/**\n * Validation that ensures that a value does not contain repeated items, where the uniqueness of an\n * item is determined by its key as returned by [selector]. Values of type [Collection], [Array]\n * (including variants), and [Table] are supported.\n *\n * Depending on [emitAllRepetitions], an issue with the provided [code] (defaults to [DEFAULT_CODE])\n * is emitted for each pair of repeated items (when `true`), or only for the first found repetition\n * (when `false`). [emitAllRepetitions] defaults to `true`.\n *\n * Each emitted issue has a `firstIndex` and `secondIndex` data properties with the two indices of\n * the conflicting items. When running this validation on a table, issues will also contain\n * `firstRowId` and `secondRowId` data properties with the ids of the conflicting table rows.\n *\n * [Pair]s, [Triple]s, and [List]s work well to represent composite keys. E.g. say that you have a\n * value of items that should be unique in respect to their fields `A` and `B`; you can use\n * `UniqueBy` as such:\n * ```kotlin\n * UniqueBy { Pair(it.A, it.B) }\n * ```\n *\n * When the result of calling [selector] on an item is `null`, that item is always considered\n * unique. I.e. if `selector(A) == null` and `selector(B) == null`, then `A` is considered different\n * to `B`.\n *\n * If you wish to treat multiple `null` values as equal to one another, consider wrapping said\n * values in an object (e.g. a list with a single item).\n *\n * This validation is **not** stateful and depends on all descendants of the value.\n *\n * @property emitAllRepetitions Whether to emit an issue per each repeated item or only for the\n *   first repetition.\n * @property code Issue code to use when two items of the value are repeated.\n * @property severity Severity of the issue emitted when two items of the value are repeated.\n * @property selector Selector function used to specify the key of an item of the value.\n */\npublic open class UniqueItemsBy<T, TKey>\n@JvmOverloads\nconstructor(\n    public val emitAllRepetitions: Boolean = true,\n    public val code: String = DEFAULT_CODE,\n    public val severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n    @BuilderInference public val selector: (item: T) -> TKey?,\n) : Validation<Any>() {\n    override fun toString(): String = \"UniqueItemsBy\"\n\n    override val dependsOnDescendants: Boolean = true\n\n    @Suppress(\"UNCHECKED_CAST\")\n    override fun ValidationContext.validate(): Flow<ValidationIssue> = flow {\n        val indices = HashMap<TKey, Int>(size(value))\n        for ((i, el) in iterableWithIndex(value)) {\n            val item = (if (el is TableRow<*>) el.value else el) as T\n            val key = selector(item)\n            if (key != null) {\n                val conflictIndex = indices[key]\n                if (conflictIndex != null) {\n                    emit(\n                        ValidationIssue(\n                            code,\n                            severity,\n                            buildMap {\n                                put(\"firstIndex\", \"$conflictIndex\")\n                                put(\"secondIndex\", \"$i\")\n                                if (el is TableRow<*>) {\n                                    put(\"firstRowId\", \"${(value as Table<*>).idAt(conflictIndex)}\")\n                                    put(\"secondRowId\", \"${el.id}\")\n                                }\n                            },\n                        )\n                    )\n                    if (!emitAllRepetitions) {\n                        break\n                    }\n                } else {\n                    indices[key] = i\n                }\n            }\n        }\n    }\n\n    public companion object {\n        /** Default issue code representing that two items of the value are repeated. */\n        public const val DEFAULT_CODE: String = \"itemsRepeated\"\n    }\n}\n\n/**\n * Validation that ensures that a value does not contain repeated items. Values of type\n * [Collection], [Array] (including variants), and [Table] are supported.\n *\n * Depending on [emitAllRepetitions], an issue with the provided [code] (defaults to [DEFAULT_CODE])\n * is emitted for each pair of repeated items (when `true`), or only for the first found repetition\n * (when `false`). [emitAllRepetitions] defaults to `true`.\n *\n * Each emitted issue has a `firstIndex` and `secondIndex` data properties with the two indices of\n * the conflicting items. When running this validation on a table, issues will also contain\n * `firstRowId` and `secondRowId` data properties with the ids of the conflicting table rows.\n *\n * Depending on [treatNullAsUnique], `null` values can be considered unique. I.e. when `true` (the\n * default), the value `listOf(null, null)` is considered to **not** contain repeated items.\n *\n * This validation is **not** stateful and depends on all descendants of the value.\n *\n * @param emitAllRepetitions Whether to emit an issue per each repeated item or only for the first\n *   repetition.\n * @param code Issue code to use when two items of the value are repeated.\n * @param severity Severity of the issue emitted when two items of the value are repeated.\n * @property treatNullAsUnique Whether to treat `null` values as being unique.\n */\npublic open class UniqueItems\n@JvmOverloads\nconstructor(\n    emitAllRepetitions: Boolean = true,\n    public val treatNullAsUnique: Boolean = true,\n    code: String = DEFAULT_CODE,\n    severity: ValidationIssueSeverity = ValidationIssueSeverity.Error,\n) :\n    UniqueItemsBy<Any?, Any?>(\n        emitAllRepetitions,\n        code,\n        severity,\n        { if (treatNullAsUnique) it else listOf(it) },\n    ) {\n    override fun toString(): String = \"UniqueItems\"\n\n    public companion object {\n        /** Default issue code representing that two items of the value are repeated. */\n        public const val DEFAULT_CODE: String = \"itemsRepeated\"\n    }\n}\n\n// private typealias StatefulUniqueState<T> = Pair<MutableMap<T, MutableList<Int>>, MutableList<T>>\n//\n// public open class StatefulUniqueBy<T, TKey>(\n//    public val code: String = DEFAULT_CODE,\n//    public val emitAllRepetitions: Boolean = true,\n//    @BuilderInference public val selector: (T) -> TKey?,\n// ) : StatefulValidation<Collection<T>, StatefulUniqueState<TKey>>() {\n//    override suspend fun ValidationContext.initState(value: Collection<T>):\n// StatefulUniqueState<TKey>\n// {\n//        val keyIndices = HashMap<TKey, MutableList<Int>>(value.size)\n//        val repeatedKeys = mutableListOf<TKey>()\n//        for ((i, el) in value.withIndex()) {\n//            val key = selector(el)\n//            if (key != null) {\n//                val indices = keyIndices.getOrPut(key) { mutableListOf() }\n//                indices += i\n//                if (indices.size == 2) {\n//                    repeatedKeys += key\n//                }\n//            }\n//        }\n//        return Pair(keyIndices, repeatedKeys)\n//    }\n//\n//    override fun ValidationContext.validateFromState(\n//        value: Collection<T>,\n//        state: StatefulUniqueState<TKey>\n//    ): Flow<Issue> = flow {\n//        val (keyIndices, repeatedKeys) = state\n//        for (key in repeatedKeys) {\n//            val indices = keyIndices[key] ?: error(\"Invalid 'StatefulUniqueBy' validation state.\")\n//            for (i in 0..<indices.size - 1) {\n//                emit(\n//                    Error(\n//                        code,\n//                        data =\n//                            mapOf(\n//                                \"firstIndex\" to \"${indices[i]}\",\n//                                \"secondIndex\" to \"${indices[i + 1]}\"\n//                            )\n//                    )\n//                )\n//                if (!emitAllRepetitions) {\n//                    return@flow\n//                }\n//            }\n//        }\n//    }\n//\n//    public companion object {\n//        /** Default issue code representing that two items of the value are repeated. */\n//        public const val DEFAULT_CODE: String = \"itemsRepeated\"\n//    }\n// }\n\n/** Size of a [Collection], [Array] (including variants), or [Table]. */\nprivate fun size(value: Any): Int =\n    when (value) {\n        is Collection<*> -> value.size\n        is Array<*> -> value.size\n        is Table<*> -> value.size\n        // Array variants\n        is BooleanArray -> value.size\n        is ByteArray -> value.size\n        is CharArray -> value.size\n        is DoubleArray -> value.size\n        is FloatArray -> value.size\n        is IntArray -> value.size\n        is LongArray -> value.size\n        is ShortArray -> value.size\n        else ->\n            error(\n                \"Unsupported value type: supported types are `Collection`, `Array` (and \" +\n                    \"variants), and `Table`.\"\n            )\n    }\n\n/** Iterable with index over a [Collection], [Array] (including variants), or [Table]. */\nprivate fun iterableWithIndex(value: Any): Iterable<IndexedValue<Any?>> =\n    when (value) {\n        is Collection<*> -> value.withIndex()\n        is Array<*> -> value.withIndex()\n        is Table<*> -> value.rows.withIndex()\n        // Array variants\n        is BooleanArray -> value.withIndex()\n        is ByteArray -> value.withIndex()\n        is CharArray -> value.withIndex()\n        is DoubleArray -> value.withIndex()\n        is FloatArray -> value.withIndex()\n        is IntArray -> value.withIndex()\n        is LongArray -> value.withIndex()\n        is ShortArray -> value.withIndex()\n        else ->\n            error(\n                \"Unsupported value type: supported types are `Collection`, `Array` (including \" +\n                    \"variants), and `Table`.\"\n            )\n    }\n",null,null,"package io.kform.internal\n\nimport io.kform.AbsolutePath\nimport io.kform.AbsolutePathFragment\nimport io.kform.Computation\nimport io.kform.DependencyInfo\nimport io.kform.InvalidDependencyPathException\nimport io.kform.InvalidDependencyTypeException\nimport io.kform.Schema\nimport io.kform.ValueInfo\nimport kotlin.collections.component1\nimport kotlin.collections.component2\nimport kotlin.collections.iterator\nimport kotlinx.coroutines.flow.singleOrNull\n\n/** Returns the values of the provided [dependencies] as needed by a computation at path [path]. */\ninternal suspend fun <T, S : Schema<T>> computationDependenciesInfo(\n    formSchema: S,\n    formValue: T,\n    path: AbsolutePath,\n    dependencies: Map<String, DependencyInfo>,\n): Map<String, ValueInfo<*>?> =\n    dependencies.mapValues { (_, dep) ->\n        // Single value matching the dependency or `null` if no such value exists\n        valueInfoImpl(formSchema, formValue, path.resolve(dep.path).withoutDescendants())\n            .singleOrNull()\n    }\n\n/** Validates a given [computation] at path [path]. */\ninternal fun validateComputation(\n    formSchema: Schema<*>,\n    path: AbsolutePath,\n    computation: Computation,\n) {\n    for ((dependencyKey, dependencyInfo) in computation.dependencies) {\n        val (dependencyPath, dependencyType) = dependencyInfo\n        val dependencyPathWithoutDescendants = dependencyPath.withoutDescendants()\n\n        val schemaInfo =\n            schemaInfoImpl(formSchema, path.resolve(dependencyPathWithoutDescendants))\n                .singleOrNull()\n        if (\n            dependencyPathWithoutDescendants.fragments.any { fragment ->\n                fragment is AbsolutePathFragment.Wildcard ||\n                    fragment is AbsolutePathFragment.RecursiveWildcard ||\n                    fragment is AbsolutePathFragment.CollectionEnd\n            } || schemaInfo == null\n        ) {\n            throw InvalidDependencyPathException(path, computation, dependencyKey, dependencyPath)\n        }\n        if (!schemaInfo.schema.assignableTo(dependencyType)) {\n            throw InvalidDependencyTypeException(\n                path,\n                computation,\n                schemaInfo.schema.typeInfo.toString(),\n                dependencyKey,\n                dependencyType,\n            )\n        }\n    }\n}\n","package io.kform.internal\n\nimport kotlin.js.Promise\nimport kotlinx.coroutines.await\n\ninternal actual suspend inline fun delayImmediate() = Promise.resolve(Unit).await()\n","package io.kform.internal\n\nimport kotlin.reflect.KClass\nimport kotlin.reflect.KType\n\n/** Converts a KType [type] into a string, using the simple name for classes. */\ninternal fun kTypeToString(type: KType): String = buildString {\n    append(\n        if (type.classifier is KClass<*>) (type.classifier as KClass<*>).simpleName\n        else type.toString()\n    )\n    if (type.arguments.isNotEmpty()) {\n        append(\n            type.arguments.joinToString(prefix = \"<\", postfix = \">\") {\n                if (it.type == null) \"*\" else kTypeToString(it.type!!)\n            }\n        )\n    }\n    if (type.isMarkedNullable) {\n        append(\"?\")\n    }\n}\n","package io.kform.internal\n\nimport io.kform.AbsolutePath\nimport io.kform.AbsolutePathFragment\nimport io.kform.Path\n\n/** Path with its last fragment dropped if it was a recursive wildcard. */\ninternal fun Path.withoutDescendants(): Path =\n    if (fragments.last() is AbsolutePathFragment.RecursiveWildcard) parent() else this\n\n/** Absolute path with its last fragment dropped if it was a recursive wildcard. */\ninternal fun AbsolutePath.withoutDescendants(): AbsolutePath =\n    if (lastFragment is AbsolutePathFragment.RecursiveWildcard) parent() else this\n",null,null,null,null,"@file:JvmName(\"SchemaRestrictions\")\n\npackage io.kform.schemas.util\n\nimport io.kform.Validation\nimport io.kform.datatypes.BigDecimal\nimport io.kform.datatypes.File\nimport io.kform.validations.*\nimport kotlin.jvm.JvmName\n\n/** Builds the common restrictions of a schema, given its validations. */\npublic fun <T> commonRestrictions(validations: Iterable<Validation<T>>): Map<String, Any?> =\n    buildMap {\n        if (validations.any { it is Required }) {\n            put(\"required\", true)\n        }\n\n        val allowedValuesSets =\n            validations.filterIsInstance<OneOf<T>>().map { it.allowedValues } +\n                validations.filterIsInstance<MustEqual<T>>().map { setOf(it.requiredValue) }\n        if (allowedValuesSets.isNotEmpty()) {\n            put(\n                \"allowedValues\",\n                allowedValuesSets\n                    .reduce { intersectedAllowedValues, allowedValues ->\n                        intersectedAllowedValues intersect allowedValues\n                    }\n                    .toTypedArray<Any?>(),\n            )\n        }\n\n        val disallowedValues =\n            validations.filterIsInstance<NotOneOf<T>>().flatMapTo(mutableSetOf()) {\n                it.disallowedValues\n            } + validations.filterIsInstance<MustNotEqual<T>>().map { it.forbiddenValue }\n        if (disallowedValues.isNotEmpty()) {\n            put(\"disallowedValues\", disallowedValues.toTypedArray<Any?>())\n        }\n    }\n\n/** Builds the comparable bounds restrictions of a schema, given its validations. */\npublic fun <T : Comparable<T>> comparableBoundsRestrictions(\n    validations: Iterable<Validation<T>>,\n    typeMin: T? = null,\n    typeMax: T? = null,\n): Map<String, T> = buildMap {\n    val validationMin = validations.filterIsInstance<Min<T>>().maxOfOrNull { it.min }\n    val min =\n        if (typeMin != null && validationMin != null) maxOf(typeMin, validationMin)\n        else typeMin ?: validationMin\n    if (min != null) {\n        put(\"min\", min)\n    }\n\n    val validationMax = validations.filterIsInstance<Max<T>>().minOfOrNull { it.max }\n    val max =\n        if (typeMax != null && validationMax != null) minOf(typeMax, validationMax)\n        else typeMax ?: validationMax\n    if (max != null) {\n        put(\"max\", max)\n    }\n\n    val exclusiveMin =\n        validations.filterIsInstance<ExclusiveMin<T>>().maxOfOrNull { it.exclusiveMin }\n    if (exclusiveMin != null) {\n        put(\"exclusiveMin\", exclusiveMin)\n    }\n\n    val exclusiveMax =\n        validations.filterIsInstance<ExclusiveMax<T>>().minOfOrNull { it.exclusiveMax }\n    if (exclusiveMax != null) {\n        put(\"exclusiveMax\", exclusiveMax)\n    }\n}\n\n/** Builds the size bounds restrictions of a schema, given its validations. */\npublic fun sizeBoundsRestrictions(validations: Iterable<Validation<*>>): Map<String, Int> =\n    buildMap {\n        val minSize =\n            (validations.filterIsInstance<MinSize>() + validations.filterIsInstance<Size>())\n                .maxOfOrNull { if (it is MinSize) it.minSize else (it as Size).requiredSize }\n        if (minSize != null) {\n            put(\"minSize\", minSize)\n        }\n\n        val maxSize =\n            (validations.filterIsInstance<MaxSize>() + validations.filterIsInstance<Size>())\n                .minOfOrNull { if (it is MaxSize) it.maxSize else (it as Size).requiredSize }\n        if (maxSize != null) {\n            put(\"maxSize\", maxSize)\n        }\n    }\n\n/** Builds the size length restrictions of a schema, given its validations. */\npublic fun <T : CharSequence> lengthBoundsRestrictions(\n    validations: Iterable<Validation<T>>\n): Map<String, Int> = buildMap {\n    val minLength =\n        (validations.filterIsInstance<MinLength>() + validations.filterIsInstance<Length>())\n            .maxOfOrNull { if (it is MinLength) it.minLength else (it as Length).requiredLength }\n    if (minLength != null) {\n        put(\"minLength\", minLength)\n    }\n\n    val maxLength =\n        (validations.filterIsInstance<MaxLength>() + validations.filterIsInstance<Length>())\n            .minOfOrNull { if (it is MaxLength) it.maxLength else (it as Length).requiredLength }\n    if (maxLength != null) {\n        put(\"maxLength\", maxLength)\n    }\n}\n\n/** Builds the pattern restrictions of a schema, given its validations. */\npublic fun patternRestrictions(validations: Iterable<Validation<String>>): Map<String, Any> =\n    buildMap {\n        val matchesValidations = validations.filterIsInstance<Matches>()\n        if (matchesValidations.isNotEmpty()) {\n            put(\n                \"pattern\",\n                if (matchesValidations.size == 1) matchesValidations.first().regex.pattern\n                else matchesValidations.joinToString(\"|\") { \"(${it.regex.pattern})\" },\n            )\n        }\n    }\n\n/** Builds the scale restrictions of a schema, given its validations. */\npublic fun scaleRestriction(validations: Iterable<Validation<BigDecimal>>): Map<String, Any> =\n    buildMap {\n        val scales = validations.filterIsInstance<Scale>().map { it.requiredScale }.toSet()\n        if (scales.size == 1) {\n            put(\"scale\", scales.first())\n        }\n    }\n\n/** Builds the accepted file types restrictions of a schema, given its validations. */\npublic fun acceptedFileTypesRestrictions(\n    validations: Iterable<Validation<File>>\n): Map<String, Any> = buildMap {\n    val acceptedFileTypesValidations = validations.filterIsInstance<Accepts>()\n    if (acceptedFileTypesValidations.isNotEmpty()) {\n        // FIXME: This is incorrect, if one [Accepts] validation allows image/* and another\n        //  image/jpeg, the intersection should be image/jpeg, rather than the empty set\n        put(\n            \"acceptedFileTypes\",\n            acceptedFileTypesValidations\n                .map { it.acceptedFileTypes }\n                .reduce { intersectedAcceptedFileTypes, acceptedFileTypes ->\n                    intersectedAcceptedFileTypes intersect acceptedFileTypes\n                }\n                .toTypedArray<Any?>(),\n        )\n    }\n}\n","@file:JvmName(\"SchemaPathUtils\")\n\npackage io.kform.util\n\nimport io.kform.*\nimport kotlin.jvm.JvmName\nimport kotlin.math.min\n\n/**\n * Compares two paths of a schema according to the order in which children are defined in said\n * schema. Returns a value `> 0` if [path1] is greater than [path2], `< 0` if [path2] if greater\n * than [path1], or `0` otherwise.\n *\n * Consider the following classes and schema:\n * ```kotlin\n * data class Person(var name: String, var pets: List<Pet>)\n * data class Pet(var name: String, var age: Int)\n *\n * val formSchema = ClassSchema {\n *     Person::name { StringSchema() }\n *     Person::pets {\n *         ListSchema {\n *             ClassSchema {\n *                 Pet::name { StringSchema() }\n *                 Pet::age { IntSchema() }\n *             }\n *         }\n *     }\n * }\n * ```\n *\n * For the above schema, all the following are true:\n * - `/name` > `/`\n * - `/pets` > `/name`\n * - `/pets/1` > `/pets/0`\n * - `/pets/1/name` > `/pets/1`\n * - `/pets/1/age` > `/pets/1/name`\n */\npublic fun Schema<*>.comparePaths(path1: Path, path2: Path): Int {\n    val absolutePath1 = path1.toAbsolutePath()\n    val absolutePath2 = path2.toAbsolutePath()\n\n    var curSchema = this\n    for (i in 0 until min(absolutePath1.size, absolutePath2.size)) {\n        val id1 =\n            absolutePath1[i] as? AbsolutePathFragment.Id\n                ?: throw InvalidPathException(\n                    absolutePath1,\n                    \"Compared paths must only contain ids.\",\n                )\n        val id2 =\n            absolutePath2[i] as? AbsolutePathFragment.Id\n                ?: throw InvalidPathException(\n                    absolutePath2,\n                    \"Compared paths must only contain ids.\",\n                )\n        when (curSchema) {\n            is CollectionSchema<*, *> -> {\n                if (id1 != id2) {\n                    val int1 = id1.id.toPositiveIntWithoutLeadingZeroesOrNull()\n                    val int2 = id2.id.toPositiveIntWithoutLeadingZeroesOrNull()\n                    return if (int1 != null && int2 != null) int1.compareTo(int2)\n                    else id1.id.compareTo(id2.id)\n                }\n                curSchema = schema(curSchema, Path.CHILDREN)\n            }\n            is ParentSchema<*> -> {\n                if (id1 != id2) {\n                    val childrenSchemasInfo =\n                        curSchema.childrenSchemas(\n                            AbsolutePath.ROOT,\n                            AbsolutePath.ROOT,\n                            AbsolutePathFragment.Wildcard,\n                        )\n                    val id1Index = childrenSchemasInfo.indexOfFirst { it.path.lastFragment == id1 }\n                    if (id1Index == -1) {\n                        throw InvalidPathException(\n                            AbsolutePath(absolutePath1.fragments.slice(0..i)),\n                            \"No schema matches this path.\",\n                        )\n                    }\n                    val id2Index = childrenSchemasInfo.indexOfFirst { it.path.lastFragment == id2 }\n                    if (id2Index == -1) {\n                        throw InvalidPathException(\n                            AbsolutePath(absolutePath1.fragments.slice(0..i)),\n                            \"No schema matches this path.\",\n                        )\n                    }\n                    return id1Index.compareTo(id2Index)\n                }\n                curSchema =\n                    curSchema\n                        .childrenSchemas(AbsolutePath.ROOT, AbsolutePath.ROOT, id1)\n                        .single()\n                        .schema\n            }\n            else ->\n                throw InvalidPathException(\n                    AbsolutePath(absolutePath1.fragments.slice(0 until i)),\n                    \"Schema is not a parent schema.\",\n                )\n        }\n    }\n    return absolutePath1.size.compareTo(absolutePath2.size)\n}\n\n/**\n * Compares two paths of a schema according to the order in which children are defined in said\n * schema. Returns a value `> 0` if [path1] is greater than [path2], `< 0` if [path2] if greater\n * than [path1], or `0` otherwise.\n *\n * Consider the following classes and schema:\n * ```kotlin\n * data class Person(var name: String, var pets: List<Pet>)\n * data class Pet(var name: String, var age: Int)\n *\n * val formSchema = ClassSchema {\n *     Person::name { StringSchema() }\n *     Person::pets {\n *         ListSchema {\n *             ClassSchema {\n *                 Pet::name { StringSchema() }\n *                 Pet::age { IntSchema() }\n *             }\n *         }\n *     }\n * }\n * ```\n *\n * For the above schema, all the following are true:\n * - `/name` > `/`\n * - `/pets` > `/name`\n * - `/pets/1` > `/pets/0`\n * - `/pets/1/name` > `/pets/1`\n * - `/pets/1/age` > `/pets/1/name`\n */\npublic fun Schema<*>.comparePaths(path1: String, path2: String): Int =\n    comparePaths(AbsolutePath(path1), AbsolutePath(path2))\n\n// `toIntOrNull` implementation where strings with leading zeroes or representing negative values\n// return `null`\nprivate fun String.toPositiveIntWithoutLeadingZeroesOrNull(): Int? =\n    if (startsWith(\"-\") || (startsWith(\"0\") && length != 1)) null else toIntOrNull()\n","@file:JvmName(\"TablePathUtils\")\n\npackage io.kform.util\n\nimport io.kform.*\nimport io.kform.datatypes.Table\nimport kotlin.jvm.JvmName\n\n/**\n * Utility function which converts a path where table rows are indexed by their index into a path\n * where said rows are indexed by their id in the corresponding table within the provided form value\n * [formValue] (with schema [formSchema]).\n *\n * This function is especially useful when tables are being encoded and decoded as lists (e.g. via\n * [Table.ValuesSerializer]) and we need to convert paths between one representation and the other.\n */\npublic suspend fun <T> Path.convertTableRowIndicesToIds(\n    formSchema: Schema<T>,\n    formValue: T,\n): AbsolutePath =\n    toAbsolutePath().let { absolutePath ->\n        var ids: MutableMap<Int, AbsolutePathFragment.Id>? = null\n        for (i in 0 until absolutePath.size) {\n            val index =\n                (absolutePath.fragment(i) as? AbsolutePathFragment.Id)?.id?.toIntOrNull()\n                    ?: continue\n            val parent = get(formSchema, formValue, AbsolutePath(absolutePath.fragments.take(i)))\n            if (parent is Table<*>) {\n                if (ids == null) {\n                    ids = HashMap(absolutePath.size)\n                }\n                ids[i] = AbsolutePathFragment.Id(parent.rowAt(index).id)\n            }\n        }\n        return if (ids == null) absolutePath\n        else AbsolutePath(absolutePath.fragments.mapIndexed { i, fragment -> ids[i] ?: fragment })\n    }\n\n/**\n * Utility function which converts a path where table rows are indexed by their index into a path\n * where said rows are indexed by their id in the corresponding table within the provided form value\n * [formValue] (with schema [formSchema]).\n *\n * This function is especially useful when tables are being encoded and decoded as lists (e.g. via\n * [Table.ValuesSerializer]) and we need to convert paths between one representation and the other.\n */\npublic suspend fun <T> String.convertTableRowIndicesToIds(\n    formSchema: Schema<T>,\n    formValue: T,\n): AbsolutePath = AbsolutePath(this).convertTableRowIndicesToIds(formSchema, formValue)\n\n/**\n * Utility function which converts a path where table rows are indexed by their id into a path where\n * said rows are indexed by their index in the corresponding table within the provided form value\n * [formValue] (with schema [formSchema]).\n *\n * This function is especially useful when transforming paths into human-readable names where it\n * makes more sense to reference a table row by its index than by its internal id.\n */\npublic suspend fun <T> Path.convertTableRowIdsToIndices(\n    formSchema: Schema<T>,\n    formValue: T,\n): AbsolutePath =\n    toAbsolutePath().let { absolutePath ->\n        var indices: MutableMap<Int, AbsolutePathFragment.Id>? = null\n        for (i in 0 until absolutePath.size) {\n            val id =\n                (absolutePath.fragment(i) as? AbsolutePathFragment.Id)?.id?.toIntOrNull()\n                    ?: continue\n            val parentPath = AbsolutePath(absolutePath.fragments.take(i))\n            val parent = get(formSchema, formValue, parentPath)\n            if (parent is Table<*>) {\n                if (indices == null) {\n                    indices = HashMap(absolutePath.size)\n                }\n                val index = parent.indexOfId(id)\n                if (index == -1) {\n                    throw InvalidPathException(parentPath, \"Table has no row with id '$id'.\")\n                }\n                indices[i] = AbsolutePathFragment.Id(index)\n            }\n        }\n        return if (indices == null) absolutePath\n        else\n            AbsolutePath(\n                absolutePath.fragments.mapIndexed { i, fragment -> indices[i] ?: fragment }\n            )\n    }\n\n/**\n * Utility function which converts a path where table rows are indexed by their id into a path where\n * said rows are indexed by their index in the corresponding table within the provided form value\n * [formValue] (with schema [formSchema]).\n *\n * This function is especially useful when transforming paths into human-readable names where it\n * makes more sense to reference a table row by its index than by its internal id.\n */\npublic suspend fun <T> String.convertTableRowIdsToIndices(\n    formSchema: Schema<T>,\n    formValue: T,\n): AbsolutePath = AbsolutePath(this).convertTableRowIdsToIndices(formSchema, formValue)\n\n/**\n * Utility function which converts the paths of a [LocatedValidationIssue] where table rows are\n * indexed by their index into paths where said rows are indexed by their id in the corresponding\n * table within the provided form value [formValue] (with schema [formSchema]).\n *\n * This function is especially useful when tables are being encoded and decoded as lists (e.g. via\n * [Table.ValuesSerializer]) and we need to add this external validation issue to a\n * [form manager][FormManager].\n */\npublic suspend fun <T> LocatedValidationIssue.convertTableRowIndicesToIds(\n    formSchema: Schema<T>,\n    formValue: T,\n): LocatedValidationIssue =\n    LocatedValidationIssue(\n        path.convertTableRowIndicesToIds(formSchema, formValue),\n        code,\n        severity,\n        dependencies.map { it.convertTableRowIndicesToIds(formSchema, formValue) },\n        dependsOnDescendants,\n        externalContextDependencies,\n        data,\n    )\n\n/**\n * Utility function which converts the paths of an iterable of [LocatedValidationIssue]s where table\n * rows are indexed by their index into paths where said rows are indexed by their id in the\n * corresponding table within the provided form value [formValue] (with schema [formSchema]).\n *\n * This function is especially useful when tables are being encoded and decoded as lists (e.g. via\n * [Table.ValuesSerializer]) and we need to add these external validation issues to a\n * [form manager][FormManager].\n */\npublic suspend fun <T> Iterable<LocatedValidationIssue>.convertTableRowIndicesToIds(\n    formSchema: Schema<T>,\n    formValue: T,\n): List<LocatedValidationIssue> = map { it.convertTableRowIndicesToIds(formSchema, formValue) }\n"],"names":["<get-descriptor>","fragments","<get-fragments>","stringPath","fragment","index","get","parent","append","join","paths","item","resolve","equals","other","hashCode","toString","i","needsResolving","<get-size>","<get-isRoot>","<get-lastFragment>","path","hasWildcard","element","hasRecursiveWildcard","hasAnyWildcard","plus","matches","contains","relativeTo","iterator","type","result","schema","schemaPath","dependenciesInfo","externalContexts","dependencyInfoOrNull","dependencyKey","message","dependencyInfo","dependencyPathOrNull","dependencyPath","dependencySchemaOrNull","dependencySchema","dependencyOrNull","dependency","externalContextOrNull","externalContextName","externalContext","toObserve","updateState","<get-dependencies>","<get-externalContextDependencies>","<get-observers>","destroyState","state","$completion","<get-path>","<get-schema>","value","<get-value>","<get-oldValue>","oldValue","addedValue","id","removedValue","status","issues","computation","expectedType","dependencyType","$validationMode","$completableInitialized","invoke","$this$launch","$this$withContext","formSchema","initialValue","validationMode","coroutineContext","autoInit","<get-supervisorJob>","<get-scope>","<get-eventsBus>","init","init$default","destroy","scheduleAction","action","scheduleActionAndAwait","<get-autoValidationStatus>","setValidationMode","isValidPath","schemaInfo","valueInfo","infoHandler","info","ex","has","valueHandler","getClone","set","toSet","reset","remove","getExternalContext","externalContextHandler","setExternalContext","removeExternalContext","validate","issuesHandler","isValid","addExternalIssues","removeExternalIssues","code","isDirty","isPristine","setDirty","setPristine","isTouched","isUntouched","setTouched","setUntouched","subscribe","onSubscription","eventHandler","subscribe$default","emit","$fragment","$toSet","parentInfo","$this_flow","$formSchema","$formValue","$externalContexts","$this$flow","$validations","$externalValidations","$info","$validation","$this$catch","issue","queriedPath","dirty","touched","validationStatus","displayStatus","fragmentToString","parentImpl","joinImpl","fragmentsArray","joined","resolveImpl","resolved","assignableTo","<get-supportsConcurrentSets>","<get-supportsConcurrentRemoves>","name","nullable","arguments","restrictions","kClass","severity","data","invoke$default","<get-severity>","key","dependencies","dependsOnDescendants","externalContextDependencies","validation","absolutePath","resolveDependencies","childSerializers","<get-code>","<get-data>","throawble","<get-dependsOnDescendants>","<this>","component1","component2","component3","isEmpty","<get-entries>","entryId","newChildNode","newNode","clear","cleanUp","$i","$path","$cache","$node","$this$sequence","initialCapacity","containsPath","containsEntry","containsValue","value2","getEntry","node","pair","put","newId","curNode","nextNode","removedEntries","cache","removeEntry","entries","<get-id>","$iterator","hasNext","next","rowWithMatchingId","list","map","values","<get-nextId>","<get-rows>","<get-values>","containsId","indexOfId","rowAt","idAt","row","add","addAt","addAll","addAllAt","rows","removeAt","subList","fromIndex","toIndex","accessType","<get-accessType>","conflictsWith","access","$action","$actionJob","scope","<get-priority>","overridesConflictingAction","await","cancel","cause","cancel$default","computedValue","toObserveIndex","newAction","getAndRemoveExternalIssuesDependentOnPath","getAndRemoveExternalIssuesDependentOnExternalContext","addDependenciesOfExternalIssues","externalIssues","removeDependenciesOfExternalIssues","$id","event","eventsHandler","$curInfo","childInfo","$formState","$curState","$curPath","childValueInfo","nValidations","nStatefulValidations","getCachedIssues","validationIndex","cacheIssues","removeCachedIssues","removeCachedIssues$default","getAllVisibleIssues","nonLocatedExternalIssues","visibleIssues","toRemove","first","second","toKeep","removeExternalIssues$default","getStatefulValidationDeferredState","statefulValidationIndex","setStatefulValidationDeferredState","statefulValidationDeferredState","deferredState","dominantIssueSeverity","externalIssue","cachedIssue","localDisplayStatus","parentState","dominantSeverity","childrenStates","setState","collectionState","hasState","removeState","$newChannel","$event","issuesFlow","$channel","formManager","start","stop","$parentSchema","$parentPath","$parentValue","$eventsBus","<get-result>","run","parentPaths","currentPath","stateInfo","valueStateInfo","<get-accesses>","<get-accessedPaths>","runValueState","withSchemaEventsBus","fn","setOnParent","parentPath","toCompute","requiresAccessToExternalContext","runWriteValueState","collect","collector","toInvalidate","$parentInfo","eventsBus","parentSchema","updateDependents","<get-externalContextName>","validationDaemon","toUpdate","observerIndex","$oldDeferredComputedValueState","$newDeferredComputedValueState","$computedValue","$observerIndex","$oldDeferredValidationState","$newDeferredValidationState","$validationWasValidated","$schema","$state","$validationIndex","$validationCancelled","$this$onCompletion","$validationFailed","$emittedIssues","$issuesToCache","updateValidationState","oldLocalDisplayStatus","oldDisplayStatus","descendantsDisplayingIssuesToUpdate","emitValidationChange","updateValidationState$default","$value","$schemaPath","$statefulValidationIndex","priority","validations","updateDescendantsDisplayingIssues","displayingErrors","displayingWarnings","answer","amount","it","$deferredState","$queriedPath","elementsSchema","childrenSchemas","<get-validations>","clone","fromAny","fromValue","setValue","change","intoValue","removeValue","zeroOfPreferredScale","preferredScale","<get-initialValue>","<get-typeInfo>","bigDecimal","idx","builder","innerSchema","<get-innerSchema>","replaceEvent","replaceWithChange","isValidChildSchemaFragment","isValidChildFragment","children","isValidSetFragment","childValue","childrenStatesContainer","isValidRemoveFragment","$observer","innerState","isKnown","setKnownState","setUnknownState","nullableSchema","initState","validateFromState","$setValue","$newValue","acceptedFileTypes","<get-acceptedFileTypes>","requiredValue","forbiddenValue","allowedValues","disallowedValues","min","max","exclusiveMin","exclusiveMax","requiredLength","minLength","maxLength","regex","requiredScale","requiredSize","minSize","maxSize","emitAllRepetitions","selector","treatNullAsUnique","matchesImpl","f1","f2","i1","i2","s1","s2","h1","h2","matchesImpl$default","containsImpl","containsImpl$default","relativeImpl","from","to","size","samePartsSize","FormManager$Companion$logger$lambda","<generator-invoke>","FormManager$syncInit$slambda$lambda","cancellationException","FormManager$destroy$slambda$lambda","<get-actionManager>","syncInit","completableInitialized","<generator-init>","<generator-destroy>","awaitInitialization","awaitSubscribable","<generator-scheduleAction>","<generator-scheduleActionAndAwait>","<generator-setValidationMode>","schemaInfoImpl","validatePath","<generator-valueInfo>","<generator-info>","<generator-has>","<generator-get>","<generator-getClone>","<generator-set>","normalizedPath","actions","parentQueriedPath","<unused var>","<generator-remove>","parentSchemasInfo","<generator-validate>","<generator-addExternalIssues>","<generator-removeExternalIssues>","<generator-isDirty>","<generator-isPristine>","<generator-setDirty>","<generator-setPristine>","<generator-isTouched>","<generator-isUntouched>","<generator-setTouched>","<generator-setUntouched>","<generator-subscribe>","FormManager$validationDependencies$lambda","FormManager$validationDependencies$lambda$lambda","FormManager$validationObservedDependencies$lambda","FormManager$validationObservedDependencies$lambda$lambda","FormManager$externalContextValidationDependencies$lambda","FormManager$externalContextValidationDependencies$lambda$lambda","FormManager$computedValueDependencies$lambda","FormManager$computedValueDependencies$lambda$lambda","FormManager$computedValueObservedDependencies$lambda","FormManager$computedValueObservedDependencies$lambda$lambda","FormManager$externalContextComputedValueDependencies$lambda","FormManager$externalContextComputedValueDependencies$lambda$lambda","FormManager$syncInit$slambda","FormManager$syncInit$lambda$lambda","$ex","FormManager$syncInit$lambda$lambda$lambda","FormManager$syncInit$lambda","FormManager$destroy$slambda","FormManager$validate$slambda","FormManager$validate$slambda$lambda","FormManager$isValid$slambda","FormManager$isValid$slambda$lambda","<get-logger>","validateSchemaValidations","validateExternalValidations","externalValidations","formValue","parentSchemaInfo","validateExternally","isValidExternally","runValidation","logger$lambda","set$slambda","set$slambda$lambda","remove$slambda","remove$slambda$lambda","validate$slambda$slambda","validate$slambda$slambda$lambda","validate$slambda","validate$slambda$lambda","validatingPath","validatingAbsolutePath","validateExternally$slambda$slambda","validateExternally$slambda$slambda$lambda","validateExternally$slambda","validateExternally$slambda$lambda","validationContext","<generator-invoke$handleException>","invoke$handleException","runValidation$slambda$slambda","runValidation$slambda$slambda$lambda","runValidation$slambda$handleException$lambda","runValidation$slambda$handleException$lambda$lambda","runValidation$slambda","runValidation$slambda$lambda","<init properties FormUtils.kt>","parse","fragmentList","fragmentId","l","c","spFragment","spStr","spLen","toAbsolutePath","ValidationIssue$Companion$<anonymous>","LocatedValidationIssue$Companion$<anonymous>","<generator-containsNoErrors>","containsNoErrors","<generator-containsErrors>","containsErrors","containsErrors$slambda","containsErrors$slambda$lambda","StatefulValidation$validate$slambda","StatefulValidation$validate$slambda$lambda","mutablePathMultimapOf","pairs","trie","toMap","entry","nextFragment","wildcardNode","recWildcardNode","j","entriesImpl","entriesImpl$default","removeImpl","removeImpl$default","PathTrie$get$lambda","PathTrie$entriesImpl$slambda","PathTrie$entriesImpl$slambda$lambda","emplyPlaceholderFile","computeNextId","getRow","setRowValue","Table$toString$lambda","tableOf","toTable","table","mark","ActionManager$launchActionJob$slambda$lambda","ActionManager$launchActionJob$slambda$lambda$lambda","$mark","actionJob","conflicts","conflict","accessedPath","conflictingActionJob","conflictingAction","shouldCancel","cancelCause","conflictHasBeenCleanedUp","actionsConflict","action1","action2","launchActionJob","job","cancelActionJob","waitedByJob","cleanUpActionJob","waitingJob","sortActionJobsTopologically","actionJobs","actionJobsSet","visited","deque","timeTag","sortActionJobsTopologically$dfs","ActionManager$scheduleAction$lambda$lambda","ActionManager$scheduleAction$lambda","$conflicts","waitingFor","ActionManager$launchActionJob$slambda","ActionManager$launchActionJob$lambda","$job","ActionManager$launchActionJob$lambda$lambda","ActionManager$launchActionJob$lambda$slambda","ActionManager$launchActionJob$lambda$slambda$lambda","ActionManager$cancelActionJob$lambda","ActionManager$cancelActionJob$lambda$lambda","ActionManager$cleanUpActionJob$lambda$lambda","ActionManager$cleanUpActionJob$lambda","actionsWaiting","validateComputation","dependencyPathWithoutDescendants","<generator-computationDependenciesInfo>","dep","computationDependenciesInfo","buildComputedValueDependencies","pathDependencies","resolvedDep","buildObservedComputedValueDependencies","observedPathDependencies","toObserveContainers","observedIndex","observer","resolvedToObserve","resolvedInfo","buildExternalContextComputedValueDependencies","<generator-getAndRemoveExternalIssuesDependentOnPath>","entriesToRemove","removedIssues","<generator-getAndRemoveExternalIssuesDependentOnExternalContext>","<generator-addDependenciesOfExternalIssues>","contextDependency","<generator-removeDependenciesOfExternalIssues>","removePathDependencies","removeExternalContextDependencies","ExternalIssuesDependencies$removePathDependencies$lambda","$externalIssue","ExternalIssuesDependencies$removePathDependencies$lambda$lambda","<generator-emit>","handler","<generator-unsubscribe>","unsubscribe","FormManagerEventsBus$emit$lambda$lambda","FormManagerEventsBus$emit$lambda","subscriptionPaths","FormManagerEventsBus$subscribe$lambda","FormManagerEventsBus$subscribe$lambda$lambda","FormManagerEventsBus$subscribe$slambda","FormManagerEventsBus$subscribe$slambda$lambda","FormManagerEventsBus$unsubscribe$lambda","FormManagerEventsBus$unsubscribe$lambda$lambda","curInfo","valueInfoImpl","stateInfoImpl","formState","valueStateInfoImpl","curSchema","curPath","curQueriedPath","childSchemaInfo","schemaInfoImpl$slambda","schemaInfoImpl$slambda$lambda","curValue","curSchemaPath","valueInfoImpl$slambda$slambda","valueInfoImpl$slambda$slambda$lambda","valueInfoImpl$slambda","valueInfoImpl$slambda$lambda","curState","stateInfoImpl$slambda","stateInfoImpl$slambda$lambda","childStateInfo","valueStateInfoImpl$slambda$slambda","valueStateInfoImpl$slambda$slambda$lambda","valueStateInfoImpl$slambda","valueStateInfoImpl$slambda$lambda","kTypeToString","kTypeToString$lambda","withoutDescendants","getAllCachedIssues","StateImpl$getAllCachedIssues$slambda","StateImpl$getAllCachedIssues$slambda$lambda","<get-UNINITIALIZED>","<get-INITIAL_VALUE>","<init properties Symbol.kt>","msg","ValidationDaemon$start$slambda$slambda","ValidationDaemon$start$slambda$slambda$lambda","<generator-start>","newChannel","<generator-stop>","<generator-validateNext>","validateNext","<generator-retryValidate>","retryValidate","channel","<generator-handleInitEvent>","handleInitEvent","handleDestroyEvent","<generator-handleValidationChangeEvent>","handleValidationChangeEvent","<generator-addUnvalidatedPath>","bundlePerSchema","wasEmpty","addUnvalidatedPath","addUnvalidatedPath$default","removeUnvalidatedPath","ValidationDaemon$start$slambda","ValidationDaemon$start$slambda$lambda","ValidationDaemon$stop$lambda","ValidationDaemon$validateNext$lambda","ValidationDaemon$validateNext$lambda$lambda","ValidationDaemon$retryValidate$lambda","ValidationDaemon$retryValidate$lambda$lambda","ValidationDaemon$validate$slambda","ValidationDaemon$validate$slambda$lambda","ValidationDaemon$handleInitEvent$lambda","ValidationDaemon$handleInitEvent$lambda$lambda","ValidationDaemon$handleDestroyEvent$lambda","ValidationDaemon$handleDestroyEvent$lambda$lambda","ValidationDaemon$handleValidationChangeEvent$lambda","ValidationDaemon$addUnvalidatedPath$lambda","ValidationDaemon$addUnvalidatedPath$slambda","ValidationDaemon$addUnvalidatedPath$slambda$lambda","buildValidationDependencies","buildObservedValidationDependencies","buildExternalContextValidationDependencies","<generator-setOnParent>","parentValue","parentSchemaPath","valueToSet","<generator-removeFromParent>","removeFromParent","childSchema","childPath","setOnParent$slambda","setOnParent$slambda$lambda","<generator-runValueState>","<generator-runWriteValueState>","<generator-compute>","compute","<generator-runComputedValue>","computedValueContext","computedValueState","runComputedValue","<generator-initStatefulComputedValueState>","initStatefulComputedValueState","ComputeValuesAction$runWriteValueState$slambda","ComputeValuesAction$runWriteValueState$slambda$lambda","ComputeValuesAction$runComputedValue$lambda","$computedValueState","ComputeValuesAction$runComputedValue$lambda$lambda","ComputeValuesAction$initStatefulComputedValueState$lambda","ComputeValuesAction$initStatefulComputedValueState$lambda$lambda","<generator-collect>","InfoAction$runValueState$o$collect$slambda","InfoAction$runValueState$o$collect$slambda$lambda","<generator-invalidateValidation>","invalidateValidation","InvalidateValidationsAction$toString$lambda","RemoveAction$runWriteValueState$slambda$slambda","RemoveAction$runWriteValueState$slambda$slambda$lambda","RemoveAction$runWriteValueState$slambda","RemoveAction$runWriteValueState$slambda$lambda","<generator-removeCachedIssues>","wasValidated","<generator-removeDependingExternalIssues>","removeDependingExternalIssues","<generator-run>","hadExternalContext","removedExternalContext","oldExternalContext","newDisplayStatus","<generator-incrementDescendantsDisplayingIssues>","incrementDescendantsDisplayingIssues","signedNumber","n","<generator-updateDescendantsDisplayingIssues>","UpdateDescendantsDisplayingIssuesAction$toString$lambda","UpdateDescendantsDisplayingIssuesAction$toString$lambda$lambda","oldComputedValueState","newComputedValueState","UpdateStatefulComputedValuesStateAction$updateStatefulComputedValueState$slambda$lambda","UpdateStatefulComputedValuesStateAction$updateStatefulComputedValueState$slambda$lambda$lambda","$oldComputedValueState","$newComputedValueState","updateStatefulComputedValueState","oldDeferredComputedValueState","newDeferredComputedValueState","UpdateStatefulComputedValuesStateAction$toString$lambda","UpdateStatefulComputedValuesStateAction$updateStatefulComputedValueState$lambda","UpdateStatefulComputedValuesStateAction$updateStatefulComputedValueState$lambda$lambda","UpdateStatefulComputedValuesStateAction$updateStatefulComputedValueState$slambda","oldValidationState","newValidationState","UpdateStatefulValidationsStateAction$updateStatefulValidationState$slambda$lambda","UpdateStatefulValidationsStateAction$updateStatefulValidationState$slambda$lambda$lambda","$oldValidationState","$newValidationState","updateStatefulValidationState","oldDeferredValidationState","newDeferredValidationState","validationWasValidated","UpdateStatefulValidationsStateAction$toString$lambda","UpdateStatefulValidationsStateAction$updateStatefulValidationState$lambda","UpdateStatefulValidationsStateAction$updateStatefulValidationState$lambda$lambda","UpdateStatefulValidationsStateAction$updateStatefulValidationState$slambda","<generator-updateValidationState>","newLocalDisplayStatus","locatedIssue","wasSuccessfullyValidated","validationCancelled","validationFailed","emittedIssues","ValidateAction$validate$slambda$slambda$lambda","ValidateAction$validate$slambda$slambda$lambda$lambda","ValidateAction$validate$slambda$slambda$slambda","ValidateAction$validate$slambda$slambda$slambda$lambda","ValidateAction$validate$slambda$slambda","exceptionError","ValidateAction$runValidation$slambda$slambda$lambda","ValidateAction$runValidation$slambda$slambda$lambda$lambda","validationState","issuesToCache","ValidateAction$runValidation$slambda$lambda","$validationState","ValidateAction$runValidation$slambda$lambda$lambda","ValidateAction$runValidation$slambda$slambda","<generator-initStatefulValidationState>","initStatefulValidationState","ValidateAction$validate$slambda","ValidateAction$validate$slambda$lambda","ValidateAction$runValidation$slambda","ValidateAction$initStatefulValidationState$lambda","ValidateAction$initStatefulValidationState$lambda$lambda","<generator-updateDependents>","dependingExternalIssues","dependingComputedValues","WriteValueStateAction$setOnParent$slambda$slambda","WriteValueStateAction$setOnParent$slambda$slambda$lambda","WriteValueStateAction$destroyState$slambda$lambda","WriteValueStateAction$destroyState$slambda$lambda$lambda","<generator-handleSchemaEvent>","handleSchemaEvent","count","destroyedDisplayingLocalError","destroyedDisplayingLocalWarning","<generator-invalidateLocalValidations>","removedExternalIssues","invalidateLocalValidations","updateValidationsToInvalidate","dependedPath","mappedDependedPath","updateComputedValuesToCompute","<generator-updateExternalIssuesToRemove>","updateExternalIssuesToRemove","updateStatefulValidationsToUpdate","observingPath","resolvedObservingPath","updateStatefulComputedValuesToUpdate","<generator-handleSchemaInitEvent>","handleSchemaInitEvent","<generator-handleSchemaChangeEvent>","handleSchemaChangeEvent","<generator-handleSchemaDestroyAction>","handleSchemaDestroyAction","<generator-handleSchemaAddAction>","handleSchemaAddAction","<generator-handleSchemaRemoveAction>","handleSchemaRemoveAction","WriteValueStateAction$withSchemaEventsBus$slambda","WriteValueStateAction$withSchemaEventsBus$slambda$lambda","WriteValueStateAction$handleSchemaEvent$lambda","WriteValueStateAction$handleSchemaEvent$lambda$lambda","WriteValueStateAction$setOnParent$slambda","WriteValueStateAction$setOnParent$slambda$lambda","WriteValueStateAction$destroyState$slambda","AbstractCollectionSchema$childrenSchemas$slambda","AbstractCollectionSchema$childrenSchemas$slambda$lambda","newValue","<generator-change>","requiredScales","ClassState$childrenStates$slambda","ClassState$childrenStates$slambda$lambda","ListState$childrenStates$slambda","ListState$childrenStates$slambda$lambda","<generator-isValidRemoveFragment>","<generator-isValidChildFragment>","<generator-isValidSetFragment>","NullableSimpleSchema$WrappedNullableValidation$validate$slambda","NullableSimpleSchema$WrappedNullableValidation$validate$slambda$lambda","replacedEvent","<generator-initState>","updateStateFn","<generator-destroyState>","NullableSimpleSchema$WrappedNullableStatefulValidation$validate$slambda","NullableSimpleSchema$WrappedNullableStatefulValidation$validate$slambda$lambda","NullableSimpleSchema$WrappedNullableStatefulValidation$updateStateFn$slambda","NullableSimpleSchema$WrappedNullableStatefulValidation$updateStateFn$slambda$lambda","NullableSimpleSchema$WrappedNullableStatefulValidation$validateFromState$slambda","NullableSimpleSchema$WrappedNullableStatefulValidation$validateFromState$slambda$lambda","<generator-clone>","NullableSimpleSchema$change$slambda","NullableSimpleSchema$change$slambda$lambda","elem","rowValue","isValidRowId","fromTable","intoTable","elPath","idFragment","TableSchema$children$slambda","TableSchema$children$slambda$lambda","TableSchema$init$slambda","TableSchema$init$slambda$lambda","TableSchema$change$slambda","TableSchema$change$slambda$lambda","TableSchema$destroy$slambda","TableSchema$destroy$slambda$lambda","TableSchema$set$slambda","TableSchema$set$slambda$lambda","TableSchema$remove$slambda","TableSchema$remove$slambda$lambda","TableState$childrenStates$slambda","TableState$childrenStates$slambda$lambda","sizeBoundsRestrictions","maxValue","v","minValue","commonRestrictions","allowedValuesSets","accumulator","scaleRestriction","scales","comparableBoundsRestrictions","typeMin","typeMax","validationMin","validationMax","acceptedFileTypesRestrictions","acceptedFileTypesValidations","patternRestrictions","matchesValidations","lengthBoundsRestrictions","patternRestrictions$lambda","comparePaths","path1","path2","absolutePath1","absolutePath2","id1","id2","int1","int2","childrenSchemasInfo","id1Index","id2Index","toPositiveIntWithoutLeadingZeroesOrNull","<generator-convertTableRowIndicesToIds>","ids","convertTableRowIndicesToIds","<generator-convertTableRowIdsToIndices>","indices","convertTableRowIdsToIndices","fileExtension","fileMimeType","getFileExtension","fileName","fullStopIdx","toMimeTypeOrNull","slashIdx","toMimeTypeString","mimeTypesMatch","acceptedMimeType","fileType","fileSubtype","acceptedType","acceptedSubtype","Accepts$validate$slambda","Accepts$validate$slambda$lambda","MustEqual$validate$slambda","MustEqual$validate$slambda$lambda","MustNotEqual$validate$slambda","MustNotEqual$validate$slambda$lambda","OneOf$validate$slambda","OneOf$validate$slambda$lambda","NotOneOf$validate$slambda","NotOneOf$validate$slambda$lambda","Min$validate$slambda","Min$validate$slambda$lambda","Max$validate$slambda","Max$validate$slambda$lambda","ExclusiveMin$validate$slambda","ExclusiveMin$validate$slambda$lambda","ExclusiveMax$validate$slambda","ExclusiveMax$validate$slambda$lambda","Length$validate$slambda","Length$validate$slambda$lambda","MinLength$validate$slambda","MinLength$validate$slambda$lambda","MaxLength$validate$slambda","MaxLength$validate$slambda$lambda","Matches$validate$slambda","Matches$validate$slambda$lambda","Required$validate$slambda","Required$validate$slambda$lambda","NotEmpty$validate$slambda","NotEmpty$validate$slambda$lambda","NotBlank$validate$slambda","NotBlank$validate$slambda$lambda","isMissing","Scale$validate$slambda","Scale$validate$slambda$lambda","Size$validate$slambda","Size$validate$slambda$lambda","MinSize$validate$slambda","MinSize$validate$slambda$lambda","MaxSize$validate$slambda","MaxSize$validate$slambda$lambda","el","conflictIndex","UniqueItemsBy$validate$slambda","UniqueItemsBy$validate$slambda$lambda","UniqueItems$<init>$lambda","$treatNullAsUnique","UniqueItems$<init>$lambda$lambda","iterableWithIndex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoNkD,iC;IAKtC,gCAAa,uCAAb,C;;;;;;IA+KA,uCAA0B,uBAA1B,uB;;KADJA,CA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