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B,EAAU3d,MAAMkH,SACHoW,EAAKtF,KAAK,kBAAmB,CAAE9V,UAAS2X,QACvD,CAAE,MAAO3S,GACPke,QAAQplB,MAAMkH,EAChB,GCxBWylB,GAAgB3mB,eACdsX,EAAKtF,KAAK,sBAAuB6B,GAGnC+S,GAAgB5mB,MAAOtG,EAAYma,UACjCyD,EAAKE,IAAI,uBAAuB9d,IAAMma,GAGxCgT,GAAgB7mB,eACdsX,EAAKG,OAAO,uBAAuB/d,KAGrCotB,GAAc9mB,eACZsX,EAAKC,IAAI,4BAA4B7d,KAGvCqtB,GAAiB/mB,MAAOG,EAAmBqL,EAAa3H,UACtDyT,EAAKtF,KAAK,8BAA+B,CAAE7R,OAAMqL,MAAK3H,YAGxDmjB,GAAiBhnB,eACfsX,EAAKC,IAAI,6BAA6BpX,KClBxC8mB,GAAuBjnB,eACrBsX,EAAKtF,KAAK,8BAA+B,CAAEkV,U,wHCC1D,IAAIC,GAAe,EAEnB,MAAMC,EAAQA,KACPD,IACHA,GAAe,EACfhZ,EAAAA,OACEvV,EAAAA,cAACyuB,EAAAA,GAAY,CAACrrB,KAAMA,EAAAA,IAClBpD,EAAAA,cAAC0uB,EAAAA,GAAc,CAAC9W,SAAU8Q,EAAAA,GAAMiG,SAASC,aAE3C9Z,SAASC,eAAe,kBAE5B,EAGW0T,EAAUA,CAACxd,EAAuBuD,KAC7CggB,IACA9F,EAAAA,GAAMD,QAAQxd,EAASuD,EAAQ,EAGpBpN,EAAQA,CAAC6J,EAAuBuD,KAC3CggB,IACA9F,EAAAA,GAAMtnB,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/Reactions.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    <Elem className={classList} data-tooltip={props.text} onClick={props.onClick} href={props.href} target={props.target}>\n      <Icon width=\"15\" height=\"15\" className=\"c-hoverinfo__icon\" sprite={IconInformationCircle} />\n    </Elem>\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 <img style={styles} height={props.height} width={props.width} className={props.className} src={props.sprite} />\n  }\n\n  return (\n    <svg onClick={props.onClick} height={props.height} width={props.width} className={props.className} viewBox={props.sprite.viewBox}>\n      <use xlinkHref={\"#\" + props.sprite.id} />\n    </svg>\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<ErrorBoundaryProps, ErrorBoundaryState> {\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 <FiderContext.Consumer>{(fider) => <ErrorPage error={error} errorInfo={errorInfo} showDetails={!fider.isProduction()} />}</FiderContext.Consumer>\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    <div className=\"content\">\n      <span>&#8618;</span>{\" \"}\n      <a className=\"text-link\" href={`/posts/${original.number}/${original.slug}`}>\n        {original.title}\n      </a>\n    </div>\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    <div className=\"content\">\n      <Markdown text={props.response.text} style=\"full\" />\n    </div>\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      <div className=\"p-2 shadow rounded\">\n        <HStack>\n          {status.show && <ShowPostStatus status={status} />}\n          <span className=\"text-xs\">\n            &middot; <UserName user={props.response.user} />\n          </span>\n        </HStack>\n        {status === PostStatus.Duplicate ? DuplicateDetails(props) : StatusDetails(props)}\n      </div>\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 <span className={`c-status-label c-status-label--${props.status.value}`}>{title}</span>\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    <a\n      href={props.link && props.tag.slug ? `/?tags=${props.tag.slug}` : undefined}\n      title={`${props.tag.name}${props.tag.isPublic ? \"\" : \" (Private)\"}`}\n      className={className}\n      style={{\n        backgroundColor: `#${props.tag.color}`,\n        color: textColor(props.tag.color),\n      }}\n    >\n      {!props.tag.isPublic && !props.circular && (\n        <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n          <path\n            fillRule=\"evenodd\"\n            d=\"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z\"\n            clipRule=\"evenodd\"\n          />\n        </svg>\n      )}\n      {props.circular ? \"\" : props.tag.name || \"Tag\"}\n    </a>\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    <div id=\"c-header\" className=\"bg-white\">\n      <SignInModal isOpen={isSignInModalOpen} onClose={hideModal} />\n      <HStack className=\"c-menu shadow p-4 w-full\">\n        <div className=\"container\">\n          <HStack justify=\"between\">\n            <a href=\"/\" className=\"flex flex-x flex-items-center flex--spacing-2 h-8\">\n              <TenantLogo size={100} />\n              <h1 className=\"text-header\">{fider.session.tenant.name}</h1>\n            </a>\n            {fider.session.isAuthenticated && (\n              <HStack spacing={2}>\n                <NotificationIndicator />\n                <UserMenu />\n              </HStack>\n            )}\n            {!fider.session.isAuthenticated && (\n              <a href=\"#\" className=\"uppercase text-sm\" onClick={showModal}>\n                <Trans id=\"action.signin\">Sign in</Trans>\n              </a>\n            )}\n          </HStack>\n        </div>\n      </HStack>\n    </div>\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<any> | 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<ButtonProps> = (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      <a href={props.href} rel={props.rel} target={props.target} className={className}>\n        {props.children}\n      </a>\n    )\n  } else if (onClickProp) {\n    const onClick = async (e?: React.SyntheticEvent<HTMLElement>) => {\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      <button type={props.type} className={className} onClick={onClick}>\n        {props.children}\n      </button>\n    )\n  } else {\n    buttonContent = (\n      <button type={props.type} className={className}>\n        {props.children}\n      </button>\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<ValidationContext>({})\n\nexport const Form: React.FunctionComponent<FormProps> = (props) => {\n  const className = classSet({\n    \"c-form\": true,\n    [props.className || \"\"]: props.className,\n  })\n\n  return (\n    <form autoComplete=\"off\" className={className}>\n      <DisplayError error={props.error} />\n      <ValidationContext.Provider value={{ error: props.error }}>{props.children}</ValidationContext.Provider>\n    </form>\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) => <li key={m}>{m}</li>)\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    <div className={`c-form-error`}>\n      <ul>{items}</ul>\n    </div>\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<any>\n  onChange?: (value: string) => void\n}\n\nexport const Input: React.FunctionComponent<InputProps> = (props) => {\n  const onChange = (e: React.FormEvent<HTMLInputElement>) => {\n    if (props.onChange) {\n      props.onChange(e.currentTarget.value)\n    }\n  }\n\n  const suffix = typeof props.suffix === \"string\" ? <span className=\"c-input__suffix\">{props.suffix}</span> : props.suffix\n\n  const icon = props.icon ? <Icon sprite={props.icon} onClick={props.onIconClick} className={classSet({ clickable: !!props.onIconClick })} /> : undefined\n\n  return (\n    <ValidationContext.Consumer>\n      {(ctx) => (\n        <div\n          className={classSet({\n            \"c-form-field\": true,\n            [`${props.className}`]: props.className,\n          })}\n        >\n          {!!props.label && (\n            <label htmlFor={`input-${props.field}`}>\n              {props.label}\n              {props.afterLabel}\n            </label>\n          )}\n          <HStack spacing={0} center={!!props.icon} className=\"relative\">\n            <input\n              className={classSet({\n                \"c-input\": true,\n                \"c-input--icon\": !!props.icon,\n                \"c-input--error\": hasError(props.field, ctx.error),\n                \"c-input--suffixed\": !!suffix,\n              })}\n              id={`input-${props.field}`}\n              type=\"text\"\n              autoComplete={props.autoComplete}\n              tabIndex={props.noTabFocus ? -1 : undefined}\n              ref={props.inputRef}\n              autoFocus={props.autoFocus}\n              onFocus={props.onFocus}\n              maxLength={props.maxLength}\n              disabled={props.disabled}\n              value={props.value}\n              placeholder={props.placeholder}\n              onChange={onChange}\n            />\n            {icon}\n            {suffix}\n          </HStack>\n          <DisplayError fields={[props.field]} error={ctx.error} />\n          {props.children}\n        </div>\n      )}\n    </ValidationContext.Consumer>\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<ImageUploaderProps, ImageUploaderState> {\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<HTMLInputElement>) => {\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      <Modal.Window className=\"c-image-viewer-modal\" isOpen={this.state.showModal} onClose={this.closeModal} center={false} size=\"fluid\">\n        <Modal.Content>{this.props.bkey ? <img alt=\"\" src={uploadedImageURL(this.props.bkey)} /> : <img alt=\"\" src={this.state.previewURL} />}</Modal.Content>\n\n        <Modal.Footer>\n          <Button variant=\"tertiary\" onClick={this.closeModal}>\n            Close\n          </Button>\n        </Modal.Footer>\n      </Modal.Window>\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      <ValidationContext.Consumer>\n        {(ctx) => (\n          <div\n            className={classSet({\n              \"c-form-field\": true,\n              \"c-image-upload\": true,\n              \"m-error\": hasError(this.props.field, ctx.error),\n            })}\n          >\n            {this.modal()}\n            {this.props.label && <label htmlFor={`input-${this.props.field}`}>{this.props.label}</label>}\n\n            {hasFile && (\n              <div className=\"preview h-20\">\n                <img alt=\"\" onClick={this.openModal} src={this.state.previewURL} />\n                {!this.props.disabled && (\n                  <Button onClick={this.removeFile} variant=\"danger\">\n                    X\n                  </Button>\n                )}\n              </div>\n            )}\n\n            <input ref={(e) => (this.fileSelector = e)} type=\"file\" onChange={this.fileChanged} accept=\"image/*\" />\n            {!hasFile && (\n              <Button onClick={this.selectFile} disabled={this.props.disabled}>\n                <Icon sprite={IconPhotograph} />\n              </Button>\n            )}\n            <DisplayError fields={[this.props.field]} error={ctx.error} />\n            {this.props.children}\n          </div>\n        )}\n      </ValidationContext.Consumer>\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<MultiImageUploaderProps, MultiImageUploaderState> {\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: <ImageUploader key={id} bkey={bkey} instanceID={id} field=\"attachment\" onChange={this.imageUploaded} />,\n    }\n  }\n\n  public render() {\n    const elements = Object.keys(this.state.instances).map((k) => this.state.instances[k].element)\n    return (\n      <ValidationContext.Consumer>\n        {(ctx) => (\n          <div\n            className={classSet({\n              \"c-form-field\": true,\n              \"c-multi-image-uploader\": true,\n              \"m-error\": hasError(this.props.field, ctx.error),\n            })}\n          >\n            <div className=\"c-multi-image-uploader-instances\">{elements}</div>\n            <DisplayError fields={[this.props.field]} error={ctx.error} />\n          </div>\n        )}\n      </ValidationContext.Consumer>\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<any>\n  onFocus?: React.FocusEventHandler<HTMLTextAreaElement>\n  className?: string\n}\n\nexport const TextArea: React.FunctionComponent<TextAreaProps> = (props) => {\n  const onChange = (e: React.FormEvent<HTMLTextAreaElement>) => {\n    if (props.onChange) {\n      props.onChange(e.currentTarget.value)\n    }\n  }\n\n  return (\n    <ValidationContext.Consumer>\n      {(ctx) => (\n        <>\n          <div className=\"c-form-field\">\n            {!!props.label && (\n              <label htmlFor={`input-${props.field}`}>\n                {props.label}\n                {props.afterLabel}\n              </label>\n            )}\n            <Textarea\n              className={classSet({\n                \"c-textarea\": true,\n                \"c-textarea--error\": hasError(props.field, ctx.error),\n                [props.className || \"\"]: props.className,\n              })}\n              id={`input-${props.field}`}\n              disabled={props.disabled}\n              onChange={onChange}\n              value={props.value}\n              minRows={props.minRows || 3}\n              placeholder={props.placeholder}\n              ref={props.inputRef}\n              onFocus={props.onFocus}\n            />\n            <DisplayError fields={[props.field]} error={ctx.error} />\n            {props.children}\n          </div>\n        </>\n      )}\n    </ValidationContext.Consumer>\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    <HStack key={option.value} className=\"text-sm\">\n      <input id={`visibility-${option.value}`} type=\"radio\" name={`input-${props.field}`} checked={selected === option} onChange={onChange(option)} />\n      <label htmlFor={`visibility-${option.value}`}>{option.label}</label>\n    </HStack>\n  ))\n\n  return (\n    <div className=\"c-form-field\">\n      <label htmlFor={`input-${props.field}`}>{props.label}</label>\n      <VStack className=\"c-radiobutton\">{inputs}</VStack>\n    </div>\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<SelectProps> = (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<SelectOption | undefined>(getOption(props.defaultValue))\n  const onChange = (e: React.FormEvent<HTMLSelectElement>) => {\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    <ValidationContext.Consumer>\n      {(ctx) => (\n        <>\n          <div className=\"c-form-field\">\n            {!!props.label && <label htmlFor={`input-${props.field}`}>{props.label}</label>}\n            <select\n              className={classSet({\n                \"c-select\": true,\n                \"c-select--error\": hasError(props.field, ctx.error),\n              })}\n              value={selected?.value}\n              id={`input-${props.field}`}\n              defaultValue={props.defaultValue}\n              onChange={onChange}\n            >\n              {props.options.map((option) => (\n                <option key={option.value} value={option.value}>\n                  {option.label}\n                </option>\n              ))}\n            </select>\n            <DisplayError fields={[props.field]} error={ctx.error} />\n            {props.children}\n          </div>\n        </>\n      )}\n    </ValidationContext.Consumer>\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<FieldProps> = (props) => {\n  const fields = props.field ? [props.field] : undefined\n  return (\n    <ValidationContext.Consumer>\n      {(ctx) => (\n        <div\n          className={classSet({\n            \"c-form-field\": true,\n            \"m-error\": hasError(props.field, ctx.error),\n            [props.className || \"\"]: props.className,\n          })}\n        >\n          {!!props.label && (\n            <label>\n              {props.label}\n              {props.afterLabel}\n            </label>\n          )}\n          {props.children}\n          <DisplayError fields={fields} error={ctx.error} />\n        </div>\n      )}\n    </ValidationContext.Consumer>\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<CheckboxProps> = (props) => {\n  const [checked, setChecked] = useState<boolean>(props.checked || false)\n\n  const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {\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    <ValidationContext.Consumer>\n      {(ctx) => (\n        <div\n          className={classSet({\n            \"c-form-field\": true,\n            \"m-error\": hasError(props.field, ctx.error),\n          })}\n        >\n          <div className=\"c-checkbox\">\n            <HStack>\n              <input id={`input-${props.field}`} type=\"checkbox\" checked={checked} onChange={onChange} />\n              <label htmlFor={`input-${props.field}`} className=\"text-sm\">\n                {props.children}\n              </label>\n            </HStack>\n            <DisplayError fields={[props.field]} error={ctx.error} />\n          </div>\n        </div>\n      )}\n    </ValidationContext.Consumer>\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  <Modal.Window className=\"c-image-viewer-modal\" isOpen={props.isOpen} onClose={props.onClose} center={false} size=\"fluid\">\n    <Modal.Content>\n      {!props.loadedPreview && <Loader />}\n      <img alt=\"\" onLoad={props.onPreviewLoad} src={props.imgSrc} />\n    </Modal.Content>\n\n    <Modal.Footer>\n      <Button variant=\"tertiary\" onClick={props.onClose}>\n        <Trans id=\"action.close\">Close</Trans>\n      </Button>\n    </Modal.Footer>\n  </Modal.Window>\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    <div className=\"c-image-viewer\">\n      <ImageViewerModal\n        onPreviewLoad={onPreviewLoad}\n        isOpen={showModal}\n        onClose={closeModal}\n        imgSrc={uploadedImageURL(props.bkey, 1500)}\n        loadedPreview={loadedPreview}\n      />\n      {!loadedThumbnail && <Loader />}\n      <img alt=\"\" onClick={openModal} onLoad={onThumbnailLoad} src={uploadedImageURL(props.bkey, 200)} />\n    </div>\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 <div className=\"c-dev-banner\">DEV</div>\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 <img className={`c-avatar ${size}`} alt={props.user.name} src={`${props.user.avatarURL}?size=50`} />\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    <div className=\"c-avatar-stack\">\n      {props.users.map((x, i) => (\n        <Avatar key={i} user={x} />\n      ))}\n    </div>\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<MessageProps> = (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    <HStack className={className} spacing={2} justify={props.alignment}>\n      {props.showIcon === true && <Icon className=\"h-5\" sprite={icon} />}\n      <span>{props.children}</span>\n    </HStack>\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<HintProps> = (props) => {\n  const cacheKey: string | undefined = props.permanentCloseKey ? `Hint-Closed-${props.permanentCloseKey}` : undefined\n  const [isClosed, setIsClosed] = useState<boolean>(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    <HStack className=\"c-hint\" justify=\"between\" spacing={2}>\n      <span>{props.children}</span>\n      {cacheKey && <Icon sprite={IconX} onClick={close} className=\"c-hint__close h-5\" />}\n    </HStack>\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      <a href=\"/terms\" className=\"text-link\" target=\"_blank\">\n        <Trans id=\"legal.termsofservice\">Terms of Service</Trans>\n      </a>\n    )\n  }\n  return null\n}\n\nexport const PrivacyPolicy = () => {\n  const fider = useFider()\n\n  if (fider.settings.hasLegal) {\n    return (\n      <a href=\"/privacy\" className=\"text-link\" target=\"_blank\">\n        <Trans id=\"legal.privacypolicy\">Privacy Policy</Trans>\n      </a>\n    )\n  }\n  return null\n}\n\nexport const LegalNotice = () => {\n  const fider = useFider()\n\n  if (fider.settings.hasLegal) {\n    return (\n      <p className=\"text-muted\">\n        <Trans id=\"legal.notice\">\n          By signing in, you agree to the <PrivacyPolicy /> and <TermsOfService />.\n        </Trans>\n      </p>\n    )\n  }\n  return null\n}\n\nexport const LegalFooter = () => {\n  const fider = useFider()\n\n  if (fider.settings.hasLegal) {\n    return (\n      <Modal.Footer align=\"center\">\n        <LegalNotice />\n      </Modal.Footer>\n    )\n  }\n  return null\n}\n\nexport const LegalAgreement: React.FunctionComponent<LegalAgreementProps> = (props) => {\n  const fider = useFider()\n\n  if (fider.settings.hasLegal) {\n    return (\n      <Checkbox field=\"legalAgreement\" onChange={props.onChange}>\n        <Trans id=\"legal.agreement\">\n          I have read and agree to the <PrivacyPolicy /> and <TermsOfService />.\n        </Trans>\n      </Checkbox>\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    <Button href={href} rel=\"nofollow\" className={props.className}>\n      {props.option.logoURL ? <img alt={props.option.displayName} src={props.option.logoURL} /> : <OAuthProviderLogo option={props.option} />}\n      <span>{props.option.displayName}</span>\n    </Button>\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<SignInControlProps> = (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<Failure | undefined>(undefined)\n\n  const forceShowEmailForm = (e: React.MouseEvent<HTMLAnchorElement>) => {\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      <Message type=\"error\">\n        <h3 className=\"text-display\">Cookies Required</h3>\n        <p>Cookies are not enabled on your browser. Please enable cookies in your browser preferences to continue.</p>\n      </Message>\n    )\n  }\n\n  return (\n    <div className=\"c-signin-control\">\n      {providersLen > 0 && (\n        <>\n          <div className=\"c-signin-control__oauth mb-2\">\n            {fider.settings.oauth.map((o) => (\n              <React.Fragment key={o.provider}>\n                <SocialSignInButton option={o} redirectTo={props.redirectTo} />\n              </React.Fragment>\n            ))}\n          </div>\n          {props.useEmail && <Divider />}\n        </>\n      )}\n\n      {props.useEmail &&\n        (showEmailForm ? (\n          <div>\n            <p>\n              <Trans id=\"signin.message.email\">Enter your email address to sign in</Trans>\n            </p>\n            <Form error={error}>\n              <Input\n                field=\"email\"\n                value={email}\n                autoFocus={!device.isTouch()}\n                onChange={setEmail}\n                placeholder=\"yourname@example.com\"\n                suffix={\n                  <Button type=\"submit\" variant=\"primary\" disabled={email === \"\"} onClick={signIn}>\n                    <Trans id=\"action.signin\">Sign in</Trans>\n                  </Button>\n                }\n              />\n            </Form>\n            {!fider.session.tenant.isEmailAuthAllowed && (\n              <p className=\"text-red-700 mt-1\">\n                <Trans id=\"signin.message.onlyadmins\">Currently only allowed to sign in to an administrator account</Trans>\n              </p>\n            )}\n          </div>\n        ) : (\n          <div>\n            <p className=\"text-muted\">\n              <Trans id=\"signin.message.emaildisabled\">\n                Email authentication has been disabled by an administrator. If you have an administrator account and need to bypass this restriction, please{\" \"}\n                <a href=\"#\" className=\"text-bold\" onClick={forceShowEmailForm}>\n                  click here\n                </a>\n                .\n              </Trans>\n            </p>\n          </div>\n        ))}\n    </div>\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 <span />\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    <span className=\"date\" data-tooltip={tooltip}>\n      {display}\n    </span>\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<ModalWindowProps> = (props) => {\n  const root = useRef<HTMLElement>(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<HTMLDivElement>) => {\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    <div aria-disabled={true} className=\"c-modal-dimmer\" onClick={close}>\n      <div className=\"c-modal-scroller\">\n        <div className={className} data-testid=\"modal\" onClick={swallow}>\n          {props.children}\n        </div>\n      </div>\n    </div>,\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 }) => <div className=\"c-modal-header\">{props.children}</div>\nconst Content = (props: { children: React.ReactNode }) => <div className=\"c-modal-content\">{props.children}</div>\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 <div className={className}>{props.children}</div>\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  showEmail?: boolean\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    <div className={className}>\n      <span>{props.user.name || \"Anonymous\"}</span>\n      <>{props.showEmail && props.user.email && <span className=\"c-username--email\">({props.user.email})</span>}</>\n\n      {isStaff && (\n        <div data-tooltip={isStaff ? \"Staff\" : undefined}>\n          <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\">\n            <path\n              fillRule=\"evenodd\"\n              d=\"M6.267 3.455a3.066 3.066 0 001.745-.723 3.066 3.066 0 013.976 0 3.066 3.066 0 001.745.723 3.066 3.066 0 012.812 2.812c.051.643.304 1.254.723 1.745a3.066 3.066 0 010 3.976 3.066 3.066 0 00-.723 1.745 3.066 3.066 0 01-2.812 2.812 3.066 3.066 0 00-1.745.723 3.066 3.066 0 01-3.976 0 3.066 3.066 0 00-1.745-.723 3.066 3.066 0 01-2.812-2.812 3.066 3.066 0 00-.723-1.745 3.066 3.066 0 010-3.976 3.066 3.066 0 00.723-1.745 3.066 3.066 0 012.812-2.812zm7.44 5.252a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n              clipRule=\"evenodd\"\n            ></path>\n          </svg>\n        </div>\n      )}\n    </div>\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    <div className={className}>\n      <div className=\"c-loader__spinner\" />\n      {props.text && <span className=\"c-loader__text\">{props.text}</span>}\n    </div>\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 <img src={TenantLogoURL(fider.session.tenant, props.size)} alt={tenant.name} />\n  } else if (props.useFiderIfEmpty) {\n    return <img src=\"https://fider.io/images/logo-100x100.png\" alt=\"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/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDQwMCA0MDAiIGhlaWdodD0iNDAwcHgiIGlkPSJMYXllcl8xIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA0MDAgNDAwIiB3aWR0aD0iNDAwcHgiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxnPjxwYXRoIGQ9Ik0xNDIuOSwyNC4yQzk3LjYsMzkuNyw1OSw3My42LDM3LjUsMTE2LjVjLTcuNSwxNC44LTEyLjksMzAuNS0xNi4yLDQ2LjhjLTguMiw0MC40LTIuNSw4My41LDE2LjEsMTIwLjMgICBjMTIuMSwyNCwyOS41LDQ1LjQsNTAuNSw2Mi4xYzE5LjksMTUuOCw0MywyNy42LDY3LjYsMzQuMWMzMSw4LjMsNjQsOC4xLDk1LjIsMWMyOC4yLTYuNSw1NC45LTIwLDc2LjItMzkuNiAgIGMyMi41LTIwLjcsMzguNi00Ny45LDQ3LjEtNzcuMmM5LjMtMzEuOSwxMC41LTY2LDQuNy05OC44Yy01OC4zLDAtMTE2LjcsMC0xNzUsMGMwLDI0LjIsMCw0OC40LDAsNzIuNmMzMy44LDAsNjcuNiwwLDEwMS40LDAgICBjLTMuOSwyMy4yLTE3LjcsNDQuNC0z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uMjM0YzEuMDIzLDEuMTE4LDEuNjQ0LDIuNTQ1LDEuNjQ0LDQuMjkyICBjMCw2LjE0Ni0zLjc0LDcuNDk4LTcuMzA0LDcuODkzQzE5LjQ3OSwyMy41NDgsMjAsMjQuNTA4LDIwLDI2YzAsMiwwLDMuOTAyLDAsNC40MjhjMCwwLjQyOCwwLjI1OCwwLjkwMSwxLjA3LDAuNzQ2ICBDMjcuNDIyLDI5LjA1NSwzMiwyMy4wNjIsMzIsMTUuOTk3QzMyLDcuMTYyLDI0LjgzOCwwLDE2LjAwMywweiIgZmlsbD0iIzE4MTYxNiIgZmlsbC1ydWxlPSJldmVub2RkIi8+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 <img src={OAuthProviderLogoURL(props.option.logoBlobKey)} alt={props.option.displayName} />\n  }\n\n  if (props.option.provider && props.option.provider in systemProvidersLogo) {\n    return <img src={systemProvidersLogo[props.option.provider]} alt={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<ToggleProps> = (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    <ValidationContext.Consumer>\n      {(ctx) => (\n        <>\n          <HStack spacing={2}>\n            <button onClick={toggle} type=\"button\" className={className} role=\"switch\">\n              <span aria-hidden=\"true\" className=\"shadow\"></span>\n            </button>\n            {props.label && <span className=\"text-sm\">{props.label}</span>}\n          </HStack>\n          {props.field && <DisplayError fields={[props.field]} error={ctx.error} />}\n        </>\n      )}\n    </ValidationContext.Consumer>\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    <div className={className}>\n      <a rel=\"noopener\" href={`https://fider.io?utm_source=${source}&utm_medium=${medium}&utm_campaign=${campaign}`} target=\"_blank\">\n        Powered by Fider ⚡\n      </a>\n    </div>\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    <div className={className}>\n      <div className=\"text-display2 mb-1\">{props.title}</div>\n      <div className=\"text-gray-700\">{props.subtitle}</div>\n    </div>\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      <a href={props.href} className={`c-dropdown__listitem ${props.className}`}>\n        {props.children}\n      </a>\n    )\n  }\n\n  return (\n    <div onClick={handleClick} className={`c-dropdown__listitem ${props.className}`}>\n      {props.children}\n    </div>\n  )\n}\n\nconst Divider = () => {\n  return <hr className=\"c-dropdown__divider\" />\n}\n\ninterface DropdownProps {\n  renderHandle: JSX.Element\n  position?: \"left\" | \"right\"\n  onToggled?: (isOpen: boolean) => void\n  children: React.ReactNode\n  wide?: boolean\n  fullsceenSm?: boolean\n}\n\ninterface DropdownContextFuncs {\n  close(): void\n}\n\nconst DropdownContext = createContext<DropdownContextFuncs | null>(null)\nDropdownContext.displayName = \"DropdownContext\"\n\nexport const Dropdown = (props: DropdownProps) => {\n  const node = useRef<HTMLDivElement | null>(null)\n  const [isOpen, setIsOpen] = useState(false)\n  const position = props.position || \"right\"\n\n  const changeToggleState = (newState: boolean) => {\n    setIsOpen(newState)\n    if (props.onToggled) {\n      props.onToggled(newState)\n    }\n  }\n\n  const toggleIsOpen = () => {\n    changeToggleState(!isOpen)\n  }\n\n  const close = () => {\n    changeToggleState(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--wide\": props.wide,\n    \"c-dropdown__list shadow-lg\": true,\n    \"c-dropdown__list--fullscreen-small\": props.fullsceenSm,\n    [`c-dropdown__list--${position}`]: position === \"left\",\n  })\n\n  return (\n    <DropdownContext.Provider value={{ close }}>\n      <div ref={node} className=\"c-dropdown\">\n        <button type=\"button\" className=\"c-dropdown__handle\" onClick={toggleIsOpen}>\n          {props.renderHandle}\n        </button>\n        {isOpen && <div className={listClassName}>{props.children}</div>}\n      </div>\n    </DropdownContext.Provider>\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 <span>{formatter.format(props.amount)}</span>\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<SignInModalProps> = (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      <p>\n        <Trans id=\"signin.message.emailsent\">\n          We have just sent a confirmation link to <b>{email}</b>. Click the link and you’ll be signed in.\n        </Trans>\n      </p>\n      <p>\n        <Button variant=\"tertiary\" onClick={closeModal}>\n          <Trans id=\"action.ok\">OK</Trans>\n        </Button>\n      </p>\n    </>\n  ) : (\n    <SignInControl useEmail={true} onEmailSent={onEmailSent} />\n  )\n\n  return (\n    <Modal.Window isOpen={props.isOpen} onClose={closeModal}>\n      <Modal.Header>\n        <Trans id=\"modal.signin.header\">Sign in to participate and vote</Trans>\n      </Modal.Header>\n      <Modal.Content>{content}</Modal.Content>\n      <LegalFooter />\n    </Modal.Window>\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    <button className={className} onClick={voteOrUndo}>\n      <Icon sprite={FaCaretUp} height=\"16\" width=\"16\" />\n      {votesCount}\n    </button>\n  )\n\n  const disabled = (\n    <button className={className}>\n      <Icon sprite={FaCaretUp} height=\"16\" width=\"16\" />\n      {votesCount}\n    </button>\n  )\n\n  return (\n    <>\n      <SignInModal isOpen={isSignInModalOpen} onClose={hideModal} />\n      <div className=\"c-vote-counter\">{isDisabled ? disabled : vote}</div>\n    </>\n  )\n}\n","import \"./NotificationIndicator.scss\"\nimport NoDataIllustration from \"@fider/assets/images/undraw-empty.svg\"\n\nimport React, { useEffect, useState } from \"react\"\nimport IconBell from \"@fider/assets/images/heroicons-bell.svg\"\nimport { useFider } from \"@fider/hooks\"\nimport { actions, Fider } from \"@fider/services\"\nimport { Avatar, Icon, Markdown, Moment } from \"./common\"\nimport { Dropdown } from \"./common/Dropdown\"\nimport { Notification } from \"@fider/models\"\nimport { HStack, VStack } from \"./layout\"\n\nimport { Trans } from \"@lingui/macro\"\n\nexport const NotificationItem = ({ notification }: { notification: Notification }) => {\n  const openNotification = () => {\n    window.location.href = `/notifications/${notification.id}`\n  }\n\n  return (\n    <HStack spacing={4} className=\"px-3 pr-5 clickable hover py-4\" onClick={openNotification}>\n      <Avatar user={{ name: notification.authorName, avatarURL: notification.avatarURL }} />\n      <div>\n        <Markdown className=\"c-notification-indicator-text\" text={notification.title} style=\"full\" />\n        <span className=\"text-muted\">\n          <Moment locale={Fider.currentLocale} date={notification.createdAt} />\n        </span>\n      </div>\n    </HStack>\n  )\n}\n\nconst NotificationIcon = ({ unreadNotifications }: { unreadNotifications: number }) => {\n  return (\n    <>\n      <span className=\"c-notification-indicator mr-3\">\n        <Icon sprite={IconBell} className=\"h-6 text-gray-500\" />\n        {unreadNotifications > 0 && <div className=\"c-notification-indicator-unread-counter\" />}\n      </span>\n    </>\n  )\n}\n\nexport const NotificationIndicator = () => {\n  const fider = useFider()\n  const [unreadNotifications, setUnreadNotifications] = useState(0)\n  const [showingNotifications, setShowingNotifications] = useState(false)\n  const [recent, setRecent] = useState<Notification[] | undefined>()\n  const [unread, setUnread] = useState<Notification[] | undefined>()\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  useEffect(() => {\n    if (showingNotifications) {\n      actions.getAllNotifications().then((result) => {\n        if (result) {\n          const [unread, recent] = (result.data || []).reduce(\n            (result, item) => {\n              result[item.read ? 1 : 0].push(item)\n              return result\n            },\n            [[] as Notification[], [] as Notification[]]\n          )\n          setRecent(recent)\n          setUnread(unread)\n          setUnreadNotifications(unread.length)\n        }\n      })\n    }\n  }, [showingNotifications])\n\n  const markAllAsRead = async (e: React.MouseEvent) => {\n    e.preventDefault()\n    const response = await actions.markAllAsRead()\n    if (response.ok) {\n      location.reload()\n    }\n  }\n\n  return (\n    <Dropdown\n      wide={true}\n      position=\"left\"\n      fullsceenSm={true}\n      onToggled={(isOpen: boolean) => setShowingNotifications(isOpen)}\n      renderHandle={<NotificationIcon unreadNotifications={unreadNotifications} />}\n    >\n      <div className=\"c-notifications-container\">\n        {showingNotifications && (unread !== undefined || recent !== undefined) && (\n          <>\n            {unread !== undefined && unread?.length > 0 ? (\n              <>\n                <p className=\"text-subtitle px-4 mt-4 mb-0\">\n                  <Trans id=\"modal.notifications.unread\">Unread notifications</Trans>\n                  {unread.length > 1 && (\n                    <a href=\"#\" className=\"text-link text-xs pl-6\" onClick={markAllAsRead}>\n                      <Trans id=\"action.markallasread\">Mark All as Read</Trans>\n                    </a>\n                  )}\n                </p>\n                <VStack spacing={0} className=\"py-2\" divide={false}>\n                  {unread.map((n) => (\n                    <NotificationItem key={n.id} notification={n} />\n                  ))}\n                </VStack>\n              </>\n            ) : (\n              <div className=\"text-center pb-6\">\n                <p className=\"text-display text-center mt-6 px-4\">\n                  <Trans id=\"modal.notifications.nonew\">No new notifications</Trans>\n                </p>\n                {recent?.length === 0 && <Icon sprite={NoDataIllustration} height=\"120\" className=\"mt-6 mb-2\" />}\n              </div>\n            )}\n            {recent !== undefined && recent?.length > 0 && (\n              <>\n                <p className=\"text-subtitle px-4 mb-0 pt-4 bg-gray-50 border-gray-200 bt\">\n                  <Trans id=\"modal.notifications.previous\">Previous notifications</Trans>\n                </p>\n                <VStack spacing={0} className=\"py-2 bg-gray-50\" divide={false}>\n                  {recent.map((n) => (\n                    <NotificationItem key={n.id} notification={n} />\n                  ))}\n                </VStack>\n              </>\n            )}\n          </>\n        )}\n      </div>\n    </Dropdown>\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    <div className=\"c-menu-user\">\n      <Dropdown position=\"left\" renderHandle={<Avatar user={fider.session.user} />}>\n        <div className=\"p-2 text-medium uppercase\">{fider.session.user.name}</div>\n        <Dropdown.ListItem href=\"/settings\">\n          <Trans id=\"menu.mysettings\">My Settings</Trans>\n        </Dropdown.ListItem>\n        <Dropdown.Divider />\n\n        {fider.session.user.isCollaborator && (\n          <>\n            <div className=\"p-2 text-medium uppercase\">\n              <Trans id=\"menu.administration\">Administration</Trans>\n            </div>\n            <Dropdown.ListItem href=\"/admin\">\n              <Trans id=\"menu.sitesettings\">Site Settings</Trans>\n            </Dropdown.ListItem>\n            <Dropdown.Divider />\n          </>\n        )}\n        <Dropdown.ListItem href=\"/signout?redirect=/\">\n          <Trans id=\"menu.signout\">Sign out</Trans>\n        </Dropdown.ListItem>\n      </Dropdown>\n    </div>\n  )\n}\n","import React, { useEffect, useState } from \"react\"\nimport { ReactionCount } from \"@fider/models\"\nimport { Icon } from \"@fider/components\"\nimport ReactionAdd from \"@fider/assets/images/reaction-add.svg\"\nimport { HStack } from \"@fider/components/layout\"\nimport { classSet } from \"@fider/services\"\nimport { useFider } from \"@fider/hooks\"\nimport \"./Reactions.scss\"\n\ninterface ReactionsProps {\n  emojiSelectorRef: React.RefObject<HTMLDivElement>\n  toggleReaction: (emoji: string) => void\n  reactions?: ReactionCount[]\n}\n\nconst availableEmojis = [\"👍\", \"👎\", \"😄\", \"🎉\", \"😕\", \"❤️\", \"🚀\", \"👀\"]\n\nexport const Reactions: React.FC<ReactionsProps> = ({ emojiSelectorRef, toggleReaction, reactions }) => {\n  const fider = useFider()\n  const [isEmojiSelectorOpen, setIsEmojiSelectorOpen] = useState(false)\n\n  useEffect(() => {\n    const handleClickOutside = (event: MouseEvent) => {\n      if (emojiSelectorRef.current && !emojiSelectorRef.current.contains(event.target as Node)) {\n        setIsEmojiSelectorOpen(false)\n      }\n    }\n\n    document.addEventListener(\"click\", handleClickOutside)\n    return () => {\n      document.removeEventListener(\"click\", handleClickOutside)\n    }\n  }, [])\n\n  return (\n    <div ref={emojiSelectorRef}>\n      <HStack spacing={2} center={true} className=\"mt-2 c-reactions relative\">\n        {fider.session.isAuthenticated && (\n          <>\n            <span\n              onClick={() => setIsEmojiSelectorOpen(!isEmojiSelectorOpen)}\n              className=\"c-reactions-add-reaction relative text-gray-600 clickable inline-flex items-center px-1 py-1 rounded-full text-xs bg-blue-100 hover:bg-blue-200\"\n            >\n              <Icon width=\"18\" height=\"18\" sprite={ReactionAdd} className=\"\" />\n            </span>\n            {isEmojiSelectorOpen && (\n              <div className=\"c-reactions-emojis p-2 absolute bg-white border rounded shadow-lg\">\n                {availableEmojis.map((emoji) => (\n                  <a\n                    key={emoji}\n                    className=\"clickable p-2 hover:bg-gray-100\"\n                    onClick={() => {\n                      toggleReaction(emoji)\n                      setIsEmojiSelectorOpen(false)\n                    }}\n                  >\n                    {emoji}\n                  </a>\n                ))}\n              </div>\n            )}\n          </>\n        )}\n        {reactions !== undefined && (\n          <>\n            {reactions.map((reaction) => (\n              <span\n                key={reaction.emoji}\n                {...(fider.session.isAuthenticated && { onClick: () => toggleReaction(reaction.emoji) })}\n                className={classSet({\n                  \"inline-flex items-center px-2 py-1 rounded-full text-xs\": true,\n                  \"bg-blue-100\": reaction.includesMe,\n                  \"bg-gray-100\": !reaction.includesMe,\n                  \"clickable hover:bg-blue-200\": fider.session.isAuthenticated && reaction.includesMe,\n                  \"clickable hover:bg-gray-200\": fider.session.isAuthenticated && !reaction.includesMe,\n                })}\n              >\n                {reaction.emoji} <span className=\"ml-1 font-semibold\">{reaction.count}</span>\n              </span>\n            ))}\n          </>\n        )}\n      </HStack>\n    </div>\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      <Message alignment=\"center\" type=\"warning\">\n        This website is currently in read-only mode because there is no active subscription. Visit{\" \"}\n        <a className=\"text-link\" href=\"/admin/billing\">\n          Billing\n        </a>{\" \"}\n        to subscribe.\n      </Message>\n    )\n  }\n\n  return (\n    <Message alignment=\"center\" type=\"warning\">\n      This website is currently in read-only mode.\n    </Message>\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 ? 2 : 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    <div onClick={props.onClick} className={className}>\n      {props.children}\n    </div>\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    <div className=\"c-divider text-gray-600\">\n      <Trans id=\"label.or\">OR</Trans>\n    </div>\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 ReactionCount {\n  emoji: string\n  count: number\n  includesMe: boolean\n}\n\nexport interface Comment {\n  id: number\n  content: string\n  createdAt: string\n  user: User\n  attachments?: string[]\n  reactionCounts?: ReactionCount[]\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<string>\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<T = void> {\n  ok: boolean\n  data: T\n  error?: Failure\n}\n\nasync function toResult<T>(response: Response): Promise<Result<T>> {\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<T>(url: string, method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\", body?: any): Promise<Result<T>> {\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<T>(response)\n  } catch (err) {\n    const truncatedBody = truncate(body ? JSON.stringify(body) : \"<empty>\", 1000)\n    throw new Error(`Failed to ${method} ${url} with body '${truncatedBody}'`)\n  }\n}\n\nexport const http = {\n  get: async <T = void>(url: string): Promise<Result<T>> => {\n    return await request<T>(url, \"GET\")\n  },\n  post: async <T = void>(url: string, body?: any): Promise<Result<T>> => {\n    return await request<T>(url, \"POST\", body)\n  },\n  put: async <T = void>(url: string, body?: any): Promise<Result<T>> => {\n    return await request<T>(url, \"PUT\", body)\n  },\n  delete: async <T = void>(url: string, body?: any): Promise<Result<T>> => {\n    return await request<T>(url, \"DELETE\", body)\n  },\n  event:\n    (category: string, action: string) =>\n    <T>(result: Result<T>): Result<T> => {\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 : \"<not available>\",\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<FiderImpl>(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<string> => {\n  return new Promise<string>((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<T = any> = {\n  [key: string]: T\n}\n\nexport const copyToClipboard = (text: string): Promise<void> => {\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, it, zh } 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(\"it\", { plurals: it })\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.loadLocaleData(\"zh-CH\", { plurals: zh })\n  i18n.load(locale, messages)\n  i18n.activate(locale)\n  return i18n\n}\n\nexport async function activateI18N(locale: string): Promise<I18n> {\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 `<a class=\"text-link\" href=\"${href}\"${titleAttr} rel=\"noopener nofollow\" target=\"_blank\">${text}</a>`\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  \"<\": \"&lt;\",\n  \">\": \"&gt;\",\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<Result> => {\n  return await http.post(\"/_api/user/settings\", request)\n}\n\nexport const changeUserEmail = async (email: string): Promise<Result> => {\n  return await http.post(\"/_api/user/change-email\", {\n    email,\n  })\n}\n\nexport const deleteCurrentAccount = async (): Promise<Result> => {\n  return await http.delete(\"/_api/user\")\n}\n\nexport const regenerateAPIKey = async (): Promise<Result<{ apiKey: string }>> => {\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<Result<Tag>> => {\n  return http.post<Tag>(`/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<Result<Tag>> => {\n  return http.put<Tag>(`/api/v1/tags/${slug}`, { name, color, isPublic }).then(http.event(\"tag\", \"update\"))\n}\n\nexport const deleteTag = async (slug: string): Promise<Result> => {\n  return http.delete(`/api/v1/tags/${slug}`).then(http.event(\"tag\", \"delete\"))\n}\n\nexport const assignTag = async (slug: string, postNumber: number): Promise<Result> => {\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<Result> => {\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<Result<Post[]>> => {\n  return await http.get<Post[]>(\"/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<Result<Post[]>> => {\n  return await http.get<Post[]>(\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<Result> => {\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<Result> => {\n  return http.post(`/api/v1/posts/${postNumber}/votes`).then(http.event(\"post\", \"vote\"))\n}\n\nexport const removeVote = async (postNumber: number): Promise<Result> => {\n  return http.delete(`/api/v1/posts/${postNumber}/votes`).then(http.event(\"post\", \"unvote\"))\n}\n\nexport const subscribe = async (postNumber: number): Promise<Result> => {\n  return http.post(`/api/v1/posts/${postNumber}/subscription`).then(http.event(\"post\", \"subscribe\"))\n}\n\nexport const unsubscribe = async (postNumber: number): Promise<Result> => {\n  return http.delete(`/api/v1/posts/${postNumber}/subscription`).then(http.event(\"post\", \"unsubscribe\"))\n}\n\nexport const listVotes = async (postNumber: number): Promise<Result<Vote[]>> => {\n  return http.get<Vote[]>(`/api/v1/posts/${postNumber}/votes`)\n}\n\nexport const createComment = async (postNumber: number, content: string, attachments: ImageUpload[]): Promise<Result> => {\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<Result> => {\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<Result> => {\n  return http.delete(`/api/v1/posts/${postNumber}/comments/${commentID}`).then(http.event(\"comment\", \"delete\"))\n}\ninterface ToggleReactionResponse {\n  added: boolean\n}\n\nexport const toggleCommentReaction = async (postNumber: number, commentID: number, emoji: string): Promise<Result<ToggleReactionResponse>> => {\n  return http.post<ToggleReactionResponse>(`/api/v1/posts/${postNumber}/comments/${commentID}/reactions/${emoji}`)\n}\n\ninterface SetResponseInput {\n  status: string\n  text: string\n  originalNumber: number\n}\n\nexport const respond = async (postNumber: number, input: SetResponseInput): Promise<Result> => {\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<Result<CreatePostResponse>> => {\n  return http.post<CreatePostResponse>(`/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<Result> => {\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<Result<CreateTenantResponse>> => {\n  return await http.post<CreateTenantResponse>(\"/_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<Result> => {\n  return await http.post(\"/_api/admin/settings/general\", request)\n}\n\nexport const updateTenantAdvancedSettings = async (customCSS: string): Promise<Result> => {\n  return await http.post(\"/_api/admin/settings/advanced\", { customCSS })\n}\n\nexport const updateTenantPrivacy = async (isPrivate: boolean): Promise<Result> => {\n  return await http.post(\"/_api/admin/settings/privacy\", {\n    isPrivate,\n  })\n}\n\nexport const updateTenantEmailAuthAllowed = async (isEmailAuthAllowed: boolean): Promise<Result> => {\n  return await http.post(\"/_api/admin/settings/emailauth\", {\n    isEmailAuthAllowed,\n  })\n}\n\nexport const checkAvailability = async (subdomain: string): Promise<Result<CheckAvailabilityResponse>> => {\n  return await http.get<CheckAvailabilityResponse>(`/_api/tenants/${subdomain}/availability`)\n}\n\nexport const signIn = async (email: string): Promise<Result> => {\n  return await http.post(\"/_api/signin\", {\n    email,\n  })\n}\n\nexport const completeProfile = async (kind: EmailVerificationKind, key: string, name: string): Promise<Result> => {\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<Result> => {\n  return await http.post(`/_api/admin/roles/${role}/users`, {\n    userID,\n  })\n}\n\nexport const blockUser = async (userID: number): Promise<Result> => {\n  return await http.put(`/_api/admin/users/${userID}/block`)\n}\n\nexport const unblockUser = async (userID: number): Promise<Result> => {\n  return await http.delete(`/_api/admin/users/${userID}/block`)\n}\n\nexport const getOAuthConfig = async (provider: string): Promise<Result<OAuthConfig>> => {\n  return await http.get<OAuthConfig>(`/_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<Result> => {\n  return await http.post(\"/_api/admin/oauth\", request)\n}\n","import { http, Result } from \"@fider/services\"\nimport { Notification } from \"@fider/models\"\n\nexport const getTotalUnreadNotifications = async (): Promise<Result<number>> => {\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 getAllNotifications = async (): Promise<Result<Notification[]>> => {\n  return http.get<Notification[]>(\"/_api/notifications/unread\")\n}\n\nexport const markAllAsRead = async (): Promise<Result> => {\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<Result> => {\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<Result> => {\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<Result | undefined> => {\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 : \"<not available>\",\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<Result<{ id: number }>> => {\n  return await http.post(`/_api/admin/webhook`, data)\n}\n\nexport const updateWebhook = async (id: number, data: WebhookData): Promise<Result> => {\n  return await http.put(`/_api/admin/webhook/${id}`, data)\n}\n\nexport const deleteWebhook = async (id: number): Promise<Result> => {\n  return await http.delete(`/_api/admin/webhook/${id}`)\n}\n\nexport const testWebhook = async (id: number): Promise<Result<WebhookTriggerResult>> => {\n  return await http.get(`/_api/admin/webhook/test/${id}`)\n}\n\nexport const previewWebhook = async (type: WebhookType, url: string, content: string): Promise<Result<WebhookPreviewResult>> => {\n  return await http.post(\"/_api/admin/webhook/preview\", { type, url, content })\n}\n\nexport const getWebhookHelp = async (type: WebhookType): Promise<Result<StringObject>> => {\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<Result<CheckoutPageLink>> => {\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      <I18nProvider i18n={i18n}>\n        <ToastContainer position={toast.POSITION.TOP_RIGHT} />\n      </I18nProvider>,\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","showEmail","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","changeToggleState","newState","onToggled","handleClick","contains","listClassName","wide","fullsceenSm","toggleIsOpen","renderHandle","ListItem","useContext","Money","formatter","Intl","NumberFormat","currency","amount","setTimeout","values","VoteCounter","hasVoted","setHasVoted","post","votesCount","setVotesCount","isDisabled","closed","isReadOnly","vote","action","FaCaretUp","NotificationItem","_ref","notification","openNotification","authorName","Fider","currentLocale","createdAt","NotificationIcon","_ref2","unreadNotifications","IconBell","setUnreadNotifications","showingNotifications","setShowingNotifications","recent","setRecent","unread","setUnread","then","data","item","read","reload","divide","n","NoDataIllustration","availableEmojis","Reactions","emojiSelectorRef","toggleReaction","reactions","isEmojiSelectorOpen","setIsEmojiSelectorOpen","handleClickOutside","ReactionAdd","emoji","reaction","_extends","includesMe","ReadOnlyNotice","isAdministrator","Stack","dir","flex","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","initData","pSettings","pSession","el","parse","textContent","innerText","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","it","nl","de","fr","pl","ru","sk","tr","zh","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","toggleCommentReaction","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","getAllNotifications","markAllAsRead","sendInvites","subject","recipients","sendSampleInvite","ignoreErrors","logError","pattern","createWebhook","updateWebhook","deleteWebhook","testWebhook","previewWebhook","getWebhookHelp","generateCheckoutLink","planId","hasContainer","setup","I18nProvider","ToastContainer","POSITION","TOP_RIGHT"],"sourceRoot":""}