{
  "version": 3,
  "sources": ["../../src/document/components/utils/usePreloadedScope.ts", "../../src/document/components/chrome/shared/prependSlashIfMissing.ts", "../../src/document/components/utils/convertPathVariablesToReadablePath.ts", "../../src/document/components/utils/convertLinkToReadablePath.ts", "../../src/document/models/CanvasTree/traits/utils/usePreloadLinkWebPage.ts", "../../src/document/components/chrome/shared/LinkInput.tsx", "../../src/document/components/chrome/shared/LinkInput.styles.ts", "../../src/document/components/chrome/shared/LinkInputSharedData.tsx", "../../src/web/pages/project/lib/api/invite.ts", "../../src/web/pages/project/lib/api/updateUserPermissions.ts", "../../src/document/components/chrome/shared/utils/getNoSearchResultProps.ts"],
  "sourcesContent": ["import { getLogger } from \"@framerjs/shared\"\nimport type { BaseEngine } from \"document/base-engine/BaseEngine.ts\"\nimport { EngineContext, useBaseEngine } from \"document/base-engine/BaseEngine.ts\"\nimport { useContext, useEffect } from \"react\"\nimport { isString } from \"../../../utils/typeChecks.ts\"\nimport type { NodeID } from \"../../models/CanvasTree/index.ts\"\nimport { isScopeNode } from \"../../models/CanvasTree/index.ts\"\nimport type { Reduced } from \"../../models/CanvasTree/traits/utils/Reduced.ts\"\n\nconst log = getLogger(\"usePreloadedScope\")\n\nfunction preloadScope(id: Reduced<NodeID> | null | undefined, engine: BaseEngine | null) {\n\tif (!engine) return\n\tif (!isString(id)) return\n\n\tconst scopeNode = engine.tree.get(id)\n\tif (!isScopeNode(scopeNode) || scopeNode.isLoaded()) return\n\n\tlog.debug(\"Loading scope node\", id)\n\tvoid scopeNode.load()\n}\n\nexport function usePreloadedScope(id: Reduced<NodeID> | null | undefined) {\n\tconst engine = useBaseEngine()\n\n\tuseEffect(() => preloadScope(id, engine), [id])\n}\n\nexport function usePreloadScopeWhenEngineFound(id: Reduced<NodeID> | null | undefined) {\n\tconst engine = useContext(EngineContext)\n\n\tuseEffect(() => preloadScope(id, engine), [id, engine])\n}\n", "export function prependSlashIfMissing(value: string): string {\n\tif (value === \"\" || value.startsWith(\"/\")) return value\n\treturn `/${value}`\n}\n", "import type { LocaleId } from \"document/models/CanvasTree/traits/WithLocales.ts\"\nimport type { SlugVariableDefinition } from \"document/models/CanvasTree/traits/WithVariables.ts\"\nimport type { LinkToWebPage } from \"document/models/CanvasTree/traits/utils/Link.ts\"\nimport { pathVariablesRegExpGlobal } from \"library/router/pathVariables.ts\"\nimport type { CollectionItemInfo } from \"./collectionItemUtils.ts\"\n\nexport interface PageLinkAndLocaleId {\n\tlink: LinkToWebPage\n\tlocaleId?: LocaleId\n}\n\nexport function convertPathVariablesToReadablePath(\n\tpath: string,\n\tslugVariable: SlugVariableDefinition,\n\tcollectionItem: CollectionItemInfo,\n) {\n\treturn path.replace(pathVariablesRegExpGlobal, (_match, key: string) => {\n\t\tif (key === slugVariable.id) return collectionItem.slug\n\n\t\treturn `:${slugVariable.name.toLowerCase()}`\n\t})\n}\n", "import { Dictionary } from \"app/dictionary.ts\"\nimport type { CanvasTree } from \"document/models/CanvasTree/index.ts\"\nimport { isWebPageNode } from \"document/models/CanvasTree/nodes/utils/nodeCheck.ts\"\nimport type { DynamicValue } from \"document/models/CanvasTree/traits/DynamicValue.ts\"\nimport type { LocaleId } from \"document/models/CanvasTree/traits/WithLocales.ts\"\nimport { defaultLocaleId } from \"document/models/CanvasTree/traits/WithLocales.ts\"\nimport type { Link } from \"document/models/CanvasTree/traits/utils/Link.ts\"\nimport { isLink, isLinkToWebPage } from \"document/models/CanvasTree/traits/utils/Link.ts\"\nimport type { Reduced } from \"document/models/CanvasTree/traits/utils/Reduced.ts\"\nimport { getCollectionForIdentifier } from \"utils/getCollectionForIdentifier.ts\"\nimport { getRouterLocale } from \"utils/getRouterLocales.ts\"\nimport { convertSlugToReadable } from \"./convertIdPathVariablesToReadable.ts\"\nimport { convertPathVariablesToReadablePath } from \"./convertPathVariablesToReadablePath.ts\"\nimport { getCollectionItemSelectorFromLink } from \"./getCollectionItemSelectorFromLink.ts\"\nimport { webPageNodeForLink } from \"./getLinkDataIdentifiers.ts\"\nimport { getRawWebPagePath } from \"./getWebPagePath.ts\"\n\n/**\n * Resolves path variables and uses localized slug prefix if needed. Will return undefined if the\n * page or collection item doesn't exist.\n */\nexport function convertLinkToReadablePath(\n\ttree: CanvasTree,\n\tlink: Reduced<Link | DynamicValue | undefined> | undefined,\n\tlocaleId?: LocaleId,\n\thomePageName: string = Dictionary.Home,\n\thideSlugValues?: boolean,\n): string | undefined {\n\tconst collectionItemSelector =\n\t\tisLinkToWebPage(link) && !hideSlugValues ? getCollectionItemSelectorFromLink(link) : undefined\n\tconst webPageNode = isLinkToWebPage(link) ? webPageNodeForLink(tree, link) : null\n\n\tif (!link || !isLink(link) || !webPageNode) return undefined\n\n\tlet localePrefix = \"\"\n\tif (localeId && localeId !== defaultLocaleId) {\n\t\tconst locale = tree.root.getNonDefaultLocale(localeId)\n\t\tif (locale?.slug) {\n\t\t\tlocalePrefix = \"/\" + locale.slug\n\t\t}\n\t}\n\n\tif (webPageNode.id === tree.root.homePageNodeId) return localePrefix ? localePrefix + \"/\" : homePageName\n\n\tconst pagePath = getRawWebPagePath(tree, webPageNode)\n\tif (!pagePath) return undefined\n\n\tif (collectionItemSelector?.identifier) {\n\t\tconst collectionNode = getCollectionForIdentifier(tree, collectionItemSelector.identifier)\n\t\tif (collectionNode) {\n\t\t\tconst activeRouterLocale = getRouterLocale(tree, localeId)\n\t\t\tconst itemToSlug = collectionNode.getItemToSlug(activeRouterLocale)\n\t\t\tconst itemSlug = itemToSlug[collectionItemSelector.collectionItemId]\n\t\t\tif (itemSlug) {\n\t\t\t\tconst slugVariable = collectionNode.getSlugVariable()\n\t\t\t\tif (slugVariable) {\n\t\t\t\t\tconst selectedItem = { id: collectionItemSelector.collectionItemId, slug: itemSlug }\n\t\t\t\t\treturn localePrefix + convertPathVariablesToReadablePath(pagePath, slugVariable, selectedItem)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn undefined\n\t}\n\n\tif (isWebPageNode(webPageNode) && webPageNode.dataIdentifier) {\n\t\tconst collectionNode = getCollectionForIdentifier(tree, webPageNode.dataIdentifier)\n\t\tif (collectionNode && !collectionItemSelector) {\n\t\t\tconst slugVariable = collectionNode.getSlugVariable()\n\t\t\tif (slugVariable) {\n\t\t\t\tconst activeRouterLocale = getRouterLocale(tree, localeId)\n\t\t\t\tconst itemToSlug = collectionNode.getItemToSlug(activeRouterLocale)\n\t\t\t\treturn localePrefix + convertSlugToReadable(pagePath, itemToSlug, slugVariable)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn localePrefix + pagePath\n}\n", "import { usePreloadScopeWhenEngineFound } from \"document/components/utils/usePreloadedScope.ts\"\nimport type { DynamicValue } from \"../DynamicValue.ts\"\nimport type { Link } from \"./Link.ts\"\nimport { isLinkToWebPage } from \"./Link.ts\"\nimport type { Reduced } from \"./Reduced.ts\"\n\n/**\n * Preloads the web page for a link. This is needed to be able to show the possible scroll targets.\n */\nexport function usePreloadLinkWebPage(link: Reduced<Link | DynamicValue | undefined>) {\n\t// The engine is not always available where links are used. For example on the dashboard.\n\tusePreloadScopeWhenEngineFound(isLinkToWebPage(link) ? link.webPageId : undefined)\n}\n", "import type { ComboBoxListItem, ComboBoxListItemOption, ComboBoxProps } from \"@framerjs/fresco\"\nimport { Button, ComboBox, IconInputClose, NavigationStackItemContext } from \"@framerjs/fresco\"\nimport { isMixed } from \"@framerjs/shared\"\nimport { cx } from \"@linaria/core\"\nimport { Dictionary } from \"app/dictionary.ts\"\nimport { experiments } from \"app/experiments.ts\"\nimport { convertLinkToReadablePath } from \"document/components/utils/convertLinkToReadablePath.ts\"\nimport type { CanvasTree } from \"document/models/CanvasTree/index.ts\"\nimport type { DynamicValue } from \"document/models/CanvasTree/traits/DynamicValue.ts\"\nimport type { VariableReference } from \"document/models/CanvasTree/traits/VariableReference.ts\"\nimport type { LocaleId } from \"document/models/CanvasTree/traits/WithLocales.ts\"\nimport type { Link } from \"document/models/CanvasTree/traits/utils/Link.ts\"\nimport {\n\tcreateLink,\n\tisLinkToURL,\n\tisLinkToWebPage,\n\tisLinkedWebPageMissing,\n} from \"document/models/CanvasTree/traits/utils/Link.ts\"\nimport type { Reduced } from \"document/models/CanvasTree/traits/utils/Reduced.ts\"\nimport { isNotFound } from \"document/models/CanvasTree/traits/utils/Reduced.ts\"\nimport { usePreloadLinkWebPage } from \"document/models/CanvasTree/traits/utils/usePreloadLinkWebPage.ts\"\nimport type { VariableProviderInfo } from \"document/utils/VariableProviderInfo.ts\"\nimport type { CSSProperties } from \"react\"\nimport { memo, useCallback, useContext, useMemo, useState } from \"react\"\nimport { isNull, isUndefined } from \"utils/typeChecks.ts\"\nimport { usePopoverWithinPadding } from \"../utils/usePopoverWithinPadding.ts\"\nimport * as styles from \"./LinkInput.styles.ts\"\nimport type { LinkInputSharedData, ReadonlyPathToDataLinkMap } from \"./LinkInputSharedData.tsx\"\nimport { useLinkInputSharedData, useLinkInputSharedDataContext } from \"./LinkInputSharedData.tsx\"\nimport { prependSlashIfMissing } from \"./prependSlashIfMissing.ts\"\n\ninterface Props extends Pick<\n\tComboBoxProps,\n\t| \"enabled\"\n\t| \"readOnly\"\n\t| \"autoFocus\"\n\t| \"tabIndex\"\n\t| \"onMouseDown\"\n\t| \"onOpenChange\"\n\t| \"backdropEnabled\"\n\t| \"hasError\"\n\t| \"rightChevron\"\n\t| \"onBlur\"\n\t| \"variant\"\n> {\n\ttree: CanvasTree\n\tlink: Reduced<Link | DynamicValue | undefined>\n\tplaceholder?: string\n\tsupportsPageLinks: boolean\n\t/** When provided, displayed page paths will be localized, including slug prefix, CMS collection\n\t * items, path segments, etc (e.g. `/nl/voorbeeldpagina/`). */\n\tlocaleId?: LocaleId | undefined\n\thideSlugValues?: boolean\n\tvariableInfo: VariableProviderInfo | null\n\tonChange: (value: Link | VariableReference, final: boolean) => void\n\tsupportsVariables?: boolean\n\tconstantChange?: boolean\n\trightChevron?: boolean\n\tclassName?: string\n\tinputClassName?: string\n\thomePageName?: string\n\tstyle?: CSSProperties\n\tonClear?: () => void\n\tmenuOffset?: { x: number; y: number }\n\tmenuWidth?: number\n\tmenuClassName?: string\n\tlinkListStickySectionHeaders?: boolean\n\tid?: string\n\t\"aria-label\"?: string\n\topenCompletionsOnFocus?: boolean\n\t/** With `supportsPageLinks`, if the value does not start with `/`, prepend one (e.g. `blog` \u2192 `/blog`). */\n\tprependSlashForPathLikeInput?: boolean\n}\n\ninterface LinkPropsInternal extends Omit<Props, \"tree\" | \"localeId\" | \"sharedData\"> {\n\treadableLink: string\n\thideSlugValues: boolean\n\tselectedPageMissing: boolean\n\tsharedData: LinkInputSharedData\n}\n\nconst whitespaceRegex = /\\W+/u\n\nfunction preventInputFocus(event: React.MouseEvent) {\n\tevent.preventDefault()\n\tevent.stopPropagation()\n}\n\n// Custom search token function to allow users to find pages ignoring slashes.\nfunction getSearchTokens(searchTerm: string): Set<string> {\n\treturn new Set(searchTerm.split(whitespaceRegex))\n}\n\nexport const LinkInput = ({\n\ttree,\n\tlink,\n\tlocaleId,\n\thideSlugValues = false,\n\thomePageName = Dictionary.Home,\n\tvariableInfo,\n\t...props\n}: Props) => {\n\tusePreloadLinkWebPage(link)\n\n\tconst contextSharedData = useLinkInputSharedDataContext()\n\tconst internalSharedData = useLinkInputSharedData({\n\t\ttree,\n\t\tlocaleId,\n\t\thomePageName,\n\t\tvariableInfo,\n\t\tenabled: contextSharedData == null,\n\t})\n\tconst sharedData = contextSharedData ?? internalSharedData\n\n\tconst selectedPageMissing = isLinkedWebPageMissing(link, sharedData.webPageIdToRawPathMap)\n\tconst stringValue = isLinkToURL(link) ? link.url : \"\"\n\n\t// When the selected page is missing (cannot be converted), we don't want to use the errored\n\t// link in the UI, just treat it as an empty value.\n\tconst fallbackReadableLink = selectedPageMissing ? \"\" : stringValue\n\tconst readableLink =\n\t\tconvertLinkToReadablePath(tree, link, localeId, homePageName, hideSlugValues) ?? fallbackReadableLink\n\n\treturn (\n\t\t<LinkInputInternal\n\t\t\t{...props}\n\t\t\tlink={link}\n\t\t\treadableLink={readableLink}\n\t\t\tvariableInfo={variableInfo}\n\t\t\thideSlugValues={hideSlugValues}\n\t\t\tselectedPageMissing={selectedPageMissing}\n\t\t\tsharedData={sharedData}\n\t\t/>\n\t)\n}\n\nconst LinkInputInternal = memo(function LinkInputInternal({\n\tid,\n\tplaceholder,\n\tlink,\n\tonChange,\n\tconstantChange,\n\trightChevron,\n\tsupportsPageLinks,\n\thideSlugValues,\n\tsupportsVariables,\n\tvariableInfo,\n\tautoFocus,\n\topenCompletionsOnFocus,\n\tclassName,\n\tinputClassName,\n\tenabled,\n\treadOnly,\n\ttabIndex,\n\tonMouseDown,\n\tonClear,\n\tmenuOffset,\n\tmenuWidth,\n\tmenuClassName,\n\tonOpenChange,\n\tbackdropEnabled,\n\tlinkListStickySectionHeaders,\n\thasError: externalHasError,\n\tonBlur,\n\t\"aria-label\": ariaLabel,\n\tvariant,\n\treadableLink,\n\tselectedPageMissing,\n\tsharedData,\n\tprependSlashForPathLikeInput = false,\n}: LinkPropsInternal) {\n\tconst hasError = selectedPageMissing || Boolean(externalHasError)\n\tconst popoverWithin = usePopoverWithinPadding()\n\n\tconst [queryBasePath, setQueryBasePath] = useState<string | null>(() => getBasePathFromSearchTerm(readableLink))\n\n\tconst memoedPageLinkMap = hideSlugValues ? sharedData.pageLinksWithoutSlugValues : sharedData.pageLinksWithSlugValues\n\tconst memoedCollectionPageLinkMapWithSlugInScope = sharedData.collectionPageLinksWithSlugInScope\n\n\tconst handleOnChange = useCallback(\n\t\t(value: string, final: boolean) => {\n\t\t\tconst valueForLink = prependSlashForPathLikeInput && supportsPageLinks ? prependSlashIfMissing(value) : value\n\n\t\t\tif (final || constantChange) {\n\t\t\t\tif (valueForLink === readableLink) return\n\n\t\t\t\tconst linkValue =\n\t\t\t\t\tmemoedPageLinkMap.get(valueForLink) ??\n\t\t\t\t\tmemoedCollectionPageLinkMapWithSlugInScope.get(valueForLink) ??\n\t\t\t\t\tcreateLink({ url: valueForLink })\n\n\t\t\t\tonChange(linkValue, final)\n\t\t\t\tif (final) return\n\t\t\t}\n\n\t\t\tconst basePath = getBasePathFromSearchTerm(valueForLink)\n\t\t\tsetQueryBasePath(basePath)\n\t\t},\n\t\t[\n\t\t\tconstantChange,\n\t\t\tprependSlashForPathLikeInput,\n\t\t\treadableLink,\n\t\t\tsupportsPageLinks,\n\t\t\tmemoedPageLinkMap,\n\t\t\tmemoedCollectionPageLinkMapWithSlugInScope,\n\t\t\tonChange,\n\t\t],\n\t)\n\n\tconst comboBoxItems = useMemo(() => {\n\t\treturn getComboBoxItems(memoedPageLinkMap, memoedCollectionPageLinkMapWithSlugInScope, queryBasePath)\n\t}, [memoedPageLinkMap, memoedCollectionPageLinkMapWithSlugInScope, queryBasePath])\n\n\tconst canCreateVariable = Boolean(variableInfo?.idOfMutableVariableProvider)\n\tconst canUseVariables = supportsVariables && canCreateVariable\n\n\tconst outsideNavigationStack = useContext(NavigationStackItemContext) === null\n\n\tconst [shouldAutoFocus] = useState(\n\t\t() => (isNull(link) || isUndefined(link) || isNotFound(link)) && !canUseVariables && outsideNavigationStack,\n\t)\n\n\treturn (\n\t\t<ComboBox\n\t\t\tid={id}\n\t\t\taria-label={ariaLabel}\n\t\t\tclearSelectionOnEmptySearch\n\t\t\tautoCompleteEnabled={supportsPageLinks}\n\t\t\tshowAllWhenOpened={isLinkToWebPage(link)}\n\t\t\t/**\n\t\t\t * When there's a base path (e.g. /blog/), all the matching\n\t\t\t * option titles will be truncated to .../something. In this\n\t\t\t * case we want to search the item value (the full path) instead\n\t\t\t * of the truncated title.\n\t\t\t */\n\t\t\ttabIndex={tabIndex}\n\t\t\tonMouseDown={onMouseDown}\n\t\t\tsearchItemValue={Boolean(queryBasePath)}\n\t\t\titems={comboBoxItems}\n\t\t\tvalue={readableLink}\n\t\t\tplaceholder={placeholder || getPlaceholder(link, hasError, supportsPageLinks)}\n\t\t\tconstantChange\n\t\t\trightChevron={rightChevron}\n\t\t\tonChange={handleOnChange}\n\t\t\tautoFocus={autoFocus ?? shouldAutoFocus}\n\t\t\topenOnFocus={openCompletionsOnFocus}\n\t\t\tmenuOffset={menuOffset}\n\t\t\tenabled={enabled}\n\t\t\treadOnly={readOnly}\n\t\t\thasError={hasError}\n\t\t\tvariant={variant}\n\t\t\tgetSearchTokens={getSearchTokens}\n\t\t\tclassName={inputClassName}\n\t\t\twrapperClassName={cx(className, variant === \"ghost\" && styles.ghostWrapper)}\n\t\t\tonBlur={onBlur}\n\t\t\trightSlot={\n\t\t\t\tonClear ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"clean\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={cx(styles.clearButton, variant === \"ghost\" && styles.clearButtonGhost)}\n\t\t\t\t\t\tonMouseDown={preventInputFocus}\n\t\t\t\t\t\tonClick={event => {\n\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\tonClear()\n\t\t\t\t\t\t}}\n\t\t\t\t\t\taria-label=\"Clear page link\"\n\t\t\t\t\t\ttitle=\"Remove Link\"\n\t\t\t\t\t\ttabIndex={variant === \"ghost\" ? -1 : undefined}\n\t\t\t\t\t>\n\t\t\t\t\t\t<IconInputClose />\n\t\t\t\t\t</Button>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tbackdropEnabled={backdropEnabled}\n\t\t\tmenuWidth={menuWidth}\n\t\t\tmenuWithin={popoverWithin}\n\t\t\tmenuClassName={menuClassName}\n\t\t\tunsaturated={experiments.isOn(\"agent\")}\n\t\t\tstickySectionHeaders={linkListStickySectionHeaders}\n\t\t\tcontainOverscroll\n\t\t/>\n\t)\n})\n\nfunction getPlaceholder(link: Props[\"link\"], hasError: boolean, supportsPageLinks: boolean) {\n\tif (hasError) return Dictionary.Missing\n\tif (isMixed(link)) return \"Multiple\u2026\"\n\tif (!supportsPageLinks) return \"URL\u2026\"\n\treturn \"Page or URL\u2026\"\n}\n\nfunction getBasePathFromSearchTerm(searchTerm: string): string | null {\n\tlet normalizedSearchTerm = searchTerm.trim()\n\n\tconst variableStart = normalizedSearchTerm.indexOf(\"/:\")\n\tif (variableStart !== -1) {\n\t\tnormalizedSearchTerm = normalizedSearchTerm.substring(variableStart)\n\t}\n\n\tconst parts = normalizedSearchTerm.split(\"/\").filter(Boolean)\n\n\twhile (parts.length > 0) {\n\t\t// Make sure the search term contains all segments with a closing `/`\n\t\tconst basePathWithoutSlashAtStart = parts.join(\"/\") + \"/\"\n\t\tconst basePath = \"/\" + basePathWithoutSlashAtStart\n\t\tif (normalizedSearchTerm.startsWith(basePath) || normalizedSearchTerm.startsWith(basePathWithoutSlashAtStart)) {\n\t\t\treturn basePath\n\t\t}\n\t\tparts.pop()\n\t}\n\n\treturn null\n}\n\nexport const testing = { getBasePathFromSearchTerm } as const\n\nconst trailingSlashRegex = /\\/$/u\n\nfunction getComboBoxItems(\n\tpageLinks: ReadonlyPathToDataLinkMap,\n\tcmsPageVariablesLinks: ReadonlyPathToDataLinkMap,\n\tqueryBasePath: string | null,\n): ComboBoxListItem[] {\n\tconst result: ComboBoxListItem[] = []\n\tconst pagePaths = Array.from(pageLinks.keys())\n\tconst cmsPageVariablesPaths = Array.from(cmsPageVariablesLinks.keys())\n\n\t// If there's a base path in the query (e.g. /blog/), we need to do the\n\t// search ourselves and pass down the filtered list to the combobox.\n\tif (queryBasePath) {\n\t\tconst matches: ComboBoxListItemOption[] = []\n\t\tconst allPaths = [...cmsPageVariablesPaths, ...pagePaths]\n\t\tallPaths.forEach(path => {\n\t\t\tif (!path.startsWith(queryBasePath)) return\n\t\t\tconst truncatedPath = path.replace(queryBasePath, \".../\")\n\t\t\tmatches.push({ type: \"option\", value: path, title: truncatedPath })\n\t\t})\n\n\t\t// Remove the ending /\n\t\tconst basePathTitle = queryBasePath.replace(trailingSlashRegex, \"\")\n\t\tresult.push({\n\t\t\ttype: \"section\",\n\t\t\tvalue: basePathTitle,\n\t\t\ttitle: basePathTitle,\n\t\t\titems: matches,\n\t\t})\n\n\t\treturn result\n\t}\n\n\tif (cmsPageVariablesPaths.length > 0) {\n\t\tresult.push({\n\t\t\ttype: \"section\",\n\t\t\tvalue: Dictionary.Cms,\n\t\t\titems: cmsPageVariablesPaths.map(path => ({\n\t\t\t\ttype: \"option\",\n\t\t\t\tvalue: path,\n\t\t\t})),\n\t\t})\n\t}\n\n\tif (pagePaths.length > 0) {\n\t\tresult.push({\n\t\t\ttype: \"section\",\n\t\t\tvalue: Dictionary.Pages,\n\t\t\titems: pagePaths.map(path => ({\n\t\t\t\ttype: \"option\",\n\t\t\t\tvalue: path,\n\t\t\t})),\n\t\t})\n\t}\n\n\treturn result\n}\n", "import \"LinkInput.styles_qd9czx.wyw.css\"; export const clearButton = \"clearButton_c1vnemam\";\nexport const clearButtonGhost = \"clearButtonGhost_cjpnope\";\nexport const ghostWrapper = \"ghostWrapper_g6pgvh1\";", "import { assert, emptyMap, emptySet, type ModuleExportIdentifierString } from \"@framerjs/shared\"\nimport { Dictionary } from \"app/dictionary.ts\"\nimport type { CollectionItemInfo } from \"document/components/utils/collectionItemUtils.ts\"\nimport { convertSlugToReadableTitle } from \"document/components/utils/convertIdPathVariablesToReadable.ts\"\nimport { convertPathVariablesToReadablePath } from \"document/components/utils/convertPathVariablesToReadablePath.ts\"\nimport type { CanvasTree, NodeID } from \"document/models/CanvasTree/index.ts\"\nimport { getContentManagementNode } from \"document/models/CanvasTree/nodes/ContentManagementNode.utils.ts\"\nimport type {\n\tItemToSlugByDataIdentifier,\n\tSlugVariableByDataIdentifier,\n} from \"document/models/CanvasTree/nodes/ContentManagementNodeCache.ts\"\nimport type { DataIdentifierByWebPageIdMap } from \"document/models/CanvasTree/nodes/RootNodeCache.ts\"\nimport { getRouteSegmentRootNode } from \"document/models/CanvasTree/nodes/RouteSegmentRootNode.utils.ts\"\nimport type { ReadonlyWebPagePathByWebPageId } from \"document/models/CanvasTree/nodes/RouteSegmentRootNodeCache.ts\"\nimport { createVariableReference } from \"document/models/CanvasTree/traits/VariableReference.ts\"\nimport type { LocaleId } from \"document/models/CanvasTree/traits/WithLocales.ts\"\nimport type { VariableID } from \"document/models/CanvasTree/traits/WithVariables.ts\"\nimport type { Link } from \"document/models/CanvasTree/traits/utils/Link.ts\"\nimport { createLink } from \"document/models/CanvasTree/traits/utils/Link.ts\"\nimport type { ResolvedCollectionItemSelector } from \"document/models/CanvasTree/traits/utils/ResolvedCollectionItemSelector.ts\"\nimport type { VariableProviderInfo } from \"document/utils/VariableProviderInfo.ts\"\nimport { ControlType } from \"library/render/types/PropertyControls.ts\"\nimport type { Locale as RouterLocale } from \"library/router/types.ts\"\nimport { createContext, useContext, useMemo, type ReactNode } from \"react\"\nimport { isReferenceToTailVariableId } from \"utils/collectionReferenceUtils.ts\"\nimport { getFirstObjectEntry } from \"utils/getFirstObjectEntry.ts\"\nimport { getRouterLocale } from \"utils/getRouterLocales.ts\"\nimport { extractPathVariables } from \"utils/pathVariables.ts\"\nimport { getPathForDisplay } from \"web/pages/projects/components/Domains/validation/validateRouteNode.ts\"\n\nexport type PagePath = string\nexport type DataLink = Link\ntype MutablePathToDataLinkMap = Map<PagePath, DataLink>\nexport type ReadonlyPathToDataLinkMap = ReadonlyMap<PagePath, DataLink>\nexport type CollectionPagesWithVariableInScope = ReadonlySet<NodeID>\n\nexport interface LinkInputSharedData {\n\thomePageName: string\n\trouterLocale: RouterLocale\n\twebPageIdToRawPathMap: ReadonlyWebPagePathByWebPageId | undefined\n\tdataIdentifierByWebPageIdMap: DataIdentifierByWebPageIdMap\n\tslugVariableByIdentifierMap: SlugVariableByDataIdentifier | undefined\n\titemToSlugByIdentifierMap: ItemToSlugByDataIdentifier | undefined\n\tcollectionPagesWithVariablesInScope: CollectionPagesWithVariableInScope\n\tpageLinksWithSlugValues: ReadonlyPathToDataLinkMap\n\tpageLinksWithoutSlugValues: ReadonlyPathToDataLinkMap\n\tcollectionPageLinksWithSlugInScope: ReadonlyPathToDataLinkMap\n}\n\nconst LinkInputSharedDataContext = createContext<LinkInputSharedData | null>(null)\nLinkInputSharedDataContext.displayName = \"LinkInputSharedDataContext\"\n\ninterface LinkInputSharedDataProviderProps {\n\ttree: CanvasTree\n\tchildren: ReactNode\n\tlocaleId?: LocaleId | undefined\n\thomePageName?: string\n\tvariableInfo: VariableProviderInfo | null\n}\n\nexport function LinkInputSharedDataProvider({\n\ttree,\n\tchildren,\n\tlocaleId,\n\thomePageName,\n\tvariableInfo,\n}: LinkInputSharedDataProviderProps) {\n\tconst providedSharedData = useLinkInputSharedDataContext()\n\tassert(providedSharedData === null, \"LinkInputSharedDataProvider must be the root provider\")\n\n\tconst sharedData = useLinkInputSharedData({ tree, localeId, homePageName, variableInfo, enabled: true })\n\n\treturn <LinkInputSharedDataContext.Provider value={sharedData}>{children}</LinkInputSharedDataContext.Provider>\n}\n\nexport function useLinkInputSharedDataContext() {\n\treturn useContext(LinkInputSharedDataContext)\n}\n\ninterface UseLinkInputSharedDataProps {\n\ttree: CanvasTree\n\tlocaleId?: LocaleId | undefined\n\thomePageName?: string\n\tvariableInfo: VariableProviderInfo | null\n\tenabled: boolean\n}\n\nexport function useLinkInputSharedData({\n\ttree,\n\tlocaleId,\n\thomePageName = Dictionary.Home,\n\tvariableInfo,\n\tenabled,\n}: UseLinkInputSharedDataProps): LinkInputSharedData {\n\tconst contentManagementNode = enabled ? getContentManagementNode(tree) : null\n\tconst routerLocale = getRouterLocale(tree, localeId)\n\tconst webPageIdToRawPathMap = enabled ? getRouteSegmentRootNode(tree).getWebPageIdToRawPathMap(tree) : undefined\n\tconst dataIdentifierByWebPageIdMap: DataIdentifierByWebPageIdMap = enabled\n\t\t? tree.root.getDataIdentifierByWebPageIdMap()\n\t\t: emptyMap()\n\tconst slugVariableByIdentifierMap = enabled ? contentManagementNode?.getSlugVariableByIdentifierMap() : undefined\n\tconst itemToSlugByIdentifierMap = enabled\n\t\t? contentManagementNode?.getItemToSlugByIdentifierMap(routerLocale)\n\t\t: undefined\n\n\tconst variableIdsInScope = enabled ? variableInfo?.ids : undefined\n\tconst collectionPagesWithVariablesInScope = useCollectionPagesWithVariablesInScope(\n\t\tvariableIdsInScope,\n\t\twebPageIdToRawPathMap,\n\t\tdataIdentifierByWebPageIdMap,\n\t\tenabled,\n\t)\n\n\tconst { pageLinksWithSlugValues, pageLinksWithoutSlugValues, collectionPageLinksWithSlugInScope } = useMemo((): {\n\t\tpageLinksWithSlugValues: ReadonlyPathToDataLinkMap\n\t\tpageLinksWithoutSlugValues: ReadonlyPathToDataLinkMap\n\t\tcollectionPageLinksWithSlugInScope: ReadonlyPathToDataLinkMap\n\t} => {\n\t\tif (!enabled) {\n\t\t\treturn {\n\t\t\t\tpageLinksWithSlugValues: emptyMap(),\n\t\t\t\tpageLinksWithoutSlugValues: emptyMap(),\n\t\t\t\tcollectionPageLinksWithSlugInScope: emptyMap(),\n\t\t\t}\n\t\t}\n\n\t\tconst pathToDataLinkMapArgs: Omit<GetPathToDataLinkMapProps, \"collectionPageType\"> = {\n\t\t\twebPageIdToRawPathMap,\n\t\t\tdataIdentifierByWebPageIdMap,\n\t\t\tslugVariableByIdentifierMap,\n\t\t\titemToSlugByIdentifierMap,\n\t\t\tcollectionPagesWithVariablesInScope,\n\t\t\trouterLocale,\n\t\t\thomePageName,\n\t\t\tvariableInfo,\n\t\t}\n\n\t\treturn {\n\t\t\tpageLinksWithSlugValues: getPathToDataLinkMap({\n\t\t\t\t...pathToDataLinkMapArgs,\n\t\t\t\tcollectionPageType: \"showSlugValues\",\n\t\t\t}),\n\t\t\tpageLinksWithoutSlugValues: getPathToDataLinkMap({\n\t\t\t\t...pathToDataLinkMapArgs,\n\t\t\t\tcollectionPageType: \"noSlugInScope\",\n\t\t\t}),\n\t\t\tcollectionPageLinksWithSlugInScope: getPathToDataLinkMap({\n\t\t\t\t...pathToDataLinkMapArgs,\n\t\t\t\tcollectionPageType: \"slugInScope\",\n\t\t\t}),\n\t\t}\n\t}, [\n\t\tenabled,\n\t\twebPageIdToRawPathMap,\n\t\tdataIdentifierByWebPageIdMap,\n\t\tslugVariableByIdentifierMap,\n\t\titemToSlugByIdentifierMap,\n\t\tcollectionPagesWithVariablesInScope,\n\t\trouterLocale,\n\t\thomePageName,\n\t\tvariableInfo,\n\t])\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\thomePageName,\n\t\t\trouterLocale,\n\t\t\twebPageIdToRawPathMap,\n\t\t\tdataIdentifierByWebPageIdMap,\n\t\t\tslugVariableByIdentifierMap,\n\t\t\titemToSlugByIdentifierMap,\n\t\t\tcollectionPagesWithVariablesInScope,\n\t\t\tpageLinksWithSlugValues,\n\t\t\tpageLinksWithoutSlugValues,\n\t\t\tcollectionPageLinksWithSlugInScope,\n\t\t}),\n\t\t[\n\t\t\thomePageName,\n\t\t\trouterLocale,\n\t\t\twebPageIdToRawPathMap,\n\t\t\tdataIdentifierByWebPageIdMap,\n\t\t\tslugVariableByIdentifierMap,\n\t\t\titemToSlugByIdentifierMap,\n\t\t\tcollectionPagesWithVariablesInScope,\n\t\t\tpageLinksWithSlugValues,\n\t\t\tpageLinksWithoutSlugValues,\n\t\t\tcollectionPageLinksWithSlugInScope,\n\t\t],\n\t)\n}\n\nfunction useCollectionPagesWithVariablesInScope(\n\tvariableIds: Set<VariableID> | undefined,\n\twebPageIdToRawPathMap: ReadonlyWebPagePathByWebPageId | undefined,\n\tdataIdentifierByWebPageIdMap: DataIdentifierByWebPageIdMap,\n\tenabled: boolean,\n): CollectionPagesWithVariableInScope {\n\treturn useMemo(() => {\n\t\tif (!enabled) return emptySet()\n\n\t\tconst result = new Set<NodeID>()\n\t\tif (!variableIds) return result\n\t\tif (!webPageIdToRawPathMap) return result\n\n\t\tfor (const collectionWebPageId of dataIdentifierByWebPageIdMap.keys()) {\n\t\t\tconst rawWebPagePath = webPageIdToRawPathMap.get(collectionWebPageId)\n\t\t\tif (!rawWebPagePath) continue\n\n\t\t\tconst pathVariables = extractPathVariables(rawWebPagePath)\n\t\t\tconst hasPathVariablesInScope = pathVariables.every(pathVariable => {\n\t\t\t\tif (!pathVariable) return false\n\n\t\t\t\tfor (const variableId of variableIds) {\n\t\t\t\t\tif (variableId.endsWith(pathVariable)) return true\n\t\t\t\t}\n\n\t\t\t\treturn false\n\t\t\t})\n\n\t\t\tif (!hasPathVariablesInScope) continue\n\n\t\t\tresult.add(collectionWebPageId)\n\t\t}\n\n\t\treturn result\n\t}, [enabled, variableIds, webPageIdToRawPathMap, dataIdentifierByWebPageIdMap])\n}\n\nfunction findProviderId(info: VariableProviderInfo, identifier: ModuleExportIdentifierString) {\n\tif (!info.variableSourceIdentifiers) return undefined\n\tfor (const key in info.variableSourceIdentifiers) {\n\t\tif (info.variableSourceIdentifiers[key] === identifier) return key\n\n\t\tconst variableMap = info.combined.get(key)\n\t\tif (variableMap) {\n\t\t\tfor (const [, variable] of variableMap) {\n\t\t\t\tif (variable.type === ControlType.CollectionReference && variable.dataIdentifier === identifier) {\n\t\t\t\t\treturn key\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined\n}\n\ninterface GetPathToDataLinkMapProps {\n\twebPageIdToRawPathMap: ReadonlyWebPagePathByWebPageId | undefined\n\tdataIdentifierByWebPageIdMap: DataIdentifierByWebPageIdMap\n\tslugVariableByIdentifierMap: SlugVariableByDataIdentifier | undefined\n\titemToSlugByIdentifierMap: ItemToSlugByDataIdentifier | undefined\n\tcollectionPagesWithVariablesInScope: CollectionPagesWithVariableInScope\n\trouterLocale: RouterLocale\n\tvariableInfo: VariableProviderInfo | null\n\thomePageName: string | undefined\n\tcollectionPageType: \"slugInScope\" | \"noSlugInScope\" | \"showSlugValues\"\n}\n\nfunction getPathToDataLinkMap({\n\twebPageIdToRawPathMap,\n\tdataIdentifierByWebPageIdMap,\n\tslugVariableByIdentifierMap,\n\titemToSlugByIdentifierMap,\n\tcollectionPagesWithVariablesInScope,\n\trouterLocale,\n\tvariableInfo,\n\thomePageName,\n\tcollectionPageType,\n}: GetPathToDataLinkMapProps): MutablePathToDataLinkMap {\n\tconst result: MutablePathToDataLinkMap = new Map()\n\tif (!webPageIdToRawPathMap) return result\n\tif (collectionPageType === \"slugInScope\" && collectionPagesWithVariablesInScope.size === 0) return result\n\n\tconst localePrefix = routerLocale.slug ? `/${routerLocale.slug}` : \"\"\n\n\tfor (const [webPageId, rawPath] of webPageIdToRawPathMap.entries()) {\n\t\tconst isHomePage = rawPath === \"/\"\n\t\tconst displayPath = getPathForDisplay(rawPath)\n\n\t\tif (isHomePage) {\n\t\t\tif (collectionPageType === \"slugInScope\") continue\n\n\t\t\tconst link = createLink({ webPageId })\n\t\t\tconst path = localePrefix ? localePrefix + displayPath : (homePageName ?? displayPath)\n\t\t\tresult.set(path, link)\n\t\t\tcontinue\n\t\t}\n\n\t\tconst dataIdentifier = dataIdentifierByWebPageIdMap.get(webPageId)\n\t\tif (!dataIdentifier) {\n\t\t\tif (collectionPageType === \"slugInScope\") continue\n\n\t\t\tconst link = createLink({ webPageId })\n\t\t\tresult.set(localePrefix + displayPath, link)\n\t\t\tcontinue\n\t\t}\n\n\t\tconst slugVariable = slugVariableByIdentifierMap?.get(dataIdentifier)\n\t\tif (!slugVariable) continue\n\n\t\tconst slugKey = slugVariable.id\n\t\tlet longSlugKey = slugKey\n\t\tif (variableInfo && !variableInfo.ids.has(slugKey)) {\n\t\t\tfor (const id of variableInfo.ids) {\n\t\t\t\tif (isReferenceToTailVariableId(id, slugKey)) {\n\t\t\t\t\tlongSlugKey = id\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst itemToSlug = itemToSlugByIdentifierMap?.get(dataIdentifier)\n\n\t\tif (collectionPageType === \"slugInScope\" || collectionPageType === \"noSlugInScope\") {\n\t\t\tconst hasSlugInScope = collectionPagesWithVariablesInScope.has(webPageId)\n\t\t\tconst currentItemPath = getPathForDisplay(convertSlugToReadableTitle(rawPath, slugVariable))\n\n\t\t\tif (collectionPageType === \"slugInScope\" && hasSlugInScope) {\n\t\t\t\tassert(variableInfo, \"variableInfo should exist when inScope\")\n\t\t\t\tconst providerId = findProviderId(variableInfo, dataIdentifier)\n\t\t\t\tconst pathVariables = providerId ? { [slugKey]: createVariableReference(longSlugKey, providerId) } : undefined\n\n\t\t\t\tconst link = createLink({ webPageId, pathVariables })\n\t\t\t\tresult.set(localePrefix + currentItemPath, link)\n\t\t\t} else if (collectionPageType === \"noSlugInScope\" && !hasSlugInScope) {\n\t\t\t\tif (!itemToSlug) continue\n\n\t\t\t\tconst firstItemIdAndSlug = getFirstObjectEntry(itemToSlug)\n\t\t\t\tif (!firstItemIdAndSlug) continue\n\n\t\t\t\tconst [collectionItemId, slug] = firstItemIdAndSlug\n\t\t\t\tconst collectionItem: ResolvedCollectionItemSelector = {\n\t\t\t\t\tidentifier: dataIdentifier,\n\t\t\t\t\tcollectionItemId,\n\t\t\t\t\tkey: slugKey,\n\t\t\t\t\tvalue: slug,\n\t\t\t\t}\n\n\t\t\t\tconst link = createLink({\n\t\t\t\t\twebPageId,\n\t\t\t\t\tpathVariables: { [slugKey]: collectionItem },\n\t\t\t\t})\n\n\t\t\t\tresult.set(localePrefix + currentItemPath, link)\n\t\t\t}\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif (!itemToSlug) continue\n\n\t\tfor (const collectionItemId of Object.keys(itemToSlug)) {\n\t\t\tconst slug = itemToSlug[collectionItemId]\n\t\t\tif (!slug) continue\n\n\t\t\tconst itemInfo: CollectionItemInfo = { id: collectionItemId, slug }\n\t\t\tconst basePath = getPathForDisplay(convertPathVariablesToReadablePath(rawPath, slugVariable, itemInfo))\n\t\t\tconst collectionItem: ResolvedCollectionItemSelector = {\n\t\t\t\tidentifier: dataIdentifier,\n\t\t\t\tcollectionItemId,\n\t\t\t\tkey: slugKey,\n\t\t\t\tvalue: slug,\n\t\t\t}\n\n\t\t\tconst link = createLink({\n\t\t\t\twebPageId,\n\t\t\t\tpathVariables: { [slugKey]: collectionItem },\n\t\t\t})\n\n\t\t\tresult.set(localePrefix + basePath, link)\n\t\t}\n\t}\n\n\treturn result\n}\n", "import type {\n\tACLPermissions,\n\tInviteACLEntry,\n\tProjectLicenseType,\n\tRole,\n\tTeamLicenseType,\n\tUserACLEntry,\n} from \"@framerjs/app-shared\"\nimport { ACLEntryKind, ApiError } from \"@framerjs/app-shared\"\nimport { getLogger } from \"@framerjs/shared\"\nimport { apiFetcher } from \"web/lib/apiFetcher.ts\"\nimport { isEditorLimitReachedError, isProjectEditorLimitReachedError } from \"web/lib/editorLimitReachedError.ts\"\n\nconst log = getLogger(\"invite\")\n\nexport enum InviteStatus {\n\tSuccess = 0,\n\tEditorLimitReachedError = 1,\n\tRetriableError = 2,\n\tUnhandledError = 3,\n\tProjectEditorLimitReachedError = 4,\n}\n\nexport type InviteResponse =\n\t| {\n\t\t\tstatus: InviteStatus.Success\n\t\t\taclEntry: InviteACLEntry | UserACLEntry\n\t  }\n\t| {\n\t\t\tstatus: InviteStatus.EditorLimitReachedError\n\t\t\teditorLimit: number\n\t\t\tlicenseType: TeamLicenseType\n\t\t\tteamId: string\n\t\t\tteamName: string\n\t  }\n\t| { status: InviteStatus.RetriableError }\n\t| { status: InviteStatus.UnhandledError }\n\t| {\n\t\t\tstatus: InviteStatus.ProjectEditorLimitReachedError\n\t\t\tprojectId: string\n\t\t\tlicenseType: ProjectLicenseType\n\t\t\teditorLimit: number\n\t  }\n\nexport interface InviteByEmailRequest {\n\temail: string\n\trole: Role\n\tpermissions?: ACLPermissions | null\n\ttoken?: string\n\tuseNewOnboarding?: boolean\n}\n\nexport interface InviteByIdRequest {\n\tuserId: string\n\trole: Role\n\tpermissions?: ACLPermissions | null\n\ttoken?: string\n\tuseNewOnboarding?: boolean\n}\n\nexport async function invite(\n\tprojectId: string,\n\tbody: InviteByEmailRequest | InviteByIdRequest,\n): Promise<InviteResponse> {\n\ttry {\n\t\tconst user = await apiFetcher.post(`/web/projects/${projectId}/acl`, {\n\t\t\t...body,\n\t\t\t// Omit permissions from the request JSON if they're null, that's\n\t\t\t// how the API expects it.\n\t\t\tpermissions: body.permissions ?? undefined,\n\t\t})\n\n\t\t// The request can be `pending: false` if the invitee is an already registered Framer user\n\t\treturn {\n\t\t\tstatus: InviteStatus.Success,\n\t\t\taclEntry: {\n\t\t\t\t...user,\n\t\t\t\t// Attach a missing property to distinguish between invites and users\n\t\t\t\tkind: user.pending ? ACLEntryKind.Invite : ACLEntryKind.User,\n\t\t\t},\n\t\t}\n\t} catch (error: unknown) {\n\t\tif (isEditorLimitReachedError(error)) {\n\t\t\treturn {\n\t\t\t\tstatus: InviteStatus.EditorLimitReachedError,\n\t\t\t\teditorLimit: error.data.editorLimit,\n\t\t\t\tlicenseType: error.data.licenseType,\n\t\t\t\tteamId: error.data.teamId,\n\t\t\t\tteamName: error.data.teamName,\n\t\t\t}\n\t\t}\n\t\tif (isProjectEditorLimitReachedError(error)) {\n\t\t\treturn {\n\t\t\t\tstatus: InviteStatus.ProjectEditorLimitReachedError,\n\t\t\t\tprojectId: error.data.projectId,\n\t\t\t\tlicenseType: error.data.licenseType,\n\t\t\t\teditorLimit: error.data.editorLimit,\n\t\t\t}\n\t\t}\n\t\tlog.reportError(error)\n\t\treturn {\n\t\t\tstatus:\n\t\t\t\terror instanceof ApiError && error.isTemporary ? InviteStatus.RetriableError : InviteStatus.UnhandledError,\n\t\t}\n\t}\n}\n", "import type { ACLPermissions, ProjectLicenseType, Role, TeamLicenseType } from \"@framerjs/app-shared\"\nimport { getLogger } from \"@framerjs/shared\"\nimport { apiFetcher } from \"web/lib/apiFetcher.ts\"\nimport { isEditorLimitReachedError, isProjectEditorLimitReachedError } from \"web/lib/editorLimitReachedError.ts\"\n\nconst log = getLogger(\"invite\")\n\nexport enum UpdateUserPermissionsStatus {\n\tSuccess = 0,\n\tEditorLimitReachedError = 1,\n\tUnhandledError = 2,\n\tProjectEditorLimitReachedError = 3,\n}\n\nexport type UpdateUserPermissionsResponse =\n\t| { status: UpdateUserPermissionsStatus.Success }\n\t| {\n\t\t\tstatus: UpdateUserPermissionsStatus.EditorLimitReachedError\n\t\t\teditorLimit: number\n\t\t\tlicenseType: TeamLicenseType\n\t\t\tteamId: string\n\t\t\tteamName: string\n\t  }\n\t| { status: UpdateUserPermissionsStatus.UnhandledError }\n\t| {\n\t\t\tstatus: UpdateUserPermissionsStatus.ProjectEditorLimitReachedError\n\t\t\tprojectId: string\n\t\t\tlicenseType: ProjectLicenseType\n\t\t\teditorLimit: number\n\t  }\n\nexport interface UpdateUserPermissionsRequest {\n\tid: string\n\trole: Role\n\tpermissions: ACLPermissions | null\n}\n\nexport async function updateUserPermissions(\n\tprojectId: string,\n\t{ id, role, permissions }: UpdateUserPermissionsRequest,\n): Promise<UpdateUserPermissionsResponse> {\n\ttry {\n\t\tawait apiFetcher.post(`/web/projects/${projectId}/acl/${id}`, {\n\t\t\trole,\n\t\t\t// Omit permissions from the request JSON if they're null, that's\n\t\t\t// how the API expects it.\n\t\t\tpermissions: permissions ?? undefined,\n\t\t})\n\t\treturn { status: UpdateUserPermissionsStatus.Success }\n\t} catch (error: unknown) {\n\t\tif (isEditorLimitReachedError(error)) {\n\t\t\treturn {\n\t\t\t\tstatus: UpdateUserPermissionsStatus.EditorLimitReachedError,\n\t\t\t\teditorLimit: error.data.editorLimit,\n\t\t\t\tlicenseType: error.data.licenseType,\n\t\t\t\tteamId: error.data.teamId,\n\t\t\t\tteamName: error.data.teamName,\n\t\t\t}\n\t\t}\n\t\tif (isProjectEditorLimitReachedError(error)) {\n\t\t\treturn {\n\t\t\t\tstatus: UpdateUserPermissionsStatus.ProjectEditorLimitReachedError,\n\t\t\t\tprojectId: error.data.projectId,\n\t\t\t\tlicenseType: error.data.licenseType,\n\t\t\t\teditorLimit: error.data.editorLimit,\n\t\t\t}\n\t\t}\n\t\tlog.reportError(error)\n\t\treturn { status: UpdateUserPermissionsStatus.UnhandledError }\n\t}\n}\n", "import type { EmptyStateProps } from \"@framerjs/fresco\"\nimport { Dictionary } from \"app/dictionary.ts\"\n\nexport const getNoSearchResultProps = (): EmptyStateProps => ({\n\ticon: null,\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;;ACnEO,IAAM,yBAAyB,OAAwB;AAAA,EAC7D,MAAM;AAAA,EACN,OAAO;AAAA,EACP;AACD;",
  "names": ["import_react", "import_react", "import_jsx_runtime", "LinkInputInternal", "log", "log", "log", "log"]
}
