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AA,cAACgsB,EAAAA,GAAc,CAACrU,SAAUuO,EAAAA,GAAM+F,SAASC,aAE3CpX,SAASC,eAAe,kBAE5B,EAGWkR,EAAUA,CAAChb,EAAuBuD,KAC7Csd,IACA5F,EAAAA,GAAMD,QAAQhb,EAASuD,EAAQ,EAGpBpN,EAAQA,CAAC6J,EAAuBuD,KAC3Csd,IACA5F,EAAAA,GAAM9kB,MAAM6J,EAASuD,EAAQ,C","sources":["webpack://fider/./public/components/common/HoverInfo.tsx","webpack://fider/./public/components/common/Icon.tsx","webpack://fider/./public/components/ErrorBoundary.tsx","webpack://fider/./public/components/ShowPostResponse.tsx","webpack://fider/./public/components/ShowPostStatus.tsx","webpack://fider/./public/components/ShowTag.tsx","webpack://fider/./public/components/Header.tsx","webpack://fider/./public/components/common/Button.tsx","webpack://fider/./public/components/common/form/Form.tsx","webpack://fider/./public/components/common/form/DisplayError.tsx","webpack://fider/./public/components/common/form/Input.tsx","webpack://fider/./public/components/common/form/ImageUploader.tsx","webpack://fider/./public/components/common/form/MultiImageUploader.tsx","webpack://fider/./public/components/common/form/TextArea.tsx","webpack://fider/./public/components/common/form/RadioButton.tsx","webpack://fider/./public/components/common/form/Select.tsx","webpack://fider/./public/components/common/form/Field.tsx","webpack://fider/./public/components/common/form/Checkbox.tsx","webpack://fider/./public/components/common/form/ImageViewer.tsx","webpack://fider/./public/components/common/Markdown.tsx","webpack://fider/./public/components/common/DevBanner.tsx","webpack://fider/./public/components/common/Avatar.tsx","webpack://fider/./public/components/common/AvatarStack.tsx","webpack://fider/./public/components/common/Message.tsx","webpack://fider/./public/components/common/Hint.tsx","webpack://fider/./public/components/common/Legal.tsx","webpack://fider/./public/components/common/SocialSignInButton.tsx","webpack://fider/./public/components/common/SignInControl.tsx","webpack://fider/./public/components/common/Moment.tsx","webpack://fider/./public/components/common/Modal.tsx","webpack://fider/./public/components/common/UserName.tsx","webpack://fider/./public/components/common/Loader.tsx","webpack://fider/./public/components/common/Logo.tsx","webpack://fider/./public/components/common/Toggle.tsx","webpack://fider/./public/components/common/PoweredByFider.tsx","webpack://fider/./public/components/common/PageTitle.tsx","webpack://fider/./public/components/common/Dropdown.tsx","webpack://fider/./public/components/common/Money.tsx","webpack://fider/./public/components/SignInModal.tsx","webpack://fider/./public/components/VoteCounter.tsx","webpack://fider/./public/components/NotificationIndicator.tsx","webpack://fider/./public/components/UserMenu.tsx","webpack://fider/./public/components/ReadOnlyNotice.tsx","webpack://fider/./public/components/layout/Stack.tsx","webpack://fider/./public/components/layout/Divider.tsx","webpack://fider/./public/models/post.ts","webpack://fider/./public/models/identity.ts","webpack://fider/./public/models/settings.ts","webpack://fider/./public/models/billing.ts","webpack://fider/./public/models/webhook.ts","webpack://fider/./public/services/http.ts","webpack://fider/./public/services/cache.ts","webpack://fider/./public/services/analytics.ts","webpack://fider/./public/services/fider.ts","webpack://fider/./public/services/jwt.ts","webpack://fider/./public/services/utils.ts","webpack://fider/./public/services/i18n.ts","webpack://fider/./public/services/markdown.ts","webpack://fider/./public/services/notify.ts","webpack://fider/./public/services/navigator.ts","webpack://fider/./public/services/querystring.ts","webpack://fider/./public/services/device.ts","webpack://fider/./public/services/actions/user.ts","webpack://fider/./public/services/actions/tag.ts","webpack://fider/./public/services/actions/post.ts","webpack://fider/./public/services/actions/tenant.ts","webpack://fider/./public/services/actions/notification.ts","webpack://fider/./public/services/actions/invite.ts","webpack://fider/./public/services/actions/infra.ts","webpack://fider/./public/services/actions/webhook.ts","webpack://fider/./public/services/actions/billing.ts","webpack://fider/./public/services/toastify.tsx"],"sourcesContent":["import \"./HoverInfo.scss\"\n\nimport React from \"react\"\nimport { Icon } from \"./Icon\"\n\nimport IconInformationCircle from \"@fider/assets/images/heroicons-information-circle.svg\"\nimport { classSet } from \"@fider/services\"\n\ninterface InfoProps {\n text: string\n onClick?: () => void\n href?: string\n target?: \"_self\" | \"_blank\" | \"_parent\" | \"_top\"\n}\n\nexport const HoverInfo = (props: InfoProps) => {\n const Elem = props.href ? \"a\" : \"span\"\n const classList = classSet({\n \"c-hoverinfo\": true,\n clickable: props.onClick !== undefined,\n })\n return (\n \n \n \n )\n}\n","import React from \"react\"\n\ninterface IconProps {\n sprite: SpriteSymbol | string\n height?: string\n width?: string\n className?: string\n onClick?: () => void\n}\n\nexport const Icon = (props: IconProps) => {\n if (typeof props.sprite === \"string\") {\n const styles = { height: props.height && `${props.height}px`, width: props.width && `${props.width}px` }\n return \n }\n\n return (\n \n \n \n )\n}\n","import React from \"react\"\nimport { ErrorPage } from \"@fider/pages/Error/Error.page\"\nimport { FiderContext } from \"@fider/services\"\n\ninterface ErrorBoundaryProps {\n onError?: (err: Error) => void\n}\n\ninterface ErrorBoundaryState {\n error?: Error\n errorInfo?: React.ErrorInfo\n}\n\nexport class ErrorBoundary extends React.Component {\n constructor(props: any) {\n super(props)\n\n this.state = {\n error: undefined,\n errorInfo: undefined,\n }\n }\n\n public componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n const onError = this.props.onError\n if (onError) {\n onError(error)\n }\n\n this.setState({\n error,\n errorInfo,\n })\n }\n\n public render() {\n const { error, errorInfo } = this.state\n\n if (error && errorInfo) {\n return {(fider) => }\n } else {\n return this.props.children\n }\n }\n}\n","import React from \"react\"\nimport { PostResponse, PostStatus } from \"@fider/models\"\nimport { Markdown, UserName, ShowPostStatus } from \"@fider/components\"\nimport { HStack } from \"./layout\"\n\nconst DuplicateDetails = (props: PostResponseProps): JSX.Element | null => {\n if (!props.response) {\n return null\n }\n\n const original = props.response.original\n if (!original) {\n return null\n }\n\n return (\n
\n {\" \"}\n \n {original.title}\n \n
\n )\n}\n\ninterface PostResponseProps {\n status: string\n response: PostResponse | null\n}\n\nconst StatusDetails = (props: PostResponseProps): JSX.Element | null => {\n if (!props.response || !props.response.text) {\n return null\n }\n\n return (\n
\n \n
\n )\n}\n\nexport const ShowPostResponse = (props: PostResponseProps): JSX.Element | null => {\n const status = PostStatus.Get(props.status)\n\n if (props.response && (status.show || props.response.text)) {\n return (\n
\n \n {status.show && }\n \n · \n \n \n {status === PostStatus.Duplicate ? DuplicateDetails(props) : StatusDetails(props)}\n
\n )\n }\n\n return null\n}\n","import \"./ShowPostStatus.scss\"\n\nimport React from \"react\"\nimport { PostStatus } from \"@fider/models\"\nimport { t } from \"@lingui/macro\"\n\ninterface ShowPostStatusProps {\n status: PostStatus\n}\n\nexport const ShowPostStatus = (props: ShowPostStatusProps) => {\n const id = `enum.poststatus.${props.status.value}`\n const title = t({ id, message: props.status.title })\n return {title}\n}\n","import \"./ShowTag.scss\"\n\nimport React from \"react\"\nimport { Tag } from \"@fider/models\"\nimport { classSet } from \"@fider/services\"\n\ninterface TagProps {\n tag: Tag\n circular?: boolean\n link?: boolean\n}\n\nconst getRGB = (color: string) => {\n const r = color.substring(0, 2)\n const g = color.substring(2, 4)\n const b = color.substring(4, 6)\n\n return {\n R: parseInt(r, 16),\n G: parseInt(g, 16),\n B: parseInt(b, 16),\n }\n}\n\nconst textColor = (color: string) => {\n const components = getRGB(color)\n const bgDelta = components.R * 0.299 + components.G * 0.587 + components.B * 0.114\n return bgDelta > 140 ? \"#333\" : \"#fff\"\n}\n\nexport const ShowTag = (props: TagProps) => {\n const className = classSet({\n \"c-tag\": true,\n \"c-tag--circular\": props.circular === true,\n })\n\n return (\n \n {!props.tag.isPublic && !props.circular && (\n \n \n \n )}\n {props.circular ? \"\" : props.tag.name || \"Tag\"}\n \n )\n}\n","import React, { useState } from \"react\"\nimport { SignInModal, TenantLogo, NotificationIndicator, UserMenu } from \"@fider/components\"\nimport { useFider } from \"@fider/hooks\"\nimport { HStack } from \"./layout\"\nimport { Trans } from \"@lingui/macro\"\n\nexport const Header = () => {\n const fider = useFider()\n const [isSignInModalOpen, setIsSignInModalOpen] = useState(false)\n\n const showModal = (e: React.MouseEvent) => {\n e.preventDefault()\n setIsSignInModalOpen(true)\n }\n\n const hideModal = () => setIsSignInModalOpen(false)\n\n return (\n
\n \n \n
\n \n \n \n

{fider.session.tenant.name}

