{"version":3,"file":"safe_generator-D3DENBIR.js","sources":["../../../app/javascript/components/SafeGenerator/components/FormattedNumberField.jsx","../../../app/javascript/components/SafeGenerator/components/CardFooter.jsx","../../../app/javascript/components/SafeGenerator/utils.jsx","../../../app/javascript/components/SafeGenerator/components/SafeTermForm.jsx","../../../app/javascript/components/SafeGenerator/components/CompanyInformationForm.jsx","../../../app/javascript/components/SafeGenerator/components/InvestorInformationForm.jsx","../../../app/javascript/components/SafeGenerator/components/GenerateLinksModal.jsx","../../../app/javascript/components/SafeGenerator/components/GeneratePdf.jsx","../../../app/javascript/components/SafeGenerator/index.jsx","../../../app/javascript/entrypoints/safe_generator.ts"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Controller } from 'react-hook-form';\nimport NumberFormat from 'react-number-format';\n\nconst FormattedNumberField = ({\n name,\n control,\n className,\n placeholder,\n rules,\n}) => (\n (\n onChange(v.value)}\n value={value}\n />\n )}\n rules={rules}\n name={name}\n control={control}\n fixedDecimalScale\n />\n);\n\nFormattedNumberField.propTypes = {\n name: PropTypes.string.isRequired,\n control: PropTypes.object.isRequired,\n rules: PropTypes.object,\n placeholder: PropTypes.string,\n className: PropTypes.string,\n};\n\nFormattedNumberField.defaultProps = {\n rules: {},\n placeholder: '',\n className: '',\n};\n\nexport default FormattedNumberField;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Spinner } from 'reactstrap';\n\nimport ESign from '../../../css/icons/ESign';\nimport DownloadSvg from '../../../css/icons/Download';\n\nfunction CardFooter({\n step,\n skipBackBtn,\n loading,\n showDownloadPdf,\n showGeneratePdf,\n handleBack,\n handleDownloadPdf,\n handleGatherSignatures,\n handleSaveAndContinue,\n buttonCopy,\n}) {\n return (\n
\n
\n
\n {!skipBackBtn && (\n handleBack(step)}\n >\n \n Back\n \n )}\n
\n
\n {!showDownloadPdf && !showGeneratePdf && (\n handleSaveAndContinue(step)}\n >\n {buttonCopy}\n \n \n )}\n
\n
\n
\n );\n}\n\nCardFooter.defaultProps = {\n loading: false,\n skipBackBtn: false,\n showDownloadPdf: false,\n showGeneratePdf: false,\n buttonCopy: 'Save & Continue',\n handleDownloadPdf: () => {},\n handleGatherSignatures: () => {},\n handleSaveAndContinue: () => {},\n};\n\nCardFooter.propTypes = {\n skipBackBtn: PropTypes.bool,\n showGeneratePdf: PropTypes.bool,\n buttonCopy: PropTypes.string,\n loading: PropTypes.bool,\n showDownloadPdf: PropTypes.bool,\n step: PropTypes.string.isRequired,\n handleBack: PropTypes.func.isRequired,\n handleDownloadPdf: PropTypes.func,\n handleGatherSignatures: PropTypes.func,\n handleSaveAndContinue: PropTypes.func,\n};\n\nexport default CardFooter;\n","import React from 'react';\n\nexport const renderOptionForSelect = (options) =>\n options.map((option) => (\n \n ));\n\nexport const generateOptionsMap = (options) =>\n Object.keys(options).map((value) => ({\n label: options[value],\n value: options[value],\n }));\n\nexport const downloadPdf = (safePdfBlobData) => {\n const blob = new Blob([safePdfBlobData], { type: 'application/pdf' });\n\n // IE\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\n window.navigator.msSaveOrOpenBlob(\n safePdfBlobData,\n `SAFE-new-${new Date().getTime()}.pdf`,\n );\n return;\n }\n\n // // Chrome, FF\n const fileUrl = URL.createObjectURL(blob);\n const w = window.open(fileUrl, '_blank');\n // eslint-disable-next-line no-unused-expressions\n w && w.focus();\n\n const a = document.createElement('a');\n a.href = fileUrl;\n a.download = `SAFE-new-${new Date().getTime()}.pdf`;\n document.body.appendChild(a);\n a.click();\n};\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { useFormContext } from 'react-hook-form';\n\nimport FormattedNumberField from './FormattedNumberField';\nimport CardFooter from './CardFooter';\nimport { renderOptionForSelect } from '../utils';\nimport {\n SAFE_TYPE_OPTIONS,\n PRORATA_RIGHT_OPTIONS,\n DISCOUNT_SAFE_TYPES,\n UNCAPPED_SAFE_TYPES,\n PREMONEY_SAFE_TYPES,\n} from '../constants';\n\nimport { validateValuation } from '../../../dashboards/components/fundraising/utils';\n\nfunction SafeTerm({\n step,\n handleBack,\n handleSaveAndContinue,\n marketDataAsOf,\n marketDataMedianRoundSeed,\n marketDataMedianValuation,\n blurredValuationsImage,\n}) {\n const { register, errors, watch, control } = useFormContext();\n const fieldErrors = errors && errors.safeTerms;\n const watchSafeType = watch('safeTerms[safeType]');\n const isDiscountSafeType = DISCOUNT_SAFE_TYPES.includes(watchSafeType);\n const isUncappedSafeType = UNCAPPED_SAFE_TYPES.includes(watchSafeType);\n const isPreMoneySafe = PREMONEY_SAFE_TYPES.includes(watchSafeType);\n\n const valuationAndDiscountFieldClasses = classNames('col-12', {\n 'col-md-4': isDiscountSafeType,\n 'col-md-6': !isUncappedSafeType && !isDiscountSafeType,\n });\n const proRataRightFieldClasses = classNames('col-12', {\n 'col-md-4': isDiscountSafeType,\n 'col-md-6': !isUncappedSafeType && !isDiscountSafeType,\n 'col-md-12': isUncappedSafeType,\n });\n const proRataOptions = isPreMoneySafe\n ? [PRORATA_RIGHT_OPTIONS[1]]\n : PRORATA_RIGHT_OPTIONS;\n\n return (\n
\n
\n
\n
\n \n SAFE Terms \n \n
\n
\n
\n
\n
\n \n\n \n {renderOptionForSelect(SAFE_TYPE_OPTIONS)}\n \n {fieldErrors && fieldErrors.safeType && (\n \n {fieldErrors.safeType.message}\n \n )}\n
\n
\n
\n
\n {!isUncappedSafeType && (\n <>\n
\n
\n \n
\n \n $\n \n \n
\n {fieldErrors && fieldErrors.valuationCap && (\n \n {fieldErrors.valuationCap.message}\n \n )}\n
\n
\n {isDiscountSafeType && (\n
\n
\n \n
\n \n \n %\n \n
\n\n {fieldErrors && fieldErrors.discount && (\n \n {fieldErrors.discount.message}\n \n )}\n
\n
\n )}\n \n )}\n
\n
\n \n \n {renderOptionForSelect(proRataOptions)}\n \n {fieldErrors && fieldErrors.name && (\n \n {fieldErrors.includeProRataRights.message}\n \n )}\n
\n
\n
\n
\n
\n
\n

AngelList Market Data

\n \n As of \n {marketDataAsOf}, AngelList Venture market data indicates that\n the \n median startup\n  using SAFEs for a \n Seed Stage\n  round raised \n {marketDataMedianRoundSeed}\n  using a Post Money SAFE with a valuation cap of \n {marketDataMedianValuation}\n .\n
\n
\n \n \n View {marketDataAsOf} Market Terms by Industry & Stage\n \n
\n
\n
\n \n \n \n
\n
\n
\n \n
\n
\n
\n
\n );\n}\n\nSafeTerm.propTypes = {\n step: PropTypes.string.isRequired,\n handleBack: PropTypes.func.isRequired,\n handleSaveAndContinue: PropTypes.func.isRequired,\n marketDataAsOf: PropTypes.string.isRequired,\n marketDataMedianRoundSeed: PropTypes.string.isRequired,\n marketDataMedianValuation: PropTypes.string.isRequired,\n blurredValuationsImage: PropTypes.string.isRequired,\n};\n\nexport default SafeTerm;\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { useFormContext } from 'react-hook-form';\n\nimport CardFooter from './CardFooter';\nimport { renderOptionForSelect, generateOptionsMap } from '../utils';\nimport { US_STATES, EMAIL_REGEX } from '../constants';\n\nfunction CompanyInformationForm({ step, handleBack, handleSaveAndContinue }) {\n const { register, errors } = useFormContext();\n const fieldErrors = errors && errors.companyInformation;\n\n return (\n
\n
\n
\n
\n \n Company Information \n \n
\n
\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.name && (\n \n {fieldErrors.name.message}\n \n )}\n
\n
\n
\n
\n \n \n {renderOptionForSelect(generateOptionsMap(US_STATES))}\n \n {fieldErrors && fieldErrors.stateOfIncorporation && (\n \n {fieldErrors.stateOfIncorporation.message}\n \n )}\n
\n
\n
\n\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.founderName && (\n \n {fieldErrors.founderName.message}\n \n )}\n
\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.founderName && (\n \n {fieldErrors.founderName.message}\n \n )}\n
\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.founderEmail && (\n \n {fieldErrors.founderEmail.message}\n \n )}\n
\n
\n\n
\n
\n \n \n {fieldErrors && fieldErrors.companyAddress && (\n \n {fieldErrors.companyAddress.message}\n \n )}\n
\n
\n
\n
\n
\n \n
\n
\n
\n );\n}\n\nCompanyInformationForm.propTypes = {\n step: PropTypes.string.isRequired,\n handleBack: PropTypes.func.isRequired,\n handleSaveAndContinue: PropTypes.func.isRequired,\n};\n\nexport default CompanyInformationForm;\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { useFormContext } from 'react-hook-form';\n\nimport FormattedNumberField from './FormattedNumberField';\nimport CardFooter from './CardFooter';\nimport { EMAIL_REGEX, INVESTOR_TYPE_OPTIONS } from '../constants';\nimport { renderOptionForSelect } from '../utils';\n\nfunction InvestorInformationForm({ step, handleBack, handleSaveAndContinue }) {\n const { register, errors, watch, control } = useFormContext();\n const fieldErrors = errors && errors.investorInformation;\n const watchEntityType = watch('investorInformation[entityType]');\n\n return (\n
\n
\n
\n
\n \n Investor Information \n \n
\n
\n
\n
\n
\n \n
\n \n $\n \n \n
\n {fieldErrors && fieldErrors.amount && (\n \n {fieldErrors.amount.message}\n \n )}\n
\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.companyName && (\n \n {fieldErrors.companyName.message}\n \n )}\n
\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.companyName && (\n \n {fieldErrors.companyName.message}\n \n )}\n
\n
\n
\n
\n
\n \n Investor Signature Block \n \n
\n
\n
\n
\n
\n
\n \n \n {renderOptionForSelect(INVESTOR_TYPE_OPTIONS)}\n \n {fieldErrors && fieldErrors.entityType && (\n \n {fieldErrors.entityType.message}\n \n )}\n
\n
\n\n {(watchEntityType === 'venture_fund' ||\n watchEntityType === 'entity') && (\n <>\n
\n
\n \n \n {fieldErrors && fieldErrors.signatory && (\n \n {fieldErrors.signatory.message}\n \n )}\n
\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.signatoryTitle && (\n \n {fieldErrors.signatoryTitle.message}\n \n )}\n
\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.investorEmail && (\n \n {fieldErrors.investorEmail.message}\n \n )}\n
\n
\n\n
\n
\n \n \n {fieldErrors && fieldErrors.investorAddress && (\n \n {fieldErrors.investorAddress.message}\n \n )}\n
\n
\n\n
\n
\n \n \n {fieldErrors && fieldErrors.investorByLines && (\n \n {fieldErrors.investorByLines.message}\n \n )}\n
\n
\n \n )}\n {watchEntityType === 'individual' && (\n <>\n
\n
\n \n \n {fieldErrors && fieldErrors.investorEmail && (\n \n {fieldErrors.investorEmail.message}\n \n )}\n
\n
\n
\n
\n \n \n {fieldErrors && fieldErrors.investorAddress && (\n \n {fieldErrors.investorAddress.message}\n \n )}\n
\n
\n \n )}\n
\n
\n
\n \n
\n
\n
\n );\n}\n\nInvestorInformationForm.propTypes = {\n step: PropTypes.string.isRequired,\n handleBack: PropTypes.func.isRequired,\n handleSaveAndContinue: PropTypes.func.isRequired,\n};\n\nexport default InvestorInformationForm;\n","/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport React, { useState } from 'react';\nimport { Spinner } from 'reactstrap';\nimport useCopyClipboard from '../../../dashboards/components/common/hooks/useCopyClipboard';\n\nconst GenerateLinksModal = () => {\n const [linksLoading, setLinksLoading] = useState(false);\n const [isCopied, setCopied] = useCopyClipboard();\n\n const [links, setLinks] = useState({\n investorLink: null,\n founderLink: null,\n });\n\n const safeFormState = JSON.parse(localStorage.getItem('safeFormState'));\n\n const onGenerateLinksSubmit = () => {\n if (linksLoading) return;\n\n setLinksLoading(true);\n const csrfToken = document\n .querySelector('meta[name=\"csrf-token\"]')\n .getAttribute('content');\n\n fetch('/safe/generate_links', {\n method: 'POST',\n credentials: 'same-origin',\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/pdf',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': csrfToken,\n },\n body: JSON.stringify({ safe_gen: safeFormState }),\n })\n .then((response) => response.json())\n .then((response) => {\n setLinks({\n investorLink: response.investor_link,\n founderLink: response.founder_link,\n });\n setLinksLoading(false);\n });\n };\n\n if (links.investorLink === null && !linksLoading) {\n onGenerateLinksSubmit();\n }\n const founderLinkText = links.founderLink || 'Loading...';\n const investorLinkText = links.investorLink || 'Loading...';\n\n const investorCopyButtonText = isCopied ? (\n <>\n \n Copied\n \n ) : (\n 'Copy Link'\n );\n\n return (\n <>\n
\n
\n
\n

Founder

\n

\n If you are the signatory for the SAFE, sign as the founder by\n using this URL\n

\n\n
\n \n
\n \n {linksLoading ? (\n <>\n \n Loading \n \n ) : (\n 'Sign Now'\n )}\n \n
\n
\n

Investor

\n

\n Send this link to the investor signing the SAFE\n

\n
\n \n
\n setCopied(links.investorLink)}\n disabled={linksLoading}\n className=\"btn btn-block btn-success-soft\"\n >\n {linksLoading ? (\n <>\n \n Loading \n \n ) : (\n investorCopyButtonText\n )}\n
\n
\n
\n \n \n );\n};\n\nexport default GenerateLinksModal;\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Spinner } from 'reactstrap';\n\nimport CardFooter from './CardFooter';\nimport { downloadPdf } from '../utils';\n\nimport ESign from '../../../css/icons/ESign';\nimport DownloadSvg from '../../../css/icons/Download';\n\nimport Modal from '../../../dashboards/components/common/Modal';\nimport useModal from '../../../dashboards/components/common/hooks/useModal';\nimport GenerateLinksModal from './GenerateLinksModal';\n\nfunction GeneratePdf({ step, loading, safePdfBlobData, handleBack }) {\n const { modal, openModal, toggleModal } = useModal();\n\n const handleDownloadPdf = () => downloadPdf(safePdfBlobData);\n\n const handleGatherSignatures = () => {\n openModal();\n };\n\n const showDownloadPdf = !!safePdfBlobData;\n const showGeneratePdf = true;\n\n return (\n
\n \n \n \n
\n
\n
\n \n Generate SAFE \n \n
\n
\n
\n
\n

eSign with SAFE.new

\n
    \n
  • \n {' '}\n SAFE.new can collect eSignatures from founders or investors{' '}\n
  • \n
  • Share a single link with the investor
  • \n
  • Totally Free
  • \n
\n
\n
\n \n \n Sign Now\n \n\n {!showDownloadPdf && showGeneratePdf && (\n \n {loading ? (\n \n ) : (\n \n )}\n View PDF\n \n )}\n {showDownloadPdf && (\n \n \n View PDF\n \n )}\n
\n
\n\n
\n\n

\n By using this service, I agree to the \n \n Privacy Policy\n \n , \n \n Terms of Service\n \n , and the disclosures listed below.\n

\n\n \n
    \n
  • \n \n You must consult with your own attorney or legal counsel for\n any legal advice. AngelList is not a law firm and its\n employees cannot act as your attorney. This is not a\n substitute for an attorney.\n \n
  • \n
  • \n \n You are responsible for reviewing the accuracy of the data\n you enter and the documents being generated. Other than the\n data you provide, these documents will not be customized for\n you.\n \n
  • \n
\n
\n
\n
\n \n
\n
\n
\n );\n}\n\nGeneratePdf.defaultProps = {\n safePdfBlobData: {},\n};\n\nGeneratePdf.propTypes = {\n step: PropTypes.string.isRequired,\n loading: PropTypes.bool.isRequired,\n safePdfBlobData: PropTypes.object,\n handleBack: PropTypes.func.isRequired,\n};\n\nexport default GeneratePdf;\n","import React, { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { useForm, FormProvider } from 'react-hook-form';\n\nimport SafeTermForm from './components/SafeTermForm';\nimport CompanyInformationForm from './components/CompanyInformationForm';\nimport InvestorInformationForm from './components/InvestorInformationForm';\nimport GeneratePdf from './components/GeneratePdf';\nimport { downloadPdf } from './utils';\n\nimport { SAFE_NAV_MENU_ITEMS, NAVIGATION_STEPS } from './constants';\n\nfunction SafeGenerator(props) {\n const { marketDataMedianValuationFloat } = props;\n\n const defaultValues = {\n safeTerms: {\n safeType: 'post_money_val_cap',\n valuationCap: marketDataMedianValuationFloat || 12000000,\n includeProRataRights: 'no_prorata',\n },\n investorInformation: {\n entityType: 'individual',\n },\n };\n const safeFormState = JSON.parse(localStorage.getItem('safeFormState'));\n const methods = useForm({\n defaultValues: {\n ...defaultValues,\n ...safeFormState,\n },\n });\n const [currentStep, setCurrentStep] = useState('safeTerms');\n const [safePdfBlobData, setSafePdfBlobData] = useState(null);\n const [loading, setLoading] = useState(false);\n\n useEffect(() => {\n methods.reset({ ...defaultValues, ...safeFormState });\n }, [currentStep]);\n\n const handleSaveAndContinue = (step) => {\n methods.trigger().then((isValid) => {\n if (isValid) {\n const newFormState = {\n ...safeFormState,\n [step]: methods.getValues()[step],\n };\n\n localStorage.setItem('safeFormState', JSON.stringify(newFormState));\n setCurrentStep(NAVIGATION_STEPS[step].next);\n setSafePdfBlobData(null);\n }\n });\n };\n\n const handleBack = (step) => {\n setCurrentStep(NAVIGATION_STEPS[step].prev);\n };\n\n const onSubmit = () => {\n setLoading(true);\n\n localStorage.setItem('safeFormState', JSON.stringify(safeFormState));\n const csrfToken = document\n .querySelector('meta[name=\"csrf-token\"]')\n .getAttribute('content');\n\n fetch('/safe/create', {\n method: 'POST',\n credentials: 'same-origin',\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/pdf',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': csrfToken,\n },\n body: JSON.stringify({ safe_gen: safeFormState }),\n })\n .then((response) => {\n if (response.ok) {\n return response.blob();\n }\n })\n .then((data) => {\n setSafePdfBlobData(data);\n setLoading(false);\n downloadPdf(data);\n });\n };\n\n const renderNavMenuItems = () =>\n Object.keys(SAFE_NAV_MENU_ITEMS).map((menuItem, index) => {\n const stepIconClasses = classNames('step-icon step-icon-xs', {\n 'active step-icon-primary': currentStep === menuItem,\n 'step-icon-soft-primary': currentStep !== menuItem,\n });\n\n return (\n
  • \n
    \n {index + 1}\n
    \n \n {SAFE_NAV_MENU_ITEMS[menuItem]}\n \n
    \n
    \n
  • \n );\n });\n\n return (\n <>\n
    \n
     
    \n \n
    \n\n
    \n \n
    \n {currentStep === 'safeTerms' && (\n \n )}\n {currentStep === 'companyInformation' && (\n \n )}\n {currentStep === 'investorInformation' && (\n \n )}\n {currentStep === 'generatePdf' && (\n \n )}\n \n
    \n
    \n \n );\n}\n\nSafeGenerator.propTypes = {\n marketDataMedianValuationFloat: PropTypes.isRequired,\n};\n\nexport default SafeGenerator;\n","import initApp from './common';\nimport SafeGenerator from '../components/SafeGenerator/index';\n\ninitApp(SafeGenerator, { root: 'safe-generator-root' });\n"],"names":["FormattedNumberField","name","control","className","placeholder","rules","jsx","Controller","onChange","value","NumberFormat","v","PropTypes","CardFooter","step","skipBackBtn","loading","showDownloadPdf","showGeneratePdf","handleBack","handleDownloadPdf","handleGatherSignatures","handleSaveAndContinue","buttonCopy","jsxs","renderOptionForSelect","options","option","generateOptionsMap","downloadPdf","safePdfBlobData","blob","fileUrl","w","a","SafeTerm","marketDataAsOf","marketDataMedianRoundSeed","marketDataMedianValuation","blurredValuationsImage","register","errors","watch","useFormContext","fieldErrors","watchSafeType","isDiscountSafeType","DISCOUNT_SAFE_TYPES","isUncappedSafeType","UNCAPPED_SAFE_TYPES","isPreMoneySafe","PREMONEY_SAFE_TYPES","valuationAndDiscountFieldClasses","classNames","proRataRightFieldClasses","proRataOptions","PRORATA_RIGHT_OPTIONS","SAFE_TYPE_OPTIONS","Fragment","validateValuation","CompanyInformationForm","US_STATES","EMAIL_REGEX","InvestorInformationForm","watchEntityType","INVESTOR_TYPE_OPTIONS","GenerateLinksModal","linksLoading","setLinksLoading","useState","isCopied","setCopied","useCopyClipboard","links","setLinks","safeFormState","onGenerateLinksSubmit","csrfToken","response","founderLinkText","investorLinkText","investorCopyButtonText","Spinner","GeneratePdf","modal","openModal","toggleModal","useModal","Modal","ESign","DownloadSvg","SafeGenerator","props","marketDataMedianValuationFloat","defaultValues","methods","useForm","currentStep","setCurrentStep","setSafePdfBlobData","setLoading","useEffect","isValid","newFormState","NAVIGATION_STEPS","onSubmit","data","renderNavMenuItems","SAFE_NAV_MENU_ITEMS","menuItem","index","stepIconClasses","FormProvider","SafeTermForm","initApp"],"mappings":"w0DAKA,MAAMA,EAAuB,CAAC,CAC5B,KAAAC,EACA,QAAAC,EACA,UAAAC,EACA,YAAAC,EACA,MA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