Your IP : 18.222.161.57


Current Path : /var/www/u0635749/data/www/hobbyclick.ru/public/bitrix/js/sender/toloka/dist/
Upload File :
Current File : /var/www/u0635749/data/www/hobbyclick.ru/public/bitrix/js/sender/toloka/dist/toloka.bundle.js.map

{"version":3,"file":"toloka.bundle.js","sources":["../src/autocomplete/components/element.js","../src/autocomplete/autocomplete.js","../src/toloka.js"],"sourcesContent":["const allowedAttributes = {\n\tvalue: \"data-value\",\n\tname: \"data-name\",\n\tdisabled: \"data-disabled\",\n\tclass: \"class\",\n\ttype: \"type\"\n};\n\nclass Element\n{\n\tconstructor(element, attributes = {}, i18n = {})\n\t{\n\t\tthis._node = element instanceof HTMLElement ? element : document.createElement(element);\n\t\tthis._config = { i18n };\n\n\t\tthis._setAttributes(attributes);\n\n\t\tif (attributes.textContent)\n\t\t{\n\t\t\tthis._setTextContent(attributes.textContent);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tget()\n\t{\n\t\treturn this._node;\n\t}\n\n\tappend(element)\n\t{\n\t\tthis._node.appendChild(element);\n\t\treturn this;\n\t}\n\n\taddClass(className)\n\t{\n\t\tthis._node.classList.add(className);\n\t\treturn this;\n\t}\n\n\tremoveClass(className)\n\t{\n\t\tthis._node.classList.remove(className);\n\t\treturn this;\n\t}\n\n\ttoggleClass(className)\n\t{\n\t\tthis._node.classList.toggle(className);\n\t\treturn this;\n\t}\n\n\taddEventListener(type, callback)\n\t{\n\t\tthis._node.addEventListener(type, callback);\n\t\treturn this;\n\t}\n\n\tremoveEventListener(type, callback)\n\t{\n\t\tthis._node.removeEventListener(type, callback);\n\t\treturn this;\n\t}\n\n\tsetText(text)\n\t{\n\t\tthis._setTextContent(text);\n\t\treturn this;\n\t}\n\n\tgetHeight()\n\t{\n\t\treturn window.getComputedStyle(this._node).height;\n\t}\n\n\n\tgetWidth()\n\t{\n\t\treturn window.getComputedStyle(this._node).width;\n\t}\n\n\tsetTop(top)\n\t{\n\t\tthis._node.style.top = `${top}px`;\n\t\treturn this;\n\t}\n\n\tfocus()\n\t{\n\t\tthis._node.focus();\n\t\treturn this;\n\t}\n\n\t_setTextContent(textContent)\n\t{\n\t\tthis._node.textContent = textContent;\n\t}\n\n\t_setAttributes(attributes)\n\t{\n\t\tfor (const key in attributes)\n\t\t{\n\t\t\tif (allowedAttributes[key] && attributes[key])\n\t\t\t{\n\t\t\t\tthis._setAttribute(allowedAttributes[key], attributes[key]);\n\t\t\t}\n\t\t}\n\t}\n\n\t_setAttribute(key, value)\n\t{\n\t\tthis._node.setAttribute(key, value);\n\t}\n\n\t_getAttribute(key)\n\t{\n\t\tthis._node.getAttribute(key);\n\t}\n}\n\nexport default Element;\n","import Element from \"./components/element\";\nimport \"./css/autocomplete.css\";\nimport { Popup } from 'main.popup';\n\nconst CLASSES = {\n\tselect: \"main-ui-control\",\n\tdropdownShown: \"autocomplete-select--opened\",\n\tmultiselect: \"main-ui-multi-select\",\n\tlabel: \"main-ui-square-container\",\n\tplaceholder: \"autocomplete-placeholder\",\n\tdropdown: \"popup-select-content\",\n\toption: \"main-ui-select-inner-item\",\n\tremove: \"main-ui-item-icon main-ui-square-delete\",\n\toptionDisabled: \"autocomplete-option--disabled\",\n\tautocompleteInput: \"main-ui-control main-ui-control-string\",\n\tselectedLabel: \"main-ui-square\",\n\tselectedOption: \"autocomplete-option--selected\",\n\tplaceholderHidden: \"autocomplete-placeholder--hidden\",\n\toptionHidden: \"autocomplete-option--hidden\"\n};\n\nclass Autocomplete\n{\n\tconstructor(element, config)\n\t{\n\t\tthis._config = {\n\t\t\t...config,\n\t\t\tclassNames: {\n\t\t\t\t...CLASSES,\n\t\t\t\t...config.classNames\n\t\t\t},\n\t\t\tdisabledOptions: []\n\t\t};\n\t\tthis._state = {\n\t\t\topened: false\n\t\t};\n\t\tthis._icons = [];\n\t\tthis._holderElement = element;\n\n\t\tthis._boundHandleClick = this._handleClick.bind(this);\n\t\tthis._boundUnselectOption = this._unselectOption.bind(this);\n\t\tthis._boundSortOptions = this._sortOptions.bind(this);\n\n\t\tthis._body = new Element(document.body);\n\n\t\tthis._create(element);\n\n\t\tif (!this._config.value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tthis._setValue();\n\t}\n\n\tsetOptions(data)\n\t{\n\t\tthis._config.options = data;\n\t\tthis._options = this._generateOptions();\n\t}\n\n\tvalue()\n\t{\n\t\treturn this._config.value;\n\t}\n\n\tremoveAutocompleteNode()\n\t{\n\t\tBX.remove(this._autocomplete.get());\n\n\t\tthis._options.map(_option => {\n\t\t\tBX.remove(_option.get());\n\t\t})\n\t}\n\n\treset()\n\t{\n\t\tthis._config.value = this._config.multiple ? [] : null;\n\t\tthis._setValue();\n\t}\n\n\t_create(_element)\n\t{\n\t\tconst element = typeof _element === \"string\" ? document.querySelector(_element) : _element;\n\n\t\tthis._parent = new Element(element);\n\n\t\tconst selector = element.querySelectorAll(\n\t\t\t`div[data-name=${element.dataset.name}]`\n\t\t)[0];\n\t\tlet selectClone = selector.cloneNode(true);\n\t\telement.removeChild(selector);\n\n\t\tthis._select = new Element(selectClone);\n\t\tthis._label = new Element(\"span\", { class: this._config.classNames.label });\n\t\tthis._optionsWrapper = new Element(\"div\", { class: this._config.classNames.dropdown });\n\n\t\tif (this._config.multiple)\n\t\t{\n\t\t\tthis._select.addClass(this._config.classNames.multiselect);\n\t\t}\n\n\t\tthis._options = this._generateOptions();\n\n\t\tthis._select.addEventListener(\"click\", this._boundHandleClick);\n\t\tthis._select.append(this._label.get());\n\n\t\tlet deleteButton = this._parent.get().parentNode.querySelectorAll('div.main-ui-control-value-delete');\n\t\tif(deleteButton.length > 0)\n\t\t{\n\t\t\tBX.bind(deleteButton[0], \"click\", this.reset.bind(this));\n\t\t\tthis._select.append(deleteButton[0]);\n\t\t}\n\n\t\tthis._parent.append(this._select.get());\n\t\tthis._placeholder = new Element(\"div\",\n\t\t\t{\n\t\t\t\tclass: this._config.classNames.placeholder,\n\t\t\t\ttextContent: this._config.placeholder\n\t\t\t}\n\t\t);\n\t\tthis._select.append(this._placeholder.get());\n\n\t\tthis._popup = new Popup({\n\t\t\tid: \"autocomplete\" + Math.random(),\n\t\t\tbindElement: _element,\n\t\t\tzIndex: 3000,\n\t\t\twidth: 515,\n\t\t\tmaxHeight: 300\n\t\t});\n\n\t\tthis._popup.setContent(this._optionsWrapper.get());\n\t}\n\n\t_generateOptions()\n\t{\n\t\tif (this._config.autocomplete && !this._autocomplete)\n\t\t{\n\t\t\tthis._autocomplete = new Element(\"input\", {\n\t\t\t\tclass: this._config.classNames.autocompleteInput,\n\t\t\t\tname: `autocomplete-${this._parent.get().dataset.name}`,\n\t\t\t\ttype: \"text\"\n\t\t\t});\n\t\t\tthis._autocomplete.addEventListener(\"input\", this._boundSortOptions);\n\n\t\t\tthis._optionsWrapper.append(this._autocomplete.get());\n\t\t}\n\n\t\treturn this._config.options.map(_option => {\n\t\t\tconst preOption =\n\t\t\t\tdocument\n\t\t\t\t\t.querySelectorAll(\n\t\t\t\t\t\t`div.${this._config.classNames.option}[data-value=\"${_option.id}\"]`\n\t\t\t\t\t);\n\t\t\tif (preOption.length > 0)\n\t\t\t{\n\t\t\t\treturn new Element(preOption[0]);\n\t\t\t}\n\n\t\t\tconst option = new Element(\"div\", {\n\t\t\t\tclass: `${this._config.classNames.option}${_option.disabled ?\n\t\t\t\t\t\" \" + this._config.classNames.optionDisabled : \"\"}`,\n\t\t\t\tvalue: _option.id,\n\t\t\t\ttextContent: _option.name,\n\t\t\t\tdisabled: _option.disabled\n\t\t\t});\n\t\t\tif (_option.disabled)\n\t\t\t{\n\t\t\t\tthis._config.disabledOptions.push(String(_option.id));\n\t\t\t}\n\t\t\tthis._optionsWrapper.append(option.get());\n\n\t\t\treturn option;\n\t\t});\n\t}\n\n\t_handleClick(event)\n\t{\n\t\tevent.stopPropagation();\n\n\t\tif (event.target.className === this._config.classNames.autocompleteInput)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._state.opened)\n\t\t{\n\t\t\tconst option = this._options.find(_option => {\n\t\t\t\tif(_option)\n\t\t\t\t{\n\t\t\t\t\treturn _option.get() === event.target;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (option !== undefined)\n\t\t\t{\n\t\t\t\tthis._setValue(option.get().getAttribute(\"data-value\"), true);\n\t\t\t}\n\n\t\t\tthis._popup.close();\n\t\t\tthis._select.removeClass(this._config.classNames.dropdownShown);\n\t\t\tthis._body.removeEventListener(\"click\", this._boundHandleClick);\n\t\t\tthis._select.addEventListener(\"click\", this._boundHandleClick);\n\n\t\t\tthis._state.opened = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (event.target.className === this._config.icon)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis._popup.show();\n\t\tthis._select.addClass(this._config.classNames.dropdownShown);\n\t\tthis._body.addEventListener(\"click\", this._boundHandleClick);\n\t\tthis._select.removeEventListener(\"click\", this._boundHandleClick);\n\n\t\tthis._state.opened = true;\n\n\t\tif (this._autocomplete)\n\t\t{\n\t\t\tthis._autocomplete.focus();\n\t\t}\n\t}\n\n\t_prepareDataValue()\n\t{\n\t\tlet dataValue = [];\n\n\t\tthis._config.options.forEach(_option => {\n\t\t\tthis._config.value.forEach(_value => {\n\t\t\t\tif(_option.id.toString() === _value)\n\t\t\t\t{\n\t\t\t\t\tdataValue.push(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tNAME: _option.name,\n\t\t\t\t\t\t\tVALUE: _option.id.toString()\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t});\n\t\t})\n\n\t\tthis._parent.get().dataset.value = JSON.stringify(dataValue);\n\t\tthis._select.get().dataset.value = JSON.stringify(dataValue);\n\n\t\treturn dataValue;\n\t}\n\n\t_setValue(value, manual, unselected)\n\t{\n\t\tif (this._config.disabledOptions.indexOf(value) > -1)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif (value && !unselected)\n\t\t{\n\t\t\tthis._config.value = this._config.multiple ? [...this._config.value || [], value] : value;\n\t\t}\n\t\tif (value && unselected)\n\t\t{\n\t\t\tthis._config.value = value;\n\t\t}\n\t\tthis._options.forEach(_option => {\n\t\t\t_option.removeClass(this._config.classNames.selectedOption);\n\t\t});\n\t\tthis._placeholder.removeClass(this._config.classNames.placeholderHidden);\n\n\t\tif (this._config.multiple)\n\t\t{\n\t\t\tconst options = this._config.value.map(_value => {\n\t\t\t\tconst option = this._config.options.find(_option => {\n\t\t\t\t\tif(_option)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn _option.id.toString() === _value;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (!option)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst optionNode = this._options.find(\n\t\t\t\t\t_option => {\n\t\t\t\t\t\tif(_option)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn _option.get().getAttribute(\"data-value\") === option.id.toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\toptionNode.addClass(this._config.classNames.selectedOption);\n\n\t\t\t\treturn option;\n\t\t\t});\n\n\t\t\tif (options.length)\n\t\t\t{\n\t\t\t\tthis._placeholder.addClass(this._config.classNames.placeholderHidden);\n\t\t\t}\n\t\t\tthis._selectOptions(options, manual);\n\t\t\tthis._prepareDataValue();\n\t\t\treturn;\n\t\t}\n\n\t\tconst option = this._config.value ?\n\t\t\tthis._config.options.find(_option => {\n\t\t\t\t\tif (_option)\n\t\t\t\t\t{\n\t\t\t\t\t\t_option.id.toString() === this._config.value\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t) :\n\t\t\tthis._config.options[0];\n\n\t\tconst optionNode = this._options.find(\n\t\t\t_option => {\n\t\t\t\tif(_option)\n\t\t\t\t{\n\t\t\t\t\t_option.get().getAttribute(\"data-value\") === option.id.toString()\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis._prepareDataValue();\n\t\tif (!this._config.value)\n\t\t{\n\t\t\tthis._label.setText(\"\");\n\t\t\treturn;\n\t\t}\n\t\toptionNode.addClass(this._config.classNames.selectedOption);\n\t\tthis._placeholder.addClass(this._config.classNames.placeholderHidden);\n\t\tthis._selectOption(option, manual);\n\t}\n\n\t_selectOption(option, manual)\n\t{\n\t\tthis._selectedOption = option;\n\n\t\tthis._label.setText(option.name);\n\n\t\tif (this._config.onChange && manual)\n\t\t{\n\t\t\tthis._config.onChange(option.id,this._prepareDataValue());\n\t\t}\n\t}\n\n\t_selectOptions(options, manual)\n\t{\n\t\tthis._label.setText(\"\");\n\n\t\tthis._icons = options.map(_option => {\n\t\t\tif(_option)\n\t\t\t{\n\t\t\t\tconst selectedLabel = new Element(\"span\", {\n\t\t\t\t\tclass: this._config.classNames.selectedLabel,\n\t\t\t\t\ttextContent: _option.name\n\t\t\t\t});\n\n\t\t\t\tconst remove = new Element(\"span\", {\n\t\t\t\t\tclass: `${this._config.classNames.remove}`,\n\t\t\t\t\tvalue: _option.id\n\t\t\t\t});\n\n\t\t\t\tremove.addEventListener(\"click\", this._boundUnselectOption);\n\n\t\t\t\tselectedLabel.append(remove.get());\n\t\t\t\tthis._label.append(selectedLabel.get());\n\n\t\t\t\treturn remove.get();\n\t\t\t}\n\t\t});\n\n\t\tif (manual)\n\t\t{\n\t\t\tthis._optionsWrapper.setTop(Number(this._select.getHeight().split(\"px\")[0]) + 5);\n\t\t}\n\n\t\tif (this._config.onChange && manual)\n\t\t{\n\t\t\tthis._config.onChange(this._config.value, this._prepareDataValue());\n\t\t}\n\t}\n\n\t_unselectOption(event)\n\t{\n\t\tconst newValue = [...this._config.value];\n\t\tconst index = newValue.indexOf(event.target.getAttribute(\"data-value\"));\n\n\t\tif (index !== -1)\n\t\t{\n\t\t\tnewValue.splice(index, 1);\n\t\t}\n\n\t\tthis._setValue(newValue, true, true);\n\t}\n\n\t_sortOptions(event)\n\t{\n\t\tthis._options.forEach(_option => {\n\t\t\tif (!_option.get().textContent.toLowerCase().startsWith(event.target.value.toLowerCase()))\n\t\t\t{\n\t\t\t\t_option.addClass(this._config.classNames.optionHidden);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t_option.removeClass(this._config.classNames.optionHidden);\n\t\t});\n\t}\n}\n\nexport default Autocomplete;\n","import Autocomplete from './autocomplete/autocomplete';\nimport { Popup } from 'main.popup';\n\nexport class Toloka\n{\n\t#page = BX.Sender.Page;\n\t#helper = BX.Sender.Helper;\n\t#context;\n\t#actionUri;\n\t#isFrame;\n\t#prettyDateFormat;\n\t#isSaved;\n\t#isRegistered;\n\t#isOutside;\n\t#mess;\n\t#letterTile;\n\t#selectorNode;\n\t#editorNode;\n\t#titleNode;\n\t#loginNode;\n\t#formNode;\n\t#oauthCodeNode;\n\t#filterNode;\n\t#filterData;\n\t#filterId;\n\t#filter;\n\t#isAvailable;\n\t#ajaxAction;\n\t#messageFields = null;\n\t#templateChangeButton;\n\t#buttonsNode;\n\t#templateNameNode;\n\t#templateTypeNode;\n\t#templateIdNode;\n\t#templateData;\n\t#REGION_BY_IP = 'REGION_BY_IP';\n\t#REGION_BY_PHONE = 'REGION_BY_PHONE';\n\n\tconstructor()\n\t{\n\t}\n\n\tstatic create(settings)\n\t{\n\t\tconst self = new Toloka();\n\t\tself.initialize(settings);\n\t\treturn self;\n\t}\n\n\tbindEvents()\n\t{\n\t\tthis._expireInNode.addEventListener('change', this.validateRequiredFields.bind(this));\n\t\tif (BX.Sender.Template && BX.Sender.Template.Selector)\n\t\t{\n\t\t\tconst selector = BX.Sender.Template.Selector;\n\t\t\tBX.addCustomEvent(selector, selector.events.templateSelect, this.onTemplateSelect.bind(this));\n\t\t\tBX.addCustomEvent(selector, selector.events.selectorClose, this.closeTemplateSelector.bind(this));\n\t\t}\n\n\t\tif(this._saveBtn)\n\t\t{\n\t\t\tBX.bind(\n\t\t\t\tthis._saveBtn,\n\t\t\t\t'click',\n\t\t\t\tthis.applyChanges.bind(this)\n\t\t\t);\n\t\t}\n\n\t\tif (this.#templateChangeButton)\n\t\t{\n\t\t\tBX.bind(this.#templateChangeButton, 'click', this.showTemplateSelector.bind(this));\n\t\t}\n\n\t\tif (this.#isSaved)\n\t\t{\n\t\t\ttop.BX.onCustomEvent(top, 'sender-letter-edit-change', [this.letterTile]);\n\t\t\tthis.#page.slider.close();\n\n\t\t\tif (this.#isOutside)\n\t\t\t{\n\t\t\t\tBX.UI.Notification.Center.notify({\n\t\t\t\t\tcontent: this.#mess.outsideSaveSuccess,\n\t\t\t\t\tautoHideDelay: 5000\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tthis.initWidget();\n\n\t\tconst filter = this.getFilter();\n\t\tfilter.getAddPresetButton().style.display = 'none';\n\n\t\tfilter.getPreset().getPresets().forEach(preset => {\n\t\t\tpreset.style.display = 'none';\n\t\t})\n\n\t\tBX.bind(filter.getResetButton(), 'click', this.reInitAddressWidget.bind(this));\n\n\t\tconst clearFilterBtn = document.querySelector('.main-ui-delete');\n\t\tBX.bind(clearFilterBtn, 'click', this.reInitAddressWidget.bind(this));\n\t}\n\n\tinitialize(params)\n\t{\n\t\tthis.#context = BX(params.containerId);\n\t\tthis.#filterData = [];\n\t\tthis.#filterData[this.#REGION_BY_IP] = {\n\t\t\tregion: []\n\t\t};\n\t\tthis.#filterData[this.#REGION_BY_PHONE] = {\n\t\t\tregion: []\n\t\t};\n\n\t\tthis.#filterId = 'toloka-filter-connector';\n\t\tthis.#filterNode = document.getElementById(`${this.#filterId}_search_container`);\n\t\tthis.#filter = this.getFilter();\n\t\tthis.#templateChangeButton = BX('SENDER_TOLOKA_BUTTON_CHANGE');\n\t\tthis.#helper.changeDisplay(this.#templateChangeButton, false);\n\n\t\tthis.#actionUri = params.actionUri;\n\t\tthis.#ajaxAction = new BX.AjaxAction(this.#actionUri);\n\t\tthis.#isFrame = params.isFrame || false;\n\t\tthis.#prettyDateFormat = params.prettyDateFormat;\n\t\tthis.#isSaved = params.isSaved || false;\n\t\tthis.#isRegistered = params.isRegistered || false;\n\t\tthis.#isOutside = params.isOutside || false;\n\t\tthis.#isAvailable = params.isAvailable || true;\n\t\tthis.#mess = params.mess;\n\t\tthis.#letterTile = params.letterTile || {};\n\t\tthis.#templateData = [];\n\t\tthis.#messageFields = this.objectKeysToLowerCase(JSON.parse(params.preset));\n\t\tthis.optionData = [];\n\n\t\tthis.prepareNodes();\n\t\tthis.buildDispatchNodes();\n\n\t\tthis._filterNode = [];\n\t\tthis._regionInput = [];\n\t\tthis._autocomplete = [];\n\t\tthis.bindEvents();\n\n\t\tthis.#helper.titleEditor.init({\n\t\t\tdataNode: this.#titleNode,\n\t\t\tdisabled: false,\n\t\t\tdefaultTitle: this.getPatternTitle(this.#mess.name)\n\t\t});\n\n\t\tthis.#page.initButtons();\n\n\t\tif (this.isMSBrowser())\n\t\t{\n\t\t\tthis.#context.classList.add('bx-sender-letter-ms-ie');\n\t\t}\n\n\t\tif (!this.#isRegistered)\n\t\t{\n\t\t\tthis.#loginNode.style = '';\n\t\t\tthis.#formNode.style = 'display:none;';\n\t\t}\n\t}\n\n\tprepareNodes()\n\t{\n\t\tthis.#selectorNode = this.#helper.getNode('template-selector', this.#context);\n\t\tthis.#editorNode = this.#helper.getNode('editor', this.#context);\n\t\tthis.#titleNode = this.#helper.getNode('title', this.#context);\n\t\tthis.#loginNode = this.#helper.getNode('login', this.#context);\n\t\tthis.#formNode = this.#helper.getNode('sender-toloka-form', this.#context);\n\t\tthis.#oauthCodeNode = this.#helper.getNode('toloka-oauth-code', this.#context);\n\n\t\tthis.#buttonsNode = this.#helper.getNode('letter-buttons', this.#context);\n\t\tthis.#templateNameNode = this.#helper.getNode('template-name', this.#editorNode);\n\t\tthis.#templateTypeNode = this.#helper.getNode('template-type', this.#editorNode);\n\t\tthis.#templateIdNode = this.#helper.getNode('template-id', this.#editorNode);\n\n\t\tthis._projectNode = document.getElementById('CONFIGURATION_PROJECT_ID');\n\t\tthis._poolNode = document.getElementById('CONFIGURATION_POOL_ID');\n\t\tthis._taskSuiteNode = document.getElementById('CONFIGURATION_TASK_SUITE_ID');\n\t\tthis._descriptionNode = document.getElementById('CONFIGURATION_DESCRIPTION');\n\t\tthis._instructionNode = document.getElementById('CONFIGURATION_INSTRUCTION');\n\t\tthis._tasksNode = document.getElementById('CONFIGURATION_TASKS');\n\t\tthis._overlapNode = document.getElementById('CONFIGURATION_OVERLAP');\n\t\tthis._adultContentNode = document.getElementById('CONFIGURATION_ADULT_CONTENT');\n\t\tthis._priceNode = document.getElementById('CONFIGURATION_PRICE');\n\t\tthis._expireInNode = document.getElementById('CONFIGURATION_EXPIRE_IN');\n\t\tthis._saveBtn = document.getElementById('ui-button-panel-save');\n\n\n\t\tthis._projectNode.parentNode.parentNode.style = 'display:none';\n\t\tthis._poolNode.parentNode.parentNode.style = 'display:none';\n\t\tthis._taskSuiteNode.parentNode.parentNode.style = 'display:none';\n\t}\n\n\treInitAddressWidget()\n\t{\n\t\tif(this._filterNode[this.#REGION_BY_IP] && this._autocomplete[this.#REGION_BY_IP])\n\t\t{\n\t\t\tthis._autocomplete[this.#REGION_BY_IP].removeAutocompleteNode();\n\t\t\tthis._autocomplete[this.#REGION_BY_IP] = null;\n\t\t}\n\n\t\tif(this._filterNode[this.#REGION_BY_PHONE] && this._autocomplete[this.#REGION_BY_PHONE])\n\t\t{\n\t\t\tthis._autocomplete[this.#REGION_BY_PHONE].removeAutocompleteNode();\n\t\t\tthis._autocomplete[this.#REGION_BY_PHONE] = null;\n\t\t}\n\n\t\tthis.initWidget();\n\t}\n\n\tinitWidget()\n\t{\n\t\tif (this.#filterNode)\n\t\t{\n\t\t\tBX.bind(\n\t\t\t\tthis.#filterNode,\n\t\t\t\t'click',\n\t\t\t\tthis.initAddressWidget.bind(this, this.#REGION_BY_IP)\n\t\t\t);\n\t\t\tBX.bind(\n\t\t\t\tthis.#filterNode,\n\t\t\t\t'click',\n\t\t\t\tthis.initAddressWidget.bind(this, this.#REGION_BY_PHONE)\n\t\t\t);\n\t\t\tBX.bind(\n\t\t\t\tthis.getFilter().getPopup().popupContainer,\n\t\t\t\t'click',\n\t\t\t\tthis.initAddressWidget.bind(this, this.#REGION_BY_IP)\n\t\t\t);\n\t\t\tBX.bind(\n\t\t\t\tthis.getFilter().getPopup().popupContainer,\n\t\t\t\t'click',\n\t\t\t\tthis.initAddressWidget.bind(this, this.#REGION_BY_PHONE)\n\t\t\t);\n\t\t}\n\t}\n\n\tinitAddressWidget(name, event)\n\t{\n\t\tif(event.target && this.getFilter().getSearch().isSquareRemoveButton(event.target))\n\t\t{\n\t\t\tthis.reInitAddressWidget();\n\t\t}\n\n\n\t\tthis._filterNode[name] = document.querySelectorAll(`.main-ui-filter-field-container-list > div[data-name=${name}]`)[0];\n\n\t\tif(!this._filterNode[name])\n\t\t{\n\t\t\tif(this._autocomplete[name])\n\t\t\t{\n\t\t\t\tthis._autocomplete[name].removeAutocompleteNode();\n\t\t\t\tthis._autocomplete[this.#REGION_BY_IP] = null;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._autocomplete[name])\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst self = this;\n\t\tthis.optionData[name] = this.optionData[name] || [];\n\n\t\tthis._autocomplete[name] = new Autocomplete(this._filterNode[name], {\n\t\t\toptions: this.optionData[name],\n\t\t\tmultiple: true,\n\t\t\tautocomplete: true,\n\t\t\tonChange: (value, preparedValue) => {\n\t\t\t\tself.#filterData[name] = value;\n\t\t\t\tthis.#filter.getFieldByName(name).ITEMS = preparedValue;\n\t\t\t\tthis.#filter.getFieldByName(name).VALUE = preparedValue;\n\t\t\t}\n\t\t});\n\t\tthis._regionInput[name] = document.querySelectorAll(`input[data-name=autocomplete-${name}]`)[0];\n\n\t\tBX.bind(\n\t\t\tthis._regionInput[name],\n\t\t\t'keyup',\n\t\t\tthis.getLocationList.bind(this, name)\n\t\t);\n\t}\n\n\tregister()\n\t{\n\t\tconst self = this;\n\t\tthis.#ajaxAction.request({\n\t\t\taction: 'registerOAuth',\n\t\t\tonsuccess: (response) => {\n\t\t\t\tself.#loginNode.style = 'display:none;';\n\t\t\t\tself.#formNode.style = '';\n\t\t\t},\n\t\t\tdata: { 'access_code': this.#oauthCodeNode.value }\n\t\t});\n\t}\n\n\tisMSBrowser()\n\t{\n\t\treturn window.navigator.userAgent.match(/(Trident\\/|MSIE|Edge\\/)/) !== null;\n\t}\n\n\tgetPatternTitle(name)\n\t{\n\t\treturn this.#helper.replace(\n\t\t\tthis.#mess.patternTitle,\n\t\t\t{\n\t\t\t\t'name': name,\n\t\t\t\t'date': BX.date.format(this.#prettyDateFormat)\n\t\t\t}\n\t\t);\n\t}\n\n\tonTemplateSelect(template)\n\t{\n\t\tif (this.#templateNameNode)\n\t\t{\n\t\t\tthis.#templateNameNode.textContent = template.name;\n\t\t}\n\t\tif (this.#templateTypeNode)\n\t\t{\n\t\t\tthis.#templateTypeNode.value = template.type;\n\t\t}\n\t\tif (this.#templateIdNode)\n\t\t{\n\t\t\tthis.#templateIdNode.value = template.code;\n\t\t}\n\n\t\tthis.#messageFields = template.messageFields;\n\n\t\tthis.buildDispatchNodes();\n\t\tthis.#titleNode.value = this.getPatternTitle(template.name);\n\n\t\tBX.fireEvent(this.#titleNode, 'change');\n\n\t\tthis.closeTemplateSelector();\n\t\twindow.scrollTo(0, 0);\n\t}\n\n\tbuildDispatchNodes()\n\t{\n\t\tconst self = this;\n\t\tthis.#helper.getNodes('dispatch', this.#context).forEach(node => {\n\t\t\tconst code = node.getAttribute('data-code');\n\t\t\tfor(const field in self.#messageFields)\n\t\t\t{\n\t\t\t\tif(!self.#messageFields.hasOwnProperty(field))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst data = self.#messageFields[field];\n\t\t\t\tif (data.code === code && node.innerHTML.length === 0)\n\t\t\t\t{\n\t\t\t\t\tnode.innerHTML = data.value;\n\t\t\t\t}\n\n\t\t\t\tself.#templateData[data.code] = data.value;\n\t\t\t}\n\t\t});\n\t}\n\n\tcloseTemplateSelector()\n\t{\n\t\tthis.changeDisplayingTemplateSelector(false);\n\t}\n\n\tshowTemplateSelector()\n\t{\n\t\tthis.changeDisplayingTemplateSelector(true);\n\t}\n\n\tchangeDisplayingTemplateSelector(isShow)\n\t{\n\t\tconst classShow = 'bx-sender-letter-show';\n\t\tconst classHide = 'bx-sender-letter-hide';\n\t\tthis.#helper.changeClass(this.#selectorNode, classShow, isShow);\n\t\tthis.#helper.changeClass(this.#selectorNode, classHide, !isShow);\n\n\t\tthis.#helper.changeClass(this.#editorNode, classShow, !isShow);\n\t\tthis.#helper.changeClass(this.#editorNode, classHide, isShow);\n\n\t\tthis.#helper.changeDisplay(this.#templateChangeButton, !isShow);\n\t\tthis.#helper.changeDisplay(this.#buttonsNode, !isShow);\n\n\t\tisShow ? this.#helper.titleEditor.disable() : this.#helper.titleEditor.enable();\n\t}\n\n\tobjectKeysToLowerCase(origObj)\n\t{\n\t\tconst self = this;\n\t\tif(origObj === null)\n\t\t{\n\t\t\treturn origObj;\n\t\t}\n\n\t\treturn Object.keys(origObj).reduce(function(newObj, key) {\n\t\t\tconst val = origObj[key];\n\t\t\tnewObj[key.toLowerCase()] = (typeof val === 'object') ? self.objectKeysToLowerCase(val) : val;\n\t\t\treturn newObj;\n\t\t}, {})\n\t}\n\n\tgetLocationList(name)\n\t{\n\t\tif (this._regionInput[name].value.length < 3)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tthis.usedWords = this.usedWords || [];\n\t\tconst value = this._regionInput[name].value;\n\n\t\tif(this.usedWords.includes(value))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tthis.usedWords.push(value);\n\n\t\tconst self = this;\n\t\tthis.#ajaxAction.request({\n\t\t\taction: 'getGeoList',\n\t\t\tdata: {\n\t\t\t\tname: value\n\t\t\t},\n\t\t\tonsuccess: response => {\n\t\t\t\tif(!this.optionData[name])\n\t\t\t\t{\n\t\t\t\t\tthis.optionData[name] = [];\n\t\t\t\t}\n\t\t\t\tfor (const value in response)\n\t\t\t\t{\n\t\t\t\t\tconst responseData = response[value];\n\t\t\t\t\tif (typeof responseData === 'object' && 'id' in responseData)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.optionData[name].push(responseData);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (self._autocomplete[name])\n\t\t\t\t{\n\n\t\t\t\t\tthis.optionData[name] = this.optionData[name].reduce((acc, current) => {\n\t\t\t\t\t\tconst x = acc.find(item => item.id === current.id);\n\t\t\t\t\t\tif (!x) {\n\t\t\t\t\t\t\treturn acc.concat([current]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, []);\n\t\t\t\t\tself._autocomplete[name].setOptions(this.optionData[name]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t}\n\n\tvalidateRequiredFields()\n\t{\n\t\tlet success = true;\n\n\t\t[\n\t\t\tthis._expireInNode,\n\t\t\tthis._priceNode,\n\t\t\tthis._tasksNode\n\t\t].every(element => {\n\t\t\tif(!this.validateField(element))\n\t\t\t{\n\t\t\t\tsuccess = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\tif(!success)\n\t\t{\n\t\t\tthis.removeLoader();\n\t\t}\n\t\treturn success;\n\t}\n\n\tremoveLoader()\n\t{\n\t\tthis._saveBtn.classList.remove(\"ui-btn-wait\");\n\t}\n\n\tvalidateField(field)\n\t{\n\t\tif(!this._validatorPopup)\n\t\t{\n\t\t\tthis._validatorPopup = new Popup({\n\t\t\t\tid: \"sender-toloka-validator\",\n\t\t\t\tcontent: `${this.#mess.required}`,\n\t\t\t});\n\t\t}\n\n\t\tif(!field.value)\n\t\t{\n\t\t\tthis._validatorPopup.setBindElement(field);\n\t\t\tthis._validatorPopup.show();\n\t\t\tfield.classList.add(\"bx-sender-form-control-danger\");\n\t\t\tfield.scrollIntoView();\n\t\t\treturn false\n\t\t}\n\t\tthis._validatorPopup.close();\n\n\t\tfield.classList.remove(\"bx-sender-form-control-danger\");\n\t\treturn true;\n\t}\n\n\tcreateProject()\n\t{\n\t\tif(!this.validateRequiredFields())\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tconst input_key = Object.keys(this.#templateData['INPUT_VALUE'])[0];\n\t\tconst output_key = Object.keys(this.#templateData['OUTPUT_VALUE'])[0];\n\t\tthis.#ajaxAction.request({\n\t\t\taction: 'createProject',\n\t\t\tdata: {\n\t\t\t\tid: this._projectNode.value,\n\t\t\t\tname: this.#titleNode.value,\n\t\t\t\tdescription: this._descriptionNode.value,\n\t\t\t\tinstruction: this._instructionNode.value,\n\t\t\t\tinput_type: this.#templateData['INPUT_VALUE'][input_key],\n\t\t\t\tinput_identificator: input_key,\n\t\t\t\toutput_type: this.#templateData['OUTPUT_VALUE'][output_key],\n\t\t\t\toutput_identificator: output_key,\n\t\t\t\tmarkup: this.#templateData['PRESET'].template,\n\t\t\t\tscript: this.#templateData['PRESET'].js,\n\t\t\t\tstyles: this.#templateData['PRESET'].css\n\t\t\t},\n\t\t\tonsuccess: response => {\n\t\t\t\tthis._projectNode.value = response.id;\n\t\t\t\tthis.createPool(response.id);\n\t\t\t},\n\t\t\tonfailure: response => {\n\t\t\t\tthis.removeLoader();\n\t\t\t}\n\t\t});\n\t}\n\n\tcreatePool(projectId)\n\t{\n\t\tconst input_key = Object.keys(this.#templateData['INPUT_VALUE'])[0]\n\t\tthis.#ajaxAction.request({\n\t\t\taction: 'createPool',\n\t\t\tdata: {\n\t\t\t\tid: this._poolNode.value,\n\t\t\t\ttask_suite_id: this._taskSuiteNode.value,\n\t\t\t\tproject_id: projectId,\n\t\t\t\tprivate_name: this.#titleNode.value,\n\t\t\t\tpublic_description: this._descriptionNode.value,\n\t\t\t\tmay_contain_adult_content: this._adultContentNode.checked,\n\t\t\t\treward_per_assignment: this._priceNode.value,\n\t\t\t\twill_expire: this._expireInNode.value,\n\t\t\t\toverlap: this._overlapNode.value,\n\t\t\t\ttasks: this._tasksNode.value,\n\t\t\t\tidentificator: input_key,\n\t\t\t\tfilter: this.#filterData\n\t\t\t},\n\t\t\tonsuccess: response => {\n\t\t\t\tthis._poolNode.value = response.pool_id;\n\t\t\t\tthis._taskSuiteNode.value = response.id;\n\n\t\t\t\tconst form = this.#context.getElementsByTagName('form');\n\n\t\t\t\tif (form && form[0])\n\t\t\t\t{\n\t\t\t\t\tform[0].appendChild(BX.create('input', {\n\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\ttype: \"hidden\",\n\t\t\t\t\t\t\tname: \"apply\",\n\t\t\t\t\t\t\tvalue: \"Y\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\n\t\t\t\t\tform[0].submit();\n\t\t\t\t}\n\t\t\t},\n\t\t\tonfailure: response => {\n\t\t\t\tthis.removeLoader();\n\t\t\t}\n\t\t});\n\t}\n\n\tapplyChanges(event)\n\t{\n\t\tif (!this.#isAvailable)\n\t\t{\n\t\t\tBX.UI.InfoHelper.show('limit_crm_marketing_toloka');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.createProject();\n\t}\n\n\tgetFilter()\n\t{\n\t\tconst filter = BX.Main.filterManager.getById(this.#filterId);\n\t\tif (!filter || !(filter instanceof BX.Main.Filter))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\treturn filter;\n\t}\n}"],"names":["allowedAttributes","value","name","disabled","class","type","Element","element","attributes","i18n","_node","HTMLElement","document","createElement","_config","_setAttributes","textContent","_setTextContent","appendChild","className","classList","add","remove","toggle","callback","addEventListener","removeEventListener","text","window","getComputedStyle","height","width","top","style","focus","key","_setAttribute","setAttribute","getAttribute","CLASSES","select","dropdownShown","multiselect","label","placeholder","dropdown","option","optionDisabled","autocompleteInput","selectedLabel","selectedOption","placeholderHidden","optionHidden","Autocomplete","config","classNames","disabledOptions","_state","opened","_icons","_holderElement","_boundHandleClick","_handleClick","bind","_boundUnselectOption","_unselectOption","_boundSortOptions","_sortOptions","_body","body","_create","_setValue","data","options","_options","_generateOptions","BX","_autocomplete","get","map","_option","multiple","_element","querySelector","_parent","selector","querySelectorAll","dataset","selectClone","cloneNode","removeChild","_select","_label","_optionsWrapper","addClass","append","deleteButton","parentNode","length","reset","_placeholder","_popup","Popup","id","Math","random","bindElement","zIndex","maxHeight","setContent","autocomplete","preOption","push","String","event","stopPropagation","target","find","undefined","close","removeClass","icon","show","dataValue","forEach","_value","toString","NAME","VALUE","JSON","stringify","manual","unselected","indexOf","optionNode","_selectOptions","_prepareDataValue","setText","_selectOption","_selectedOption","onChange","setTop","Number","getHeight","split","newValue","index","splice","toLowerCase","startsWith","Toloka","Sender","Page","Helper","_expireInNode","validateRequiredFields","Template","Selector","addCustomEvent","events","templateSelect","onTemplateSelect","selectorClose","closeTemplateSelector","_saveBtn","applyChanges","showTemplateSelector","onCustomEvent","letterTile","slider","UI","Notification","Center","notify","content","outsideSaveSuccess","autoHideDelay","initWidget","filter","getFilter","getAddPresetButton","display","getPreset","getPresets","preset","getResetButton","reInitAddressWidget","clearFilterBtn","params","containerId","region","getElementById","changeDisplay","actionUri","AjaxAction","isFrame","prettyDateFormat","isSaved","isRegistered","isOutside","isAvailable","mess","objectKeysToLowerCase","parse","optionData","prepareNodes","buildDispatchNodes","_filterNode","_regionInput","bindEvents","titleEditor","init","dataNode","defaultTitle","getPatternTitle","initButtons","isMSBrowser","getNode","_projectNode","_poolNode","_taskSuiteNode","_descriptionNode","_instructionNode","_tasksNode","_overlapNode","_adultContentNode","_priceNode","removeAutocompleteNode","initAddressWidget","getPopup","popupContainer","getSearch","isSquareRemoveButton","self","preparedValue","getFieldByName","ITEMS","getLocationList","request","action","onsuccess","response","navigator","userAgent","match","replace","patternTitle","date","format","template","code","messageFields","fireEvent","scrollTo","getNodes","node","field","hasOwnProperty","innerHTML","changeDisplayingTemplateSelector","isShow","classShow","classHide","changeClass","disable","enable","origObj","Object","keys","reduce","newObj","val","usedWords","includes","responseData","acc","current","x","item","concat","setOptions","success","every","validateField","removeLoader","_validatorPopup","required","setBindElement","scrollIntoView","input_key","output_key","description","instruction","input_type","input_identificator","output_type","output_identificator","markup","script","js","styles","css","createPool","onfailure","projectId","task_suite_id","project_id","private_name","public_description","may_contain_adult_content","checked","reward_per_assignment","will_expire","overlap","tasks","identificator","pool_id","form","getElementsByTagName","create","attrs","submit","InfoHelper","createProject","Main","filterManager","getById","Filter","settings","initialize"],"mappings":";;;;CAAA,IAAMA,iBAAiB,GAAG;CACzBC,EAAAA,KAAK,EAAE,YADkB;CAEzBC,EAAAA,IAAI,EAAE,WAFmB;CAGzBC,EAAAA,QAAQ,EAAE,eAHe;CAIzBC,EAAAA,KAAK,EAAE,OAJkB;CAKzBC,EAAAA,IAAI,EAAE;CALmB,CAA1B;;KAQMC;CAEL,mBAAYC,OAAZ,EACA;CAAA,QADqBC,UACrB,uEADkC,EAClC;CAAA,QADsCC,IACtC,uEAD6C,EAC7C;CAAA;CACC,SAAKC,KAAL,GAAaH,OAAO,YAAYI,WAAnB,GAAiCJ,OAAjC,GAA2CK,QAAQ,CAACC,aAAT,CAAuBN,OAAvB,CAAxD;CACA,SAAKO,OAAL,GAAe;CAAEL,MAAAA,IAAI,EAAJA;CAAF,KAAf;;CAEA,SAAKM,cAAL,CAAoBP,UAApB;;CAEA,QAAIA,UAAU,CAACQ,WAAf,EACA;CACC,WAAKC,eAAL,CAAqBT,UAAU,CAACQ,WAAhC;CACA;;CAED,WAAO,IAAP;CACA;;;;2BAGD;CACC,aAAO,KAAKN,KAAZ;CACA;;;4BAEMH,SACP;CACC,WAAKG,KAAL,CAAWQ,WAAX,CAAuBX,OAAvB;;CACA,aAAO,IAAP;CACA;;;8BAEQY,WACT;CACC,WAAKT,KAAL,CAAWU,SAAX,CAAqBC,GAArB,CAAyBF,SAAzB;;CACA,aAAO,IAAP;CACA;;;iCAEWA,WACZ;CACC,WAAKT,KAAL,CAAWU,SAAX,CAAqBE,MAArB,CAA4BH,SAA5B;;CACA,aAAO,IAAP;CACA;;;iCAEWA,WACZ;CACC,WAAKT,KAAL,CAAWU,SAAX,CAAqBG,MA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