\n
\n {fider.session.isAuthenticated && (\n \n \n \n \n )}\n {!fider.session.isAuthenticated && (\n \n Sign in\n \n )}\n
\n
\n
\n
\n )\n}\n","import \"./Button.scss\"\n\nimport React, { useEffect, useRef, useState } from \"react\"\nimport { classSet } from \"@fider/services\"\n\ninterface ButtonProps {\n className?: string\n disabled?: boolean\n href?: string\n rel?: \"nofollow\"\n target?: \"_self\" | \"_blank\" | \"_parent\" | \"_top\"\n type?: \"button\" | \"submit\"\n variant?: \"primary\" | \"danger\" | \"secondary\" | \"tertiary\"\n size?: \"small\" | \"default\" | \"large\"\n onClick?: (event: ButtonClickEvent) => Promise | void\n}\n\nexport class ButtonClickEvent {\n private shouldEnable = true\n public preventEnable(): void {\n this.shouldEnable = false\n }\n public canEnable(): boolean {\n return this.shouldEnable\n }\n}\n\nexport const Button: React.FC = (props) => {\n const [clicked, setClicked] = useState(false)\n const unmountedContainer = useRef(false)\n\n useEffect(() => {\n return () => {\n unmountedContainer.current = true\n }\n }, [])\n\n const className = classSet({\n \"c-button\": true,\n [`c-button--${props.size}`]: props.size,\n [`c-button--${props.variant}`]: props.variant,\n \"c-button--loading\": clicked,\n \"c-button--disabled\": clicked || props.disabled,\n [props.className || \"\"]: props.className,\n \"shadow-sm\": props.variant !== \"tertiary\",\n })\n\n let buttonContent: JSX.Element\n const onClickProp = props.onClick\n\n if (props.href) {\n buttonContent = (\n \n {props.children}\n \n )\n } else if (onClickProp) {\n const onClick = async (e?: React.SyntheticEvent) => {\n if (e) {\n e.preventDefault()\n e.stopPropagation()\n }\n\n if (clicked) {\n return\n }\n\n const event = new ButtonClickEvent()\n setClicked(true)\n\n await onClickProp(event)\n\n if (!unmountedContainer.current && event.canEnable()) {\n setClicked(false)\n }\n }\n\n buttonContent = (\n \n )\n } else {\n buttonContent = (\n \n )\n }\n\n return buttonContent\n}\n\nButton.defaultProps = {\n size: \"default\",\n variant: \"secondary\",\n type: \"button\",\n}\n","import \"./Form.scss\"\n\nimport React from \"react\"\nimport { Failure, classSet } from \"@fider/services\"\nimport { DisplayError } from \"@fider/components\"\n\ninterface ValidationContext {\n error?: Failure\n}\n\ninterface FormProps {\n className?: string\n error?: Failure\n}\n\nexport const ValidationContext = React.createContext({})\n\nexport const Form: React.FunctionComponent = (props) => {\n const className = classSet({\n \"c-form\": true,\n [props.className || \"\"]: props.className,\n })\n\n return (\n
\n \n {props.children}\n \n )\n}\n","import React from \"react\"\nimport { Failure } from \"@fider/services\"\n\nimport \"./DisplayError.scss\"\n\nconst arrayToTag = (items: string[]) => {\n return items.map((m) =>
  • {m}
  • )\n}\n\ninterface DisplayErrorProps {\n error?: Failure\n fields?: string[]\n}\n\nexport const hasError = (field?: string, error?: Failure): boolean => {\n if (field && error && error.errors) {\n for (const err of error.errors) {\n if (err.field === field) {\n return true\n }\n }\n }\n return false\n}\n\nexport const DisplayError = (props: DisplayErrorProps) => {\n if (!props.error || !props.error.errors) {\n return null\n }\n\n const dict = props.error.errors.reduce((result, err) => {\n result[err.field || \"\"] = result[err.field || \"\"] || []\n result[err.field || \"\"].push(err.message)\n return result\n }, {} as { [key: string]: string[] })\n\n let items: JSX.Element[] = []\n\n if (dict[\"\"] && !props.fields) {\n items = arrayToTag(dict[\"\"])\n } else if (props.fields) {\n for (const field of props.fields || Object.keys(dict)) {\n if (Object.prototype.hasOwnProperty.call(dict, field)) {\n const tags = arrayToTag(dict[field])\n tags.forEach((t) => items.push(t))\n }\n }\n }\n\n return items.length > 0 ? (\n
    \n
      {items}
    \n
    \n ) : null\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { ValidationContext } from \"./Form\"\nimport { DisplayError, hasError } from \"./DisplayError\"\nimport { Icon } from \"@fider/components\"\n\nimport \"./Input.scss\"\nimport { HStack } from \"@fider/components/layout\"\n\ninterface InputProps {\n field: string\n label?: string\n className?: string\n autoComplete?: string\n autoFocus?: boolean\n noTabFocus?: boolean\n afterLabel?: JSX.Element\n icon?: SpriteSymbol\n maxLength?: number\n value?: string\n disabled?: boolean\n suffix?: string | JSX.Element\n placeholder?: string\n onIconClick?: () => void\n onFocus?: () => void\n inputRef?: React.MutableRefObject\n onChange?: (value: string) => void\n}\n\nexport const Input: React.FunctionComponent = (props) => {\n const onChange = (e: React.FormEvent) => {\n if (props.onChange) {\n props.onChange(e.currentTarget.value)\n }\n }\n\n const suffix = typeof props.suffix === \"string\" ? {props.suffix} : props.suffix\n\n const icon = props.icon ? : undefined\n\n return (\n \n {(ctx) => (\n \n {!!props.label && (\n \n )}\n \n \n {icon}\n {suffix}\n \n \n {props.children}\n \n )}\n \n )\n}\n","import \"./ImageUploader.scss\"\n\nimport React from \"react\"\nimport { ValidationContext } from \"./Form\"\nimport { DisplayError, hasError } from \"./DisplayError\"\nimport { classSet, fileToBase64, uploadedImageURL } from \"@fider/services\"\nimport { Button, Icon, Modal } from \"@fider/components\"\nimport { ImageUpload } from \"@fider/models\"\nimport IconPhotograph from \"@fider/assets/images/heroicons-photograph.svg\"\n\nconst hardFileSizeLimit = 5 * 1024 * 1024\n\ninterface ImageUploaderProps {\n instanceID?: string\n field: string\n label?: string\n bkey?: string\n disabled?: boolean\n onChange(state: ImageUpload, instanceID?: string, previewURL?: string): void\n}\n\ninterface ImageUploaderState extends ImageUpload {\n previewURL?: string\n showModal: boolean\n}\n\nexport class ImageUploader extends React.Component {\n private fileSelector?: HTMLInputElement | null\n\n constructor(props: ImageUploaderProps) {\n super(props)\n this.state = {\n upload: undefined,\n remove: false,\n showModal: false,\n previewURL: uploadedImageURL(this.props.bkey),\n }\n }\n\n public fileChanged = async (e: React.ChangeEvent) => {\n if (e.target.files && e.target.files[0]) {\n const file = e.target.files[0]\n if (file.size > hardFileSizeLimit) {\n alert(\"The image size must be smaller than 5MB.\")\n return\n }\n\n const base64 = await fileToBase64(file)\n this.setState(\n {\n bkey: this.props.bkey,\n upload: {\n fileName: file.name,\n content: base64,\n contentType: file.type,\n },\n remove: false,\n previewURL: `data:${file.type};base64,${base64}`,\n },\n () => {\n this.props.onChange(this.state, this.props.instanceID, this.state.previewURL)\n }\n )\n }\n }\n\n public removeFile = async () => {\n if (this.fileSelector) {\n this.fileSelector.value = \"\"\n }\n\n this.setState(\n {\n bkey: this.props.bkey,\n remove: true,\n upload: undefined,\n previewURL: undefined,\n },\n () => {\n this.props.onChange(\n {\n bkey: this.state.bkey,\n remove: this.state.remove,\n upload: this.state.upload,\n },\n this.props.instanceID,\n this.state.previewURL\n )\n }\n )\n }\n\n public selectFile = async () => {\n if (this.fileSelector) {\n this.fileSelector.click()\n }\n }\n\n private openModal = () => {\n this.setState({ showModal: true })\n }\n\n private closeModal = async () => {\n this.setState({ showModal: false })\n }\n\n private modal() {\n return (\n \n {this.props.bkey ? \"\" : \"\"}\n\n \n \n \n \n )\n }\n\n public render() {\n const isUploading = !!this.state.upload\n const hasFile = (!this.state.remove && this.props.bkey) || isUploading\n\n return (\n \n {(ctx) => (\n \n {this.modal()}\n {this.props.label && }\n\n {hasFile && (\n
    \n \"\"\n {!this.props.disabled && (\n \n )}\n
    \n )}\n\n (this.fileSelector = e)} type=\"file\" onChange={this.fileChanged} accept=\"image/*\" />\n {!hasFile && (\n \n )}\n \n {this.props.children}\n \n )}\n
    \n )\n }\n}\n","import React from \"react\"\nimport { ImageUploader } from \"./ImageUploader\"\nimport { ImageUpload } from \"@fider/models\"\nimport { ValidationContext, hasError, DisplayError } from \"@fider/components\"\nimport { classSet } from \"@fider/services\"\n\nimport \"./MultiImageUploader.scss\"\n\ninterface MultiImageUploaderProps {\n field: string\n maxUploads: number\n bkeys?: string[]\n onChange?: (uploads: ImageUpload[]) => void\n}\n\ninterface MultiImageUploaderInstances {\n [key: string]: {\n element: JSX.Element\n upload?: ImageUpload\n }\n}\n\ninterface MultiImageUploaderState {\n count: number\n instances: MultiImageUploaderInstances\n removed: ImageUpload[]\n}\n\nexport class MultiImageUploader extends React.Component {\n constructor(props: MultiImageUploaderProps) {\n super(props)\n\n let count = 1\n const instances = {}\n if (props.bkeys) {\n for (const bkey of props.bkeys) {\n count++\n this.addNewElement(instances, bkey)\n }\n }\n\n if (count <= this.props.maxUploads) {\n count++\n this.addNewElement(instances)\n }\n\n this.state = { instances, count, removed: [] }\n }\n\n private imageUploaded = (upload: ImageUpload, instanceID: string) => {\n const instances = { ...this.state.instances }\n const removed = [...this.state.removed]\n let count = this.state.count\n if (upload.remove) {\n if (upload.bkey) {\n removed.push(upload)\n }\n delete instances[instanceID]\n if (--count === this.props.maxUploads) {\n this.addNewElement(instances)\n }\n } else {\n instances[instanceID].upload = upload\n if (count++ <= this.props.maxUploads) {\n this.addNewElement(instances)\n }\n }\n this.setState({ instances, count, removed }, this.triggerOnChange)\n }\n\n private triggerOnChange() {\n if (this.props.onChange) {\n const uploads = Object.keys(this.state.instances)\n .map((k) => this.state.instances[k].upload)\n .concat(this.state.removed)\n .filter((x) => !!x) as ImageUpload[]\n this.props.onChange(uploads)\n }\n }\n\n private addNewElement(instances: MultiImageUploaderInstances, bkey?: string) {\n const id = btoa(Math.random().toString())\n instances[id] = {\n element: ,\n }\n }\n\n public render() {\n const elements = Object.keys(this.state.instances).map((k) => this.state.instances[k].element)\n return (\n \n {(ctx) => (\n \n
    {elements}
    \n \n \n )}\n
    \n )\n }\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { ValidationContext } from \"../\"\nimport { DisplayError, hasError } from \"./DisplayError\"\nimport Textarea from \"react-textarea-autosize\"\n\nimport \"./TextArea.scss\"\n\ninterface TextAreaProps {\n label?: string\n field: string\n value?: string\n disabled?: boolean\n minRows?: number\n placeholder?: string\n afterLabel?: JSX.Element\n onChange?: (value: string) => void\n inputRef?: React.MutableRefObject\n onFocus?: React.FocusEventHandler\n className?: string\n}\n\nexport const TextArea: React.FunctionComponent = (props) => {\n const onChange = (e: React.FormEvent) => {\n if (props.onChange) {\n props.onChange(e.currentTarget.value)\n }\n }\n\n return (\n \n {(ctx) => (\n <>\n
    \n {!!props.label && (\n \n )}\n \n \n {props.children}\n
    \n \n )}\n
    \n )\n}\n","import { HStack, VStack } from \"@fider/components/layout\"\nimport React, { useState } from \"react\"\n\nimport \"./RadioButton.scss\"\n\ninterface RadioButtonOption {\n value: string\n label: string\n}\n\ninterface RadioButtonProps {\n label: string\n field: string\n defaultOption: RadioButtonOption\n options: RadioButtonOption[]\n onSelect?: (value: RadioButtonOption) => void\n}\n\nexport const RadioButton = (props: RadioButtonProps) => {\n const [selected, setSelected] = useState(props.defaultOption)\n\n const onChange = (option: RadioButtonOption) => () => {\n setSelected(option)\n props.onSelect?.(option)\n }\n\n const inputs = props.options.map((option) => (\n \n \n \n \n ))\n\n return (\n
    \n \n {inputs}\n
    \n )\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { ValidationContext } from \"./Form\"\nimport { DisplayError, hasError } from \"./DisplayError\"\n\nimport \"./Select.scss\"\n\nexport interface SelectOption {\n value: string\n label: string\n}\n\ninterface SelectProps {\n field: string\n label?: string\n maxLength?: number\n defaultValue?: string\n options: SelectOption[]\n onChange?: (option?: SelectOption) => void\n}\n\nexport const Select: React.FunctionComponent = (props) => {\n const getOption = (value?: string) => {\n if (value && props.options) {\n const filtered = props.options.filter((x) => x.value === value)\n if (filtered && filtered.length > 0) {\n return filtered[0]\n }\n }\n }\n const [selected, setSelected] = React.useState(getOption(props.defaultValue))\n const onChange = (e: React.FormEvent) => {\n let selected: SelectOption | undefined\n if (e.currentTarget.value) {\n const options = props.options.filter((o) => o.value === e.currentTarget.value)\n if (options && options.length > 0) {\n selected = options[0]\n }\n }\n\n setSelected(selected)\n if (props.onChange) {\n props.onChange(selected)\n }\n }\n\n return (\n \n {(ctx) => (\n <>\n
    \n {!!props.label && }\n \n {props.options.map((option) => (\n \n ))}\n \n \n {props.children}\n
    \n \n )}\n
    \n )\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { ValidationContext } from \"./Form\"\nimport { DisplayError, hasError } from \"./DisplayError\"\n\ninterface FieldProps {\n className?: string\n label?: string\n field?: string\n afterLabel?: JSX.Element\n}\n\nexport const Field: React.FunctionComponent = (props) => {\n const fields = props.field ? [props.field] : undefined\n return (\n \n {(ctx) => (\n \n {!!props.label && (\n \n )}\n {props.children}\n \n \n )}\n \n )\n}\n","import React, { useState } from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { DisplayError, ValidationContext, hasError } from \"../\"\nimport { HStack } from \"@fider/components/layout\"\n\nimport \"./Checkbox.scss\"\n\ninterface CheckboxProps {\n field: string\n checked?: boolean\n onChange?: (checked: boolean) => void\n}\n\nexport const Checkbox: React.FC = (props) => {\n const [checked, setChecked] = useState(props.checked || false)\n\n const onChange = (e: React.ChangeEvent) => {\n const isChecked: boolean = e.currentTarget.checked\n\n setChecked(isChecked)\n if (props.onChange) {\n props.onChange(isChecked)\n }\n }\n\n return (\n \n {(ctx) => (\n \n
    \n \n \n \n \n \n
    \n \n )}\n
    \n )\n}\n","import React, { useState } from \"react\"\nimport { uploadedImageURL } from \"@fider/services\"\nimport { Modal, Button, Loader } from \"@fider/components\"\n\nimport \"./ImageViewer.scss\"\nimport { Trans } from \"@lingui/macro\"\n\ninterface ImageViewerModalProps {\n isOpen: boolean\n imgSrc: string | undefined\n loadedPreview: boolean\n onPreviewLoad: () => void\n onClose: () => void\n}\n\nconst ImageViewerModal = (props: ImageViewerModalProps) => (\n \n \n {!props.loadedPreview && }\n \"\"\n \n\n \n \n \n \n)\n\ninterface ImageViewerProps {\n bkey: string\n}\n\nexport const ImageViewer = (props: ImageViewerProps) => {\n const [showModal, setShowModal] = useState(false)\n const [loadedThumbnail, setLoadedThumbnail] = useState(false)\n const [loadedPreview, setLoadedPreview] = useState(false)\n\n const openModal = () => {\n if (loadedThumbnail) {\n setShowModal(true)\n }\n }\n\n const closeModal = () => {\n setShowModal(false)\n }\n\n const onThumbnailLoad = () => {\n setLoadedThumbnail(true)\n }\n\n const onPreviewLoad = () => {\n setLoadedPreview(true)\n }\n\n return (\n
    \n \n {!loadedThumbnail && }\n \"\"\n
    \n )\n}\n","import React from \"react\"\nimport { markdown, truncate } from \"@fider/services\"\n\nimport \"./Markdown.scss\"\n\ninterface MarkdownProps {\n className?: string\n text?: string\n maxLength?: number\n style: \"full\" | \"plainText\"\n}\n\nexport const Markdown = (props: MarkdownProps) => {\n if (!props.text) {\n return null\n }\n\n const html = markdown[props.style](props.text)\n const className = `c-markdown ${props.className || \"\"}`\n const tagName = props.style === \"plainText\" ? \"p\" : \"div\"\n\n return React.createElement(tagName, {\n className,\n dangerouslySetInnerHTML: { __html: props.maxLength ? truncate(html, props.maxLength) : html },\n })\n}\n","import React from \"react\"\nimport { useFider } from \"@fider/hooks\"\n\nimport \"./DevBanner.scss\"\n\nexport const DevBanner = () => {\n const fider = useFider()\n\n if (fider.isProduction()) {\n return null\n }\n\n return
    DEV
    \n}\n","import \"./Avatar.scss\"\n\nimport React from \"react\"\nimport { UserRole } from \"@fider/models\"\n\ninterface AvatarProps {\n user: {\n role?: UserRole\n avatarURL: string\n name: string\n }\n size?: \"small\" | \"normal\"\n}\n\nexport const Avatar = (props: AvatarProps) => {\n const size = props.size === \"small\" ? \"h-6 w-6\" : \"h-8 w-8\"\n return {props.user.name}\n}\n","import \"./AvatarStack.scss\"\n\nimport React from \"react\"\nimport { UserRole } from \"@fider/models\"\nimport { Avatar } from \"./Avatar\"\n\ninterface AvatarStackProps {\n users: Array<{\n role?: UserRole\n avatarURL: string\n name: string\n }>\n}\n\nexport const AvatarStack = (props: AvatarStackProps) => {\n return (\n
    \n {props.users.map((x, i) => (\n \n ))}\n
    \n )\n}\n","import \"./Message.scss\"\n\nimport React from \"react\"\nimport { classSet } from \"@fider/services\"\nimport IconCheckCircle from \"@fider/assets/images/heroicons-check-circle.svg\"\nimport IconExclamationCircle from \"@fider/assets/images/heroicons-exclamation-circle.svg\"\nimport IconExclamation from \"@fider/assets/images/heroicons-exclamation.svg\"\nimport { HStack } from \"@fider/components/layout\"\nimport { Icon } from \"./Icon\"\n\ninterface MessageProps {\n type: \"success\" | \"warning\" | \"error\"\n className?: string\n alignment?: \"center\"\n showIcon?: boolean\n}\n\nexport const Message: React.FunctionComponent = (props) => {\n const className = classSet({\n \"c-message\": true,\n [`c-message--${props.type}`]: true,\n [`c-message--icon`]: props.showIcon === true,\n [`${props.className}`]: props.className,\n })\n\n const icon = props.type === \"error\" ? IconExclamation : props.type === \"warning\" ? IconExclamationCircle : IconCheckCircle\n\n return (\n \n {props.showIcon === true && }\n {props.children}\n \n )\n}\n","import \"./Hint.scss\"\n\nimport React, { useState } from \"react\"\nimport IconX from \"@fider/assets/images/heroicons-x.svg\"\nimport { HStack } from \"@fider/components/layout\"\nimport { cache } from \"@fider/services\"\nimport { Icon } from \"./Icon\"\n\ninterface HintProps {\n permanentCloseKey?: string\n condition?: boolean\n}\n\nexport const Hint: React.FC = (props) => {\n const cacheKey: string | undefined = props.permanentCloseKey ? `Hint-Closed-${props.permanentCloseKey}` : undefined\n const [isClosed, setIsClosed] = useState(cacheKey ? cache.local.has(cacheKey) : false)\n\n const close = () => {\n if (cacheKey) {\n cache.local.set(cacheKey, \"true\")\n }\n setIsClosed(true)\n }\n\n if (props.condition === false || isClosed) {\n return null\n }\n\n return (\n \n {props.children}\n {cacheKey && }\n \n )\n}\n","import React from \"react\"\nimport { Modal, Checkbox } from \"@fider/components\"\nimport { useFider } from \"@fider/hooks\"\nimport { Trans } from \"@lingui/macro\"\n\ninterface LegalAgreementProps {\n onChange: (agreed: boolean) => void\n}\n\nexport const TermsOfService = () => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n \n Terms of Service\n \n )\n }\n return null\n}\n\nexport const PrivacyPolicy = () => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n \n Privacy Policy\n \n )\n }\n return null\n}\n\nexport const LegalNotice = () => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n

    \n \n By signing in, you agree to the and .\n \n

    \n )\n }\n return null\n}\n\nexport const LegalFooter = () => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n \n \n \n )\n }\n return null\n}\n\nexport const LegalAgreement: React.FunctionComponent = (props) => {\n const fider = useFider()\n\n if (fider.settings.hasLegal) {\n return (\n \n \n I have read and agree to the and .\n \n \n )\n }\n return null\n}\n","import React from \"react\"\nimport { Button, OAuthProviderLogo } from \"@fider/components\"\n\ninterface SocialSignInButtonProps {\n option: {\n displayName: string\n provider?: string\n url?: string\n logoBlobKey?: string\n logoURL?: string\n }\n className?: string\n redirectTo?: string\n}\n\nexport const SocialSignInButton = (props: SocialSignInButtonProps) => {\n const redirectTo = props.redirectTo || window.location.href\n const href = props.option.url ? `${props.option.url}?redirect=${redirectTo}` : undefined\n\n return (\n \n )\n}\n","import \"./SignInControl.scss\"\n\nimport React, { useState } from \"react\"\nimport { SocialSignInButton, Form, Button, Input, Message } from \"@fider/components\"\nimport { Divider } from \"@fider/components/layout\"\nimport { device, actions, Failure, isCookieEnabled } from \"@fider/services\"\nimport { useFider } from \"@fider/hooks\"\nimport { Trans } from \"@lingui/macro\"\n\ninterface SignInControlProps {\n useEmail: boolean\n redirectTo?: string\n onEmailSent?: (email: string) => void\n}\n\nexport const SignInControl: React.FunctionComponent = (props) => {\n const fider = useFider()\n const [showEmailForm, setShowEmailForm] = useState(fider.session.tenant ? fider.session.tenant.isEmailAuthAllowed : true)\n const [email, setEmail] = useState(\"\")\n const [error, setError] = useState(undefined)\n\n const forceShowEmailForm = (e: React.MouseEvent) => {\n e.preventDefault()\n setShowEmailForm(true)\n }\n\n const signIn = async () => {\n const result = await actions.signIn(email)\n if (result.ok) {\n setEmail(\"\")\n setError(undefined)\n if (props.onEmailSent) {\n props.onEmailSent(email)\n }\n } else if (result.error) {\n setError(result.error)\n }\n }\n\n const providersLen = fider.settings.oauth.length\n\n if (!isCookieEnabled()) {\n return (\n \n

    Cookies Required

    \n

    Cookies are not enabled on your browser. Please enable cookies in your browser preferences to continue.

    \n
    \n )\n }\n\n return (\n
    \n {providersLen > 0 && (\n <>\n
    \n {fider.settings.oauth.map((o) => (\n \n \n \n ))}\n
    \n {props.useEmail && }\n \n )}\n\n {props.useEmail &&\n (showEmailForm ? (\n
    \n

    \n Enter your email address to sign in\n

    \n
    \n \n Sign in\n \n }\n />\n \n {!fider.session.tenant.isEmailAuthAllowed && (\n

    \n Currently only allowed to sign in to an administrator account\n

    \n )}\n
    \n ) : (\n
    \n

    \n \n Email authentication has been disabled by an administrator. If you have an administrator account and need to bypass this restriction, please{\" \"}\n \n click here\n \n .\n \n

    \n
    \n ))}\n
    \n )\n}\n","import React from \"react\"\nimport { formatDate, timeSince } from \"@fider/services\"\n\ninterface MomentText {\n locale: string\n date: Date | string\n format?: \"relative\" | \"full\" | \"short\" | \"date\"\n}\n\nexport const Moment = (props: MomentText) => {\n if (!props.date) {\n return \n }\n\n const format = props.format || \"relative\"\n\n const now = new Date()\n const date = props.date instanceof Date ? props.date : new Date(props.date)\n const diff = (now.getTime() - date.getTime()) / (60 * 60 * 24 * 1000)\n const display =\n diff >= 365 && format === \"relative\"\n ? formatDate(props.locale, props.date, \"short\")\n : format === \"relative\"\n ? timeSince(props.locale, now, date)\n : format === \"date\"\n ? formatDate(props.locale, props.date, \"date\")\n : formatDate(props.locale, props.date, format)\n\n const tooltip = props.format === \"short\" ? formatDate(props.locale, props.date, \"full\") : undefined\n\n return (\n \n {display}\n \n )\n}\n","import \"./Modal.scss\"\n\nimport React, { useEffect, useRef } from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { classSet } from \"@fider/services\"\n\ninterface ModalWindowProps {\n className?: string\n isOpen: boolean\n size?: \"small\" | \"large\" | \"fluid\"\n canClose?: boolean\n center?: boolean\n onClose: () => void\n}\n\ninterface ModalFooterProps {\n align?: \"left\" | \"center\" | \"right\"\n children?: React.ReactNode\n}\n\nconst ModalWindow: React.FunctionComponent = (props) => {\n const root = useRef(document.getElementById(\"root-modal\"))\n\n useEffect(() => {\n if (props.isOpen) {\n document.body.style.overflow = \"hidden\"\n document.addEventListener(\"keydown\", keyDown, false)\n } else {\n document.body.style.overflow = \"\"\n document.removeEventListener(\"keydown\", keyDown, false)\n }\n }, [props.isOpen])\n\n const swallow = (evt: React.MouseEvent) => {\n evt.stopPropagation()\n }\n\n const keyDown = (event: KeyboardEvent) => {\n if (event.keyCode === 27) {\n // ESC\n close()\n }\n }\n\n const close = () => {\n if (props.canClose) {\n props.onClose()\n }\n }\n\n if (!props.isOpen || !root.current) {\n return null\n }\n\n const className = classSet({\n \"c-modal-window\": true,\n [`${props.className}`]: !!props.className,\n \"c-modal-window--center\": props.center,\n [`c-modal-window--${props.size}`]: true,\n })\n\n return ReactDOM.createPortal(\n
    \n
    \n
    \n {props.children}\n
    \n
    \n
    ,\n root.current\n )\n}\n\nModalWindow.defaultProps = {\n size: \"small\",\n canClose: true,\n center: true,\n}\n\nconst Header = (props: { children: React.ReactNode }) =>
    {props.children}
    \nconst Content = (props: { children: React.ReactNode }) =>
    {props.children}
    \nconst Footer = (props: ModalFooterProps) => {\n const align = props.align || \"right\"\n const className = classSet({\n \"c-modal-footer\": true,\n [`c-modal-footer--${align}`]: true,\n })\n return
    {props.children}
    \n}\n\nexport const Modal = {\n Window: ModalWindow,\n Header,\n Content,\n Footer,\n}\n","import \"./UserName.scss\"\n\nimport React from \"react\"\nimport { isCollaborator, UserRole } from \"@fider/models\"\nimport { classSet } from \"@fider/services\"\n\ninterface UserNameProps {\n user: {\n id: number\n name: string\n role?: UserRole\n email?: string\n }\n}\n\nexport const UserName = (props: UserNameProps) => {\n const isStaff = props.user.role && isCollaborator(props.user.role)\n const className = classSet({\n \"c-username\": true,\n \"c-username--staff\": isStaff,\n })\n\n return (\n
    \n {props.user.name || \"Anonymous\"}\n <>{props.user.email && ({props.user.email})}\n\n {isStaff && (\n
    \n \n \n \n
    \n )}\n
    \n )\n}\n","import \"./Loader.scss\"\n\nimport React, { useState } from \"react\"\nimport { useTimeout } from \"@fider/hooks\"\nimport { classSet } from \"@fider/services\"\n\ninterface LoaderProps {\n text?: string\n className?: string\n}\n\nexport function Loader(props: LoaderProps) {\n const [show, setShow] = useState(false)\n\n useTimeout(() => {\n setShow(true)\n }, 500)\n\n const className = classSet({\n \"c-loader\": true,\n [props.className || \"\"]: props.className,\n })\n\n return show ? (\n
    \n
    \n {props.text && {props.text}}\n
    \n ) : null\n}\n","import React from \"react\"\nimport { uploadedImageURL } from \"@fider/services\"\nimport { useFider } from \"@fider/hooks\"\nimport { Tenant } from \"@fider/models\"\n\ntype Size = 24 | 50 | 100 | 200\n\ninterface TenantLogoProps {\n size: Size\n useFiderIfEmpty?: boolean\n}\n\nexport const TenantLogoURL = (tenant: Tenant, size: Size): string | undefined => {\n if (tenant && tenant.logoBlobKey) {\n return uploadedImageURL(tenant.logoBlobKey, size)\n }\n return undefined\n}\n\nexport const TenantLogo = (props: TenantLogoProps) => {\n const fider = useFider()\n\n const tenant = fider.session.tenant\n if (tenant && tenant.logoBlobKey) {\n return {tenant.name}\n } else if (props.useFiderIfEmpty) {\n return \"Fider\"\n }\n return null\n}\n\nTenantLogo.defaultProps = {\n useFiderIfEmpty: false,\n}\n\ninterface OAuthProviderLogoProps {\n option: {\n provider?: string\n displayName: string\n logoBlobKey?: string\n }\n}\n\nconst systemProvidersLogo: { [key: string]: string } = {\n google: `data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDQwMCA0MDAiIGhlaWdodD0iNDAwcHgiIGlkPSJMYXllcl8xIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA0MDAgNDAwIiB3aWR0aD0iNDAwcHgiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM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xMDktMC45NzMgIGMxLjYwNSwwLjExMywyLjQ1MSwxLjY0OSwyLjQ1MSwxLjY0OWMxLjQyNywyLjQ0MywzLjc0MywxLjczNyw0LjY1NCwxLjMyOWMwLjE0Ni0xLjAzNCwwLjU2LTEuNzM5LDEuMDE3LTIuMTM5ICBjLTMuNTUyLTAuNDA0LTcuMjg2LTEuNzc2LTcuMjg2LTcuOTA2YzAtMS43NDcsMC42MjMtMy4xNzQsMS42NDYtNC4yOTJDNy4yOCwxMC40NjQsNi43Myw4LjgzNyw3LjYwMiw2LjYzNCAgYzAsMCwxLjM0My0wLjQzLDQuMzk4LDEuNjQxYzEuMjc2LTAuMzU1LDIuNjQ1LTAuNTMyLDQuMDA1LTAuNTM4YzEuMzU5LDAuMDA2LDIuNzI3LDAuMTgzLDQuMDA1LDAuNTM4ICBjMy4wNTUtMi4wNyw0LjM5Ni0xLjY0MSw0LjM5Ni0xLjY0MWMwLjg3MiwyLjIwMywwLjMyMywzLjgzLDAuMTU5LDQuMjM0YzEuMDIzLDEuMTE4LDEuNjQ0LDIuNTQ1LDEuNjQ0LDQuMjkyICBjMCw2LjE0Ni0zLjc0LDcuNDk4LTcuMzA0LDcuODkzQzE5LjQ3OSwyMy41NDgsMjAsMjQuNTA4LDIwLDI2YzAsMiwwLDMuOTAyLDAsNC40MjhjMCwwLjQyOCwwLjI1OCwwLjkwMSwxLjA3LDAuNzQ2ICBDMjcuNDIyLDI5LjA1NSwzMiwyMy4wNjIsMzIsMTUuOTk3QzMyLDcuMTYyLDI0LjgzOCwwLDE2LjAwMywweiIgZmlsbD0iIzE4MTYxNiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PGcvPjxnLz48Zy8+PGcvPjxnLz48Zy8+PC9zdmc+\",\n}\n\nexport const OAuthProviderLogoURL = (logoBlobKey?: string): string | undefined => {\n if (logoBlobKey) {\n return uploadedImageURL(logoBlobKey, 100)\n }\n return undefined\n}\n\nexport const OAuthProviderLogo = (props: OAuthProviderLogoProps) => {\n if (props.option.logoBlobKey) {\n return {props.option.displayName}\n }\n\n if (props.option.provider && props.option.provider in systemProvidersLogo) {\n return {props.option.displayName}\n }\n\n return null\n}\n","import \"./Toggle.scss\"\n\nimport React, { useState } from \"react\"\nimport { classSet } from \"@fider/services\"\nimport { HStack } from \"../layout\"\nimport { DisplayError, ValidationContext } from \"@fider/components\"\n\ninterface ToggleProps {\n field?: string\n label?: string\n active: boolean\n disabled?: boolean\n onToggle?: (active: boolean) => void\n}\n\nexport const Toggle: React.FC = (props) => {\n const [active, setActive] = useState(props.active)\n\n const toggle = () => {\n if (props.disabled) {\n return\n }\n\n const newActive = !active\n setActive(newActive)\n if (props.onToggle) {\n props.onToggle(newActive)\n }\n }\n\n const className = classSet({\n \"c-toggle\": true,\n \"c-toggle--enabled\": active,\n \"c-toggle--disabled\": !!props.disabled,\n })\n\n return (\n \n {(ctx) => (\n <>\n \n \n {props.label && {props.label}}\n \n {props.field && }\n \n )}\n \n )\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\n\nimport \"./PoweredByFider.scss\"\n\ninterface PoweredByFiderProps {\n slot: string\n className?: string\n}\n\nexport const PoweredByFider = (props: PoweredByFiderProps) => {\n const source = encodeURIComponent(window?.location?.host || \"\")\n const medium = \"powered-by\"\n const campaign = props.slot\n\n const className = classSet({\n \"c-powered\": true,\n [props.className || \"\"]: props.className,\n })\n\n return (\n \n )\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\n\ninterface PageTitleLogo {\n title: string\n subtitle?: string\n className?: string\n}\n\nexport const PageTitle = (props: PageTitleLogo) => {\n const className = classSet({\n \"mb-4\": true,\n [`${props.className}`]: props.className,\n })\n\n return (\n
    \n
    {props.title}
    \n
    {props.subtitle}
    \n
    \n )\n}\n","import \"./Dropdown.scss\"\n\nimport React, { createContext, useContext, useEffect, useRef, useState } from \"react\"\nimport { classSet } from \"@fider/services\"\n\ninterface DropdownListItemProps {\n href?: string\n onClick?: () => void\n className?: string\n children: React.ReactNode\n}\n\nconst ListItem = (props: DropdownListItemProps) => {\n const ctx = useContext(DropdownContext)\n const handleClick = () => {\n if (props.onClick) {\n props.onClick()\n }\n\n ctx?.close()\n }\n\n if (props.href) {\n return (\n \n {props.children}\n \n )\n }\n\n return (\n
    \n {props.children}\n
    \n )\n}\n\nconst Divider = () => {\n return
    \n}\n\ninterface DropdownProps {\n renderHandle: JSX.Element\n position?: \"left\" | \"right\"\n children: React.ReactNode\n}\n\ninterface DropdownContextFuncs {\n close(): void\n}\n\nconst DropdownContext = createContext(null)\nDropdownContext.displayName = \"DropdownContext\"\n\nexport const Dropdown = (props: DropdownProps) => {\n const node = useRef(null)\n const [isOpen, setIsOpen] = useState(false)\n const position = props.position || \"right\"\n\n const toggleIsOpen = () => {\n setIsOpen(!isOpen)\n }\n\n const close = () => {\n setIsOpen(false)\n }\n\n const handleClick = (e: MouseEvent) => {\n if (node.current && node.current.contains(e.target as Node)) {\n return\n }\n\n close()\n }\n\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleClick)\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClick)\n }\n }, [])\n\n const listClassName = classSet({\n \"c-dropdown__list shadow-lg\": true,\n [`c-dropdown__list--${position}`]: position === \"left\",\n })\n\n return (\n \n
    \n \n {isOpen &&
    {props.children}
    }\n
    \n
    \n )\n}\n\nDropdown.ListItem = ListItem\nDropdown.Divider = Divider\n","import React from \"react\"\n\ninterface MomentProps {\n locale: string\n amount: number\n currency: string\n}\n\nexport const Money = (props: MomentProps) => {\n const formatter = new Intl.NumberFormat(props.locale, {\n style: \"currency\",\n currency: props.currency,\n })\n\n return {formatter.format(props.amount)}\n}\n","import React, { useState, useEffect } from \"react\"\nimport { Modal, SignInControl, LegalFooter } from \"@fider/components\"\nimport { Button } from \"./common\"\nimport { Trans } from \"@lingui/macro\"\n\ninterface SignInModalProps {\n isOpen: boolean\n onClose: () => void\n}\n\nexport const SignInModal: React.StatelessComponent = (props) => {\n const [email, setEmail] = useState(\"\")\n\n useEffect(() => {\n if (email) {\n setTimeout(() => setEmail(\"\"), 5000)\n }\n }, [email])\n\n const onEmailSent = (value: string): void => {\n setEmail(value)\n }\n\n const closeModal = () => {\n setEmail(\"\")\n props.onClose()\n }\n\n const content = email ? (\n <>\n

    \n \n We have just sent a confirmation link to {email}. Click the link and you’ll be signed in.\n \n

    \n

    \n \n

    \n \n ) : (\n \n )\n\n return (\n \n \n Sign in to participate and vote\n \n {content}\n \n \n )\n}\n","import \"./VoteCounter.scss\"\n\nimport React, { useState } from \"react\"\nimport { Post, PostStatus } from \"@fider/models\"\nimport { actions, classSet } from \"@fider/services\"\nimport { Icon, SignInModal } from \"@fider/components\"\nimport { useFider } from \"@fider/hooks\"\nimport FaCaretUp from \"@fider/assets/images/fa-caretup.svg\"\n\ninterface VoteCounterProps {\n post: Post\n}\n\nexport const VoteCounter = (props: VoteCounterProps) => {\n const fider = useFider()\n const [hasVoted, setHasVoted] = useState(props.post.hasVoted)\n const [votesCount, setVotesCount] = useState(props.post.votesCount)\n const [isSignInModalOpen, setIsSignInModalOpen] = useState(false)\n\n const voteOrUndo = async () => {\n if (!fider.session.isAuthenticated) {\n setIsSignInModalOpen(true)\n return\n }\n\n const action = hasVoted ? actions.removeVote : actions.addVote\n\n const response = await action(props.post.number)\n if (response.ok) {\n setVotesCount(votesCount + (hasVoted ? -1 : 1))\n setHasVoted(!hasVoted)\n }\n }\n\n const hideModal = () => setIsSignInModalOpen(false)\n\n const status = PostStatus.Get(props.post.status)\n const isDisabled = status.closed || fider.isReadOnly\n\n const className = classSet({\n \"c-vote-counter__button\": true,\n \"c-vote-counter__button--voted\": !status.closed && hasVoted,\n \"c-vote-counter__button--disabled\": isDisabled,\n })\n\n const vote = (\n \n )\n\n const disabled = (\n \n )\n\n return (\n <>\n \n
    {isDisabled ? disabled : vote}
    \n \n )\n}\n","import \"./NotificationIndicator.scss\"\n\nimport React, { useEffect, useState } from \"react\"\nimport IconBell from \"@fider/assets/images/heroicons-bell.svg\"\nimport { useFider } from \"@fider/hooks\"\nimport { actions } from \"@fider/services\"\nimport { Icon } from \"./common\"\n\nexport const NotificationIndicator = () => {\n const fider = useFider()\n const [unreadNotifications, setUnreadNotifications] = useState(0)\n\n useEffect(() => {\n if (fider.session.isAuthenticated) {\n actions.getTotalUnreadNotifications().then((result) => {\n if (result.ok && result.data > 0) {\n setUnreadNotifications(result.data)\n }\n })\n }\n }, [fider.session.isAuthenticated])\n\n return (\n \n \n {unreadNotifications > 0 &&
    }\n \n )\n}\n","import React from \"react\"\nimport { useFider } from \"@fider/hooks\"\nimport { Avatar, Dropdown } from \"./common\"\nimport { Trans } from \"@lingui/macro\"\n\nexport const UserMenu = () => {\n const fider = useFider()\n\n return (\n
    \n }>\n
    {fider.session.user.name}
    \n \n My Settings\n \n \n\n {fider.session.user.isCollaborator && (\n <>\n
    \n Administration\n
    \n \n Site Settings\n \n \n \n )}\n \n Sign out\n \n
    \n
    \n )\n}\n","import React from \"react\"\nimport { useFider } from \"@fider/hooks\"\nimport { Message } from \"./common\"\n\nexport const ReadOnlyNotice = () => {\n const fider = useFider()\n if (!fider.isReadOnly) {\n return null\n }\n\n if (fider.session.isAuthenticated && fider.session.user.isAdministrator) {\n return (\n \n This website is currently in read-only mode because there is no active subscription. Visit{\" \"}\n \n Billing\n {\" \"}\n to subscribe.\n \n )\n }\n\n return (\n \n This website is currently in read-only mode.\n \n )\n}\n","import React from \"react\"\nimport { classSet } from \"@fider/services\"\n\ninterface StackProps {\n className?: string\n children: React.ReactNode\n onClick?: () => void\n center?: boolean\n divide?: boolean\n justify?: \"between\" | \"evenly\" | \"full\" | \"center\"\n spacing?: 0 | 1 | 2 | 4 | 6 | 8\n}\n\nconst Stack = (props: StackProps, dir: \"x\" | \"y\") => {\n const spacing = props.spacing === undefined ? 1 : props.spacing\n const className = classSet({\n [`${props.className}`]: props.className,\n flex: true,\n \"flex-x\": dir === \"x\",\n \"flex-y\": dir === \"y\",\n [`flex--spacing-${spacing}`]: spacing > 0 && !props.divide,\n [`flex--divide-${spacing}`]: spacing > 0 && !!props.divide,\n \"flex-items-center\": dir === \"x\" && props.center !== false,\n \"justify-between\": props.justify === \"between\",\n \"justify-evenly\": props.justify === \"evenly\",\n \"justify-full\": props.justify === \"full\",\n \"justify-center\": props.justify === \"center\",\n })\n\n return (\n
    \n {props.children}\n
    \n )\n}\n\nexport const HStack = (props: StackProps) => {\n return Stack(props, \"x\")\n}\n\nexport const VStack = (props: StackProps) => {\n return Stack(props, \"y\")\n}\n","import \"./Divider.scss\"\n\nimport React from \"react\"\nimport { Trans } from \"@lingui/macro\"\n\nexport const Divider = () => {\n return (\n
    \n OR\n
    \n )\n}\n","import { User } from \"./identity\"\n\nexport interface Post {\n id: number\n number: number\n slug: string\n title: string\n description: string\n createdAt: string\n status: string\n user: User\n hasVoted: boolean\n response: PostResponse | null\n votesCount: number\n commentsCount: number\n tags: string[]\n}\n\nexport class PostStatus {\n constructor(public title: string, public value: string, public show: boolean, public closed: boolean, public filterable: boolean) {}\n\n public static Open = new PostStatus(\"Open\", \"open\", false, false, false)\n public static Planned = new PostStatus(\"Planned\", \"planned\", true, false, true)\n public static Started = new PostStatus(\"Started\", \"started\", true, false, true)\n public static Completed = new PostStatus(\"Completed\", \"completed\", true, true, true)\n public static Declined = new PostStatus(\"Declined\", \"declined\", true, true, true)\n public static Duplicate = new PostStatus(\"Duplicate\", \"duplicate\", true, true, false)\n public static Deleted = new PostStatus(\"Deleted\", \"deleted\", false, true, false)\n\n public static Get(value: string): PostStatus {\n for (const status of PostStatus.All) {\n if (status.value === value) {\n return status\n }\n }\n throw new Error(`PostStatus not found for value ${value}.`)\n }\n\n public static All = [PostStatus.Open, PostStatus.Planned, PostStatus.Started, PostStatus.Completed, PostStatus.Duplicate, PostStatus.Declined]\n}\n\nexport interface PostResponse {\n user: User\n text: string\n respondedAt: Date\n original?: {\n number: number\n title: string\n slug: string\n status: string\n }\n}\n\nexport interface Comment {\n id: number\n content: string\n createdAt: string\n user: User\n attachments?: string[]\n editedAt?: string\n editedBy?: User\n}\n\nexport interface Tag {\n id: number\n slug: string\n name: string\n color: string\n isPublic: boolean\n}\n\nexport interface Vote {\n createdAt: Date\n user: {\n id: number\n name: string\n email: string\n avatarURL: string\n }\n}\n","export interface Tenant {\n id: number\n name: string\n cname: string\n subdomain: string\n locale: string\n invitation: string\n welcomeMessage: string\n status: TenantStatus\n isPrivate: boolean\n logoBlobKey: string\n isEmailAuthAllowed: boolean\n}\n\nexport enum TenantStatus {\n Active = 1,\n Pending = 2,\n Locked = 3,\n Disabled = 4,\n}\n\nexport interface User {\n id: number\n name: string\n email?: string\n role: UserRole\n status: UserStatus\n avatarURL: string\n}\n\nexport enum UserAvatarType {\n Letter = \"letter\",\n Gravatar = \"gravatar\",\n Custom = \"custom\",\n}\n\nexport enum UserStatus {\n Active = \"active\",\n Deleted = \"deleted\",\n Blocked = \"blocked\",\n}\n\nexport enum UserRole {\n Visitor = \"visitor\",\n Collaborator = \"collaborator\",\n Administrator = \"administrator\",\n}\n\nexport const isCollaborator = (role: UserRole): boolean => {\n return role === UserRole.Collaborator || role === UserRole.Administrator\n}\n\nexport interface CurrentUser {\n id: number\n name: string\n email: string\n avatarType: UserAvatarType\n avatarBlobKey: string\n avatarURL: string\n role: UserRole\n status: UserStatus\n isAdministrator: boolean\n isCollaborator: boolean\n}\n","export interface OAuthProviderOption {\n provider: string\n displayName: string\n clientID: string\n url: string\n callbackURL: string\n logoBlobKey: string\n isCustomProvider: boolean\n isEnabled: boolean\n}\n\nexport interface SystemSettings {\n mode: string\n locale: string\n version: string\n environment: string\n domain: string\n hasLegal: boolean\n isBillingEnabled: boolean\n baseURL: string\n assetsURL: string\n oauth: OAuthProviderOption[]\n}\n\nexport interface UserSettings {\n [key: string]: string\n}\n\nexport const OAuthConfigStatus = {\n Disabled: 1,\n Enabled: 2,\n}\n\nexport interface OAuthConfig {\n provider: string\n displayName: string\n status: number\n clientID: string\n clientSecret: string\n authorizeURL: string\n tokenURL: string\n profileURL: string\n logoBlobKey: string\n scope: string\n jsonUserIDPath: string\n jsonUserNamePath: string\n jsonUserEmailPath: string\n isTrusted: boolean\n}\n\nexport interface ImageUpload {\n bkey?: string\n upload?: {\n fileName?: string\n content?: string\n contentType?: string\n }\n remove: boolean\n}\n\nexport enum EmailVerificationKind {\n SignIn = 1,\n SignUp = 2,\n ChangeEmail = 3,\n UserInvitation = 4,\n}\n","export enum BillingStatus {\n Trial = 1,\n Active = 2,\n Cancelled = 3,\n FreeForever = 4,\n OpenCollective = 5,\n}\n","import { StringObject } from \"@fider/services\"\n\nexport interface WebhookData {\n name: string\n type: WebhookType\n status: WebhookStatus\n url: string\n content: string\n http_method: string\n http_headers: HttpHeaders\n}\n\nexport interface Webhook extends WebhookData {\n id: number\n}\n\nexport enum WebhookType {\n NEW_POST = \"new_post\",\n NEW_COMMENT = \"new_comment\",\n CHANGE_STATUS = \"change_status\",\n DELETE_POST = \"delete_post\",\n}\n\nexport enum WebhookStatus {\n ENABLED = \"enabled\",\n DISABLED = \"disabled\",\n FAILED = \"failed\",\n}\n\nexport type HttpHeaders = StringObject\n\nexport interface WebhookTriggerResult {\n webhook: Webhook\n props: StringObject\n success: boolean\n url: string\n content: string\n status_code: number\n message: string\n error: string\n}\n\nexport interface WebhookPreviewResult {\n url: PreviewedField\n content: PreviewedField\n}\n\nexport interface PreviewedField {\n value: string\n message: string\n error: string\n}\n","import { analytics, notify, truncate } from \"@fider/services\"\n\nexport interface ErrorItem {\n field?: string\n message: string\n}\n\nexport interface Failure {\n errors?: ErrorItem[]\n}\n\nexport interface Result {\n ok: boolean\n data: T\n error?: Failure\n}\n\nasync function toResult(response: Response): Promise> {\n const body = await response.json()\n\n if (response.status < 400) {\n return {\n ok: true,\n data: body as T,\n }\n }\n\n if (response.status === 500) {\n notify.error(\"An unexpected error occurred while processing your request.\")\n } else if (response.status === 401) {\n notify.error(\"You need to be authenticated to perform this operation.\")\n } else if (response.status === 403) {\n notify.error(\"You are not authorized to perform this operation.\")\n }\n\n return {\n ok: false,\n data: body as T,\n error: {\n errors: body.errors,\n },\n }\n}\nasync function request(url: string, method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\", body?: any): Promise> {\n const headers = [\n [\"Accept\", \"application/json\"],\n [\"Content-Type\", \"application/json\"],\n ]\n try {\n const response = await fetch(url, {\n method,\n headers,\n body: JSON.stringify(body),\n credentials: \"same-origin\",\n })\n return await toResult(response)\n } catch (err) {\n const truncatedBody = truncate(body ? JSON.stringify(body) : \"\", 1000)\n throw new Error(`Failed to ${method} ${url} with body '${truncatedBody}'`)\n }\n}\n\nexport const http = {\n get: async (url: string): Promise> => {\n return await request(url, \"GET\")\n },\n post: async (url: string, body?: any): Promise> => {\n return await request(url, \"POST\", body)\n },\n put: async (url: string, body?: any): Promise> => {\n return await request(url, \"PUT\", body)\n },\n delete: async (url: string, body?: any): Promise> => {\n return await request(url, \"DELETE\", body)\n },\n event:\n (category: string, action: string) =>\n (result: Result): Result => {\n if (result && result.ok) {\n analytics.event(category, action)\n }\n return result\n },\n}\n","const set = (storage: Storage, key: string, value: string): void => {\n if (storage) {\n storage.setItem(key, value)\n }\n}\n\nconst get = (storage: Storage, key: string): string | null => {\n if (window.localStorage) {\n return storage.getItem(key)\n }\n return null\n}\n\nconst has = (storage: Storage, key: string): boolean => {\n if (storage) {\n return !!storage.getItem(key)\n }\n return false\n}\n\nconst remove = (storage: Storage, ...keys: string[]): void => {\n if (storage && keys) {\n for (const key of keys) {\n storage.removeItem(key)\n }\n }\n}\n\nexport const cache = {\n local: {\n set: (key: string, value: string): void => {\n set(window.localStorage, key, value)\n },\n get: (key: string): string | null => {\n return get(window.localStorage, key)\n },\n has: (key: string): boolean => {\n return has(window.localStorage, key)\n },\n remove: (...keys: string[]): void => {\n remove(window.localStorage, ...keys)\n },\n },\n session: {\n set: (key: string, value: string): void => {\n set(window.sessionStorage, key, value)\n },\n get: (key: string): string | null => {\n return get(window.sessionStorage, key)\n },\n has: (key: string): boolean => {\n return has(window.sessionStorage, key)\n },\n remove: (...keys: string[]): void => {\n remove(window.sessionStorage, ...keys)\n },\n },\n}\n","export const analytics = {\n event: (eventCategory: string, eventAction: string): void => {\n if (window.ga) {\n window.ga(\"send\", \"event\", {\n eventCategory,\n eventAction,\n })\n }\n },\n error: (err?: Error): void => {\n if (window.ga) {\n window.ga(\"send\", \"exception\", {\n exDescription: err ? err.stack : \"\",\n exFatal: false,\n })\n }\n },\n}\n","import { createContext } from \"react\"\nimport { CurrentUser, SystemSettings, Tenant, TenantStatus } from \"@fider/models\"\n\nexport class FiderSession {\n private pPage: string\n private pContextID: string\n private pTenant: Tenant\n private pUser: CurrentUser | undefined\n private pProps: { [key: string]: any } = {}\n\n constructor(data: any) {\n this.pPage = data.page\n this.pContextID = data.contextID\n this.pProps = data.props\n this.pUser = data.user\n this.pTenant = data.tenant\n }\n\n public get page(): string {\n return this.pPage\n }\n\n public get contextID(): string {\n return this.pContextID\n }\n\n public get user(): CurrentUser {\n if (!this.pUser) throw new Error(\"User is undefined\")\n return this.pUser\n }\n\n public get tenant(): Tenant {\n return this.pTenant\n }\n\n public get props(): { [key: string]: any } {\n return this.pProps\n }\n\n public get isAuthenticated(): boolean {\n return !!this.pUser\n }\n}\n\nexport class FiderImpl {\n private pSettings!: SystemSettings\n private pSession!: FiderSession\n\n public initialize = (initData?: any): FiderImpl => {\n if (initData) {\n this.pSettings = initData.settings\n this.pSession = new FiderSession(initData)\n return this\n }\n\n const el = document.getElementById(\"server-data\")\n const data = el ? JSON.parse(el.textContent || el.innerText) : {}\n this.pSettings = data.settings\n this.pSession = new FiderSession(data)\n return this\n }\n\n public get currentLocale(): string {\n if (this.session.tenant) {\n return this.session.tenant.locale\n }\n return this.settings.locale\n }\n\n public get session(): FiderSession {\n return this.pSession\n }\n\n public get settings(): SystemSettings {\n return this.pSettings\n }\n\n public get isReadOnly(): boolean {\n return this.session.tenant && this.session.tenant.status === TenantStatus.Locked\n }\n\n public isProduction(): boolean {\n return this.pSettings.environment === \"production\"\n }\n\n public isSingleHostMode(): boolean {\n return this.pSettings.mode === \"single\"\n }\n}\n\nexport const Fider = new FiderImpl()\n\nexport const FiderContext = createContext(Fider)\n","export const jwt = {\n decode: (token: string): any => {\n if (token) {\n const segments = token.split(\".\")\n try {\n return JSON.parse(window.atob(segments[1]))\n } catch {\n return undefined\n }\n }\n },\n}\n","import { Fider } from \".\"\n\nexport const delay = (ms: number) => {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\nexport const classSet = (input?: any): string => {\n let classes = \"\"\n if (input) {\n for (const key in input) {\n if (key && !!input[key]) {\n classes += ` ${key}`\n }\n }\n return classes.trim()\n }\n return \"\"\n}\n\ntype DateFormat = \"full\" | \"short\" | \"date\"\ntype DateOptsMap = {\n [key in DateFormat]: Intl.DateTimeFormatOptions\n}\n\nconst dateOpts: DateOptsMap = {\n date: { day: \"numeric\", month: \"short\", year: \"numeric\" },\n short: { month: \"short\", year: \"numeric\" },\n full: { day: \"2-digit\", month: \"long\", year: \"numeric\", hour: \"numeric\", minute: \"numeric\" },\n}\n\nexport const formatDate = (locale: string, input: Date | string, format: DateFormat = \"full\"): string => {\n const date = input instanceof Date ? input : new Date(input)\n\n try {\n return new Intl.DateTimeFormat(locale, dateOpts[format]).format(date)\n } catch {\n return date.toLocaleString(locale)\n }\n}\n\nexport const timeSince = (locale: string, now: Date, date: Date): string => {\n try {\n const seconds = Math.round((now.getTime() - date.getTime()) / 1000)\n const minutes = Math.round(seconds / 60)\n const hours = Math.round(minutes / 60)\n const days = Math.round(hours / 24)\n const months = Math.round(days / 30)\n const years = Math.round(days / 365)\n\n const rtf = new Intl.RelativeTimeFormat(locale, { numeric: \"auto\" })\n return (\n (seconds < 60 && rtf.format(-1 * seconds, \"seconds\")) ||\n (minutes < 60 && rtf.format(-1 * minutes, \"minutes\")) ||\n (hours < 24 && rtf.format(-1 * hours, \"hours\")) ||\n (days < 30 && rtf.format(-1 * days, \"days\")) ||\n (days < 365 && rtf.format(-1 * months, \"months\")) ||\n rtf.format(-1 * years, \"years\")\n )\n } catch {\n return formatDate(locale, date, \"short\")\n }\n}\n\nexport const fileToBase64 = async (file: File): Promise => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader()\n reader.addEventListener(\n \"load\",\n () => {\n const parts = (reader.result as string).split(\"base64,\")\n resolve(parts[1])\n },\n false\n )\n\n reader.addEventListener(\n \"error\",\n () => {\n reject(reader.error)\n },\n false\n )\n\n reader.readAsDataURL(file)\n })\n}\n\nexport const timeAgo = (date: string | Date): number => {\n const d = date instanceof Date ? date : new Date(date)\n return (new Date().getTime() - d.getTime()) / 1000\n}\n\nexport const isCookieEnabled = (): boolean => {\n try {\n document.cookie = \"cookietest=1\"\n const ret = document.cookie.indexOf(\"cookietest=\") !== -1\n document.cookie = \"cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT\"\n return ret\n } catch (e) {\n return false\n }\n}\n\nexport const uploadedImageURL = (bkey: string | undefined, size?: number): string | undefined => {\n if (bkey) {\n if (size) {\n return `${Fider.settings.assetsURL}/static/images/${bkey}?size=${size}`\n }\n return `${Fider.settings.assetsURL}/static/images/${bkey}`\n }\n return undefined\n}\n\nexport const truncate = (input: string, maxLength: number): string => {\n if (input && input.length > maxLength) {\n return `${input.substr(0, maxLength)}...`\n }\n return input\n}\n\nexport type StringObject = {\n [key: string]: T\n}\n\nexport const copyToClipboard = (text: string): Promise => {\n if (window.navigator && window.navigator.clipboard && window.navigator.clipboard.writeText) {\n return window.navigator.clipboard.writeText(text)\n }\n return Promise.reject(new Error(\"Clipboard API not available\"))\n}\n\nexport const clearUrlHash = (replace?: boolean) => {\n const oldURL = window.location.href\n const newURL = window.location.pathname + window.location.search\n if (replace) {\n window.history.replaceState(\"\", document.title, newURL)\n } else {\n window.history.pushState(\"\", document.title, newURL)\n }\n // Trigger event manually\n const hashChangeEvent = new HashChangeEvent(\"hashchange\", {\n oldURL,\n newURL,\n cancelable: true,\n bubbles: true,\n composed: false,\n })\n if (!window.dispatchEvent(hashChangeEvent)) {\n // Event got cancelled\n window.history.replaceState(\"\", document.title, oldURL)\n }\n}\n","import { i18n, I18n } from \"@lingui/core\"\nimport { en, pt, fr, el, de, se, pl, ru, sk, nl, es, tr } from \"make-plural/plurals\"\n\nexport function activateI18NSync(locale: string, messages?: any): I18n {\n i18n.loadLocaleData(\"en\", { plurals: en })\n i18n.loadLocaleData(\"pt-BR\", { plurals: pt })\n i18n.loadLocaleData(\"sv-SE\", { plurals: se })\n i18n.loadLocaleData(\"es-ES\", { plurals: es })\n i18n.loadLocaleData(\"el\", { plurals: el })\n i18n.loadLocaleData(\"nl\", { plurals: nl })\n i18n.loadLocaleData(\"de\", { plurals: de })\n i18n.loadLocaleData(\"fr\", { plurals: fr })\n i18n.loadLocaleData(\"pl\", { plurals: pl })\n i18n.loadLocaleData(\"ru\", { plurals: ru })\n i18n.loadLocaleData(\"sk\", { plurals: sk })\n i18n.loadLocaleData(\"tr\", { plurals: tr })\n i18n.load(locale, messages)\n i18n.activate(locale)\n return i18n\n}\n\nexport async function activateI18N(locale: string): Promise {\n try {\n const content = await import(\n /* webpackChunkName: \"locale-[request]\" */\n `@locale/${locale}/client.json`\n )\n return activateI18NSync(locale, content.messages)\n } catch (err) {\n console.error(err)\n return activateI18NSync(locale)\n }\n}\n","import { marked } from \"marked\"\nimport DOMPurify from \"dompurify\"\n\nmarked.setOptions({\n headerIds: false,\n xhtml: true,\n smartLists: true,\n gfm: true,\n breaks: true,\n})\n\nif (DOMPurify.isSupported) {\n DOMPurify.setConfig({\n USE_PROFILES: {\n html: true,\n },\n ADD_ATTR: [\"target\"],\n })\n}\n\nconst link = (href: string, title: string, text: string) => {\n const titleAttr = title ? ` title=${title}` : \"\"\n return `${text}`\n}\n\nconst fullRenderer = new marked.Renderer()\nfullRenderer.image = () => \"\"\nfullRenderer.link = link\n\nconst plainTextRenderer = new marked.Renderer()\nplainTextRenderer.link = (_href, _title, text) => text\nplainTextRenderer.image = () => \"\"\nplainTextRenderer.br = () => \" \"\nplainTextRenderer.strong = (text) => text\nplainTextRenderer.list = (body) => body\nplainTextRenderer.listitem = (text) => `${text} `\nplainTextRenderer.heading = (text) => text\nplainTextRenderer.paragraph = (text) => ` ${text} `\nplainTextRenderer.code = (code) => code\nplainTextRenderer.codespan = (code) => code\nplainTextRenderer.html = (html) => html\nplainTextRenderer.del = (text) => text\n\nconst entities: { [key: string]: string } = {\n \"<\": \"<\",\n \">\": \">\",\n}\n\nconst encodeHTML = (s: string) => s.replace(/[<>]/g, (tag) => entities[tag] || tag)\nconst sanitize = (input: string) => (DOMPurify.isSupported ? DOMPurify.sanitize(input) : input)\n\nexport const full = (input: string): string => {\n return sanitize(marked(encodeHTML(input), { renderer: fullRenderer }).trim())\n}\n\nexport const plainText = (input: string): string => {\n return sanitize(marked(encodeHTML(input), { renderer: plainTextRenderer }).trim())\n}\n","const toastify = () => import(/* webpackChunkName: \"toastify\" */ \"./toastify\")\n\nexport const success = (content: string | JSX.Element) => {\n return toastify().then((toast) => {\n toast.success(content)\n })\n}\n\nexport const error = (content: string | JSX.Element) => {\n return toastify().then((toast) => {\n toast.error(content)\n })\n}\n","import { Fider } from \"@fider/services\"\n\nconst navigator = {\n url: () => {\n return window.location.href\n },\n goHome: () => {\n window.location.href = \"/\"\n },\n goTo: (url: string) => {\n const isEqual = window.location.href === url || window.location.pathname === url\n if (!isEqual) {\n window.location.href = url\n }\n },\n replaceState: (path: string): void => {\n if (history.replaceState !== undefined) {\n const newURL = Fider.settings.baseURL + path\n window.history.replaceState({ path: newURL }, \"\", newURL)\n }\n },\n}\n\nexport default navigator\n","import navigator from \"./navigator\"\n\nexport const getNumber = (name: string): number | undefined => {\n return parseInt(get(name), 10) || undefined\n}\n\nexport const set = (name: string, value: any): string => {\n const uri = navigator.url()\n const re = new RegExp(\"([?&])\" + name + \"=.*?(&|$)\", \"i\")\n if (uri.match(re)) {\n return uri.replace(re, \"$1\" + name + \"=\" + value + \"$2\")\n } else {\n const separator = uri.indexOf(\"?\") !== -1 ? \"&\" : \"?\"\n return uri + separator + name + \"=\" + value\n }\n}\n\nexport const get = (name: string): string => {\n name = name.replace(/[[\\]]/g, \"\\\\$&\")\n const regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\")\n const results = regex.exec(navigator.url())\n\n if (!results || !results[2]) {\n return \"\"\n }\n\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"))\n}\n\nexport const getArray = (name: string): string[] => {\n const qs = get(name)\n if (qs) {\n return qs.split(\",\").filter((i) => i)\n }\n\n return []\n}\n\nexport interface QueryString {\n [key: string]: string | string[] | number | undefined\n}\n\nexport const stringify = (object: QueryString | undefined): string => {\n if (!object) {\n return \"\"\n }\n\n let qs = \"\"\n\n for (const key of Object.keys(object)) {\n const symbol = qs ? \"&\" : \"?\"\n const value = object[key]\n if (value instanceof Array) {\n if (value.length > 0) {\n qs += `${symbol}${key}=${value.join(\",\")}`\n }\n } else if (value) {\n qs += `${symbol}${key}=${encodeURIComponent(value.toString()).replace(/%20/g, \"+\")}`\n }\n }\n\n return qs\n}\n","export const isTouch = (): boolean => {\n return \"ontouchstart\" in window || navigator.maxTouchPoints > 0\n}\n","import { http, Result } from \"@fider/services/http\"\nimport { UserSettings, UserAvatarType, ImageUpload } from \"@fider/models\"\n\ninterface UpdateUserSettings {\n name: string\n avatar?: ImageUpload\n avatarType: UserAvatarType\n settings: UserSettings\n}\n\nexport const updateUserSettings = async (request: UpdateUserSettings): Promise => {\n return await http.post(\"/_api/user/settings\", request)\n}\n\nexport const changeUserEmail = async (email: string): Promise => {\n return await http.post(\"/_api/user/change-email\", {\n email,\n })\n}\n\nexport const deleteCurrentAccount = async (): Promise => {\n return await http.delete(\"/_api/user\")\n}\n\nexport const regenerateAPIKey = async (): Promise> => {\n return await http.post<{ apiKey: string }>(\"/_api/user/regenerate-apikey\")\n}\n","import { http, Result } from \"@fider/services/http\"\nimport { Tag } from \"@fider/models\"\n\nexport const createTag = async (name: string, color: string, isPublic: boolean): Promise> => {\n return http.post(`/api/v1/tags`, { name, color, isPublic }).then(http.event(\"tag\", \"create\"))\n}\n\nexport const updateTag = async (slug: string, name: string, color: string, isPublic: boolean): Promise> => {\n return http.put(`/api/v1/tags/${slug}`, { name, color, isPublic }).then(http.event(\"tag\", \"update\"))\n}\n\nexport const deleteTag = async (slug: string): Promise => {\n return http.delete(`/api/v1/tags/${slug}`).then(http.event(\"tag\", \"delete\"))\n}\n\nexport const assignTag = async (slug: string, postNumber: number): Promise => {\n return http.post(`/api/v1/posts/${postNumber}/tags/${slug}`).then(http.event(\"tag\", \"assign\"))\n}\n\nexport const unassignTag = async (slug: string, postNumber: number): Promise => {\n return http.delete(`/api/v1/posts/${postNumber}/tags/${slug}`).then(http.event(\"tag\", \"unassign\"))\n}\n","import { http, Result, querystring } from \"@fider/services\"\nimport { Post, Vote, ImageUpload } from \"@fider/models\"\n\nexport const getAllPosts = async (): Promise> => {\n return await http.get(\"/api/v1/posts\")\n}\n\nexport interface SearchPostsParams {\n query?: string\n view?: string\n limit?: number\n tags?: string[]\n}\n\nexport const searchPosts = async (params: SearchPostsParams): Promise> => {\n return await http.get(\n `/api/v1/posts${querystring.stringify({\n tags: params.tags,\n query: params.query,\n view: params.view,\n limit: params.limit,\n })}`\n )\n}\n\nexport const deletePost = async (postNumber: number, text: string): Promise => {\n return http\n .delete(`/api/v1/posts/${postNumber}`, {\n text,\n })\n .then(http.event(\"post\", \"delete\"))\n}\n\nexport const addVote = async (postNumber: number): Promise => {\n return http.post(`/api/v1/posts/${postNumber}/votes`).then(http.event(\"post\", \"vote\"))\n}\n\nexport const removeVote = async (postNumber: number): Promise => {\n return http.delete(`/api/v1/posts/${postNumber}/votes`).then(http.event(\"post\", \"unvote\"))\n}\n\nexport const subscribe = async (postNumber: number): Promise => {\n return http.post(`/api/v1/posts/${postNumber}/subscription`).then(http.event(\"post\", \"subscribe\"))\n}\n\nexport const unsubscribe = async (postNumber: number): Promise => {\n return http.delete(`/api/v1/posts/${postNumber}/subscription`).then(http.event(\"post\", \"unsubscribe\"))\n}\n\nexport const listVotes = async (postNumber: number): Promise> => {\n return http.get(`/api/v1/posts/${postNumber}/votes`)\n}\n\nexport const createComment = async (postNumber: number, content: string, attachments: ImageUpload[]): Promise => {\n return http.post(`/api/v1/posts/${postNumber}/comments`, { content, attachments }).then(http.event(\"comment\", \"create\"))\n}\n\nexport const updateComment = async (postNumber: number, commentID: number, content: string, attachments: ImageUpload[]): Promise => {\n return http.put(`/api/v1/posts/${postNumber}/comments/${commentID}`, { content, attachments }).then(http.event(\"comment\", \"update\"))\n}\n\nexport const deleteComment = async (postNumber: number, commentID: number): Promise => {\n return http.delete(`/api/v1/posts/${postNumber}/comments/${commentID}`).then(http.event(\"comment\", \"delete\"))\n}\n\ninterface SetResponseInput {\n status: string\n text: string\n originalNumber: number\n}\n\nexport const respond = async (postNumber: number, input: SetResponseInput): Promise => {\n return http\n .put(`/api/v1/posts/${postNumber}/status`, {\n status: input.status,\n text: input.text,\n originalNumber: input.originalNumber,\n })\n .then(http.event(\"post\", \"respond\"))\n}\n\ninterface CreatePostResponse {\n id: number\n number: number\n title: string\n slug: string\n}\n\nexport const createPost = async (title: string, description: string, attachments: ImageUpload[]): Promise> => {\n return http.post(`/api/v1/posts`, { title, description, attachments }).then(http.event(\"post\", \"create\"))\n}\n\nexport const updatePost = async (postNumber: number, title: string, description: string, attachments: ImageUpload[]): Promise => {\n return http.put(`/api/v1/posts/${postNumber}`, { title, description, attachments }).then(http.event(\"post\", \"update\"))\n}\n","import { http, Result } from \"@fider/services/http\"\nimport { UserRole, OAuthConfig, ImageUpload, EmailVerificationKind } from \"@fider/models\"\n\nexport interface CheckAvailabilityResponse {\n message: string\n}\n\nexport interface CreateTenantRequest {\n legalAgreement: boolean\n tenantName: string\n subdomain?: string\n name?: string\n token?: string\n email?: string\n}\n\nexport interface CreateTenantResponse {\n token?: string\n}\n\nexport const createTenant = async (request: CreateTenantRequest): Promise> => {\n return await http.post(\"/_api/tenants\", request)\n}\n\nexport interface UpdateTenantSettingsRequest {\n logo?: ImageUpload\n title: string\n invitation: string\n welcomeMessage: string\n cname: string\n locale: string\n}\n\nexport const updateTenantSettings = async (request: UpdateTenantSettingsRequest): Promise => {\n return await http.post(\"/_api/admin/settings/general\", request)\n}\n\nexport const updateTenantAdvancedSettings = async (customCSS: string): Promise => {\n return await http.post(\"/_api/admin/settings/advanced\", { customCSS })\n}\n\nexport const updateTenantPrivacy = async (isPrivate: boolean): Promise => {\n return await http.post(\"/_api/admin/settings/privacy\", {\n isPrivate,\n })\n}\n\nexport const updateTenantEmailAuthAllowed = async (isEmailAuthAllowed: boolean): Promise => {\n return await http.post(\"/_api/admin/settings/emailauth\", {\n isEmailAuthAllowed,\n })\n}\n\nexport const checkAvailability = async (subdomain: string): Promise> => {\n return await http.get(`/_api/tenants/${subdomain}/availability`)\n}\n\nexport const signIn = async (email: string): Promise => {\n return await http.post(\"/_api/signin\", {\n email,\n })\n}\n\nexport const completeProfile = async (kind: EmailVerificationKind, key: string, name: string): Promise => {\n return await http.post(\"/_api/signin/complete\", {\n kind,\n key,\n name,\n })\n}\n\nexport const changeUserRole = async (userID: number, role: UserRole): Promise => {\n return await http.post(`/_api/admin/roles/${role}/users`, {\n userID,\n })\n}\n\nexport const blockUser = async (userID: number): Promise => {\n return await http.put(`/_api/admin/users/${userID}/block`)\n}\n\nexport const unblockUser = async (userID: number): Promise => {\n return await http.delete(`/_api/admin/users/${userID}/block`)\n}\n\nexport const getOAuthConfig = async (provider: string): Promise> => {\n return await http.get(`/_api/admin/oauth/${provider}`)\n}\n\nexport interface CreateEditOAuthConfigRequest {\n provider: string\n status: number\n displayName: string\n clientID: string\n clientSecret: string\n authorizeURL: string\n tokenURL: string\n scope: string\n profileURL: string\n jsonUserIDPath: string\n jsonUserNamePath: string\n jsonUserEmailPath: string\n logo?: ImageUpload\n isTrusted: boolean\n}\n\nexport const saveOAuthConfig = async (request: CreateEditOAuthConfigRequest): Promise => {\n return await http.post(\"/_api/admin/oauth\", request)\n}\n","import { http, Result } from \"@fider/services\"\n\nexport const getTotalUnreadNotifications = async (): Promise> => {\n return http.get<{ total: number }>(\"/_api/notifications/unread/total\").then((result) => {\n return {\n ok: result.ok,\n error: result.error,\n data: result.data ? result.data.total : 0,\n }\n })\n}\n\nexport const markAllAsRead = async (): Promise => {\n return await http.post(\"/_api/notifications/read-all\")\n}\n","import { http, Result } from \"@fider/services\"\n\nexport const sendInvites = async (subject: string, message: string, recipients: string[]): Promise => {\n return http.post(\"/api/v1/invitations/send\", { subject, message, recipients }).then(http.event(\"invite\", \"send\"))\n}\n\nexport const sendSampleInvite = async (subject: string, message: string): Promise => {\n return http.post(\"/api/v1/invitations/sample\", { subject, message }).then(http.event(\"invite\", \"sample\"))\n}\n","import { http, Result, navigator, analytics } from \"@fider/services\"\n\nconst ignoreErrors = [\n \"http://gj.track.uc.cn/collect\", // CSP error: UC Browser tries to use sendBeacon to this domain, which is blocked by our CSP rule\n \"null is not an object (evaluating 'c.sheet.insertRule')\", // CSP error: UC Browser throws this error even when page is loaded sucessfully\n \"Refused to evaluate a string as JavaScript because 'unsafe-eval'\", // CSP error: usually thrown because of bad Chrome Extensions\n \"vid_mate_check is not defined\", // CSP error: thrown by VidMate, an Android Browser\n \"SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules\", // CSP error: usually thrown because of bad Chrome Extensions\n]\n\nexport const logError = async (message: string, err?: Error): Promise => {\n for (const pattern of ignoreErrors) {\n if (message.indexOf(pattern) >= 0) {\n return\n }\n }\n\n const data = {\n url: navigator.url(),\n stack: err ? err.stack : \"\",\n }\n\n try {\n analytics.error(err)\n return await http.post(\"/_api/log-error\", { message, data })\n } catch (err) {\n console.error(err)\n }\n}\n","import { http, Result, StringObject } from \"@fider/services\"\nimport { WebhookData, WebhookPreviewResult, WebhookTriggerResult, WebhookType } from \"@fider/models\"\n\nexport const createWebhook = async (data: WebhookData): Promise> => {\n return await http.post(`/_api/admin/webhook`, data)\n}\n\nexport const updateWebhook = async (id: number, data: WebhookData): Promise => {\n return await http.put(`/_api/admin/webhook/${id}`, data)\n}\n\nexport const deleteWebhook = async (id: number): Promise => {\n return await http.delete(`/_api/admin/webhook/${id}`)\n}\n\nexport const testWebhook = async (id: number): Promise> => {\n return await http.get(`/_api/admin/webhook/test/${id}`)\n}\n\nexport const previewWebhook = async (type: WebhookType, url: string, content: string): Promise> => {\n return await http.post(\"/_api/admin/webhook/preview\", { type, url, content })\n}\n\nexport const getWebhookHelp = async (type: WebhookType): Promise> => {\n return await http.get(`/_api/admin/webhook/props/${type}`)\n}\n","import { http, Result } from \"../http\"\n\ninterface CheckoutPageLink {\n url: string\n}\n\nexport const generateCheckoutLink = async (planId: string): Promise> => {\n return await http.post(\"/_api/billing/checkout-link\", { planId })\n}\n","import { I18nProvider } from \"@lingui/react\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { i18n } from \"@lingui/core\"\n\nimport { ToastContainer, toast, ToastContent, ToastOptions } from \"react-toastify\"\nimport \"react-toastify/dist/ReactToastify.css\"\n\nlet hasContainer = false\n\nconst setup = () => {\n if (!hasContainer) {\n hasContainer = true\n ReactDOM.render(\n \n \n ,\n document.getElementById(\"root-toastify\")\n )\n }\n}\n\nexport const success = (content: ToastContent, options?: ToastOptions) => {\n setup()\n toast.success(content, options)\n}\n\nexport const error = (content: ToastContent, options?: ToastOptions) => {\n setup()\n toast.error(content, options)\n}\n"],"names":["HoverInfo","props","Elem","href","classList","classSet","clickable","undefined","onClick","React","className","text","target","Icon","width","height","sprite","IconInformationCircle","styles","style","src","viewBox","xlinkHref","id","ErrorBoundary","constructor","super","this","state","error","errorInfo","componentDidCatch","onError","setState","render","FiderContext","Consumer","fider","ErrorPage","showDetails","isProduction","children","ShowPostResponse","status","PostStatus","Get","response","show","HStack","ShowPostStatus","UserName","user","Duplicate","original","number","slug","title","DuplicateDetails","Markdown","StatusDetails","value","i18n","_","message","textColor","color","components","r","substring","g","b","R","parseInt","G","B","getRGB","ShowTag","circular","link","tag","name","isPublic","backgroundColor","xmlns","fill","fillRule","d","clipRule","Header","useFider","isSignInModalOpen","setIsSignInModalOpen","useState","SignInModal","isOpen","onClose","hideModal","justify","TenantLogo","size","session","tenant","isAuthenticated","spacing","NotificationIndicator","UserMenu","e","preventDefault","Trans","ButtonClickEvent","preventEnable","shouldEnable","canEnable","Button","clicked","setClicked","unmountedContainer","useRef","useEffect","current","variant","disabled","buttonContent","onClickProp","rel","async","stopPropagation","event","type","defaultProps","ValidationContext","Form","autoComplete","DisplayError","Provider","arrayToTag","items","map","m","key","hasError","field","errors","err","dict","reduce","result","push","fields","Object","keys","prototype","hasOwnProperty","call","forEach","t","length","Input","onChange","currentTarget","suffix","icon","onIconClick","ctx","label","htmlFor","afterLabel","center","tabIndex","noTabFocus","ref","inputRef","autoFocus","onFocus","maxLength","placeholder","ImageUploader","_defineProperty","files","file","alert","base64","fileToBase64","bkey","upload","fileName","content","contentType","remove","previewURL","instanceID","fileSelector","click","showModal","uploadedImageURL","modal","Modal","Window","closeModal","Content","alt","Footer","isUploading","hasFile","openModal","removeFile","fileChanged","accept","selectFile","IconPhotograph","MultiImageUploader","instances","removed","count","maxUploads","addNewElement","triggerOnChange","bkeys","uploads","k","concat","filter","x","btoa","Math","random","toString","element","imageUploaded","elements","TextArea","Textarea","minRows","RadioButton","selected","setSelected","defaultOption","option","_props$onSelect","onSelect","inputs","options","checked","VStack","Select","filtered","getOption","defaultValue","o","Field","Checkbox","setChecked","isChecked","ImageViewerModal","loadedPreview","Loader","onLoad","onPreviewLoad","imgSrc","ImageViewer","setShowModal","loadedThumbnail","setLoadedThumbnail","setLoadedPreview","onThumbnailLoad","html","markdown","tagName","dangerouslySetInnerHTML","__html","truncate","DevBanner","Avatar","avatarURL","AvatarStack","users","i","Message","showIcon","IconExclamation","IconExclamationCircle","IconCheckCircle","alignment","Hint","cacheKey","permanentCloseKey","isClosed","setIsClosed","cache","local","has","condition","IconX","close","set","TermsOfService","settings","hasLegal","PrivacyPolicy","LegalNotice","0","1","LegalFooter","align","LegalAgreement","SocialSignInButton","redirectTo","window","location","url","logoURL","displayName","OAuthProviderLogo","SignInControl","showEmailForm","setShowEmailForm","isEmailAuthAllowed","email","setEmail","setError","providersLen","oauth","isCookieEnabled","provider","useEmail","Divider","device","actions","ok","onEmailSent","Moment","date","format","now","Date","display","getTime","formatDate","locale","timeSince","tooltip","ModalWindow","root","document","getElementById","body","overflow","addEventListener","keyDown","removeEventListener","keyCode","canClose","ReactDOM","evt","isStaff","role","isCollaborator","setShow","useTimeout","TenantLogoURL","logoBlobKey","useFiderIfEmpty","systemProvidersLogo","google","facebook","github","OAuthProviderLogoURL","Toggle","active","setActive","toggle","newActive","onToggle","PoweredByFider","_window","_window$location","source","encodeURIComponent","host","campaign","slot","PageTitle","subtitle","DropdownContext","createContext","Dropdown","node","setIsOpen","position","handleClick","contains","listClassName","toggleIsOpen","renderHandle","ListItem","useContext","Money","formatter","Intl","NumberFormat","currency","amount","setTimeout","values","VoteCounter","hasVoted","setHasVoted","post","votesCount","setVotesCount","isDisabled","closed","isReadOnly","vote","action","FaCaretUp","unreadNotifications","setUnreadNotifications","then","data","IconBell","ReadOnlyNotice","isAdministrator","Stack","dir","flex","divide","filterable","All","Error","TenantStatus","UserAvatarType","UserStatus","UserRole","Open","Planned","Started","Completed","Declined","Collaborator","Administrator","OAuthConfigStatus","Disabled","Enabled","EmailVerificationKind","BillingStatus","WebhookType","WebhookStatus","request","method","headers","fetch","JSON","stringify","credentials","json","notify","toResult","truncatedBody","http","get","put","delete","category","analytics","storage","setItem","localStorage","getItem","_len","arguments","Array","_key","removeItem","_len2","_key2","sessionStorage","_len3","_key3","eventCategory","eventAction","ga","exDescription","stack","exFatal","FiderSession","pPage","page","pContextID","contextID","pProps","pUser","pTenant","Fider","initData","pSettings","pSession","el","parse","textContent","innerText","currentLocale","Locked","environment","isSingleHostMode","mode","jwt","decode","token","segments","split","atob","input","classes","trim","dateOpts","day","month","year","short","full","hour","minute","DateTimeFormat","toLocaleString","seconds","round","minutes","hours","days","months","years","rtf","RelativeTimeFormat","numeric","Promise","resolve","reject","reader","FileReader","parts","readAsDataURL","timeAgo","cookie","ret","indexOf","assetsURL","substr","copyToClipboard","navigator","clipboard","writeText","clearUrlHash","replace","oldURL","newURL","pathname","search","history","replaceState","pushState","hashChangeEvent","HashChangeEvent","cancelable","bubbles","composed","dispatchEvent","activateI18NSync","messages","loadLocaleData","plurals","en","pt","se","es","nl","de","fr","pl","ru","sk","tr","load","activate","activateI18N","console","marked","setOptions","headerIds","xhtml","smartLists","gfm","breaks","DOMPurify","USE_PROFILES","ADD_ATTR","fullRenderer","Renderer","image","plainTextRenderer","_href","_title","br","strong","list","listitem","heading","paragraph","code","codespan","del","entities","encodeHTML","s","sanitize","renderer","plainText","toastify","success","toast","goHome","goTo","path","baseURL","getNumber","uri","re","RegExp","match","separator","results","exec","decodeURIComponent","getArray","qs","object","symbol","join","isTouch","maxTouchPoints","updateUserSettings","changeUserEmail","deleteCurrentAccount","regenerateAPIKey","createTag","updateTag","deleteTag","assignTag","postNumber","unassignTag","getAllPosts","searchPosts","querystring","tags","params","query","view","limit","deletePost","addVote","removeVote","subscribe","unsubscribe","listVotes","createComment","attachments","updateComment","commentID","deleteComment","respond","originalNumber","createPost","description","updatePost","createTenant","updateTenantSettings","updateTenantAdvancedSettings","customCSS","updateTenantPrivacy","isPrivate","updateTenantEmailAuthAllowed","checkAvailability","subdomain","signIn","completeProfile","kind","changeUserRole","userID","blockUser","unblockUser","getOAuthConfig","saveOAuthConfig","getTotalUnreadNotifications","total","markAllAsRead","sendInvites","subject","recipients","sendSampleInvite","ignoreErrors","logError","pattern","createWebhook","updateWebhook","deleteWebhook","testWebhook","previewWebhook","getWebhookHelp","generateCheckoutLink","planId","hasContainer","setup","I18nProvider","ToastContainer","POSITION","TOP_RIGHT"],"sourceRoot":""}