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AAAtF,EAAA9K,UAAA,kBAAA8K,EAAA9K,WAAAkQ,EAAApF,EAAA9K,UAAA,cAKRmQ,EAAAA,IAAQzV,OAAA0V,yBAAAtF,EAAA9K,UAAA,cAAA8K,EAAA9K,WAAA8K,E,sBClIX,KAAgB,qBAAuB,KAAK,QAAU,KAAK,QAAU,KAAK,QAAU,MAAM,QAAU,MAAM,UAAY,+DAA+D,WAAa,wCAAwC,QAAU,qCAAqC,WAAa,wCAAwC,QAAU,qCAAqC,QAAU,qCAAqC,OAAS,oCAAoC,IAAM,iCAAiC,UAAY,uCAAuC,aAAe,0CAA0C,YAAc,yCAAyC,WAAa,wCAAwC,eAAiB,4C,sBCAzuB,KAAgB,OAAS,8CAA8C,KAAO,4CAA4C,YAAc,mDAAmD,SAAW,gDAAgD,MAAQ,6CAA6C,KAAO,4CAA4C,eAAe,oDAAoD,eAAe,oDAAoD,eAAe,oDAAoD,QAAU,+CAA+C,0BAA0B,+DAA+D,0BAA0B,+DAA+D,mCAAmC,wEAAwE,eAAe,oD,sBCA54B,KAAgB,mBAAqB,yDAAyD,KAAO,2CAA2C,UAAY,gDAAgD,YAAc,kDAAkD,QAAU,8CAA8C,QAAU,8CAA8C,aAAe,mDAAmD,aAAe,mDAAmD,qBAAuB,2DAA2D,YAAc,kDAAkD,oBAAsB,0DAA0D,WAAa,iDAAiD,UAAY,gD","sources":["webpack://AYTM/./app/_stock/webpack/app/lib/regex.js","webpack://AYTM/./app/_stock/webpack/app/survey/editor/lib/logic/labels/labelMatch.js","webpack://AYTM/./app/_stock/webpack/app/survey/editor/lib/logic/statements.js","webpack://AYTM/./app/_stock/webpack/app/survey/editor/lib/text-count.js","webpack://AYTM/./app/_stock/webpack/app/survey/editor/resources/features.js","webpack://AYTM/./app/_stock/webpack/app/survey/editor/resources/urls.js","webpack://AYTM/./app/_stock/webpack/lib/common/assets.ts","webpack://AYTM/./app/_stock/webpack/lib/common/components/decorators/ContextProvider.jsx","webpack://AYTM/./app/_stock/webpack/lib/common/components/decorators/ContextSubscriber.jsx","webpack://AYTM/./app/_stock/webpack/lib/common/components/pure-component.jsx","webpack://AYTM/./app/_stock/webpack/lib/common/copy-to-clipboard.js","webpack://AYTM/./app/_stock/webpack/lib/layout/container-expander.js","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/decorators/ErrorsDecoratorPopup.jsx","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/decorators/ErrorsDecoratorFactory.js","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/components/SuggestionItem.jsx","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/components/Suggestions.jsx","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/lib/default-process-text.js","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/decorators/compound-decorator.js","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/index.js","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/suggestions-builder.js","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/lib/get-selection-coords.js","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/basic/button.jsx","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/basic/light-box.jsx","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/styles/basic/loader-dots.module.scss?b7a9","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/basic/loader-dots.jsx","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/basic/loader-wave.jsx","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/basic/masked-input.jsx","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/components/basic/text-field.jsx","webpack://AYTM/./app/_stock/webpack/app/survey/editor/styles/lib/ErrorPopup.module.scss?859b","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/styles/SuggestionsComponent.module.scss?534c","webpack://AYTM/./app/_stock/webpack/lib/rfd-ui/styles/advanced/draft-js-decorators.module.scss?59d7"],"sourcesContent":["export const EMAIL_REGEX =\n // eslint-disable-next-line unicorn/no-unsafe-regex\n /^(([^\\s\"(),.:;<>@[\\\\\\]]+(\\.[^\\s\"(),.:;<>@[\\\\\\]]+)*)|(\".+\"))@((\\[(?:\\d{1,3}\\.){3}\\d{1,3}])|(([\\dA-Za-z-]+\\.)+[A-Za-z]{2,}))$/\n","/* eslint-disable unicorn/no-unsafe-regex */\n\nconst labelMatch =\n /([^?@]|^)\\b((p?q)(\\d+[:-]\\d+|(\\d+\\.)+\\d+|(\\d+,)+\\d+|\\d+)([a-z]+(\\d+[:-]\\d+|(\\d+\\.)+\\d+|(\\d+,)+\\d+|\\d+))*([a-z])*)\\b/gi\nexport const errorLabelMatch =\n /(\\?\\b(p?q)(\\d+[:-]\\d+|(\\d+\\.)+\\d+|(\\d+,)+\\d+|\\d+)([a-z]+(\\d+[:-]\\d+|(\\d+\\.)+\\d+|(\\d+,)+\\d+|\\d+))*([a-z])*)\\b/gi\nexport default labelMatch\n","// lib\nimport labelMatch, { errorLabelMatch } from '@aytm/app/survey/editor/lib/logic/labels/labelMatch'\n\n// constants\n// eslint-disable-next-line unicorn/no-unsafe-regex\nexport const AYTM_LOGIC_STATEMENT_MATCH = /\\[(([^[\\]]+|\\[([^\\]]*][^[\\]]+))(\\[[^\\]]*][^[\\]]*)*)](?!])/gm\nexport const AYTM_LOGIC_ESCAPE_BRACKET_MATCH = /(\\[\\[+)[^[\\]]*(]]+)/gm\nexport const AYTM_LOGIC_ESCAPE_BRACKET_REGEXP = new RegExp(AYTM_LOGIC_ESCAPE_BRACKET_MATCH, 'm')\nexport const AYTM_LOGIC_STATEMENT_STRING_MATCH = /\"([^\"[\\]]*)\"/gm\nexport const AYTM_LOGIC_TOKEN_MATCH = /[a-z]\\w*/i\n\nexport function extractLogicStatementsFromText(text = '') {\n const statements = text.match(AYTM_LOGIC_STATEMENT_MATCH) || []\n return (\n statements\n // filter escaped bracket statement\n .filter(statement => !AYTM_LOGIC_ESCAPE_BRACKET_REGEXP.test(statement))\n // remove [ and ] from statements\n .map(statement => statement.slice(1, -1))\n )\n}\n\nexport function replaceLogicStatementsInText(text = '', replacer) {\n return text.replace(AYTM_LOGIC_STATEMENT_MATCH, statement =>\n AYTM_LOGIC_ESCAPE_BRACKET_REGEXP.test(statement) ? statement : `[${replacer(statement.slice(1, -1))}]`\n )\n}\n\nexport function extractRefsFromLogicStatement(statement = '') {\n const refs = []\n let match\n while (null !== (match = labelMatch.exec(statement))) {\n refs.push(match[2])\n }\n return refs\n}\n\nexport function extractErrorRefsFromLogicStatement(statement = '') {\n const refs = []\n let match\n while (null !== (match = errorLabelMatch.exec(statement))) {\n refs.push(match[1])\n }\n return refs\n}\n","// lib\nimport {\n AYTM_LOGIC_STATEMENT_MATCH,\n AYTM_LOGIC_ESCAPE_BRACKET_MATCH\n} from '@aytm/app/survey/editor/lib/logic/statements'\n\nexport default function countText(text = '') {\n return text\n .replace(AYTM_LOGIC_STATEMENT_MATCH, '')\n .replace(AYTM_LOGIC_ESCAPE_BRACKET_MATCH, match => match.slice(1, -1)).length\n}\n","// lib\nimport { Map } from 'immutable'\n\n// features\nconst featuresStore = {\n //editorUID: features: Map()\n}\n\nexport function getFeatures(editorUID) {\n return featuresStore[editorUID] || Map()\n}\nexport function getFeature(editorUID, featureUID) {\n return getFeatures(editorUID).get(featureUID) || Map({ status: 'on' })\n}\nexport function getFeatureUpgradePackage(editorUID, featureUID) {\n return featureUID ? getFeatures(editorUID).getIn([featureUID, 'onPackage'], null) : null\n}\nexport function getFeatureStatus(editorUID, featureUID) {\n return getFeatures(editorUID).getIn([featureUID, 'status']) || 'off'\n}\nexport function hasFeatureStatus(editorUID, featureUID, ...statuses) {\n const feature = getFeature(editorUID, featureUID)\n return feature && feature.has('status') && statuses.includes(feature.get('status'))\n}\nexport function isFeatureOn(editorUID, featureUID) {\n return hasFeatureStatus(editorUID, featureUID, 'on')\n}\nexport function isFeatureOff(editorUID, featureUID) {\n return hasFeatureStatus(editorUID, featureUID, 'off')\n}\nexport function setFeatures(editorUID, features) {\n featuresStore[editorUID] = features\n}\n\nfunction questionTypeFeature(editorUID, questionType, questionMode = '') {\n switch (questionType) {\n case 'va': {\n return getFeature(editorUID, 'video_response')\n }\n case 'ir': {\n return getFeature(editorUID, 'image_response')\n }\n case 'cjc': {\n return getFeature(editorUID, 'conjoint_lite')\n }\n case 'cjd': {\n return getFeature(editorUID, 'conjoint_deep')\n }\n case 'md': {\n return 'express' == questionMode ? getFeature(editorUID, 'maxdiff') : getFeature(editorUID, 'maxdiff_hd')\n }\n default: {\n return getFeature(editorUID, questionType)\n }\n }\n}\nexport function getQuestionTypeStatus(editorUID, questionType, questionMode) {\n return questionTypeFeature(editorUID, questionType, questionMode).get('status', 'on')\n}\nexport function getQuestionTypeUpgradePackage(editorUID, questionType, questionMode) {\n return questionTypeFeature(editorUID, questionType, questionMode).get('onPackage')\n}\nexport function isQuestionTypeAvailable(editorUID, questionType, questionMode) {\n return ['on', 'available'].includes(getQuestionTypeStatus(editorUID, questionType, questionMode))\n}\n","export function base(projectUID) {\n return projectUID ? `/surveys/${projectUID}` : '/surveys'\n}\n\nexport function checkout(projectUID) {\n return `/surveys/${projectUID}/checkout`\n}\n\nexport function validate(projectUID) {\n return `/surveys/${projectUID}/validate_structure`\n}\n\nexport function requestAccessToken(projectUID) {\n return `/surveys/${projectUID}/request_access`\n}\n\nexport function transferControl(projectUID) {\n return `/surveys/${projectUID}/transfer_control`\n}\n\nexport const editAction = 'edit'\n\nexport const viewAction = 'view'\n\nexport const correctAction = 'correct'\n\nexport const versionAction = 'version'\n\nexport const checkoutAction = 'launch_checkout'\n\nexport const newTargetMarketAction = 'new'\n\nexport const translateAction = 'translate'\n\nexport const editTargetMarketAction = 'tm'\n\nexport const graphQLEndPoint = '/graphql'\n\nimport {\n getImageAssetPath,\n IMAGE_ASSET_PATH_FILTER_RESIZE_TO_FIT,\n IMAGE_ASSET_PATH_GRAVITY_CENTER\n} from '@aytm/lib/common/assets'\nexport function imageAsset(\n path,\n {\n width = 250,\n height = 250,\n filter = IMAGE_ASSET_PATH_FILTER_RESIZE_TO_FIT,\n backgroundColor = 'white',\n unsharp = false,\n gravity = IMAGE_ASSET_PATH_GRAVITY_CENTER,\n animated = false,\n trim = false\n } = {}\n) {\n return getImageAssetPath({\n path,\n filter,\n width,\n height,\n backgroundColor,\n unsharp,\n gravity,\n animated,\n trim\n })\n}\n\nexport function getMultilingualRoute(researcherLanguage, languageUID = '', base = '/') {\n return !researcherLanguage && !languageUID\n ? `${base}${translateAction}`\n : languageUID === researcherLanguage\n ? `${base}${editAction}`\n : `${base}${translateAction}/${viewAction}/${languageUID}`\n}\n","import { IImageAsset } from '@aytm/app/swidget/base/modules/images/types'\n\nexport const IMAGE_ASSET_PATH_FILTER_RESIZE_TO_STRETCH = 'resizest'\nexport const IMAGE_ASSET_PATH_FILTER_RESIZE_TO_LIMIT = 'resizelm'\nexport const IMAGE_ASSET_PATH_FILTER_RESIZE_TO_FIT = 'resizeft'\nexport const IMAGE_ASSET_PATH_FILTER_RESIZE_TO_FILL = 'resizefl'\nexport const IMAGE_ASSET_PATH_FILTER_RESIZE_AND_PAD = 'resizepd'\nexport const IMAGE_ASSET_PATH_FILTER_SMART_CROP = 'smart_crop'\n\nexport const IMAGE_ASSET_SIZE_SMALL = 150\nexport const IMAGE_ASSET_SIZE_MIDDLE = 600\nexport const IMAGE_ASSET_SIZE_BIG = 1920\nexport const OLD_IMAGE_ASSET_WIDTH = 150\nexport const OLD_IMAGE_ASSET_HEIGHT = 68\nexport const OLD_IMAGE_ASSET_WIDTH_MEDIUM = 120\nexport const OLD_IMAGE_ASSET_HEIGHT_MEDIUM = 120\n\nexport const IMAGE_ASSET_PATH_GRAVITY_CENTER = 'c'\n\n// ON CHANGES: please also update this function in public/javascripts/_ui/js/image_resizer.js (legacy code support)\nexport function getImageAssetPath({\n host = (window as { assets_host?: string }).assets_host || '/',\n width,\n height,\n pathPrefix = 'media/cache',\n path = 'no_image',\n filter = '',\n backgroundColor = 'transparent',\n unsharp = false,\n gravity,\n animated = false,\n trim = false,\n json = false\n}: {\n host?: string\n width?: number\n height?: number\n pathPrefix?: string\n path?: string\n filter?: string\n backgroundColor?: string\n unsharp?: boolean\n gravity?: string\n animated?: boolean\n trim?: boolean\n json?: boolean\n} = {}): string {\n return `${\n // host\n '/' === host[host.length - 1] ? host : host + '/'\n }${\n // prefix\n pathPrefix\n }/${json ? 'json' : 'resolve'}/${\n // filter\n filter\n }${\n // dimensions\n width && height ? `_${width}x${height}` : ''\n }${\n // backgroundColor\n 'none' === backgroundColor ? '' : 'string' === typeof backgroundColor ? `_${backgroundColor.toLowerCase()}` : ''\n }${\n // gravity\n gravity && (IMAGE_ASSET_PATH_FILTER_RESIZE_TO_FILL === filter || IMAGE_ASSET_PATH_FILTER_RESIZE_AND_PAD === filter)\n ? `_${gravity}`\n : ''\n }${\n // unsharp\n unsharp ? '_us' : ''\n }${\n // animated\n animated ? '_an' : ''\n }${\n // trim\n trim ? '_trim' : ''\n }/${\n // path\n path\n }`\n}\n\nexport function getSmallAssetPath(asset: IImageAsset, fill?: boolean): string {\n return getImageAssetPath({\n width: IMAGE_ASSET_SIZE_SMALL,\n height: IMAGE_ASSET_SIZE_SMALL,\n filter: fill ? IMAGE_ASSET_PATH_FILTER_RESIZE_TO_FILL : IMAGE_ASSET_PATH_FILTER_RESIZE_TO_LIMIT,\n path: asset?.original_path,\n backgroundColor: 'white'\n })\n}\n\nexport function getOldSmallAssetPath(asset: IImageAsset): string {\n return getImageAssetPath({\n width: OLD_IMAGE_ASSET_WIDTH,\n height: OLD_IMAGE_ASSET_HEIGHT,\n filter: IMAGE_ASSET_PATH_FILTER_RESIZE_AND_PAD,\n backgroundColor: 'white',\n animated: true,\n path: asset?.original_path\n })\n}\n\nexport function getOldMediumAssetPath(asset: IImageAsset): string {\n return getImageAssetPath({\n width: OLD_IMAGE_ASSET_WIDTH_MEDIUM,\n height: OLD_IMAGE_ASSET_HEIGHT_MEDIUM,\n filter: IMAGE_ASSET_PATH_FILTER_RESIZE_AND_PAD,\n backgroundColor: 'white',\n animated: true,\n path: asset?.original_path\n })\n}\n\nexport function getOldLargeAssetPath(asset: IImageAsset): string {\n return getImageAssetPath({\n width: IMAGE_ASSET_SIZE_MIDDLE,\n height: IMAGE_ASSET_SIZE_MIDDLE,\n filter: IMAGE_ASSET_PATH_FILTER_RESIZE_TO_LIMIT,\n backgroundColor: 'white',\n animated: true,\n path: asset?.original_path\n })\n}\n\nexport function getMediumAssetPath(asset: IImageAsset, background?: string): string {\n return getImageAssetPath({\n width: IMAGE_ASSET_SIZE_MIDDLE,\n height: IMAGE_ASSET_SIZE_MIDDLE,\n filter: IMAGE_ASSET_PATH_FILTER_RESIZE_TO_LIMIT,\n path: asset?.original_path,\n animated: true,\n backgroundColor: background || 'white'\n })\n}\n\nexport function getBigAssetPath(asset: IImageAsset, background?: string): string {\n return getImageAssetPath({\n width: IMAGE_ASSET_SIZE_BIG,\n height: IMAGE_ASSET_SIZE_BIG,\n filter: IMAGE_ASSET_PATH_FILTER_RESIZE_TO_LIMIT,\n path: asset?.original_path,\n animated: true,\n backgroundColor: background || 'white'\n })\n}\n","import React, { Component } from 'react'\nimport hoistNonReactStatics from 'hoist-non-react-statics'\nimport PropTypes from 'prop-types'\n\nexport function nameContextProvider(name) {\n return `${name}ContextProvider`\n}\n\n// provider subscriptions class\nexport class ContextProviderSubscriptions {\n constructor({ onSubscribe, onUnsubscribe, onUnsubscribeAll, onProviderUnmount } = {}) {\n this.listeners = []\n this.values = {}\n this.subscribe = this.subscribe.bind(this)\n this.unsubscribe = this.unsubscribe.bind(this)\n this.onSubscribe = onSubscribe\n this.onUnsubscribe = onUnsubscribe\n this.onUnsubscribeAll = onUnsubscribeAll\n this.onProviderUnmount = onProviderUnmount\n }\n updateValues(newValues) {\n // notify listeners\n if (this.listeners.length) {\n for (let i = 0; i < this.listeners.length; i++) {\n const listener = this.listeners[i]\n if (listener.subscribeOn) {\n const subscribedValues = {}\n let updated = false\n for (let i = 0; i < listener.subscribeOn.length; i++) {\n const key = listener.subscribeOn[i]\n if (!updated && newValues[key] != this.values[key]) {\n updated = true\n }\n subscribedValues[key] = newValues[key]\n }\n if (updated) {\n listener(subscribedValues)\n }\n } else {\n listener(newValues)\n }\n }\n }\n // set values\n this.values = newValues\n }\n subscribe(listener) {\n // add listener if it is not exists in listeners list\n if (!this.listeners.includes(listener)) {\n this.listeners.push(listener)\n }\n // send last values to listener\n listener(this.values)\n // create bound unsubscribe function\n const unsubscribe = function () {\n return this.unsubscribe(listener)\n }.bind(this)\n // notify onSubscribe callback\n if (this.onSubscribe) {\n this.onSubscribe({ listener, unsubscribe, listeners: this.listeners })\n }\n // return unsubscribe function\n return unsubscribe\n }\n unsubscribe(listener) {\n let unsubscribed = false\n const listenerIndex = this.listeners.indexOf(listener)\n if (listenerIndex >= 0) {\n this.listeners.splice(listenerIndex, 1)\n unsubscribed = true\n }\n // notify onUnsubscribe callback\n if (this.onUnsubscribe) {\n this.onUnsubscribe({ listener, unsubscribed, listeners: this.listeners })\n }\n // notify onUnsubscribeAll callback\n if (this.onUnsubscribeAll && !this.listeners.length) {\n this.onUnsubscribeAll()\n }\n // return unsubscribed status\n return unsubscribed\n }\n providerUnmount() {\n // unsubscribe all listeners\n this.listeners.forEach(this.unsubscribe)\n // notify onProviderUnmount callback\n if (this.onProviderUnmount) {\n this.onProviderUnmount()\n }\n }\n}\n\nexport default function ContextProvider(options = {}) {\n const { name, propTypes, contextTypes, values, shouldUpdate, mapToProps } = options\n\n const propsMapper =\n 'all' == mapToProps\n ? function (values) {\n return values\n }\n : Array.isArray(mapToProps)\n ? function (values) {\n return mapToProps.reduce(function (props, key) {\n props[key] = values[key]\n return props\n }, {})\n }\n : 'object' == typeof mapToProps\n ? function (values) {\n return Object.keys(mapToProps).reduce(function (props, key) {\n props[mapToProps[key]] = values[key]\n return props\n }, {})\n }\n : 'function' == typeof mapToProps\n ? mapToProps\n : null\n\n return function (ProviderComponent) {\n if (null == values || null == name) {\n // nothing to provide\n return ProviderComponent\n }\n\n // ProviderComponent display name\n const providerComponentDisplayName = ProviderComponent.displayName || ProviderComponent.name || 'Component'\n\n // ${name}ContextProvider\n const thisNameContextProvider = nameContextProvider(name)\n\n // HOC class\n class ContextProviderComponent extends Component {\n // context propTypes\n static propTypes = propTypes\n\n // ref to wrapped component\n static WrappedComponent = ProviderComponent\n\n // display name\n static displayName = `ContextProvider[${name}](${providerComponentDisplayName})`\n\n // ref to context provider options\n static ContextProviderOptions = options\n\n // put context subscriptions into context\n static childContextTypes = {\n [thisNameContextProvider]: PropTypes.instanceOf(ContextProviderSubscriptions)\n }\n getChildContext() {\n return {\n [thisNameContextProvider]: this.subscriptions\n }\n }\n\n // fetch context values in constructor\n constructor(props) {\n super(props)\n this.fetchContextValues = this.fetchContextValues.bind(this)\n this.saveWrappedRef = this.saveWrappedRef.bind(this)\n this.saveWrappedComponentRef = this.saveWrappedComponentRef.bind(this)\n this.subscriptions = new ContextProviderSubscriptions()\n this.fetchContextValues(props)\n }\n\n // fetch context values and (optionaly) map it to props\n fetchContextValues(props) {\n // fetch values\n const fetchedValues = values.call(this, props) || {}\n // notify subscriptions\n this.subscriptions.updateValues(fetchedValues)\n // check context types\n if ('development' == process.env.NODE_ENV && contextTypes) {\n PropTypes.checkPropTypes(\n contextTypes,\n fetchedValues,\n `ContextProvider[${name}]`,\n providerComponentDisplayName\n )\n }\n // map values to props\n if (propsMapper) {\n this.contextProps = propsMapper.call(this, fetchedValues)\n }\n }\n\n // update context on props update if needed\n shouldComponentUpdate(nextProps) {\n if (shouldUpdate) {\n if (shouldUpdate.call(this, nextProps, this.props)) {\n this.fetchContextValues(nextProps)\n }\n } else {\n this.fetchContextValues(nextProps)\n }\n return true\n }\n\n // unsubscribe on unmount\n componentWillUnmount() {\n this.subscriptions.providerUnmount()\n }\n\n // save references from ManagedRenderComponent\n saveWrappedRef(name, element) {\n this[`ref${name}`] = element\n if (this.props.saveRef) {\n this.props.saveRef(name, element)\n }\n }\n\n // save wrapped component ref\n saveWrappedComponentRef(component) {\n this.refWrappedComponent = component\n }\n\n // render ProviderComponent with component props and context props\n render() {\n return (\n <ProviderComponent\n saveRef={this.saveWrappedRef}\n ref={this.saveWrappedComponentRef}\n {...this.props}\n {...this.contextProps}\n />\n )\n }\n }\n\n // copy non React static members\n hoistNonReactStatics(ContextProviderComponent, ProviderComponent)\n\n // return wrapped component\n return ContextProviderComponent\n }\n}\n","import React, { Component } from 'react'\nimport hoistNonReactStatics from 'hoist-non-react-statics'\nimport PropTypes from 'prop-types'\nimport { nameContextProvider, ContextProviderSubscriptions } from './ContextProvider'\n\nexport default function ContextSubscriber(...subscribers) {\n // normalize subscribers\n const { subscribersList, providerSubscriptionContextTypes, updateOnProps } = subscribers.reduce(\n function (data, subscriber) {\n const normalizedSubscriber =\n 'string' == typeof subscriber\n ? { name: subscriber, mapToProps: 'all' }\n : null != subscriber.name\n ? subscriber\n : null\n if (null != normalizedSubscriber) {\n if (null != normalizedSubscriber.mapToProps && 'function' != typeof normalizedSubscriber.mapToProps) {\n const mapToProps = normalizedSubscriber.mapToProps\n normalizedSubscriber.mapToProps =\n 'all' == mapToProps\n ? function (values) {\n return values\n }\n : Array.isArray(mapToProps)\n ? function (values) {\n return mapToProps.reduce(function (props, key) {\n props[key] = values[key]\n return props\n }, {})\n }\n : 'object' == typeof mapToProps\n ? function (values) {\n return Object.keys(mapToProps).reduce(function (props, key) {\n props[mapToProps[key]] = values[key]\n return props\n }, {})\n }\n : null\n }\n data.subscribersList.push(normalizedSubscriber)\n if (null == normalizedSubscriber.provider) {\n data.providerSubscriptionContextTypes[nameContextProvider(normalizedSubscriber.name)] =\n PropTypes.instanceOf(ContextProviderSubscriptions)\n }\n if (normalizedSubscriber.mapToProps && normalizedSubscriber.updateOnProps) {\n const shouldUpdate =\n 'function' == typeof normalizedSubscriber.updateOnProps\n ? normalizedSubscriber.updateOnProps\n : Array.isArray(normalizedSubscriber.updateOnProps)\n ? function (nextProps, prevProps) {\n for (let i = 0; i < normalizedSubscriber.updateOnProps.length; i++) {\n if (\n nextProps[normalizedSubscriber.updateOnProps[i]] !=\n prevProps[normalizedSubscriber.updateOnProps[i]]\n ) {\n return true\n }\n }\n return false\n }\n : null\n if (shouldUpdate) {\n if (null == data.updateOnProps) {\n data.updateOnProps = []\n }\n data.updateOnProps.push({\n name: normalizedSubscriber.name,\n shouldUpdate,\n mapToProps: normalizedSubscriber.mapToProps\n })\n }\n }\n }\n return data\n },\n { subscribersList: [], providerSubscriptionContextTypes: {}, updateOnProps: null }\n )\n\n return function (SubscribedComponent) {\n if (0 == subscribersList.length) {\n // nothing to do\n return SubscribedComponent\n }\n\n // SubscribedComponent display name\n const subscribedComponentDisplayName = SubscribedComponent.displayName || SubscribedComponent.name || 'Component'\n\n // HOC class\n class ContextSubscriberComponent extends Component {\n // propTypes\n static propTypes = {\n saveRef: PropTypes.func\n }\n\n // find providers in react context\n static contextTypes = providerSubscriptionContextTypes\n\n // display name\n static displayName = `ContextSubscriber(${subscribedComponentDisplayName})`\n\n // ref to context provider options\n static ContextSubscribers = subscribers\n\n // put contextProps into state\n constructor(props, context) {\n super(props)\n this.saveWrappedRef = this.saveWrappedRef.bind(this)\n this.saveWrappedComponentRef = this.saveWrappedComponentRef.bind(this)\n this.contextValues = {}\n this.state = {\n contextProps: {}\n }\n this.unsubscribeListeners = subscribersList\n .reduce((unsubscribeListeners, subscriber) => {\n const provider = subscriber.provider\n ? subscriber.provider(props, context)\n : context[nameContextProvider(subscriber.name)]\n if (provider) {\n const subscription = contextValues => {\n if ('development' == process.env.NODE_ENV && subscriber.contextTypes) {\n PropTypes.checkPropTypes(\n subscriber.contextTypes,\n contextValues,\n `ContextSubscriber[${subscriber.name}]`,\n subscribedComponentDisplayName\n )\n }\n this.contextValues[subscriber.name] = contextValues\n if (subscriber.mapToProps) {\n const mappedContextProps = subscriber.mapToProps.call(this, contextValues, this.props)\n if (this.mounted) {\n const mappedContextPropsKeys = Object.keys(mappedContextProps)\n if (\n mappedContextPropsKeys.some(\n mappedContextPropsKey =>\n mappedContextProps[mappedContextPropsKey] != this.state.contextProps[mappedContextPropsKey]\n )\n ) {\n this.setState(\n state => (state.contextProps = Object.assign(this.state.contextProps, mappedContextProps))\n )\n }\n } else {\n this.state.contextProps = Object.assign(this.state.contextProps, mappedContextProps)\n }\n }\n }\n if (subscriber.contextTypes) {\n subscription.subscribeOn = Object.keys(subscriber.contextTypes)\n }\n unsubscribeListeners.push(provider.subscribe(subscription))\n return unsubscribeListeners\n }\n return null\n }, [])\n .filter(x => null != x)\n }\n\n // update on every props changes\n shouldComponentUpdate() {\n return true\n }\n\n componentDidMount() {\n this.mounted = true\n }\n\n // unsubscribe listeners on componentWillUnmount\n componentWillUnmount() {\n if (this.unsubscribeListeners && this.unsubscribeListeners.length) {\n this.unsubscribeListeners.forEach(unsubscribe => {\n unsubscribe()\n })\n }\n // unmount custom providers\n for (const subscriber of subscribersList) {\n if (subscriber.provider) {\n subscriber.provider?.providerUnmount?.()\n }\n }\n this.mounted = false\n }\n\n // update on props changes if needed\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (updateOnProps) {\n const updatedContextProps = updateOnProps.reduce((props, { name, shouldUpdate, mapToProps }) => {\n if (shouldUpdate.call(this, nextProps, this.props)) {\n Object.assign(props, mapToProps.call(this, this.contextValues[name] || {}, nextProps))\n }\n return props\n }, {})\n if (Object.keys(updatedContextProps).length > 0) {\n this.setState({\n contextProps: Object.assign(this.state.contextProps, updatedContextProps)\n })\n }\n }\n }\n\n // save references from ManagedRenderComponent\n saveWrappedRef(name, element) {\n this[`ref${name}`] = element\n if (this.props.saveRef) {\n this.props.saveRef(name, element)\n }\n }\n\n // save wrapped component ref\n saveWrappedComponentRef(component) {\n this.refWrappedComponent = component\n }\n\n // render SubscribedComponent with component props and context props\n render() {\n const { contextProps } = this.state\n return (\n <SubscribedComponent\n saveRef={this.saveWrappedRef}\n ref={this.saveWrappedComponentRef}\n {...this.props}\n {...contextProps}\n />\n )\n }\n }\n\n // copy non React static members\n hoistNonReactStatics(ContextSubscriberComponent, SubscribedComponent)\n\n return ContextSubscriberComponent\n }\n}\n","import { Component } from 'react'\nimport exceptionReporter from '@aytm/lib/common/exception-reporter'\n\nfunction shallowEqual(a, b) {\n if (a !== b) {\n if (null != a && null != b && 'object' == typeof a && 'object' == typeof b) {\n for (const i in a) if (a[i] !== b[i]) return false\n for (const i in b) if (!(i in a)) return false\n } else return false\n }\n return true\n}\n\nexport default class PureComponent extends Component {\n constructor(props, context) {\n super(props, context)\n this.mounted = false\n this.saveRef = this.saveRef.bind(this)\n }\n shouldComponentUpdate(nextProps, nextState, nextContext) {\n const { props, state, context } = this\n return !shallowEqual(props, nextProps) || !shallowEqual(state, nextState) || !shallowEqual(context, nextContext)\n }\n setState(...args) {\n if (this.mounted) {\n super.setState(...args)\n }\n }\n UNSAFE_componentWillMount() {\n this.mounted = true\n }\n componentDidMount() {}\n componentWillUnmount() {\n this.mounted = false\n }\n UNSAFE_componentWillReceiveProps(/*nextProps, nextContext*/) {}\n UNSAFE_componentWillUpdate(/*nextProps, nextState, nextContext*/) {}\n componentDidUpdate(/*prevProps, prevState, prevContext*/) {}\n saveRef(name) {\n return (\n this[`saveRef${name}`] ||\n (this[`saveRef${name}`] = component => {\n this[`ref${name}`] = component\n })\n )\n }\n componentDidCatch(error, info) {\n exceptionReporter(error, 'common', info)\n }\n}\n\n// skip comparing function values\nfunction shallowDataEqual(a, b) {\n if (a !== b) {\n if (null != a && null != b && 'object' == typeof a && 'object' == typeof b) {\n for (const i in a) {\n if ('function' == typeof a[i]) continue\n if (a[i] !== b[i]) return false\n }\n for (const i in b) {\n if ('function' == typeof b[i]) continue\n if (!(i in a)) return false\n }\n } else return false\n }\n return true\n}\n\nexport class PureDataComponent extends PureComponent {\n shouldComponentUpdate(nextProps, nextState, nextContext) {\n const { props, state, context } = this\n return (\n !shallowDataEqual(props, nextProps) ||\n !shallowDataEqual(state, nextState) ||\n !shallowDataEqual(context, nextContext)\n )\n }\n}\n","export default function copyToClipboard(text) {\n if (navigator.clipboard) navigator.clipboard.writeText(text)\n else if (window.clipboardData) window.clipboardData.setData('Text', text)\n else {\n try {\n const bufferElement = document.createElement('span')\n bufferElement.textContent = text\n document.body.appendChild(bufferElement)\n\n const selection = document.getSelection()\n const range = document.createRange()\n range.selectNodeContents && range.selectNodeContents(bufferElement)\n range.selectNode && range.selectNode(bufferElement)\n\n selection.removeAllRanges()\n selection.addRange(range)\n document.execCommand('copy')\n selection.removeAllRanges()\n\n document.body.removeChild(bufferElement)\n } catch {\n // skip errors\n }\n }\n}\n","function getNode(target) {\n switch (true) {\n // selector\n case 'string' === typeof target: {\n return document.querySelector(target)\n }\n // element\n case target instanceof Element: {\n return target\n }\n // ref\n case null != target && 'object' === typeof target && target.current instanceof Element: {\n return target.current\n }\n default: {\n return void 0\n }\n }\n}\n\nexport default function containerExpander(container, { margin: defaultMargin = 0 } = {}) {\n const containerProps = {\n expanded: false,\n containerHeightFreezed: false,\n node: void 0,\n originalMinHeight: void 0,\n originalHeight: void 0,\n originalOverflow: void 0\n }\n // eslint-disable-next-line immutablejs/no-native-map-set\n const insets = new Map()\n\n const initContainer = () => {\n if (null == containerProps.node) {\n containerProps.node = getNode(container)\n containerProps.originalMinHeight = null == containerProps.node ? void 0 : containerProps.node.style.minHeight\n containerProps.originalHeight = null == containerProps.node ? void 0 : containerProps.node.style.height\n }\n }\n\n const adjustContainer = () => {\n initContainer()\n if (null != containerProps.node) {\n if (0 === insets.size) {\n // revert to original minHeight\n containerProps.node.style.minHeight = containerProps.originalMinHeight\n containerProps.expanded = false\n } else {\n // get insets lowest bottom\n let lowestInsetBottom = 0\n insets.forEach(({ margin = 0, height }, inset) => {\n const insetRect = inset.getBoundingClientRect()\n const insetBottom = ('number' === typeof height ? insetRect.top + height : insetRect.bottom) + margin\n if (insetBottom > lowestInsetBottom) {\n lowestInsetBottom = insetBottom\n }\n })\n // set container minHeights\n const { top: containerTop } = containerProps.node.getBoundingClientRect()\n containerProps.node.style.minHeight = `${lowestInsetBottom - containerTop}px`\n containerProps.expanded = true\n }\n }\n }\n\n const expandContainerAPI = {\n get expanded() {\n return containerProps.expanded\n },\n expand(inset, { margin = defaultMargin, height } = {}) {\n const insetNode = getNode(inset)\n if (null != insetNode) {\n insets.set(insetNode, { margin, height })\n adjustContainer()\n }\n return () => expandContainerAPI.unexpand(inset)\n },\n unexpand(inset) {\n const insetNode = getNode(inset)\n if (null != insetNode) {\n insets.delete(insetNode)\n adjustContainer()\n return true\n }\n return false\n },\n get containerHeightFreezed() {\n return containerProps.containerHeightFreezed\n },\n freezeContainerHeight({ overflow } = {}) {\n if (!containerProps.containerHeightFreezed) {\n initContainer()\n if (null != containerProps.node) {\n if (overflow) {\n containerProps.originalOverflow = containerProps.node.style.overflow\n containerProps.node.style.overflow = overflow\n }\n const { top, bottom } = containerProps.node.getBoundingClientRect()\n containerProps.node.style.height = `${bottom - top}px`\n containerProps.containerHeightFreezed = true\n return true\n }\n }\n return false\n },\n unfreezeContainerHeight() {\n if (containerProps.containerHeightFreezed && null != containerProps.node) {\n containerProps.node.style.overflow = containerProps.originalOverflow\n containerProps.node.style.height = containerProps.originalHeight\n containerProps.containerHeightFreezed = false\n return true\n }\n return false\n }\n }\n\n return expandContainerAPI\n}\n","// lib\nimport React, { useState } from 'react'\nimport PropTypes from 'prop-types'\nimport { List, Map } from 'immutable'\nimport { capitalize } from '@aytm/lib/common/func'\nimport { ERROR_TYPES } from '@aytm/lib/rfd-ui/components/advanced/lib/draft-js/decorators/ErrorsDecoratorFactory'\n\n// resources\nimport { getFeatureUpgradePackage } from '@aytm/app/survey/editor/resources/features'\n\n// components\nimport Popup from '@aytm/lib/rfd-ui/components/basic/popup'\n\n// styles\nimport style from '@aytm/lib/rfd-ui/styles/advanced/draft-js-decorators.module.scss'\nimport errorPopupStyle from '@aytm/app/survey/editor/styles/lib/ErrorPopup.module.scss'\n\nconst templateVariablesRegex = /{([A-Z_a-z]*)}/g\n\n// <Component>\nErrorsDecoratorPopup.propTypes = {\n locale: PropTypes.instanceOf(Map).isRequired,\n errors: PropTypes.instanceOf(List),\n textProps: PropTypes.any,\n errorTypes: PropTypes.object,\n updateOldRefs: PropTypes.func,\n disableValidation: PropTypes.func\n}\nexport default React.memo(\n ErrorsDecoratorPopup,\n (prevProps, nextProps) =>\n prevProps.locale === nextProps.locale &&\n prevProps.errors === nextProps.errors &&\n prevProps.textProps === nextProps.textProps\n)\nfunction ErrorsDecoratorPopup(props) {\n const { locale, errors, errorTypes = ERROR_TYPES, textProps, updateOldRefs, disableValidation } = props\n\n const [showPopup, setShowPopup] = useState(false)\n\n const errorText = textProps.children[0].props.text\n const errorObj = extractErrorObject(errors, errorText)\n const errorType = errorObj ? errorObj.get('type') : 'parse'\n const errorTypeText = extractErrorTypeText(locale, errorObj, errorType, errorTypes)\n\n return errorTypes[errorType] ? (\n <span onMouseEnter={() => void setShowPopup(true)} onMouseLeave={() => void setShowPopup(false)}>\n <Popup\n show={Boolean(showPopup)}\n portal={true}\n width=\"260px\"\n renderRef={errorText}\n content={() => (\n <div className={style.content}>\n <div>\n {'aytm_logic_required' === errorType ? (\n <span className={style.popupContent}>{errorTypeText}</span>\n ) : (\n <span className={style.popupContent} dangerouslySetInnerHTML={{ __html: errorTypeText }} />\n )}\n {'old' === errorType && (\n <span>\n <br />\n <br />\n <a onClick={() => updateOldRefs(errorObj)}>{locale.get('okHere')}</a>\n | \n <a onClick={() => updateOldRefs(errorObj, true)}>{locale.get('okHereAndElsewhere')}</a>\n </span>\n )}\n {'old_translate' === errorType && (\n <span className={style.oldTranslate}>\n <br />\n <br />\n <a onClick={() => disableValidation(errorObj)}>{locale.get('okHere')}</a>\n | \n <a onClick={() => disableValidation(errorObj, true)}>{locale.get('okHereAndOtherLanguages')}</a>\n </span>\n )}\n </div>\n <div className={style.popupArrowContainer}>\n <div className={style.popupArrow} />\n </div>\n </div>\n )}\n className={`${errorPopupStyle.component} ${errorPopupStyle.topleft}`}\n direction=\"topleft\"\n />\n <span className={errorTypes[errorType].style}>{textProps.children}</span>\n </span>\n ) : (\n textProps.children\n )\n}\n\nfunction extractErrorObject(errors, errorText) {\n return errors.find(error => {\n const text = error.get('text')\n const type = error.get('type')\n if (!text) {\n return false\n }\n if ('old_translate' === type) {\n return true\n }\n\n const errorTextCI = errorText.toUpperCase()\n const errorTextTrimmed = errorTextCI.trim()\n const normalizedText = text.replace(/</gi, '<').replace(/>/gi, '>').replace(/&/gi, '&').toUpperCase()\n const normalizedTextTrimmed = normalizedText.trim()\n\n if (normalizedTextTrimmed === errorTextTrimmed) {\n return true\n }\n\n return 'parse' === type\n ? '[' + normalizedText + ']' === errorText.toUpperCase()\n : 'cluster' === type\n ? '\"' + normalizedText + '\"' === errorText.toUpperCase() || \"'\" + normalizedText + \"'\" === errorText.toUpperCase()\n : false\n })\n}\nfunction extractErrorHint(errorObj, errorKey) {\n return errorObj\n ? 0 <= ['index', 'rule'].indexOf(errorKey)\n ? `${errorObj.get('text')}${errorObj.get('subText') ? ` (${errorObj.get('subText')})` : ''}`\n : errorObj.get(errorKey)\n : ''\n}\nfunction extractErrorTypeText(locale, errorObj, errorType, errorTypes = ERROR_TYPES) {\n const errorString =\n (errorObj && errorObj.get('desc')) || locale.get(errorTypes[errorType].text) || locale.get('notValidRule')\n\n if ('aytm_logic_required' === errorType) {\n const upgradePackage = getFeatureUpgradePackage('main', 'aytm_logic') || Map()\n const packageName = capitalize(upgradePackage.get('name', '*upgrade package name*'))\n const packageURL = upgradePackage.get('upgradeURL', '*upgrade url*')\n return (\n <div className={style.errorText}>\n {upgradePackage && (\n <a href={packageURL} title={packageName} target=\"_blank\" rel=\"noreferrer\">\n <i className={`icon-aytmfd-${packageName.toLowerCase()}`} />\n </a>\n )}\n <span\n dangerouslySetInnerHTML={{\n __html: errorString.replace('{packageName}', packageName).replace('{upgradeURL}', packageURL)\n }}\n />\n </div>\n )\n } else {\n const replacements = {}\n let matchArr\n while (null !== (matchArr = templateVariablesRegex.exec(errorString))) {\n replacements[matchArr[0]] = extractErrorHint(errorObj, matchArr[1])\n }\n return Object.keys(replacements)\n .reduce((str, key) => str.replace(new RegExp(key, 'g'), replacements[key].toUpperCase()), errorString)\n .replace(/</gi, '<')\n .replace(/>/gi, '>')\n }\n}\n","// lib\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { CompositeDecorator } from 'draft-js'\n\n// components\nimport ErrorsDecoratorPopup from '@aytm/lib/rfd-ui/components/advanced/lib/draft-js/decorators/ErrorsDecoratorPopup'\n\n// styles\nimport style from '@aytm/lib/rfd-ui/styles/advanced/draft-js-decorators.module.scss'\n\n// constants\nexport const ERROR_TYPES = {\n ref: {\n text: 'questionDoesntExist',\n type: 'warning',\n color: '#F7931E',\n style: style.textWarning\n },\n alias: {\n text: 'aliasError',\n type: 'warning',\n color: '#F7931E',\n style: style.textWarning\n },\n cluster: {\n text: 'clusterDoesntExist',\n type: 'warning',\n color: '#F7931E',\n style: style.textWarning\n },\n trait: {\n text: 'traitDoesntExist',\n type: 'error',\n color: '#9D0000',\n style: style.textError\n },\n sref: {\n text: 'serverReferenceError',\n type: 'warning',\n color: '#F7931E',\n style: style.textWarning\n },\n parse: {\n text: 'notValidRule',\n type: 'error',\n color: '#9D0000',\n style: style.textError\n },\n aytm_logic_required: {\n text: 'upgradeRequiredText',\n type: 'warning',\n color: '#F7931E',\n style: style.textWarning\n },\n old: {\n text: 'referenceIsOutdated',\n type: 'warning-special',\n color: '#d05817',\n style: style.textOld\n },\n invalid_logic: {\n color: '#9D0000',\n text: 'notValidRule',\n type: 'error',\n style: style.textError\n },\n old_translate: {\n color: '#17d0d0',\n text: 'oldTranslate',\n type: 'error',\n style: style.textOld\n }\n}\n\nconst createErrorsDecoratorComponent = (store, errorTypes = ERROR_TYPES) => {\n const ErrorsDecoratorComponent = props => {\n const errors = store.getErrors()\n return errors ? (\n <ErrorsDecoratorPopup\n locale={store.getLocale()}\n errors={errors}\n textProps={props}\n errorTypes={errorTypes}\n updateOldRefs={store.updateOldRefs}\n />\n ) : (\n props.children\n )\n }\n\n ErrorsDecoratorComponent.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n }\n\n return ErrorsDecoratorComponent\n}\n\nconst createErrorsDecoratorStrategy = (store, errorTypes) => (contentBlock, callback) => {\n const text =\n 'function' === typeof store.strategy.processText\n ? store.strategy.processText(contentBlock.getText())\n : contentBlock.getText()\n\n if (!text) {\n return\n }\n const errorTypeFilter = store.strategy.errorTypes?.length\n ? error => -1 !== store.strategy.errorTypes.indexOf(error.get('type'))\n : errorTypes\n ? error => errorTypes[error.get('type')]\n : _ => true\n\n const errors = (store.getErrors() || [])\n .filter(error => error.get('text') && errorTypeFilter(error))\n .sort((a, b) => b.get('text').length - a.get('text').length)\n\n if (!errors || !errors.size) {\n return\n }\n\n if ('function' === typeof store.strategy.detectError) {\n errors.forEach(error => {\n try {\n store.strategy.detectError(errors, error, text, callback)\n } catch (error) {\n // eslint-disable-next-line no-console\n console.log(error)\n }\n })\n }\n\n if ('function' === typeof store.strategy.detectErrors) {\n store.strategy.detectErrors(errors, text, callback)\n }\n}\n\nconst ErrorsDecoratorFactory = (store, errorTypes) =>\n new CompositeDecorator([\n {\n component: createErrorsDecoratorComponent(store, errorTypes),\n strategy: createErrorsDecoratorStrategy(store, errorTypes)\n }\n ])\n\nexport default ErrorsDecoratorFactory\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport classNames from 'classnames'\nimport styles from '@aytm/lib/rfd-ui/styles/SuggestionsComponent.module.scss'\n\nconst SuggestionItem = ({ suggestion, index, selectedIndex, selectSuggestion }) => (\n <div\n onMouseDown={event => {\n event.preventDefault()\n selectSuggestion(suggestion)\n }}\n id={'suggestion-item-' + index}\n className={classNames(styles.item, {\n [styles['item--active']]: index === selectedIndex\n })}\n >\n <div className={styles['content']}>\n <div className={styles['content-text']}>\n <strong>{suggestion.label}</strong>\n </div>\n </div>\n </div>\n)\n\nSuggestionItem.propTypes = {\n index: PropTypes.number,\n suggestion: PropTypes.object,\n selectSuggestion: PropTypes.func,\n selectedIndex: PropTypes.number\n}\n\nexport default SuggestionItem\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport autobind from 'autobind-decorator'\nimport Portal from '@aytm/lib/rfd-ui/components/basic/portal'\nimport styles from '@aytm/lib/rfd-ui/styles/SuggestionsComponent.module.scss'\nimport getSelectionCoords from '@aytm/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/lib/get-selection-coords'\nimport SuggestionItem from '@aytm/lib/rfd-ui/components/advanced/lib/draft-js/suggestionsPlugin/components/SuggestionItem'\n\nconst KEY_UP = 'ArrowUp'\nconst KEY_DOWN = 'ArrowDown'\nconst KEY_ENTER = 'Enter'\nconst KEY_PAGE_UP = 'PageUp'\nconst KEY_PAGE_DOWN = 'PageDown'\n\nconst DROPDOWN_OFFSET_X_DEFAULT = 10\nconst DROPDOWN_OFFSET_Y = 24\n\nexport default class SuggestionsComponent extends React.PureComponent {\n static propTypes = {\n items: PropTypes.array,\n selectSuggestion: PropTypes.func,\n SuggestionsItemComponent: PropTypes.node,\n visibility: PropTypes.bool\n }\n\n constructor(props) {\n super(props)\n const { items = [], visibility } = props\n this.refItems = React.createRef()\n this.timeoutId = null\n this.state = {\n selectedIndex: 0,\n portalStyles: this.calculatePortalStyles(items, props),\n items,\n visibility,\n pageX: 0,\n pageY: 0\n }\n }\n\n // @NOTICE: method for external usage\n @autobind\n updateItems(items, visibility) {\n const preselectedIndex = items.map(({ selected }) => selected).indexOf(true)\n const index = -1 === preselectedIndex ? 0 : preselectedIndex\n\n this.setState({ selectedIndex: index, items, visibility }, () => {\n this.timeoutId = setTimeout(() => {\n this.scrollToItem({ index, force: true })\n this.updatePosition(items)\n this.timeoutId = null\n\n clearTimeout(this.timeoutId)\n })\n })\n }\n\n // @NOTICE: method for external usage\n @autobind\n updatePosition() {\n setTimeout(() => {\n this.setState({\n portalStyles: this.calculatePortalStyles(this.state.items, this.props)\n })\n })\n }\n\n @autobind\n calculateDropdownOffsetTop() {\n return DROPDOWN_OFFSET_Y\n }\n\n @autobind\n extractDropdownOffsetText(items) {\n return items && items[0] && items[0].offsetText\n }\n\n @autobind\n calculateDropdownTextOffsetLeft(items, cursorTextStyle) {\n const offsetText = this.extractDropdownOffsetText(items)\n\n if (offsetText && cursorTextStyle) {\n const element = document.createElement('div')\n\n element.textContent = offsetText.replace(' ', '\\u00A0')\n element.style.font = cursorTextStyle\n element.style.position = 'absolute'\n element.style.visibility = 'hidden'\n element.style.opacity = '0'\n element.style.zIndex = -1\n\n document.body.appendChild(element)\n\n const rects = element.getClientRects()\n\n document.body.removeChild(element)\n\n if (rects && rects[0] && rects[0].width) {\n return Math.ceil(rects[0].width)\n }\n }\n return 0\n }\n\n @autobind\n calculateDropdownOffsetLeft({ items, itemsElementRects, selectionCoords, props }) {\n const itemsWidth = itemsElementRects[0].width\n const textOffsetLeft = this.calculateDropdownTextOffsetLeft(items, props.cursorTextStyle)\n const offset = selectionCoords.x + itemsWidth - DROPDOWN_OFFSET_X_DEFAULT\n\n return offset < 0 ? offset - textOffsetLeft : -textOffsetLeft\n }\n\n @autobind\n calculatePortalStyles(items = [], props) {\n if (this.refItems.current) {\n const itemsElement = this.refItems.current\n const itemsElementRects = itemsElement.getClientRects()\n\n if (itemsElementRects && itemsElementRects[0]) {\n const selectionCoords = getSelectionCoords()\n const elementOffsetTop = window.scrollY || document.documentElement.scrollTop\n const elementOffsetLeft = window.scrollX || document.documentElement.scrollLeft\n const dropdownOffsetLeft = this.calculateDropdownOffsetLeft({\n items,\n itemsElementRects,\n selectionCoords,\n props\n })\n const dropdownOffsetTop = this.calculateDropdownOffsetTop()\n\n return {\n top: Math.floor(selectionCoords.y + dropdownOffsetTop + elementOffsetTop),\n left: Math.floor(selectionCoords.x + elementOffsetLeft + dropdownOffsetLeft)\n }\n }\n }\n\n return {\n visibility: 'hidden',\n x: 0,\n y: 0\n }\n }\n\n @autobind\n calculateItemIndexByHeightLimit(heightLimit) {\n const items = this.state.items\n\n if (!items || !items.length) {\n return 0\n }\n\n let index = 0\n let height = 0\n\n while (index < items.length && height < heightLimit) {\n const element = document.querySelector(`#suggestion-item-${index}`)\n\n height += element.clientHeight\n index++\n }\n\n return index\n }\n\n @autobind\n calculatePageDownItemIndex() {\n const itemsElement = this.refItems.current\n const heightLimit = itemsElement.scrollTop + itemsElement.clientHeight\n\n if (!itemsElement) {\n return 0\n }\n\n return this.calculateItemIndexByHeightLimit(heightLimit)\n }\n\n @autobind\n calculatePageUpItemIndex() {\n const itemsElement = this.refItems.current\n const heightLimit = itemsElement.scrollTop - itemsElement.clientHeight\n\n if (!itemsElement) {\n return 0\n }\n\n return this.calculateItemIndexByHeightLimit(Math.max(0, heightLimit))\n }\n\n @autobind\n createSuggestionMouseHandler(selectedIndex) {\n return event => {\n const { pageX, pageY } = event\n const { selectedIndex: prevSelectedIndex, pageX: prevPageX, pageY: prevPageY } = this.state\n if (prevPageX !== pageX && prevPageY !== pageY) {\n if (prevSelectedIndex !== selectedIndex) {\n this.setState({ pageX, pageY, selectedIndex })\n } else {\n this.setState({ pageX, pageY })\n }\n }\n }\n }\n\n componentDidUpdate(_, prevState) {\n if (prevState.visibility !== this.state.visibility) {\n if (this.state.visibility) {\n window.addEventListener('keydown', this.handleKeyDown)\n } else {\n window.removeEventListener('keydown', this.handleKeyDown)\n }\n }\n }\n\n componentDidMount() {\n if (this.state.visibility) {\n window.addEventListener('keydown', this.handleKeyDown)\n }\n }\n\n componentWillUnmount() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId)\n }\n window.removeEventListener('keydown', this.handleKeyDown, true)\n }\n\n @autobind\n scrollToItem({ index, force = false } = {}) {\n const { items, selectedIndex } = this.state\n const itemIndex = Math.max(0, Math.min(items.length - 1, index))\n const itemElement = document.querySelector(`#suggestion-item-${itemIndex}`)\n const itemsElement = this.refItems.current\n\n if (selectedIndex === itemIndex || !itemElement || !itemsElement) {\n return\n }\n\n this.setState({ selectedIndex: itemIndex }, () => {\n const itemOffsetTop = itemElement.offsetTop\n if (force) {\n this.refItems.current.scrollTop = itemOffsetTop\n } else {\n if (itemsElement.scrollTop >= itemOffsetTop) {\n this.refItems.current.scrollTop = itemOffsetTop\n }\n if (itemsElement.scrollTop + itemsElement.clientHeight <= itemOffsetTop + itemElement.clientHeight) {\n this.refItems.current.scrollTop = itemOffsetTop - itemsElement.clientHeight + itemElement.clientHeight\n }\n }\n })\n }\n\n @autobind\n handleKeyDown(event) {\n const { selectedIndex, items } = this.state\n if (event.key === KEY_UP) {\n this.scrollToItem({ index: selectedIndex - 1 })\n if (selectedIndex > 0) {\n event.preventDefault()\n }\n }\n if (event.key === KEY_DOWN) {\n this.scrollToItem({ index: selectedIndex + 1 })\n if (selectedIndex < items.length - 1) {\n event.preventDefault()\n }\n }\n if (event.key === KEY_PAGE_UP) {\n this.scrollToItem({ index: this.calculatePageUpItemIndex(), force: true })\n event.preventDefault()\n }\n if (event.key === KEY_PAGE_DOWN) {\n this.scrollToItem({ index: this.calculatePageDownItemIndex(), force: true })\n event.preventDefault()\n }\n if (event.key === KEY_ENTER && items[selectedIndex]) {\n this.selectSuggestion(items[selectedIndex])\n event.preventDefault()\n }\n }\n\n @autobind\n renderDropdown() {\n return (\n <div className={styles.items} ref={this.refItems}>\n {this.state.items.map((suggestion, index) => (\n <div\n key={index}\n onMouseMove={this.createSuggestionMouseHandler(index)}\n onMouseEnter={this.createSuggestionMouseHandler(index)}\n >\n <SuggestionItem\n index={index}\n selectSuggestion={this.selectSuggestion}\n selectedIndex={this.state.selectedIndex}\n suggestion={suggestion}\n />\n </div>\n ))}\n </div>\n )\n }\n\n @autobind\n selectSuggestion(suggestion) {\n const { selectSuggestion } = this.props\n\n selectSuggestion(suggestion)\n }\n\n render() {\n const { visibility, portalStyles } = this.state\n\n if (!visibility) {\n return null\n }\n\n return (\n <Portal portalId={'suggestions-items'}>\n <div className={styles.portal} style={portalStyles}>\n <div className={styles.dropdown}>{this.renderDropdown()}</div>\n </div>\n </Portal>\n )\n }\n}\n","const defaultProcessText = text => {\n const trimmed = text.replace(/(^ +)|( +$)/, '')\n\n const firstWordMatch = trimmed.match(/^(\\W+)(\\w+)|^(\\w+)/i)\n const lastWordMatch = trimmed.match(/(\\w+)(\\W+)$|(\\w+)$/i)\n\n const lastWord = lastWordMatch ? lastWordMatch[2] || lastWordMatch[3] : ''\n const firstWord = firstWordMatch ? firstWordMatch[2] || firstWordMatch[3] : ''\n\n const withoutFirstWord = firstWordMatch ? trimmed.slice(firstWordMatch[0].length).trim() : ''\n const withoutLastWord = lastWordMatch\n ? trimmed.slice(0, Math.max(0, trimmed.length - lastWordMatch[0].length)).trim()\n : ''\n\n return {\n text,\n trimmed,\n firstWord,\n firstWordCI: firstWord.toLowerCase(),\n lastWord,\n lastWordCI: lastWord.toLowerCase(),\n withoutFirstWord,\n withoutFirstWordCI: withoutFirstWord.toLowerCase(),\n withoutLastWord,\n withoutLastWordCI: withoutLastWord.toLowerCase(),\n lower: trimmed.toLowerCase(),\n upper: trimmed.toUpperCase(),\n endsWith: { letter: !/\\s$/g.test(text) },\n startsWithLetter: !/^\\s/g.test(text)\n }\n}\n\nexport default defaultProcessText\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { CompositeDecorator } from 'draft-js'\n\nimport { List } from 'immutable'\n\nconst Span = props => <span>{props.children}</span>\n\nSpan.propTypes = {\n children: PropTypes.oneOfType([PropTypes.array.isRequired, PropTypes.object.isRequired])\n}\n\nexport default class CompoundDecorator {\n constructor(decorators = []) {\n this.decorators = decorators.map(decorator =>\n decorator.strategy && decorator.component ? new CompositeDecorator([decorator]) : decorator\n )\n }\n\n getDecorations(block, contentState) {\n const emptyTuples = Array.from({ length: block.getText().length }).fill(\n Array.from({ length: this.decorators.length }).fill(null)\n )\n const decorations = this.decorators.reduce((tuples, decorator, index) => {\n const blockDecorations = decorator.getDecorations(block, contentState)\n\n return tuples.map((tuple, tupleIndex) => [\n ...tuple.slice(0, index),\n blockDecorations.get(tupleIndex),\n ...tuple.slice(index + 1)\n ])\n }, emptyTuples)\n\n return List(decorations.map(JSON.stringify))\n }\n\n getComponentForKey(key) {\n const tuple = JSON.parse(key)\n // eslint-disable-next-line react/display-name\n return props => {\n // eslint-disable-next-line react/prop-types\n const { decoratorProps, children, ...compositionProps } = props\n const Composed = tuple.reduce((Composition, decoration, index) => {\n if (decoration !== null) {\n const decorator = this.decorators[index]\n const Component = decorator.getComponentForKey(decoration)\n const componentProps = {\n ...compositionProps,\n ...decoratorProps[index]\n }\n // eslint-disable-next-line react/display-name\n return () => (\n <Component {...componentProps}>\n <Composition {...compositionProps} />\n </Component>\n )\n }\n return Composition\n }, Span)\n return <Composed>{children}</Composed>\n }\n }\n\n getPropsForKey(key) {\n const tuple = JSON.parse(key)\n return {\n decoratorProps: tuple.map((decoration, index) => {\n const decorator = this.decorators[index]\n return decoration !== null ? decorator.getPropsForKey(decoration) : {}\n })\n }\n }\n}\n","// lib\nimport React from 'react'\nimport { List } from 'immutable'\nimport { toArray as rxToArray } from 'rxjs/operators'\nimport { EditorState, ContentState, CharacterMetadata, SelectionState, Modifier, ContentBlock, genKey } from 'draft-js'\nimport { KEYCODE_UP, KEYCODE_DOWN, KEYCODE_ESC, KEYCODE_ENTER } from '@aytm/lib/common/const'\n\nimport suggestionsBuilder from './suggestions-builder'\nimport defaultProcessText from './lib/default-process-text'\nimport CompoundDecorator from './decorators/compound-decorator'\nimport DefaultSuggestionsComponent from './components/Suggestions'\n\nconst createDefaultSuggestions = () => {\n return {\n isActive: false,\n doneFetching: false,\n selection: null,\n items: []\n }\n}\n\nconst preFillSuggestions = selection => {\n return {\n isActive: true,\n doneFetching: false,\n items: [],\n selection\n }\n}\n\nconst countLines = text => {\n const matchNewlines = text.match(/\\n/g)\n return matchNewlines ? matchNewlines.length : 1\n}\n\nexport const extractSelectionOffsets = editorState => {\n const selectionState = editorState.getSelection()\n\n const anchorKey = selectionState.getAnchorKey()\n const focusKey = selectionState.getFocusKey()\n const blockMap = editorState.getCurrentContent().getBlockMap()\n\n if (!blockMap.has(focusKey)) {\n return null\n }\n\n let startOffset = 0\n let endOffset = 0\n\n blockMap.skipWhile((contentBlock, key) => {\n if (key === anchorKey) {\n startOffset += selectionState.getAnchorOffset()\n return false\n }\n // textBefore.push(contentBlock.getText())\n startOffset += contentBlock.getText().length + 1\n return true\n })\n\n blockMap.skipWhile((contentBlock, key) => {\n if (key === focusKey) {\n endOffset += selectionState.getFocusOffset()\n return false\n }\n endOffset += contentBlock.getText().length + 1\n return true\n })\n\n return { startOffset, endOffset }\n}\n\nconst getSuggestionsStub = () => {\n return {}\n}\nconst createSuggestionsPlugin = (\n pluginStore,\n { customProcessText, extractSelection, suggestionsBuilders = [], SuggestionsComponent }\n) => {\n const ref = React.createRef()\n const store = {\n getEditorState: null,\n setEditorState: null,\n subscription: null,\n suggestions: createDefaultSuggestions()\n }\n\n const getSuggestionsData = (beforeCursor, afterCursor) =>\n 'function' === typeof pluginStore.getSuggestionsData\n ? pluginStore.getSuggestionsData(beforeCursor, afterCursor)\n : getSuggestionsStub\n\n const processText = 'function' === typeof customProcessText ? customProcessText : defaultProcessText\n\n const checkAutocompleteIsVisible = () =>\n Boolean(\n store.suggestions.isActive &&\n store.suggestions.items &&\n store.suggestions.items.length &&\n store.suggestions.doneFetching\n )\n const handleWhenIsActive = () => (store.suggestions.isActive ? 'handled' : 'not-handled')\n\n const updateSuggestionsComponentItems = () => {\n ref.current && ref.current.updateItems(store.suggestions.items, checkAutocompleteIsVisible())\n }\n\n const selectSuggestion = ({ textBefore, textAfter }) => {\n const {\n suggestions: { selection }\n } = store\n const editorState = store.getEditorState()\n const contentState = editorState.getCurrentContent()\n const plainText = contentState.getPlainText()\n\n const newPlainTextBefore = plainText.slice(0, selection.range.start) + textBefore\n const newPlainTextAfter = textAfter + plainText.slice(selection.range.end + selection.text.afterCursor.length)\n\n const newPlainText =\n countLines(plainText) != countLines(newPlainTextBefore + newPlainTextAfter)\n ? newPlainTextBefore + '\\n' + newPlainTextAfter\n : newPlainTextBefore + newPlainTextAfter\n\n const charsStyles = []\n\n contentState\n .getBlocksAsArray()\n .forEach(block =>\n block.getCharacterList().forEach(charMetaData => charsStyles.push(charMetaData.getStyle().toJS()))\n )\n\n const newCharsStyles = charsStyles\n .slice(0, selection.range.start)\n .concat(\n Array.from({ length: textBefore.length + textAfter.length }).fill([]),\n charsStyles.slice(selection.range.end + selection.text.afterCursor.length)\n )\n\n const characterList = List(Array.from({ length: newPlainText.length }).map(() => CharacterMetadata.create()))\n const newContentBlock = new ContentBlock({\n key: genKey(),\n text: newPlainText,\n characterList,\n type: 'unstyled',\n depth: 0\n })\n const newContentState = ContentState.createFromBlockArray([newContentBlock])\n const newEditorState = EditorState.push(editorState, newContentState, 'insert-characters')\n\n const newCurrentContent = newEditorState.getCurrentContent()\n const newBlockArray = newCurrentContent.getBlocksAsArray()\n\n let cursorOffset = newPlainTextBefore.length\n let newAnchorKey\n\n while (newBlockArray.length) {\n const contentBlock = newBlockArray.shift()\n const text = contentBlock.getText()\n\n if (cursorOffset > text.length) {\n cursorOffset -= text.length + (text.match(/\\r?\\n/g) || '').length + 1\n } else {\n newAnchorKey = contentBlock.key\n break\n }\n }\n\n let styledCurrentContent = newCurrentContent\n let blockCursor = 0\n\n // applying inline styles to newCurrentContent\n newContentState.getBlocksAsArray().forEach(block => {\n let characterCursor = 0\n\n block.getCharacterList().forEach(_ => {\n const styles = newCharsStyles[blockCursor + characterCursor]\n if (styles && styles.length) {\n styles.forEach(\n inlineStyle =>\n (styledCurrentContent = Modifier.applyInlineStyle(\n styledCurrentContent,\n SelectionState.createEmpty(block.getKey()).merge({\n anchorOffset: characterCursor,\n focusOffset: characterCursor + 1\n }),\n inlineStyle\n ))\n )\n }\n characterCursor++\n })\n\n blockCursor += characterCursor\n })\n\n const styledEditorState = EditorState.createWithContent(styledCurrentContent, editorState.getDecorator())\n const styledSelectionState = newEditorState.getSelection().merge({\n anchorKey: newAnchorKey,\n focusKey: newAnchorKey,\n anchorOffset: cursorOffset,\n focusOffset: cursorOffset\n })\n\n store.setEditorState(EditorState.forceSelection(styledEditorState, styledSelectionState))\n }\n\n const createSuggestions = (selection, callback) => {\n // @TODO: refactor. make async with rx buffer\n const {\n text: { beforeCursor, afterCursor, meta }\n } = selection\n const suggestionsData = getSuggestionsData(beforeCursor, afterCursor)\n const processTextBeforeCursor = processText(beforeCursor, suggestionsData)\n const processTextAfterCursor = processText(afterCursor, suggestionsData)\n\n const suggestionsStream = suggestionsBuilder(suggestionsBuilders, processTextBeforeCursor, processTextAfterCursor, {\n dependencies: suggestionsData,\n meta: meta || {}\n }).pipe(rxToArray())\n\n store.suggestions = preFillSuggestions(selection)\n\n if (store.subscription) {\n store.subscription.unsubscribe()\n store.subscription = null\n }\n\n // async check done\n store.subscription = suggestionsStream.subscribe(\n items => {\n store.suggestions.error = null\n store.suggestions.items = items\n },\n error => {\n store.suggestions.error = error\n store.suggestions.items = []\n callback && callback()\n },\n _done => {\n store.suggestions.doneFetching = true\n callback && callback()\n }\n )\n }\n\n const canAutocompleteBeActive = () =>\n 'function' === typeof pluginStore.canAutocompleteBeActive ? pluginStore.canAutocompleteBeActive() : true\n\n return {\n // eslint-disable-next-line react/display-name\n SuggestionsComponent: class extends React.PureComponent {\n render() {\n const Component = SuggestionsComponent || DefaultSuggestionsComponent\n return (\n <Component\n {...this.props}\n ref={el => {\n this.refComponent = el\n ref.current = el\n }}\n items={store.suggestions.items}\n visibility={checkAutocompleteIsVisible()}\n selectSuggestion={selectSuggestion}\n />\n )\n }\n },\n getCursor: () => {\n const editorState = store.getEditorState()\n const contentState = editorState.getCurrentContent()\n const selectionState = editorState.getSelection()\n\n return {\n text: contentState.getPlainText(),\n selection: {\n start: selectionState.getStartOffset(),\n end: selectionState.getEndOffset()\n }\n }\n },\n initialize: ({ getEditorState, setEditorState }) => {\n store.getEditorState = getEditorState\n store.setEditorState = setEditorState\n },\n decorators: pluginStore.decorators ? [new CompoundDecorator(pluginStore.decorators)] : [],\n handleReturn: handleWhenIsActive,\n keyBindingFn: event => {\n switch (event.which) {\n case KEYCODE_ESC: {\n if (checkAutocompleteIsVisible()) {\n store.suggestions.isActive = false\n updateSuggestionsComponentItems()\n if (event.preventDefault) event.preventDefault()\n if (event.stopPropagation) event.stopPropagation()\n return 'suggestions-close'\n }\n break\n }\n case KEYCODE_ENTER: {\n if (checkAutocompleteIsVisible()) {\n return 'suggestions-select'\n }\n break\n }\n case KEYCODE_UP:\n case KEYCODE_DOWN: {\n if (checkAutocompleteIsVisible()) {\n return 'suggestions-navigate'\n }\n break\n }\n }\n return void 0\n },\n handleKeyCommand: command => {\n if (checkAutocompleteIsVisible()) {\n switch (command) {\n case 'suggestions-close':\n case 'suggestions-select':\n case 'suggestions-navigate': {\n return 'handled'\n }\n default: {\n return 'not-handled'\n }\n }\n }\n return 'not-handled'\n },\n onChange: editorState => {\n if (!canAutocompleteBeActive()) {\n if (store.suggestions.isActive) {\n store.suggestions = createDefaultSuggestions()\n updateSuggestionsComponentItems()\n }\n\n return editorState\n }\n\n const selectionState = editorState.getSelection()\n\n if (!selectionState.getHasFocus()) {\n if (store.subscription) {\n store.subscription.unsubscribe()\n store.subscription = null\n }\n if (store.suggestions.isActive) {\n store.suggestions = createDefaultSuggestions()\n updateSuggestionsComponentItems()\n }\n\n return editorState\n }\n\n const nextSelection = extractSelection(extractSelectionOffsets(editorState), editorState)\n\n if (nextSelection) {\n createSuggestions(nextSelection, () => {\n updateSuggestionsComponentItems()\n })\n } else if (store.suggestions.isActive) {\n if (store.subscription) {\n store.subscription.unsubscribe()\n store.subscription = null\n }\n\n store.suggestions = createDefaultSuggestions()\n updateSuggestionsComponentItems()\n }\n\n return editorState\n }\n }\n}\n\nexport default createSuggestionsPlugin\n","import { merge as ObservableMerge } from 'rxjs'\nimport { delay as rxDelay, filter as rxFilter } from 'rxjs/operators'\n\nexport default function suggestionsBuilder(builders, textBefore = '', textAfter = '', data = {}) {\n const suppliedIds = []\n return ObservableMerge(...builders.map(builder => builder(textBefore, textAfter, data))).pipe(\n // make async stream\n rxDelay(10),\n // uniq suggestions\n rxFilter(suggestion => {\n if (suggestion && -1 == suppliedIds.indexOf(suggestion.id)) {\n suppliedIds.push(suggestion.id)\n return true\n } else {\n return false\n }\n })\n )\n}\n","const getSelectionCoords = () => {\n if (document.selection) {\n if (document.selection.type != 'Control') {\n const range = document.selection.createRange()\n\n if (range) {\n range.collapse(true)\n\n return {\n x: range.boundingLeft,\n y: range.boundingTop\n }\n }\n }\n } else if (window.getSelection) {\n const selection = window.getSelection()\n\n if (selection.rangeCount) {\n const range = selection.getRangeAt(0).cloneRange()\n\n if (range && range.getClientRects) {\n range.collapse(true)\n\n if (range.getClientRects().length > 0) {\n const rect = range.getClientRects()[0]\n\n return {\n x: rect.left,\n y: rect.top\n }\n }\n }\n\n try {\n const span = document.createElement('span')\n\n if (span.getClientRects) {\n span.appendChild(document.createTextNode('\\u200B'))\n range.insertNode(span)\n\n const spanParent = span.parentNode\n const rect = span.getClientRects()[0]\n const x = rect.left\n const y = rect.top\n\n spanParent.removeChild(span)\n spanParent.normalize()\n\n return { x, y }\n }\n } catch {\n return {\n x: 0,\n y: 0\n }\n }\n }\n }\n\n return {\n x: 0,\n y: 0\n }\n}\n\nexport default getSelectionCoords\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport classNames from 'classnames'\nimport autobind from 'autobind-decorator'\nimport { PureDataComponent } from '@aytm/lib/common/components/pure-component'\n\nimport '@aytm/lib/rfd-ui/styles/basic/button.scss'\n\nexport default class Button extends PureDataComponent {\n static propTypes = {\n /**\n * Button label\n */\n label: PropTypes.string,\n /**\n * is Button disabled\n */\n disabled: PropTypes.bool,\n /**\n * show icon (prop is className)\n */\n icon: PropTypes.string,\n /**\n * icon position: `left` or `right`\n */\n iconPosition: PropTypes.string,\n /**\n * fixed Button width in pixels\n */\n width: PropTypes.number,\n /**\n * Hides left/right paddings\n */\n compact: PropTypes.bool,\n /**\n * string that will be passed to `onAction(action)`\n */\n action: PropTypes.string,\n /**\n * fires when Button is `clicked` and `not disabled`\n */\n onAction: PropTypes.func,\n /**\n * fires when Button is `clicked` (disabled or not)\n */\n onClick: PropTypes.func,\n /**\n * Use `<A>` instead of `<BUTTON>`, prop is `href`\n */\n asAnchor: PropTypes.string,\n /**\n * `target` for `asAnchor`\n */\n target: PropTypes.string,\n /**\n * custom style\n */\n style: PropTypes.object,\n /**\n * custom className\n */\n className: PropTypes.string,\n /**\n * Button theme (adds className `rfd-ui-button-${theme}`)\n */\n theme: PropTypes.string\n }\n\n static defaultProps = {\n iconPosition: 'right'\n }\n\n @autobind\n onClick(event) {\n const { disabled, onAction, onClick, action } = this.props\n if ('function' == typeof onClick) onClick(event) // will fire on any click\n if (!disabled && 'function' == typeof onAction) onAction(action, event) // will fire only if button is enabled\n }\n\n render() {\n const {\n label,\n disabled,\n compact,\n width,\n icon,\n iconPosition,\n action,\n onAction,\n onClick,\n asAnchor,\n target,\n className,\n style,\n theme,\n ...otherProps\n } = this.props\n const mergedStyle = style ? Object.assign({ width }, style) : { width }\n const buttonProps = {\n className: classNames('rfd-ui-button', className, {\n 'rfd-ui-button-disabled': disabled,\n 'rfd-ui-button-compact': compact,\n 'rfd-ui-button-with-icon': icon && iconPosition != 'left',\n 'rfd-ui-button-with-icon-left': icon && 'left' == iconPosition,\n [`rfd-ui-button-theme-${theme}`]: theme\n }),\n style: mergedStyle,\n onClick: this.onClick\n }\n const text = icon ? `${label} <i class='rfd-ui-button-icon ${icon}'></i>` : label\n return asAnchor ? (\n <a {...buttonProps} {...otherProps} href={asAnchor} target={target ? target : '_self'}>\n <span dangerouslySetInnerHTML={{ __html: text }} />\n </a>\n ) : (\n <button {...buttonProps} {...otherProps} dangerouslySetInnerHTML={{ __html: text }} />\n )\n }\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport autobind from 'autobind-decorator'\nimport { PureDataComponent } from '@aytm/lib/common/components/pure-component'\nimport { stopEvent } from '@aytm/lib/common/func'\nimport Portal from '@aytm/lib/rfd-ui/components/basic/portal'\n\nimport '@aytm/lib/rfd-ui/styles/basic/light-box.scss'\n\nexport default class LightBox extends PureDataComponent {\n static propTypes = {\n onClose: PropTypes.func\n }\n\n @autobind\n onClick(event) {\n const { onClose, fullSize } = this.props\n if (\n 'function' == typeof onClose &&\n !fullSize &&\n (this.refLightBoxBackdrop == event.target || this.refLightBoxBackdropCenter == event.target)\n ) {\n stopEvent(event)\n onClose()\n return false\n }\n return true\n }\n\n render() {\n const { onClose, children, fullSize, background, className, ...otherProps } = this.props\n\n return (\n <Portal>\n <div\n className={`rfd-ui-light-box ${className ? className : ''}`}\n onMouseDown={this.onClick}\n ref={this.saveRef('LightBoxBackdrop')}\n style={{ backgroundColor: background }}\n {...otherProps}\n >\n <div\n className=\"rfd-ui-light-box-center\"\n onMouseDown={this.onClick}\n ref={this.saveRef('LightBoxBackdropCenter')}\n >\n <div className=\"rfd-ui-light-box-center-content\">{children}</div>\n </div>\n </div>\n </Portal>\n )\n }\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"component\":\"loader-dots-module__component___1Q47M rfd-ui-loader-dots\",\"dot\":\"loader-dots-module__dot___3wTm0\",\"rfd-ui-loader-dots-color\":\"loader-dots-module__rfd-ui-loader-dots-color___2-hwr\",\"dot-0\":\"loader-dots-module__dot-0___2dEQT\",\"dot-1\":\"loader-dots-module__dot-1___1dz0l\",\"dot-2\":\"loader-dots-module__dot-2___1xOG6\"};","// lib\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { Repeat } from 'immutable'\n\n// styles\nimport style from '@aytm/lib/rfd-ui/styles/basic/loader-dots.module.scss'\n\n// <Component>\nLoaderDots.propTypes = {\n dots: PropTypes.number,\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n dotSize: PropTypes.number\n}\nexport default React.memo(\n LoaderDots,\n (prevProps, nextProps) =>\n prevProps.dots === nextProps.dots &&\n prevProps.height === nextProps.height &&\n prevProps.dotSize === nextProps.dotSize\n)\nfunction LoaderDots(props) {\n const { dots = 3, dotSize, height } = props\n const lineHeight = 'number' == typeof height ? `${height}px` : height\n return (\n <div className={style.component} style={{ lineHeight }}>\n {Repeat(null, dots)\n .map((_v, i) => (\n <span\n key={i}\n className={`${style.dot} ${style[`dot-${i % 3}`]}`}\n style={{\n width: dotSize,\n height: dotSize,\n lineHeight,\n marginRight: dotSize && i < dots - 1 ? dotSize / 2 : null,\n borderRadius: dotSize ? dotSize / 2 : null\n }}\n />\n ))\n .toArray()}\n </div>\n )\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { Repeat } from 'immutable'\n\nimport { PureDataComponent } from '@aytm/lib/common/components/pure-component'\n\nimport '@aytm/lib/rfd-ui/styles/basic/loader-wave.scss'\n\nexport default class LoaderWave extends PureDataComponent {\n static propTypes = {\n bars: PropTypes.number,\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n }\n\n render() {\n const bars = this.props.bars || 20\n const height = this.props.height || 12\n return (\n <span className=\"rfd-ui-loader-wave\" style={{ height }}>\n {Repeat(null, bars)\n .map((_v, i) => <span key={i} className={`rfd-ui-loader-wave-bar rfd-ui-loader-wave-bar-${i % 50}`} />)\n .toArray()}\n </span>\n )\n }\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport classNames from 'classnames'\nimport autobind from 'autobind-decorator'\nimport InputMask from 'inputmask-core'\nimport { List } from 'immutable'\nimport { PureDataComponent } from '@aytm/lib/common/components/pure-component'\nimport { stopEvent, isKeyUndo, isKeyRedo, getSelection, setSelection } from '@aytm/lib/common/func'\nimport { KEYCODE_BACKSPACE } from '@aytm/lib/common/const'\n\nimport '@aytm/lib/rfd-ui/styles/basic/masked-input.scss'\n\nexport default class MaskedInput extends PureDataComponent {\n static propTypes = {\n value: PropTypes.string,\n defaultValue: PropTypes.string,\n pattern: PropTypes.string,\n placeholderChar: PropTypes.string,\n formatCharacters: PropTypes.object,\n sub: PropTypes.string,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n mono: PropTypes.bool,\n onKeyPress: PropTypes.func,\n onKeyDown: PropTypes.func,\n onChange: PropTypes.func,\n onPaste: PropTypes.func\n }\n\n constructor(props) {\n super(props)\n this.state = {\n value: ''\n }\n }\n\n @autobind\n updateSelection() {\n const { maskLib, refInput } = this\n if (refInput && maskLib) {\n maskLib.setSelection(getSelection(refInput))\n }\n }\n\n @autobind\n updateValue(sendUpdate = true) {\n const { onChange } = this.props\n if (this.refInput && this.maskLib) {\n const newValue = this.maskLib.getValue()\n const { value: prevValue } = this.state\n this.setState({ value: newValue == this.maskLib.emptyValue ? '' : newValue }, () => {\n if (document.activeElement == this.refInput) {\n setSelection(this.refInput, this.maskLib.selection)\n }\n if (sendUpdate && 'function' == typeof onChange && prevValue != newValue) {\n const raw = this.maskLib.getRawValue()\n const { sub } = this.props\n const withSub =\n null != sub\n ? newValue\n .split('')\n .map((c, i) => (' ' == c ? sub[i] || ' ' : c))\n .join('')\n : newValue\n const prevWithSub =\n null != sub\n ? prevValue\n .split('')\n .map((c, i) => (' ' == c ? sub[i] || ' ' : c))\n .join('')\n : prevValue\n onChange(newValue, prevValue, { raw, withSub, prevWithSub, empty: newValue == this.maskLib.emptyValue })\n }\n })\n }\n }\n\n @autobind\n setMask(props = this.props) {\n const rawValue = this.maskLib ? this.maskLib.getRawValue() : ''\n const { pattern, placeholderChar, formatCharacters } = props\n this.maskLib = new InputMask({\n pattern: pattern,\n placeholderChar: placeholderChar || ' ',\n formatCharacters: formatCharacters,\n value: rawValue\n })\n this.updateValue(false)\n }\n\n @autobind\n onKeyDown(event) {\n const { onKeyDown } = this.props\n if ('function' == typeof onKeyDown) onKeyDown(event)\n if ('Backspace' == event.key || KEYCODE_BACKSPACE == event.which || KEYCODE_BACKSPACE == event.keyCode) {\n stopEvent(event)\n const { maskLib } = this\n this.updateSelection()\n if (maskLib && maskLib.backspace()) this.updateValue()\n return false\n } else if (isKeyUndo(event)) {\n stopEvent(event)\n const { maskLib } = this\n if (maskLib && maskLib.undo()) this.updateValue()\n return false\n } else if (isKeyRedo(event)) {\n stopEvent(event)\n const { maskLib } = this\n if (maskLib && maskLib.redo()) this.updateValue()\n return false\n }\n return true\n }\n\n @autobind\n onKeyPress(event) {\n const { onKeyPress } = this.props\n if ('function' == typeof onKeyPress) onKeyPress(event)\n if (event.metaKey || event.altKey || event.ctrlKey || 'Enter' == event.key) return\n stopEvent(event)\n const keyChar = event.key || String.fromCharCode(event.which || event.keyCode)\n this.updateSelection()\n const { maskLib } = this\n if (maskLib && maskLib.input(keyChar)) this.updateValue()\n }\n\n @autobind\n onPaste(event) {\n const { onPaste } = this.props\n if ('function' == typeof onPaste) onPaste(event)\n const text = event.clipboardData ? event.clipboardData.getData('Text') : null\n if (text) {\n stopEvent(event)\n this.updateSelection()\n const { sub, pattern } = this.props\n if (this.maskLib) {\n const subCorrectedText =\n null == sub\n ? text\n : List(text.split(''))\n .map((c, i) => (c == sub[i] && ' ' == pattern[i] ? ' ' : c))\n .join('')\n if (0 < List(subCorrectedText.split('')).reduce((sum, c) => (this.maskLib.input(c) ? sum + 1 : sum), 0)) {\n this.updateValue()\n }\n }\n return false\n }\n return true\n }\n\n @autobind\n onChange() {\n if (this.maskLib && this.refInput) {\n const newValue = this.refInput.value\n if (newValue != this.maskLib.getValue()) {\n const { start } = getSelection(this.refInput)\n this.maskLib.setValue(newValue)\n const setTo = Math.min(newValue.length - 1, start)\n this.maskLib.setSelection({ start: setTo, end: setTo })\n setSelection(this.refInput, this.maskLib.selection)\n setTimeout(this.updateValue, 0)\n }\n }\n }\n\n @autobind\n updatePattern(pattern) {\n const { maskLib, refInput } = this\n if (maskLib && refInput) {\n const preRaw = maskLib.getRawValue().replace(new RegExp(`[${maskLib.placeholderChar}]+$`), '')\n maskLib.setPattern(pattern, { value: '' })\n // reinsert previous text\n List(preRaw.split('')).reduce((sum, c) => (maskLib.input(c) ? sum + 1 : sum), 0)\n this.updateValue(false)\n }\n }\n\n UNSAFE_componentWillMount() {\n super.UNSAFE_componentWillMount()\n this.setMask()\n const initValue = this.props.value || this.props.defaultValue\n if (null != initValue) {\n this.maskLib.setValue(initValue)\n }\n }\n\n componentDidMount() {\n super.componentDidMount()\n this.updateValue(false)\n }\n\n componentWillUnmount() {\n super.componentWillUnmount()\n this.maskLib = null\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n super.UNSAFE_componentWillReceiveProps(nextProps)\n if (\n this.maskLib &&\n null != nextProps.value &&\n nextProps.value != this.props.value &&\n nextProps.value != this.state.value\n ) {\n this.maskLib.setValue(nextProps.value)\n this.updateValue(false)\n }\n if (\n nextProps.placeholderChar != this.props.placeholderChar ||\n nextProps.formatCharacters != this.props.formatCharacters\n ) {\n this.setMask(nextProps)\n } else if (this.maskLib && nextProps.pattern != this.props.pattern) {\n this.updatePattern(nextProps.pattern)\n }\n }\n\n render() {\n const {\n pattern,\n sub,\n formatCharacters,\n placeholderChar,\n mono,\n width,\n style,\n className,\n placeholder,\n onKeyDown,\n onKeyPress,\n onChange,\n onPaste,\n value,\n defaultValue,\n ...otherProps\n } = this.props\n const managedValue = this.state.value\n const formattedSub = sub\n ? managedValue\n ? sub\n .split('')\n .map((_c, i) => ((placeholderChar || ' ') == managedValue[i] || ' ' == managedValue[i] ? sub[i] : ' '))\n .join('')\n : sub\n : null\n const showSub = null != sub && (!placeholder || managedValue.length > 0)\n return (\n <div\n className={classNames('rfd-ui-masked-input', { 'rfd-ui-masked-input-mono': null != sub || mono })}\n style={{ width }}\n >\n <input\n ref={this.saveRef('Input')}\n key=\"input\"\n type=\"text\"\n className={className}\n value={managedValue}\n style={style}\n onKeyDown={this.onKeyDown}\n onKeyPress={this.onKeyPress}\n onChange={this.onChange}\n onPaste={this.onPaste}\n placeholder={placeholder}\n {...otherProps}\n />\n {showSub && (\n <div className=\"rfd-ui-masked-input-sub\" style={style} key=\"sub\">\n {formattedSub}\n </div>\n )}\n </div>\n )\n }\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport classNames from 'classnames'\nimport TextareaAutosize from 'react-autosize-textarea'\nimport autobind from 'autobind-decorator'\nimport { listPipe } from '@aytm/lib/common/func'\n\nimport { PureDataComponent } from '@aytm/lib/common/components/pure-component'\n\nimport MaskedInput from '@aytm/lib/rfd-ui/components/basic/masked-input'\n\nimport '@aytm/lib/rfd-ui/styles/basic/text-field.scss'\n\nexport default class TextField extends PureDataComponent {\n static propTypes = {\n value: PropTypes.string,\n defaultValue: PropTypes.string,\n placeholder: PropTypes.string,\n inputType: PropTypes.string,\n autoFocus: PropTypes.bool,\n readOnly: PropTypes.bool,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n debounce: PropTypes.number,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n active: PropTypes.bool,\n error: PropTypes.bool,\n icon: PropTypes.string,\n iconColor: PropTypes.string,\n onIconClick: PropTypes.func,\n charLimit: PropTypes.number,\n counterWidth: PropTypes.number,\n prefix: PropTypes.string,\n prefixWidth: PropTypes.number,\n filter: PropTypes.func,\n format: PropTypes.func,\n rows: PropTypes.number,\n theme: PropTypes.string,\n // masking params :\n maskPattern: PropTypes.string,\n maskPlaceholderChar: PropTypes.string,\n maskFormatCharacters: PropTypes.object,\n maskSub: PropTypes.string\n }\n\n constructor(props) {\n super(props)\n this.state = {\n focused: false,\n value: ''\n }\n this.debounceTimeout = null\n this.debouncePrevValue = null\n }\n\n @autobind\n onFocus(event) {\n const { onFocus } = this.props\n if ('function' == typeof onFocus) onFocus(event)\n this.setState({ focused: true })\n }\n\n @autobind\n focus() {\n if (this.refInput) {\n this.refInput.focus()\n return true\n }\n return false\n }\n\n @autobind\n onBlur(event) {\n const { onBlur } = this.props\n const newValue = listPipe(\n [\n v => {\n const { format } = this.props\n return 'function' == typeof format ? format(v) || '' : v\n }\n ],\n ((this.refInput instanceof MaskedInput ? this.refInput.refInput : this.refInput) || event.target).value || ''\n )\n if ('function' == typeof this.props.onBlur) onBlur(event)\n const { value: prevValue } = this.state\n this.setState(\n {\n value: newValue,\n focused: false\n },\n () => {\n this.sendUpdate(newValue, prevValue, null, false)\n }\n )\n }\n\n @autobind\n onChange(event) {\n // const { resizable } = this.props\n const newValue = listPipe(\n [\n v => {\n const { charLimit } = this.props\n return null != charLimit && v.length > charLimit ? v.slice(0, Math.max(0, charLimit)) : v\n },\n v => {\n const { filter } = this.props\n return 'function' == typeof filter ? filter(v) || '' : v\n }\n ],\n (this.refInput || event.target).value || ''\n )\n const { value: prevValue } = this.state\n // console.log(this.refInput.height)\n // if (resizable && this.refInput.cols) {\n // const rows = Math.max(this.props.rows, this.refInput.textLength / this.refInput.cols)\n // if (rows != this.state.rows)\n // this.setState({ rows: rows })\n // }\n this.setState({ value: newValue }, () => {\n this.sendUpdate(newValue, prevValue)\n })\n return { newValue, prevValue }\n }\n\n @autobind\n onMaskedChange(newValue, prevValue, data) {\n return this.sendUpdate(newValue, prevValue, data)\n }\n\n @autobind\n sendUpdate(newValue, prevValue, data, debounce = this.props.debounce) {\n const { onChange } = this.props\n if (newValue != prevValue && 'function' == typeof onChange) {\n if (debounce) {\n if (this.debounceTimeout) clearTimeout(this.debounceTimeout)\n this.debounceTimeout = setTimeout(() => {\n if (this.mounted) onChange(newValue, prevValue, data)\n this.debounceTimeout = null\n }, debounce)\n } else if (this.mounted) {\n onChange(newValue, prevValue, data)\n }\n }\n return { newValue, prevValue, data }\n }\n\n componentDidMount() {\n super.componentDidMount()\n const { value, defaultValue, format, autoFocus } = this.props\n const initValue = value || defaultValue\n if (initValue) {\n this.setState({\n value: 'function' == typeof format ? this.props.format(initValue) : initValue\n })\n }\n if (autoFocus) this.focus()\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.value !== this.props.value && this.props.value !== this.state.value) {\n this.setState({ value: this.props.value || '' })\n }\n }\n\n //TODO: consider breaking into subrenders\n render() {\n const {\n width,\n icon,\n iconColor,\n active,\n error,\n style,\n className,\n placeholder,\n readOnly,\n maskPattern,\n maskPlaceholderChar,\n maskFormatCharacters,\n maskSub,\n onIconClick,\n onFocus,\n onBlur,\n onChange,\n debounce,\n value,\n defaultValue,\n charLimit,\n prefix,\n postfix,\n theme,\n format,\n filter,\n counterWidth,\n prefixWidth,\n postfixWidth,\n cols,\n rows,\n autoFocus,\n resizableHeight,\n inputType = 'text',\n ...otherProps\n } = this.props\n\n const { focused, value: sValue } = this.state\n const innerPaddingRight = listPipe(\n [\n p => (icon ? (p || 0) + 33 : p),\n p => (postfix ? (null == postfixWidth ? p + 15 : p + postfixWidth) : p),\n p =>\n !maskPattern && charLimit\n ? (p || 0) + (counterWidth ? counterWidth || 33 : Number(String(charLimit).length))\n : p\n ],\n null\n )\n const innerPaddingLeft = prefix ? (null == prefixWidth ? 26 : prefixWidth + 16) : null\n // if (autoFocus) this.focus()\n\n return (\n <div\n className={classNames('rfd-ui-text-field', className, {\n 'rfd-ui-text-field-active': active,\n 'rfd-ui-text-field-error': error,\n 'rfd-ui-text-field-focused': focused,\n 'rfd-ui-text-field-readonly': readOnly,\n 'rfd-ui-text-field-area': !maskPattern && rows,\n [`rfd-ui-text-field-${theme}`]: theme\n })}\n style={{ width }}\n >\n <div\n className=\"rfd-ui-text-field-inner\"\n style={{\n padding: !maskPattern && rows ? 0 : 'small' == theme ? 3 : 7,\n paddingRight: !maskPattern && rows ? 0 : innerPaddingRight,\n paddingLeft: !maskPattern && rows ? 0 : innerPaddingLeft\n }}\n >\n {icon && (\n <i\n className={`rfd-ui-text-field-icon ${icon}`}\n style={{\n color: iconColor,\n cursor: onIconClick ? 'pointer' : null\n }}\n onClick={onIconClick}\n />\n )}\n {prefix && (\n <span className=\"rfd-ui-text-field-prefix\" style={{ width: prefixWidth }}>\n {prefix}\n </span>\n )}\n {!maskPattern && charLimit && (\n <span\n className=\"rfd-ui-text-field-counter\"\n style={{\n right: icon ? 33 : rows ? 16 : 7,\n width: counterWidth ? String(charLimit).length * 10 : String(charLimit).length * 10\n }}\n >\n {charLimit - sValue.length}\n </span>\n )}\n {!(maskPattern || rows) && (\n <input\n className={`rfd-ui-text-field-input ${postfix ? 'right' : ''}`}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.onChange}\n value={sValue}\n readOnly={readOnly}\n placeholder={placeholder}\n ref={this.saveRef('Input')}\n type={inputType}\n {...otherProps}\n />\n )}\n {!maskPattern && rows && resizableHeight && (\n <TextareaAutosize\n autoFocus={autoFocus}\n className=\"rfd-ui-text-area-field\"\n cols={cols ? cols : width ? Math.abs(width / 15) : null}\n rows={rows}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.onChange}\n value={sValue}\n readOnly={readOnly}\n placeholder={placeholder}\n innerRef={this.saveRef('Input')}\n type=\"text\"\n style={{ paddingRight: innerPaddingRight + 8, paddingLeft: innerPaddingLeft }}\n {...otherProps}\n />\n )}\n {maskPattern && (\n <MaskedInput\n className=\"rfd-ui-text-field-input rfd-ui-text-field-masked-input\"\n pattern={maskPattern}\n placeholderChar={maskPlaceholderChar}\n formatCharacters={maskFormatCharacters}\n sub={maskSub}\n width={width ? width : 200}\n value={sValue}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.onMaskedChange}\n ref={this.saveRef('Input')}\n {...otherProps}\n />\n )}\n {postfix && (\n <span className=\"rfd-ui-text-field-postfix\" style={{ width: postfixWidth }}>\n {postfix}\n </span>\n )}\n </div>\n </div>\n )\n }\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"minPlaceholderHeight\":\"34\",\"indent0\":\"39\",\"indent1\":\"72\",\"indent2\":\"105\",\"indent3\":\"138\",\"component\":\"ErrorPopup-module__component___3Ds3d surveyEditor-ErrorPopup\",\"popupArrow\":\"ErrorPopup-module__popupArrow___1wJbB\",\"topleft\":\"ErrorPopup-module__topleft___1TXnC\",\"bottomleft\":\"ErrorPopup-module__bottomleft___22Q_3\",\"lefttop\":\"ErrorPopup-module__lefttop___AcN6W\",\"content\":\"ErrorPopup-module__content___3EdoL\",\"errors\":\"ErrorPopup-module__errors___2VWfg\",\"dot\":\"ErrorPopup-module__dot___kKmWZ\",\"errorText\":\"ErrorPopup-module__errorText___2MMIv\",\"questionLink\":\"ErrorPopup-module__questionLink___2-yMg\",\"actionLinks\":\"ErrorPopup-module__actionLinks___3lQ60\",\"actionLink\":\"ErrorPopup-module__actionLink___3nejJ\",\"actionLinkIcon\":\"ErrorPopup-module__actionLinkIcon___1naGV\"};","// extracted by mini-css-extract-plugin\nexport default {\"portal\":\"SuggestionsComponent-module__portal___11C1A\",\"text\":\"SuggestionsComponent-module__text___s3I78\",\"placeholder\":\"SuggestionsComponent-module__placeholder___1XxTB\",\"dropdown\":\"SuggestionsComponent-module__dropdown___7TDEB\",\"items\":\"SuggestionsComponent-module__items___k3zjv\",\"item\":\"SuggestionsComponent-module__item___2PF_-\",\"item--active\":\"SuggestionsComponent-module__item--active___34gNQ\",\"content-text\":\"SuggestionsComponent-module__content-text___8hSLe\",\"content-icon\":\"SuggestionsComponent-module__content-icon___3l5EI\",\"content\":\"SuggestionsComponent-module__content___HDWMJ\",\"content-text--with-icon\":\"SuggestionsComponent-module__content-text--with-icon___Wb-_O\",\"content-text--with-help\":\"SuggestionsComponent-module__content-text--with-help___1tu0R\",\"content-text--with-icon-and-help\":\"SuggestionsComponent-module__content-text--with-icon-and-help___2ius-\",\"content-help\":\"SuggestionsComponent-module__content-help___2AHn-\"};","// extracted by mini-css-extract-plugin\nexport default {\"aytmLogicStatement\":\"draft-js-decorators-module__aytmLogicStatement___FsX9p\",\"text\":\"draft-js-decorators-module__text___NuOAG\",\"textError\":\"draft-js-decorators-module__textError___2uLNo\",\"textWarning\":\"draft-js-decorators-module__textWarning___tKGcf\",\"textOld\":\"draft-js-decorators-module__textOld___6PoFA\",\"content\":\"draft-js-decorators-module__content___2kejj\",\"popupContent\":\"draft-js-decorators-module__popupContent___2zOgH\",\"oldTranslate\":\"draft-js-decorators-module__oldTranslate___1HEV8\",\"errorsPopupContainer\":\"draft-js-decorators-module__errorsPopupContainer___DhAGL\",\"errorsPopup\":\"draft-js-decorators-module__errorsPopup___1f4UX\",\"popupArrowContainer\":\"draft-js-decorators-module__popupArrowContainer___3eHiW\",\"popupArrow\":\"draft-js-decorators-module__popupArrow___3fmxw\",\"errorText\":\"draft-js-decorators-module__errorText___2iTSD\"};"],"names":["EMAIL_REGEX","errorLabelMatch","AYTM_LOGIC_STATEMENT_MATCH","AYTM_LOGIC_ESCAPE_BRACKET_MATCH","AYTM_LOGIC_ESCAPE_BRACKET_REGEXP","RegExp","AYTM_LOGIC_STATEMENT_STRING_MATCH","extractLogicStatementsFromText","arguments","length","undefined","match","filter","statement","test","map","slice","replaceLogicStatementsInText","replacer","replace","extractRefsFromLogicStatement","refs","labelMatch","push","extractErrorRefsFromLogicStatement","countText","featuresStore","getFeatures","editorUID","Map","getFeature","featureUID","get","status","getFeatureUpgradePackage","getIn","getFeatureStatus","hasFeatureStatus","feature","_len","statuses","Array","_key","has","includes","isFeatureOn","isFeatureOff","setFeatures","features","questionTypeFeature","questionType","questionMode","getQuestionTypeStatus","getQuestionTypeUpgradePackage","isQuestionTypeAvailable","base","projectUID","checkout","validate","requestAccessToken","transferControl","editAction","viewAction","correctAction","versionAction","newTargetMarketAction","translateAction","editTargetMarketAction","graphQLEndPoint","imageAsset","path","_ref","_ref$width","width","_ref$height","height","_ref$filter","IMAGE_ASSET_PATH_FILTER_RESIZE_TO_FIT","_ref$backgroundColor","backgroundColor","_ref$unsharp","unsharp","_ref$gravity","gravity","IMAGE_ASSET_PATH_GRAVITY_CENTER","_ref$animated","animated","_ref$trim","trim","getImageAssetPath","getMultilingualRoute","researcherLanguage","languageUID","IMAGE_ASSET_PATH_FILTER_RESIZE_TO_STRETCH","IMAGE_ASSET_PATH_FILTER_RESIZE_TO_LIMIT","IMAGE_ASSET_PATH_FILTER_RESIZE_TO_FILL","IMAGE_ASSET_PATH_FILTER_RESIZE_AND_PAD","IMAGE_ASSET_PATH_FILTER_SMART_CROP","IMAGE_ASSET_SIZE_SMALL","IMAGE_ASSET_SIZE_MIDDLE","IMAGE_ASSET_SIZE_BIG","OLD_IMAGE_ASSET_WIDTH","OLD_IMAGE_ASSET_HEIGHT","OLD_IMAGE_ASSET_WIDTH_MEDIUM","OLD_IMAGE_ASSET_HEIGHT_MEDIUM","_ref$host","host","window","assets_host","_ref$pathPrefix","pathPrefix","_ref$path","_ref$json","json","toLowerCase","getSmallAssetPath","asset","fill","original_path","getOldSmallAssetPath","getOldMediumAssetPath","getMediumAssetPath","background","getBigAssetPath","nameContextProvider","name","ContextProviderSubscriptions","_createClass","onSubscribe","onUnsubscribe","onUnsubscribeAll","onProviderUnmount","_classCallCheck","this","listeners","values","subscribe","bind","unsubscribe","key","value","newValues","i","listener","subscribeOn","subscribedValues","updated","unsubscribed","listenerIndex","indexOf","splice","forEach","ContextProvider","options","propTypes","contextTypes","shouldUpdate","mapToProps","propsMapper","isArray","reduce","props","Object","keys","ProviderComponent","providerComponentDisplayName","displayName","thisNameContextProvider","ContextProviderComponent","_Component","_this","_callSuper","fetchContextValues","saveWrappedRef","saveWrappedComponentRef","subscriptions","_inherits","_defineProperty","fetchedValues","call","updateValues","contextProps","nextProps","providerUnmount","element","saveRef","component","refWrappedComponent","React","_extends","ref","Component","WrappedComponent","ContextProviderOptions","childContextTypes","PropTypes","hoistNonReactStatics","ContextSubscriber","subscribers","_subscribers$reduce","data","subscriber","normalizedSubscriber","subscribersList","provider","providerSubscriptionContextTypes","updateOnProps","prevProps","SubscribedComponent","subscribedComponentDisplayName","ContextSubscriberComponent","context","contextValues","state","unsubscribeListeners","subscription","mappedContextProps","mounted","some","mappedContextPropsKey","setState","assign","x","_step","_iterator","_createForOfIteratorHelper","s","n","done","_subscriber$provider","_subscriber$provider$","_subscriber$provider2","err","e","f","_this2","updatedContextProps","ContextSubscribers","shallowEqual","a","b","PureComponent","nextState","nextContext","_get2","args","_get","_getPrototypeOf","prototype","apply","concat","error","info","exceptionReporter","shallowDataEqual","PureDataComponent","_PureComponent","copyToClipboard","text","navigator","clipboard","writeText","clipboardData","setData","bufferElement","document","createElement","textContent","body","appendChild","selection","getSelection","range","createRange","selectNodeContents","selectNode","removeAllRanges","addRange","execCommand","removeChild","_unused","getNode","target","querySelector","Element","current","containerExpander","container","_ref$margin","margin","defaultMargin","containerProps","expanded","containerHeightFreezed","node","originalMinHeight","originalHeight","originalOverflow","insets","initContainer","style","minHeight","adjustContainer","size","lowestInsetBottom","_ref2","inset","_ref2$margin","insetRect","getBoundingClientRect","insetBottom","top","bottom","containerTop","expandContainerAPI","expand","_ref3","_ref3$margin","insetNode","set","unexpand","delete","freezeContainerHeight","overflow","_containerProps$node$2","unfreezeContainerHeight","templateVariablesRegex","ErrorsDecoratorPopup","locale","errors","textProps","_props$errorTypes","errorTypes","ERROR_TYPES","updateOldRefs","disableValidation","_useState2","_slicedToArray","useState","showPopup","setShowPopup","errorText","children","errorObj","find","type","errorTextTrimmed","toUpperCase","normalizedText","extractErrorObject","errorType","errorTypeText","errorString","upgradePackage","packageName","capitalize","packageURL","className","href","title","rel","dangerouslySetInnerHTML","__html","matchArr","replacements","exec","extractErrorHint","str","extractErrorTypeText","onMouseEnter","onMouseLeave","Popup","show","Boolean","portal","renderRef","content","onClick","errorPopupStyle","direction","errorKey","color","alias","cluster","trait","sref","parse","aytm_logic_required","old","invalid_logic","old_translate","createErrorsDecoratorComponent","store","getErrors","getLocale","createErrorsDecoratorStrategy","contentBlock","callback","_store$strategy$error","strategy","processText","getText","errorTypeFilter","_","sort","detectError","console","log","detectErrors","CompositeDecorator","suggestion","index","selectedIndex","selectSuggestion","onMouseDown","event","preventDefault","id","classNames","styles","label","SuggestionsComponent","_class","_React$PureComponent","_props$items","items","visibility","refItems","timeoutId","portalStyles","calculatePortalStyles","pageX","pageY","preselectedIndex","selected","setTimeout","scrollToItem","force","updatePosition","clearTimeout","_this3","offsetText","cursorTextStyle","extractDropdownOffsetText","font","position","opacity","zIndex","rects","getClientRects","Math","ceil","itemsElementRects","selectionCoords","itemsWidth","textOffsetLeft","calculateDropdownTextOffsetLeft","offset","getSelectionCoords","elementOffsetTop","scrollY","documentElement","scrollTop","elementOffsetLeft","scrollX","scrollLeft","dropdownOffsetLeft","calculateDropdownOffsetLeft","dropdownOffsetTop","calculateDropdownOffsetTop","floor","y","left","heightLimit","clientHeight","itemsElement","calculateItemIndexByHeightLimit","max","_this4","_this4$state","prevSelectedIndex","prevPageX","prevPageY","prevState","addEventListener","handleKeyDown","removeEventListener","_this5","_ref3$force","_this$state","itemIndex","min","itemElement","itemOffsetTop","offsetTop","_this$state2","calculatePageUpItemIndex","calculatePageDownItemIndex","_this6","onMouseMove","createSuggestionMouseHandler","SuggestionItem","_this$state3","Portal","portalId","renderDropdown","_applyDecoratedDescriptor","autobind","getOwnPropertyDescriptor","trimmed","firstWordMatch","lastWordMatch","lastWord","firstWord","withoutFirstWord","withoutLastWord","firstWordCI","lastWordCI","withoutFirstWordCI","withoutLastWordCI","lower","upper","endsWith","letter","startsWithLetter","Span","CompoundDecorator","decorators","decorator","block","contentState","emptyTuples","from","decorations","tuples","blockDecorations","getDecorations","tuple","tupleIndex","_toConsumableArray","List","JSON","stringify","decoratorProps","compositionProps","_objectWithoutProperties","_excluded","Composed","Composition","decoration","getComponentForKey","componentProps","_objectSpread","getPropsForKey","countLines","matchNewlines","getSuggestionsStub","pluginStore","customProcessText","extractSelection","_ref$suggestionsBuild","suggestionsBuilders","getEditorState","setEditorState","suggestions","isActive","doneFetching","defaultProcessText","checkAutocompleteIsVisible","updateSuggestionsComponentItems","updateItems","textBefore","textAfter","editorState","getCurrentContent","plainText","getPlainText","newPlainTextBefore","start","newPlainTextAfter","end","afterCursor","newPlainText","charsStyles","getBlocksAsArray","getCharacterList","charMetaData","getStyle","toJS","newAnchorKey","newCharsStyles","characterList","CharacterMetadata","newContentBlock","ContentBlock","genKey","depth","newContentState","ContentState","newEditorState","EditorState","newCurrentContent","newBlockArray","cursorOffset","shift","styledCurrentContent","blockCursor","characterCursor","inlineStyle","Modifier","SelectionState","getKey","merge","anchorOffset","focusOffset","styledEditorState","getDecorator","styledSelectionState","anchorKey","focusKey","createSuggestions","_selection$text","beforeCursor","meta","suggestionsData","getSuggestionsData","processTextBeforeCursor","processTextAfterCursor","suggestionsStream","builders","suppliedIds","ObservableMerge","builder","pipe","rxDelay","rxFilter","suggestionsBuilder","dependencies","rxToArray","preFillSuggestions","_done","DefaultSuggestionsComponent","el","refComponent","getCursor","selectionState","getStartOffset","getEndOffset","initialize","_ref4","handleReturn","keyBindingFn","which","KEYCODE_ESC","stopPropagation","KEYCODE_ENTER","KEYCODE_UP","KEYCODE_DOWN","handleKeyCommand","command","onChange","canAutocompleteBeActive","getHasFocus","nextSelection","getAnchorKey","getFocusKey","blockMap","getBlockMap","startOffset","endOffset","skipWhile","getAnchorOffset","getFocusOffset","extractSelectionOffsets","collapse","boundingLeft","boundingTop","rangeCount","getRangeAt","cloneRange","rect","span","createTextNode","insertNode","spanParent","parentNode","normalize","Button","_Button","_PureDataComponent","_this$props","disabled","onAction","action","_this$props2","compact","icon","iconPosition","asAnchor","theme","otherProps","mergedStyle","buttonProps","defaultProps","LightBox","_LightBox","onClose","fullSize","refLightBoxBackdrop","refLightBoxBackdropCenter","stopEvent","LoaderDots","dots","dotSize","_props$dots","lineHeight","Repeat","_v","marginRight","borderRadius","toArray","LoaderWave","bars","MaskedInput","_MaskedInput","maskLib","refInput","setSelection","sendUpdate","newValue","getValue","prevValue","emptyValue","activeElement","raw","getRawValue","sub","withSub","split","c","join","prevWithSub","empty","rawValue","pattern","placeholderChar","formatCharacters","InputMask","updateValue","onKeyDown","KEYCODE_BACKSPACE","keyCode","updateSelection","backspace","isKeyUndo","undo","isKeyRedo","redo","onKeyPress","metaKey","altKey","ctrlKey","keyChar","String","fromCharCode","input","onPaste","getData","subCorrectedText","sum","setValue","setTo","preRaw","setPattern","setMask","initValue","defaultValue","updatePattern","mono","placeholder","managedValue","formattedSub","_c","showSub","TextField","_TextField","focused","debounceTimeout","debouncePrevValue","onFocus","focus","onBlur","listPipe","v","format","charLimit","debounce","autoFocus","iconColor","active","readOnly","maskPattern","maskPlaceholderChar","maskFormatCharacters","maskSub","onIconClick","prefix","postfix","counterWidth","prefixWidth","postfixWidth","cols","rows","resizableHeight","_this$props2$inputTyp","inputType","sValue","innerPaddingRight","p","Number","innerPaddingLeft","padding","paddingRight","paddingLeft","cursor","right","TextareaAutosize","abs","innerRef","onMaskedChange"],"sourceRoot":""}