1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1694],{11694:function(e,t,i){var n=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarItem=t.To=t.Show=t.Position=t.Options=t.Offset=t.My=t.Item=t.Hide=t.From=t.DropDownOptions=t.Collision=t.Button=t.BoundaryOffset=t.At=t.Animation=t.TagBox=void 0;var s=i(91172),a=i(45697),o=i(76907),l=i(85287),r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._WidgetClass=s.default,t.subscribableOptions=["opened","value"],t.independentEvents=["onChange","onClosed","onContentReady","onCustomItemCreating","onDisposing","onEnterKey","onFocusIn","onFocusOut","onInitialized","onInput","onItemClick","onKeyDown","onKeyUp","onMultiTagPreparing","onOpened","onSelectAllValueChanged","onValueChanged"],t._defaults={defaultOpened:"opened",defaultValue:"value"},t._expectedChildren={button:{optionName:"buttons",isCollectionItem:!0},dropDownOptions:{optionName:"dropDownOptions",isCollectionItem:!1},item:{optionName:"items",isCollectionItem:!0}},t._templateProps=[{tmplOption:"dropDownButtonTemplate",render:"dropDownButtonRender",component:"dropDownButtonComponent",keyFn:"dropDownButtonKeyFn"},{tmplOption:"fieldTemplate",render:"fieldRender",component:"fieldComponent",keyFn:"fieldKeyFn"},{tmplOption:"groupTemplate",render:"groupRender",component:"groupComponent",keyFn:"groupKeyFn"},{tmplOption:"itemTemplate",render:"itemRender",component:"itemComponent",keyFn:"itemKeyFn"},{tmplOption:"tagTemplate",render:"tagRender",component:"tagComponent",keyFn:"tagKeyFn"}],t}return n(t,e),Object.defineProperty(t.prototype,"instance",{get:function(){return this._instance},enumerable:!1,configurable:!0}),t}(o.Component);t.TagBox=r,r.propTypes={acceptCustomValue:a.bool,accessKey:a.string,activeStateEnabled:a.bool,applyValueMode:a.oneOf(["instantly","useButtons"]),buttons:a.array,dataSource:a.oneOfType([a.array,a.object,a.string]),deferRendering:a.bool,disabled:a.bool,displayExpr:a.oneOfType([a.func,a.string]),dropDownOptions:a.object,elementAttr:a.object,focusStateEnabled:a.bool,grouped:a.bool,height:a.oneOfType([a.func,a.number,a.string]),hideSelectedItems:a.bool,hint:a.string,hoverStateEnabled:a.bool,isValid:a.bool,items:a.array,label:a.string,labelMode:a.oneOf(["static","floating","hidden"]),maxDisplayedTags:a.number,maxFilterQueryLength:a.number,maxLength:a.oneOfType([a.number,a.string]),minSearchLength:a.number,multiline:a.bool,name:a.string,noDataText:a.string,onChange:a.func,onClosed:a.func,onContentReady:a.func,onCustomItemCreating:a.func,onDisposing:a.func,onEnterKey:a.func,onFocusIn:a.func,onFocusOut:a.func,onInitialized:a.func,onInput:a.func,onItemClick:a.func,onKeyDown:a.func,onKeyUp:a.func,onMultiTagPreparing:a.func,onOpened:a.func,onOptionChanged:a.func,onSelectAllValueChanged:a.func,onSelectionChanged:a.func,onValueChanged:a.func,opened:a.bool,openOnFieldClick:a.bool,placeholder:a.string,readOnly:a.bool,rtlEnabled:a.bool,searchEnabled:a.bool,searchExpr:a.oneOfType([a.array,a.func,a.string]),searchMode:a.oneOf(["contains","startswith"]),searchTimeout:a.number,selectAllMode:a.oneOf(["allPages","page"]),selectAllText:a.string,selectedItems:a.array,showClearButton:a.bool,showDataBeforeSearch:a.bool,showDropDownButton:a.bool,showMultiTagOnly:a.bool,showSelectionControls:a.bool,stylingMode:a.oneOf(["outlined","underlined","filled"]),tabIndex:a.number,text:a.string,useItemTextAsTitle:a.bool,validationErrors:a.array,validationMessageMode:a.oneOf(["always","auto"]),validationStatus:a.oneOf(["valid","invalid","pending"]),value:a.array,valueExpr:a.oneOfType([a.func,a.string]),visible:a.bool,width:a.oneOfType([a.func,a.number,a.string]),wrapItemText:a.bool};var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="animation",t.ExpectedChildren={hide:{optionName:"hide",isCollectionItem:!1},show:{optionName:"show",isCollectionItem:!1}},t}(l.default);t.Animation=u;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="at",t}(l.default);t.At=h;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="boundaryOffset",t}(l.default);t.BoundaryOffset=c;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="buttons",t.IsCollectionItem=!0,t.ExpectedChildren={options:{optionName:"options",isCollectionItem:!1}},t}(l.default);t.Button=d;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="collision",t}(l.default);t.Collision=p;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="dropDownOptions",t.DefaultsProps={defaultHeight:"height",defaultPosition:"position",defaultVisible:"visible",defaultWidth:"width"},t.ExpectedChildren={animation:{optionName:"animation",isCollectionItem:!1},position:{optionName:"position",isCollectionItem:!1},toolbarItem:{optionName:"toolbarItems",isCollectionItem:!0}},t.TemplateProps=[{tmplOption:"contentTemplate",render:"contentRender",component:"
1contentComponent",keyFn:"contentKeyFn"},{tmplOption:"titleTemplate",render:"titleRender",component:"titleComponent",keyFn:"titleKeyFn"}],t}(l.default);t.DropDownOptions=_;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="from",t.ExpectedChildren={position:{optionName:"position",isCollectionItem:!1}},t}(l.default);t.From=g;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="hide",t.ExpectedChildren={from:{optionName:"from",isCollectionItem:!1},to:{optionName:"to",isCollectionItem:!1}},t}(l.default);t.Hide=m;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="items",t.IsCollectionItem=!0,t.TemplateProps=[{tmplOption:"template",render:"render",component:"component",keyFn:"keyFn"}],t}(l.default);t.Item=f;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="my",t}(l.default);t.My=v;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="offset",t}(l.default);t.Offset=T;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="options",t.TemplateProps=[{tmplOption:"template",render:"render",component:"component",keyFn:"keyFn"}],t}(l.default);t.Options=y;var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="position",t}(l.default);t.Position=C;var I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="show",t}(l.default);t.Show=I;var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="to",t}(l.default);t.To=b;var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.OptionName="toolbarItems",t.IsCollectionItem=!0,t.TemplateProps=[{tmplOption:"template",render:"render",component:"component",keyFn:"keyFn"}],t}(l.default);t.ToolbarItem=x,t.default=r},91172:function(e,t,i){i.r(t);var n=i(30057),s=i(55611),a=i(30390),o=i(86403),l=i(45340),r=i(64565),u=i(72264),h=i(43737),c=i(79303),d=i(25445),p=i(81965),_=i(9131),g=i(18274),m=i(44099),f=i(37045),v=i(63419),T=i(44804),y=i(52858),C=i(16012),I=i(8905),b=i(73322),x=i(20547),S=i(35887),E=i(81142),V=i(27238),F="dxTagData",B="dx-tag",O="dx-tagbox-multi-tag",D="dx-tag-custom",w="dx-tag-remove-button",A="dx-tagbox-single-line",$="dx-native-click",P=x.Z.inherit({_supportedKeys:function(){var e=this.callBase(),t=e=>this._list._keyboardHandler(e),i=this.option("rtlEnabled");return(0,m.l)({},e,{backspace:function(e){if(this._isCaretAtTheStart()){this._processKeyboardEvent(e),this._isTagRemoved=!0;var t=this._$focusedTag||this._tagElements().last();this._$focusedTag&&this._moveTagFocus("prev",!0),0!==t.length&&(this._preserveFocusedTag=!0,this._removeTagElement(t),delete this._preserveFocusedTag)}},upArrow:(i,n)=>i.altKey||!this._list?e.upArrow.call(this,i):t(n),downArrow:(i,n)=>i.altKey||!this._list?e.downArrow.call(this,i):t(n),del:function(e){if(this._$focusedTag&&this._isCaretAtTheStart()){this._processKeyboardEvent(e),this._isTagRemoved=!0;var t=this._$focusedTag;this._moveTagFocus("next",!0),this._preserveFocusedTag=!0,this._removeTagElement(t),delete this._preserveFocusedTag}},enter:function(e,i){var n=this._list&&null!==this._list.option("focusedElement");if(this.option("acceptCustomValue")&&!n)return e.preventDefault(),void(""!==this._searchValue()&&this._customItemAddedHandler(e));this.option("opened")&&(this._saveValueChangeEvent(e),t(i),e.preventDefault())},space:function(e,i){var n=this.option("opened"),s=this._shouldRenderSearchEvent();n&&!s&&(this._saveValueChangeEvent(e),t(i),e.preventDefault())},leftArrow:function(e){if(!(!this._isCaretAtTheStart()||this._isEmpty()||this._isEditable()&&i&&!this._$focusedTag)){e.preventDefault();var t=i?"next":"prev";this._moveTagFocus(t),!this.option("multiline")&&this._scrollContainer(t)}},rightArrow:function(e){if(this._isCaretAtTheStart()&&!this._isEmpty()&&(!this._isEditable()||i||this._$focu
1sedTag)){e.preventDefault();var t=i?"prev":"next";this._moveTagFocus(t),!this.option("multiline")&&this._scrollContainer(t)}}})},_processKeyboardEvent:function(e){e.preventDefault(),e.stopPropagation(),this._saveValueChangeEvent(e)},_isEmpty:function(){return 0===this._getValue().length},_updateTagsContainer:function(e){this._$tagsContainer=e.addClass("dx-tag-container").addClass($),this._$tagsContainer.parent().addClass($)},_allowSelectItemByTab:function(){return!1},_isCaretAtTheStart:function(){var e=(0,I.Z)(this._input());return 0===e.start&&0===e.end},_moveTagFocus:function(e,t){if(!this._$focusedTag){var i=this._tagElements();return this._$focusedTag="next"===e?i.first():i.last(),void this._toggleFocusClass(!0,this._$focusedTag)}var n=this._$focusedTag[e](".".concat(B));n.length>0?this._replaceFocusedTag(n):(t||"next"===e&&this._isEditable())&&this._clearTagFocus()},_replaceFocusedTag:function(e){this._toggleFocusClass(!1,this._$focusedTag),this._$focusedTag=e,this._toggleFocusClass(!0,this._$focusedTag)},_clearTagFocus:function(){this._$focusedTag&&(this._toggleFocusClass(!1,this._$focusedTag),delete this._$focusedTag)},_focusClassTarget:function(e){return e&&e.length&&e[0]!==this._focusTarget()[0]?e:this.callBase()},_getLabelContainer:function(){return this._$tagsContainer},_scrollContainer:function(e){if(!this.option("multiline")&&(0,g.Ym)()&&this._$tagsContainer){var t=this._getScrollPosition(e);this._$tagsContainer.scrollLeft(t)}},_getScrollPosition:function(e){return"start"===e||"end"===e?this._getBorderPosition(e):this._$focusedTag?this._getFocusedTagPosition(e):this._getBorderPosition("end")},_getBorderPosition:function(e){var t=this.option("rtlEnabled");return"end"===e^t^!t?0:(t?-1:1)*(this._$tagsContainer.get(0).scrollWidth-(0,n.Y_)(this._$tagsContainer))},_getFocusedTagPosition:function(e){var t="next"===e^this.option("rtlEnabled"),{left:i}=this._$focusedTag.position(),s=this._$tagsContainer.scrollLeft();return t&&(i+=(0,n.Y_)(this._$focusedTag,!0)-(0,n.Y_)(this._$tagsContainer)),t^i<0&&(s+=i),s},_setNextValue:u.noop,_getDefaultOptions:function(){return(0,m.l)(this.callBase(),{value:[],showDropDownButton:!1,maxFilterQueryLength:1500,tagTemplate:"tag",selectAllText:T.Z.format("dxList-selectAll"),hideSelectedItems:!1,selectedItems:[],selectAllMode:"page",onSelectAllValueChanged:null,maxDisplayedTags:void 0,showMultiTagOnly:!0,onMultiTagPreparing:null,multiline:!0,useSubmitBehavior:!0})},_init:function(){this.callBase(),this._selectedItems=[],this._initSelectAllValueChangedAction()},_initActions:function(){this.callBase(),this._initMultiTagPreparingAction()},_initMultiTagPreparingAction:function(){this._multiTagPreparingAction=this._createActionByOption("onMultiTagPreparing",{beforeExecute:function(e){this._multiTagPreparingHandler(e.args[0])}.bind(this),excludeValidators:["disabled","readOnly"]})},_multiTagPreparingHandler:function(e){var{length:t}=this._getValue();this.option("showMultiTagOnly")?e.text=T.Z.getFormatter("dxTagBox-selected")(t):e.text=T.Z.getFormatter("dxTagBox-moreSelected")(t-this.option("maxDisplayedTags")+1)},_initDynamicTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({tag:new S.c(((e,t)=>{var i,n=(0,s.Z)("<div>").addClass("dx-tag-content");(0,s.Z)("<span>").text(null!==(i=t.text)&&void 0!==i?i:t).appendTo(n),(0,s.Z)("<div>").addClass(w).appendTo(n),e.append(n)}),["text"],this.option("integrationOptions.watchMethod"),{text:this._displayGetter})})},_toggleSubmitElement:function(e){e?(this._renderSubmitElement(),this._setSubmitValue()):(this._$submitElement&&this._$submitElement.remove(),delete this._$submitElement)},_renderSubmitElement:function(){this.option("useSubmitBehavior")&&(this._$submitElement=(0,s.Z)("<select>").attr("multiple","multiple").css("display","none").appendTo(this.$element()))},_setSubmitValue:function(){if(this.option("useSubmitBehavior")){for(var e=this._getValue(),t=[],i=0,n=e.length;i<n;i++){var a=this._shouldUseDisplayValue(e[i]);t.push((0,s.Z)("<option>").val(a?this._displayGetter(e[i]):e[i]).attr("selected","selected"))}this._getSubmitElement().empty().append(t)}},_initMarkup:function(){this._tagElementsCache=(0,s.Z)();var e=!this.option("multiline");this.$element().addClass("dx-tagbox").toggleClass("dx-tagbox-only-select",!(this.option("searchEnabled")||this.option("acceptCustomValue"))).toggleClass(A,e),this._initTagTemplate(),this.callBase()},_render:function(){this.callBase(),this._renderTagRemoveAction(),this._renderSingleLineScroll(),this._scrollContainer("start")},_initTagTemplate:function(){this._tagTemplate=this._getTemplateByOption("tagTemplate")},_renderField:function(){var e=!(0,_.$K)(this.option("fieldTemplate"));this.$element().toggleClass("dx-tagbox-default-template",e).toggleClass("dx-tagbox-custom-template",!e),this.callBase()},_renderTagRemoveAction:function(){var e=this._createAction(this._removeTagHandler.bind(this)),t=(0,y.V4)(C.u,"dxTagBoxTagRemove");l.Z.off(this._$tagsContainer,t),l.Z.on(this._$tagsContainer,t,".".concat(w),(t=>{e({event:t})}))},_renderSingleLineScroll:function(){var e=(0,y.V4)("dxmousewheel",this.NAME),t=this.$element(),i=this.option("multiline");l.Z.off(t,e),"desktop"===a.Z.real().deviceType?i||l.Z.on(t,e,this._tagContainerMouseWheelHandler.bind(this)):this._$tagsContainer&&this._$tagsContainer.css("overflowX",i?"":"auto")},_tagContainerMouseWheelHandler:function(e){var t=this._$tagsContainer.scrollLeft(),i=-.3*e.delta;if(!(0,y.j1)(e)&&(0,E.u)(this._$tagsContainer,i,!0))return this._$tagsContainer.scrollLeft(t+i),!1},_renderEvents:function(){this.callBase();var e=this._input(),t=(0,y.V4)("keydown",this.NAME);l.Z.on(e,t,(e=>{var t=(0,y.EV)(e);!this._isControlKey(t)&&this._isEditable()&&this._clearTagFocus()}))},_popupWrapperClass:function(){return this.callBase()+" dx-tagbox-popup-wrapper"},_renderInput:function(){this.callBase(),this._renderPreventBlurOnInputClick()},_renderPreventBlurOnInputClick:function(){var e=(0,y.V4)("mousedown","dxTagBox");l.Z.off(this._inputWrapper(),e),l.Z.on(this._inputWrapper(),e,(e=>{e.target!==this._input()[0]&&e.preventDefault()}))},_renderInputValueImpl:function(){return this._renderMultiSelect()},_loadInputValue:function(){return(0,c.gx)()},_clearTextValue:function(){this._input().val(""),this._toggleEmptinessEventHandler(),this.option("text","")},_focusInHandler:function(e){this._preventNestedFocusEvent(e)||this._scrollContainer("end"),this.callBase(e)},_renderInputValue:function(){return this.option("displayValue",this._searchValue()),this.callBase()},_restoreInputText:function(e){e||this._clearTextValue()},_focusOutHandler:function(e){this._preventNestedFocusEvent(e)||(this._clearTagFocus(),this._scrollContainer("start")),this.callBase(e)},_getFirstPopupElement:function(){return this.option("showSelectionControls")?this._list.$element():this.callBase()},_initSelectAllValueChangedAction:function(){this._selectAllValueChangeAction=this._createActionByOption("onSelectAllValueChanged")},_renderList:function(){this.callBase(),this._setListDataSourceFilter(),this.option("showSelectionControls")&&(this._list.registerKeyHandler("tab",(e=>this._popupElementTabHandler(e))),this._list.registerKeyHandler("escape",(e=>this._popupElementEscHandler(e))))},_canListHaveFocus:function(){return"useButtons"===this.option("applyValueMode")},_listConfig:function(){var e=this.option("showSelectionControls")?"all":"multiple";return(0,m.l)(this.callBase(),{selectionMode:e,selectAllText:this.option("selectAllText"),onSelectAllValueChanged:e=>{var{value:t}=e;this._selectAllValueChangeAction({value:t})},selectAllMode:this.option("selectAllMode"),selectedItems:this._selectedItems,onFocusedItemChanged:null})},_renderMultiSelect:function(){var e=new c.BH;return this._updateTagsContainer(this._$textEditorInputContainer),this._renderInputSize(),this._renderTags().done((()=>{this._popup&&this._popup.refreshPosition(),e.resolve()})).fail(e.reject),e.promise()},_listItemClickHandler:function(e){!this.option("showSelectionControls")&&this._clearTextValue(),"useButtons"!==this.option("applyValueMode")&&(this.callBase(e),this._saveValueChangeEvent(void 0))},_shouldClearFilter:function(){var e=this.callBase();return!this.option("showSelectionControls")&&e},_renderInputSize:function(){var e=this._input(),t=e.val(),i=(0,_.HD)(t)&&t,s="",a="",o=this.option("searchEnabled")||this.option("acceptCustomValue");if(i&&o){var l=(0,d.l5)(e,t,{includePaddings:!0});l.insertAfter(e),s=(0,n.Y_)(l)+5,l.remove()}else t||(a=1);e.css("width",s),e.attr("size",a)},_renderInputSubstitution:function(){this.callBase(),this._updateWidgetHeight()},_getValue:function(){return this.option("value")||[]},_multiTagRequired:function(){var e=this._getValue(),t=this.option("maxDisplayedTags");return(0,_.$K)(t)&&e.length>t},_renderMultiTag:function(e){var t=(0,s.Z)("<div>").addClass(B).addClass(O),i={multiTagElement:(0,p.u)(t),selectedItems:this.option("selectedItems")};return this._multiTagPreparingAction(i),!i.cancel&&(t.data(F,i.text),t.insertBefore(e),this._tagTemplate.render({model:i.text,container:(0,p.u)(t)}),t)},_getFilter:function(e){var t=this._dataSource.filter(),i=e.getCombinedFilter(this.option("valueExpr"),t),n=encodeURI(JSON.stringify(i)).length,s=this.option("maxFilterQueryLength");if(n<=s)return i;V.Z.log("W1019",s)},_getFilteredItems:function(e){var t,i,n;null===(t=this._loadFilteredItemsPromise)||void 0===t||t.reject();var s=new h.M(e),a=null===(i=this._list)||void 0===i?void 0:i.option("selectedItems"),o=!!a&&(null===(n=this._list.getDataSource())||void 0===n?void 0:n.isLoaded()),l=a||this.option("selectedItems"),r=s.getL
1ocalFilter(this._valueGetter),u=l.filter(r),d=u.length===e.length,p=new c.BH,_=this._dataSource;if(_){if(this._isDataSourceChanged&&!o||!d){var{customQueryParams:g,expand:m,select:f}=_.loadOptions(),v=this._getFilter(s);return _.store().load({filter:v,customQueryParams:g,expand:m,select:f}).done(((e,t)=>{if(this._isDataSourceChanged=!1,this._disposed)p.reject();else{var{data:i}=(0,b.r6)(e,t),n=_._applyMapFunction(i);p.resolve(n.filter(r))}})).fail(p.reject),this._loadFilteredItemsPromise=p,p.promise()}return p.resolve(u).promise()}return p.resolve([]).promise()},_createTagsData:function(e,t){var i=[],n={},s="this"===this._valueGetterExpr(),a={};t.forEach((e=>{var t=s?JSON.stringify(e):this._valueGetter(e);a[t]=e}));var o=[];e.forEach(((e,t)=>{var l=a[s?JSON.stringify(e):e];if(s&&!(0,_.$K)(l))o.push(this._loadItem(e,n).always((n=>{var s=this._createTagData(i,n,e,t);i.splice(t,0,s)})));else{var r=this._createTagData(i,l,e,t);i.splice(t,0,r)}}));var l=new c.BH;return c.gx.apply(this,o).always((function(){l.resolve(i)})),l.promise()},_createTagData:function(e,t,i,n){if((0,_.$K)(t))return this._selectedItems.push(t),t;var s=this.option("selectedItem");return this._valueGetter(s)===i?s:i},_isGroupedData:function(){var e;return this.option("grouped")&&!(null!==(e=this._dataSource)&&void 0!==e&&e.group())},_getItemsByValues:function(e){var t=[];return e.forEach(function(e){var i=this._getItemFromPlain(e);(0,_.$K)(i)&&t.push(i)}.bind(this)),t},_getFilteredGroupedItems:function(e){var t=new c.BH;return this._dataSource?(this._filteredGroupedItemsLoadPromise&&this._dataSource.cancel(this._filteredGroupedItemsLoadPromise.operationId),this._dataSource.items().length?t.resolve(this._getItemsByValues(e)):this._filteredGroupedItemsLoadPromise=this._dataSource.load().done((()=>{t.resolve(this._getItemsByValues(e))})).fail((()=>{t.resolve([])})).always((()=>{this._filteredGroupedItemsLoadPromise=void 0})),t.promise()):t.promise()},_loadTagsData:function(){var e=this._getValue(),t=new c.BH;return this._selectedItems=[],(this._isGroupedData()?this._getFilteredGroupedItems(e):this._getFilteredItems(e)).done((i=>{this._createTagsData(e,i).always((function(e){t.resolve(e)}))})).fail(t.reject.bind(this)),t.promise()},_renderTags:function(){var e=new c.BH,t=!1;return this._shouldGetItemsFromPlain(this._valuesToUpdate)&&(this._selectedItems=this._getItemsFromPlain(this._valuesToUpdate),this._selectedItems.length===this._valuesToUpdate.length&&(this._renderTagsImpl(this._selectedItems),t=!0,e.resolve())),t||this._loadTagsData().done((t=>{this._disposed?e.reject():(this._renderTagsImpl(t),e.resolve())})).fail(e.reject),e.promise()},_renderTagsImpl:function(e){this._renderTagsCore(e),this._renderEmptyState(),this._preserveFocusedTag||this._clearTagFocus()},_shouldGetItemsFromPlain:function(e){return e&&this._dataSource.isLoaded()&&e.length<=this._getPlainItems().length},_getItemsFromPlain:function(e){var t=this._getSelectedItemsFromList(e);if(0===t.length&&e.length>0||t.length<e.length){var i=this._getPlainItems();t=this._filterSelectedItems(i,e)}return t},_getSelectedItemsFromList:function(e){var t,i=null===(t=this._list)||void 0===t?void 0:t.option("selectedItems"),n=[];return e.length===(null===i||void 0===i?void 0:i.length)&&(n=this._filterSelectedItems(i,e)),n},_filterSelectedItems:function(e,t){return e.filter((e=>{for(var i,n=0;n<t.length;n++)if(i=t[n],(0,_.Kn)(i)){if(this._isValueEquals(e,i))return!0}else if(this._isValueEquals(this._valueGetter(e),i))return!0;return!1}),this)},_integrateInput:function(){this._isInputReady.resolve(),this.callBase(),this._updateTagsContainer((0,s.Z)(".".concat("dx-texteditor-input-container"))),this._renderTagRemoveAction()},_renderTagsCore:function(e){var t;null===(t=this._isInputReady)||void 0===t||t.reject(),this._isInputReady=new c.BH,this._renderField(),this.option("selectedItems",this._selectedItems.slice()),this._cleanTags(),this._input().length>0&&this._isInputReady.resolve(),(0,c.gx)(this._isInputReady).done((()=>{this._renderTagsElements(e)}))},_renderTagsElements(e){var t=this._multiTagRequired()&&this._renderMultiTag(this._input()),i=this.option("showMultiTagOnly"),n=this.option("maxDisplayedTags");e.forEach(((e,s)=>{if(t&&i||t&&!i&&s-n>=-1)return!1;this._renderTag(e,t||this._input())})),this._isFocused()&&this._scrollContainer("end"),this._refreshTagElements()},_cleanTags:function(){if(this._multiTagRequired())this._tagElements().remove();else{var e=this._tagElements(),t=this._getValue();(0,v.S6)(e,(function(e,i){var n=(0,s.Z)(i);
1(0,f.d3)(n.data(F),t)<0&&n.remove()}))}},_renderEmptyState:function(){var e=!(this._getValue().length||this._selectedItems.length||this._searchValue());this._toggleEmptiness(e),this._renderDisplayText()},_renderDisplayText:function(){this._renderInputSize()},_refreshTagElements:function(){this._tagElementsCache=this.$element().find(".".concat(B))},_tagElements:function(){return this._tagElementsCache},_applyTagTemplate:function(e,t){this._tagTemplate.render({model:e,container:(0,p.u)(t)})},_renderTag:function(e,t){var i=this._valueGetter(e);if((0,_.$K)(i)){var n=this._getTag(i),s=this._displayGetter(e),a=this._getItemModel(e,s);n?((0,_.$K)(s)&&(n.empty(),this._applyTagTemplate(a,n)),n.removeClass(D)):(n=this._createTag(i,t),(0,_.$K)(e)?this._applyTagTemplate(a,n):(n.addClass(D),this._applyTagTemplate(i,n)))}},_getItemModel:function(e,t){return(0,_.Kn)(e)&&(0,_.$K)(t)?e:(0,u.ensureDefined)(t,"")},_getTag:function(e){for(var t=this._tagElements(),i=t.length,n=!1,a=0;a<i;a++){var l=t[a],r=(0,o.aT)(l,F);if(e===r||(0,u.equalByValue)(e,r)){n=(0,s.Z)(l);break}}return n},_createTag:function(e,t){return(0,s.Z)("<div>").addClass(B).data(F,e).insertBefore(t)},_toggleEmptinessEventHandler:function(){this._toggleEmptiness(!this._getValue().length&&!this._searchValue().length)},_customItemAddedHandler:function(e){this.callBase(e),this._clearTextValue()},_removeTagHandler:function(e){var t=e.event;t.stopPropagation(),this._saveValueChangeEvent(t);var i=(0,s.Z)(t.target).closest(".".concat(B));this._removeTagElement(i)},_removeTagElement:function(e){if(e.hasClass(O))this.option("showMultiTagOnly")?this.reset():this.option("value",this._getValue().slice(0,this.option("maxDisplayedTags")));else{var t=e.data(F);this._removeTagWithUpdate(t),this._refreshTagElements()}},_updateField:u.noop,_removeTagWithUpdate:function(e){var t=this._getValue().slice();this._removeTag(t,e),this.option("value",t),0===t.length&&this._clearTagFocus()},_getCurrentValue:function(){return this._lastValue()},_selectionChangeHandler:function(e){if("useButtons"!==this.option("applyValueMode")){var t=this._getValue().slice();if((0,v.S6)(e.removedItems||[],((e,i)=>{this._removeTag(t,this._valueGetter(i))})),(0,v.S6)(e.addedItems||[],((e,i)=>{this._addTag(t,this._valueGetter(i))})),this._updateWidgetHeight(),!(0,u.equalByValue)(this._list.option("selectedItemKeys"),this.option("value"))){var i=this._list._getSelectionChangeEvent();i&&this._saveValueChangeEvent(i),this.option("value",t)}this._list._saveSelectionChangeEvent(void 0)}},_removeTag:function(e,t){var i=this._valueIndex(t,e);i>=0&&e.splice(i,1)},_addTag:function(e,t){this._valueIndex(t)<0&&e.push(t)},_fieldRenderData:function(){return this._selectedItems.slice()},_completeSelection:function(e){this.option("showSelectionControls")||this._setValue(e)},_setValue:function(e){if(null!==e){var t="useButtons"===this.option("applyValueMode"),i=this._valueIndex(e),n=(t?this._list.option("selectedItemKeys"):this._getValue()).slice();i>=0?n.splice(i,1):n.push(e),"useButtons"===this.option("applyValueMode")?this._list.option("selectedItemKeys",n):this.option("value",n)}},_isSelectedValue:function(e,t){return this._valueIndex(e,null,t)>-1},_valueIndex:function(e,t,i){var n=-1;return i&&"object"!==typeof e&&(i.indexByValues||(i.indexByValues={},(t=t||this._getValue()).forEach((function(e,t){i.indexByValues[e]=t}))),e in i.indexByValues)?i.indexByValues[e]:(t=t||this._getValue(),(0,v.S6)(t,((t,i)=>{if(this._isValueEquals(e,i))return n=t,!1})),n)},_lastValue:function(){var e=this._getValue(),t=e[e.length-1];return null!==t&&void 0!==t?t:null},_valueChangeEventHandler:u.noop,_shouldRenderSearchEvent:function(){return this.option("searchEnabled")||this.option("acceptCustomValue")},_searchHandler:function(e){this.option("searchEnabled")&&e&&!this._isTagRemoved&&(this.callBase(arguments),this._setListDataSourceFilter()),this._updateWidgetHeight(),delete this._isTagRemoved},_updateWidgetHeight:function(){var e=this.$element(),t=(0,n.Cr)(e);this._renderInputSize();var i=(0,n.Cr)(e);this._popup&&this.option("opened")&&this._isEditable()&&i!==t&&this._popup.repaint()},_refreshSelected:function(){var e;(null===(e=this._list)||void 0===e?void 0:e.getDataSource())&&this._list.option("selectedItems",this._selectedItems)},_resetListDataSourceFilter:function(){var e=this._getDataSource();e&&(delete this._userFilter,e.filter(null),e.reload())},_setListDataSourceFilter:function(){if(this.option("hideSelectedItems")&&this._list){var e=this._getDataSource();if(e){var t=this._valueGetterExpr();if((0,_.HD)(t)&&"this"!==t){var i=this._dataSourceFilterExpr();void 0===this._userFilter&&(this._userFilter=e.filter()||null),this._userFilter&&i.push(this._userFilter),i.length?e.filter(i):e.filter(null)}else e.filter(this._dataSourceFilterFunction.bind(this));e.load()}}},_dataSourceFilterExpr:function(){var e=[];return(0,v.S6)(this._getValue(),((t,i)=>{e.push(["!",[this._valueGetterExpr(),i]])})),e},_dataSourceFilterFunction:function(e){var t=this._valueGetter(e),i=!0;return(0,v.S6)(this._getValue(),((e,n)=>{if(this._isValueEquals(n,t))return i=!1,!1})),i},_dataSourceChangedHandler:function(){this._isDataSourceChanged=!0,this.callBase.apply(this,arguments)},_applyButtonHandler:function(e){this._saveValueChangeEvent(e.event),this.option("value",this._getSortedListValues()),this._clearTextValue(),this.callBase(),this._cancelSearchIfNeed()},_getSortedListValues:function(){var e=this._getListValues(),t=this.option("value")||[],i=e.length?t.filter((t=>-1!==e.indexOf(t))):[],n=i.length?e.filter((e=>-1===t.indexOf(e))):e;return i.concat(n)},_getListValues:function(){if(!this._list)return[];var e=this._getPlainItems(this._list.option("selectedItems")),t=[];return(0,v.S6)(e,((e,i)=>{t[e]=this._valueGetter(i)})),t},_setListDataSource:function(){var e=this._getValue();this.callBase(),e!==this.option("value")&&this.option("value",e),this._refreshSelected()},_renderOpenedState:function(){this.callBase(),"useButtons"!==this.option("applyValueMode")||this.option("opened")||this._refreshSelected()},reset:function(){this._restoreInputText();var e=this._getDefaultOptions().value,t=this.option("value");e&&0===e.length&&t&&e.length===t.length||this.callBase()},_clean:function(){this.callBase(),delete this._defaultTagTemplate,delete this._valuesToUpdate,delete this._tagTemplate},_removeDuplicates:function(e,t){var i=[];return(0,v.S6)(e,((e,n)=>{t.filter((e=>this._valueGetter(n)===this._valueGetter(e))).length||i.push(n)})),i},_optionChanged:function(e){switch(e.name){case"onSelectAllValueChanged":this._initSelectAllValueChangedAction();break;case"onMultiTagPreparing":this._initMultiTagPreparingAction(),this._renderTags();break;case"hideSelectedItems":e.value?this._setListDataSourceFilter():this._resetListDataSourceFilter();break;case"useSubmitBehavior":this._toggleSubmitElement(e.value);break;case"displayExpr":this.callBase(e),this._initTemplates(),this._invalidate();break;case"tagTemplate":this._initTagTemplate(),this._invalidate();break;case"selectAllText":this._setListOption("selectAllText",this.option("selectAllText"));break;case"readOnly":case"disabled":this.callBase(e),!e.value&&this._refreshEvents();break;case"value":this._valuesToUpdate=null===e||void 0===e?void 0:e.value,this.callBase(e),this._valuesToUpdate=void 0,this._setListDataSourceFilter();break;case"maxDisplayedTags":case"showMultiTagOnly":this._renderTags();break;case"selectAllMode":this._setListOption(e.name,e.value);break;case"selectedItem":break;case"selectedItems":this._selectionChangedAction({addedItems:this._removeDuplicates(e.value,e.previousValue),removedItems:this._removeDuplicates(e.previousValue,e.value)});break;case"multiline":this.$element().toggleClass(A,!e.value),this._renderSingleLineScroll();break;case"maxFilterQueryLength":break;default:this.callBase(e)}},_getActualSearchValue:function(){return this.callBase()||this._searchValue()},_popupHidingHandler:function(){this.callBase(),this._clearFilter()}});(0,r.Z)("dxTagBox",P),t.default=P}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.