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E,MAAO,KAAM,SAG1B,MAAO,CAAE,MADK,YAAY,SAAS,EAAS,GAC5B,QACpB,CA9QA,MAAM,aAAe,CACjB,YAAQ,EACR,aAAe,MAAM,cAAc,OAAQ,CAAE,KAAM,MAAO,aAAc,6BACpE,IACA,MACJ,cAAgB,MAAM,cAAc,OAAQ,CAAE,KAAM,MAAO,aAAc,8BACrE,IACA,MACJ,YAAa,KAAM,CAAG,IAwQ1B,QAAQ,qBAAuB,qBAC/B,QAAQ,eAAiB,eACzB,QAAQ,gBAAkB,gBAC1B,QAAQ,WAAa,WACrB,QAAQ,MAAQ,MAChB,QAAQ,KAAO,KACf,QAAQ,YAAc,YACtB,QAAQ,aAAe,aACvB,QAAQ,eAAiB,eACzB,QAAQ,gBAAkB,gBAC1B,QAAQ,MAAQ,MAChB,QAAQ,YAAc,YACtB,QAAQ,KAAO,KACf,QAAQ,aAAe,aACvB,QAAQ,cAAgB,cACxB,QAAQ,MAAQ,MAChB,QAAQ,MAAQ,MAChB,QAAQ,WAAa,WACrB,QAAQ,QAAU,QAClB,QAAQ,WAAa,WACrB,QAAQ,SAAW","file":"/npm/@inrupt/solid-ui-react@3.0.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@inrupt/solid-ui-react@3.0.0/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nvar React = require('react');\nvar solidClient = require('@inrupt/solid-client');\nvar solidClientAuthnBrowser = require('@inrupt/solid-client-authn-browser');\nvar useSWR = require('swr');\nvar reactTable = require('react-table');\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst SessionContext = React.createContext({\n    login: solidClientAuthnBrowser.login,\n    logout: solidClientAuthnBrowser.logout,\n    fetch: solidClientAuthnBrowser.fetch,\n    session: solidClientAuthnBrowser.getDefaultSession(),\n    sessionRequestInProgress: true,\n    profile: undefined,\n});\n/**\n * Used to provide session data to child components through context, as used by various provided components and the useSession hook.\n */\nfunction SessionProvider({ sessionId, children, onError, sessionRequestInProgress: defaultSessionRequestInProgress, restorePreviousSession, skipLoadingProfile, onSessionRestore, }) {\n    const restoreSession = restorePreviousSession || typeof onSessionRestore !== \"undefined\";\n    const [session, setSession] = React.useState(solidClientAuthnBrowser.getDefaultSession);\n    const [profile, setProfile] = React.useState();\n    React.useEffect(() => {\n        if (onSessionRestore !== undefined) {\n            session.events.on(solidClientAuthnBrowser.EVENTS.SESSION_RESTORED, onSessionRestore);\n        }\n    }, [onSessionRestore, session.events]);\n    const defaultInProgress = typeof defaultSessionRequestInProgress === \"undefined\"\n        ? !session.info.isLoggedIn\n        : defaultSessionRequestInProgress;\n    // If loggedin is true, we're not making a session request.\n    const [sessionRequestInProgress, setSessionRequestInProgress] = React.useState(defaultInProgress);\n    let currentLocation;\n    if (typeof window !== \"undefined\") {\n        currentLocation = window.location;\n    }\n    React.useEffect(() => {\n        solidClientAuthnBrowser.handleIncomingRedirect({\n            url: window.location.href,\n            restorePreviousSession: restoreSession,\n        })\n            .then(async (sessionInfo) => {\n            if (skipLoadingProfile === true) {\n                return;\n            }\n            // If handleIncomingRedirect logged the session in, we know what the current\n            // user's WebID is.\n            if ((sessionInfo === null || sessionInfo === void 0 ? void 0 : sessionInfo.webId) !== undefined) {\n                const profiles = await solidClient.getProfileAll(sessionInfo === null || sessionInfo === void 0 ? void 0 : sessionInfo.webId, {\n                    fetch: session.fetch,\n                });\n                setProfile(profiles);\n            }\n        })\n            .catch((error) => {\n            if (onError) {\n                onError(error);\n            }\n            else {\n                throw error;\n            }\n        })\n            .finally(() => {\n            // console.log(\"done\");\n            setSessionRequestInProgress(false);\n        });\n        solidClientAuthnBrowser.getDefaultSession().events.on(\"logout\", () => {\n            // TODO force a refresh\n            setSession(solidClientAuthnBrowser.getDefaultSession());\n        });\n    }, [\n        session,\n        sessionId,\n        onError,\n        currentLocation,\n        restoreSession,\n        skipLoadingProfile,\n    ]);\n    const contextLogin = async (options) => {\n        setSessionRequestInProgress(true);\n        try {\n            await solidClientAuthnBrowser.login(options);\n        }\n        catch (error) {\n            if (onError) {\n                onError(error);\n            }\n            else {\n                throw error;\n            }\n        }\n        finally {\n            setSessionRequestInProgress(false);\n        }\n    };\n    const contextLogout = async () => {\n        try {\n            await solidClientAuthnBrowser.logout();\n            setProfile(undefined);\n        }\n        catch (error) {\n            if (onError) {\n                onError(error);\n            }\n            else {\n                throw error;\n            }\n        }\n    };\n    return (React.createElement(SessionContext.Provider, { value: {\n            session,\n            login: contextLogin,\n            logout: contextLogout,\n            sessionRequestInProgress,\n            setSessionRequestInProgress,\n            fetch: solidClientAuthnBrowser.fetch,\n            profile,\n        } }, children));\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nfunction FileUpload({ saveLocation, onError, onSave, inputProps, autosave, }) {\n    const { fetch } = React.useContext(SessionContext);\n    const handleChange = async (e) => {\n        const target = e.target;\n        // This is a typescript bug, as target.files should always be a FileList:\n        if (!target.files) {\n            return;\n        }\n        if (!autosave) {\n            return;\n        }\n        try {\n            const savedFile = await solidClient.saveFileInContainer(saveLocation, target.files[0], {\n                slug: target.files[0].name ? target.files[0].name : undefined,\n                fetch,\n            });\n            if (onSave) {\n                onSave(savedFile);\n            }\n        }\n        catch (saveError) {\n            if (onError) {\n                onError(saveError);\n            }\n        }\n    };\n    return (React.createElement(\"input\", Object.assign({ type: \"file\" }, inputProps, { onChange: (e) => handleChange(e), \"data-testid\": \"form-input\" })));\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\nfunction __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n    var e = new Error(message);\r\n    return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nfunction useDataset(datasetIri, \n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\noptions) {\n    const { fetch } = React.useContext(SessionContext);\n    const { solidDataset: datasetFromContext } = React.useContext(DatasetContext);\n    const { data, error } = useSWR(datasetIri ? [datasetIri, options, fetch] : null, () => {\n        const requestOptions = Object.assign({ fetch }, options);\n        // useSWR will only call this fetcher if datasetUri is defined\n        return solidClient.getSolidDataset(datasetIri, requestOptions);\n    });\n    const dataset = datasetIri ? data : datasetFromContext;\n    return { dataset, error };\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst DatasetContext = React.createContext({\n    solidDataset: undefined,\n    setDataset: () => { },\n});\n/**\n * Used to provide a [Dataset](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-SolidDataset) to child components through context, as used by various provided components and the useDataset hook.\n */\nfunction DatasetProvider({ children, onError, solidDataset: propDataset, datasetUrl, loading, loadingComponent: LoadingComponent, }) {\n    const { dataset, error } = useDataset(datasetUrl);\n    if (error && onError) {\n        onError(error);\n    }\n    const datasetToUse = propDataset !== null && propDataset !== void 0 ? propDataset : dataset;\n    // Provide a setDataset function so that child components can update.\n    const [stateDataset, setDataset] = React.useState(datasetToUse);\n    // If the dataset is asynchronously loaded, make sure to set the new state value.\n    React.useEffect(() => {\n        setDataset(datasetToUse);\n    }, [datasetToUse]);\n    let loader = (LoadingComponent && (React.createElement(LoadingComponent, null))) ||\n        loading || React.createElement(\"span\", null, \"Fetching data...\");\n    if (LoadingComponent === null) {\n        loader = null;\n    }\n    return (React.createElement(DatasetContext.Provider, { value: { solidDataset: stateDataset, setDataset } }, stateDataset ? children : loader));\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst ThingContext = React.createContext({\n    thing: null,\n    setThing: () => { },\n});\n/**\n * Used to provide a Thing to child components through context, as used by various provided components and the useThing hook.\n */\nfunction ThingProvider({ children, thing: propThing, thingUrl, }) {\n    const { solidDataset } = React.useContext(DatasetContext);\n    let thing = propThing;\n    if (solidDataset && thingUrl) {\n        thing = solidClient.getThing(solidDataset, thingUrl);\n    }\n    // Allow child components to update the thing\n    const [stateThing, setThing] = React.useState(thing || null);\n    // Reset the thing if the dataset changes.\n    React.useEffect(() => {\n        if (solidDataset && thingUrl) {\n            setThing(solidClient.getThing(solidDataset, thingUrl));\n        }\n        else if (propThing) {\n            setThing(propThing);\n        }\n    }, [solidDataset, thingUrl, propThing]);\n    return (React.createElement(ThingContext.Provider, { value: { thing: stateThing, setThing } }, children));\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst overwriteFile = async (src, file, input, fetch, maxSize, onSave, onError) => {\n    try {\n        if (maxSize !== undefined && file.size > maxSize * 1024) {\n            input.setCustomValidity(`The selected file must not be larger than ${maxSize}kB`);\n            input.reportValidity();\n            return null;\n        }\n        input.setCustomValidity(\"\");\n        await solidClient.overwriteFile(src, file, { fetch });\n        if (onSave) {\n            onSave();\n        }\n        const objectUrl = URL.createObjectURL(file);\n        return objectUrl;\n    }\n    catch (error) {\n        if (onError) {\n            onError(error);\n        }\n        return null;\n    }\n};\nconst retrieveFile = async (src, fetch) => {\n    const imageBlob = await solidClient.getFile(src, { fetch });\n    return imageBlob;\n};\nfunction getValueByType(type, thing, property, locale) {\n    switch (type) {\n        case \"boolean\":\n            return solidClient.getBoolean(thing, property);\n        case \"datetime\":\n            return solidClient.getDatetime(thing, property);\n        case \"decimal\":\n            return solidClient.getDecimal(thing, property);\n        case \"integer\":\n            return solidClient.getInteger(thing, property);\n        case \"url\":\n            return solidClient.getUrl(thing, property);\n        default:\n            if (locale) {\n                return solidClient.getStringWithLocale(thing, property, locale);\n            }\n            return solidClient.getStringNoLocale(thing, property);\n    }\n}\nfunction getValueByTypeAll(type, thing, property, locale) {\n    switch (type) {\n        case \"boolean\":\n            return solidClient.getBooleanAll(thing, property);\n        case \"datetime\":\n            return solidClient.getDatetimeAll(thing, property);\n        case \"decimal\":\n            return solidClient.getDecimalAll(thing, property);\n        case \"integer\":\n            return solidClient.getIntegerAll(thing, property);\n        case \"url\":\n            return solidClient.getUrlAll(thing, property);\n        default:\n            if (locale) {\n                return solidClient.getStringWithLocaleAll(thing, property, locale);\n            }\n            return solidClient.getStringNoLocaleAll(thing, property);\n    }\n}\nfunction getPropertyForThing(propertySelector, type, thing, properties, locale) {\n    return (properties.find((property) => {\n        return propertySelector(type, thing, property, locale);\n    }) || properties[0]);\n}\nfunction useProperty(props) {\n    const { dataset: propDataset, thing: propThing, properties: propProperties, property: propProperty, type, locale, } = props;\n    const { solidDataset: contextDataset, setDataset = () => { } } = React.useContext(DatasetContext);\n    const dataset = propDataset || contextDataset;\n    const { thing: contextThing, setThing = () => { } } = React.useContext(ThingContext);\n    const thing = propThing || contextThing || undefined;\n    let error;\n    if (!thing) {\n        error = new Error(\"Thing not found as property or in context\");\n    }\n    const property = thing && propProperties\n        ? getPropertyForThing(getValueByType, type, thing, propProperties, locale) || propProperties[0]\n        : propProperty;\n    if (!property) {\n        throw new Error(\"No property provided\");\n    }\n    const value = thing && property ? getValueByType(type, thing, property, locale) : null;\n    return {\n        dataset,\n        thing,\n        property,\n        error,\n        value,\n        setDataset,\n        setThing,\n    };\n}\nfunction useDatetimeBrowserSupport() {\n    const [isDatetimeSupported, setIsDatetimeSupported] = React.useState(null);\n    React.useEffect(() => {\n        const test = document.createElement(\"input\");\n        test.type = \"datetime-local\";\n        setIsDatetimeSupported(test.type !== \"text\");\n    }, []);\n    return isDatetimeSupported;\n}\nasync function updateDataset(datasetUrl, setDataset) {\n    const latestDataset = await solidClient.getSolidDataset(datasetUrl);\n    setDataset(latestDataset);\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nfunction useFile(url) {\n    const [error, setError] = React.useState();\n    const [inProgress, setInProgress] = React.useState(false);\n    const [data, setData] = React.useState();\n    const { fetch } = React.useContext(SessionContext);\n    React.useEffect(() => {\n        if (!url)\n            return;\n        setInProgress(true);\n        retrieveFile(url, fetch)\n            .then((response) => {\n            setData(response);\n            setInProgress(false);\n        })\n            .catch((retrieveError) => {\n            setError(retrieveError);\n            setInProgress(false);\n        });\n    }, [url, fetch]);\n    return { error, inProgress, data };\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * Fetches and displays an image, from a src found at a given property of a given [Thing](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-Thing). Can also be used to upload a new/replacement image file.\n */\nfunction Image(_a) {\n    var { thing: propThing, property: propProperty, properties: propProperties, edit, autosave, allowDelete, onSave, onError, maxSize, alt, inputProps, errorComponent: ErrorComponent, loadingComponent: LoadingComponent, deleteComponent: DeleteComponent, saveLocation, solidDataset } = _a, imgOptions = __rest(_a, [\"thing\", \"property\", \"properties\", \"edit\", \"autosave\", \"allowDelete\", \"onSave\", \"onError\", \"maxSize\", \"alt\", \"inputProps\", \"errorComponent\", \"loadingComponent\", \"deleteComponent\", \"saveLocation\", \"solidDataset\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const values = useProperty({\n        thing: propThing,\n        property: propProperty,\n        properties: propProperties,\n        type: \"url\",\n    });\n    const { value, thing, error: thingError } = values;\n    let valueError;\n    if (!value) {\n        valueError = new Error(\"No value found for property.\");\n    }\n    const isFetchingThing = !thing && !thingError;\n    const [error, setError] = React.useState(thingError !== null && thingError !== void 0 ? thingError : valueError);\n    React.useEffect(() => {\n        if (error) {\n            if (onError) {\n                onError(error);\n            }\n        }\n    }, [error, onError, ErrorComponent]);\n    const [imgObjectUrl, setImgObjectUrl] = React.useState();\n    const { data, error: imgError, inProgress: fetchingFileInProgress, } = useFile(value);\n    React.useEffect(() => {\n        if (fetchingFileInProgress) {\n            return;\n        }\n        if (imgError) {\n            setError(imgError);\n            return;\n        }\n        const imageObjectUrl = data && URL.createObjectURL(data);\n        if (imageObjectUrl) {\n            setImgObjectUrl(imageObjectUrl);\n        }\n    }, [data, fetchingFileInProgress, imgError]);\n    const handleDelete = async () => {\n        if (!propThing ||\n            !solidDataset ||\n            !propProperty ||\n            typeof value !== \"string\" ||\n            !autosave) {\n            return;\n        }\n        try {\n            const updatedThing = solidClient.removeUrl(propThing, propProperty, value);\n            const updatedDataset = solidClient.setThing(solidDataset, updatedThing);\n            const datasetSourceUrl = solidClient.getSourceUrl(solidDataset);\n            if (!datasetSourceUrl)\n                return;\n            await solidClient.saveSolidDatasetAt(datasetSourceUrl, updatedDataset, {\n                fetch,\n            });\n        }\n        catch (e) {\n            setError(e);\n        }\n    };\n    const handleChange = async (input) => {\n        const fileList = input.files;\n        if (autosave && fileList && fileList.length > 0) {\n            if (value) {\n                const newObjectUrl = await overwriteFile(value, fileList[0], input, fetch, maxSize, onSave, onError);\n                if (newObjectUrl) {\n                    setImgObjectUrl(newObjectUrl);\n                }\n            }\n            else if (!value && saveLocation) {\n                const savedFile = await solidClient.saveFileInContainer(saveLocation, fileList[0], {\n                    fetch,\n                });\n                const savedFileUrl = solidClient.getSourceUrl(savedFile);\n                if (savedFileUrl && propThing && propProperty && solidDataset) {\n                    setImgObjectUrl(savedFileUrl);\n                    try {\n                        const updatedThing = solidClient.addUrl(propThing, propProperty, savedFileUrl);\n                        const updatedDataset = solidClient.setThing(solidDataset, updatedThing);\n                        const datasetSourceUrl = solidClient.getSourceUrl(solidDataset);\n                        if (!datasetSourceUrl)\n                            return;\n                        await solidClient.saveSolidDatasetAt(datasetSourceUrl, updatedDataset, {\n                            fetch,\n                        });\n                    }\n                    catch (e) {\n                        setError(e);\n                    }\n                }\n            }\n        }\n    };\n    let imageComponent = null;\n    if (isFetchingThing || fetchingFileInProgress) {\n        let loader = (LoadingComponent && (React.createElement(LoadingComponent, null))) || React.createElement(\"span\", null, \"fetching data in progress\");\n        if (LoadingComponent === null) {\n            loader = null;\n        }\n        return loader;\n    }\n    if (error) {\n        imageComponent = ErrorComponent ? (React.createElement(ErrorComponent, { error: error })) : (React.createElement(\"span\", null, error.toString()));\n    }\n    else if (value) {\n        /* eslint-disable-next-line react/jsx-props-no-spreading */\n        imageComponent = React.createElement(\"img\", Object.assign({ src: imgObjectUrl, alt: alt !== null && alt !== void 0 ? alt : \"\" }, imgOptions));\n    }\n    return (React.createElement(React.Fragment, null,\n        imageComponent,\n        edit && (React.createElement(\"input\", Object.assign({}, inputProps, { type: \"file\", accept: \"image/*\", onChange: (e) => handleChange(e.target) }))),\n        allowDelete &&\n            (DeleteComponent ? (React.createElement(DeleteComponent, { onClick: handleDelete })) : (React.createElement(\"button\", { type: \"button\", onClick: handleDelete }, \"Delete\")))));\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst DatetimeValue = (props) => {\n    var _a;\n    const { thing: propThing, solidDataset: propDataset, property: propProperty, properties: propProperties, saveDatasetTo, onSave, onError, edit, autosave, inputProps } = props, other = __rest(props, [\"thing\", \"solidDataset\", \"property\", \"properties\", \"saveDatasetTo\", \"onSave\", \"onError\", \"edit\", \"autosave\", \"inputProps\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const { value: thingValue, thing, property, dataset, setDataset, error, } = useProperty({\n        dataset: propDataset,\n        thing: propThing,\n        type: \"datetime\",\n        property: propProperty,\n        properties: propProperties,\n    });\n    const isDatetimeSupported = useDatetimeBrowserSupport();\n    React.useEffect(() => {\n        if (error && onError) {\n            onError(error);\n        }\n    }, [error, onError]);\n    const formattedValue = thingValue\n        ? thingValue\n            .toISOString()\n            .substring(0, thingValue.toISOString().length - 5)\n        : null;\n    const [value, setValue] = React.useState(formattedValue);\n    let initialDateValue = \"\";\n    if (!isDatetimeSupported) {\n        initialDateValue = value === null || value === void 0 ? void 0 : value.split(/T(.+)/)[0].toString();\n    }\n    let initialTimeValue = \"00:00\";\n    if (!isDatetimeSupported) {\n        initialTimeValue = (_a = value === null || value === void 0 ? void 0 : value.split(/T(.+)/)[1]) === null || _a === void 0 ? void 0 : _a.toString();\n    }\n    const [time, setTime] = React.useState(initialTimeValue);\n    const [date, setDate] = React.useState(initialDateValue);\n    React.useEffect(() => {\n        if ((!time && !date) || isDatetimeSupported)\n            return;\n        setValue(`${date !== null && date !== void 0 ? date : \"\"}T${time !== null && time !== void 0 ? time : \"00:00\"}`);\n    }, [time, date, isDatetimeSupported]);\n    /* Save Value value in the pod */\n    const saveHandler = async (e) => {\n        if (formattedValue !== value &&\n            thing &&\n            dataset &&\n            e.target.reportValidity()) {\n            const datetimeValue = value;\n            const updatedResource = solidClient.setDatetime(thing, property, new Date(`${datetimeValue}Z`));\n            try {\n                let savedDataset;\n                if (saveDatasetTo) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(saveDatasetTo, solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(saveDatasetTo, setDataset);\n                }\n                else if (solidClient.hasResourceInfo(dataset)) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(solidClient.getSourceUrl(dataset), solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(solidClient.getSourceUrl(dataset), setDataset);\n                }\n                else if (onError) {\n                    onError(new Error(\"Please provide saveDatasetTo location for new data\"));\n                }\n                if (!error && onSave) {\n                    onSave(savedDataset, updatedResource);\n                }\n            }\n            catch (saveError) {\n                if (onError) {\n                    onError(saveError);\n                }\n            }\n        }\n    };\n    let inputType;\n    if (isDatetimeSupported) {\n        inputType = \"datetime-local\";\n    }\n    else {\n        inputType = \"datetime-workaround\";\n    }\n    return (React.createElement(React.Fragment, null,\n        // eslint-disable-next-line react/jsx-props-no-spreading\n        !edit && dataset && thing && React.createElement(\"span\", Object.assign({}, other), `${value}`),\n        edit && dataset && thing && inputType === \"datetime-local\" && (React.createElement(\"input\", Object.assign({ type: inputType, \"aria-label\": \"Date and Time\", step: \"any\" }, inputProps, { onChange: (e) => {\n                setValue(e.target.value);\n            }, onBlur: (e) => autosave && saveHandler(e), value: value, pattern: \"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}\", placeholder: \"yyyy-mm-ddThh:mm\" }))),\n        edit && dataset && thing && inputType === \"datetime-workaround\" && (React.createElement(React.Fragment, null,\n            React.createElement(\"input\", Object.assign({ type: \"date\", \"aria-label\": \"Date\", step: \"any\" }, inputProps, { onChange: (e) => {\n                    setDate(e.target.value);\n                }, onBlur: (e) => autosave && saveHandler(e), value: date, pattern: \"[0-9]{4}-[0-9]{2}-[0-9]{2}\", placeholder: \"yyyy-mm-dd\" })),\n            React.createElement(\"input\", { type: \"time\", \"aria-label\": \"Time\", value: time, onChange: (e) => setTime(e.target.value), onBlur: (e) => autosave && saveHandler(e), pattern: \"[0-9]{2}:[0-9]{2}\" })))));\n};\nDatetimeValue.defaultProps = {\n    autosave: false,\n    edit: false,\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst StringValue = (props) => {\n    var _a;\n    const { thing: propThing, solidDataset: propDataset, property: propProperty, properties: propProperties, saveDatasetTo, locale, onSave, onError, edit, autosave, inputProps } = props, other = __rest(props, [\"thing\", \"solidDataset\", \"property\", \"properties\", \"saveDatasetTo\", \"locale\", \"onSave\", \"onError\", \"edit\", \"autosave\", \"inputProps\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const { value: thingValue, thing, property, dataset, setDataset, error, } = useProperty({\n        dataset: propDataset,\n        thing: propThing,\n        type: \"string\",\n        property: propProperty,\n        properties: propProperties,\n        locale,\n    });\n    React.useEffect(() => {\n        if (error && onError) {\n            onError(error);\n        }\n    }, [error, onError]);\n    const formattedValue = (_a = thingValue === null || thingValue === void 0 ? void 0 : thingValue.toString()) !== null && _a !== void 0 ? _a : \"\";\n    const [value, setValue] = React.useState(formattedValue);\n    /* Save Value value in the pod */\n    const saveHandler = async (e) => {\n        if (formattedValue !== value &&\n            thing &&\n            dataset &&\n            e.target.reportValidity()) {\n            let updatedResource;\n            if (locale) {\n                updatedResource = solidClient.setStringWithLocale(thing, property, value, locale);\n            }\n            else {\n                updatedResource = solidClient.setStringNoLocale(thing, property, value);\n            }\n            try {\n                let savedDataset;\n                if (saveDatasetTo) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(saveDatasetTo, solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(saveDatasetTo, setDataset);\n                }\n                else if (solidClient.hasResourceInfo(dataset)) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(solidClient.getSourceUrl(dataset), solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(solidClient.getSourceUrl(dataset), setDataset);\n                }\n                else if (onError) {\n                    onError(new Error(\"Please provide saveDatasetTo location for new data\"));\n                }\n                if (!error && onSave) {\n                    onSave(savedDataset, updatedResource);\n                }\n            }\n            catch (saveError) {\n                if (onError) {\n                    onError(saveError);\n                }\n            }\n        }\n    };\n    return (React.createElement(React.Fragment, null,\n        // eslint-disable-next-line react/jsx-props-no-spreading\n        !edit && dataset && thing && React.createElement(\"span\", Object.assign({}, other), value),\n        edit && dataset && thing && (React.createElement(\"input\", Object.assign({ type: \"text\" }, inputProps, { onChange: (e) => {\n                setValue(e.target.value);\n            }, onBlur: (e) => autosave && saveHandler(e), value: value })))));\n};\nStringValue.defaultProps = {\n    autosave: false,\n    edit: false,\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst BooleanValue = (props) => {\n    var _a;\n    const { thing: propThing, solidDataset: propDataset, property: propProperty, properties: propProperties, saveDatasetTo, onSave, onError, edit, autosave, inputProps } = props, other = __rest(props, [\"thing\", \"solidDataset\", \"property\", \"properties\", \"saveDatasetTo\", \"onSave\", \"onError\", \"edit\", \"autosave\", \"inputProps\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const { value: thingValue, thing, property, dataset, setDataset, error, } = useProperty({\n        dataset: propDataset,\n        thing: propThing,\n        type: \"boolean\",\n        property: propProperty,\n        properties: propProperties,\n    });\n    React.useEffect(() => {\n        if (error && onError) {\n            onError(error);\n        }\n    }, [error, onError]);\n    let formattedValue = thingValue;\n    let initialBooleanValue = false;\n    initialBooleanValue = (_a = thingValue) !== null && _a !== void 0 ? _a : false;\n    formattedValue = initialBooleanValue.toString();\n    const [value, setValue] = React.useState(formattedValue);\n    const [booleanValue, setBooleanValue] = React.useState(initialBooleanValue);\n    React.useEffect(() => {\n        setValue(booleanValue.toString());\n    }, [booleanValue]);\n    /* Save Value value in the pod */\n    const saveHandler = async (e) => {\n        if (formattedValue !== value &&\n            thing &&\n            dataset &&\n            e.target.reportValidity()) {\n            const updatedResource = solidClient.setBoolean(thing, property, booleanValue);\n            try {\n                let savedDataset;\n                if (saveDatasetTo) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(saveDatasetTo, solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(saveDatasetTo, setDataset);\n                }\n                else if (solidClient.hasResourceInfo(dataset)) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(solidClient.getSourceUrl(dataset), solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(solidClient.getSourceUrl(dataset), setDataset);\n                }\n                else if (onError) {\n                    onError(new Error(\"Please provide saveDatasetTo location for new data\"));\n                }\n                if (!error && onSave) {\n                    onSave(savedDataset, updatedResource);\n                }\n            }\n            catch (saveError) {\n                if (onError) {\n                    onError(saveError);\n                }\n            }\n        }\n    };\n    return (React.createElement(React.Fragment, null,\n        // eslint-disable-next-line react/jsx-props-no-spreading\n        !edit && dataset && thing && React.createElement(\"span\", Object.assign({}, other), `${value}`),\n        edit && dataset && thing && (React.createElement(\"input\", Object.assign({ type: \"checkbox\", checked: booleanValue }, inputProps, { onChange: (e) => {\n                setBooleanValue(e.target.checked);\n            }, onBlur: (e) => autosave && saveHandler(e), value: value })))));\n};\nBooleanValue.defaultProps = {\n    autosave: false,\n    edit: false,\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst UrlValue = (props) => {\n    var _a;\n    const { thing: propThing, solidDataset: propDataset, property: propProperty, properties: propProperties, saveDatasetTo, onSave, onError, edit, autosave, inputProps } = props, other = __rest(props, [\"thing\", \"solidDataset\", \"property\", \"properties\", \"saveDatasetTo\", \"onSave\", \"onError\", \"edit\", \"autosave\", \"inputProps\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const { value: thingValue, thing, property, dataset, setDataset, error, } = useProperty({\n        dataset: propDataset,\n        thing: propThing,\n        type: \"url\",\n        property: propProperty,\n        properties: propProperties,\n    });\n    React.useEffect(() => {\n        if (error && onError) {\n            onError(error);\n        }\n    }, [error, onError]);\n    const formattedValue = (_a = thingValue === null || thingValue === void 0 ? void 0 : thingValue.toString()) !== null && _a !== void 0 ? _a : \"\";\n    const [value, setValue] = React.useState(formattedValue);\n    /* Save Value value in the pod */\n    const saveHandler = async (e) => {\n        if (formattedValue !== value &&\n            thing &&\n            dataset &&\n            e.target.reportValidity()) {\n            const updatedResource = solidClient.setUrl(thing, property, value);\n            try {\n                let savedDataset;\n                if (saveDatasetTo) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(saveDatasetTo, solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(saveDatasetTo, setDataset);\n                }\n                else if (solidClient.hasResourceInfo(dataset)) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(solidClient.getSourceUrl(dataset), solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(solidClient.getSourceUrl(dataset), setDataset);\n                }\n                else if (onError) {\n                    onError(new Error(\"Please provide saveDatasetTo location for new data\"));\n                }\n                if (!error && onSave) {\n                    onSave(savedDataset, updatedResource);\n                }\n            }\n            catch (saveError) {\n                if (onError) {\n                    onError(saveError);\n                }\n            }\n        }\n    };\n    return (React.createElement(React.Fragment, null,\n        // eslint-disable-next-line react/jsx-props-no-spreading\n        !edit && dataset && thing && React.createElement(\"span\", Object.assign({}, other), `${value}`),\n        edit && dataset && thing && (React.createElement(\"input\", Object.assign({ type: \"url\" }, inputProps, { onChange: (e) => {\n                setValue(e.target.value);\n            }, onBlur: (e) => autosave && saveHandler(e), value: value })))));\n};\nUrlValue.defaultProps = {\n    autosave: false,\n    edit: false,\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst IntegerValue = (props) => {\n    var _a;\n    const { thing: propThing, solidDataset: propDataset, property: propProperty, properties: propProperties, saveDatasetTo, onSave, onError, edit, autosave, inputProps } = props, other = __rest(props, [\"thing\", \"solidDataset\", \"property\", \"properties\", \"saveDatasetTo\", \"onSave\", \"onError\", \"edit\", \"autosave\", \"inputProps\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const { value: thingValue, thing, property, dataset, setDataset, error, } = useProperty({\n        dataset: propDataset,\n        thing: propThing,\n        type: \"integer\",\n        property: propProperty,\n        properties: propProperties,\n    });\n    React.useEffect(() => {\n        if (error && onError) {\n            onError(error);\n        }\n    }, [error, onError]);\n    const formattedValue = (_a = thingValue === null || thingValue === void 0 ? void 0 : thingValue.toString()) !== null && _a !== void 0 ? _a : \"\";\n    const [value, setValue] = React.useState(formattedValue);\n    /* Save Value value in the pod */\n    const saveHandler = async (e) => {\n        if (formattedValue !== value &&\n            thing &&\n            dataset &&\n            e.target.reportValidity()) {\n            const updatedResource = solidClient.setInteger(thing, property, parseInt(value, 10));\n            try {\n                let savedDataset;\n                if (saveDatasetTo) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(saveDatasetTo, solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(saveDatasetTo, setDataset);\n                }\n                else if (solidClient.hasResourceInfo(dataset)) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(solidClient.getSourceUrl(dataset), solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(solidClient.getSourceUrl(dataset), setDataset);\n                }\n                else if (onError) {\n                    onError(new Error(\"Please provide saveDatasetTo location for new data\"));\n                }\n                if (!error && onSave) {\n                    onSave(savedDataset, updatedResource);\n                }\n            }\n            catch (saveError) {\n                if (onError) {\n                    onError(saveError);\n                }\n            }\n        }\n    };\n    return (React.createElement(React.Fragment, null,\n        // eslint-disable-next-line react/jsx-props-no-spreading\n        !edit && dataset && thing && React.createElement(\"span\", Object.assign({}, other), `${value}`),\n        edit && dataset && thing && (React.createElement(\"input\", Object.assign({ type: \"number\", step: \"any\" }, inputProps, { onChange: (e) => {\n                setValue(e.target.value);\n            }, onBlur: (e) => autosave && saveHandler(e), value: value })))));\n};\nIntegerValue.defaultProps = {\n    autosave: false,\n    edit: false,\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nconst DecimalValue = (props) => {\n    var _a;\n    const { thing: propThing, solidDataset: propDataset, property: propProperty, properties: propProperties, saveDatasetTo, onSave, onError, edit, autosave, inputProps } = props, other = __rest(props, [\"thing\", \"solidDataset\", \"property\", \"properties\", \"saveDatasetTo\", \"onSave\", \"onError\", \"edit\", \"autosave\", \"inputProps\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const { value: thingValue, thing, property, dataset, setDataset, error, } = useProperty({\n        dataset: propDataset,\n        thing: propThing,\n        type: \"decimal\",\n        property: propProperty,\n        properties: propProperties,\n    });\n    React.useEffect(() => {\n        if (error && onError) {\n            onError(error);\n        }\n    }, [error, onError]);\n    const formattedValue = (_a = thingValue === null || thingValue === void 0 ? void 0 : thingValue.toString()) !== null && _a !== void 0 ? _a : \"\";\n    const [value, setValue] = React.useState(formattedValue);\n    /* Save Value value in the pod */\n    const saveHandler = async (e) => {\n        if (formattedValue !== value &&\n            thing &&\n            dataset &&\n            e.target.reportValidity()) {\n            const updatedResource = solidClient.setDecimal(thing, property, parseFloat(value));\n            try {\n                let savedDataset;\n                if (saveDatasetTo) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(saveDatasetTo, solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(saveDatasetTo, setDataset);\n                }\n                else if (solidClient.hasResourceInfo(dataset)) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(solidClient.getSourceUrl(dataset), solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(solidClient.getSourceUrl(dataset), setDataset);\n                }\n                else if (onError) {\n                    onError(new Error(\"Please provide saveDatasetTo location for new data\"));\n                }\n                if (!error && onSave) {\n                    onSave(savedDataset, updatedResource);\n                }\n            }\n            catch (saveError) {\n                if (onError) {\n                    onError(saveError);\n                }\n            }\n        }\n    };\n    return (React.createElement(React.Fragment, null,\n        // eslint-disable-next-line react/jsx-props-no-spreading\n        !edit && dataset && thing && React.createElement(\"span\", Object.assign({}, other), `${value}`),\n        edit && dataset && thing && (React.createElement(\"input\", Object.assign({ type: \"number\", step: \"any\" }, inputProps, { onChange: (e) => {\n                setValue(e.target.value);\n            }, onBlur: (e) => autosave && saveHandler(e), value: value })))));\n};\nDecimalValue.defaultProps = {\n    autosave: false,\n    edit: false,\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * Retrieves and displays a value of one of a range of types from a given [Dataset](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-SolidDataset)/[Thing](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-Thing)/property. Can also be used to set/update and persist a value.\n */\nfunction Value(props) {\n    const _a = props, { dataType } = _a, otherProps = __rest(_a, [\"dataType\"]);\n    const { thing: propThing, solidDataset: propDataset, property: propProperty, properties: propProperties, edit, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, locale, } = otherProps;\n    const { thing, value, error: thingError, } = useProperty({\n        dataset: propDataset,\n        thing: propThing,\n        property: propProperty,\n        properties: propProperties,\n        type: dataType,\n        locale,\n    });\n    let valueError;\n    if (!edit && !value && dataType !== \"boolean\") {\n        valueError = new Error(\"No value found for property.\");\n    }\n    const isFetchingThing = !thing && !thingError;\n    const [error] = React.useState(thingError !== null && thingError !== void 0 ? thingError : valueError);\n    if (isFetchingThing) {\n        let loader = (LoadingComponent && (React.createElement(LoadingComponent, null))) || React.createElement(\"span\", null, \"fetching data in progress\");\n        if (LoadingComponent === null) {\n            loader = null;\n        }\n        return loader;\n    }\n    if (error) {\n        if (ErrorComponent) {\n            return React.createElement(ErrorComponent, { error: error });\n        }\n        return React.createElement(\"span\", null, error.toString());\n    }\n    let Component = StringValue;\n    switch (dataType) {\n        case \"boolean\":\n            Component = BooleanValue;\n            break;\n        case \"datetime\":\n            Component = DatetimeValue;\n            break;\n        case \"decimal\":\n            Component = DecimalValue;\n            break;\n        case \"integer\":\n            Component = IntegerValue;\n            break;\n        case \"url\":\n            Component = UrlValue;\n            break;\n        default:\n            Component = StringValue;\n    }\n    // eslint-disable-next-line react/jsx-props-no-spreading\n    return React.createElement(Component, Object.assign({}, otherProps));\n}\nValue.defaultProps = {\n    autosave: false,\n    edit: false,\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * Retrieves a URL from given [Thing](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-Thing)/property, and renders as an anchor tag with the given href.\n */\nfunction Link(_a) {\n    var { children, property: propProperty, properties: propProperties, thing: propThing, solidDataset, autosave, rel, target, edit, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, onSave, onError } = _a, linkOptions = __rest(_a, [\"children\", \"property\", \"properties\", \"thing\", \"solidDataset\", \"autosave\", \"rel\", \"target\", \"edit\", \"loadingComponent\", \"errorComponent\", \"onSave\", \"onError\"]);\n    const { value: href, thing, property, dataset, error: thingError, } = useProperty({\n        dataset: solidDataset,\n        thing: propThing,\n        property: propProperty,\n        properties: propProperties,\n        type: \"url\",\n    });\n    let valueError;\n    if (!edit && !href) {\n        valueError = new Error(\"URL not found for given property\");\n    }\n    const isFetchingThing = !thing && !thingError;\n    const [error] = React.useState(thingError !== null && thingError !== void 0 ? thingError : valueError);\n    if (isFetchingThing) {\n        let loader = (LoadingComponent && (React.createElement(LoadingComponent, null))) || React.createElement(\"span\", null, \"fetching data in progress\");\n        if (LoadingComponent === null) {\n            loader = null;\n        }\n        return loader;\n    }\n    if (error) {\n        if (ErrorComponent) {\n            return React.createElement(ErrorComponent, { error: error });\n        }\n        return React.createElement(\"span\", null, error.toString());\n    }\n    const adjustedRel = rel || (target === \"_blank\" ? \"noopener noreferrer\" : \"nofollow\");\n    if (edit) {\n        return (React.createElement(Value, { dataType: \"url\", solidDataset: dataset, thing: thing, property: property, autosave: autosave, onSave: onSave, onError: onError, edit: true }));\n    }\n    return (\n    // eslint-disable-next-line react/jsx-props-no-spreading\n    React.createElement(\"a\", Object.assign({ href: href, rel: adjustedRel, target: target }, linkOptions), children !== null && children !== void 0 ? children : href));\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * Displays a button which triggers the login flow on click. Should be used inside a `SessionProvider`.\n */\nconst LoginButton = ({ oidcIssuer, redirectUrl, children, authOptions, onError, }) => {\n    const options = Object.assign({ redirectUrl,\n        oidcIssuer }, authOptions);\n    const { login, setSessionRequestInProgress } = React.useContext(SessionContext);\n    async function loginHandler() {\n        if (setSessionRequestInProgress === undefined) {\n            return;\n        }\n        setSessionRequestInProgress(true);\n        try {\n            await login(options);\n            setSessionRequestInProgress(false);\n        }\n        catch (error) {\n            setSessionRequestInProgress(false);\n            if (onError)\n                onError(error);\n        }\n    }\n    function keyDownHandler(e) {\n        e.preventDefault();\n        return e.key === \"Enter\" ? loginHandler() : Promise.resolve();\n    }\n    return children ? (React.createElement(\"div\", { role: \"button\", tabIndex: 0, onClick: loginHandler, onKeyDown: keyDownHandler }, children)) : (React.createElement(\"button\", { type: \"button\", onClick: loginHandler, onKeyDown: keyDownHandler }, \"Log In\"));\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * Renders a button which triggers logout on click. Should be used within a `SessionProvider`.\n */\nconst LogoutButton = ({ children, onLogout, onError, }) => {\n    const { logout } = React.useContext(SessionContext);\n    async function logoutHandler() {\n        try {\n            await logout();\n            if (onLogout)\n                onLogout();\n        }\n        catch (error) {\n            if (onError)\n                onError(error);\n        }\n    }\n    function keyDownHandler(e) {\n        e.preventDefault();\n        return e.key === \"Enter\" ? logoutHandler() : Promise.resolve();\n    }\n    return children ? (React.createElement(\"div\", { role: \"button\", tabIndex: 0, onClick: logoutHandler, onKeyDown: keyDownHandler }, children)) : (React.createElement(\"button\", { type: \"button\", onClick: logoutHandler, onKeyDown: keyDownHandler }, \"Log Out\"));\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * Used to provide both a [Dataset](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-SolidDataset) and [Thing](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-Thing) to child components through context, as used by various provided components and the useDataset and useThing hooks.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nfunction CombinedDataProvider(props) {\n    const { children, solidDataset, datasetUrl, thing, thingUrl, onError, loadingComponent, } = props;\n    return (React.createElement(DatasetProvider, { onError: onError, solidDataset: solidDataset, datasetUrl: datasetUrl, loadingComponent: loadingComponent },\n        React.createElement(ThingProvider, { thing: thing, thingUrl: thingUrl }, children)));\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * To be used as the only children of a Table component. Each column represents one property of the Things passed to the Table.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction TableColumn(props) {\n    throw new Error(\"Can't use TableColumn outside a Table.\");\n}\n/**\n * Displays values from an array of [Things](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-Thing) as table rows, with each column showing a given property of those [Things](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-Thing).\n */\nfunction Table(_a) {\n    var { children, emptyStateComponent: EmptyStateComponent, things, filter, ascIndicator, descIndicator, getRowProps } = _a, tableProps = __rest(_a, [\"children\", \"emptyStateComponent\", \"things\", \"filter\", \"ascIndicator\", \"descIndicator\", \"getRowProps\"]);\n    const { columns, data } = React.useMemo(() => {\n        const columnsArray = [];\n        const dataArray = things.map(() => ({}));\n        // loop through each column\n        React.Children.forEach(children, (column, colIndex) => {\n            if (column) {\n                const { property, header, body, dataType = \"string\", locale, multiple = false, sortable, sortFn, filterable, } = column.props;\n                // add heading\n                columnsArray.push({\n                    Header: header !== null && header !== void 0 ? header : `${property}`,\n                    accessor: `col${colIndex}`,\n                    disableGlobalFilter: !filterable,\n                    disableSortBy: !sortable,\n                    Cell: body !== null && body !== void 0 ? body : (({ value }) => (value != null ? `${value}` : \"\")),\n                });\n                if (sortFn) {\n                    const sortFunction = (a, b, columnId) => {\n                        const valueA = a.values[columnId];\n                        const valueB = b.values[columnId];\n                        return sortFn(valueA, valueB);\n                    };\n                    columnsArray[colIndex].sortType = sortFunction;\n                }\n                else {\n                    if (dataType === \"string\") {\n                        columnsArray[colIndex].sortType = dataType;\n                    }\n                    if (dataType === \"integer\" || dataType === \"decimal\") {\n                        columnsArray[colIndex].sortType = \"number\";\n                    }\n                }\n                // add each each value to data\n                things.forEach((thing, i) => {\n                    dataArray[i][`col${colIndex}`] = multiple\n                        ? getValueByTypeAll(dataType, thing.thing, property, locale)\n                        : getValueByType(dataType, thing.thing, property, locale);\n                });\n            }\n        });\n        return { columns: columnsArray, data: dataArray };\n    }, [children, things]);\n    const tableInstance = reactTable.useTable({\n        columns,\n        data,\n        initialState: { globalFilter: filter || undefined },\n    }, reactTable.useGlobalFilter, reactTable.useSortBy);\n    const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow } = tableInstance;\n    if (!rows.length) {\n        if (EmptyStateComponent) {\n            return React.createElement(EmptyStateComponent, null);\n        }\n        return null;\n    }\n    return (React.createElement(\"table\", Object.assign({}, getTableProps(), tableProps),\n        React.createElement(\"thead\", null, headerGroups.map((headerGroup) => (React.createElement(\"tr\", Object.assign({}, headerGroup.getHeaderGroupProps()), headerGroup.headers.map((column) => (React.createElement(\"th\", Object.assign({}, column.getHeaderProps(column.getSortByToggleProps())),\n            column.render(\"Header\"),\n            column.isSorted &&\n                (column.isSortedDesc ? descIndicator : ascIndicator)))))))),\n        React.createElement(\"tbody\", Object.assign({}, getTableBodyProps()), rows.map((row) => {\n            prepareRow(row);\n            const rowDataset = things[row.index].dataset;\n            const rowThing = things[row.index].thing;\n            return (React.createElement(\"tr\", Object.assign({}, row.getRowProps(getRowProps(row, rowThing, rowDataset))),\n                React.createElement(CombinedDataProvider, { solidDataset: rowDataset, thing: rowThing }, row.cells.map((cell) => {\n                    return (React.createElement(\"td\", Object.assign({}, cell.getCellProps()), cell.render(\"Cell\")));\n                }))));\n        }))));\n}\nTable.defaultProps = {\n    filter: undefined,\n    ascIndicator: (React.createElement(\"span\", { role: \"img\", \"aria-label\": \"Sorted in ascending order\" },\n        \" \",\n        \"\\uD83D\\uDD3C\")),\n    descIndicator: (React.createElement(\"span\", { role: \"img\", \"aria-label\": \"Sorted in descending order\" },\n        \" \",\n        \"\\uD83D\\uDD3D\")),\n    getRowProps: () => ({}),\n};\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * Retrieves and displays a string from a given [Dataset](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-SolidDataset)/[Thing](https://docs.inrupt.com/developer-tools/javascript/client-libraries/reference/glossary/#term-Thing)/property. Can also be used to set/update and persist a string value.\n */\nfunction Text(_a) {\n    var { thing: propThing, solidDataset: propDataset, property: propProperty, properties: propProperties, saveDatasetTo, locale, onSave, onError, inputProps, errorComponent: ErrorComponent, loadingComponent: LoadingComponent, edit = false, autosave = false } = _a, other = __rest(_a, [\"thing\", \"solidDataset\", \"property\", \"properties\", \"saveDatasetTo\", \"locale\", \"onSave\", \"onError\", \"inputProps\", \"errorComponent\", \"loadingComponent\", \"edit\", \"autosave\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const { error: thingError, value, thing, property, dataset, setDataset, } = useProperty({\n        dataset: propDataset,\n        thing: propThing,\n        property: propProperty,\n        properties: propProperties,\n        type: \"string\",\n        locale,\n    });\n    let valueError;\n    if (!edit && !value) {\n        valueError = new Error(\"No value found for property.\");\n    }\n    const isFetchingThing = !thing && !thingError;\n    const [error] = React.useState(thingError !== null && thingError !== void 0 ? thingError : valueError);\n    React.useEffect(() => {\n        if (error && onError) {\n            onError(error);\n        }\n    }, [error, onError]);\n    const [text, setText] = React.useState(value);\n    const [, setErrorState] = React.useState();\n    const [initialValue, setInitialValue] = React.useState(value);\n    /* Save text value in the pod */\n    const saveHandler = async (e) => {\n        if (initialValue !== e.target.value && thing && dataset) {\n            const newValue = e.target.value;\n            let updatedResource;\n            if (locale) {\n                updatedResource = solidClient.setStringWithLocale(thing, property, newValue, locale);\n            }\n            else {\n                updatedResource = solidClient.setStringNoLocale(thing, property, newValue);\n            }\n            try {\n                let savedDataset;\n                if (saveDatasetTo) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(saveDatasetTo, solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(saveDatasetTo, setDataset);\n                }\n                else if (solidClient.hasResourceInfo(dataset)) {\n                    savedDataset = await solidClient.saveSolidDatasetAt(solidClient.getSourceUrl(dataset), solidClient.setThing(dataset, updatedResource), { fetch });\n                    await updateDataset(solidClient.getSourceUrl(dataset), setDataset);\n                }\n                else {\n                    setErrorState(() => {\n                        throw new Error(\"Please provide saveDatasetTo location for new data\");\n                    });\n                }\n                if (onSave) {\n                    onSave(savedDataset, updatedResource);\n                }\n            }\n            catch (saveError) {\n                if (onError) {\n                    onError(saveError);\n                }\n            }\n        }\n    };\n    if (isFetchingThing) {\n        let loader = (LoadingComponent && (React.createElement(LoadingComponent, null))) || React.createElement(\"span\", null, \"fetching data in progress\");\n        if (LoadingComponent === null) {\n            loader = null;\n        }\n        return loader;\n    }\n    if (error) {\n        if (ErrorComponent) {\n            return React.createElement(ErrorComponent, { error: error });\n        }\n        return React.createElement(\"span\", null, error.toString());\n    }\n    return (React.createElement(React.Fragment, null,\n        // eslint-disable-next-line react/jsx-props-no-spreading\n        !edit && dataset && thing && React.createElement(\"span\", Object.assign({}, other), text),\n        edit && dataset && thing && (React.createElement(\"input\", Object.assign({ type: inputProps && inputProps.type ? inputProps.type : \"text\" }, inputProps, { onFocus: (e) => setInitialValue(e.target.value), onChange: (e) => setText(e.target.value), onBlur: (e) => autosave && saveHandler(e), value: text || \"\" })))));\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n/**\n * Fetches and displays a video, from a src found at a given property of a given Thing. Can also be used to upload a new/replacement video file.\n */\nfunction Video(_a) {\n    var { property: propProperty, properties: propProperties, thing: propThing, edit, autosave, onSave, onError, maxSize, inputProps, errorComponent: ErrorComponent, loadingComponent: LoadingComponent } = _a, videoOptions = __rest(_a, [\"property\", \"properties\", \"thing\", \"edit\", \"autosave\", \"onSave\", \"onError\", \"maxSize\", \"inputProps\", \"errorComponent\", \"loadingComponent\"]);\n    const { fetch } = React.useContext(SessionContext);\n    const values = useProperty({\n        thing: propThing,\n        property: propProperty,\n        properties: propProperties,\n        type: \"url\",\n    });\n    const { value, thing, error: thingError } = values;\n    let valueError;\n    if (!edit && !value) {\n        valueError = new Error(\"No value found for property.\");\n    }\n    const isFetchingThing = !thing && !thingError;\n    const [error, setError] = React.useState(thingError !== null && thingError !== void 0 ? thingError : valueError);\n    React.useEffect(() => {\n        if (error) {\n            if (onError) {\n                onError(error);\n            }\n        }\n    }, [error, onError, ErrorComponent]);\n    const [videoObjectUrl, setVideoObjectUrl] = React.useState(\"\");\n    const { data, error: videoError, inProgress: fetchingVideoInProgress, } = useFile(value);\n    React.useEffect(() => {\n        if (fetchingVideoInProgress) {\n            return;\n        }\n        if (videoError) {\n            setError(videoError);\n            return;\n        }\n        const videoObjectURL = data && URL.createObjectURL(data);\n        if (videoObjectURL) {\n            setVideoObjectUrl(videoObjectURL);\n        }\n    }, [data, fetchingVideoInProgress, videoError]);\n    const handleChange = async (input) => {\n        const fileList = input.files;\n        if (autosave && fileList && fileList.length > 0 && value) {\n            const newObjectUrl = await overwriteFile(value, fileList[0], input, fetch, maxSize, onSave, onError);\n            if (newObjectUrl) {\n                setVideoObjectUrl(newObjectUrl);\n            }\n        }\n    };\n    let videoComponent = null;\n    if (isFetchingThing || fetchingVideoInProgress) {\n        let loader = (LoadingComponent && (React.createElement(LoadingComponent, null))) || React.createElement(\"span\", null, \"fetching data in progress\");\n        if (LoadingComponent === null) {\n            loader = null;\n        }\n        return loader;\n    }\n    if (error) {\n        videoComponent = ErrorComponent ? (React.createElement(ErrorComponent, { error: error })) : (React.createElement(\"span\", null, error.toString()));\n    }\n    else if (value) {\n        videoComponent = (\n        /* eslint jsx-a11y/media-has-caption: 0, react/jsx-props-no-spreading: 0 */\n        React.createElement(\"video\", Object.assign({ src: videoObjectUrl || value, controls: true }, videoOptions)));\n    }\n    return (React.createElement(React.Fragment, null,\n        videoComponent,\n        edit && (React.createElement(\"input\", Object.assign({}, inputProps, { type: \"file\", accept: \"video/*\", onChange: (e) => handleChange(e.target) })))));\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nfunction useSession() {\n    const { session, sessionRequestInProgress, fetch, login, logout } = React.useContext(SessionContext);\n    return {\n        session,\n        sessionRequestInProgress,\n        fetch,\n        login,\n        logout,\n    };\n}\n\n//\n// Copyright Inrupt Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to use,\n// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the\n// Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\nfunction useThing(datasetIri, thingIri, \n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\noptions) {\n    const { dataset, error } = useDataset(datasetIri, options);\n    const { thing: thingFromContext } = React.useContext(ThingContext);\n    if (!thingIri) {\n        return { thing: thingFromContext || undefined, error };\n    }\n    if (!dataset) {\n        return { thing: null, error };\n    }\n    const thing = solidClient.getThing(dataset, thingIri);\n    return { thing, error };\n}\n\nexports.CombinedDataProvider = CombinedDataProvider;\nexports.DatasetContext = DatasetContext;\nexports.DatasetProvider = DatasetProvider;\nexports.FileUpload = FileUpload;\nexports.Image = Image;\nexports.Link = Link;\nexports.LoginButton = LoginButton;\nexports.LogoutButton = LogoutButton;\nexports.SessionContext = SessionContext;\nexports.SessionProvider = SessionProvider;\nexports.Table = Table;\nexports.TableColumn = TableColumn;\nexports.Text = Text;\nexports.ThingContext = ThingContext;\nexports.ThingProvider = ThingProvider;\nexports.Value = Value;\nexports.Video = Video;\nexports.useDataset = useDataset;\nexports.useFile = useFile;\nexports.useSession = useSession;\nexports.useThing = useThing;\n\n"]}