| Current Path : /var/www/homesaver/www/bitrix/js/landing/ui/field/sourcefield/dist/ |
| Current File : /var/www/homesaver/www/bitrix/js/landing/ui/field/sourcefield/dist/sourcefield.bundle.js.map |
{"version":3,"file":"sourcefield.bundle.js","sources":["../src/internal/filter-stub.js","../src/internal/prepare-sources.js","../src/internal/prepare-value.js","../src/sourcefield.js"],"sourcesContent":["import {Loc} from 'landing.loc';\n\nexport default function getFilterStub(text = ''): {key: string, name: string, value: any}\n{\n\tlet name = text;\n\tif (name === '')\n\t{\n\t\tname = Loc.getMessage('LANDING_BLOCK__SOURCE_FILTER_STUB');\n\t}\n\n\treturn {\n\t\tkey: 'filterStub',\n\t\tname,\n\t\tvalue: '',\n\t};\n}","import {Type, Runtime} from 'main.core';\nimport getFilterStub from './filter-stub';\n\nexport type SourceItem = {\n\tname: string,\n\tvalue: string,\n\tfilter?: Array<{key: string, name: string, value: any}>,\n\tsort?: {\n\t\titems: Array<{name: string, value: string}>,\n\t},\n\turl?: string,\n\tsettings?: {\n\t\tdetailPage?: boolean,\n\t},\n};\n\nexport default function prepareSources(sources: Array<SourceItem>, stubText = '')\n{\n\tif (Type.isArray(sources))\n\t{\n\t\treturn sources.reduce((acc, item) => {\n\t\t\tif (\n\t\t\t\tType.isPlainObject(item)\n\t\t\t\t&& Type.isString(item.name)\n\t\t\t\t&& Type.isString(item.value)\n\t\t\t)\n\t\t\t{\n\t\t\t\tconst source = Runtime.clone(item);\n\n\t\t\t\tif (\n\t\t\t\t\t!Type.isArray(source.filter)\n\t\t\t\t\t|| source.filter.length <= 0\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tsource.filter = [Runtime.clone(getFilterStub(stubText))];\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!Type.isPlainObject(source.sort)\n\t\t\t\t\t|| !Type.isArray(source.sort.items)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tsource.sort = {items: []};\n\t\t\t\t}\n\n\t\t\t\treturn [...acc, source];\n\t\t\t}\n\n\t\t\treturn acc;\n\t\t}, []);\n\t}\n\n\treturn [];\n}","import {Type} from 'main.core';\nimport type {SourceItem} from './prepare-sources';\n\ntype Value = {\n\tsource: string,\n\tfilter: Array<{key: string, name: string, value: any}>,\n\tsort: {\n\t\tby: string,\n\t\torder: 'DESC' | 'ASC',\n\t},\n};\n\nfunction prepareFilter(filter, source)\n{\n\treturn filter.reduce((acc, field) => {\n\t\tif (Type.isPlainObject(field))\n\t\t{\n\t\t\treturn [...acc, {...field, url: source.url}];\n\t\t}\n\n\t\treturn acc;\n\t}, []);\n}\n\nexport default function prepareValue(value: any, sources: Array<SourceItem>): Value\n{\n\tconst [firstSource] = sources;\n\n\tif (!Type.isPlainObject(value))\n\t{\n\t\treturn {\n\t\t\tsource: firstSource.value,\n\t\t\tfilter: prepareFilter([...firstSource.filter], firstSource),\n\t\t\tsort: {\n\t\t\t\tby: firstSource.sort.items[0].key,\n\t\t\t\torder: 'DESC',\n\t\t\t},\n\t\t};\n\t}\n\n\tconst source = sources.find((item) => {\n\t\treturn item.value === value.source;\n\t});\n\n\tif (\n\t\t!Type.isArray(value.filter)\n\t\t|| value.filter.length <= 0\n\t)\n\t{\n\t\tif (source)\n\t\t{\n\t\t\tvalue.filter = [...source.filter];\n\t\t}\n\t}\n\n\tvalue.filter = prepareFilter(value.filter, source);\n\n\tif (!Type.isPlainObject(value.sort))\n\t{\n\t\tvalue.sort = {};\n\t}\n\n\tif (!Type.isString(value.sort.by))\n\t{\n\t\tif (source)\n\t\t{\n\t\t\tvalue.sort.by = source.sort.items[0].value;\n\t\t}\n\t}\n\n\tif (!Type.isString(value.sort.order))\n\t{\n\t\tvalue.sort.order = 'DESC';\n\t}\n\n\treturn value;\n}","import { Cache, Dom, Event, Runtime, Tag, Text, Type } from 'main.core';\nimport { Loc } from 'landing.loc';\nimport { Env } from 'landing.env';\nimport { BaseField } from 'landing.ui.field.basefield';\nimport type { SourceItem } from './internal/prepare-sources';\nimport prepareSources from './internal/prepare-sources';\nimport prepareValue from './internal/prepare-value';\nimport './css/style.css';\nimport getFilterStub from './internal/filter-stub';\n\n/**\n * @memberOf BX.Landing.UI.Field\n */\nexport class SourceField extends BaseField\n{\n\tconstructor(options)\n\t{\n\t\tsuper(options);\n\t\tDom.addClass(this.layout, 'landing-ui-field-source');\n\n\t\tthis.items = prepareSources(options.items, options.stubText);\n\t\tthis.value = prepareValue(options.value, this.items);\n\t\tthis.cache = new Cache.MemoryCache();\n\t\tthis.linkType = options.linkType ?? '';\n\t\tthis.onButtonClick = this.onButtonClick.bind(this);\n\t\tthis.onMenuItemClick = this.onMenuItemClick.bind(this);\n\t\tthis.onSliderMessage = this.onSliderMessage.bind(this);\n\t\tthis.onPlaceholderRemoveClick = this.onPlaceholderRemoveClick.bind(this);\n\t\tthis.onPlaceholderClick = this.onPlaceholderClick.bind(this);\n\n\t\tDom.append(this.getGrid(), this.layout);\n\t\tif (!options.hideSort)\n\t\t{\n\t\t\tDom.append(this.getSortByField().layout, this.layout);\n\t\t\tDom.append(this.getSortOrderField().layout, this.layout);\n\t\t}\n\n\t\tif (options.useLink)\n\t\t{\n\t\t\tDom.append(this.getLink(), this.layout);\n\t\t}\n\n\t\tif (options.showValueInHeader && options.showValueInHeader !== false)\n\t\t{\n\t\t\tDom.append(this.getValueLayoutWrapper(), this.header);\n\t\t}\n\n\t\tthis.setValue(this.value);\n\n\t\twindow.top.BX.addCustomEvent('SidePanel.Slider:onMessage', this.onSliderMessage);\n\t}\n\n\tgetItem(value: string): ?SourceItem\n\t{\n\t\treturn this.items.find((item) => {\n\t\t\treturn item.value === value;\n\t\t});\n\t}\n\n\tgetButtonField(): ?BX.Landing.UI.Button.BaseButton\n\t{\n\t\treturn this.getMenuItems().length > 1\n\t\t\t? this.cache.remember('buttonField', () => {\n\t\t\t\tnew BX.Landing.UI.Button.BaseButton('dropdown_button', {\n\t\t\t\t\ttext: Loc.getMessage('LINK_URL_SUGGESTS_SELECT'),\n\t\t\t\t\tclassName: 'landing-ui-button-select-link',\n\t\t\t\t\tonClick: this.onButtonClick,\n\t\t\t\t});\n\t\t\t})\n\t\t\t: null;\n\t}\n\n\tgetSortByField(): BX.Landing.UI.Field.DropdownInline\n\t{\n\t\treturn this.cache.remember('sortByField', () => {\n\t\t\tconst item = this.getItem(this.value.source);\n\t\t\treturn new BX.Landing.UI.Field.DropdownInline({\n\t\t\t\ttitle: Loc.getMessage('LANDING_CARDS__SOURCE_FIELD_SORT_TITLE').toLowerCase(),\n\t\t\t\titems: item.sort.items,\n\t\t\t\tcontent: this.value.sort.by,\n\t\t\t});\n\t\t});\n\t}\n\n\tgetSortOrderField(): BX.Landing.UI.Field.DropdownInline\n\t{\n\t\treturn this.cache.remember('sortOrderField', () => {\n\t\t\treturn new BX.Landing.UI.Field.DropdownInline({\n\t\t\t\ttitle: ', ',\n\t\t\t\titems: [\n\t\t\t\t\t{name: Loc.getMessage('LANDING_CARDS__SOURCE_FIELD_SORT_DESC'), value: 'DESC'},\n\t\t\t\t\t{name: Loc.getMessage('LANDING_CARDS__SOURCE_FIELD_SORT_ASC'), value: 'ASC'},\n\t\t\t\t],\n\t\t\t\tcontent: this.value.sort.order,\n\t\t\t});\n\t\t});\n\t}\n\n\tgetValueLayout(): HTMLSpanElement\n\t{\n\t\treturn this.cache.remember('valueLayout', () => {\n\t\t\treturn Tag.render`<span></span>`;\n\t\t});\n\t}\n\n\tgetValueLayoutWrapper(): HTMLSpanElement\n\t{\n\t\treturn this.cache.remember('valueLayoutWrapper', () => {\n\t\t\treturn Tag.render`<span> (${this.getValueLayout()})</span>`;\n\t\t});\n\t}\n\n\tgetInput(): HTMLDivElement\n\t{\n\t\treturn this.input;\n\t}\n\n\tgetGrid(): HTMLDivElement\n\t{\n\t\treturn this.cache.remember('grid', () => {\n\t\t\treturn Tag.render`\n\t\t\t\t<div class=\"landing-ui-field-source-grid\">\n\t\t\t\t\t<div class=\"landing-ui-field-source-grid-left\">${this.getInput()}</div>\n\t\t\t\t\t<div class=\"landing-ui-field-source-grid-right\">${this.getButtonField()?.layout}</div>\n\t\t\t\t</div>\n\t\t\t`;\n\t\t});\n\t}\n\n\tonButtonClick()\n\t{\n\t\tthis.getMenu().show();\n\t}\n\n\tonMenuItemClick(item)\n\t{\n\t\tconst value = prepareValue({source: item.value}, this.items);\n\t\tthis.setValue(value);\n\t\tthis.getMenu().close();\n\t\tthis.openSourceFilterSlider(item.url);\n\t}\n\n\tonPlaceholderClick(item, event: MouseEvent)\n\t{\n\t\tevent.preventDefault();\n\t\tthis.openSourceFilterSlider(item.url);\n\t}\n\n\t// eslint-disable-next-line class-methods-use-this\n\tonPlaceholderRemoveClick(item, event: MouseEvent)\n\t{\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst {currentTarget} = event;\n\n\t\tif (Type.isDomNode(currentTarget))\n\t\t{\n\t\t\tconst placeholder = currentTarget\n\t\t\t\t.closest('.landing-ui-field-source-placeholder');\n\n\t\t\tif (placeholder)\n\t\t\t{\n\t\t\t\tDom.remove(placeholder);\n\t\t\t}\n\n\t\t\tif (this.getPlaceholders().length <= 0)\n\t\t\t{\n\t\t\t\tconst value = prepareValue({source: this.getValue().source}, this.items);\n\t\t\t\tthis.prepareLink(value);\n\t\t\t\tthis.value = value;\n\t\t\t\tthis.setFilter(value.filter);\n\t\t\t}\n\n\t\t\tthis.value.filter = this.getPlaceholders().map((placeholderNode) => {\n\t\t\t\treturn Dom.attr(placeholderNode, 'data-item');\n\t\t\t});\n\t\t}\n\t}\n\n\tonSliderMessage(event)\n\t{\n\t\tif (event.getEventId() === 'save')\n\t\t{\n\t\t\tconst sourceValue = {...this.getValue(), filter: event.getData().filter};\n\t\t\tconst value = prepareValue(sourceValue, this.items);\n\t\t\tthis.prepareLink(value);\n\n\t\t\tthis.value = value;\n\t\t\tthis.setFilter(value.filter);\n\t\t}\n\t}\n\n\topenSourceFilterSlider(url)\n\t{\n\t\tif (Type.isString(url))\n\t\t{\n\t\t\tconst siteId = Env.getInstance().getOptions().site_id;\n\n\t\t\tBX.SidePanel.Instance.open(url, {\n\t\t\t\tcacheable: false,\n\t\t\t\trequestMethod: 'post',\n\t\t\t\trequestParams: {\n\t\t\t\t\tfilter: this.getValue().filter,\n\t\t\t\t\tlandingParams: {\n\t\t\t\t\t\tsiteId,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\tgetMenuItems(): Array<{id: string, text: string, onclick: () => {}}>\n\t{\n\t\treturn this.cache.remember('menuItems', () => {\n\t\t\treturn this.items.map((item) => {\n\t\t\t\treturn {\n\t\t\t\t\tid: item.value,\n\t\t\t\t\ttext: Text.encode(item.name),\n\t\t\t\t\tonclick: () => this.onMenuItemClick(item),\n\t\t\t\t};\n\t\t\t});\n\t\t});\n\t}\n\n\tgetMenu(): BX.PopupMenuWindow\n\t{\n\t\treturn this.cache.remember('menu', () => {\n\t\t\tconst form = this.input.closest(\n\t\t\t\t'.landing-ui-field-source',\n\t\t\t);\n\n\t\t\tconst menu = new BX.PopupMenuWindow({\n\t\t\t\tid: `${this.selector}_${Text.getRandom()}`,\n\t\t\t\tbindElement: this.getButtonField()?.layout,\n\t\t\t\tautoHide: true,\n\t\t\t\titems: this.getMenuItems(),\n\t\t\t\tclassName: 'landing-ui-field-source-popup',\n\t\t\t\tevents: {\n\t\t\t\t\tonPopupShow: () => {\n\t\t\t\t\t\tconst buttonPosition = Dom.getRelativePosition(\n\t\t\t\t\t\t\tthis.getButtonField()?.layout,\n\t\t\t\t\t\t\tform,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst offsetX = 0;\n\t\t\t\t\t\tconst popupWindowTop = buttonPosition.bottom;\n\n\t\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\t\tDom.style(menu.popupWindow.popupContainer, {\n\t\t\t\t\t\t\t\ttop: `${popupWindowTop}px`,\n\t\t\t\t\t\t\t\tleft: 'auto',\n\t\t\t\t\t\t\t\tright: `${offsetX}px`,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tDom.append(menu.popupWindow.popupContainer, form);\n\n\t\t\treturn menu;\n\t\t});\n\t}\n\n\taddPlaceholder(options)\n\t{\n\t\tconst placeholder = Tag.render`\n\t\t\t<div class=\"landing-ui-field-source-placeholder\">\n\t\t\t\t<span class=\"landing-ui-field-source-placeholder-text\">${Text.encode(options.name)}</span>\n\t\t\t</div>\n\t\t`;\n\n\t\tDom.attr(placeholder, {\n\t\t\t'data-item': options,\n\t\t\ttitle: options.name,\n\t\t});\n\n\t\tif (!options.url)\n\t\t{\n\t\t\tDom.addClass(placeholder.firstElementChild, 'landing-ui-field-source-placeholder-text-plain');\n\t\t}\n\n\t\tif (options.url)\n\t\t{\n\t\t\tif (options.useLink)\n\t\t\t{\n\t\t\t\tconst removeButton = Tag.render`<span class=\"landing-ui-field-source-placeholder-remove\"></span>`;\n\t\t\t\tDom.append(removeButton, placeholder);\n\t\t\t\tEvent.bind(removeButton, 'click', this.onPlaceholderRemoveClick.bind(this, options));\n\t\t\t}\n\t\t\tEvent.bind(placeholder, 'click', this.onPlaceholderClick.bind(this, options));\n\t\t}\n\n\t\tDom.append(placeholder, this.input);\n\t}\n\n\tgetPlaceholders(): Array<HTMLElement>\n\t{\n\t\treturn [...this.input.querySelectorAll('.landing-ui-field-source-placeholder')];\n\t}\n\n\tsetFilter(filter: Array<{key: string, name: string, value: any, url: ?string}>)\n\t{\n\t\tDom.clean(this.getInput());\n\n\t\tfilter.forEach((field) => {\n\t\t\tthis.addPlaceholder(field);\n\t\t});\n\t}\n\n\tsetSource({value, name}: SourceItem)\n\t{\n\t\tconst valueLayout = this.getValueLayout();\n\t\tDom.attr(valueLayout, 'data-value', value);\n\t\tvalueLayout.innerText = name;\n\t}\n\n\tsetSortByItems(items: {name: string, value: string})\n\t{\n\t\tif (Type.isArray(items))\n\t\t{\n\t\t\tthis.getSortByField().setItems(items);\n\t\t}\n\t}\n\n\tsetValue(value, preventEvent)\n\t{\n\t\tconst preparedValue = prepareValue(value, this.items);\n\t\tconst sourceItem = this.getItem(value.source);\n\n\t\tif (Type.isPlainObject(sourceItem))\n\t\t{\n\t\t\tif (\n\t\t\t\tpreparedValue.source !== this.value.source\n\t\t\t\t|| this.getPlaceholders().length <= 0\n\t\t\t)\n\t\t\t{\n\t\t\t\tthis.value = Runtime.clone(preparedValue);\n\n\t\t\t\tthis.setFilter(preparedValue.filter);\n\t\t\t\tthis.setSource(sourceItem);\n\n\t\t\t\tconst sortByField = this.getSortByField();\n\t\t\t\tsortByField.setItems(sourceItem.sort.items);\n\t\t\t\tsortByField.setValue(preparedValue.sort.by);\n\n\t\t\t\tconst orderByField = this.getSortOrderField();\n\t\t\t\torderByField.setValue(preparedValue.sort.order);\n\n\t\t\t\tif (!preventEvent)\n\t\t\t\t{\n\t\t\t\t\tthis.onValueChangeHandler(this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tgetValue()\n\t{\n\t\tconst value = Runtime.clone(this.value);\n\n\t\tvalue.filter = value.filter\n\t\t\t.filter((field) => {\n\t\t\t\treturn field.key !== getFilterStub().key;\n\t\t\t})\n\t\t\t.map((field) => {\n\t\t\t\tReflect.deleteProperty(field, 'url');\n\t\t\t\treturn field;\n\t\t\t});\n\n\t\tvalue.sort.by = this.getSortByField().getValue();\n\t\tvalue.sort.order = this.getSortOrderField().getValue();\n\n\t\treturn value;\n\t}\n\n\tgetCurrentSource(): SourceItem\n\t{\n\t\tconst value = this.getValue();\n\t\treturn this.getItem(value.source);\n\t}\n\n\tisDetailPageAllowed()\n\t{\n\t\tconst source = this.getCurrentSource();\n\n\t\treturn (\n\t\t\t!Type.isPlainObject(source)\n\t\t\t|| !Type.isPlainObject(source.settings)\n\t\t\t|| source.settings.detailPage !== false\n\t\t);\n\t}\n\n\tgetLink(): HTMLDivElement\n\t{\n\t\tlet href = '#';\n\t\tlet hrefAttr = '';\n\t\tconst value = this.value?.filter?.[0]?.value ?? null;\n\t\tif (this.linkType === 'group' && value && value.startsWith('SG'))\n\t\t{\n\t\t\thref = `/workgroups/group/${value.slice(2)}/`;\n\t\t\threfAttr = `href=\"${href}\"`;\n\t\t}\n\n\t\treturn this.cache.remember('linkLayout', () => {\n\t\t\tconst text = BX.Landing.Loc.getMessage('LANDING_SOURCEFIELD_LINK_TEXT');\n\n\t\t\treturn Tag.render`\n\t\t\t\t<div class=\"landing-ui-field-link-container\">\n\t\t\t\t\t<a ${hrefAttr} target=\"_blank\" class=\"landing-ui-field-link\">\n\t\t\t\t\t\t${text}\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t`;\n\t\t});\n\t}\n\n\tprepareLink(value)\n\t{\n\t\tconst linkElement = this.layout.querySelector('.landing-ui-field-link');\n\n\t\tif (linkElement && this.linkType === 'group')\n\t\t{\n\t\t\tconst newValue = value?.filter?.[0]?.value ?? null;\n\t\t\tif (newValue !== null && newValue.startsWith('SG'))\n\t\t\t{\n\t\t\t\tlinkElement.href = `/workgroups/group/${newValue.slice(2)}/`;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlinkElement.removeAttribute('href');\n\t\t\t}\n\t\t}\n\t}\n}"],"names":["getFilterStub","text","name","Loc","getMessage","key","value","prepareSources","sources","stubText","Type","isArray","reduce","acc","item","isPlainObject","isString","source","Runtime","clone","filter","length","sort","items","prepareFilter","field","url","prepareValue","firstSource","by","order","find","SourceField","options","Dom","addClass","layout","cache","Cache","MemoryCache","linkType","onButtonClick","bind","onMenuItemClick","onSliderMessage","onPlaceholderRemoveClick","onPlaceholderClick","append","getGrid","hideSort","getSortByField","getSortOrderField","useLink","getLink","showValueInHeader","getValueLayoutWrapper","header","setValue","window","top","BX","addCustomEvent","getMenuItems","remember","Landing","UI","Button","BaseButton","className","onClick","getItem","Field","DropdownInline","title","toLowerCase","content","Tag","render","getValueLayout","input","getInput","getButtonField","getMenu","show","close","openSourceFilterSlider","event","preventDefault","stopPropagation","currentTarget","isDomNode","placeholder","closest","remove","getPlaceholders","getValue","prepareLink","setFilter","map","placeholderNode","attr","getEventId","sourceValue","getData","siteId","Env","getInstance","getOptions","site_id","SidePanel","Instance","open","cacheable","requestMethod","requestParams","landingParams","id","Text","encode","onclick","form","menu","PopupMenuWindow","selector","getRandom","bindElement","autoHide","events","onPopupShow","buttonPosition","getRelativePosition","offsetX","popupWindowTop","bottom","requestAnimationFrame","style","popupWindow","popupContainer","left","right","firstElementChild","removeButton","Event","querySelectorAll","clean","forEach","addPlaceholder","valueLayout","innerText","setItems","preventEvent","preparedValue","sourceItem","setSource","sortByField","orderByField","onValueChangeHandler","Reflect","deleteProperty","getCurrentSource","settings","detailPage","href","hrefAttr","startsWith","slice","linkElement","querySelector","newValue","removeAttribute","BaseField"],"mappings":";;;;;;;CAEe,SAASA,aAAa,GACrC;GAAA,IADsCC,IAAI,uEAAG,EAAE;GAE9C,IAAIC,IAAI,GAAGD,IAAI;GACf,IAAIC,IAAI,KAAK,EAAE,EACf;KACCA,IAAI,GAAGC,eAAG,CAACC,UAAU,CAAC,mCAAmC,CAAC;;GAG3D,OAAO;KACNC,GAAG,EAAE,YAAY;KACjBH,IAAI,EAAJA,IAAI;KACJI,KAAK,EAAE;IACP;CACF;;CCCe,SAASC,cAAc,CAACC,OAA0B,EACjE;GAAA,IADmEC,QAAQ,uEAAG,EAAE;GAE/E,IAAIC,cAAI,CAACC,OAAO,CAACH,OAAO,CAAC,EACzB;KACC,OAAOA,OAAO,CAACI,MAAM,CAAC,UAACC,GAAG,EAAEC,IAAI,EAAK;OACpC,IACCJ,cAAI,CAACK,aAAa,CAACD,IAAI,CAAC,IACrBJ,cAAI,CAACM,QAAQ,CAACF,IAAI,CAACZ,IAAI,CAAC,IACxBQ,cAAI,CAACM,QAAQ,CAACF,IAAI,CAACR,KAAK,CAAC,EAE7B;SACC,IAAMW,MAAM,GAAGC,iBAAO,CAACC,KAAK,CAACL,IAAI,CAAC;SAElC,IACC,CAACJ,cAAI,C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