From 25979ece61b33b9fd3b3f077886559de9b846d9e Mon Sep 17 00:00:00 2001 From: antoniovv Date: Mon, 6 Apr 2020 15:57:08 -0500 Subject: [PATCH 1/3] fix: aria --- dist/vue-treeselect.cjs.js | 2 +- dist/vue-treeselect.cjs.js.map | 2 +- dist/vue-treeselect.cjs.min.js | 2 +- dist/vue-treeselect.cjs.min.js.map | 2 +- dist/vue-treeselect.umd.js | 2 +- dist/vue-treeselect.umd.js.map | 2 +- dist/vue-treeselect.umd.min.js | 2 +- dist/vue-treeselect.umd.min.js.map | 2 +- src/components/Option.vue | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dist/vue-treeselect.cjs.js b/dist/vue-treeselect.cjs.js index d1dc51cb..c4183ec4 100644 --- a/dist/vue-treeselect.cjs.js +++ b/dist/vue-treeselect.cjs.js @@ -3324,7 +3324,7 @@ var Option = { name: 'vue-treeselect__list--transition' } }; - var ariaSelected = node.instance.selectedNodes.length ? 'true' : 'false'; + var ariaSelected = this.instance.selectedNodes.length ? 'true' : 'false'; return h("div", { "class": listItemClass, attrs: { diff --git a/dist/vue-treeselect.cjs.js.map b/dist/vue-treeselect.cjs.js.map index a3d5a886..5054b400 100644 --- a/dist/vue-treeselect.cjs.js.map +++ b/dist/vue-treeselect.cjs.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/external \"@babel/runtime/helpers/slicedToArray\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/toConsumableArray\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/defineProperty\"","webpack://VueTreeselect/external \"lodash/noop\"","webpack://VueTreeselect/external \"lodash/debounce\"","webpack://VueTreeselect/external \"watch-size\"","webpack://VueTreeselect/external \"is-promise\"","webpack://VueTreeselect/external \"lodash/once\"","webpack://VueTreeselect/external \"lodash/identity\"","webpack://VueTreeselect/external \"lodash/constant\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/typeof\"","webpack://VueTreeselect/external \"lodash/last\"","webpack://VueTreeselect/external \"fuzzysearch\"","webpack://VueTreeselect/external \"babel-helper-vue-jsx-merge-props\"","webpack://VueTreeselect/external \"vue\"","webpack://VueTreeselect/./src/style.less?1f4a","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/utils/index.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./src/components/HiddenFields.vue?750c","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue?449d","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/Placeholder.vue?238d","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/SingleValue.vue?5aaa","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?ada5","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue?9a1f","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/MultiValue.vue?6f61","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?525a","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Control.vue?57ab","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/./src/components/Tip.vue?5960","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue?0a09","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue?c349","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue?ca92","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/components/Treeselect.vue?85a0","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["warning","process","env","NODE_ENV","noop","checker","complainer","message","concat","console","error","onLeftClick","mouseDownHandler","onMouseDown","evt","type","button","args","call","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","removeFromArray","arr","elem","idx","indexOf","splice","intervalId","registered","INTERVAL_DURATION","run","setInterval","forEach","test","stop","clearInterval","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","unwatch","length","push","watchSize","isIE9","document","documentMode","locked","wrappedListener","implementation","watchSizeForBrowsersOtherThanIE9","removeSizeWatcher","findScrollParents","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","isScrollElment","window","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","addEventListener","passive","scrollParent","removeEventListeners","removeEventListener","$scrollParent","isNaN","x","createMap","Object","create","isPlainObject","value","getPrototypeOf","prototype","copy","obj","key","deepExtend","target","source","keys","i","len","includes","arrOrStr","find","predicate","ctx","undefined","quickDiff","arrA","arrB","NO_PARENT_NODE","UNCHECKED","INDETERMINATE","CHECKED","ALL_CHILDREN","ALL_DESCENDANTS","LEAF_CHILDREN","LEAF_DESCENDANTS","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","ALL","BRANCH_PRIORITY","LEAF_PRIORITY","ALL_WITH_INDETERMINATE","ORDER_SELECTED","LEVEL","INDEX","KEY_CODES","BACKSPACE","ENTER","ESCAPE","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DELETE","INPUT_DEBOUNCE_DELAY","MIN_INPUT_WIDTH","MENU_BUFFER","sortValueByIndex","a","b","level","index","sortValueByLevel","createAsyncOptionsStates","isLoaded","isLoading","loadingError","slugify","str","map","e","o","u","toLowerCase","pattern","replace","RegExp","stringifyOptionPropValue","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","limitTextDefault","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","name","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","acceptableValues","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","hasChanged","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propNames","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","label","enhancedNormalizer","fallbackNode","isFallbackNode","isDisabled","isNew","$set","defaultNode","valueArray","matched","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","isClickedOnValueContainer","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","ref","portal","portalTarget","$menu","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","Treeselect","VERSION","PKG_VERSION"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,iE;;;;;;ACAA,qE;;;;;;ACAA,kE;;;;;;ACAA,wC;;;;;;ACAA,4C;;;;;;ACAA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nD,KAAvB,IAAgC,KAAKE,mBAAzC,EAA8D,KAAKqP,eAAL;AAC9D,QAAI,KAAKzP,UAAT,EAAqB,KAAK4H,QAAL;AACrB,QAAI,KAAK1H,KAAL,IAAc,KAAKoB,cAAvB,EAAuC,KAAKmH,kBAAL;AACxC,GAx2DY;AA02DbuJ,WA12Da,uBA02DD;AAEV,SAAK9G,uBAAL,CAA6B,KAA7B;AACD;AA72DY,CAAf,E;;AC7EA;;AAEA;AACA;AAEA;AAEA;AACA;;AAEA;AACA,uCADA;AAEA,sBAFA;AAGA,kBAHA;AAKA,QALA,kBAKA,CALA,EAKA,OALA,EAKA;AAAA;AAAA,QACA,QADA,GACA,kBADA,CACA,QADA;AAGA;AAEA;AAEA,uEACA,0CADA;AAIA;AAAA,aACA;AAAA;AAAA;AACA;AADA;AAAA;AAAA,mBAEA;AAFA;AAGA;AAHA,QADA;AAAA;AAOA;AAvBA,G;;ACXwN,CAAgB,wHAAG,EAAC,C;;ACA5O;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC5FA,IAAI,mBAAM;AACsD;AACL;;;AAG3D;AAC0F;AAC1F,gBAAgB,kBAAU;AAC1B,EAAE,+CAAM;AACR,EAAE,mBAAM;AACR;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAYf;AACD;AACe,kE;;;;;;;AChCf;AACA;AAEA,oCACA,eADA,EAEA,aAFA,EAGA,cAHA,EAIA,oBAJA,EAKA,kBALA,EAMA,qBANA,EAOA,oBAPA;AAUA;AACA,+BADA;AAEA,sBAFA;AAIA;AAAA;AACA,iCADA;AAEA;AAFA;AAAA,GAJA;AASA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA,uBACA,kBADA,IAEA,iBAHA;AAKA,KATA;AAWA,cAXA,wBAWA;AACA;AACA;AADA;AAGA;AAfA,GATA;AA2BA;AACA,kCADA,sCACA,QADA,EACA;AACA;AACA,KAHA;AAKA,SALA,mBAKA;AAEA;AACA;AARA,GA3BA;AAsCA,SAtCA,qBAsCA;AACA,gDACA,sBADA,EAEA,gCAFA,EAGA;AAAA;AAAA;AAAA,KAHA;AAKA,GA5CA;AA8CA;AACA,SADA,mBACA;AACA;AACA;AAAA;AAAA;AADA;AAGA,KALA;AAOA,SAPA,mBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA;AACA,KAbA;AAeA,QAfA,kBAeA;AACA;AACA,KAjBA;AAmBA,WAnBA,qBAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA;AACA,KAzBA;AA2BA,UA3BA,oBA2BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;;AAIA;AACA;AACA;;AAEA;AACA;AACA,KAvCA;AAyCA,WAzCA,mBAyCA,GAzCA,EAyCA;AAAA,UACA,KADA,GACA,UADA,CACA,KADA;AAGA;;AAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KApDA;AAuDA,aAvDA,qBAuDA,GAvDA,EAuDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAIA;AAEA,oEACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA,aAHA,MAGA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AAEA;AACA;AAvEA;AAyEA,KA9IA;AAgJA,eAhJA,uBAgJA,GAhJA,EAgJA;AAEA;AAGA;AACA;AACA,KAvJA;AAyJA,wBAzJA,kCAyJA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BADA;AAEA,6BAFA;AAGA;AAHA,WADA;AAMA;AANA;AAQA;;AAEA;AACA;AACA;AACA;AADA;AADA;AAKA;;AAEA,aACA;AAAA;AAAA,mBACA,QADA,EADA;AAKA,KA3LA;AA6LA,eA7LA,yBA6LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA;AAAA;AACA,wCADA;AAAA;AAEA,sBAFA;AAGA,6BAHA;AAIA,qCAJA;AAKA;AALA;AAAA;AAAA,mBAMA;AANA;AAOA,8BAPA;AAAA;AAAA,mBAQA,YARA;AAAA,mBASA,YATA;AAAA,kBAUA,WAVA;AAAA,qBAWA,cAXA;AAAA,uBAYA;AAZA;AAAA,QADA;AAgBA,KAhNA;AAkNA,eAlNA,yBAkNA;AAAA;AACA,aACA;AAAA;AAAA;AAAA,sBADA;AAGA,KAtNA;AAwNA,oBAxNA,8BAwNA;AACA,iCACA,eADA,EAEA,iCAFA;AAIA,KA7NA;AA+NA,qBA/NA,+BA+NA;AAAA,UACA,QADA,GACA,IAD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KAAU,EAAE,gBAYf;AACD,aAAS;AACM,qDAAS,Q;;;AChCxB;AACA;AACA;AACA;AAEA;AAEA;AACA,gCADA;AAEA,sBAFA;AAIA;AACA;AACA,kBADA;AAEA;AAFA;AADA,GAJA;AAWA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KALA;AAOA,cAPA,wBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAXA,GAXA;AAyBA;AACA,gBADA,0BACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA,sCADA;AAEA,2DAFA;AAGA,qEAHA;AAIA,+DAJA;AAKA,wFALA;AAMA;AANA;AASA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAEA,2BACA,8BACA,qBADA,EADA,EAIA,kBAJA,EAFA,EADA;AAWA,KAvBA;AAyBA,wBAzBA,kCAyBA;AAAA;AACA;AAEA,aACA;AAAA;AAAA,UACA,uBADA,EAEA,0BAFA,EAGA,+BAHA,EAIA,oCAJA,EADA;AAQA,KApCA;AAsCA,eAtCA,yBAsCA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;;AAEA;AACA;AACA;AACA,yDADA;AAEA;AAFA;AADA;AAMA;AACA,8CADA;AAEA;AAFA;AAKA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,YACA,kCACA;AAAA;AAAA,UADA,EADA,EADA;AAOA;;AAKA;AACA,kDACA;AAAA;AAAA,oBADA;AAIA;AACA;;AAEA;AACA,KA5EA;AA8EA,wBA9EA,gCA8EA,QA9EA,EA8EA;AAAA;AACA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KApFA;AAsFA,2BAtFA,mCAsFA,QAtFA,EAsFA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAEA,aACA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KAjGA;AAmGA,kBAnGA,4BAmGA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA;AACA,wCADA;AAEA,qEAFA;AAGA,iFAHA;AAIA,yEAJA;AAKA;AALA;AAQA,kCACA;AAAA;AAAA,QADA;AAGA,kCACA;AAAA;AAAA,QADA;AAIA,aACA;AAAA;AAAA,UACA,SADA,EAEA,SAFA,EADA;AAMA,KA3HA;AA6HA,eA7HA,yBA6HA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA,4BACA,gDACA,kCADA,GAEA,kBAFA,CADA;AAMA,oCACA,8BACA,4DADA,GAEA,gCAHA,GAIA,GAJA;AAKA;AACA;AACA;AAEA;AACA,kBADA;AAEA,wCAFA;AAGA,oBAHA;AAIA,sCAJA;AAKA;AALA;AAQA,aACA;AAAA;AAAA,UACA,UADA,EAEA,mBACA;AAAA;AAAA,2BAHA,EADA;AAQA,KA9JA;AAgKA,oBAhKA,8BAgKA;AAAA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA;AAAA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,UADA;AAAA;AAGA,KAxKA;AA0KA,uBA1KA,iCA0KA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,mCADA;AAGA,KAlLA;AAoLA,4BApLA,sCAoLA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,gCADA;AAGA,KA5LA;AA8LA,iCA9LA,2CA8LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,gCADA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAFA,EADA;AAQA,KA3MA;AA6MA,0BA7MA,kCA6MA,GA7MA,EA6MA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAKA;AAEA;AACA,KArNA;AAuNA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA,CAvNA;AA6NA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KARA,CA7NA;AAuOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA;AAvOA,GAzBA;AAuQA,QAvQA,oBAuQA;AAAA;AAAA,QACA,IADA,GACA,IADA,CACA,IADA;AAEA;;AACA;AACA;AADA,8CAEA,WAFA,GAEA,IAFA;;AAIA;AACA;AACA;AADA;AADA;AAMA;AAEA,WACA;AACA,4BADA;AAAA;AAEA,sBAFA;AAGA,qBAHA;AAIA;AAJA;AAAA,QAKA,mBALA,EAMA,iBACA,kCACA,2BADA,EAPA,EADA;AAcA;AApSA;AAwSA,2E;;AChTkN,CAAgB,4GAAG,EAAC,C;;ACAtO,IAAI,aAAM,EAAE,sBAAe;AAC+B;AACL;;;AAGrD;AAC0F;AAC1F,IAAI,gBAAS,GAAG,kBAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,aAAM;AACR,EAAE,sBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,mBAYf;AACD,gBAAS;AACM,sEAAS,Q;;AChCxB;AACA;AACA;AACA;AAEA;AACA,YADA;AAEA,kBAFA;AAGA,cAHA;AAIA;AAJA;AAOA;AACA,8BADA;AAEA,sBAFA;AAIA;AACA,aADA,uBACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA,KAPA;AASA,sBATA,gCASA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA;AAfA,GAJA;AAsBA;AACA,0BADA,8BACA,QADA,EACA;AACA;AAEA;AACA,OAHA,MAGA;AACA;AACA;AACA;AARA,GAtBA;AAiCA,SAjCA,qBAiCA;AACA;AACA;AACA,GApCA;AAsCA,SAtCA,qBAsCA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA1CA;AA4CA,WA5CA,uBA4CA;AACA;AACA,GA9CA;AAgDA;AACA,cADA,wBACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,uBADA,EAEA,iBACA,iCADA,GAEA,8BACA,iCADA,GAEA,4BANA,EAOA,sBAPA,EADA;AAWA,KAjBA;AAmBA,oBAnBA,8BAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,kCACA,oBADA,GAEA,IAFA;AAGA,KA1BA;AA4BA,mBA5BA,6BA4BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,iCACA,mBADA,GAEA,IAFA;AAGA,KAnCA;AAqCA,yBArCA,mCAqCA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAjDA;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A;;AAEA;AACA,IAAI,KAAU,EAAE,iBAYf;AACD,cAAS;AACM,uDAAS,Q;;;;;;;;;;;;AChCxB;AACA;AACA;AAEA;AACA,uCADA;AAEA,sBAFA;AAIA;AACA,0BADA,8BACA,QADA,EACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAPA;AASA,6BATA,mCASA;AACA;AACA;AAXA,GAJA;AAkBA,SAlBA,qBAkBA;AACA;AACA;AACA,GArBA;AAuBA,SAvBA,qBAuBA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA3BA;AA6BA;AACA,iBADA,2BACA;AACA;AACA;AACA;AACA;AACA,KANA;AAQA,kBARA,4BAQA;AACA;AACA;AACA,KAXA;AAaA,6CAbA,uDAaA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AADA;AAGA,KAvBA;AAyBA,2BAzBA,qCAyBA;AAAA;;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AACA;;AACA;AACA,SAHA;AADA;AAMA,KAtCA;AAwCA,8CAxCA,wDAwCA;AACA;AAEA;AACA;AACA,KA7CA;AA+CA,4BA/CA,sCA+CA;AACA;AAEA;AACA;AACA,KApDA;AAsDA,eAtDA,yBAsDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AAEA;AACA,KA7DA;AA+DA,6BA/DA,uCA+DA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AA9EA,GA7BA;AA8GA,QA9GA,oBA8GA;AAAA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AAAA;AAAA;AAEA,WACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QACA;AAAA;AAAA,MADA,EADA;AAKA,GAxHA;AA0HA,WA1HA,uBA0HA;AACA;AACA;AA5HA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A;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;;;;ACjCxB;AACA;AACA;AAEe+G,mFAAf;AACA;AACA;AAOO,IAAMC,OAAO,GAAGC,OAAhB,C","file":"vue-treeselect.cjs.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"lodash/noop\");","module.exports = require(\"lodash/debounce\");","module.exports = require(\"watch-size\");","module.exports = require(\"is-promise\");","module.exports = require(\"lodash/once\");","module.exports = require(\"lodash/identity\");","module.exports = require(\"lodash/constant\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"lodash/last\");","module.exports = require(\"fuzzysearch\");","module.exports = require(\"babel-helper-vue-jsx-merge-props\");","module.exports = require(\"vue\");","// extracted by mini-css-extract-plugin","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// ========================\r\n// Debugging Helpers\r\n// ========================\r\n\r\nexport { warning } from './warning'\r\n\r\n// ========================\r\n// DOM Utilities\r\n// ========================\r\n\r\nexport { onLeftClick } from './onLeftClick'\r\nexport { scrollIntoView } from './scrollIntoView'\r\nexport { debounce } from './debounce'\r\nexport { watchSize } from './watchSize'\r\nexport { setupResizeAndScrollEventListeners } from './setupResizeAndScrollEventListeners'\r\n\r\n// ========================\r\n// Language Helpers\r\n// ========================\r\n\r\nexport { isNaN } from './isNaN'\r\nexport { isPromise } from './isPromise'\r\nexport { once } from './once'\r\nexport { noop } from './noop'\r\nexport { identity } from './identity'\r\nexport { constant } from './constant'\r\nexport { createMap } from './createMap'\r\nexport { deepExtend } from './deepExtend'\r\nexport { last } from './last'\r\nexport { includes } from './includes'\r\nexport { find } from './find'\r\nexport { removeFromArray } from './removeFromArray'\r\n\r\n// ========================\r\n// Other Utilities\r\n// ========================\r\n\r\nexport { quickDiff } from './quickDiff'\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/external \"@babel/runtime/helpers/slicedToArray\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/toConsumableArray\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/defineProperty\"","webpack://VueTreeselect/external \"lodash/noop\"","webpack://VueTreeselect/external \"lodash/debounce\"","webpack://VueTreeselect/external \"watch-size\"","webpack://VueTreeselect/external \"is-promise\"","webpack://VueTreeselect/external \"lodash/once\"","webpack://VueTreeselect/external \"lodash/identity\"","webpack://VueTreeselect/external \"lodash/constant\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/typeof\"","webpack://VueTreeselect/external \"lodash/last\"","webpack://VueTreeselect/external \"fuzzysearch\"","webpack://VueTreeselect/external \"babel-helper-vue-jsx-merge-props\"","webpack://VueTreeselect/external \"vue\"","webpack://VueTreeselect/./src/style.less?1f4a","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/utils/index.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./src/components/HiddenFields.vue?750c","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue?449d","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/Placeholder.vue?238d","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/SingleValue.vue?5aaa","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?ada5","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue?9a1f","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/MultiValue.vue?6f61","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?525a","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Control.vue?57ab","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/./src/components/Tip.vue?5960","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue?0a09","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue?c349","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue?ca92","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/components/Treeselect.vue?85a0","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["warning","process","env","NODE_ENV","noop","checker","complainer","message","concat","console","error","onLeftClick","mouseDownHandler","onMouseDown","evt","type","button","args","call","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","removeFromArray","arr","elem","idx","indexOf","splice","intervalId","registered","INTERVAL_DURATION","run","setInterval","forEach","test","stop","clearInterval","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","unwatch","length","push","watchSize","isIE9","document","documentMode","locked","wrappedListener","implementation","watchSizeForBrowsersOtherThanIE9","removeSizeWatcher","findScrollParents","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","isScrollElment","window","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","addEventListener","passive","scrollParent","removeEventListeners","removeEventListener","$scrollParent","isNaN","x","createMap","Object","create","isPlainObject","value","getPrototypeOf","prototype","copy","obj","key","deepExtend","target","source","keys","i","len","includes","arrOrStr","find","predicate","ctx","undefined","quickDiff","arrA","arrB","NO_PARENT_NODE","UNCHECKED","INDETERMINATE","CHECKED","ALL_CHILDREN","ALL_DESCENDANTS","LEAF_CHILDREN","LEAF_DESCENDANTS","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","ALL","BRANCH_PRIORITY","LEAF_PRIORITY","ALL_WITH_INDETERMINATE","ORDER_SELECTED","LEVEL","INDEX","KEY_CODES","BACKSPACE","ENTER","ESCAPE","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DELETE","INPUT_DEBOUNCE_DELAY","MIN_INPUT_WIDTH","MENU_BUFFER","sortValueByIndex","a","b","level","index","sortValueByLevel","createAsyncOptionsStates","isLoaded","isLoading","loadingError","slugify","str","map","e","o","u","toLowerCase","pattern","replace","RegExp","stringifyOptionPropValue","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","limitTextDefault","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","name","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","acceptableValues","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","hasChanged","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propNames","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","label","enhancedNormalizer","fallbackNode","isFallbackNode","isDisabled","isNew","$set","defaultNode","valueArray","matched","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","isClickedOnValueContainer","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","ref","portal","portalTarget","$menu","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","Treeselect","VERSION","PKG_VERSION"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QACh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ACA,SAAKG,UAAL;AACD,GAj2DY;AAm2Db8I,SAn2Da,qBAm2DH;AACR,QAAI,KAAK5R,SAAT,EAAoB,KAAKuL,UAAL;AACpB,QAAI,CAAC,KAAKrI,OAAN,IAAiB,CAAC,KAAKnD,KAAvB,IAAgC,KAAKE,mBAAzC,EAA8D,KAAKqP,eAAL;AAC9D,QAAI,KAAKzP,UAAT,EAAqB,KAAK4H,QAAL;AACrB,QAAI,KAAK1H,KAAL,IAAc,KAAKoB,cAAvB,EAAuC,KAAKmH,kBAAL;AACxC,GAx2DY;AA02DbuJ,WA12Da,uBA02DD;AAEV,SAAK9G,uBAAL,CAA6B,KAA7B;AACD;AA72DY,CAAf,E;;AC7EA;;AAEA;AACA;AAEA;AAEA;AACA;;AAEA;AACA,uCADA;AAEA,sBAFA;AAGA,kBAHA;AAKA,QALA,kBAKA,CALA,EAKA,OALA,EAKA;AAAA;AAAA,QACA,QADA,GACA,kBADA,CACA,QADA;AAGA;AAEA;AAEA,uEACA,0CADA;AAIA;AAAA,aACA;AAAA;AAAA;AACA;AADA;AAAA;AAAA,mBAEA;AAFA;AAGA;AAHA,QADA;AAAA;AAOA;AAvBA,G;;ACXwN,CAAgB,wHAAG,EAAC,C;;ACA5O;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC5FA,IA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A,EAuDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAIA;AAEA,oEACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA,aAHA,MAGA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AAEA;AACA;AAvEA;AAyEA,KA9IA;AAgJA,eAhJA,uBAgJA,GAhJA,EAgJA;AAEA;AAGA;AACA;AACA,KAvJA;AAyJA,wBAzJA,kCAyJA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BADA;AAEA,6BAFA;AAGA;AAHA,WADA;AAMA;AANA;AAQA;;AAEA;AACA;AACA;AACA;AADA;AADA;AAKA;;AAEA,aACA;AAAA;AAAA,mBACA,QADA,EADA;AAKA,KA3LA;AA6LA,eA7LA,yBA6LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA;AAAA;AACA,wCADA;AAAA;AAEA,sBAFA;AAGA,6BAHA;AAIA,qCAJA;AAKA;AALA;AAAA;AAAA,mBAMA;AANA;AAOA,8BAPA;AAAA;AAAA,mBAQA,YARA;AAAA,mBASA,YATA;AAAA,kBAUA,WAVA;AAAA,qBAWA,cAXA;AAAA,uBAYA;AAZA;AAAA,QADA;AAgBA,KAhNA;AAkNA,eAlNA,yBAkNA;AAAA;AACA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;AACL;;;AAGlD;AAC0F;AAC1F,IAAI,aAAS,GAAG,kBAAU;AAC1B,EAAE,sCAAM;AACR,EAAE,UAAM;AACR,EAAE,mBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,gBAYf;AACD,aAAS;AACM,qDAAS,Q;;;AChCxB;AACA;AACA;AACA;AAEA;AAEA;AACA,gCADA;AAEA,sBAFA;AAIA;AACA;AACA,kBADA;AAEA;AAFA;AADA,GAJA;AAWA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KALA;AAOA,cAPA,wBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAXA,GAXA;AAyBA;AACA,gBADA,0BACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA,sCADA;AAEA,2DAFA;AAGA,qEAHA;AAIA,+DAJA;AAKA,wFALA;AAMA;AANA;AASA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAEA,2BACA,8BACA,qBADA,EADA,EAIA,kBAJA,EAFA,EADA;AAWA,KAvBA;AAyBA,wBAzBA,kCAyBA;AAAA;AACA;AAEA,aACA;AAAA;AAAA,UACA,uBADA,EAEA,0BAFA,EAGA,+BAHA,EAIA,oCAJA,EADA;AAQA,KApCA;AAsCA,eAtCA,yBAsCA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;;AAEA;AACA;AACA;AACA,yDADA;AAEA;AAFA;AADA;AAMA;AACA,8CADA;AAEA;AAFA;AAKA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,YACA,kCACA;AAAA;AAAA,UADA,EADA,EADA;AAOA;;AA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,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,mCADA;AAGA,KAlLA;AAoLA,4BApLA,sCAoLA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,gCADA;AAGA,KA5LA;AA8LA,iCA9LA,2CA8LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,gCADA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAFA,EADA;AAQA,KA3MA;AA6MA,0BA7MA,kCA6MA,GA7MA,EA6MA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAKA;AAEA;AACA,KArNA;AAuNA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA,CAvNA;AA6NA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KARA,CA7NA;AAuOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA;AAvOA,GAzBA;AAuQA,QAvQA,oBAuQA;AAAA;AAAA,QACA,IADA,GACA,IADA,CACA,IADA;AAEA;;AACA;AACA;AADA,8CAEA,WAFA,GAEA,IAFA;;AAIA;AACA;AACA;AADA;AADA;AAMA;AAEA,WACA;AACA,4BADA;AAAA;AAEA,sBAFA;AAGA,qBAHA;AAIA;AAJA;AAAA,QAKA,mBALA,EAMA,iBACA,kCACA,2BADA,EAPA,EADA;AAcA;AApSA;A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,EAAE,oBAAe;AAC6B;AACL;;;AAGnD;AAC0F;AAC1F,IAAI,cAAS,GAAG,kBAAU;AAC1B,EAAE,uCAAM;AACR,EAAE,WAAM;AACR,EAAE,oBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,iBAYf;AACD,cAAS;AACM,uDAAS,Q;;;;;;;;;;;;AChCxB;AACA;AACA;AAEA;AACA,uCADA;AAEA,sBAFA;AAIA;AACA,0BADA,8BACA,QADA,EACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAPA;AASA,6BATA,mCASA;AACA;AACA;AAXA,GAJA;AAkBA,SAlBA,qBAkBA;AACA;AACA;AACA,GArBA;AAuBA,SAvBA,qBAuBA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA3BA;AA6BA;AACA,iBADA,2BACA;AACA;AACA;AACA;AACA;AACA,KANA;AAQA,kBARA,4BAQA;AACA;AACA;AACA,KAXA;AAaA,6CAbA,uDAaA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AADA;AAGA,KAvBA;AAyBA,2BAzBA,qCAyBA;AAAA;;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AACA;;AACA;AACA,SAHA;AADA;AAMA,KAtCA;AAwCA,8CAxCA,wDAwCA;AACA;AAEA;AACA;AACA,KA7CA;AA+CA,4BA/CA,sCA+CA;AACA;AAEA;AACA;AACA,KApDA;AAsDA,eAtDA,yBAsDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AAEA;AACA,KA7DA;AA+DA,6BA/DA,uCA+DA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AA9EA,GA7BA;AA8GA,QA9GA,oBA8GA;AAAA;AAAA,QACA,QADA,GACA,IADA,C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EAAE,0BAAe;AACmC;AACL;;;AAGzD;AAC0F;AAC1F,IAAI,oBAAS,GAAG,kBAAU;AAC1B,EAAE,6CAAM;AACR,EAAE,iBAAM;AACR,EAAE,0BAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;;;;ACjCxB;AACA;AACA;AAEe+G,mFAAf;AACA;AACA;AAOO,IAAMC,OAAO,GAAGC,OAAhB,C","file":"vue-treeselect.cjs.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"lodash/noop\");","module.exports = require(\"lodash/debounce\");","module.exports = require(\"watch-size\");","module.exports = require(\"is-promise\");","module.exports = require(\"lodash/once\");","module.exports = require(\"lodash/identity\");","module.exports = require(\"lodash/constant\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"lodash/last\");","module.exports = require(\"fuzzysearch\");","module.exports = require(\"babel-helper-vue-jsx-merge-props\");","module.exports = require(\"vue\");","// extracted by mini-css-extract-plugin","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// ========================\r\n// Debugging Helpers\r\n// ========================\r\n\r\nexport { warning } from './warning'\r\n\r\n// ========================\r\n// DOM Utilities\r\n// ========================\r\n\r\nexport { onLeftClick } from './onLeftClick'\r\nexport { scrollIntoView } from './scrollIntoView'\r\nexport { debounce } from './debounce'\r\nexport { watchSize } from './watchSize'\r\nexport { setupResizeAndScrollEventListeners } from './setupResizeAndScrollEventListeners'\r\n\r\n// ========================\r\n// Language Helpers\r\n// ========================\r\n\r\nexport { isNaN } from './isNaN'\r\nexport { isPromise } from './isPromise'\r\nexport { once } from './once'\r\nexport { noop } from './noop'\r\nexport { identity } from './identity'\r\nexport { constant } from './constant'\r\nexport { createMap } from './createMap'\r\nexport { deepExtend } from './deepExtend'\r\nexport { last } from './last'\r\nexport { includes } from './includes'\r\nexport { find } from './find'\r\nexport { removeFromArray } from './removeFromArray'\r\n\r\n// ========================\r\n// Other Utilities\r\n// ========================\r\n\r\nexport { quickDiff } from './quickDiff'\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.cjs.min.js b/dist/vue-treeselect.cjs.min.js index 1c240c99..c221f804 100644 --- a/dist/vue-treeselect.cjs.min.js +++ b/dist/vue-treeselect.cjs.min.js @@ -3,5 +3,5 @@ * Released under the MIT License. * https://vue-treeselect.js.org/ */ -module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=16)}([function(e,t){e.exports=require("@babel/runtime/helpers/defineProperty")},function(e,t){e.exports=require("babel-helper-vue-jsx-merge-props")},function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("lodash/noop")},function(e,t){e.exports=require("lodash/debounce")},function(e,t){e.exports=require("is-promise")},function(e,t){e.exports=require("lodash/once")},function(e,t){e.exports=require("lodash/identity")},function(e,t){e.exports=require("lodash/constant")},function(e,t){e.exports=require("lodash/last")},function(e,t){e.exports=require("@babel/runtime/helpers/slicedToArray")},function(e,t){e.exports=require("watch-size")},function(e,t){e.exports=require("@babel/runtime/helpers/typeof")},function(e,t){e.exports=require("fuzzysearch")},function(e,t){e.exports=require("vue")},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"Treeselect",(function(){return it})),n.d(t,"treeselectMixin",(function(){return he})),n.d(t,"LOAD_ROOT_OPTIONS",(function(){return W})),n.d(t,"LOAD_CHILDREN_OPTIONS",(function(){return q})),n.d(t,"ASYNC_SEARCH",(function(){return Q})),n.d(t,"VERSION",(function(){return rt}));var i=n(10),r=n.n(i),s=n(2),o=n.n(s),a=n(0),l=n.n(a),c=n(3),u=n.n(c).a;function d(e){return function(t){if("mousedown"===t.type&&0===t.button){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rn.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight):i.top-r0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"==typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){j(e,t)&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue();j(e,this.internalValue)&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(u((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||u((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&u((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"].forEach((function(t){u((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=R(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(null,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return u((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n={id:e,label:this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),ancestors:[],parentNode:null,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};return"id"===this.valueFormat?n:H(this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],(function(n){return n&&t.enhancedNormalizer(n).id===e}))||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||"ALL"===this.valueConsistsOf)n=e;else if("BRANCH_PRIORITY"===this.valueConsistsOf)e.forEach((function(e){n.push(e);var i=t.getNode(e);i.isBranch&&t.traverseDescendantsBFS(i,(function(e){n.push(e.id)}))}));else if("LEAF_PRIORITY"===this.valueConsistsOf)for(var i=R(),r=e.slice();r.length;){var s=r.shift(),o=this.getNode(s);n.push(s),o.isRootNode||(o.parentNode.id in i||(i[o.parentNode.id]=o.parentNode.children.length),0==--i[o.parentNode.id]&&r.push(o.parentNode.id))}else if("ALL_WITH_INDETERMINATE"===this.valueConsistsOf)for(var a=R(),l=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));l.length;){var c=l.shift(),u=this.getNode(c);n.push(c),u.isRootNode||(u.parentNode.id in a||(a[u.parentNode.id]=u.parentNode.children.length),0==--a[u.parentNode.id]&&l.push(u.parentNode.id))}j(this.forest.selectedNodeIds,n)&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var i=oe({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,i)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch)for(var n=e.children.slice();n.length;){var i=n[0];i.isBranch&&n.push.apply(n,o()(i.children)),t(i),n.shift()}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){!function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))}({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:d((function(e){(e.preventDefault(),e.stopPropagation(),this.disabled)||(this.getValueContainer().$el.contains(e.target)&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags())})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},l()(n,"ALL_CHILDREN",0),l()(n,"ALL_DESCENDANTS",0),l()(n,"LEAF_CHILDREN",0),l()(n,"LEAF_DESCENDANTS",0),n)))}));var i=t.trim().toLocaleLowerCase(),r=i.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&r.length>1?t.isMatched=r.every((function(e){return ce(!1,!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return ce(!e.disableFuzzyMatching,e.replaceAccents,i,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].ALL_DESCENDANTS++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].LEAF_DESCENDANTS++})),null!==t.parentNode&&(e.localSearch.countMap[t.parentNode.id].ALL_CHILDREN+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id].LEAF_CHILDREN+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&null!==t.parentNode&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),i=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return i();this.callLoadOptionsProp({action:Q,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(r){n.isLoaded=!0,n.options=r,e.trigger.searchQuery===t&&i()},fail:function(e){n.loadingError=ue(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=(this.appendToBody?this.$refs.portal.portalTarget:this).$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.menu.current;if(null!=i&&i in this.forest.nodeMap&&(this.forest.nodeMap[i].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var r=function(){var n=t.getMenu(),i=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));i&&h(n,i)};this.getMenu()?r():this.$nextTick(r)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=F()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch)&&(e.showAllChildrenOnSearch=!0):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=R();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=R();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=0})),this.selectedNodes.forEach((function(t){n[t.id]=2,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=1)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return oe({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var i=this,s=t.map((function(e){return[i.enhancedNormalizer(e),e]})).map((function(t,s){var o=r()(t,2),a=o[0],c=o[1];i.checkDuplication(a),i.verifyNodeShape(a);var d=a.id,h=a.label,p=a.children,f=a.isDefaultExpanded,v=null===e,m=v?0:e.level+1,g=Array.isArray(p)||null===p,S=!g,O=!!a.isDisabled||!i.flat&&!v&&e.isDisabled,y=!!a.isNew,b=i.matchKeys.reduce((function(e,t){return oe({},e,l()({},t,(n=a[t],"string"==typeof n?n:"number"!=typeof n||L(n)?"":n+"").toLocaleLowerCase()));var n}),{}),_=v?b.label:e.nestedSearchLabel+" "+b.label,E=i.$set(i.forest.nodeMap,d,R());if(i.$set(E,"id",d),i.$set(E,"label",h),i.$set(E,"level",m),i.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),i.$set(E,"index",(v?[]:e.index).concat(s)),i.$set(E,"parentNode",e),i.$set(E,"lowerCased",b),i.$set(E,"nestedSearchLabel",_),i.$set(E,"isDisabled",O),i.$set(E,"isNew",y),i.$set(E,"isMatched",!1),i.$set(E,"isHighlighted",!1),i.$set(E,"isBranch",g),i.$set(E,"isLeaf",S),i.$set(E,"isRootNode",v),i.$set(E,"raw",c),g){var N,w=Array.isArray(p);i.$set(E,"childrenStates",oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{isLoaded:w})),i.$set(E,"isExpanded","boolean"==typeof f?f:ms+40,c=a>s+40;r.top>=0&&r.top<=o||r.top<0&&r.bottom>0?"auto"!==e.openDirection?e.menu.placement=Qe[e.openDirection]:e.menu.placement=l||!c?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:_(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:N(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},void 0,void 0,!1,null,null,null);Ye.options.__file="src/components/Menu.vue";var Ke=Ye.exports,Xe=n(14),Ue=n.n(Xe);function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Ge,Ze={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){this.instance.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:N(e,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:_(t,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl().getBoundingClientRect();t.style.width=n.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),s="bottom"===e.menu.placement?i.height:0,o=Math.round(i.left-r.left)+"px",a=Math.round(i.top-r.top+s)+"px";this.$refs.menu.$refs["menu-container"].style[H(["transform","webkitTransform","MozTransform","msTransform"],(function(e){return e in document.body.style}))]="translate(".concat(o,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],i={zIndex:t.zIndex};return e("div",{class:n,style:i,attrs:{"data-instance-id":t.getInstanceId()}},[e(Ke,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},et=fe({name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new Ue.a(function(e){for(var t=1;t1?n-1:0),r=1;rn.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight):i.top-r0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"==typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){j(e,t)&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue();j(e,this.internalValue)&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(u((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||u((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&u((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"].forEach((function(t){u((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=R(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(null,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return u((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n={id:e,label:this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),ancestors:[],parentNode:null,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};return"id"===this.valueFormat?n:H(this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],(function(n){return n&&t.enhancedNormalizer(n).id===e}))||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||"ALL"===this.valueConsistsOf)n=e;else if("BRANCH_PRIORITY"===this.valueConsistsOf)e.forEach((function(e){n.push(e);var i=t.getNode(e);i.isBranch&&t.traverseDescendantsBFS(i,(function(e){n.push(e.id)}))}));else if("LEAF_PRIORITY"===this.valueConsistsOf)for(var i=R(),r=e.slice();r.length;){var s=r.shift(),o=this.getNode(s);n.push(s),o.isRootNode||(o.parentNode.id in i||(i[o.parentNode.id]=o.parentNode.children.length),0==--i[o.parentNode.id]&&r.push(o.parentNode.id))}else if("ALL_WITH_INDETERMINATE"===this.valueConsistsOf)for(var a=R(),l=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));l.length;){var c=l.shift(),u=this.getNode(c);n.push(c),u.isRootNode||(u.parentNode.id in a||(a[u.parentNode.id]=u.parentNode.children.length),0==--a[u.parentNode.id]&&l.push(u.parentNode.id))}j(this.forest.selectedNodeIds,n)&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var i=oe({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,i)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch)for(var n=e.children.slice();n.length;){var i=n[0];i.isBranch&&n.push.apply(n,o()(i.children)),t(i),n.shift()}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){!function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))}({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:d((function(e){(e.preventDefault(),e.stopPropagation(),this.disabled)||(this.getValueContainer().$el.contains(e.target)&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags())})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},l()(n,"ALL_CHILDREN",0),l()(n,"ALL_DESCENDANTS",0),l()(n,"LEAF_CHILDREN",0),l()(n,"LEAF_DESCENDANTS",0),n)))}));var i=t.trim().toLocaleLowerCase(),r=i.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&r.length>1?t.isMatched=r.every((function(e){return ce(!1,!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return ce(!e.disableFuzzyMatching,e.replaceAccents,i,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].ALL_DESCENDANTS++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].LEAF_DESCENDANTS++})),null!==t.parentNode&&(e.localSearch.countMap[t.parentNode.id].ALL_CHILDREN+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id].LEAF_CHILDREN+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&null!==t.parentNode&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),i=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return i();this.callLoadOptionsProp({action:Q,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(r){n.isLoaded=!0,n.options=r,e.trigger.searchQuery===t&&i()},fail:function(e){n.loadingError=ue(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=(this.appendToBody?this.$refs.portal.portalTarget:this).$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.menu.current;if(null!=i&&i in this.forest.nodeMap&&(this.forest.nodeMap[i].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var r=function(){var n=t.getMenu(),i=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));i&&h(n,i)};this.getMenu()?r():this.$nextTick(r)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=F()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch)&&(e.showAllChildrenOnSearch=!0):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=R();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=R();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=0})),this.selectedNodes.forEach((function(t){n[t.id]=2,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=1)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return oe({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var i=this,s=t.map((function(e){return[i.enhancedNormalizer(e),e]})).map((function(t,s){var o=r()(t,2),a=o[0],c=o[1];i.checkDuplication(a),i.verifyNodeShape(a);var d=a.id,h=a.label,p=a.children,f=a.isDefaultExpanded,v=null===e,m=v?0:e.level+1,g=Array.isArray(p)||null===p,S=!g,O=!!a.isDisabled||!i.flat&&!v&&e.isDisabled,y=!!a.isNew,b=i.matchKeys.reduce((function(e,t){return oe({},e,l()({},t,(n=a[t],"string"==typeof n?n:"number"!=typeof n||L(n)?"":n+"").toLocaleLowerCase()));var n}),{}),_=v?b.label:e.nestedSearchLabel+" "+b.label,E=i.$set(i.forest.nodeMap,d,R());if(i.$set(E,"id",d),i.$set(E,"label",h),i.$set(E,"level",m),i.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),i.$set(E,"index",(v?[]:e.index).concat(s)),i.$set(E,"parentNode",e),i.$set(E,"lowerCased",b),i.$set(E,"nestedSearchLabel",_),i.$set(E,"isDisabled",O),i.$set(E,"isNew",y),i.$set(E,"isMatched",!1),i.$set(E,"isHighlighted",!1),i.$set(E,"isBranch",g),i.$set(E,"isLeaf",S),i.$set(E,"isRootNode",v),i.$set(E,"raw",c),g){var N,w=Array.isArray(p);i.$set(E,"childrenStates",oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{isLoaded:w})),i.$set(E,"isExpanded","boolean"==typeof f?f:ms+40,c=a>s+40;r.top>=0&&r.top<=o||r.top<0&&r.bottom>0?"auto"!==e.openDirection?e.menu.placement=Qe[e.openDirection]:e.menu.placement=l||!c?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:_(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:N(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},void 0,void 0,!1,null,null,null);Ye.options.__file="src/components/Menu.vue";var Ke=Ye.exports,Xe=n(14),Ue=n.n(Xe);function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Ge,Ze={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){this.instance.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:N(e,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:_(t,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl().getBoundingClientRect();t.style.width=n.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),s="bottom"===e.menu.placement?i.height:0,o=Math.round(i.left-r.left)+"px",a=Math.round(i.top-r.top+s)+"px";this.$refs.menu.$refs["menu-container"].style[H(["transform","webkitTransform","MozTransform","msTransform"],(function(e){return e in document.body.style}))]="translate(".concat(o,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],i={zIndex:t.zIndex};return e("div",{class:n,style:i,attrs:{"data-instance-id":t.getInstanceId()}},[e(Ke,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},et=fe({name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new Ue.a(function(e){for(var t=1;t scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","\r\n","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","\r\n","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/external \"@babel/runtime/helpers/defineProperty\"","webpack://VueTreeselect/external \"babel-helper-vue-jsx-merge-props\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/toConsumableArray\"","webpack://VueTreeselect/external \"lodash/noop\"","webpack://VueTreeselect/external \"lodash/debounce\"","webpack://VueTreeselect/external \"is-promise\"","webpack://VueTreeselect/external \"lodash/once\"","webpack://VueTreeselect/external \"lodash/identity\"","webpack://VueTreeselect/external \"lodash/constant\"","webpack://VueTreeselect/external \"lodash/last\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/slicedToArray\"","webpack://VueTreeselect/external \"watch-size\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/typeof\"","webpack://VueTreeselect/external \"fuzzysearch\"","webpack://VueTreeselect/external \"vue\"","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","warning","noop","onLeftClick","mouseDownHandler","evt","type","button","args","this","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","intervalId","removeFromArray","arr","elem","idx","indexOf","splice","registered","test","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","push","setInterval","forEach","length","clearInterval","watchSize","isIE9","document","documentMode","locked","removeSizeWatcher","watchSizeForBrowsersOtherThanIE9","isScrollElment","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","window","findScrollParents","addEventListener","passive","scrollParent","removeEventListener","$scrollParent","isNaN","x","createMap","isPlainObject","getPrototypeOf","deepExtend","target","source","keys","len","obj","includes","arrOrStr","find","predicate","ctx","quickDiff","arrA","arrB","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","KEY_CODES","sortValueByIndex","a","b","level","index","slugify","str","map","e","u","pattern","toLowerCase","replace","RegExp","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","message","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","isLoaded","isLoading","loadingError","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","sortValueByLevel","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","fallbackNode","label","enhancedNormalizer","isFallbackNode","isDisabled","isNew","$set","defaultNode","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","$menu","portal","portalTarget","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","concat","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","console","error","JSON","stringify","undefined","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","normalizeComponent","scriptExports","render","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","component","__file","inputWidth","_h","$createElement","_c","_self","attrs","xmlns","viewBox","_withStripped","VERSION","Treeselect","PKG_VERSION"],"mappings":";;;;;2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAi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BACQ,wCAAR,wBACQ,iCAAR,qBAKE,OAvBF,WAuBI,IAAJ,eACI,OACJ,SAAM,IAAN,UAAM,MAAN,oBACA,MACA,MAAM,IAAN,YACA,wBAAM,IAAN,iBAAM,IAAN,kBDnCI,OAAQ,GAWV,EACA,KACA,KACA,MAkBF,GAAU5Q,QAAQ4Q,OAAS,gCACZ,U,QEpBFU,I,MATEC,aASQC","file":"vue-treeselect.cjs.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"babel-helper-vue-jsx-merge-props\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"lodash/noop\");","module.exports = require(\"lodash/debounce\");","module.exports = require(\"is-promise\");","module.exports = require(\"lodash/once\");","module.exports = require(\"lodash/identity\");","module.exports = require(\"lodash/constant\");","module.exports = require(\"lodash/last\");","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"watch-size\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"fuzzysearch\");","module.exports = require(\"vue\");","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","\r\n","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","\r\n","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.umd.js b/dist/vue-treeselect.umd.js index 804e79a2..a79e938a 100644 --- a/dist/vue-treeselect.umd.js +++ b/dist/vue-treeselect.umd.js @@ -4456,7 +4456,7 @@ var Option = { name: 'vue-treeselect__list--transition' } }; - var ariaSelected = node.instance.selectedNodes.length ? 'true' : 'false'; + var ariaSelected = this.instance.selectedNodes.length ? 'true' : 'false'; return h("div", { "class": listItemClass, attrs: { diff --git a/dist/vue-treeselect.umd.js.map b/dist/vue-treeselect.umd.js.map index 39e5947d..fafa1da5 100644 --- a/dist/vue-treeselect.umd.js.map +++ b/dist/vue-treeselect.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://VueTreeselect/webpack/universalModuleDefinition","webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://VueTreeselect/./node_modules/lodash/noop.js","webpack://VueTreeselect/./node_modules/lodash/debounce.js","webpack://VueTreeselect/./node_modules/lodash/isObject.js","webpack://VueTreeselect/./node_modules/lodash/now.js","webpack://VueTreeselect/./node_modules/lodash/_root.js","webpack://VueTreeselect/./node_modules/lodash/_freeGlobal.js","webpack://VueTreeselect/(webpack)/buildin/global.js","webpack://VueTreeselect/./node_modules/lodash/toNumber.js","webpack://VueTreeselect/./node_modules/lodash/isSymbol.js","webpack://VueTreeselect/./node_modules/lodash/_baseGetTag.js","webpack://VueTreeselect/./node_modules/lodash/_Symbol.js","webpack://VueTreeselect/./node_modules/lodash/_getRawTag.js","webpack://VueTreeselect/./node_modules/lodash/_objectToString.js","webpack://VueTreeselect/./node_modules/lodash/isObjectLike.js","webpack://VueTreeselect/./node_modules/is-promise/index.js","webpack://VueTreeselect/./node_modules/lodash/once.js","webpack://VueTreeselect/./node_modules/lodash/before.js","webpack://VueTreeselect/./node_modules/lodash/toInteger.js","webpack://VueTreeselect/./node_modules/lodash/toFinite.js","webpack://VueTreeselect/./node_modules/lodash/identity.js","webpack://VueTreeselect/./node_modules/lodash/constant.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/typeof.js","webpack://VueTreeselect/./node_modules/lodash/last.js","webpack://VueTreeselect/./node_modules/fuzzysearch/index.js","webpack://VueTreeselect/./node_modules/babel-helper-vue-jsx-merge-props/index.js","webpack://VueTreeselect/external \"Vue\"","webpack://VueTreeselect/./src/style.less?1f4a","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./node_modules/watch-size/index.es.mjs","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/utils/index.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./src/components/HiddenFields.vue?750c","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue?449d","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/Placeholder.vue?238d","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/SingleValue.vue?5aaa","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?ada5","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue?9a1f","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/MultiValue.vue?6f61","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?525a","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Control.vue?57ab","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/./src/components/Tip.vue?5960","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue?0a09","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue?c349","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue?ca92","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/components/Treeselect.vue?85a0","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["warning","process","noop","checker","complainer","message","concat","console","error","onLeftClick","mouseDownHandler","onMouseDown","evt","type","button","args","call","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","removeFromArray","arr","elem","idx","indexOf","splice","intervalId","registered","INTERVAL_DURATION","run","setInterval","forEach","test","stop","clearInterval","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","unwatch","length","push","watchSize","isIE9","document","documentMode","locked","wrappedListener","implementation","watchSizeForBrowsersOtherThanIE9","removeSizeWatcher","findScrollParents","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","isScrollElment","window","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","addEventListener","passive","scrollParent","removeEventListeners","removeEventListener","$scrollParent","isNaN","x","createMap","Object","create","isPlainObject","value","getPrototypeOf","prototype","copy","obj","key","deepExtend","target","source","keys","i","len","includes","arrOrStr","find","predicate","ctx","undefined","quickDiff","arrA","arrB","NO_PARENT_NODE","UNCHECKED","INDETERMINATE","CHECKED","ALL_CHILDREN","ALL_DESCENDANTS","LEAF_CHILDREN","LEAF_DESCENDANTS","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","ALL","BRANCH_PRIORITY","LEAF_PRIORITY","ALL_WITH_INDETERMINATE","ORDER_SELECTED","LEVEL","INDEX","KEY_CODES","BACKSPACE","ENTER","ESCAPE","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DELETE","INPUT_DEBOUNCE_DELAY","MIN_INPUT_WIDTH","MENU_BUFFER","sortValueByIndex","a","b","level","index","sortValueByLevel","createAsyncOptionsStates","isLoaded","isLoading","loadingError","slugify","str","map","e","o","u","toLowerCase","pattern","replace","RegExp","stringifyOptionPropValue","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","limitTextDefault","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","name","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","acceptableValues","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","hasChanged","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propNames","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","label","enhancedNormalizer","fallbackNode","isFallbackNode","isDisabled","isNew","$set","defaultNode","valueArray","matched","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","isClickedOnValueContainer","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","ref","portal","portalTarget","$menu","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","Treeselect","VERSION","PKG_VERSION"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,qBAAqB,mBAAO,CAAC,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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO,YAAY;AAC9B,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,8CAA8C,kBAAkB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9BA,WAAW,mBAAO,CAAC,EAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;ACRA;AACA;;AAEA;;;;;;;;ACHA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACnBA,eAAe,mBAAO,CAAC,EAAY;AACnC,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjEA,iBAAiB,mBAAO,CAAC,EAAe;AACxC,mBAAmB,mBAAO,CAAC,EAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA,aAAa,mBAAO,CAAC,EAAW;AAChC,gBAAgB,mBAAO,CAAC,EAAc;AACtC,qBAAqB,mBAAO,CAAC,EAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3BA,WAAW,mBAAO,CAAC,EAAS;;AAE5B;AACA;;AAEA;;;;;;;ACLA,aAAa,mBAAO,CAAC,EAAW;;AAEhC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA;;AAEA;AACA;AACA;;;;;;;ACJA,aAAa,mBAAO,CAAC,EAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,EAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACvCA,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACnCA,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,EAAE;AACf;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,SAAS;AACtB;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA,WAAW,SAAS,GAAG,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzBA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yB;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACnBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACvBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACj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UAAL;AACD,GAj2DY;AAm2Db8I,SAn2Da,qBAm2DH;AACR,QAAI,KAAK5R,SAAT,EAAoB,KAAKuL,UAAL;AACpB,QAAI,CAAC,KAAKrI,OAAN,IAAiB,CAAC,KAAKnD,KAAvB,IAAgC,KAAKE,mBAAzC,EAA8D,KAAKqP,eAAL;AAC9D,QAAI,KAAKzP,UAAT,EAAqB,KAAK4H,QAAL;AACrB,QAAI,KAAK1H,KAAL,IAAc,KAAKoB,cAAvB,EAAuC,KAAKmH,kBAAL;AACxC,GAx2DY;AA02DbuJ,WA12Da,uBA02DD;AAEV,SAAK9G,uBAAL,CAA6B,KAA7B;AACD;AA72DY,CAAf,E;;AC7EA;;AAEA;AACA;AAEA;AAEA;AACA;;AAEA;AACA,uCADA;AAEA,sBAFA;AAGA,kBAHA;AAKA,QALA,kBAKA,CALA,EAKA,OALA,EAKA;AAAA;AAAA,QACA,QADA,GACA,kBADA,CACA,QADA;AAGA;AAEA;AAEA,uEACA,0CADA;AAIA;AAAA,aACA;AAAA;AAAA;AACA;AADA;AAAA;AAAA,mBAEA;AAFA;AAGA;AAHA,QADA;AAAA;AAOA;AAvBA,G;;ACXwN,CAAgB,wHAAG,EAAC,C;;ACA5O;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC5FA,IAAI,mBAAM;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AAA,UACA,QADA,GACA,IADA,CACA,QADA;AAIA;AAEA,oEACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA,aAHA,MAGA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AAEA;AACA;AAvEA;AAyEA,KA9IA;AAgJA,eAhJA,uBAgJA,GAhJA,EAgJA;AAEA;AAGA;AACA;AACA,KAvJA;AAyJA,wBAzJA,kCAyJA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BADA;AAEA,6BAFA;AAGA;AAHA,WADA;AAMA;AANA;AAQA;;AAEA;AACA;AACA;AACA;AADA;AADA;AAKA;;AAEA,aACA;AAAA;AAAA,mBACA,QADA,EADA;AAKA,KA3LA;AA6LA,eA7LA,yBA6LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA;AAAA;AACA,wCADA;AAAA;AAEA,sBAFA;AAGA,6BAHA;AAIA,qCAJA;AAKA;AALA;AAAA;AAAA,mBAMA;AANA;AAOA,8BAPA;AAAA;AAAA,mBAQA,YARA;AAAA,mBASA,YATA;AAAA,kBAUA,WAVA;AAAA,qBAWA,cAXA;AAAA,uBAYA;AAZA;AAAA,QADA;AAgBA,KAhNA;AAkNA,eAlNA,yBAkNA;AAAA;AACA,aACA;AAAA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GlD;AAC0F;AAC1F,IAAI,aAAS,GAAG,kBAAU;AAC1B,EAAE,sCAAM;AACR,EAAE,UAAM;AACR,EAAE,mBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,gBAYf;AACD,aAAS;AACM,qDAAS,Q;;;AChCxB;AACA;AACA;AACA;AAEA;AAEA;AACA,gCADA;AAEA,sBAFA;AAIA;AACA;AACA,kBADA;AAEA;AAFA;AADA,GAJA;AAWA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KALA;AAOA,cAPA,wBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAXA,GAXA;AAyBA;AACA,gBADA,0BACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA,sCADA;AAEA,2DAFA;AAGA,qEAHA;AAIA,+DAJA;AAKA,wFALA;AAMA;AANA;AASA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAEA,2BACA,8BACA,qBADA,EADA,EAIA,kBAJA,EAFA,EADA;AAWA,KAvBA;AAyBA,wBAzBA,kCAyBA;AAAA;AACA;AAEA,aACA;AAAA;AAAA,UACA,uBADA,EAEA,0BAFA,EAGA,+BAHA,EAIA,oCAJA,EADA;AAQA,KApCA;AAsCA,eAtCA,yBAsCA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;;AAEA;AACA;AACA;AACA,yDADA;AAEA;AAFA;AADA;AAMA;AACA,8CADA;AAEA;AAFA;AAKA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,YACA,kCACA;AAAA;AAAA,UADA,EADA,EADA;AAOA;;AAKA;AACA,kD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;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,mCADA;AAGA,KAlLA;AAoLA,4BApLA,sCAoLA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,gCADA;AAGA,KA5LA;AA8LA,iCA9LA,2CA8LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,gCADA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAFA,EADA;AAQA,KA3MA;AA6MA,0BA7MA,kCA6MA,GA7MA,EA6MA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAKA;AAEA;AACA,KArNA;AAuNA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA,CAvNA;AA6NA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KARA,CA7NA;AAuOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA;AAvOA,GAzBA;AAuQA,QAvQA,oBAuQA;AAAA;AAAA,QACA,IADA,GACA,IADA,CACA,IADA;AAEA;;AACA;AACA;AADA,8CAEA,WAFA,GAEA,IAFA;;AAIA;AACA;AACA;AADA;AADA;AAMA;AAEA,WACA;AACA,4BADA;AAAA;AAEA,sBAFA;AAGA,qBAHA;AAIA;AAJA;AAAA,QAKA,mBALA,EAMA,iBACA,kCACA,2BADA,EAPA,EADA;AAcA;AApSA;AAwSA,2E;;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Ae;AAC6B;AACL;;;AAGnD;AAC0F;AAC1F,IAAI,cAAS,GAAG,kBAAU;AAC1B,EAAE,uCAAM;AACR,EAAE,WAAM;AACR,EAAE,oBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,iBAYf;AACD,cAAS;AACM,uDAAS,Q;;;;;;;;;;;;AChCxB;AACA;AACA;AAEA;AACA,uCADA;AAEA,sBAFA;AAIA;AACA,0BADA,8BACA,QADA,EACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAPA;AASA,6BATA,mCASA;AACA;AACA;AAXA,GAJA;AAkBA,SAlBA,qBAkBA;AACA;AACA;AACA,GArBA;AAuBA,SAvBA,qBAuBA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA3BA;AA6BA;AACA,iBADA,2BACA;AACA;AACA;AACA;AACA;AACA,KANA;AAQA,kBARA,4BAQA;AACA;AACA;AACA,KAXA;AAaA,6CAbA,uDAaA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AADA;AAGA,KAvBA;AAyBA,2BAzBA,qCAyBA;AAAA;;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AACA;;AACA;AACA,SAHA;AADA;AAMA,KAtCA;AAwCA,8CAxCA,wDAwCA;AACA;AAEA;AACA;AACA,KA7CA;AA+CA,4BA/CA,sCA+CA;AACA;AAEA;AACA;AACA,KApDA;AAsDA,eAtDA,yBAsDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AAEA;AACA,KA7DA;AA+DA,6BA/DA,uCA+DA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AA9EA,GA7BA;AA8GA,QA9GA,oBA8GA;AAAA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AA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e;AACmC;AACL;;;AAGzD;AAC0F;AAC1F,IAAI,oBAAS,GAAG,kBAAU;AAC1B,EAAE,6CAAM;AACR,EAAE,iBAAM;AACR,EAAE,0BAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;;;;ACjCxB;AACA;AACA;AAEe+G,mFAAf;AACA;AACA;AAOO,IAAMC,OAAO,GAAGC,OAAhB,C","file":"vue-treeselect.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Vue\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueTreeselect\"] = factory(require(\"Vue\"));\n\telse\n\t\troot[\"VueTreeselect\"] = factory(root[\"Vue\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__36__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 38);\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/\n\nmodule.exports = function mergeJSXProps (objs) {\n return objs.reduce(function (a, b) {\n var aa, bb, key, nestedKey, temp\n for (key in b) {\n aa = a[key]\n bb = b[key]\n if (aa && nestRE.test(key)) {\n // normalize class\n if (key === 'class') {\n if (typeof aa === 'string') {\n temp = aa\n a[key] = aa = {}\n aa[temp] = true\n }\n if (typeof bb === 'string') {\n temp = bb\n b[key] = bb = {}\n bb[temp] = true\n }\n }\n if (key === 'on' || key === 'nativeOn' || key === 'hook') {\n // merge functions\n for (nestedKey in bb) {\n aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])\n }\n } else if (Array.isArray(aa)) {\n a[key] = aa.concat(bb)\n } else if (Array.isArray(bb)) {\n a[key] = [aa].concat(bb)\n } else {\n for (nestedKey in bb) {\n aa[nestedKey] = bb[nestedKey]\n }\n }\n } else {\n a[key] = b[key]\n }\n }\n return a\n }, {})\n}\n\nfunction mergeFn (a, b) {\n return function () {\n a && a.apply(this, arguments)\n b && b.apply(this, arguments)\n }\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__36__;","// extracted by mini-css-extract-plugin","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","var index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\nexport default index;\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// ========================\r\n// Debugging Helpers\r\n// ========================\r\n\r\nexport { warning } from './warning'\r\n\r\n// ========================\r\n// DOM Utilities\r\n// ========================\r\n\r\nexport { onLeftClick } from './onLeftClick'\r\nexport { scrollIntoView } from './scrollIntoView'\r\nexport { debounce } from './debounce'\r\nexport { watchSize } from './watchSize'\r\nexport { setupResizeAndScrollEventListeners } from './setupResizeAndScrollEventListeners'\r\n\r\n// ========================\r\n// Language Helpers\r\n// ========================\r\n\r\nexport { isNaN } from './isNaN'\r\nexport { isPromise } from './isPromise'\r\nexport { once } from './once'\r\nexport { noop } from './noop'\r\nexport { identity } from './identity'\r\nexport { constant } from './constant'\r\nexport { createMap } from './createMap'\r\nexport { deepExtend } from './deepExtend'\r\nexport { last } from './last'\r\nexport { includes } from './includes'\r\nexport { find } from './find'\r\nexport { removeFromArray } from './removeFromArray'\r\n\r\n// ========================\r\n// Other Utilities\r\n// ========================\r\n\r\nexport { quickDiff } from './quickDiff'\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://VueTreeselect/webpack/universalModuleDefinition","webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://VueTreeselect/./node_modules/lodash/noop.js","webpack://VueTreeselect/./node_modules/lodash/debounce.js","webpack://VueTreeselect/./node_modules/lodash/isObject.js","webpack://VueTreeselect/./node_modules/lodash/now.js","webpack://VueTreeselect/./node_modules/lodash/_root.js","webpack://VueTreeselect/./node_modules/lodash/_freeGlobal.js","webpack://VueTreeselect/(webpack)/buildin/global.js","webpack://VueTreeselect/./node_modules/lodash/toNumber.js","webpack://VueTreeselect/./node_modules/lodash/isSymbol.js","webpack://VueTreeselect/./node_modules/lodash/_baseGetTag.js","webpack://VueTreeselect/./node_modules/lodash/_Symbol.js","webpack://VueTreeselect/./node_modules/lodash/_getRawTag.js","webpack://VueTreeselect/./node_modules/lodash/_objectToString.js","webpack://VueTreeselect/./node_modules/lodash/isObjectLike.js","webpack://VueTreeselect/./node_modules/is-promise/index.js","webpack://VueTreeselect/./node_modules/lodash/once.js","webpack://VueTreeselect/./node_modules/lodash/before.js","webpack://VueTreeselect/./node_modules/lodash/toInteger.js","webpack://VueTreeselect/./node_modules/lodash/toFinite.js","webpack://VueTreeselect/./node_modules/lodash/identity.js","webpack://VueTreeselect/./node_modules/lodash/constant.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/typeof.js","webpack://VueTreeselect/./node_modules/lodash/last.js","webpack://VueTreeselect/./node_modules/fuzzysearch/index.js","webpack://VueTreeselect/./node_modules/babel-helper-vue-jsx-merge-props/index.js","webpack://VueTreeselect/external \"Vue\"","webpack://VueTreeselect/./src/style.less?1f4a","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./node_modules/watch-size/index.es.mjs","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/utils/index.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./src/components/HiddenFields.vue?750c","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue?449d","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/Placeholder.vue?238d","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/SingleValue.vue?5aaa","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?ada5","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue?9a1f","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/MultiValue.vue?6f61","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?525a","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Control.vue?57ab","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/./src/components/Tip.vue?5960","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue?0a09","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue?c349","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue?ca92","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/components/Treeselect.vue?85a0","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["warning","process","noop","checker","complainer","message","concat","console","error","onLeftClick","mouseDownHandler","onMouseDown","evt","type","button","args","call","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","removeFromArray","arr","elem","idx","indexOf","splice","intervalId","registered","INTERVAL_DURATION","run","setInterval","forEach","test","stop","clearInterval","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","unwatch","length","push","watchSize","isIE9","document","documentMode","locked","wrappedListener","implementation","watchSizeForBrowsersOtherThanIE9","removeSizeWatcher","findScrollParents","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","isScrollElment","window","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","addEventListener","passive","scrollParent","removeEventListeners","removeEventListener","$scrollParent","isNaN","x","createMap","Object","create","isPlainObject","value","getPrototypeOf","prototype","copy","obj","key","deepExtend","target","source","keys","i","len","includes","arrOrStr","find","predicate","ctx","undefined","quickDiff","arrA","arrB","NO_PARENT_NODE","UNCHECKED","INDETERMINATE","CHECKED","ALL_CHILDREN","ALL_DESCENDANTS","LEAF_CHILDREN","LEAF_DESCENDANTS","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","ALL","BRANCH_PRIORITY","LEAF_PRIORITY","ALL_WITH_INDETERMINATE","ORDER_SELECTED","LEVEL","INDEX","KEY_CODES","BACKSPACE","ENTER","ESCAPE","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DELETE","INPUT_DEBOUNCE_DELAY","MIN_INPUT_WIDTH","MENU_BUFFER","sortValueByIndex","a","b","level","index","sortValueByLevel","createAsyncOptionsStates","isLoaded","isLoading","loadingError","slugify","str","map","e","o","u","toLowerCase","pattern","replace","RegExp","stringifyOptionPropValue","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","limitTextDefault","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","name","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","acceptableValues","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","hasChanged","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propNames","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","label","enhancedNormalizer","fallbackNode","isFallbackNode","isDisabled","isNew","$set","defaultNode","valueArray","matched","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","isClickedOnValueContainer","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","ref","portal","portalTarget","$menu","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","Treeselect","VERSION","PKG_VERSION"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,qBAAqB,mBAAO,CAAC,CAAkB;;AAE/C,2BAA2B,mBAAO,CAAC,CAAwB;;AAE3D,iCAAiC,mBAAO,CAAC,CAA8B;;AAEvE,sBAAsB,mBAAO,CAAC,CAAmB;;AAEjD;AACA;AACA;;AAEA,gC;;;;;;ACZA;AACA;AACA;;AAEA,iC;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C,+BAA+B;AAC5E;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA,uC;;;;;;AC3BA,uBAAuB,mBAAO,CAAC,CAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6C;;;;;;ACXA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;;AAEA;AACA;;AAEA,mC;;;;;;ACVA;AACA;AACA;;AAEA,kC;;;;;;ACJA,wBAAwB,mBAAO,CAAC,CAAqB;;AAErD,sBAAsB,mBAAO,CAAC,CAAmB;;AAEjD,iCAAiC,mBAAO,CAAC,CAA8B;;AAEvE,wBAAwB,mBAAO,CAAC,CAAqB;;AAErD;AACA;AACA;;AAEA,oC;;;;;;ACZA,uBAAuB,mBAAO,CAAC,CAAoB;;AAEnD;AACA;AACA;;AAEA,oC;;;;;;ACNA;AACA;AACA;;AAEA,kC;;;;;;ACJA;AACA;AACA;;AAEA,oC;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;;AAEA,iC;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AChBA,eAAe,mBAAO,CAAC,EAAY;AACnC,UAAU,mBAAO,CAAC,EAAO;AACzB,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO,YAAY;AAC9B,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,8CAA8C,kBAAkB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9BA,WAAW,mBAAO,CAAC,EAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;ACRA;AACA;;AAEA;;;;;;;;ACHA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACnBA,eAAe,mBAAO,CAAC,EAAY;AACnC,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjEA,iBAAiB,mBAAO,CAAC,EAAe;AACxC,mBAAmB,mBAAO,CAAC,EAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA,aAAa,mBAAO,CAAC,EAAW;AAChC,gBAAgB,mBAAO,CAAC,EAAc;AACtC,qBAAqB,mBAAO,CAAC,EAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3BA,WAAW,mBAAO,CAAC,EAAS;;AAE5B;AACA;;AAEA;;;;;;;ACLA,aAAa,mBAAO,CAAC,EAAW;;AAEhC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA;;AAEA;AACA;AACA;;;;;;;ACJA,aAAa,mBAAO,CAAC,EAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,EAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACvCA,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACnCA,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,EAAE;AACf;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,SAAS;AACtB;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA,WAAW,SAAS,GAAG,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzBA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yB;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACnBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACvBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjDA,iD;;;;;;ACAA,uC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAEO,IAAMA,eAAO,GAAGC,MAAA,GACQC,SADR,GAEnB,SAASF,OAAT,CAAiBG,OAAjB,EAA0BC,UAA1B,EAAsC;AACtC,MAAI,CAACD,OAAO,EAAZ,EAAgB;AAAA;;AACd,QAAME,OAAO,GAAG,CAAE,0BAAF,EAA+BC,MAA/B,CAAsCF,U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c,KAAKoB,cAAvB,EAAuC,KAAKmH,kBAAL;AACxC,GAx2DY;AA02DbuJ,WA12Da,uBA02DD;AAEV,SAAK9G,uBAAL,CAA6B,KAA7B;AACD;AA72DY,CAAf,E;;AC7EA;;AAEA;AACA;AAEA;AAEA;AACA;;AAEA;AACA,uCADA;AAEA,sBAFA;AAGA,kBAHA;AAKA,QALA,kBAKA,CALA,EAKA,OALA,EAKA;AAAA;AAAA,QACA,QADA,GACA,kBADA,CACA,QADA;AAGA;AAEA;AAEA,uEACA,0CADA;AAIA;AAAA,aACA;AAAA;AAAA;AACA;AADA;AAAA;AAAA,mBAEA;AAFA;AAGA;AAHA,QADA;AAAA;AAOA;AAvBA,G;;ACXwN,CAAgB,wHAAG,EAAC,C;;ACA5O;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC5FA,IAAI,mBAAM;AACsD;AACL;;;AAG3D;AAC0F;AAC1F,gBAAgB,kBAAU;AAC1B,EAAE,+CAAM;AACR,EAAE,mBAAM;AACR;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAYf;AACD;AACe,kE;;;;;;;AChCf;AACA;AAEA,oCACA,eADA,EAEA,aAFA,EAGA,cAHA,EAIA,oBAJA,EAKA,kBALA,EAMA,qBANA,EAOA,oBAPA;AAUA;AACA,+BADA;AAEA,sBAFA;AAIA;AAAA;AACA,iCADA;AAEA;AAFA;AAAA,GAJA;AASA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA,uBACA,kBADA,IAEA,iBAHA;AAKA,KATA;AAWA,cAXA,wBAWA;AACA;AACA;AADA;AAGA;AAfA,GATA;AA2BA;AACA,kCADA,sCACA,QADA,EACA;AACA;AACA,KAHA;AAKA,SALA,mBAKA;AAEA;AACA;AARA,GA3BA;AAsCA,SAtCA,qBAsCA;AACA,gDACA,sBADA,EAEA,gCAFA,EAGA;AAAA;AAAA;AAAA,KAHA;AAKA,GA5CA;AA8CA;AACA,SADA,mBACA;AACA;AACA;AAAA;AAAA;AADA;AAGA,KALA;AAOA,SAPA,mBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA;AACA,KAbA;AAeA,QAfA,kBAeA;AACA;AACA,KAjBA;AAmBA,WAnBA,qBAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA;AACA,KAzBA;AA2BA,UA3BA,oBA2BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;;AAIA;AACA;AACA;;AAEA;AACA;AACA,KAvCA;AAyCA,WAzCA,mBAyCA,GAzCA,EAyCA;AAAA,UACA,KADA,GACA,UADA,CACA,KADA;AAGA;;AAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KApDA;AAuDA,aAvDA,qBAuDA,GAvDA,EAuDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAIA;AAEA,oEACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;A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AFA;AADA,GAJA;AAWA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KALA;AAOA,cAPA,wBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAXA,GAXA;AAyBA;AACA,gBADA,0BACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA,sCADA;AAEA,2DAFA;AAGA,qEAHA;AAIA,+DAJA;AAKA,wFALA;AAMA;AANA;AASA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAEA,2BACA,8BACA,qBADA,EADA,EAIA,kBAJA,EAFA,EADA;AAWA,KAvBA;AAyBA,wBAzBA,kCAyBA;AAAA;AACA;AAEA,aACA;AAAA;AAAA,UACA,uBADA,EAEA,0BAFA,EAGA,+BAHA,EAIA,oCAJA,EADA;AAQA,KApCA;AAsCA,eAtCA,yBAsCA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;;AAEA;AACA;AACA;AACA,yDADA;AAEA;AAFA;AADA;AAMA;AACA,8CADA;AAEA;AAFA;AAKA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,YACA,kCACA;AAAA;AAAA,UADA,EADA,EADA;AAOA;;AAKA;AACA,kDACA;AAAA;AAAA,oBADA;AAIA;AACA;;AAEA;AACA,KA5EA;AA8EA,wBA9EA,gCA8EA,QA9EA,EA8EA;AAAA;AACA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KApFA;AAsFA,2BAtFA,mCAsFA,QAtFA,EAsFA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAG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,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,gCADA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAFA,EADA;AAQA,KA3MA;AA6MA,0BA7MA,kCA6MA,GA7MA,EA6MA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAKA;AAEA;AACA,KArNA;AAuNA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA,CAvNA;AA6NA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KARA,CA7NA;AAuOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA;AAvOA,GAzBA;AAuQA,QAvQA,oBAuQA;AAAA;AAAA,QACA,IADA,GACA,IADA,CACA,IADA;AAEA;;AACA;AACA;AADA,8CAEA,WAFA,GAEA,IAFA;;AAIA;AACA;AACA;AADA;AADA;AAMA;AAEA,WACA;AACA,4BADA;AAAA;AAEA,sBAFA;AAGA,qBAHA;AAIA;AAJA;AAAA,QAKA,mBALA,EAMA,iBACA,kCACA,2BADA,EAPA,EADA;AAcA;AApSA;AAwSA,2E;;AChTkN,CAAgB,4GAAG,EAAC,C;;ACAtO,IAAI,aAAM,EAAE,sBAAe;AAC+B;AACL;;;AAGrD;AAC0F;AAC1F,IAAI,gBAAS,GAAG,kBAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,aAAM;AACR,EAAE,sBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,mBAYf;AACD,gBAAS;AACM,sEAAS,Q;;AChCxB;AACA;AACA;AACA;AAEA;AACA,YADA;AAEA,kBAFA;AAGA,cAHA;AAIA;AAJA;AAOA;AACA,8BADA;AAEA,sBAFA;AAIA;AACA,aADA,uBACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA,KAPA;AASA,sBATA,gCASA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA;AAfA,GAJA;AAsBA;AACA,0BADA,8BACA,QADA,EACA;AACA;AAEA;AACA,OAHA,MAGA;AACA;AACA;AACA;AARA,GAtBA;AAiCA,SAjCA,qBAiCA;AACA;AACA;AACA,GApCA;AAsCA,SAtCA,qBAsCA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA1CA;AA4CA,WA5CA,uBA4CA;AACA;AACA,GA9CA;AAgDA;AACA,cADA,wBACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,uBADA,EAEA,iBACA,iCADA,GAEA,8BACA,iCADA,GAEA,4BANA,EAOA,sBAPA,EADA;AAWA,KAjBA;AAmBA,oBAnBA,8BAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,kCACA,oBADA,GAEA,IAFA;AAGA,KA1BA;AA4BA,mBA5BA,6BA4BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,iCACA,mBADA,GAEA,IAFA;AAGA,KAnCA;AAqCA,yBArCA,mCAqCA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAjDA;AAmDA,8BAnDA,wCAmDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA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A,0BADA,8BACA,QADA,EACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAPA;AASA,6BATA,mCASA;AACA;AACA;AAXA,GAJA;AAkBA,SAlBA,qBAkBA;AACA;AACA;AACA,GArBA;AAuBA,SAvBA,qBAuBA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA3BA;AA6BA;AACA,iBADA,2BACA;AACA;AACA;AACA;AACA;AACA,KANA;AAQA,kBARA,4BAQA;AACA;AACA;AACA,KAXA;AAaA,6CAbA,uDAaA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AADA;AAGA,KAvBA;AAyBA,2BAzBA,qCAyBA;AAAA;;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AACA;;AACA;AACA,SAHA;AADA;AAMA,KAtCA;AAwCA,8CAxCA,wDAwCA;AACA;AAEA;AACA;AACA,KA7CA;AA+CA,4BA/CA,sCA+CA;AACA;AAEA;AACA;AACA,KApDA;AAsDA,eAtDA,yBAsDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AAEA;AACA,KA7DA;AA+DA,6BA/DA,uCA+DA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AA9EA,GA7BA;AA8GA,QA9GA,oBA8GA;AAAA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AAAA;AAAA;AAEA,WACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QACA;AAAA;AAAA,MADA,EADA;AAKA,GAxHA;AA0HA,WA1HA,uBA0HA;AACA;AACA;AA5HA;AA+HA;AAEA;AACA,qCADA;AAGA,SAHA,qBAGA;AACA;AACA,GALA;AAOA,SAPA,qBAOA;AACA;AACA,GATA;AAWA,WAXA,uBAWA;AACA;AACA,GAbA;AAeA;A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GAAGC,OAAhB,C","file":"vue-treeselect.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Vue\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueTreeselect\"] = factory(require(\"Vue\"));\n\telse\n\t\troot[\"VueTreeselect\"] = factory(root[\"Vue\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__36__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 38);\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/\n\nmodule.exports = function mergeJSXProps (objs) {\n return objs.reduce(function (a, b) {\n var aa, bb, key, nestedKey, temp\n for (key in b) {\n aa = a[key]\n bb = b[key]\n if (aa && nestRE.test(key)) {\n // normalize class\n if (key === 'class') {\n if (typeof aa === 'string') {\n temp = aa\n a[key] = aa = {}\n aa[temp] = true\n }\n if (typeof bb === 'string') {\n temp = bb\n b[key] = bb = {}\n bb[temp] = true\n }\n }\n if (key === 'on' || key === 'nativeOn' || key === 'hook') {\n // merge functions\n for (nestedKey in bb) {\n aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])\n }\n } else if (Array.isArray(aa)) {\n a[key] = aa.concat(bb)\n } else if (Array.isArray(bb)) {\n a[key] = [aa].concat(bb)\n } else {\n for (nestedKey in bb) {\n aa[nestedKey] = bb[nestedKey]\n }\n }\n } else {\n a[key] = b[key]\n }\n }\n return a\n }, {})\n}\n\nfunction mergeFn (a, b) {\n return function () {\n a && a.apply(this, arguments)\n b && b.apply(this, arguments)\n }\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__36__;","// extracted by mini-css-extract-plugin","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","var index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\nexport default index;\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// ========================\r\n// Debugging Helpers\r\n// ========================\r\n\r\nexport { warning } from './warning'\r\n\r\n// ========================\r\n// DOM Utilities\r\n// ========================\r\n\r\nexport { onLeftClick } from './onLeftClick'\r\nexport { scrollIntoView } from './scrollIntoView'\r\nexport { debounce } from './debounce'\r\nexport { watchSize } from './watchSize'\r\nexport { setupResizeAndScrollEventListeners } from './setupResizeAndScrollEventListeners'\r\n\r\n// ========================\r\n// Language Helpers\r\n// ========================\r\n\r\nexport { isNaN } from './isNaN'\r\nexport { isPromise } from './isPromise'\r\nexport { once } from './once'\r\nexport { noop } from './noop'\r\nexport { identity } from './identity'\r\nexport { constant } from './constant'\r\nexport { createMap } from './createMap'\r\nexport { deepExtend } from './deepExtend'\r\nexport { last } from './last'\r\nexport { includes } from './includes'\r\nexport { find } from './find'\r\nexport { removeFromArray } from './removeFromArray'\r\n\r\n// ========================\r\n// Other Utilities\r\n// ========================\r\n\r\nexport { quickDiff } from './quickDiff'\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.umd.min.js b/dist/vue-treeselect.umd.min.js index a0446679..cacecb8a 100644 --- a/dist/vue-treeselect.umd.min.js +++ b/dist/vue-treeselect.umd.min.js @@ -3,5 +3,5 @@ * Released under the MIT License. * https://vue-treeselect.js.org/ */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Vue")):"function"==typeof define&&define.amd?define(["Vue"],t):"object"==typeof exports?exports.VueTreeselect=t(require("Vue")):e.VueTreeselect=t(e.Vue)}(window,(function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=38)}([function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){var n=/^(attrs|props|on|nativeOn|class|style|hook)$/;function i(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}}e.exports=function(e){return e.reduce((function(e,t){var r,o,s,a,l;for(s in t)if(r=e[s],o=t[s],r&&n.test(s))if("class"===s&&("string"==typeof r&&(l=r,e[s]=r={},r[l]=!0),"string"==typeof o&&(l=o,t[s]=o={},o[l]=!0)),"on"===s||"nativeOn"===s||"hook"===s)for(a in o)r[a]=i(r[a],o[a]);else if(Array.isArray(r))e[s]=r.concat(o);else if(Array.isArray(o))e[s]=[r].concat(o);else for(a in o)r[a]=o[a];else e[s]=t[s];return e}),{})}},function(e,t,n){var i=n(23),r=n(24),o=n(3),s=n(25);e.exports=function(e){return i(e)||r(e)||o(e)||s()}},function(e,t,n){var i=n(4);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=t||n<0||m&&e-p>=u}function O(){var e=r();if(b(e))return _(e);h=setTimeout(O,function(e){var n=t-(e-f);return m?a(n,u-(e-p)):n}(e))}function _(e){return h=void 0,g&&l?y(e):(l=c=void 0,d)}function E(){var e=r(),n=b(e);if(l=arguments,c=this,f=e,n){if(void 0===h)return S(f);if(m)return clearTimeout(h),h=setTimeout(O,t),y(f)}return void 0===h&&(h=setTimeout(O,t)),d}return t=o(t)||0,i(n)&&(v=!!n.leading,u=(m="maxWait"in n)?s(o(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=c=h=void 0},E.flush=function(){return void 0===h?d:_(r())},E}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var i=n(27),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},function(e,t,n){var i=n(7),r=n(29),o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},function(e,t,n){var i=n(8).Symbol;e.exports=i},function(e,t){e.exports=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}},function(e,t,n){var i=n(34);e.exports=function(e){return i(2,e)}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var i=n(20),r=n(21),o=n(3),s=n(22);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||s()}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";e.exports=function(e,t){var n=t.length,i=e.length;if(i>n)return!1;if(i===n)return e===t;e:for(var r=0,o=0;r0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},function(e,t,n){var i=n(36);e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var i=n(9);e.exports=function(e){return e?(e=i(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"Treeselect",(function(){return nt})),n.d(t,"treeselectMixin",(function(){return de})),n.d(t,"LOAD_ROOT_OPTIONS",(function(){return H})),n.d(t,"LOAD_CHILDREN_OPTIONS",(function(){return W})),n.d(t,"ASYNC_SEARCH",(function(){return Q})),n.d(t,"VERSION",(function(){return it}));var i=n(16),r=n.n(i),o=n(2),s=n.n(o),a=n(0),l=n.n(a),c=n(5),u=n.n(c).a;function d(e){return function(t){if("mousedown"===t.type&&0===t.button){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rn.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight):i.top-r0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"==typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){P(e,t)&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue();P(e,this.internalValue)&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(u((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||u((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&u((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"].forEach((function(t){u((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=T(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(null,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return u((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n={id:e,label:this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),ancestors:[],parentNode:null,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};return"id"===this.valueFormat?n:F(this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],(function(n){return n&&t.enhancedNormalizer(n).id===e}))||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||"ALL"===this.valueConsistsOf)n=e;else if("BRANCH_PRIORITY"===this.valueConsistsOf)e.forEach((function(e){n.push(e);var i=t.getNode(e);i.isBranch&&t.traverseDescendantsBFS(i,(function(e){n.push(e.id)}))}));else if("LEAF_PRIORITY"===this.valueConsistsOf)for(var i=T(),r=e.slice();r.length;){var o=r.shift(),s=this.getNode(o);n.push(o),s.isRootNode||(s.parentNode.id in i||(i[s.parentNode.id]=s.parentNode.children.length),0==--i[s.parentNode.id]&&r.push(s.parentNode.id))}else if("ALL_WITH_INDETERMINATE"===this.valueConsistsOf)for(var a=T(),l=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));l.length;){var c=l.shift(),u=this.getNode(c);n.push(c),u.isRootNode||(u.parentNode.id in a||(a[u.parentNode.id]=u.parentNode.children.length),0==--a[u.parentNode.id]&&l.push(u.parentNode.id))}P(this.forest.selectedNodeIds,n)&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var i=oe({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,i)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch)for(var n=e.children.slice();n.length;){var i=n[0];i.isBranch&&n.push.apply(n,s()(i.children)),t(i),n.shift()}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){!function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))}({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:d((function(e){(e.preventDefault(),e.stopPropagation(),this.disabled)||(this.getValueContainer().$el.contains(e.target)&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags())})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},l()(n,"ALL_CHILDREN",0),l()(n,"ALL_DESCENDANTS",0),l()(n,"LEAF_CHILDREN",0),l()(n,"LEAF_DESCENDANTS",0),n)))}));var i=t.trim().toLocaleLowerCase(),r=i.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&r.length>1?t.isMatched=r.every((function(e){return le(!1,!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return le(!e.disableFuzzyMatching,e.replaceAccents,i,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].ALL_DESCENDANTS++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].LEAF_DESCENDANTS++})),null!==t.parentNode&&(e.localSearch.countMap[t.parentNode.id].ALL_CHILDREN+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id].LEAF_CHILDREN+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&null!==t.parentNode&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),i=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return i();this.callLoadOptionsProp({action:Q,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(r){n.isLoaded=!0,n.options=r,e.trigger.searchQuery===t&&i()},fail:function(e){n.loadingError=ce(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=(this.appendToBody?this.$refs.portal.portalTarget:this).$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.menu.current;if(null!=i&&i in this.forest.nodeMap&&(this.forest.nodeMap[i].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var r=function(){var n=t.getMenu(),i=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));i&&h(n,i)};this.getMenu()?r():this.$nextTick(r)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=k()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch)&&(e.showAllChildrenOnSearch=!0):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=T();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=T();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=0})),this.selectedNodes.forEach((function(t){n[t.id]=2,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=1)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return oe({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var i=this,o=t.map((function(e){return[i.enhancedNormalizer(e),e]})).map((function(t,o){var s=r()(t,2),a=s[0],c=s[1];i.checkDuplication(a),i.verifyNodeShape(a);var d=a.id,h=a.label,f=a.children,p=a.isDefaultExpanded,v=null===e,m=v?0:e.level+1,g=Array.isArray(f)||null===f,y=!g,S=!!a.isDisabled||!i.flat&&!v&&e.isDisabled,b=!!a.isNew,O=i.matchKeys.reduce((function(e,t){return oe({},e,l()({},t,(n=a[t],"string"==typeof n?n:"number"!=typeof n||N(n)?"":n+"").toLocaleLowerCase()));var n}),{}),_=v?O.label:e.nestedSearchLabel+" "+O.label,E=i.$set(i.forest.nodeMap,d,T());if(i.$set(E,"id",d),i.$set(E,"label",h),i.$set(E,"level",m),i.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),i.$set(E,"index",(v?[]:e.index).concat(o)),i.$set(E,"parentNode",e),i.$set(E,"lowerCased",O),i.$set(E,"nestedSearchLabel",_),i.$set(E,"isDisabled",S),i.$set(E,"isNew",b),i.$set(E,"isMatched",!1),i.$set(E,"isHighlighted",!1),i.$set(E,"isBranch",g),i.$set(E,"isLeaf",y),i.$set(E,"isRootNode",v),i.$set(E,"raw",c),g){var x,L=Array.isArray(f);i.$set(E,"childrenStates",oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{isLoaded:L})),i.$set(E,"isExpanded","boolean"==typeof p?p:mo+40,c=a>o+40;r.top>=0&&r.top<=s||r.top<0&&r.bottom>0?"auto"!==e.openDirection?e.menu.placement=Qe[e.openDirection]:e.menu.placement=l||!c?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:O(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:E(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},void 0,void 0,!1,null,null,null);Ye.options.__file="src/components/Menu.vue";var qe=Ye.exports,Ke=n(19),Xe=n.n(Ke);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Je,Ge={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){this.instance.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:E(e,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:O(t,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl().getBoundingClientRect();t.style.width=n.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),o="bottom"===e.menu.placement?i.height:0,s=Math.round(i.left-r.left)+"px",a=Math.round(i.top-r.top+o)+"px";this.$refs.menu.$refs["menu-container"].style[F(["transform","webkitTransform","MozTransform","msTransform"],(function(e){return e in document.body.style}))]="translate(".concat(s,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],i={zIndex:t.zIndex};return e("div",{class:n,style:i,attrs:{"data-instance-id":t.getInstanceId()}},[e(qe,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},Ze=fe({name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new Xe.a(function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);n=t||n<0||m&&e-p>=u}function O(){var e=r();if(b(e))return _(e);h=setTimeout(O,function(e){var n=t-(e-f);return m?a(n,u-(e-p)):n}(e))}function _(e){return h=void 0,g&&l?y(e):(l=c=void 0,d)}function E(){var e=r(),n=b(e);if(l=arguments,c=this,f=e,n){if(void 0===h)return S(f);if(m)return clearTimeout(h),h=setTimeout(O,t),y(f)}return void 0===h&&(h=setTimeout(O,t)),d}return t=o(t)||0,i(n)&&(v=!!n.leading,u=(m="maxWait"in n)?s(o(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=c=h=void 0},E.flush=function(){return void 0===h?d:_(r())},E}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var i=n(27),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},function(e,t,n){var i=n(7),r=n(29),o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},function(e,t,n){var i=n(8).Symbol;e.exports=i},function(e,t){e.exports=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}},function(e,t,n){var i=n(34);e.exports=function(e){return i(2,e)}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var i=n(20),r=n(21),o=n(3),s=n(22);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||s()}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";e.exports=function(e,t){var n=t.length,i=e.length;if(i>n)return!1;if(i===n)return e===t;e:for(var r=0,o=0;r0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},function(e,t,n){var i=n(36);e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var i=n(9);e.exports=function(e){return e?(e=i(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"Treeselect",(function(){return nt})),n.d(t,"treeselectMixin",(function(){return de})),n.d(t,"LOAD_ROOT_OPTIONS",(function(){return H})),n.d(t,"LOAD_CHILDREN_OPTIONS",(function(){return W})),n.d(t,"ASYNC_SEARCH",(function(){return Q})),n.d(t,"VERSION",(function(){return it}));var i=n(16),r=n.n(i),o=n(2),s=n.n(o),a=n(0),l=n.n(a),c=n(5),u=n.n(c).a;function d(e){return function(t){if("mousedown"===t.type&&0===t.button){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rn.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight):i.top-r0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"==typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){P(e,t)&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue();P(e,this.internalValue)&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(u((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||u((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&u((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"].forEach((function(t){u((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=T(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(null,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return u((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n={id:e,label:this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),ancestors:[],parentNode:null,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};return"id"===this.valueFormat?n:F(this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],(function(n){return n&&t.enhancedNormalizer(n).id===e}))||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||"ALL"===this.valueConsistsOf)n=e;else if("BRANCH_PRIORITY"===this.valueConsistsOf)e.forEach((function(e){n.push(e);var i=t.getNode(e);i.isBranch&&t.traverseDescendantsBFS(i,(function(e){n.push(e.id)}))}));else if("LEAF_PRIORITY"===this.valueConsistsOf)for(var i=T(),r=e.slice();r.length;){var o=r.shift(),s=this.getNode(o);n.push(o),s.isRootNode||(s.parentNode.id in i||(i[s.parentNode.id]=s.parentNode.children.length),0==--i[s.parentNode.id]&&r.push(s.parentNode.id))}else if("ALL_WITH_INDETERMINATE"===this.valueConsistsOf)for(var a=T(),l=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));l.length;){var c=l.shift(),u=this.getNode(c);n.push(c),u.isRootNode||(u.parentNode.id in a||(a[u.parentNode.id]=u.parentNode.children.length),0==--a[u.parentNode.id]&&l.push(u.parentNode.id))}P(this.forest.selectedNodeIds,n)&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var i=oe({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,i)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch)for(var n=e.children.slice();n.length;){var i=n[0];i.isBranch&&n.push.apply(n,s()(i.children)),t(i),n.shift()}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){!function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))}({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:d((function(e){(e.preventDefault(),e.stopPropagation(),this.disabled)||(this.getValueContainer().$el.contains(e.target)&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags())})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},l()(n,"ALL_CHILDREN",0),l()(n,"ALL_DESCENDANTS",0),l()(n,"LEAF_CHILDREN",0),l()(n,"LEAF_DESCENDANTS",0),n)))}));var i=t.trim().toLocaleLowerCase(),r=i.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&r.length>1?t.isMatched=r.every((function(e){return le(!1,!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return le(!e.disableFuzzyMatching,e.replaceAccents,i,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].ALL_DESCENDANTS++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].LEAF_DESCENDANTS++})),null!==t.parentNode&&(e.localSearch.countMap[t.parentNode.id].ALL_CHILDREN+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id].LEAF_CHILDREN+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&null!==t.parentNode&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),i=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return i();this.callLoadOptionsProp({action:Q,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(r){n.isLoaded=!0,n.options=r,e.trigger.searchQuery===t&&i()},fail:function(e){n.loadingError=ce(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=(this.appendToBody?this.$refs.portal.portalTarget:this).$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.menu.current;if(null!=i&&i in this.forest.nodeMap&&(this.forest.nodeMap[i].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var r=function(){var n=t.getMenu(),i=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));i&&h(n,i)};this.getMenu()?r():this.$nextTick(r)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=k()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch)&&(e.showAllChildrenOnSearch=!0):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=T();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=T();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=0})),this.selectedNodes.forEach((function(t){n[t.id]=2,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=1)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return oe({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var i=this,o=t.map((function(e){return[i.enhancedNormalizer(e),e]})).map((function(t,o){var s=r()(t,2),a=s[0],c=s[1];i.checkDuplication(a),i.verifyNodeShape(a);var d=a.id,h=a.label,f=a.children,p=a.isDefaultExpanded,v=null===e,m=v?0:e.level+1,g=Array.isArray(f)||null===f,y=!g,S=!!a.isDisabled||!i.flat&&!v&&e.isDisabled,b=!!a.isNew,O=i.matchKeys.reduce((function(e,t){return oe({},e,l()({},t,(n=a[t],"string"==typeof n?n:"number"!=typeof n||N(n)?"":n+"").toLocaleLowerCase()));var n}),{}),_=v?O.label:e.nestedSearchLabel+" "+O.label,E=i.$set(i.forest.nodeMap,d,T());if(i.$set(E,"id",d),i.$set(E,"label",h),i.$set(E,"level",m),i.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),i.$set(E,"index",(v?[]:e.index).concat(o)),i.$set(E,"parentNode",e),i.$set(E,"lowerCased",O),i.$set(E,"nestedSearchLabel",_),i.$set(E,"isDisabled",S),i.$set(E,"isNew",b),i.$set(E,"isMatched",!1),i.$set(E,"isHighlighted",!1),i.$set(E,"isBranch",g),i.$set(E,"isLeaf",y),i.$set(E,"isRootNode",v),i.$set(E,"raw",c),g){var x,L=Array.isArray(f);i.$set(E,"childrenStates",oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{isLoaded:L})),i.$set(E,"isExpanded","boolean"==typeof p?p:mo+40,c=a>o+40;r.top>=0&&r.top<=s||r.top<0&&r.bottom>0?"auto"!==e.openDirection?e.menu.placement=Qe[e.openDirection]:e.menu.placement=l||!c?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:O(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:E(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},void 0,void 0,!1,null,null,null);Ye.options.__file="src/components/Menu.vue";var qe=Ye.exports,Ke=n(19),Xe=n.n(Ke);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Je,Ge={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){this.instance.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:E(e,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:O(t,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl().getBoundingClientRect();t.style.width=n.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),o="bottom"===e.menu.placement?i.height:0,s=Math.round(i.left-r.left)+"px",a=Math.round(i.top-r.top+o)+"px";this.$refs.menu.$refs["menu-container"].style[F(["transform","webkitTransform","MozTransform","msTransform"],(function(e){return e in document.body.style}))]="translate(".concat(s,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],i={zIndex:t.zIndex};return e("div",{class:n,style:i,attrs:{"data-instance-id":t.getInstanceId()}},[e(qe,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},Ze=fe({name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new Xe.a(function(e){for(var t=1;t arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__19__;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","var index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\nexport default index;\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","\r\n","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","\r\n","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://VueTreeselect/webpack/universalModuleDefinition","webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://VueTreeselect/./node_modules/babel-helper-vue-jsx-merge-props/index.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://VueTreeselect/./node_modules/lodash/noop.js","webpack://VueTreeselect/./node_modules/lodash/debounce.js","webpack://VueTreeselect/./node_modules/lodash/isObject.js","webpack://VueTreeselect/./node_modules/lodash/_root.js","webpack://VueTreeselect/./node_modules/lodash/toNumber.js","webpack://VueTreeselect/./node_modules/lodash/_Symbol.js","webpack://VueTreeselect/./node_modules/is-promise/index.js","webpack://VueTreeselect/./node_modules/lodash/once.js","webpack://VueTreeselect/./node_modules/lodash/identity.js","webpack://VueTreeselect/./node_modules/lodash/constant.js","webpack://VueTreeselect/./node_modules/lodash/last.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/typeof.js","webpack://VueTreeselect/./node_modules/fuzzysearch/index.js","webpack://VueTreeselect/external \"Vue\"","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://VueTreeselect/./node_modules/lodash/now.js","webpack://VueTreeselect/./node_modules/lodash/_freeGlobal.js","webpack://VueTreeselect/(webpack)/buildin/global.js","webpack://VueTreeselect/./node_modules/lodash/isSymbol.js","webpack://VueTreeselect/./node_modules/lodash/_baseGetTag.js","webpack://VueTreeselect/./node_modules/lodash/_getRawTag.js","webpack://VueTreeselect/./node_modules/lodash/_objectToString.js","webpack://VueTreeselect/./node_modules/lodash/isObjectLike.js","webpack://VueTreeselect/./node_modules/lodash/before.js","webpack://VueTreeselect/./node_modules/lodash/toInteger.js","webpack://VueTreeselect/./node_modules/lodash/toFinite.js","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./node_modules/watch-size/index.es.mjs","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__19__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","obj","configurable","writable","nestRE","mergeFn","a","b","apply","this","arguments","objs","reduce","aa","bb","nestedKey","temp","test","Array","isArray","concat","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","arr","arrayLikeToArray","minLen","toString","slice","constructor","from","len","length","arr2","isObject","now","toNumber","nativeMax","Math","max","nativeMin","min","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","clearTimeout","cancel","flush","type","freeGlobal","freeSelf","self","Function","isSymbol","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","other","valueOf","replace","isBinary","then","before","array","arrayWithHoles","iterableToArrayLimit","nonIterableRest","_typeof","iterator","needle","haystack","tlen","qlen","outer","j","nch","charCodeAt","_arr","_n","_d","_e","_s","_i","next","done","push","err","iter","Date","global","g","e","baseGetTag","isObjectLike","getRawTag","objectToString","symToStringTag","objectProto","nativeObjectToString","isOwn","tag","unmasked","toInteger","toFinite","remainder","warning","noop","onLeftClick","mouseDownHandler","evt","button","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","offsetTop","clientHeight","scrollHeight","top","intervalId","element","listener","expand","document","createElement","shrink","appendChild","expandChild","shrinkChild","lastWidth","lastHeight","style","cssText","width","height","unbind","removeChild","offsetWidth","scrollLeft","scrollWidth","addEventListener","removeEventListener","removeFromArray","elem","idx","indexOf","splice","registered","item","$el","watchSizeForIE9","setInterval","forEach","clearInterval","watchSize","isIE9","documentMode","locked","removeSizeWatcher","watchSizeForBrowsersOtherThanIE9","isScrollElment","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","findScrollParents","passive","scrollParent","$scrollParent","isNaN","x","createMap","isPlainObject","getPrototypeOf","deepExtend","target","source","keys","includes","arrOrStr","find","predicate","ctx","quickDiff","arrA","arrB","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","KEY_CODES","sortValueByIndex","level","index","slugify","str","map","u","pattern","toLowerCase","RegExp","match","enableFuzzyMatch","replaceAccents","fuzzysearch","getErrorMessage","message","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","count","loadingText","loadOptions","matchKeys","maxHeight","multiple","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","openOnClick","openOnFocus","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","isLoaded","isLoading","loadingError","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","sortValueByLevel","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","$emit","getValue","getInstanceId","buildForestState","handler","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","fallbackNode","label","enhancedNormalizer","isFallbackNode","isDisabled","isNew","$set","defaultNode","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","contains","wrapper","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","$menu","portal","portalTarget","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","isPromise","catch","console","error","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","normalizeComponent","scriptExports","render","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","component","__file","inputWidth","_h","$createElement","_c","_self","attrs","xmlns","viewBox","_withStripped","VERSION","Treeselect","PKG_VERSION"],"mappings":";;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,QACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,OAAQJ,GACU,iBAAZC,QACdA,QAAuB,cAAID,EAAQG,QAAQ,QAE3CJ,EAAoB,cAAIC,EAAQD,EAAU,KAR5C,CASGO,QAAQ,SAASC,GACpB,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHX,QAAS,IAUV,OANAY,EAAQH,GAAUI,KAAKZ,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOU,GAAI,EAGJV,EAAOD,QA0Df,OArDAQ,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAAShB,EAASiB,EAAMC,GAC3CV,EAAoBW,EAAEnB,EAASiB,IAClCG,OAAOC,eAAerB,EAASiB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASxB,GACX,oBAAXyB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAerB,EAASyB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAerB,EAAS,aAAc,CAAE2B,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,G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Z,U,QC1BX,GAAY,GCAhB,CACE,KAAF,iBACE,OAAF,KAEE,SAAF,CACI,aADJ,WAEM,MAAN,CACQ,kBAAR,EACQ,yBAAR,YACQ,wBAAR,cACQ,6BAAR,gBACQ,2BAAR,cACQ,0BAAR,uBACQ,4BAAR,cACQ,uBAAR,iBACQ,6BAAR,4BACQ,6BAAR,+BACQ,wCAAR,wBACQ,iCAAR,qBAKE,OAvBF,WAuBI,IAAJ,eACI,OACJ,SAAM,IAAN,UAAM,MAAN,oBACA,MACA,MAAM,IAAN,YACA,wBAAM,IAAN,iBAAM,IAAN,kBDnCI,OAAQ,GAWV,EACA,KACA,KACA,MAkBF,GAAUvgB,QAAQugB,OAAS,gCACZ,U,QEpBFU,I,MATEC,aASQC","file":"vue-treeselect.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Vue\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueTreeselect\"] = factory(require(\"Vue\"));\n\telse\n\t\troot[\"VueTreeselect\"] = factory(root[\"Vue\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__19__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 38);\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/\n\nmodule.exports = function mergeJSXProps (objs) {\n return objs.reduce(function (a, b) {\n var aa, bb, key, nestedKey, temp\n for (key in b) {\n aa = a[key]\n bb = b[key]\n if (aa && nestRE.test(key)) {\n // normalize class\n if (key === 'class') {\n if (typeof aa === 'string') {\n temp = aa\n a[key] = aa = {}\n aa[temp] = true\n }\n if (typeof bb === 'string') {\n temp = bb\n b[key] = bb = {}\n bb[temp] = true\n }\n }\n if (key === 'on' || key === 'nativeOn' || key === 'hook') {\n // merge functions\n for (nestedKey in bb) {\n aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])\n }\n } else if (Array.isArray(aa)) {\n a[key] = aa.concat(bb)\n } else if (Array.isArray(bb)) {\n a[key] = [aa].concat(bb)\n } else {\n for (nestedKey in bb) {\n aa[nestedKey] = bb[nestedKey]\n }\n }\n } else {\n a[key] = b[key]\n }\n }\n return a\n }, {})\n}\n\nfunction mergeFn (a, b) {\n return function () {\n a && a.apply(this, arguments)\n b && b.apply(this, arguments)\n }\n}\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__19__;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","var index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\nexport default index;\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","\r\n","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","\r\n","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/components/Option.vue b/src/components/Option.vue index 8c4da4cb..6ccd6d00 100755 --- a/src/components/Option.vue +++ b/src/components/Option.vue @@ -282,7 +282,7 @@ }, } - const ariaSelected = node.instance.selectedNodes.length ? 'true' : 'false' + const ariaSelected = this.instance.selectedNodes.length ? 'true' : 'false' return (
Date: Mon, 6 Apr 2020 16:02:05 -0500 Subject: [PATCH 2/3] fix: aria2 --- dist/vue-treeselect.cjs.js | 3942 --------------------- dist/vue-treeselect.cjs.js.map | 1 - dist/vue-treeselect.cjs.min.js | 7 - dist/vue-treeselect.cjs.min.js.map | 1 - dist/vue-treeselect.css | 952 ------ dist/vue-treeselect.css.map | 1 - dist/vue-treeselect.min.css | 5 - dist/vue-treeselect.umd.js | 5075 ---------------------------- dist/vue-treeselect.umd.js.map | 1 - dist/vue-treeselect.umd.min.js | 7 - dist/vue-treeselect.umd.min.js.map | 1 - 11 files changed, 9993 deletions(-) delete mode 100644 dist/vue-treeselect.cjs.js delete mode 100644 dist/vue-treeselect.cjs.js.map delete mode 100644 dist/vue-treeselect.cjs.min.js delete mode 100644 dist/vue-treeselect.cjs.min.js.map delete mode 100644 dist/vue-treeselect.css delete mode 100644 dist/vue-treeselect.css.map delete mode 100644 dist/vue-treeselect.min.css delete mode 100644 dist/vue-treeselect.umd.js delete mode 100644 dist/vue-treeselect.umd.js.map delete mode 100644 dist/vue-treeselect.umd.min.js delete mode 100644 dist/vue-treeselect.umd.min.js.map diff --git a/dist/vue-treeselect.cjs.js b/dist/vue-treeselect.cjs.js deleted file mode 100644 index c4183ec4..00000000 --- a/dist/vue-treeselect.cjs.js +++ /dev/null @@ -1,3942 +0,0 @@ -/*! - * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee - * Released under the MIT License. - * https://vue-treeselect.js.org/ - */ -module.exports = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/"; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 16); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -module.exports = require("@babel/runtime/helpers/slicedToArray"); - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = require("@babel/runtime/helpers/toConsumableArray"); - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -module.exports = require("@babel/runtime/helpers/defineProperty"); - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -module.exports = require("lodash/noop"); - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -module.exports = require("lodash/debounce"); - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -module.exports = require("watch-size"); - -/***/ }), -/* 6 */ -/***/ (function(module, exports) { - -module.exports = require("is-promise"); - -/***/ }), -/* 7 */ -/***/ (function(module, exports) { - -module.exports = require("lodash/once"); - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - -module.exports = require("lodash/identity"); - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - -module.exports = require("lodash/constant"); - -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - -module.exports = require("@babel/runtime/helpers/typeof"); - -/***/ }), -/* 11 */ -/***/ (function(module, exports) { - -module.exports = require("lodash/last"); - -/***/ }), -/* 12 */ -/***/ (function(module, exports) { - -module.exports = require("fuzzysearch"); - -/***/ }), -/* 13 */ -/***/ (function(module, exports) { - -module.exports = require("babel-helper-vue-jsx-merge-props"); - -/***/ }), -/* 14 */ -/***/ (function(module, exports) { - -module.exports = require("vue"); - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin - -/***/ }), -/* 16 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); - -// EXPORTS -__webpack_require__.d(__webpack_exports__, "Treeselect", function() { return /* reexport */ Treeselect; }); -__webpack_require__.d(__webpack_exports__, "treeselectMixin", function() { return /* reexport */ treeselectMixin; }); -__webpack_require__.d(__webpack_exports__, "LOAD_ROOT_OPTIONS", function() { return /* reexport */ LOAD_ROOT_OPTIONS; }); -__webpack_require__.d(__webpack_exports__, "LOAD_CHILDREN_OPTIONS", function() { return /* reexport */ LOAD_CHILDREN_OPTIONS; }); -__webpack_require__.d(__webpack_exports__, "ASYNC_SEARCH", function() { return /* reexport */ ASYNC_SEARCH; }); -__webpack_require__.d(__webpack_exports__, "VERSION", function() { return /* binding */ VERSION; }); - -// EXTERNAL MODULE: external "@babel/runtime/helpers/slicedToArray" -var slicedToArray_ = __webpack_require__(0); -var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray_); - -// EXTERNAL MODULE: external "@babel/runtime/helpers/toConsumableArray" -var toConsumableArray_ = __webpack_require__(1); -var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray_); - -// EXTERNAL MODULE: external "@babel/runtime/helpers/defineProperty" -var defineProperty_ = __webpack_require__(2); -var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_); - -// EXTERNAL MODULE: external "lodash/noop" -var noop_ = __webpack_require__(3); -var noop_default = /*#__PURE__*/__webpack_require__.n(noop_); - -// CONCATENATED MODULE: ./src/utils/noop.js - -// CONCATENATED MODULE: ./src/utils/warning.js - - -var warning_warning = process.env.NODE_ENV === 'production' ? noop_default.a : function warning(checker, complainer) { - if (!checker()) { - var _console; - - var message = ['[Vue-Treeselect Warning]'].concat(complainer()); - - (_console = console).error.apply(_console, toConsumableArray_default()(message)); - } -}; -// CONCATENATED MODULE: ./src/utils/onLeftClick.js -function onLeftClick(mouseDownHandler) { - return function onMouseDown(evt) { - if (evt.type === 'mousedown' && evt.button === 0) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - mouseDownHandler.call.apply(mouseDownHandler, [this, evt].concat(args)); - } - }; -} -// CONCATENATED MODULE: ./src/utils/scrollIntoView.js -function scrollIntoView($scrollingEl, $focusedEl) { - var scrollingReact = $scrollingEl.getBoundingClientRect(); - var focusedRect = $focusedEl.getBoundingClientRect(); - var overScroll = $focusedEl.offsetHeight / 3; - - if (focusedRect.bottom + overScroll > scrollingReact.bottom) { - $scrollingEl.scrollTop = Math.min($focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll, $scrollingEl.scrollHeight); - } else if (focusedRect.top - overScroll < scrollingReact.top) { - $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0); - } -} -// EXTERNAL MODULE: external "lodash/debounce" -var debounce_ = __webpack_require__(4); -var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_); - -// CONCATENATED MODULE: ./src/utils/debounce.js - -// EXTERNAL MODULE: external "watch-size" -var external_watch_size_ = __webpack_require__(5); -var external_watch_size_default = /*#__PURE__*/__webpack_require__.n(external_watch_size_); - -// CONCATENATED MODULE: ./src/utils/removeFromArray.js -function removeFromArray(arr, elem) { - var idx = arr.indexOf(elem); - if (idx !== -1) arr.splice(idx, 1); -} -// CONCATENATED MODULE: ./src/utils/watchSize.js - - -var intervalId; -var registered = []; -var INTERVAL_DURATION = 100; - -function run() { - intervalId = setInterval(function () { - registered.forEach(test); - }, INTERVAL_DURATION); -} - -function stop() { - clearInterval(intervalId); - intervalId = null; -} - -function test(item) { - var $el = item.$el, - listener = item.listener, - lastWidth = item.lastWidth, - lastHeight = item.lastHeight; - var width = $el.offsetWidth; - var height = $el.offsetHeight; - - if (lastWidth !== width || lastHeight !== height) { - item.lastWidth = width; - item.lastHeight = height; - listener({ - width: width, - height: height - }); - } -} - -function watchSizeForIE9($el, listener) { - var item = { - $el: $el, - listener: listener, - lastWidth: null, - lastHeight: null - }; - - var unwatch = function unwatch() { - removeFromArray(registered, item); - if (!registered.length) stop(); - }; - - registered.push(item); - test(item); - run(); - return unwatch; -} - -function watchSize($el, listener) { - var isIE9 = document.documentMode === 9; - var locked = true; - - var wrappedListener = function wrappedListener() { - return locked || listener.apply(void 0, arguments); - }; - - var implementation = isIE9 ? watchSizeForIE9 : external_watch_size_default.a; - var removeSizeWatcher = implementation($el, wrappedListener); - locked = false; - return removeSizeWatcher; -} -// CONCATENATED MODULE: ./src/utils/setupResizeAndScrollEventListeners.js -function findScrollParents($el) { - var $scrollParents = []; - var $parent = $el.parentNode; - - while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) { - if (isScrollElment($parent)) $scrollParents.push($parent); - $parent = $parent.parentNode; - } - - $scrollParents.push(window); - return $scrollParents; -} - -function isScrollElment($el) { - var _getComputedStyle = getComputedStyle($el), - overflow = _getComputedStyle.overflow, - overflowX = _getComputedStyle.overflowX, - overflowY = _getComputedStyle.overflowY; - - return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX); -} - -function setupResizeAndScrollEventListeners($el, listener) { - var $scrollParents = findScrollParents($el); - window.addEventListener('resize', listener, { - passive: true - }); - $scrollParents.forEach(function (scrollParent) { - scrollParent.addEventListener('scroll', listener, { - passive: true - }); - }); - return function removeEventListeners() { - window.removeEventListener('resize', listener, { - passive: true - }); - $scrollParents.forEach(function ($scrollParent) { - $scrollParent.removeEventListener('scroll', listener, { - passive: true - }); - }); - }; -} -// CONCATENATED MODULE: ./src/utils/isNaN.js -function isNaN_isNaN(x) { - return x !== x; -} -// EXTERNAL MODULE: external "is-promise" -var external_is_promise_ = __webpack_require__(6); -var external_is_promise_default = /*#__PURE__*/__webpack_require__.n(external_is_promise_); - -// CONCATENATED MODULE: ./src/utils/isPromise.js - -// EXTERNAL MODULE: external "lodash/once" -var once_ = __webpack_require__(7); -var once_default = /*#__PURE__*/__webpack_require__.n(once_); - -// CONCATENATED MODULE: ./src/utils/once.js - -// EXTERNAL MODULE: external "lodash/identity" -var identity_ = __webpack_require__(8); -var identity_default = /*#__PURE__*/__webpack_require__.n(identity_); - -// CONCATENATED MODULE: ./src/utils/identity.js - -// EXTERNAL MODULE: external "lodash/constant" -var constant_ = __webpack_require__(9); -var constant_default = /*#__PURE__*/__webpack_require__.n(constant_); - -// CONCATENATED MODULE: ./src/utils/constant.js - -// CONCATENATED MODULE: ./src/utils/createMap.js -var createMap = function createMap() { - return Object.create(null); -}; -// EXTERNAL MODULE: external "@babel/runtime/helpers/typeof" -var typeof_ = __webpack_require__(10); -var typeof_default = /*#__PURE__*/__webpack_require__.n(typeof_); - -// CONCATENATED MODULE: ./src/utils/deepExtend.js - - -function isPlainObject(value) { - if (value == null || typeof_default()(value) !== 'object') return false; - return Object.getPrototypeOf(value) === Object.prototype; -} - -function copy(obj, key, value) { - if (isPlainObject(value)) { - obj[key] || (obj[key] = {}); - deepExtend(obj[key], value); - } else { - obj[key] = value; - } -} - -function deepExtend(target, source) { - if (isPlainObject(source)) { - var keys = Object.keys(source); - - for (var i = 0, len = keys.length; i < len; i++) { - copy(target, keys[i], source[keys[i]]); - } - } - - return target; -} -// EXTERNAL MODULE: external "lodash/last" -var last_ = __webpack_require__(11); -var last_default = /*#__PURE__*/__webpack_require__.n(last_); - -// CONCATENATED MODULE: ./src/utils/last.js - -// CONCATENATED MODULE: ./src/utils/includes.js -function includes(arrOrStr, elem) { - return arrOrStr.indexOf(elem) !== -1; -} -// CONCATENATED MODULE: ./src/utils/find.js -function find(arr, predicate, ctx) { - for (var i = 0, len = arr.length; i < len; i++) { - if (predicate.call(ctx, arr[i], i, arr)) return arr[i]; - } - - return undefined; -} -// CONCATENATED MODULE: ./src/utils/quickDiff.js -function quickDiff(arrA, arrB) { - if (arrA.length !== arrB.length) return true; - - for (var i = 0; i < arrA.length; i++) { - if (arrA[i] !== arrB[i]) return true; - } - - return false; -} -// CONCATENATED MODULE: ./src/utils/index.js - - - - - - - - - - - - - - - - - - - -// CONCATENATED MODULE: ./src/constants.js -var NO_PARENT_NODE = null; -var UNCHECKED = 0; -var INDETERMINATE = 1; -var CHECKED = 2; -var ALL_CHILDREN = 'ALL_CHILDREN'; -var ALL_DESCENDANTS = 'ALL_DESCENDANTS'; -var LEAF_CHILDREN = 'LEAF_CHILDREN'; -var LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'; -var LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'; -var LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'; -var ASYNC_SEARCH = 'ASYNC_SEARCH'; -var ALL = 'ALL'; -var BRANCH_PRIORITY = 'BRANCH_PRIORITY'; -var LEAF_PRIORITY = 'LEAF_PRIORITY'; -var ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'; -var ORDER_SELECTED = 'ORDER_SELECTED'; -var LEVEL = 'LEVEL'; -var INDEX = 'INDEX'; -var KEY_CODES = { - BACKSPACE: 8, - ENTER: 13, - ESCAPE: 27, - END: 35, - HOME: 36, - ARROW_LEFT: 37, - ARROW_UP: 38, - ARROW_RIGHT: 39, - ARROW_DOWN: 40, - DELETE: 46 -}; -var INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing' ? 10 : 200; -var MIN_INPUT_WIDTH = 5; -var MENU_BUFFER = 40; -// EXTERNAL MODULE: external "fuzzysearch" -var external_fuzzysearch_ = __webpack_require__(12); -var external_fuzzysearch_default = /*#__PURE__*/__webpack_require__.n(external_fuzzysearch_); - -// CONCATENATED MODULE: ./src/mixins/treeselectMixin.js - - - - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - - - - - -function sortValueByIndex(a, b) { - var i = 0; - - do { - if (a.level < i) return -1; - if (b.level < i) return 1; - if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]; - i++; - } while (true); -} - -function sortValueByLevel(a, b) { - return a.level === b.level ? sortValueByIndex(a, b) : a.level - b.level; -} - -function createAsyncOptionsStates() { - return { - isLoaded: false, - isLoading: false, - loadingError: '' - }; -} - -function slugify(str) { - var map = { - a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä', - e: 'é|è|ê|ë|E|É|È|Ê|Ë', - i: 'í|ì|î|ï|I|Í|Ì|Î|Ï', - o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö', - u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü' - }; - str = str.toLowerCase(); - - for (var pattern in map) { - str = str.replace(new RegExp(map[pattern], 'g'), pattern); - } - - return str; -} - -function stringifyOptionPropValue(value) { - if (typeof value === 'string') return value; - if (typeof value === 'number' && !isNaN_isNaN(value)) return value + ''; - return ''; -} - -function match(enableFuzzyMatch, replaceAccents, needle, haystack) { - return enableFuzzyMatch ? external_fuzzysearch_default()(needle, haystack) : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle); -} - -function getErrorMessage(err) { - return err.message || String(err); -} - -var instanceId = 0; -/* harmony default export */ var treeselectMixin = ({ - provide: function provide() { - return { - instance: this - }; - }, - props: { - allowClearingDisabled: { - type: Boolean, - default: false - }, - allowSelectingDisabledDescendants: { - type: Boolean, - default: false - }, - alwaysOpen: { - type: Boolean, - default: false - }, - appendToBody: { - type: Boolean, - default: false - }, - async: { - type: Boolean, - default: false - }, - autoFocus: { - type: Boolean, - default: false - }, - autoLoadRootOptions: { - type: Boolean, - default: true - }, - autoDeselectAncestors: { - type: Boolean, - default: false - }, - autoDeselectDescendants: { - type: Boolean, - default: false - }, - autoSelectAncestors: { - type: Boolean, - default: false - }, - autoSelectDescendants: { - type: Boolean, - default: false - }, - backspaceRemoves: { - type: Boolean, - default: true - }, - beforeClearAll: { - type: Function, - default: constant_default()(true) - }, - branchNodesFirst: { - type: Boolean, - default: false - }, - cacheOptions: { - type: Boolean, - default: true - }, - clearable: { - type: Boolean, - default: true - }, - clearAllText: { - type: String, - default: 'Clear all' - }, - clearOnSelect: { - type: Boolean, - default: false - }, - clearValueText: { - type: String, - default: 'Clear value' - }, - closeOnSelect: { - type: Boolean, - default: true - }, - defaultExpandLevel: { - type: Number, - default: 0 - }, - defaultOptions: { - default: false - }, - deleteRemoves: { - type: Boolean, - default: true - }, - delimiter: { - type: String, - default: ',' - }, - flattenSearchResults: { - type: Boolean, - default: false - }, - disableBranchNodes: { - type: Boolean, - default: false - }, - disabled: { - type: Boolean, - default: false - }, - disableFuzzyMatching: { - type: Boolean, - default: false - }, - flat: { - type: Boolean, - default: false - }, - instanceId: { - default: function _default() { - return "".concat(instanceId++, "$$"); - }, - type: [String, Number] - }, - joinValues: { - type: Boolean, - default: false - }, - limit: { - type: Number, - default: Infinity - }, - limitText: { - type: Function, - default: function limitTextDefault(count) { - return "and ".concat(count, " more"); - } - }, - loadingText: { - type: String, - default: 'Loading...' - }, - loadOptions: { - type: Function - }, - matchKeys: { - type: Array, - default: constant_default()(['label']) - }, - maxHeight: { - type: Number, - default: 300 - }, - multiple: { - type: Boolean, - default: false - }, - name: { - type: String - }, - noChildrenText: { - type: String, - default: 'No sub-options.' - }, - noOptionsText: { - type: String, - default: 'No options available.' - }, - noResultsText: { - type: String, - default: 'No results found...' - }, - normalizer: { - type: Function, - default: identity_default.a - }, - openDirection: { - type: String, - default: 'auto', - validator: function validator(value) { - var acceptableValues = ['auto', 'top', 'bottom', 'above', 'below']; - return includes(acceptableValues, value); - } - }, - openOnClick: { - type: Boolean, - default: true - }, - openOnFocus: { - type: Boolean, - default: false - }, - options: { - type: Array - }, - placeholder: { - type: String, - default: 'Select...' - }, - required: { - type: Boolean, - default: false - }, - retryText: { - type: String, - default: 'Retry?' - }, - retryTitle: { - type: String, - default: 'Click to retry' - }, - searchable: { - type: Boolean, - default: true - }, - searchNested: { - type: Boolean, - default: false - }, - searchPromptText: { - type: String, - default: 'Type to search...' - }, - showCount: { - type: Boolean, - default: false - }, - showCountOf: { - type: String, - default: ALL_CHILDREN, - validator: function validator(value) { - var acceptableValues = [ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS]; - return includes(acceptableValues, value); - } - }, - showCountOnSearch: null, - sortValueBy: { - type: String, - default: ORDER_SELECTED, - validator: function validator(value) { - var acceptableValues = [ORDER_SELECTED, LEVEL, INDEX]; - return includes(acceptableValues, value); - } - }, - tabIndex: { - type: Number, - default: 0 - }, - value: null, - valueConsistsOf: { - type: String, - default: BRANCH_PRIORITY, - validator: function validator(value) { - var acceptableValues = [ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE]; - return includes(acceptableValues, value); - } - }, - valueFormat: { - type: String, - default: 'id' - }, - zIndex: { - type: [Number, String], - default: 999 - }, - inputDebounceDelay: { - type: Number, - default: INPUT_DEBOUNCE_DELAY - }, - replaceAccents: { - type: Boolean, - default: false - } - }, - data: function data() { - return { - trigger: { - isFocused: false, - searchQuery: '' - }, - menu: { - isOpen: false, - current: null, - lastScrollPosition: 0, - placement: 'bottom' - }, - forest: { - normalizedOptions: [], - nodeMap: createMap(), - checkedStateMap: createMap(), - selectedNodeIds: this.extractCheckedNodeIdsFromValue(), - selectedNodeMap: createMap() - }, - rootOptionsStates: createAsyncOptionsStates(), - localSearch: { - active: false, - noResults: true, - countMap: createMap() - }, - remoteSearch: createMap() - }; - }, - computed: { - selectedNodes: function selectedNodes() { - return this.forest.selectedNodeIds.map(this.getNode); - }, - internalValue: function internalValue() { - var _this = this; - - var internalValue; - - if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) { - internalValue = this.forest.selectedNodeIds.slice(); - } else if (this.valueConsistsOf === BRANCH_PRIORITY) { - internalValue = this.forest.selectedNodeIds.filter(function (id) { - var node = _this.getNode(id); - - if (node.isRootNode) return true; - return !_this.isSelected(node.parentNode); - }); - } else if (this.valueConsistsOf === LEAF_PRIORITY) { - internalValue = this.forest.selectedNodeIds.filter(function (id) { - var node = _this.getNode(id); - - if (node.isLeaf) return true; - return node.children.length === 0; - }); - } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) { - var _internalValue; - - var indeterminateNodeIds = []; - internalValue = this.forest.selectedNodeIds.slice(); - this.selectedNodes.forEach(function (selectedNode) { - selectedNode.ancestors.forEach(function (ancestor) { - if (includes(indeterminateNodeIds, ancestor.id)) return; - if (includes(internalValue, ancestor.id)) return; - indeterminateNodeIds.push(ancestor.id); - }); - }); - - (_internalValue = internalValue).push.apply(_internalValue, indeterminateNodeIds); - } - - if (this.sortValueBy === LEVEL) { - internalValue.sort(function (a, b) { - return sortValueByLevel(_this.getNode(a), _this.getNode(b)); - }); - } else if (this.sortValueBy === INDEX) { - internalValue.sort(function (a, b) { - return sortValueByIndex(_this.getNode(a), _this.getNode(b)); - }); - } - - return internalValue; - }, - hasValue: function hasValue() { - return this.internalValue.length > 0; - }, - single: function single() { - return !this.multiple; - }, - visibleOptionIds: function visibleOptionIds() { - var _this2 = this; - - var visibleOptionIds = []; - this.traverseAllNodesByIndex(function (node) { - if (!_this2.localSearch.active || _this2.shouldOptionBeIncludedInSearchResult(node)) { - visibleOptionIds.push(node.id); - } - - if (node.isBranch && !_this2.shouldExpand(node)) { - return false; - } - }); - return visibleOptionIds; - }, - hasVisibleOptions: function hasVisibleOptions() { - return this.visibleOptionIds.length !== 0; - }, - showCountOnSearchComputed: function showCountOnSearchComputed() { - return typeof this.showCountOnSearch === 'boolean' ? this.showCountOnSearch : this.showCount; - }, - hasBranchNodes: function hasBranchNodes() { - return this.forest.normalizedOptions.some(function (rootNode) { - return rootNode.isBranch; - }); - }, - shouldFlattenOptions: function shouldFlattenOptions() { - return this.localSearch.active && this.flattenSearchResults; - } - }, - watch: { - alwaysOpen: function alwaysOpen(newValue) { - if (newValue) this.openMenu();else this.closeMenu(); - }, - branchNodesFirst: function branchNodesFirst() { - this.initialize(); - }, - disabled: function disabled(newValue) { - if (newValue && this.menu.isOpen) this.closeMenu();else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu(); - }, - flat: function flat() { - this.initialize(); - }, - internalValue: function internalValue(newValue, oldValue) { - var hasChanged = quickDiff(newValue, oldValue); - if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId()); - }, - matchKeys: function matchKeys() { - this.initialize(); - }, - multiple: function multiple(newValue) { - if (newValue) this.buildForestState(); - }, - options: { - handler: function handler() { - if (this.async) return; - this.initialize(); - this.rootOptionsStates.isLoaded = Array.isArray(this.options); - }, - deep: true, - immediate: true - }, - 'trigger.searchQuery': function triggerSearchQuery() { - if (this.async) { - this.handleRemoteSearch(); - } else { - this.handleLocalSearch(); - } - - this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId()); - }, - value: function value() { - var nodeIdsFromValue = this.extractCheckedNodeIdsFromValue(); - var hasChanged = quickDiff(nodeIdsFromValue, this.internalValue); - if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue); - } - }, - methods: { - verifyProps: function verifyProps() { - var _this3 = this; - - warning_warning(function () { - return _this3.async ? _this3.searchable : true; - }, function () { - return 'For async search mode, the value of "searchable" prop must be true.'; - }); - - if (this.options == null && !this.loadOptions) { - warning_warning(function () { - return false; - }, function () { - return 'Are you meant to dynamically load options? You need to use "loadOptions" prop.'; - }); - } - - if (this.flat) { - warning_warning(function () { - return _this3.multiple; - }, function () { - return 'You are using flat mode. But you forgot to add "multiple=true"?'; - }); - } - - if (!this.flat) { - var propNames = ['autoSelectAncestors', 'autoSelectDescendants', 'autoDeselectAncestors', 'autoDeselectDescendants']; - propNames.forEach(function (propName) { - warning_warning(function () { - return !_this3[propName]; - }, function () { - return "\"".concat(propName, "\" only applies to flat mode."); - }); - }); - } - }, - resetFlags: function resetFlags() { - this._blurOnSelect = false; - }, - initialize: function initialize() { - var options = this.async ? this.getRemoteSearchEntry().options : this.options; - - if (Array.isArray(options)) { - var prevNodeMap = this.forest.nodeMap; - this.forest.nodeMap = createMap(); - this.keepDataOfSelectedNodes(prevNodeMap); - this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap); - this.fixSelectedNodeIds(this.internalValue); - } else { - this.forest.normalizedOptions = []; - } - }, - getInstanceId: function getInstanceId() { - return this.instanceId == null ? this.id : this.instanceId; - }, - getValue: function getValue() { - var _this4 = this; - - if (this.valueFormat === 'id') { - return this.multiple ? this.internalValue.slice() : this.internalValue[0]; - } - - var rawNodes = this.internalValue.map(function (id) { - return _this4.getNode(id).raw; - }); - return this.multiple ? rawNodes : rawNodes[0]; - }, - getNode: function getNode(nodeId) { - warning_warning(function () { - return nodeId != null; - }, function () { - return "Invalid node id: ".concat(nodeId); - }); - if (nodeId == null) return null; - return nodeId in this.forest.nodeMap ? this.forest.nodeMap[nodeId] : this.createFallbackNode(nodeId); - }, - createFallbackNode: function createFallbackNode(id) { - var raw = this.extractNodeFromValue(id); - var label = this.enhancedNormalizer(raw).label || "".concat(id, " (unknown)"); - var fallbackNode = { - id: id, - label: label, - ancestors: [], - parentNode: NO_PARENT_NODE, - isFallbackNode: true, - isRootNode: true, - isLeaf: true, - isBranch: false, - isDisabled: false, - isNew: false, - index: [-1], - level: 0, - raw: raw - }; - return this.$set(this.forest.nodeMap, id, fallbackNode); - }, - extractCheckedNodeIdsFromValue: function extractCheckedNodeIdsFromValue() { - var _this5 = this; - - if (this.value == null) return []; - - if (this.valueFormat === 'id') { - return this.multiple ? this.value.slice() : [this.value]; - } - - return (this.multiple ? this.value : [this.value]).map(function (node) { - return _this5.enhancedNormalizer(node); - }).map(function (node) { - return node.id; - }); - }, - extractNodeFromValue: function extractNodeFromValue(id) { - var _this6 = this; - - var defaultNode = { - id: id - }; - - if (this.valueFormat === 'id') { - return defaultNode; - } - - var valueArray = this.multiple ? Array.isArray(this.value) ? this.value : [] : this.value ? [this.value] : []; - var matched = find(valueArray, function (node) { - return node && _this6.enhancedNormalizer(node).id === id; - }); - return matched || defaultNode; - }, - fixSelectedNodeIds: function fixSelectedNodeIds(nodeIdListOfPrevValue) { - var _this7 = this; - - var nextSelectedNodeIds = []; - - if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) { - nextSelectedNodeIds = nodeIdListOfPrevValue; - } else if (this.valueConsistsOf === BRANCH_PRIORITY) { - nodeIdListOfPrevValue.forEach(function (nodeId) { - nextSelectedNodeIds.push(nodeId); - - var node = _this7.getNode(nodeId); - - if (node.isBranch) _this7.traverseDescendantsBFS(node, function (descendant) { - nextSelectedNodeIds.push(descendant.id); - }); - }); - } else if (this.valueConsistsOf === LEAF_PRIORITY) { - var map = createMap(); - var queue = nodeIdListOfPrevValue.slice(); - - while (queue.length) { - var nodeId = queue.shift(); - var node = this.getNode(nodeId); - nextSelectedNodeIds.push(nodeId); - if (node.isRootNode) continue; - if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length; - if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id); - } - } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) { - var _map = createMap(); - - var _queue = nodeIdListOfPrevValue.filter(function (nodeId) { - var node = _this7.getNode(nodeId); - - return node.isLeaf || node.children.length === 0; - }); - - while (_queue.length) { - var _nodeId = _queue.shift(); - - var _node = this.getNode(_nodeId); - - nextSelectedNodeIds.push(_nodeId); - if (_node.isRootNode) continue; - if (!(_node.parentNode.id in _map)) _map[_node.parentNode.id] = _node.parentNode.children.length; - if (--_map[_node.parentNode.id] === 0) _queue.push(_node.parentNode.id); - } - } - - var hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds); - if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds; - this.buildForestState(); - }, - keepDataOfSelectedNodes: function keepDataOfSelectedNodes(prevNodeMap) { - var _this8 = this; - - this.forest.selectedNodeIds.forEach(function (id) { - if (!prevNodeMap[id]) return; - - var node = _objectSpread({}, prevNodeMap[id], { - isFallbackNode: true - }); - - _this8.$set(_this8.forest.nodeMap, id, node); - }); - }, - isSelected: function isSelected(node) { - return this.forest.selectedNodeMap[node.id] === true; - }, - traverseDescendantsBFS: function traverseDescendantsBFS(parentNode, callback) { - if (!parentNode.isBranch) return; - var queue = parentNode.children.slice(); - - while (queue.length) { - var currNode = queue[0]; - if (currNode.isBranch) queue.push.apply(queue, toConsumableArray_default()(currNode.children)); - callback(currNode); - queue.shift(); - } - }, - traverseDescendantsDFS: function traverseDescendantsDFS(parentNode, callback) { - var _this9 = this; - - if (!parentNode.isBranch) return; - parentNode.children.forEach(function (child) { - _this9.traverseDescendantsDFS(child, callback); - - callback(child); - }); - }, - traverseAllNodesDFS: function traverseAllNodesDFS(callback) { - var _this10 = this; - - this.forest.normalizedOptions.forEach(function (rootNode) { - _this10.traverseDescendantsDFS(rootNode, callback); - - callback(rootNode); - }); - }, - traverseAllNodesByIndex: function traverseAllNodesByIndex(callback) { - var walk = function walk(parentNode) { - parentNode.children.forEach(function (child) { - if (callback(child) !== false && child.isBranch) { - walk(child); - } - }); - }; - - walk({ - children: this.forest.normalizedOptions - }); - }, - toggleClickOutsideEvent: function toggleClickOutsideEvent(enabled) { - if (enabled) { - document.addEventListener('mousedown', this.handleClickOutside, false); - } else { - document.removeEventListener('mousedown', this.handleClickOutside, false); - } - }, - getValueContainer: function getValueContainer() { - return this.$refs.control.$refs['value-container']; - }, - getInput: function getInput() { - return this.getValueContainer().$refs.input; - }, - focusInput: function focusInput() { - this.getInput().focus(); - }, - blurInput: function blurInput() { - this.getInput().blur(); - }, - handleMouseDown: onLeftClick(function handleMouseDown(evt) { - evt.preventDefault(); - evt.stopPropagation(); - if (this.disabled) return; - var isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target); - - if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) { - this.openMenu(); - } - - if (this._blurOnSelect) { - this.blurInput(); - } else { - this.focusInput(); - } - - this.resetFlags(); - }), - handleClickOutside: function handleClickOutside(evt) { - if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) { - this.blurInput(); - this.closeMenu(); - } - }, - handleLocalSearch: function handleLocalSearch() { - var _this11 = this; - - var searchQuery = this.trigger.searchQuery; - - var done = function done() { - return _this11.resetHighlightedOptionWhenNecessary(true); - }; - - if (!searchQuery) { - this.localSearch.active = false; - return done(); - } - - this.localSearch.active = true; - this.localSearch.noResults = true; - this.traverseAllNodesDFS(function (node) { - if (node.isBranch) { - var _this11$$set; - - node.isExpandedOnSearch = false; - node.showAllChildrenOnSearch = false; - node.isMatched = false; - node.hasMatchedDescendants = false; - - _this11.$set(_this11.localSearch.countMap, node.id, (_this11$$set = {}, defineProperty_default()(_this11$$set, ALL_CHILDREN, 0), defineProperty_default()(_this11$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this11$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this11$$set, LEAF_DESCENDANTS, 0), _this11$$set)); - } - }); - var lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase(); - var splitSearchQuery = lowerCasedSearchQuery.replace(/\s+/g, ' ').split(' '); - this.traverseAllNodesDFS(function (node) { - if (_this11.searchNested && splitSearchQuery.length > 1) { - node.isMatched = splitSearchQuery.every(function (filterValue) { - return match(false, false, filterValue, node.nestedSearchLabel); - }); - } else { - node.isMatched = _this11.matchKeys.some(function (matchKey) { - return match(!_this11.disableFuzzyMatching, _this11.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]); - }); - } - - if (node.isMatched) { - _this11.localSearch.noResults = false; - node.ancestors.forEach(function (ancestor) { - return _this11.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++; - }); - if (node.isLeaf) node.ancestors.forEach(function (ancestor) { - return _this11.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++; - }); - - if (node.parentNode !== NO_PARENT_NODE) { - _this11.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1; - if (node.isLeaf) _this11.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1; - } - } - - if ((node.isMatched || node.isBranch && node.isExpandedOnSearch) && node.parentNode !== NO_PARENT_NODE) { - node.parentNode.isExpandedOnSearch = true; - node.parentNode.hasMatchedDescendants = true; - } - }); - done(); - }, - handleRemoteSearch: function handleRemoteSearch() { - var _this12 = this; - - var searchQuery = this.trigger.searchQuery; - var entry = this.getRemoteSearchEntry(); - - var done = function done() { - _this12.initialize(); - - _this12.resetHighlightedOptionWhenNecessary(true); - }; - - if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) { - return done(); - } - - this.callLoadOptionsProp({ - action: ASYNC_SEARCH, - args: { - searchQuery: searchQuery - }, - isPending: function isPending() { - return entry.isLoading; - }, - start: function start() { - entry.isLoading = true; - entry.isLoaded = false; - entry.loadingError = ''; - }, - succeed: function succeed(options) { - entry.isLoaded = true; - entry.options = options; - if (_this12.trigger.searchQuery === searchQuery) done(); - }, - fail: function fail(err) { - entry.loadingError = getErrorMessage(err); - }, - end: function end() { - entry.isLoading = false; - } - }); - }, - getRemoteSearchEntry: function getRemoteSearchEntry() { - var _this13 = this; - - var searchQuery = this.trigger.searchQuery; - - var entry = this.remoteSearch[searchQuery] || _objectSpread({}, createAsyncOptionsStates(), { - options: [] - }); - - this.$watch(function () { - return entry.options; - }, function () { - if (_this13.trigger.searchQuery === searchQuery) _this13.initialize(); - }, { - deep: true - }); - - if (searchQuery === '') { - if (Array.isArray(this.defaultOptions)) { - entry.options = this.defaultOptions; - entry.isLoaded = true; - return entry; - } else if (this.defaultOptions !== true) { - entry.isLoaded = true; - return entry; - } - } - - if (!this.remoteSearch[searchQuery]) { - this.$set(this.remoteSearch, searchQuery, entry); - } - - return entry; - }, - shouldExpand: function shouldExpand(node) { - return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded; - }, - shouldOptionBeIncludedInSearchResult: function shouldOptionBeIncludedInSearchResult(node) { - if (node.isMatched) return true; - if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true; - if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true; - return false; - }, - shouldShowOptionInMenu: function shouldShowOptionInMenu(node) { - if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) { - return false; - } - - return true; - }, - getControl: function getControl() { - return this.$refs.control.$el; - }, - getMenu: function getMenu() { - var ref = this.appendToBody ? this.$refs.portal.portalTarget : this; - var $menu = ref.$refs.menu.$refs.menu; - return $menu && $menu.nodeName !== '#comment' ? $menu : null; - }, - setCurrentHighlightedOption: function setCurrentHighlightedOption(node) { - var _this14 = this; - - var scroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var prev = this.menu.current; - - if (prev != null && prev in this.forest.nodeMap) { - this.forest.nodeMap[prev].isHighlighted = false; - } - - this.menu.current = node.id; - node.isHighlighted = true; - - if (this.menu.isOpen && scroll) { - var scrollToOption = function scrollToOption() { - var $menu = _this14.getMenu(); - - var $option = $menu.querySelector(".vue-treeselect__option[data-id=\"".concat(node.id, "\"]")); - if ($option) scrollIntoView($menu, $option); - }; - - if (this.getMenu()) { - scrollToOption(); - } else { - this.$nextTick(scrollToOption); - } - } - }, - resetHighlightedOptionWhenNecessary: function resetHighlightedOptionWhenNecessary() { - var forceReset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var current = this.menu.current; - - if (forceReset || current == null || !(current in this.forest.nodeMap) || !this.shouldShowOptionInMenu(this.getNode(current))) { - this.highlightFirstOption(); - } - }, - highlightFirstOption: function highlightFirstOption() { - if (!this.hasVisibleOptions) return; - var first = this.visibleOptionIds[0]; - this.setCurrentHighlightedOption(this.getNode(first)); - }, - highlightPrevOption: function highlightPrevOption() { - if (!this.hasVisibleOptions) return; - var prev = this.visibleOptionIds.indexOf(this.menu.current) - 1; - if (prev === -1) return this.highlightLastOption(); - this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev])); - }, - highlightNextOption: function highlightNextOption() { - if (!this.hasVisibleOptions) return; - var next = this.visibleOptionIds.indexOf(this.menu.current) + 1; - if (next === this.visibleOptionIds.length) return this.highlightFirstOption(); - this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next])); - }, - highlightLastOption: function highlightLastOption() { - if (!this.hasVisibleOptions) return; - var last = last_default()(this.visibleOptionIds); - this.setCurrentHighlightedOption(this.getNode(last)); - }, - resetSearchQuery: function resetSearchQuery() { - this.trigger.searchQuery = ''; - }, - closeMenu: function closeMenu() { - if (!this.menu.isOpen || !this.disabled && this.alwaysOpen) return; - this.saveMenuScrollPosition(); - this.menu.isOpen = false; - this.toggleClickOutsideEvent(false); - this.resetSearchQuery(); - this.$emit('close', this.getValue(), this.getInstanceId()); - }, - openMenu: function openMenu() { - if (this.disabled || this.menu.isOpen) return; - this.menu.isOpen = true; - this.$nextTick(this.resetHighlightedOptionWhenNecessary); - this.$nextTick(this.restoreMenuScrollPosition); - if (!this.options && !this.async) this.loadRootOptions(); - this.toggleClickOutsideEvent(true); - this.$emit('open', this.getInstanceId()); - }, - toggleMenu: function toggleMenu() { - if (this.menu.isOpen) { - this.closeMenu(); - } else { - this.openMenu(); - } - }, - toggleExpanded: function toggleExpanded(node) { - var nextState; - - if (this.localSearch.active) { - nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch; - if (nextState) node.showAllChildrenOnSearch = true; - } else { - nextState = node.isExpanded = !node.isExpanded; - } - - if (nextState && !node.childrenStates.isLoaded) { - this.loadChildrenOptions(node); - } - }, - buildForestState: function buildForestState() { - var _this15 = this; - - var selectedNodeMap = createMap(); - this.forest.selectedNodeIds.forEach(function (selectedNodeId) { - selectedNodeMap[selectedNodeId] = true; - }); - this.forest.selectedNodeMap = selectedNodeMap; - var checkedStateMap = createMap(); - - if (this.multiple) { - this.traverseAllNodesByIndex(function (node) { - checkedStateMap[node.id] = UNCHECKED; - }); - this.selectedNodes.forEach(function (selectedNode) { - checkedStateMap[selectedNode.id] = CHECKED; - - if (!_this15.flat && !_this15.disableBranchNodes) { - selectedNode.ancestors.forEach(function (ancestorNode) { - if (!_this15.isSelected(ancestorNode)) { - checkedStateMap[ancestorNode.id] = INDETERMINATE; - } - }); - } - }); - } - - this.forest.checkedStateMap = checkedStateMap; - }, - enhancedNormalizer: function enhancedNormalizer(raw) { - return _objectSpread({}, raw, {}, this.normalizer(raw, this.getInstanceId())); - }, - normalize: function normalize(parentNode, nodes, prevNodeMap) { - var _this16 = this; - - var normalizedOptions = nodes.map(function (node) { - return [_this16.enhancedNormalizer(node), node]; - }).map(function (_ref, index) { - var _ref2 = slicedToArray_default()(_ref, 2), - node = _ref2[0], - raw = _ref2[1]; - - _this16.checkDuplication(node); - - _this16.verifyNodeShape(node); - - var id = node.id, - label = node.label, - children = node.children, - isDefaultExpanded = node.isDefaultExpanded; - var isRootNode = parentNode === NO_PARENT_NODE; - var level = isRootNode ? 0 : parentNode.level + 1; - var isBranch = Array.isArray(children) || children === null; - var isLeaf = !isBranch; - var isDisabled = !!node.isDisabled || !_this16.flat && !isRootNode && parentNode.isDisabled; - var isNew = !!node.isNew; - - var lowerCased = _this16.matchKeys.reduce(function (prev, key) { - return _objectSpread({}, prev, defineProperty_default()({}, key, stringifyOptionPropValue(node[key]).toLocaleLowerCase())); - }, {}); - - var nestedSearchLabel = isRootNode ? lowerCased.label : parentNode.nestedSearchLabel + ' ' + lowerCased.label; - - var normalized = _this16.$set(_this16.forest.nodeMap, id, createMap()); - - _this16.$set(normalized, 'id', id); - - _this16.$set(normalized, 'label', label); - - _this16.$set(normalized, 'level', level); - - _this16.$set(normalized, 'ancestors', isRootNode ? [] : [parentNode].concat(parentNode.ancestors)); - - _this16.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index)); - - _this16.$set(normalized, 'parentNode', parentNode); - - _this16.$set(normalized, 'lowerCased', lowerCased); - - _this16.$set(normalized, 'nestedSearchLabel', nestedSearchLabel); - - _this16.$set(normalized, 'isDisabled', isDisabled); - - _this16.$set(normalized, 'isNew', isNew); - - _this16.$set(normalized, 'isMatched', false); - - _this16.$set(normalized, 'isHighlighted', false); - - _this16.$set(normalized, 'isBranch', isBranch); - - _this16.$set(normalized, 'isLeaf', isLeaf); - - _this16.$set(normalized, 'isRootNode', isRootNode); - - _this16.$set(normalized, 'raw', raw); - - if (isBranch) { - var _this16$$set; - - var isLoaded = Array.isArray(children); - - _this16.$set(normalized, 'childrenStates', _objectSpread({}, createAsyncOptionsStates(), { - isLoaded: isLoaded - })); - - _this16.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean' ? isDefaultExpanded : level < _this16.defaultExpandLevel); - - _this16.$set(normalized, 'hasMatchedDescendants', false); - - _this16.$set(normalized, 'hasDisabledDescendants', false); - - _this16.$set(normalized, 'isExpandedOnSearch', false); - - _this16.$set(normalized, 'showAllChildrenOnSearch', false); - - _this16.$set(normalized, 'count', (_this16$$set = {}, defineProperty_default()(_this16$$set, ALL_CHILDREN, 0), defineProperty_default()(_this16$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this16$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this16$$set, LEAF_DESCENDANTS, 0), _this16$$set)); - - _this16.$set(normalized, 'children', isLoaded ? _this16.normalize(normalized, children, prevNodeMap) : []); - - if (isDefaultExpanded === true) normalized.ancestors.forEach(function (ancestor) { - ancestor.isExpanded = true; - }); - - if (!isLoaded && typeof _this16.loadOptions !== 'function') { - warning_warning(function () { - return false; - }, function () { - return 'Unloaded branch node detected. "loadOptions" prop is required to load its children.'; - }); - } else if (!isLoaded && normalized.isExpanded) { - _this16.loadChildrenOptions(normalized); - } - } - - normalized.ancestors.forEach(function (ancestor) { - return ancestor.count[ALL_DESCENDANTS]++; - }); - if (isLeaf) normalized.ancestors.forEach(function (ancestor) { - return ancestor.count[LEAF_DESCENDANTS]++; - }); - - if (!isRootNode) { - parentNode.count[ALL_CHILDREN] += 1; - if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1; - if (isDisabled) parentNode.hasDisabledDescendants = true; - } - - if (prevNodeMap && prevNodeMap[id]) { - var prev = prevNodeMap[id]; - normalized.isMatched = prev.isMatched; - normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch; - normalized.isHighlighted = prev.isHighlighted; - - if (prev.isBranch && normalized.isBranch) { - normalized.isExpanded = prev.isExpanded; - normalized.isExpandedOnSearch = prev.isExpandedOnSearch; - - if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) { - normalized.isExpanded = false; - } else { - normalized.childrenStates = _objectSpread({}, prev.childrenStates); - } - } - } - - return normalized; - }); - - if (this.branchNodesFirst) { - var branchNodes = normalizedOptions.filter(function (option) { - return option.isBranch; - }); - var leafNodes = normalizedOptions.filter(function (option) { - return option.isLeaf; - }); - normalizedOptions = branchNodes.concat(leafNodes); - } - - return normalizedOptions; - }, - loadRootOptions: function loadRootOptions() { - var _this17 = this; - - this.callLoadOptionsProp({ - action: LOAD_ROOT_OPTIONS, - isPending: function isPending() { - return _this17.rootOptionsStates.isLoading; - }, - start: function start() { - _this17.rootOptionsStates.isLoading = true; - _this17.rootOptionsStates.loadingError = ''; - }, - succeed: function succeed() { - _this17.rootOptionsStates.isLoaded = true; - - _this17.$nextTick(function () { - _this17.resetHighlightedOptionWhenNecessary(true); - }); - }, - fail: function fail(err) { - _this17.rootOptionsStates.loadingError = getErrorMessage(err); - }, - end: function end() { - _this17.rootOptionsStates.isLoading = false; - } - }); - }, - loadChildrenOptions: function loadChildrenOptions(parentNode) { - var _this18 = this; - - var id = parentNode.id, - raw = parentNode.raw; - this.callLoadOptionsProp({ - action: LOAD_CHILDREN_OPTIONS, - args: { - parentNode: raw - }, - isPending: function isPending() { - return _this18.getNode(id).childrenStates.isLoading; - }, - start: function start() { - _this18.getNode(id).childrenStates.isLoading = true; - _this18.getNode(id).childrenStates.loadingError = ''; - }, - succeed: function succeed() { - _this18.getNode(id).childrenStates.isLoaded = true; - }, - fail: function fail(err) { - _this18.getNode(id).childrenStates.loadingError = getErrorMessage(err); - }, - end: function end() { - _this18.getNode(id).childrenStates.isLoading = false; - } - }); - }, - callLoadOptionsProp: function callLoadOptionsProp(_ref3) { - var action = _ref3.action, - args = _ref3.args, - isPending = _ref3.isPending, - start = _ref3.start, - succeed = _ref3.succeed, - fail = _ref3.fail, - end = _ref3.end; - - if (!this.loadOptions || isPending()) { - return; - } - - start(); - var callback = once_default()(function (err, result) { - if (err) { - fail(err); - } else { - succeed(result); - } - - end(); - }); - var result = this.loadOptions(_objectSpread({ - id: this.getInstanceId(), - instanceId: this.getInstanceId(), - action: action - }, args, { - callback: callback - })); - - if (external_is_promise_default()(result)) { - result.then(function () { - callback(); - }, function (err) { - callback(err); - }).catch(function (err) { - console.error(err); - }); - } - }, - checkDuplication: function checkDuplication(node) { - var _this19 = this; - - warning_warning(function () { - return !(node.id in _this19.forest.nodeMap && !_this19.forest.nodeMap[node.id].isFallbackNode); - }, function () { - return "Detected duplicate presence of node id ".concat(JSON.stringify(node.id), ". ") + "Their labels are \"".concat(_this19.forest.nodeMap[node.id].label, "\" and \"").concat(node.label, "\" respectively."); - }); - }, - verifyNodeShape: function verifyNodeShape(node) { - warning_warning(function () { - return !(node.children === undefined && node.isBranch === true); - }, function () { - return 'Are you meant to declare an unloaded branch node? ' + '`isBranch: true` is no longer supported, please use `children: null` instead.'; - }); - }, - select: function select(node) { - if (this.disabled || node.isDisabled) { - return; - } - - if (this.single) { - this.clear(); - } - - var nextState = this.multiple && !this.flat ? this.forest.checkedStateMap[node.id] === UNCHECKED : !this.isSelected(node); - - if (nextState) { - this._selectNode(node); - } else { - this._deselectNode(node); - } - - this.buildForestState(); - - if (nextState) { - this.$emit('select', node.raw, this.getInstanceId()); - } else { - this.$emit('deselect', node.raw, this.getInstanceId()); - } - - if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) { - this.resetSearchQuery(); - } - - if (this.single && this.closeOnSelect) { - this.closeMenu(); - - if (this.searchable) { - this._blurOnSelect = true; - } - } - }, - clear: function clear() { - var _this20 = this; - - if (this.hasValue) { - if (this.single || this.allowClearingDisabled) { - this.forest.selectedNodeIds = []; - } else { - this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(function (nodeId) { - return _this20.getNode(nodeId).isDisabled; - }); - } - - this.buildForestState(); - } - }, - _selectNode: function _selectNode(node) { - var _this21 = this; - - if (this.single || this.disableBranchNodes) { - return this.addValue(node); - } - - if (this.flat) { - this.addValue(node); - - if (this.autoSelectAncestors) { - node.ancestors.forEach(function (ancestor) { - if (!_this21.isSelected(ancestor) && !ancestor.isDisabled) _this21.addValue(ancestor); - }); - } else if (this.autoSelectDescendants) { - this.traverseDescendantsBFS(node, function (descendant) { - if (!_this21.isSelected(descendant) && !descendant.isDisabled) _this21.addValue(descendant); - }); - } - - return; - } - - var isFullyChecked = node.isLeaf || !node.hasDisabledDescendants || this.allowSelectingDisabledDescendants; - - if (isFullyChecked) { - this.addValue(node); - } - - if (node.isBranch) { - this.traverseDescendantsBFS(node, function (descendant) { - if (!descendant.isDisabled || _this21.allowSelectingDisabledDescendants) { - _this21.addValue(descendant); - } - }); - } - - if (isFullyChecked) { - var curr = node; - - while ((curr = curr.parentNode) !== NO_PARENT_NODE) { - if (curr.children.every(this.isSelected)) this.addValue(curr);else break; - } - } - }, - _deselectNode: function _deselectNode(node) { - var _this22 = this; - - if (this.disableBranchNodes) { - return this.removeValue(node); - } - - if (this.flat) { - this.removeValue(node); - - if (this.autoDeselectAncestors) { - node.ancestors.forEach(function (ancestor) { - if (_this22.isSelected(ancestor) && !ancestor.isDisabled) _this22.removeValue(ancestor); - }); - } else if (this.autoDeselectDescendants) { - this.traverseDescendantsBFS(node, function (descendant) { - if (_this22.isSelected(descendant) && !descendant.isDisabled) _this22.removeValue(descendant); - }); - } - - return; - } - - var hasUncheckedSomeDescendants = false; - - if (node.isBranch) { - this.traverseDescendantsDFS(node, function (descendant) { - if (!descendant.isDisabled || _this22.allowSelectingDisabledDescendants) { - _this22.removeValue(descendant); - - hasUncheckedSomeDescendants = true; - } - }); - } - - if (node.isLeaf || hasUncheckedSomeDescendants || node.children.length === 0) { - this.removeValue(node); - var curr = node; - - while ((curr = curr.parentNode) !== NO_PARENT_NODE) { - if (this.isSelected(curr)) this.removeValue(curr);else break; - } - } - }, - addValue: function addValue(node) { - this.forest.selectedNodeIds.push(node.id); - this.forest.selectedNodeMap[node.id] = true; - }, - removeValue: function removeValue(node) { - removeFromArray(this.forest.selectedNodeIds, node.id); - delete this.forest.selectedNodeMap[node.id]; - }, - removeLastValue: function removeLastValue() { - if (!this.hasValue) return; - if (this.single) return this.clear(); - var lastValue = last_default()(this.internalValue); - var lastSelectedNode = this.getNode(lastValue); - this.select(lastSelectedNode); - }, - saveMenuScrollPosition: function saveMenuScrollPosition() { - var $menu = this.getMenu(); - if ($menu) this.menu.lastScrollPosition = $menu.scrollTop; - }, - restoreMenuScrollPosition: function restoreMenuScrollPosition() { - var $menu = this.getMenu(); - if ($menu) $menu.scrollTop = this.menu.lastScrollPosition; - } - }, - created: function created() { - this.verifyProps(); - this.resetFlags(); - }, - mounted: function mounted() { - if (this.autoFocus) this.focusInput(); - if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions(); - if (this.alwaysOpen) this.openMenu(); - if (this.async && this.defaultOptions) this.handleRemoteSearch(); - }, - destroyed: function destroyed() { - this.toggleClickOutsideEvent(false); - } -}); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HiddenFields.vue?vue&type=script&lang=js& - - -function stringifyValue(value) { - if (typeof value === 'string') return value; - if (value != null && !isNaN_isNaN(value)) return JSON.stringify(value); - return ''; -} - -/* harmony default export */ var HiddenFieldsvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--hidden-fields', - inject: ['instance'], - functional: true, - render: function render(_, context) { - var h = arguments[0]; - var instance = context.injections.instance; - if (!instance.name || instance.disabled || !instance.hasValue) return null; - var stringifiedValues = instance.internalValue.map(stringifyValue); - if (instance.multiple && instance.joinValues) stringifiedValues = [stringifiedValues.join(instance.delimiter)]; - return stringifiedValues.map(function (stringifiedValue, i) { - return h("input", { - attrs: { - type: "hidden", - name: instance.name - }, - domProps: { - "value": stringifiedValue - }, - key: 'hidden-field-' + i - }); - }); - } -}); -// CONCATENATED MODULE: ./src/components/HiddenFields.vue?vue&type=script&lang=js& - /* harmony default export */ var components_HiddenFieldsvue_type_script_lang_js_ = (HiddenFieldsvue_type_script_lang_js_); -// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -function normalizeComponent ( - scriptExports, - render, - staticRenderFns, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier, /* server only */ - shadowMode /* vue-cli only */ -) { - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (render) { - options.render = render - options.staticRenderFns = staticRenderFns - options._compiled = true - } - - // functional template - if (functionalTemplate) { - options.functional = true - } - - // scopedId - if (scopeId) { - options._scopeId = 'data-v-' + scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = shadowMode - ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } - : injectStyles - } - - if (hook) { - if (options.functional) { - // for template-only hot-reload because in that case the render fn doesn't - // go through the normalizer - options._injectStyles = hook - // register for functional component in vue file - var originalRender = options.render - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return originalRender(h, context) - } - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } - } - - return { - exports: scriptExports, - options: options - } -} - -// CONCATENATED MODULE: ./src/components/HiddenFields.vue -var HiddenFields_render, staticRenderFns - - - - -/* normalize component */ - -var component = normalizeComponent( - components_HiddenFieldsvue_type_script_lang_js_, - HiddenFields_render, - staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var api; } -component.options.__file = "src/components/HiddenFields.vue" -/* harmony default export */ var HiddenFields = (component.exports); -// EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props" -var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(13); -var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_); - -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Input.vue?vue&type=script&lang=js& - - - -var keysThatRequireMenuBeingOpen = [KEY_CODES.ENTER, KEY_CODES.END, KEY_CODES.HOME, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN]; -/* harmony default export */ var Inputvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--input', - inject: ['instance'], - data: function data() { - return { - inputWidth: MIN_INPUT_WIDTH, - value: '' - }; - }, - computed: { - needAutoSize: function needAutoSize() { - var instance = this.instance; - return instance.searchable && !instance.disabled && instance.multiple; - }, - inputStyle: function inputStyle() { - return { - width: this.needAutoSize ? "".concat(this.inputWidth, "px") : null - }; - } - }, - watch: { - 'instance.trigger.searchQuery': function instanceTriggerSearchQuery(newValue) { - this.value = newValue; - }, - value: function value() { - if (this.needAutoSize) this.$nextTick(this.updateInputWidth); - } - }, - created: function created() { - this.debouncedCallback = debounce_default()(this.updateSearchQuery, this.instance.inputDebounceDelay, { - leading: false, - trailing: true - }); - }, - methods: { - clear: function clear() { - this.onInput({ - target: { - value: '' - } - }); - }, - focus: function focus() { - var instance = this.instance; - - if (!instance.disabled) { - this.$refs.input && this.$refs.input.focus(); - } - }, - blur: function blur() { - this.$refs.input && this.$refs.input.blur(); - }, - onFocus: function onFocus() { - var instance = this.instance; - instance.trigger.isFocused = true; - if (instance.openOnFocus) instance.openMenu(); - }, - onBlur: function onBlur() { - var instance = this.instance; - var menu = instance.getMenu(); - - if (menu && document.activeElement === menu) { - return this.focus(); - } - - instance.trigger.isFocused = false; - instance.closeMenu(); - }, - onInput: function onInput(evt) { - var value = evt.target.value; - this.value = value; - - if (value) { - this.debouncedCallback(); - } else { - this.debouncedCallback.cancel(); - this.updateSearchQuery(); - } - }, - onKeyDown: function onKeyDown(evt) { - var instance = this.instance; - var key = 'which' in evt ? evt.which : evt.keyCode; - if (evt.ctrlKey || evt.shiftKey || evt.altKey || evt.metaKey) return; - - if (!instance.menu.isOpen && includes(keysThatRequireMenuBeingOpen, key)) { - evt.preventDefault(); - return instance.openMenu(); - } - - switch (key) { - case KEY_CODES.BACKSPACE: - { - if (instance.backspaceRemoves && !this.value.length) { - instance.removeLastValue(); - } - - break; - } - - case KEY_CODES.ENTER: - { - evt.preventDefault(); - if (instance.menu.current === null) return; - var current = instance.getNode(instance.menu.current); - if (current.isBranch && instance.disableBranchNodes) return; - instance.select(current); - break; - } - - case KEY_CODES.ESCAPE: - { - if (this.value.length) { - this.clear(); - } else if (instance.menu.isOpen) { - instance.closeMenu(); - } - - break; - } - - case KEY_CODES.END: - { - evt.preventDefault(); - instance.highlightLastOption(); - break; - } - - case KEY_CODES.HOME: - { - evt.preventDefault(); - instance.highlightFirstOption(); - break; - } - - case KEY_CODES.ARROW_LEFT: - { - var _current = instance.getNode(instance.menu.current); - - if (_current.isBranch && instance.shouldExpand(_current)) { - evt.preventDefault(); - instance.toggleExpanded(_current); - } else if (!_current.isRootNode && (_current.isLeaf || _current.isBranch && !instance.shouldExpand(_current))) { - evt.preventDefault(); - instance.setCurrentHighlightedOption(_current.parentNode); - } - - break; - } - - case KEY_CODES.ARROW_UP: - { - evt.preventDefault(); - instance.highlightPrevOption(); - break; - } - - case KEY_CODES.ARROW_RIGHT: - { - var _current2 = instance.getNode(instance.menu.current); - - if (_current2.isBranch && !instance.shouldExpand(_current2)) { - evt.preventDefault(); - instance.toggleExpanded(_current2); - } - - break; - } - - case KEY_CODES.ARROW_DOWN: - { - evt.preventDefault(); - instance.highlightNextOption(); - break; - } - - case KEY_CODES.DELETE: - { - if (instance.deleteRemoves && !this.value.length) { - instance.removeLastValue(); - } - - break; - } - - default: - { - instance.openMenu(); - } - } - }, - onMouseDown: function onMouseDown(evt) { - if (this.value.length) { - evt.stopPropagation(); - } - }, - renderInputContainer: function renderInputContainer() { - var h = this.$createElement; - var instance = this.instance; - var props = {}; - var children = []; - - if (instance.searchable && !instance.disabled) { - children.push(this.renderInput()); - if (this.needAutoSize) children.push(this.renderSizer()); - } - - if (!instance.searchable) { - deepExtend(props, { - on: { - focus: this.onFocus, - blur: this.onBlur, - keydown: this.onKeyDown - }, - ref: 'input' - }); - } - - if (!instance.searchable && !instance.disabled) { - deepExtend(props, { - attrs: { - tabIndex: instance.tabIndex - } - }); - } - - return h("div", external_babel_helper_vue_jsx_merge_props_default()([{ - "class": "vue-treeselect__input-container" - }, props]), [children]); - }, - renderInput: function renderInput() { - var h = this.$createElement; - var instance = this.instance; - return h("input", { - ref: "input", - "class": "vue-treeselect__input", - attrs: { - type: "text", - autocomplete: "off", - tabIndex: instance.tabIndex, - required: instance.required && !instance.hasValue - }, - domProps: { - "value": this.value - }, - style: this.inputStyle, - on: { - "focus": this.onFocus, - "input": this.onInput, - "blur": this.onBlur, - "keydown": this.onKeyDown, - "mousedown": this.onMouseDown - } - }); - }, - renderSizer: function renderSizer() { - var h = this.$createElement; - return h("div", { - ref: "sizer", - "class": "vue-treeselect__sizer" - }, [this.value]); - }, - updateInputWidth: function updateInputWidth() { - this.inputWidth = Math.max(MIN_INPUT_WIDTH, this.$refs.sizer.scrollWidth + 15); - }, - updateSearchQuery: function updateSearchQuery() { - var instance = this.instance; - instance.trigger.searchQuery = this.value; - } - }, - render: function render() { - return this.renderInputContainer(); - } -}); -// CONCATENATED MODULE: ./src/components/Input.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Inputvue_type_script_lang_js_ = (Inputvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Input.vue -var Input_render, Input_staticRenderFns - - - - -/* normalize component */ - -var Input_component = normalizeComponent( - components_Inputvue_type_script_lang_js_, - Input_render, - Input_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Input_api; } -Input_component.options.__file = "src/components/Input.vue" -/* harmony default export */ var Input = (Input_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Placeholder.vue?vue&type=script&lang=js& -/* harmony default export */ var Placeholdervue_type_script_lang_js_ = ({ - name: 'vue-treeselect--placeholder', - inject: ['instance'], - render: function render() { - var h = arguments[0]; - var instance = this.instance; - var placeholderClass = { - 'vue-treeselect__placeholder': true, - 'vue-treeselect-helper-zoom-effect-off': true, - 'vue-treeselect-helper-hide': instance.hasValue || instance.trigger.searchQuery - }; - return h("div", { - "class": placeholderClass - }, [instance.placeholder]); - } -}); -// CONCATENATED MODULE: ./src/components/Placeholder.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Placeholdervue_type_script_lang_js_ = (Placeholdervue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Placeholder.vue -var Placeholder_render, Placeholder_staticRenderFns - - - - -/* normalize component */ - -var Placeholder_component = normalizeComponent( - components_Placeholdervue_type_script_lang_js_, - Placeholder_render, - Placeholder_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Placeholder_api; } -Placeholder_component.options.__file = "src/components/Placeholder.vue" -/* harmony default export */ var Placeholder = (Placeholder_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SingleValue.vue?vue&type=script&lang=js& - - -/* harmony default export */ var SingleValuevue_type_script_lang_js_ = ({ - name: 'vue-treeselect--single-value', - inject: ['instance'], - methods: { - renderSingleValueLabel: function renderSingleValueLabel() { - var instance = this.instance; - var node = instance.selectedNodes[0]; - var customValueLabelRenderer = instance.$scopedSlots['value-label']; - return customValueLabelRenderer ? customValueLabelRenderer({ - node: node - }) : node.label; - } - }, - render: function render() { - var h = arguments[0]; - var instance = this.instance, - renderValueContainer = this.$parent.renderValueContainer; - var shouldShowValue = instance.hasValue && !instance.trigger.searchQuery; - return renderValueContainer([shouldShowValue && h("div", { - "class": "vue-treeselect__single-value" - }, [this.renderSingleValueLabel()]), h(Placeholder), h(Input, { - ref: "input" - })]); - } -}); -// CONCATENATED MODULE: ./src/components/SingleValue.vue?vue&type=script&lang=js& - /* harmony default export */ var components_SingleValuevue_type_script_lang_js_ = (SingleValuevue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/SingleValue.vue -var SingleValue_render, SingleValue_staticRenderFns - - - - -/* normalize component */ - -var SingleValue_component = normalizeComponent( - components_SingleValuevue_type_script_lang_js_, - SingleValue_render, - SingleValue_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var SingleValue_api; } -SingleValue_component.options.__file = "src/components/SingleValue.vue" -/* harmony default export */ var SingleValue = (SingleValue_component.exports); -// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=template&id=364b6320& -var Deletevue_type_template_id_364b6320_render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "svg", - { - attrs: { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 348.333 348.333" - } - }, - [ - _c("path", { - attrs: { - d: - "M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z" - } - }) - ] - ) -} -var Deletevue_type_template_id_364b6320_staticRenderFns = [] -Deletevue_type_template_id_364b6320_render._withStripped = true - - -// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=template&id=364b6320& - -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=script&lang=js& -/* harmony default export */ var Deletevue_type_script_lang_js_ = ({ - name: 'vue-treeselect--x' -}); -// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=script&lang=js& - /* harmony default export */ var icons_Deletevue_type_script_lang_js_ = (Deletevue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/icons/Delete.vue - - - - - -/* normalize component */ - -var Delete_component = normalizeComponent( - icons_Deletevue_type_script_lang_js_, - Deletevue_type_template_id_364b6320_render, - Deletevue_type_template_id_364b6320_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Delete_api; } -Delete_component.options.__file = "src/components/icons/Delete.vue" -/* harmony default export */ var Delete = (Delete_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValueItem.vue?vue&type=script&lang=js& - - -/* harmony default export */ var MultiValueItemvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--multi-value-item', - inject: ['instance'], - props: { - node: { - type: Object, - required: true - } - }, - methods: { - handleMouseDown: onLeftClick(function handleMouseDown() { - var instance = this.instance, - node = this.node; - instance.select(node); - }) - }, - render: function render() { - var h = arguments[0]; - var instance = this.instance, - node = this.node; - var itemClass = { - 'vue-treeselect__multi-value-item': true, - 'vue-treeselect__multi-value-item-disabled': node.isDisabled, - 'vue-treeselect__multi-value-item-new': node.isNew - }; - var customValueLabelRenderer = instance.$scopedSlots['value-label']; - var labelRenderer = customValueLabelRenderer ? customValueLabelRenderer({ - node: node - }) : node.label; - return h("div", { - "class": "vue-treeselect__multi-value-item-container" - }, [h("div", { - "class": itemClass, - on: { - "mousedown": this.handleMouseDown - } - }, [h("span", { - "class": "vue-treeselect__multi-value-label" - }, [labelRenderer]), h("span", { - "class": "vue-treeselect__icon vue-treeselect__value-remove" - }, [h(Delete)])])]); - } -}); -// CONCATENATED MODULE: ./src/components/MultiValueItem.vue?vue&type=script&lang=js& - /* harmony default export */ var components_MultiValueItemvue_type_script_lang_js_ = (MultiValueItemvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/MultiValueItem.vue -var MultiValueItem_render, MultiValueItem_staticRenderFns - - - - -/* normalize component */ - -var MultiValueItem_component = normalizeComponent( - components_MultiValueItemvue_type_script_lang_js_, - MultiValueItem_render, - MultiValueItem_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var MultiValueItem_api; } -MultiValueItem_component.options.__file = "src/components/MultiValueItem.vue" -/* harmony default export */ var MultiValueItem = (MultiValueItem_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValue.vue?vue&type=script&lang=js& - - - - -/* harmony default export */ var MultiValuevue_type_script_lang_js_ = ({ - name: 'vue-treeselect--multi-value', - inject: ['instance'], - methods: { - renderMultiValueItems: function renderMultiValueItems() { - var h = this.$createElement; - var instance = this.instance; - return instance.internalValue.slice(0, instance.limit).map(instance.getNode).map(function (node) { - return h(MultiValueItem, { - key: "multi-value-item-".concat(node.id), - attrs: { - node: node - } - }); - }); - }, - renderExceedLimitTip: function renderExceedLimitTip() { - var h = this.$createElement; - var instance = this.instance; - var count = instance.internalValue.length - instance.limit; - if (count <= 0) return null; - return h("div", { - "class": "vue-treeselect__limit-tip vue-treeselect-helper-zoom-effect-off", - key: "exceed-limit-tip" - }, [h("span", { - "class": "vue-treeselect__limit-tip-text" - }, [instance.limitText(count)])]); - } - }, - render: function render() { - var h = arguments[0]; - var renderValueContainer = this.$parent.renderValueContainer; - var transitionGroupProps = { - props: { - tag: 'div', - name: 'vue-treeselect__multi-value-item--transition', - appear: true - } - }; - return renderValueContainer(h("transition-group", external_babel_helper_vue_jsx_merge_props_default()([{ - "class": "vue-treeselect__multi-value" - }, transitionGroupProps]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), h(Placeholder, { - key: "placeholder" - }), h(Input, { - ref: "input", - key: "input" - })])); - } -}); -// CONCATENATED MODULE: ./src/components/MultiValue.vue?vue&type=script&lang=js& - /* harmony default export */ var components_MultiValuevue_type_script_lang_js_ = (MultiValuevue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/MultiValue.vue -var MultiValue_render, MultiValue_staticRenderFns - - - - -/* normalize component */ - -var MultiValue_component = normalizeComponent( - components_MultiValuevue_type_script_lang_js_, - MultiValue_render, - MultiValue_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var MultiValue_api; } -MultiValue_component.options.__file = "src/components/MultiValue.vue" -/* harmony default export */ var MultiValue = (MultiValue_component.exports); -// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4& -var Arrowvue_type_template_id_11186cd4_render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "svg", - { - attrs: { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 292.362 292.362" - } - }, - [ - _c("path", { - attrs: { - d: - "M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z" - } - }) - ] - ) -} -var Arrowvue_type_template_id_11186cd4_staticRenderFns = [] -Arrowvue_type_template_id_11186cd4_render._withStripped = true - - -// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4& - -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=script&lang=js& -/* harmony default export */ var Arrowvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--arrow' -}); -// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=script&lang=js& - /* harmony default export */ var icons_Arrowvue_type_script_lang_js_ = (Arrowvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/icons/Arrow.vue - - - - - -/* normalize component */ - -var Arrow_component = normalizeComponent( - icons_Arrowvue_type_script_lang_js_, - Arrowvue_type_template_id_11186cd4_render, - Arrowvue_type_template_id_11186cd4_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Arrow_api; } -Arrow_component.options.__file = "src/components/icons/Arrow.vue" -/* harmony default export */ var Arrow = (Arrow_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Control.vue?vue&type=script&lang=js& - - - - - -/* harmony default export */ var Controlvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--control', - inject: ['instance'], - computed: { - shouldShowX: function shouldShowX() { - var instance = this.instance; - return instance.clearable && !instance.disabled && instance.hasValue && (this.hasUndisabledValue || instance.allowClearingDisabled); - }, - shouldShowArrow: function shouldShowArrow() { - var instance = this.instance; - if (!instance.alwaysOpen) return true; - return !instance.menu.isOpen; - }, - hasUndisabledValue: function hasUndisabledValue() { - var instance = this.instance; - return instance.hasValue && instance.internalValue.some(function (id) { - return !instance.getNode(id).isDisabled; - }); - } - }, - methods: { - renderX: function renderX() { - var h = this.$createElement; - var instance = this.instance; - var title = instance.multiple ? instance.clearAllText : instance.clearValueText; - if (!this.shouldShowX) return null; - return h("div", { - "class": "vue-treeselect__x-container", - attrs: { - title: title - }, - on: { - "mousedown": this.handleMouseDownOnX - } - }, [h(Delete, { - "class": "vue-treeselect__x" - })]); - }, - renderArrow: function renderArrow() { - var h = this.$createElement; - var instance = this.instance; - var arrowClass = { - 'vue-treeselect__control-arrow': true, - 'vue-treeselect__control-arrow--rotated': instance.menu.isOpen - }; - if (!this.shouldShowArrow) return null; - return h("div", { - "class": "vue-treeselect__control-arrow-container", - on: { - "mousedown": this.handleMouseDownOnArrow - } - }, [h(Arrow, { - "class": arrowClass - })]); - }, - handleMouseDownOnX: onLeftClick(function handleMouseDownOnX(evt) { - evt.stopPropagation(); - evt.preventDefault(); - var instance = this.instance; - var result = instance.beforeClearAll(); - - var handler = function handler(shouldClear) { - if (shouldClear) instance.clear(); - }; - - if (external_is_promise_default()(result)) { - result.then(handler); - } else { - setTimeout(function () { - return handler(result); - }, 0); - } - }), - handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnArrow(evt) { - evt.preventDefault(); - evt.stopPropagation(); - var instance = this.instance; - instance.focusInput(); - instance.toggleMenu(); - }), - renderValueContainer: function renderValueContainer(children) { - var h = this.$createElement; - return h("div", { - "class": "vue-treeselect__value-container" - }, [children]); - } - }, - render: function render() { - var h = arguments[0]; - var instance = this.instance; - var ValueContainer = instance.single ? SingleValue : MultiValue; - return h("div", { - "class": "vue-treeselect__control", - on: { - "mousedown": instance.handleMouseDown - } - }, [h(ValueContainer, { - ref: "value-container" - }), this.renderX(), this.renderArrow()]); - } -}); -// CONCATENATED MODULE: ./src/components/Control.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Controlvue_type_script_lang_js_ = (Controlvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Control.vue -var Control_render, Control_staticRenderFns - - - - -/* normalize component */ - -var Control_component = normalizeComponent( - components_Controlvue_type_script_lang_js_, - Control_render, - Control_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Control_api; } -Control_component.options.__file = "src/components/Control.vue" -/* harmony default export */ var Control = (Control_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Tip.vue?vue&type=script&lang=js& -/* harmony default export */ var Tipvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--tip', - functional: true, - props: { - type: { - type: String, - required: true - }, - icon: { - type: String, - required: true - } - }, - render: function render(_, context) { - var h = arguments[0]; - var props = context.props, - children = context.children; - return h("div", { - "class": "vue-treeselect__tip vue-treeselect__".concat(props.type, "-tip") - }, [h("div", { - "class": "vue-treeselect__icon-container" - }, [h("span", { - "class": "vue-treeselect__icon-".concat(props.icon) - })]), h("span", { - "class": "vue-treeselect__tip-text vue-treeselect__".concat(props.type, "-tip-text") - }, [children])]); - } -}); -// CONCATENATED MODULE: ./src/components/Tip.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Tipvue_type_script_lang_js_ = (Tipvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Tip.vue -var Tip_render, Tip_staticRenderFns - - - - -/* normalize component */ - -var Tip_component = normalizeComponent( - components_Tipvue_type_script_lang_js_, - Tip_render, - Tip_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Tip_api; } -Tip_component.options.__file = "src/components/Tip.vue" -/* harmony default export */ var Tip = (Tip_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Option.vue?vue&type=script&lang=js& - - - - - -var arrowPlaceholder, checkMark, minusMark; -var Option = { - name: 'vue-treeselect--option', - inject: ['instance'], - props: { - node: { - type: Object, - required: true - } - }, - computed: { - shouldExpand: function shouldExpand() { - var instance = this.instance, - node = this.node; - return node.isBranch && instance.shouldExpand(node); - }, - shouldShow: function shouldShow() { - var instance = this.instance, - node = this.node; - return instance.shouldShowOptionInMenu(node); - } - }, - methods: { - renderOption: function renderOption() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - var optionClass = { - 'vue-treeselect__option': true, - 'vue-treeselect__option--disabled': node.isDisabled, - 'vue-treeselect__option--selected': instance.isSelected(node), - 'vue-treeselect__option--highlight': node.isHighlighted, - 'vue-treeselect__option--matched': instance.localSearch.active && node.isMatched, - 'vue-treeselect__option--hide': !this.shouldShow - }; - return h("div", { - "class": optionClass, - on: { - "mouseenter": this.handleMouseEnterOption - }, - attrs: { - "data-id": node.id - } - }, [this.renderArrow(), this.renderLabelContainer([this.renderCheckboxContainer([this.renderCheckbox()]), this.renderLabel()])]); - }, - renderSubOptionsList: function renderSubOptionsList() { - var h = this.$createElement; - if (!this.shouldExpand) return null; - return h("div", { - "class": "vue-treeselect__list" - }, [this.renderSubOptions(), this.renderNoChildrenTip(), this.renderLoadingChildrenTip(), this.renderLoadingChildrenErrorTip()]); - }, - renderArrow: function renderArrow() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (instance.shouldFlattenOptions && this.shouldShow) return null; - - if (node.isBranch) { - var transitionProps = { - props: { - name: 'vue-treeselect__option-arrow--prepare', - appear: true - } - }; - var arrowClass = { - 'vue-treeselect__option-arrow': true, - 'vue-treeselect__option-arrow--rotated': this.shouldExpand - }; - return h("div", { - "class": "vue-treeselect__option-arrow-container", - on: { - "mousedown": this.handleMouseDownOnArrow - } - }, [h("transition", transitionProps, [h(Arrow, { - "class": arrowClass - })])]); - } - - if (instance.hasBranchNodes) { - if (!arrowPlaceholder) arrowPlaceholder = h("div", { - "class": "vue-treeselect__option-arrow-placeholder" - }, ["\xA0"]); - return arrowPlaceholder; - } - - return null; - }, - renderLabelContainer: function renderLabelContainer(children) { - var h = this.$createElement; - return h("div", { - "class": "vue-treeselect__label-container", - on: { - "mousedown": this.handleMouseDownOnLabelContainer - } - }, [children]); - }, - renderCheckboxContainer: function renderCheckboxContainer(children) { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (instance.single) return null; - if (instance.disableBranchNodes && node.isBranch) return null; - return h("div", { - "class": "vue-treeselect__checkbox-container" - }, [children]); - }, - renderCheckbox: function renderCheckbox() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - var checkedState = instance.forest.checkedStateMap[node.id]; - var checkboxClass = { - 'vue-treeselect__checkbox': true, - 'vue-treeselect__checkbox--checked': checkedState === CHECKED, - 'vue-treeselect__checkbox--indeterminate': checkedState === INDETERMINATE, - 'vue-treeselect__checkbox--unchecked': checkedState === UNCHECKED, - 'vue-treeselect__checkbox--disabled': node.isDisabled - }; - if (!checkMark) checkMark = h("span", { - "class": "vue-treeselect__check-mark" - }); - if (!minusMark) minusMark = h("span", { - "class": "vue-treeselect__minus-mark" - }); - return h("span", { - "class": checkboxClass - }, [checkMark, minusMark]); - }, - renderLabel: function renderLabel() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - var shouldShowCount = node.isBranch && (instance.localSearch.active ? instance.showCountOnSearchComputed : instance.showCount); - var count = shouldShowCount ? instance.localSearch.active ? instance.localSearch.countMap[node.id][instance.showCountOf] : node.count[instance.showCountOf] : NaN; - var labelClassName = 'vue-treeselect__label'; - var countClassName = 'vue-treeselect__count'; - var customLabelRenderer = instance.$scopedSlots['option-label']; - if (customLabelRenderer) return customLabelRenderer({ - node: node, - shouldShowCount: shouldShowCount, - count: count, - labelClassName: labelClassName, - countClassName: countClassName - }); - return h("label", { - "class": labelClassName - }, [node.label, shouldShowCount && h("span", { - "class": countClassName - }, ["(", count, ")"])]); - }, - renderSubOptions: function renderSubOptions() { - var h = this.$createElement; - var node = this.node; - if (!node.childrenStates.isLoaded) return null; - return node.children.map(function (childNode) { - return h(Option, { - attrs: { - node: childNode - }, - key: childNode.id - }); - }); - }, - renderNoChildrenTip: function renderNoChildrenTip() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (!node.childrenStates.isLoaded || node.children.length) return null; - return h(Tip, { - attrs: { - type: "no-children", - icon: "warning" - } - }, [instance.noChildrenText]); - }, - renderLoadingChildrenTip: function renderLoadingChildrenTip() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (!node.childrenStates.isLoading) return null; - return h(Tip, { - attrs: { - type: "loading", - icon: "loader" - } - }, [instance.loadingText]); - }, - renderLoadingChildrenErrorTip: function renderLoadingChildrenErrorTip() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (!node.childrenStates.loadingError) return null; - return h(Tip, { - attrs: { - type: "error", - icon: "error" - } - }, [node.childrenStates.loadingError, h("a", { - "class": "vue-treeselect__retry", - attrs: { - title: instance.retryTitle - }, - on: { - "mousedown": this.handleMouseDownOnRetry - } - }, [instance.retryText])]); - }, - handleMouseEnterOption: function handleMouseEnterOption(evt) { - var instance = this.instance, - node = this.node; - if (evt.target !== evt.currentTarget) return; - instance.setCurrentHighlightedOption(node, false); - }, - handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnOptionArrow() { - var instance = this.instance, - node = this.node; - instance.toggleExpanded(node); - }), - handleMouseDownOnLabelContainer: onLeftClick(function handleMouseDownOnLabelContainer() { - var instance = this.instance, - node = this.node; - - if (node.isBranch && instance.disableBranchNodes) { - instance.toggleExpanded(node); - } else { - instance.select(node); - } - }), - handleMouseDownOnRetry: onLeftClick(function handleMouseDownOnRetry() { - var instance = this.instance, - node = this.node; - instance.loadChildrenOptions(node); - }) - }, - render: function render() { - var h = arguments[0]; - var node = this.node; - var indentLevel = this.instance.shouldFlattenOptions ? 0 : node.level; - - var listItemClass = defineProperty_default()({ - 'vue-treeselect__list-item': true - }, "vue-treeselect__indent-level-".concat(indentLevel), true); - - var transitionProps = { - props: { - name: 'vue-treeselect__list--transition' - } - }; - var ariaSelected = this.instance.selectedNodes.length ? 'true' : 'false'; - return h("div", { - "class": listItemClass, - attrs: { - role: "option", - tabindex: "0", - "aria-selected": ariaSelected - } - }, [this.renderOption(), node.isBranch && h("transition", transitionProps, [this.renderSubOptionsList()])]); - } -}; -/* harmony default export */ var Optionvue_type_script_lang_js_ = (Option); -// CONCATENATED MODULE: ./src/components/Option.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Optionvue_type_script_lang_js_ = (Optionvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Option.vue -var Option_render, Option_staticRenderFns - - - - -/* normalize component */ - -var Option_component = normalizeComponent( - components_Optionvue_type_script_lang_js_, - Option_render, - Option_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Option_api; } -Option_component.options.__file = "src/components/Option.vue" -/* harmony default export */ var components_Option = (Option_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Menu.vue?vue&type=script&lang=js& - - - - -var directionMap = { - top: 'top', - bottom: 'bottom', - above: 'top', - below: 'bottom' -}; -/* harmony default export */ var Menuvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--menu', - inject: ['instance'], - computed: { - menuStyle: function menuStyle() { - var instance = this.instance; - return { - maxHeight: instance.maxHeight + 'px' - }; - }, - menuContainerStyle: function menuContainerStyle() { - var instance = this.instance; - return { - zIndex: instance.appendToBody ? null : instance.zIndex - }; - } - }, - watch: { - 'instance.menu.isOpen': function instanceMenuIsOpen(newValue) { - if (newValue) { - this.$nextTick(this.onMenuOpen); - } else { - this.onMenuClose(); - } - } - }, - created: function created() { - this.menuSizeWatcher = null; - this.menuResizeAndScrollEventListeners = null; - }, - mounted: function mounted() { - var instance = this.instance; - if (instance.menu.isOpen) this.$nextTick(this.onMenuOpen); - }, - destroyed: function destroyed() { - this.onMenuClose(); - }, - methods: { - renderMenu: function renderMenu() { - var h = this.$createElement; - var instance = this.instance; - if (!instance.menu.isOpen) return null; - return h("div", { - ref: "menu", - "class": "vue-treeselect__menu", - on: { - "mousedown": instance.handleMouseDown - }, - style: this.menuStyle - }, [this.renderBeforeList(), instance.async ? this.renderAsyncSearchMenuInner() : instance.localSearch.active ? this.renderLocalSearchMenuInner() : this.renderNormalMenuInner(), this.renderAfterList()]); - }, - renderBeforeList: function renderBeforeList() { - var instance = this.instance; - var beforeListRenderer = instance.$scopedSlots['before-list']; - return beforeListRenderer ? beforeListRenderer() : null; - }, - renderAfterList: function renderAfterList() { - var instance = this.instance; - var afterListRenderer = instance.$scopedSlots['after-list']; - return afterListRenderer ? afterListRenderer() : null; - }, - renderNormalMenuInner: function renderNormalMenuInner() { - var instance = this.instance; - - if (instance.rootOptionsStates.isLoading) { - return this.renderLoadingOptionsTip(); - } else if (instance.rootOptionsStates.loadingError) { - return this.renderLoadingRootOptionsErrorTip(); - } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) { - return this.renderNoAvailableOptionsTip(); - } else { - return this.renderOptionList(); - } - }, - renderLocalSearchMenuInner: function renderLocalSearchMenuInner() { - var instance = this.instance; - - if (instance.rootOptionsStates.isLoading) { - return this.renderLoadingOptionsTip(); - } else if (instance.rootOptionsStates.loadingError) { - return this.renderLoadingRootOptionsErrorTip(); - } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) { - return this.renderNoAvailableOptionsTip(); - } else if (instance.localSearch.noResults) { - return this.renderNoResultsTip(); - } else { - return this.renderOptionList(); - } - }, - renderAsyncSearchMenuInner: function renderAsyncSearchMenuInner() { - var instance = this.instance; - var entry = instance.getRemoteSearchEntry(); - var shouldShowSearchPromptTip = instance.trigger.searchQuery === '' && !instance.defaultOptions; - var shouldShowNoResultsTip = shouldShowSearchPromptTip ? false : entry.isLoaded && entry.options.length === 0; - - if (shouldShowSearchPromptTip) { - return this.renderSearchPromptTip(); - } else if (entry.isLoading) { - return this.renderLoadingOptionsTip(); - } else if (entry.loadingError) { - return this.renderAsyncSearchLoadingErrorTip(); - } else if (shouldShowNoResultsTip) { - return this.renderNoResultsTip(); - } else { - return this.renderOptionList(); - } - }, - renderOptionList: function renderOptionList() { - var h = this.$createElement; - var instance = this.instance; - return h("div", { - "class": "vue-treeselect__list", - attrs: { - role: "listbox", - tabindex: "-1" - } - }, [instance.forest.normalizedOptions.map(function (rootNode) { - return h(components_Option, { - attrs: { - node: rootNode - }, - key: rootNode.id - }); - })]); - }, - renderSearchPromptTip: function renderSearchPromptTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "search-prompt", - icon: "warning" - } - }, [instance.searchPromptText]); - }, - renderLoadingOptionsTip: function renderLoadingOptionsTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "loading", - icon: "loader" - } - }, [instance.loadingText]); - }, - renderLoadingRootOptionsErrorTip: function renderLoadingRootOptionsErrorTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "error", - icon: "error" - } - }, [instance.rootOptionsStates.loadingError, h("a", { - "class": "vue-treeselect__retry", - on: { - "click": instance.loadRootOptions - }, - attrs: { - title: instance.retryTitle - } - }, [instance.retryText])]); - }, - renderAsyncSearchLoadingErrorTip: function renderAsyncSearchLoadingErrorTip() { - var h = this.$createElement; - var instance = this.instance; - var entry = instance.getRemoteSearchEntry(); - return h(Tip, { - attrs: { - type: "error", - icon: "error" - } - }, [entry.loadingError, h("a", { - "class": "vue-treeselect__retry", - on: { - "click": instance.handleRemoteSearch - }, - attrs: { - title: instance.retryTitle - } - }, [instance.retryText])]); - }, - renderNoAvailableOptionsTip: function renderNoAvailableOptionsTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "no-options", - icon: "warning" - } - }, [instance.noOptionsText]); - }, - renderNoResultsTip: function renderNoResultsTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "no-results", - icon: "warning" - } - }, [instance.noResultsText]); - }, - onMenuOpen: function onMenuOpen() { - this.adjustMenuOpenDirection(); - this.setupMenuSizeWatcher(); - this.setupMenuResizeAndScrollEventListeners(); - }, - onMenuClose: function onMenuClose() { - this.removeMenuSizeWatcher(); - this.removeMenuResizeAndScrollEventListeners(); - }, - adjustMenuOpenDirection: function adjustMenuOpenDirection() { - var instance = this.instance; - if (!instance.menu.isOpen) return; - var $menu = instance.getMenu(); - var $control = instance.getControl(); - var menuRect = $menu.getBoundingClientRect(); - var controlRect = $control.getBoundingClientRect(); - var menuHeight = menuRect.height; - var viewportHeight = window.innerHeight; - var spaceAbove = controlRect.top; - var spaceBelow = window.innerHeight - controlRect.bottom; - var isControlInViewport = controlRect.top >= 0 && controlRect.top <= viewportHeight || controlRect.top < 0 && controlRect.bottom > 0; - var hasEnoughSpaceBelow = spaceBelow > menuHeight + MENU_BUFFER; - var hasEnoughSpaceAbove = spaceAbove > menuHeight + MENU_BUFFER; - - if (!isControlInViewport) { - instance.closeMenu(); - } else if (instance.openDirection !== 'auto') { - instance.menu.placement = directionMap[instance.openDirection]; - } else if (hasEnoughSpaceBelow || !hasEnoughSpaceAbove) { - instance.menu.placement = 'bottom'; - } else { - instance.menu.placement = 'top'; - } - }, - setupMenuSizeWatcher: function setupMenuSizeWatcher() { - var instance = this.instance; - var $menu = instance.getMenu(); - if (this.menuSizeWatcher) return; - this.menuSizeWatcher = { - remove: watchSize($menu, this.adjustMenuOpenDirection) - }; - }, - setupMenuResizeAndScrollEventListeners: function setupMenuResizeAndScrollEventListeners() { - var instance = this.instance; - var $control = instance.getControl(); - if (this.menuResizeAndScrollEventListeners) return; - this.menuResizeAndScrollEventListeners = { - remove: setupResizeAndScrollEventListeners($control, this.adjustMenuOpenDirection) - }; - }, - removeMenuSizeWatcher: function removeMenuSizeWatcher() { - if (!this.menuSizeWatcher) return; - this.menuSizeWatcher.remove(); - this.menuSizeWatcher = null; - }, - removeMenuResizeAndScrollEventListeners: function removeMenuResizeAndScrollEventListeners() { - if (!this.menuResizeAndScrollEventListeners) return; - this.menuResizeAndScrollEventListeners.remove(); - this.menuResizeAndScrollEventListeners = null; - } - }, - render: function render() { - var h = arguments[0]; - return h("div", { - ref: "menu-container", - "class": "vue-treeselect__menu-container", - style: this.menuContainerStyle - }, [h("transition", { - attrs: { - name: "vue-treeselect__menu--transition" - } - }, [this.renderMenu()])]); - } -}); -// CONCATENATED MODULE: ./src/components/Menu.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Menuvue_type_script_lang_js_ = (Menuvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Menu.vue -var Menu_render, Menu_staticRenderFns - - - - -/* normalize component */ - -var Menu_component = normalizeComponent( - components_Menuvue_type_script_lang_js_, - Menu_render, - Menu_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Menu_api; } -Menu_component.options.__file = "src/components/Menu.vue" -/* harmony default export */ var Menu = (Menu_component.exports); -// EXTERNAL MODULE: external "vue" -var external_vue_ = __webpack_require__(14); -var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_); - -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MenuPortal.vue?vue&type=script&lang=js& - - -function MenuPortalvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function MenuPortalvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { MenuPortalvue_type_script_lang_js_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { MenuPortalvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - - - - -var PortalTarget = { - name: 'vue-treeselect--portal-target', - inject: ['instance'], - watch: { - 'instance.menu.isOpen': function instanceMenuIsOpen(newValue) { - if (newValue) { - this.setupHandlers(); - } else { - this.removeHandlers(); - } - }, - 'instance.menu.placement': function instanceMenuPlacement() { - this.updateMenuContainerOffset(); - } - }, - created: function created() { - this.controlResizeAndScrollEventListeners = null; - this.controlSizeWatcher = null; - }, - mounted: function mounted() { - var instance = this.instance; - if (instance.menu.isOpen) this.setupHandlers(); - }, - methods: { - setupHandlers: function setupHandlers() { - this.updateWidth(); - this.updateMenuContainerOffset(); - this.setupControlResizeAndScrollEventListeners(); - this.setupControlSizeWatcher(); - }, - removeHandlers: function removeHandlers() { - this.removeControlResizeAndScrollEventListeners(); - this.removeControlSizeWatcher(); - }, - setupControlResizeAndScrollEventListeners: function setupControlResizeAndScrollEventListeners() { - var instance = this.instance; - var $control = instance.getControl(); - if (this.controlResizeAndScrollEventListeners) return; - this.controlResizeAndScrollEventListeners = { - remove: setupResizeAndScrollEventListeners($control, this.updateMenuContainerOffset) - }; - }, - setupControlSizeWatcher: function setupControlSizeWatcher() { - var _this = this; - - var instance = this.instance; - var $control = instance.getControl(); - if (this.controlSizeWatcher) return; - this.controlSizeWatcher = { - remove: watchSize($control, function () { - _this.updateWidth(); - - _this.updateMenuContainerOffset(); - }) - }; - }, - removeControlResizeAndScrollEventListeners: function removeControlResizeAndScrollEventListeners() { - if (!this.controlResizeAndScrollEventListeners) return; - this.controlResizeAndScrollEventListeners.remove(); - this.controlResizeAndScrollEventListeners = null; - }, - removeControlSizeWatcher: function removeControlSizeWatcher() { - if (!this.controlSizeWatcher) return; - this.controlSizeWatcher.remove(); - this.controlSizeWatcher = null; - }, - updateWidth: function updateWidth() { - var instance = this.instance; - var $portalTarget = this.$el; - var $control = instance.getControl(); - var controlRect = $control.getBoundingClientRect(); - $portalTarget.style.width = controlRect.width + 'px'; - }, - updateMenuContainerOffset: function updateMenuContainerOffset() { - var instance = this.instance; - var $control = instance.getControl(); - var $portalTarget = this.$el; - var controlRect = $control.getBoundingClientRect(); - var portalTargetRect = $portalTarget.getBoundingClientRect(); - var offsetY = instance.menu.placement === 'bottom' ? controlRect.height : 0; - var left = Math.round(controlRect.left - portalTargetRect.left) + 'px'; - var top = Math.round(controlRect.top - portalTargetRect.top + offsetY) + 'px'; - var menuContainerStyle = this.$refs.menu.$refs['menu-container'].style; - var transformVariations = ['transform', 'webkitTransform', 'MozTransform', 'msTransform']; - var transform = find(transformVariations, function (t) { - return t in document.body.style; - }); - menuContainerStyle[transform] = "translate(".concat(left, ", ").concat(top, ")"); - } - }, - render: function render() { - var h = arguments[0]; - var instance = this.instance; - var portalTargetClass = ['vue-treeselect__portal-target', instance.wrapperClass]; - var portalTargetStyle = { - zIndex: instance.zIndex - }; - return h("div", { - "class": portalTargetClass, - style: portalTargetStyle, - attrs: { - "data-instance-id": instance.getInstanceId() - } - }, [h(Menu, { - ref: "menu" - })]); - }, - destroyed: function destroyed() { - this.removeHandlers(); - } -}; -var placeholder; -/* harmony default export */ var MenuPortalvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--menu-portal', - created: function created() { - this.portalTarget = null; - }, - mounted: function mounted() { - this.setup(); - }, - destroyed: function destroyed() { - this.teardown(); - }, - methods: { - setup: function setup() { - var el = document.createElement('div'); - document.body.appendChild(el); - this.portalTarget = new external_vue_default.a(MenuPortalvue_type_script_lang_js_objectSpread({ - el: el, - parent: this - }, PortalTarget)); - }, - teardown: function teardown() { - document.body.removeChild(this.portalTarget.$el); - this.portalTarget.$el.innerHTML = ''; - this.portalTarget.$destroy(); - this.portalTarget = null; - } - }, - render: function render() { - var h = arguments[0]; - if (!placeholder) placeholder = h("div", { - "class": "vue-treeselect__menu-placeholder" - }); - return placeholder; - } -}); -// CONCATENATED MODULE: ./src/components/MenuPortal.vue?vue&type=script&lang=js& - /* harmony default export */ var components_MenuPortalvue_type_script_lang_js_ = (MenuPortalvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/MenuPortal.vue -var MenuPortal_render, MenuPortal_staticRenderFns - - - - -/* normalize component */ - -var MenuPortal_component = normalizeComponent( - components_MenuPortalvue_type_script_lang_js_, - MenuPortal_render, - MenuPortal_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var MenuPortal_api; } -MenuPortal_component.options.__file = "src/components/MenuPortal.vue" -/* harmony default export */ var MenuPortal = (MenuPortal_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Treeselect.vue?vue&type=script&lang=js& - - - - - -/* harmony default export */ var Treeselectvue_type_script_lang_js_ = ({ - name: 'vue-treeselect', - mixins: [treeselectMixin], - computed: { - wrapperClass: function wrapperClass() { - return { - 'vue-treeselect': true, - 'vue-treeselect--single': this.single, - 'vue-treeselect--multi': this.multiple, - 'vue-treeselect--searchable': this.searchable, - 'vue-treeselect--disabled': this.disabled, - 'vue-treeselect--focused': this.trigger.isFocused, - 'vue-treeselect--has-value': this.hasValue, - 'vue-treeselect--open': this.menu.isOpen, - 'vue-treeselect--open-above': this.menu.placement === 'top', - 'vue-treeselect--open-below': this.menu.placement === 'bottom', - 'vue-treeselect--branch-nodes-disabled': this.disableBranchNodes, - 'vue-treeselect--append-to-body': this.appendToBody - }; - } - }, - render: function render() { - var h = arguments[0]; - return h("div", { - ref: "wrapper", - "class": this.wrapperClass - }, [h(HiddenFields), h(Control, { - ref: "control" - }), this.appendToBody ? h(MenuPortal, { - ref: "portal" - }) : h(Menu, { - ref: "menu" - })]); - } -}); -// CONCATENATED MODULE: ./src/components/Treeselect.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Treeselectvue_type_script_lang_js_ = (Treeselectvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Treeselect.vue -var Treeselect_render, Treeselect_staticRenderFns - - - - -/* normalize component */ - -var Treeselect_component = normalizeComponent( - components_Treeselectvue_type_script_lang_js_, - Treeselect_render, - Treeselect_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Treeselect_api; } -Treeselect_component.options.__file = "src/components/Treeselect.vue" -/* harmony default export */ var Treeselect = (Treeselect_component.exports); -// EXTERNAL MODULE: ./src/style.less -var style = __webpack_require__(15); - -// CONCATENATED MODULE: ./src/index.js - - - -/* harmony default export */ var src = __webpack_exports__["default"] = (Treeselect); - - -var VERSION = "0.4.0"; - -/***/ }) -/******/ ]); -//# sourceMappingURL=vue-treeselect.cjs.js.map \ No newline at end of file diff --git a/dist/vue-treeselect.cjs.js.map b/dist/vue-treeselect.cjs.js.map deleted file mode 100644 index 5054b400..00000000 --- a/dist/vue-treeselect.cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/external \"@babel/runtime/helpers/slicedToArray\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/toConsumableArray\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/defineProperty\"","webpack://VueTreeselect/external \"lodash/noop\"","webpack://VueTreeselect/external \"lodash/debounce\"","webpack://VueTreeselect/external \"watch-size\"","webpack://VueTreeselect/external \"is-promise\"","webpack://VueTreeselect/external \"lodash/once\"","webpack://VueTreeselect/external \"lodash/identity\"","webpack://VueTreeselect/external \"lodash/constant\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/typeof\"","webpack://VueTreeselect/external \"lodash/last\"","webpack://VueTreeselect/external \"fuzzysearch\"","webpack://VueTreeselect/external \"babel-helper-vue-jsx-merge-props\"","webpack://VueTreeselect/external \"vue\"","webpack://VueTreeselect/./src/style.less?1f4a","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/utils/index.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./src/components/HiddenFields.vue?750c","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue?449d","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/Placeholder.vue?238d","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/SingleValue.vue?5aaa","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?ada5","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue?9a1f","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/MultiValue.vue?6f61","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?525a","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Control.vue?57ab","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/./src/components/Tip.vue?5960","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue?0a09","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue?c349","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue?ca92","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/components/Treeselect.vue?85a0","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["warning","process","env","NODE_ENV","noop","checker","complainer","message","concat","console","error","onLeftClick","mouseDownHandler","onMouseDown","evt","type","button","args","call","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","removeFromArray","arr","elem","idx","indexOf","splice","intervalId","registered","INTERVAL_DURATION","run","setInterval","forEach","test","stop","clearInterval","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","unwatch","length","push","watchSize","isIE9","document","documentMode","locked","wrappedListener","implementation","watchSizeForBrowsersOtherThanIE9","removeSizeWatcher","findScrollParents","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","isScrollElment","window","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","addEventListener","passive","scrollParent","removeEventListeners","removeEventListener","$scrollParent","isNaN","x","createMap","Object","create","isPlainObject","value","getPrototypeOf","prototype","copy","obj","key","deepExtend","target","source","keys","i","len","includes","arrOrStr","find","predicate","ctx","undefined","quickDiff","arrA","arrB","NO_PARENT_NODE","UNCHECKED","INDETERMINATE","CHECKED","ALL_CHILDREN","ALL_DESCENDANTS","LEAF_CHILDREN","LEAF_DESCENDANTS","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","ALL","BRANCH_PRIORITY","LEAF_PRIORITY","ALL_WITH_INDETERMINATE","ORDER_SELECTED","LEVEL","INDEX","KEY_CODES","BACKSPACE","ENTER","ESCAPE","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DELETE","INPUT_DEBOUNCE_DELAY","MIN_INPUT_WIDTH","MENU_BUFFER","sortValueByIndex","a","b","level","index","sortValueByLevel","createAsyncOptionsStates","isLoaded","isLoading","loadingError","slugify","str","map","e","o","u","toLowerCase","pattern","replace","RegExp","stringifyOptionPropValue","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","limitTextDefault","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","name","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","acceptableValues","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","hasChanged","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propNames","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","label","enhancedNormalizer","fallbackNode","isFallbackNode","isDisabled","isNew","$set","defaultNode","valueArray","matched","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","isClickedOnValueContainer","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","ref","portal","portalTarget","$menu","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","Treeselect","VERSION","PKG_VERSION"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,iE;;;;;;ACAA,qE;;;;;;ACAA,kE;;;;;;ACAA,wC;;;;;;ACAA,4C;;;;;;ACAA,uC;;;;;;ACAA,uC;;;;;;ACAA,wC;;;;;;ACAA,4C;;;;;;ACAA,4C;;;;;;ACAA,0D;;;;;;ACAA,wC;;;;;;ACAA,wC;;;;;;ACAA,6D;;;;;;ACAA,gC;;;;;;ACAA,uC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAEO,IAAMA,eAAO,GAAGC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GACQC,cADR,GAEnB,SAASJ,OAAT,CAAiBK,OAAjB,EAA0BC,UAA1B,EAAsC;AACtC,MAAI,CA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KA,CALA,EAKA,OALA,EAKA;AAAA;AAAA,QACA,QADA,GACA,kBADA,CACA,QADA;AAGA;AAEA;AAEA,uEACA,0CADA;AAIA;AAAA,aACA;AAAA;AAAA;AACA;AADA;AAAA;AAAA,mBAEA;AAFA;AAGA;AAHA,QADA;AAAA;AAOA;AAvBA,G;;ACXwN,CAAgB,wHAAG,EAAC,C;;ACA5O;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC5FA,IAAI,mBAAM;AACsD;AACL;;;AAG3D;AAC0F;AAC1F,gBAAgB,kBAAU;AAC1B,EAAE,+CAAM;AACR,EAAE,mBAAM;AACR;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAYf;AACD;AACe,kE;;;;;;;AChCf;AACA;AAEA,oCACA,eADA,EAEA,aAFA,EAGA,cAHA,EAIA,oBAJA,EAKA,kBALA,EAMA,qBANA,EAOA,oBAPA;AAUA;AACA,+BADA;AAEA,sBAFA;AAIA;AAAA;AACA,iCADA;AAEA;AAFA;AAAA,GAJA;AASA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA,uBACA,kBADA,IAEA,iBAHA;AAKA,KATA;AAWA,cAXA,wBAWA;AACA;AACA;AADA;AAGA;AAfA,GATA;AA2BA;AACA,kCADA,sCACA,QADA,EACA;AACA;AACA,KAHA;AAKA,SALA,mBAKA;AAEA;AACA;AARA,GA3BA;AAsCA,SAtCA,qBAsCA;AACA,gDACA,sBADA,EAEA,gCAFA,EAGA;AAAA;AAAA;AAAA,KAHA;AAKA,GA5CA;AA8CA;AACA,SADA,mBACA;AACA;AACA;AAAA;AAAA;AADA;AAGA,KALA;AAOA,SAPA,mBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA;AACA,KAbA;AAeA,QAfA,kBAeA;AACA;AACA,KAjBA;AAmBA,WAnBA,qBAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA;AACA,KAzBA;AA2BA,UA3BA,oBA2BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;;AAIA;AACA;AACA;;AAEA;AACA;AACA,KAvCA;AAyCA,WAzCA,mBAyCA,GAzCA,EAyCA;AAAA,UACA,KADA,GACA,UADA,CACA,KADA;AAGA;;AAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KApDA;AAuDA,aAvDA,qBAuDA,GAvDA,EAuDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAIA;AAEA,oEACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA,aAHA,MAGA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AA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;AAyBA;AACA,gBADA,0BACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA,sCADA;AAEA,2DAFA;AAGA,qEAHA;AAIA,+DAJA;AAKA,wFALA;AAMA;AANA;AASA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAEA,2BACA,8BACA,qBADA,EADA,EAIA,kBAJA,EAFA,EADA;AAWA,KAvBA;AAyBA,wBAzBA,kCAyBA;AAAA;AACA;AAEA,aACA;AAAA;AAAA,UACA,uBADA,EAEA,0BAFA,EAGA,+BAHA,EAIA,oCAJA,EADA;AAQA,KApCA;AAsCA,eAtCA,yBAsCA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;;AAEA;AACA;AACA;AACA,yDADA;AAEA;AAFA;AADA;AAMA;AACA,8CADA;AAEA;AAFA;AAKA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,YACA,kCACA;AAAA;AAAA,UADA,EADA,EADA;AAOA;;AAKA;AACA,kDACA;AAAA;AAAA,oBADA;AAIA;AACA;;AAEA;AACA,KA5EA;AA8EA,wBA9EA,gCA8EA,QA9EA,EA8EA;AAAA;AACA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KApFA;AAsFA,2BAtFA,mCAsFA,QAtFA,EAsFA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAEA,aACA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KAjGA;AAmGA,kBAnGA,4BAmGA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA;AACA,wCADA;AAEA,qEAFA;AAGA,iFAHA;AAIA,yEAJA;AAKA;AALA;AAQA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A,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAKA;AAEA;AACA,KArNA;AAuNA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA,CAvNA;AA6NA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KARA,CA7NA;AAuOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA;AAvOA,GAzBA;AAuQA,QAvQA,oBAuQA;AAAA;AAAA,QACA,IADA,GACA,IADA,CACA,IADA;AAEA;;AACA;AACA;AADA,8CAEA,WAFA,GAEA,IAFA;;AAIA;AACA;AACA;AADA;AADA;AAMA;AAEA,WACA;AACA,4BADA;AAAA;AAEA,sBAFA;AAGA,qBAHA;AAIA;AAJA;AAAA,QAKA,mBALA,EAMA,iBACA,kCACA,2BADA,EAPA,EADA;AAcA;AApSA;AAwSA,2E;;AChTkN,CAAgB,4GAAG,EAAC,C;;ACAtO,IAAI,aAAM,EAAE,sBAAe;AAC+B;AACL;;;AAGrD;AAC0F;AAC1F,IAAI,gBAAS,GAAG,kBAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,aAAM;AACR,EAAE,sBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,mBAYf;AACD,gBAAS;AACM,sEAAS,Q;;AChCxB;AACA;AACA;AACA;AAEA;AACA,YADA;AAEA,kBAFA;AAGA,cAHA;AAIA;AAJA;AAOA;AACA,8BADA;AAEA,sBAFA;AAIA;AACA,aADA,uBACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA,KAPA;AASA,sBATA,gCASA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA;AAfA,GAJA;AAsBA;AACA,0BADA,8BACA,QADA,EACA;AACA;AAEA;AACA,OAHA,MAGA;AACA;AACA;AACA;AARA,GAtBA;AAiCA,SAjCA,qBAiCA;AACA;AACA;AACA,GApCA;AAsCA,SAtCA,qBAsCA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA1CA;AA4CA,WA5CA,uBA4CA;AACA;AACA,GA9CA;AAgDA;AACA,cADA,wBACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,uBADA,EAEA,iBACA,iCADA,GAEA,8BACA,iCADA,GAEA,4BANA,EAOA,sBAPA,EADA;AAWA,KAjBA;AAmBA,oBAnBA,8BAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,kCACA,oBADA,GAEA,IAFA;AAGA,KA1BA;AA4BA,mBA5BA,6BA4BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,iCACA,mBADA,GAEA,IAFA;AAGA,KAnCA;AAqCA,yBArCA,mCAqCA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAjDA;AAmDA,8BAnDA,wCAmDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAjEA;AAmEA,8BAnEA,wCAmEA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA,+DACA,KADA,GAEA,4CAFA;;AAIA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AAC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;AACA,iBADA,2BACA;AACA;AACA;AACA;AACA;AACA,KANA;AAQA,kBARA,4BAQA;AACA;AACA;AACA,KAXA;AAaA,6CAbA,uDAaA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AADA;AAGA,KAvBA;AAyBA,2BAzBA,qCAyBA;AAAA;;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AACA;;AACA;AACA,SAHA;AADA;AAMA,KAtCA;AAwCA,8CAxCA,wDAwCA;AACA;AAEA;AACA;AACA,KA7CA;AA+CA,4BA/CA,sCA+CA;AACA;AAEA;AACA;AACA,KApDA;AAsDA,eAtDA,yBAsDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AAEA;AACA,KA7DA;AA+DA,6BA/DA,uCA+DA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AA9EA,GA7BA;AA8GA,QA9GA,oBA8GA;AAAA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AAAA;AAAA;AAEA,WACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QACA;AAAA;AAAA,MADA,EADA;AAKA,GAxHA;AA0HA,WA1HA,uBA0HA;AACA;AACA;AA5HA;AA+HA;AAEA;AACA,qCADA;AAGA,SAHA,qBAGA;AACA;AACA,GALA;AAOA,SAPA,qBAOA;AACA;AACA,GATA;AAWA,WAXA,uBAWA;AACA;AACA,GAbA;AAeA;AACA,SADA,mBACA;AACA;AACA;AAEA;AACA,cADA;AAEA;AAFA,SAGA,YAHA;AAKA,KAVA;AAYA,YAZA,sBAYA;AACA;AACA;AAEA;AACA;AACA;AAlBA,GAfA;AAoCA,QApCA,oBAoCA;AAAA;AACA,oCACA;AAAA;AAAA,MADA;AAIA;AACA;AA1CA,G;;ACtIsN,CAAgB,oHAAG,EAAC,C;;ACA1O,IAAI,iBAAM,EAAE,0BAAe;AACmC;AACL;;;AAGzD;AAC0F;AAC1F,IAAI,oBAAS,GAAG,kBAAU;AAC1B,EAAE,6CAAM;AACR,EAAE,iBAAM;AACR,EAAE,0BAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;AChCxB;AACA;AACA;AACA;AACA;AAEA;AACA,wBADA;AAEA,2BAFA;AAIA;AACA,gBADA,0BACA;AACA;AACA,8BADA;AAEA,6CAFA;AAGA,8CAHA;AAIA,qDAJA;AAKA,iDALA;AAMA,yDANA;AAOA,kDAPA;AAQA,gDARA;AASA,mEATA;AAUA,sEAVA;AAWA,wEAXA;AAYA;AAZA;AAcA;AAhBA,GAJA;AAuBA,QAvBA,oBAuBA;AAAA;AACA,WACA;AAAA;AAAA;AAAA,QACA,eADA,EAEA;AAAA;AAAA,MAFA,EAGA;AAAA;AAAA;AAAA;AAAA,MAHA,EADA;AAOA;AA/BA,G;;ACPsN,CAAgB,oHAAG,EAAC,C;;ACA1O,IAAI,iBAAM,EAAE,0BAAe;AACmC;AACL;;;AAGzD;AAC0F;AAC1F,IAAI,oBAAS,GAAG,kBAAU;AAC1B,EAAE,6CAAM;AACR,EAAE,iBAAM;AACR,EAAE,0BAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;;;;ACjCxB;AACA;AACA;AAEe+G,mFAAf;AACA;AACA;AAOO,IAAMC,OAAO,GAAGC,OAAhB,C","file":"vue-treeselect.cjs.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"lodash/noop\");","module.exports = require(\"lodash/debounce\");","module.exports = require(\"watch-size\");","module.exports = require(\"is-promise\");","module.exports = require(\"lodash/once\");","module.exports = require(\"lodash/identity\");","module.exports = require(\"lodash/constant\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"lodash/last\");","module.exports = require(\"fuzzysearch\");","module.exports = require(\"babel-helper-vue-jsx-merge-props\");","module.exports = require(\"vue\");","// extracted by mini-css-extract-plugin","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// ========================\r\n// Debugging Helpers\r\n// ========================\r\n\r\nexport { warning } from './warning'\r\n\r\n// ========================\r\n// DOM Utilities\r\n// ========================\r\n\r\nexport { onLeftClick } from './onLeftClick'\r\nexport { scrollIntoView } from './scrollIntoView'\r\nexport { debounce } from './debounce'\r\nexport { watchSize } from './watchSize'\r\nexport { setupResizeAndScrollEventListeners } from './setupResizeAndScrollEventListeners'\r\n\r\n// ========================\r\n// Language Helpers\r\n// ========================\r\n\r\nexport { isNaN } from './isNaN'\r\nexport { isPromise } from './isPromise'\r\nexport { once } from './once'\r\nexport { noop } from './noop'\r\nexport { identity } from './identity'\r\nexport { constant } from './constant'\r\nexport { createMap } from './createMap'\r\nexport { deepExtend } from './deepExtend'\r\nexport { last } from './last'\r\nexport { includes } from './includes'\r\nexport { find } from './find'\r\nexport { removeFromArray } from './removeFromArray'\r\n\r\n// ========================\r\n// Other Utilities\r\n// ========================\r\n\r\nexport { quickDiff } from './quickDiff'\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.cjs.min.js b/dist/vue-treeselect.cjs.min.js deleted file mode 100644 index c221f804..00000000 --- a/dist/vue-treeselect.cjs.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee - * Released under the MIT License. - * https://vue-treeselect.js.org/ - */ -module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=16)}([function(e,t){e.exports=require("@babel/runtime/helpers/defineProperty")},function(e,t){e.exports=require("babel-helper-vue-jsx-merge-props")},function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("lodash/noop")},function(e,t){e.exports=require("lodash/debounce")},function(e,t){e.exports=require("is-promise")},function(e,t){e.exports=require("lodash/once")},function(e,t){e.exports=require("lodash/identity")},function(e,t){e.exports=require("lodash/constant")},function(e,t){e.exports=require("lodash/last")},function(e,t){e.exports=require("@babel/runtime/helpers/slicedToArray")},function(e,t){e.exports=require("watch-size")},function(e,t){e.exports=require("@babel/runtime/helpers/typeof")},function(e,t){e.exports=require("fuzzysearch")},function(e,t){e.exports=require("vue")},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"Treeselect",(function(){return it})),n.d(t,"treeselectMixin",(function(){return he})),n.d(t,"LOAD_ROOT_OPTIONS",(function(){return W})),n.d(t,"LOAD_CHILDREN_OPTIONS",(function(){return q})),n.d(t,"ASYNC_SEARCH",(function(){return Q})),n.d(t,"VERSION",(function(){return rt}));var i=n(10),r=n.n(i),s=n(2),o=n.n(s),a=n(0),l=n.n(a),c=n(3),u=n.n(c).a;function d(e){return function(t){if("mousedown"===t.type&&0===t.button){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rn.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight):i.top-r0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"==typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){j(e,t)&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue();j(e,this.internalValue)&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(u((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||u((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&u((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"].forEach((function(t){u((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=R(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(null,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return u((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n={id:e,label:this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),ancestors:[],parentNode:null,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};return"id"===this.valueFormat?n:H(this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],(function(n){return n&&t.enhancedNormalizer(n).id===e}))||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||"ALL"===this.valueConsistsOf)n=e;else if("BRANCH_PRIORITY"===this.valueConsistsOf)e.forEach((function(e){n.push(e);var i=t.getNode(e);i.isBranch&&t.traverseDescendantsBFS(i,(function(e){n.push(e.id)}))}));else if("LEAF_PRIORITY"===this.valueConsistsOf)for(var i=R(),r=e.slice();r.length;){var s=r.shift(),o=this.getNode(s);n.push(s),o.isRootNode||(o.parentNode.id in i||(i[o.parentNode.id]=o.parentNode.children.length),0==--i[o.parentNode.id]&&r.push(o.parentNode.id))}else if("ALL_WITH_INDETERMINATE"===this.valueConsistsOf)for(var a=R(),l=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));l.length;){var c=l.shift(),u=this.getNode(c);n.push(c),u.isRootNode||(u.parentNode.id in a||(a[u.parentNode.id]=u.parentNode.children.length),0==--a[u.parentNode.id]&&l.push(u.parentNode.id))}j(this.forest.selectedNodeIds,n)&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var i=oe({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,i)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch)for(var n=e.children.slice();n.length;){var i=n[0];i.isBranch&&n.push.apply(n,o()(i.children)),t(i),n.shift()}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){!function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))}({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:d((function(e){(e.preventDefault(),e.stopPropagation(),this.disabled)||(this.getValueContainer().$el.contains(e.target)&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags())})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},l()(n,"ALL_CHILDREN",0),l()(n,"ALL_DESCENDANTS",0),l()(n,"LEAF_CHILDREN",0),l()(n,"LEAF_DESCENDANTS",0),n)))}));var i=t.trim().toLocaleLowerCase(),r=i.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&r.length>1?t.isMatched=r.every((function(e){return ce(!1,!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return ce(!e.disableFuzzyMatching,e.replaceAccents,i,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].ALL_DESCENDANTS++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].LEAF_DESCENDANTS++})),null!==t.parentNode&&(e.localSearch.countMap[t.parentNode.id].ALL_CHILDREN+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id].LEAF_CHILDREN+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&null!==t.parentNode&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),i=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return i();this.callLoadOptionsProp({action:Q,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(r){n.isLoaded=!0,n.options=r,e.trigger.searchQuery===t&&i()},fail:function(e){n.loadingError=ue(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=(this.appendToBody?this.$refs.portal.portalTarget:this).$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.menu.current;if(null!=i&&i in this.forest.nodeMap&&(this.forest.nodeMap[i].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var r=function(){var n=t.getMenu(),i=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));i&&h(n,i)};this.getMenu()?r():this.$nextTick(r)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=F()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch)&&(e.showAllChildrenOnSearch=!0):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=R();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=R();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=0})),this.selectedNodes.forEach((function(t){n[t.id]=2,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=1)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return oe({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var i=this,s=t.map((function(e){return[i.enhancedNormalizer(e),e]})).map((function(t,s){var o=r()(t,2),a=o[0],c=o[1];i.checkDuplication(a),i.verifyNodeShape(a);var d=a.id,h=a.label,p=a.children,f=a.isDefaultExpanded,v=null===e,m=v?0:e.level+1,g=Array.isArray(p)||null===p,S=!g,O=!!a.isDisabled||!i.flat&&!v&&e.isDisabled,y=!!a.isNew,b=i.matchKeys.reduce((function(e,t){return oe({},e,l()({},t,(n=a[t],"string"==typeof n?n:"number"!=typeof n||L(n)?"":n+"").toLocaleLowerCase()));var n}),{}),_=v?b.label:e.nestedSearchLabel+" "+b.label,E=i.$set(i.forest.nodeMap,d,R());if(i.$set(E,"id",d),i.$set(E,"label",h),i.$set(E,"level",m),i.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),i.$set(E,"index",(v?[]:e.index).concat(s)),i.$set(E,"parentNode",e),i.$set(E,"lowerCased",b),i.$set(E,"nestedSearchLabel",_),i.$set(E,"isDisabled",O),i.$set(E,"isNew",y),i.$set(E,"isMatched",!1),i.$set(E,"isHighlighted",!1),i.$set(E,"isBranch",g),i.$set(E,"isLeaf",S),i.$set(E,"isRootNode",v),i.$set(E,"raw",c),g){var N,w=Array.isArray(p);i.$set(E,"childrenStates",oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{isLoaded:w})),i.$set(E,"isExpanded","boolean"==typeof f?f:ms+40,c=a>s+40;r.top>=0&&r.top<=o||r.top<0&&r.bottom>0?"auto"!==e.openDirection?e.menu.placement=Qe[e.openDirection]:e.menu.placement=l||!c?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:_(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:N(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},void 0,void 0,!1,null,null,null);Ye.options.__file="src/components/Menu.vue";var Ke=Ye.exports,Xe=n(14),Ue=n.n(Xe);function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Ge,Ze={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){this.instance.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:N(e,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:_(t,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl().getBoundingClientRect();t.style.width=n.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),s="bottom"===e.menu.placement?i.height:0,o=Math.round(i.left-r.left)+"px",a=Math.round(i.top-r.top+s)+"px";this.$refs.menu.$refs["menu-container"].style[H(["transform","webkitTransform","MozTransform","msTransform"],(function(e){return e in document.body.style}))]="translate(".concat(o,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],i={zIndex:t.zIndex};return e("div",{class:n,style:i,attrs:{"data-instance-id":t.getInstanceId()}},[e(Ke,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},et=fe({name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new Ue.a(function(e){for(var t=1;t scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","\r\n","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","\r\n","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.css b/dist/vue-treeselect.css deleted file mode 100644 index c84d2a6c..00000000 --- a/dist/vue-treeselect.css +++ /dev/null @@ -1,952 +0,0 @@ -/*! - * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee - * Released under the MIT License. - * https://vue-treeselect.js.org/ - */ -/** - * Dependencies - */ -/** - * Variables - */ -/** - * Mixins - */ -/** - * Helpers - */ -.vue-treeselect-helper-hide { - display: none; -} -.vue-treeselect-helper-zoom-effect-off { - -ms-transform: none !important; - transform: none !important; -} -/** - * Animations - */ -@keyframes vue-treeselect-animation-fade-in { - 0% { - opacity: 0; - } -} -@keyframes vue-treeselect-animation-bounce { - 0%, - 100% { - transform: scale(0); - } - 50% { - transform: scale(1); - } -} -@keyframes vue-treeselect-animation-rotate { - 100% { - transform: rotate(360deg); - } -} -/** - * Transitions - */ -.vue-treeselect__multi-value-item--transition-enter-active, -.vue-treeselect__multi-value-item--transition-leave-active { - transition-duration: 200ms; - transition-property: transform, opacity; -} -.vue-treeselect__multi-value-item--transition-enter-active { - transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); -} -.vue-treeselect__multi-value-item--transition-leave-active { - transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); - position: absolute; -} -.vue-treeselect__multi-value-item--transition-enter, -.vue-treeselect__multi-value-item--transition-leave-to { - -ms-transform: scale(0.7); - transform: scale(0.7); - opacity: 0; -} -.vue-treeselect__multi-value-item--transition-move { - transition: 200ms transform cubic-bezier(0.165, 0.84, 0.44, 1); -} -/** - * Namespace - */ -.vue-treeselect { - position: relative; - text-align: left; -} -[dir="rtl"] .vue-treeselect { - text-align: right; -} -.vue-treeselect div, -.vue-treeselect span { - box-sizing: border-box; -} -.vue-treeselect svg { - fill: currentColor; -} -/** - * Control - */ -.vue-treeselect__control { - padding-left: 5px; - padding-right: 5px; - display: table; - table-layout: fixed; - width: 100%; - height: 36px; - border: 1px solid #ddd; - border-radius: 5px; - background: #fff; - transition-duration: 200ms; - transition-property: border-color, box-shadow, width, height, background-color, opacity; - transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); -} -.vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) .vue-treeselect__control:hover { - border-color: #cfcfcf; -} -.vue-treeselect--focused:not(.vue-treeselect--open) .vue-treeselect__control { - border-color: #039be5; - box-shadow: 0 0 0 3px rgba(3, 155, 229, 0.1); -} -.vue-treeselect--disabled .vue-treeselect__control { - background-color: #f9f9f9; -} -.vue-treeselect--open .vue-treeselect__control { - border-color: #cfcfcf; -} -.vue-treeselect--open.vue-treeselect--open-below .vue-treeselect__control { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; -} -.vue-treeselect--open.vue-treeselect--open-above .vue-treeselect__control { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.vue-treeselect__value-container, -.vue-treeselect__multi-value { - width: 100%; - vertical-align: middle; -} -.vue-treeselect__value-container { - display: table-cell; - position: relative; -} -.vue-treeselect--searchable:not(.vue-treeselect--disabled) .vue-treeselect__value-container { - cursor: text; -} -.vue-treeselect__multi-value { - display: inline-block; -} -.vue-treeselect--has-value .vue-treeselect__multi-value { - margin-bottom: 5px; -} -.vue-treeselect__placeholder, -.vue-treeselect__single-value { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - padding-left: 5px; - padding-right: 5px; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - line-height: 34px; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; - pointer-events: none; -} -.vue-treeselect__placeholder { - color: #bdbdbd; -} -.vue-treeselect__single-value { - color: #333; -} -.vue-treeselect--focused.vue-treeselect--searchable .vue-treeselect__single-value { - color: #bdbdbd; -} -.vue-treeselect--disabled .vue-treeselect__single-value { - position: static; -} -.vue-treeselect__multi-value-item-container { - display: inline-block; - padding-top: 5px; - padding-right: 5px; - vertical-align: top; -} -[dir="rtl"] .vue-treeselect__multi-value-item-container { - padding-right: 0; - padding-left: 5px; -} -.vue-treeselect__multi-value-item { - cursor: pointer; - display: inline-table; - background: #e3f2fd; - padding: 2px 0; - border: 1px solid transparent; - border-radius: 2px; - color: #039be5; - font-size: 12px; - vertical-align: top; -} -.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-disabled):hover .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new):hover { - cursor: pointer; - background: #e3f2fd; - color: #039be5; -} -.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-disabled { - cursor: default; - background: #f5f5f5; - color: #757575; -} -.vue-treeselect--disabled .vue-treeselect__multi-value-item { - cursor: default; - background: #fff; - border-color: #e5e5e5; - color: #555; -} -.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new { - background: #e8f5e9; -} -.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new:hover { - background: #e8f5e9; -} -.vue-treeselect__value-remove, -.vue-treeselect__multi-value-label { - display: table-cell; - padding: 0 5px; - vertical-align: middle; -} -.vue-treeselect__value-remove { - color: #039be5; - padding-left: 5px; - border-left: 1px solid #fff; - line-height: 0; -} -[dir="rtl"] .vue-treeselect__value-remove { - border-left: 0 none; - border-right: 1px solid #fff; -} -.vue-treeselect__multi-value-item:hover .vue-treeselect__value-remove { - color: #e53935; -} -.vue-treeselect--disabled .vue-treeselect__value-remove, -.vue-treeselect__multi-value-item-disabled .vue-treeselect__value-remove { - display: none; -} -.vue-treeselect__value-remove > svg { - width: 6px; - height: 6px; -} -.vue-treeselect__multi-value-label { - padding-right: 5px; - white-space: pre-line; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; -} -.vue-treeselect__limit-tip { - display: inline-block; - padding-top: 5px; - padding-right: 5px; - vertical-align: top; -} -[dir="rtl"] .vue-treeselect__limit-tip { - padding-right: 0; - padding-left: 5px; -} -.vue-treeselect__limit-tip-text { - cursor: default; - display: block; - margin: 2px 0; - padding: 1px 0; - color: #bdbdbd; - font-size: 12px; - font-weight: 600; -} -.vue-treeselect__input-container { - display: block; - max-width: 100%; - outline: none; -} -.vue-treeselect--single .vue-treeselect__input-container { - font-size: inherit; - height: 100%; -} -.vue-treeselect--multi .vue-treeselect__input-container { - display: inline-block; - font-size: 12px; - vertical-align: top; -} -.vue-treeselect--searchable .vue-treeselect__input-container { - padding-left: 5px; - padding-right: 5px; -} -.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container { - padding-top: 5px; - padding-left: 0; -} -[dir="rtl"] .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container { - padding-left: 5px; - padding-right: 0; -} -.vue-treeselect--disabled .vue-treeselect__input-container { - display: none; -} -.vue-treeselect__input, -.vue-treeselect__sizer { - margin: 0; - line-height: inherit; - font-family: inherit; - font-size: inherit; -} -.vue-treeselect__input { - max-width: 100%; - margin: 0; - padding: 0; - border: 0; - outline: none; - box-sizing: content-box; - box-shadow: none; - background: none transparent; - line-height: 1; - vertical-align: middle; -} -.vue-treeselect__input::-ms-clear { - display: none; -} -.vue-treeselect--single .vue-treeselect__input { - width: 100%; - height: 100%; -} -.vue-treeselect--multi .vue-treeselect__input { - padding-top: 3px; - padding-bottom: 3px; -} -.vue-treeselect--has-value .vue-treeselect__input { - line-height: inherit; - vertical-align: top; -} -.vue-treeselect__sizer { - position: absolute; - top: 0; - left: 0; - visibility: hidden; - height: 0; - overflow: scroll; - white-space: pre; -} -.vue-treeselect__x-container { - display: table-cell; - vertical-align: middle; - width: 20px; - text-align: center; - line-height: 0; - cursor: pointer; - color: #ccc; - animation: 200ms vue-treeselect-animation-fade-in cubic-bezier(0.075, 0.82, 0.165, 1); -} -.vue-treeselect__x-container:hover { - color: #e53935; -} -.vue-treeselect__x { - width: 8px; - height: 8px; -} -.vue-treeselect__control-arrow-container { - display: table-cell; - vertical-align: middle; - width: 20px; - text-align: center; - line-height: 0; - cursor: pointer; -} -.vue-treeselect--disabled .vue-treeselect__control-arrow-container { - cursor: default; -} -.vue-treeselect__control-arrow { - width: 9px; - height: 9px; - color: #ccc; -} -.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover .vue-treeselect__control-arrow { - color: #616161; -} -.vue-treeselect--disabled .vue-treeselect__control-arrow { - opacity: 0.35; -} -.vue-treeselect__control-arrow--rotated { - -ms-transform: rotate(180deg); - transform: rotateZ(180deg); -} -/** - * Menu - */ -.vue-treeselect__menu-container { - position: absolute; - left: 0; - width: 100%; - overflow: visible; - transition: 0s; -} -.vue-treeselect--open-below:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container { - top: 100%; -} -.vue-treeselect--open-above:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container { - bottom: 100%; -} -.vue-treeselect__menu { - cursor: default; - padding-top: 5px; - padding-bottom: 5px; - display: block; - position: absolute; - overflow-x: hidden; - overflow-y: auto; - width: auto; - border: 1px solid #cfcfcf; - background: #fff; - line-height: 180%; - -webkit-overflow-scrolling: touch; -} -.vue-treeselect--open-below .vue-treeselect__menu { - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - top: 0; - margin-top: -1px; - border-top-color: #f2f2f2; - box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); -} -.vue-treeselect--open-above .vue-treeselect__menu { - border-top-left-radius: 5px; - border-top-right-radius: 5px; - bottom: 0; - margin-bottom: -1px; - border-bottom-color: #f2f2f2; -} -.vue-treeselect__indent-level-0 .vue-treeselect__option { - padding-left: 5px; -} -[dir="rtl"] .vue-treeselect__indent-level-0 .vue-treeselect__option { - padding-left: 5px; - padding-right: 5px; -} -.vue-treeselect__indent-level-0 .vue-treeselect__tip { - padding-left: 25px; -} -[dir="rtl"] .vue-treeselect__indent-level-0 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 25px; -} -.vue-treeselect__indent-level-1 .vue-treeselect__option { - padding-left: 25px; -} -[dir="rtl"] .vue-treeselect__indent-level-1 .vue-treeselect__option { - padding-left: 5px; - padding-right: 25px; -} -.vue-treeselect__indent-level-1 .vue-treeselect__tip { - padding-left: 45px; -} -[dir="rtl"] .vue-treeselect__indent-level-1 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 45px; -} -.vue-treeselect__indent-level-2 .vue-treeselect__option { - padding-left: 45px; -} -[dir="rtl"] .vue-treeselect__indent-level-2 .vue-treeselect__option { - padding-left: 5px; - padding-right: 45px; -} -.vue-treeselect__indent-level-2 .vue-treeselect__tip { - padding-left: 65px; -} -[dir="rtl"] .vue-treeselect__indent-level-2 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 65px; -} -.vue-treeselect__indent-level-3 .vue-treeselect__option { - padding-left: 65px; -} -[dir="rtl"] .vue-treeselect__indent-level-3 .vue-treeselect__option { - padding-left: 5px; - padding-right: 65px; -} -.vue-treeselect__indent-level-3 .vue-treeselect__tip { - padding-left: 85px; -} -[dir="rtl"] .vue-treeselect__indent-level-3 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 85px; -} -.vue-treeselect__indent-level-4 .vue-treeselect__option { - padding-left: 85px; -} -[dir="rtl"] .vue-treeselect__indent-level-4 .vue-treeselect__option { - padding-left: 5px; - padding-right: 85px; -} -.vue-treeselect__indent-level-4 .vue-treeselect__tip { - padding-left: 105px; -} -[dir="rtl"] .vue-treeselect__indent-level-4 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 105px; -} -.vue-treeselect__indent-level-5 .vue-treeselect__option { - padding-left: 105px; -} -[dir="rtl"] .vue-treeselect__indent-level-5 .vue-treeselect__option { - padding-left: 5px; - padding-right: 105px; -} -.vue-treeselect__indent-level-5 .vue-treeselect__tip { - padding-left: 125px; -} -[dir="rtl"] .vue-treeselect__indent-level-5 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 125px; -} -.vue-treeselect__indent-level-6 .vue-treeselect__option { - padding-left: 125px; -} -[dir="rtl"] .vue-treeselect__indent-level-6 .vue-treeselect__option { - padding-left: 5px; - padding-right: 125px; -} -.vue-treeselect__indent-level-6 .vue-treeselect__tip { - padding-left: 145px; -} -[dir="rtl"] .vue-treeselect__indent-level-6 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 145px; -} -.vue-treeselect__indent-level-7 .vue-treeselect__option { - padding-left: 145px; -} -[dir="rtl"] .vue-treeselect__indent-level-7 .vue-treeselect__option { - padding-left: 5px; - padding-right: 145px; -} -.vue-treeselect__indent-level-7 .vue-treeselect__tip { - padding-left: 165px; -} -[dir="rtl"] .vue-treeselect__indent-level-7 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 165px; -} -.vue-treeselect__indent-level-8 .vue-treeselect__option { - padding-left: 165px; -} -[dir="rtl"] .vue-treeselect__indent-level-8 .vue-treeselect__option { - padding-left: 5px; - padding-right: 165px; -} -.vue-treeselect__indent-level-8 .vue-treeselect__tip { - padding-left: 185px; -} -[dir="rtl"] .vue-treeselect__indent-level-8 .vue-treeselect__tip { - padding-left: 5px; - padding-right: 185px; -} -.vue-treeselect__option { - padding-left: 5px; - padding-right: 5px; - display: table; - table-layout: fixed; - width: 100%; -} -.vue-treeselect__option--highlight { - background: #f5f5f5; -} -.vue-treeselect--single .vue-treeselect__option--selected { - background: #e3f2fd; - font-weight: 600; -} -.vue-treeselect--single .vue-treeselect__option--selected:hover { - background: #e3f2fd; -} -.vue-treeselect__option--hide { - display: none; -} -.vue-treeselect__option-arrow-container, -.vue-treeselect__option-arrow-placeholder { - display: table-cell; - vertical-align: middle; - width: 20px; - text-align: center; - line-height: 0; -} -.vue-treeselect__option-arrow-container { - cursor: pointer; -} -.vue-treeselect__option-arrow { - display: inline-block; - width: 9px; - height: 9px; - color: #ccc; - vertical-align: middle; - transition: 200ms transform cubic-bezier(0.19, 1, 0.22, 1); - -ms-transform: rotate(-90deg); - transform: rotateZ(-90deg); -} -[dir="rtl"] .vue-treeselect__option-arrow { - -ms-transform: rotate(90deg); - transform: rotateZ(90deg); -} -.vue-treeselect__option-arrow-container:hover .vue-treeselect__option-arrow, -.vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover .vue-treeselect__option-arrow { - color: #616161; -} -.vue-treeselect__option-arrow--rotated { - -ms-transform: rotate(0); - transform: rotateZ(0); -} -[dir="rtl"] .vue-treeselect__option-arrow--rotated { - -ms-transform: rotate(0); - transform: rotateZ(0); -} -.vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter { - -ms-transform: rotate(-90deg) !important; - transform: rotateZ(-90deg) !important; -} -[dir="rtl"] .vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter { - -ms-transform: rotate(90deg) !important; - transform: rotateZ(90deg) !important; -} -.vue-treeselect__label-container { - display: table-cell; - vertical-align: middle; - cursor: pointer; - display: table; - width: 100%; - table-layout: fixed; - color: inherit; -} -.vue-treeselect__option--disabled .vue-treeselect__label-container { - cursor: not-allowed; - color: rgba(0, 0, 0, 0.25); -} -.vue-treeselect__checkbox-container { - display: table-cell; - width: 20px; - min-width: 20px; - height: 100%; - text-align: center; - vertical-align: middle; -} -.vue-treeselect__checkbox { - display: block; - margin: auto; - width: 12px; - height: 12px; - border-width: 1px; - border-style: solid; - border-radius: 2px; - position: relative; - transition: 200ms all cubic-bezier(0.075, 0.82, 0.165, 1); -} -.vue-treeselect__check-mark, -.vue-treeselect__minus-mark { - display: block; - position: absolute; - left: 1px; - top: 1px; - background-repeat: no-repeat; - opacity: 0; - transition: 200ms all ease; -} -.vue-treeselect__minus-mark { - width: 8px; - height: 8px; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=); - background-size: 8px 8px; -} -@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) { - .vue-treeselect__minus-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==); - } -} -@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - .vue-treeselect__minus-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==); - } -} -@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { - .vue-treeselect__minus-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAAD///////////////+PQt5oAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==); - } -} -.vue-treeselect__checkbox--indeterminate > .vue-treeselect__minus-mark { - opacity: 1; -} -.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAADi4uLh4eHOxeSRAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=); -} -@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) { - .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==); - } -} -@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==); - } -} -@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { - .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAADh4eHg4ODNzc3h4eEYfw2wAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==); - } -} -.vue-treeselect__check-mark { - width: 8px; - height: 8px; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAQlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////8IX9KGAAAAFXRSTlMA8u24NxILB+Tawb6jiH1zRz0xIQIIP3GUAAAAMklEQVQI1y3FtQEAMQDDQD+EGbz/qkEVOpyEOP6PudKjZNSXn4Jm2CKRdBKzSLsFWl8fMG0Bl6Jk1rMAAAAASUVORK5CYII=); - background-size: 8px 8px; - -ms-transform: scaleY(0.125); - transform: scaleY(0.125); -} -@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) { - .vue-treeselect__check-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC); - } -} -@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - .vue-treeselect__check-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC); - } -} -@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { - .vue-treeselect__check-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAWlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////9ZMre9AAAAHXRSTlMA/PiJhGNI9XlEHJB/b2ldV08+Oibk49vPp6QhAYgGBuwAAACCSURBVCjPrdHdDoIwDAXgTWAqCigo/+f9X5OwnoUwtis4V92XNWladUl+rzQPeQJAN2EHxoOnsPn7/oYk8fxBv08Rr/deOH/aZ2Nm8ZJ+s573QGfWKnNuZGzWm3+lv2V3pcU1XQ385/yjmBoM3Z+dXvlbYLLD3ujhTaOM3KaIXvNkFkuSEvYy1LqOAAAAAElFTkSuQmCC); - } -} -.vue-treeselect__checkbox--checked > .vue-treeselect__check-mark { - opacity: 1; - -ms-transform: scaleY(1); - transform: scaleY(1); -} -.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAP1BMVEUAAADj4+Pf39/h4eHh4eHh4eHk5OTh4eHg4ODi4uLh4eHh4eHg4ODh4eHh4eHg4ODh4eHh4eHp6en////h4eFqcyvUAAAAFHRSTlMAOQfy7bgS5NrBvqOIfXNHMSELAgQ/iFsAAAA2SURBVAjXY4AANjYIzcjMAaVFuBkY+RkEWERYmRjYRXjANAOfiIgIFxNIAa8IpxBEi6AwiAQAK2MBd7xY8csAAAAASUVORK5CYII=); -} -@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) { - .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==); - } -} -@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==); - } -} -@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { - .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAUVBMVEUAAADh4eHh4eHh4eHh4eHi4uLi4uLh4eHh4eHh4eHf39/j4+Ph4eHh4eHh4eHg4ODi4uLh4eHh4eHi4uLh4eHh4eHh4eHh4eHh4eH////h4eF3FMFTAAAAGnRSTlMA+/eJhGhfSHE9JBzz5KaQf3pXT0Xbz0I5AYDw8F0AAAB+SURBVCjPrdHbDoMgEEVRKAii1dZe9fz/hxplTiKIT7qfYCWTEEZdUvOwbckNAD2WHeh3brHW5f5EzGQ+iN+b1Gt6KPvtv16Dn6JX9M9ya3/A1yfu5dlyduL6Hec7mXY6ddXLPP2lpABGZ8PWXfYLTJxZekVhhl7eTX24zZPNKXoRC7zQLjUAAAAASUVORK5CYII=); - } -} -.vue-treeselect__checkbox--unchecked { - border-color: #e0e0e0; - background: #fff; -} -.vue-treeselect__label-container:hover .vue-treeselect__checkbox--unchecked { - border-color: #039be5; - background: #fff; -} -.vue-treeselect__checkbox--indeterminate { - border-color: #039be5; - background: #039be5; -} -.vue-treeselect__label-container:hover .vue-treeselect__checkbox--indeterminate { - border-color: #039be5; - background: #039be5; -} -.vue-treeselect__checkbox--checked { - border-color: #039be5; - background: #039be5; -} -.vue-treeselect__label-container:hover .vue-treeselect__checkbox--checked { - border-color: #039be5; - background: #039be5; -} -.vue-treeselect__checkbox--disabled { - border-color: #e0e0e0; - background-color: #f7f7f7; -} -.vue-treeselect__label-container:hover .vue-treeselect__checkbox--disabled { - border-color: #e0e0e0; - background-color: #f7f7f7; -} -.vue-treeselect__label { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - display: table-cell; - padding-left: 5px; - max-width: 100%; - vertical-align: middle; - cursor: inherit; -} -[dir="rtl"] .vue-treeselect__label { - padding-left: 0; - padding-right: 5px; -} -.vue-treeselect__count { - margin-left: 5px; - font-weight: 400; - opacity: 0.6; -} -[dir="rtl"] .vue-treeselect__count { - margin-left: 0; - margin-right: 5px; -} -.vue-treeselect__tip { - padding-left: 5px; - padding-right: 5px; - display: table; - table-layout: fixed; - width: 100%; - color: #757575; -} -.vue-treeselect__tip-text { - display: table-cell; - vertical-align: middle; - padding-left: 5px; - padding-right: 5px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: 100%; - font-size: 12px; -} -.vue-treeselect__error-tip .vue-treeselect__retry { - cursor: pointer; - margin-left: 5px; - font-style: normal; - font-weight: 600; - text-decoration: none; - color: #039be5; -} -[dir="rtl"] .vue-treeselect__error-tip .vue-treeselect__retry { - margin-left: 0; - margin-right: 5px; -} -.vue-treeselect__icon-container { - display: table-cell; - vertical-align: middle; - width: 20px; - text-align: center; - line-height: 0; -} -.vue-treeselect--single .vue-treeselect__icon-container { - padding-left: 5px; -} -[dir="rtl"] .vue-treeselect--single .vue-treeselect__icon-container { - padding-left: 0; - padding-right: 5px; -} -.vue-treeselect__icon-warning { - display: block; - margin: auto; - border-radius: 50%; - position: relative; - width: 12px; - height: 12px; - background: #fb8c00; -} -.vue-treeselect__icon-warning::after { - display: block; - position: absolute; - content: ""; - left: 5px; - top: 2.5px; - width: 2px; - height: 1px; - border: 0 solid #fff; - border-top-width: 5px; - border-bottom-width: 1px; -} -.vue-treeselect__icon-error { - display: block; - margin: auto; - border-radius: 50%; - position: relative; - width: 12px; - height: 12px; - background: #e53935; -} -.vue-treeselect__icon-error::before, -.vue-treeselect__icon-error::after { - display: block; - position: absolute; - content: ""; - background: #fff; - -ms-transform: rotate(45deg); - transform: rotate(45deg); -} -.vue-treeselect__icon-error::before { - width: 6px; - height: 2px; - left: 3px; - top: 5px; -} -.vue-treeselect__icon-error::after { - width: 2px; - height: 6px; - left: 5px; - top: 3px; -} -.vue-treeselect__icon-loader { - display: block; - margin: auto; - position: relative; - width: 12px; - height: 12px; - text-align: center; - animation: 1.6s vue-treeselect-animation-rotate linear infinite; -} -.vue-treeselect__icon-loader::before, -.vue-treeselect__icon-loader::after { - border-radius: 50%; - position: absolute; - content: ""; - left: 0; - top: 0; - display: block; - width: 100%; - height: 100%; - opacity: 0.6; - animation: 1.6s vue-treeselect-animation-bounce ease-in-out infinite; -} -.vue-treeselect__icon-loader::before { - background: #039be5; -} -.vue-treeselect__icon-loader::after { - background: #b3e5fc; - animation-delay: -0.8s; -} -/** - * Menu Portal - */ -.vue-treeselect__menu-placeholder { - display: none; -} -.vue-treeselect__portal-target { - position: absolute; - display: block; - left: 0; - top: 0; - height: 0; - width: 0; - padding: 0; - margin: 0; - border: 0; - overflow: visible; - box-sizing: border-box; -} - - -/*# sourceMappingURL=vue-treeselect.css.map*/ \ No newline at end of file diff --git a/dist/vue-treeselect.css.map b/dist/vue-treeselect.css.map deleted file mode 100644 index d784806e..00000000 --- a/dist/vue-treeselect.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://VueTreeselect/style.less","webpack://VueTreeselect/./src/style.less","webpack://VueTreeselect/./node_modules/material-colors/dist/colors.less"],"names":[],"mappings":";;;;;AAAA;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AC8NF;EACE;AD5NF;AC+NA;EACE;MAAA;AD7NF;AACA;;EAEE;ACkOF;EACE;IACE;EDhOF;AACF;ACmOA;EACE;;IACE;EDhOF;ECkOA;IACE;EDhOF;AACF;ACmOA;EACE;IACE;EDjOF;AACF;AACA;;EAEE;ACuOA;;EAEE;EACA;ADrOJ;ACwOE;EACE;ADtOJ;ACyOE;EACE;EAEA;ADxOJ;AC2OE;;EAEE;MAAA;EACA;ADzOJ;AC4OE;EACE;AD1OJ;AACA;;EAEE;ACwQF;EACE;EACA;ADtQF;ACwQE;EACE;ADtQJ;ACiQA;;EAUI;ADvQJ;AC6PA;EAcI;ADxQJ;AACA;;EAEE;AC8QF;EAhME;EACA;EAgBA;EACA;EACA;EAgLA;EACA;EACA;EACA;EACA;EACA;EACA;ADzQF;AC2QE;EACE;ADzQJ;AC4QE;EACE;EACA;AD1QJ;AC6QE;EACE;AD3QJ;AC8QE;EACE;AD5QJ;AC+QE;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;EACA;EACA;ADnNJ;ACsNE;EACE;ADpNJ;ACuNE;EACE;EACA;ADrNJ;AACA;;EAEE;AC2NF;EACE;ADzNF;AC4NA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AD1NF","file":"vue-treeselect.css","sourcesContent":["/**\n * Dependencies\n */\n/**\n * Variables\n */\n/**\n * Mixins\n */\n/**\n * Helpers\n */\n.vue-treeselect-helper-hide {\n display: none;\n}\n.vue-treeselect-helper-zoom-effect-off {\n transform: none !important;\n}\n/**\n * Animations\n */\n@keyframes vue-treeselect-animation-fade-in {\n 0% {\n opacity: 0;\n }\n}\n@keyframes vue-treeselect-animation-bounce {\n 0%,\n 100% {\n transform: scale(0);\n }\n 50% {\n transform: scale(1);\n }\n}\n@keyframes vue-treeselect-animation-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n/**\n * Transitions\n */\n.vue-treeselect__multi-value-item--transition-enter-active,\n.vue-treeselect__multi-value-item--transition-leave-active {\n transition-duration: 200ms;\n transition-property: transform, opacity;\n}\n.vue-treeselect__multi-value-item--transition-enter-active {\n transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);\n}\n.vue-treeselect__multi-value-item--transition-leave-active {\n transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n position: absolute;\n}\n.vue-treeselect__multi-value-item--transition-enter,\n.vue-treeselect__multi-value-item--transition-leave-to {\n transform: scale(0.7);\n opacity: 0;\n}\n.vue-treeselect__multi-value-item--transition-move {\n transition: 200ms transform cubic-bezier(0.165, 0.84, 0.44, 1);\n}\n/**\n * Namespace\n */\n.vue-treeselect {\n position: relative;\n text-align: left;\n}\n[dir=\"rtl\"] .vue-treeselect {\n text-align: right;\n}\n.vue-treeselect div,\n.vue-treeselect span {\n box-sizing: border-box;\n}\n.vue-treeselect svg {\n fill: currentColor;\n}\n/**\n * Control\n */\n.vue-treeselect__control {\n padding-left: 5px;\n padding-right: 5px;\n display: table;\n table-layout: fixed;\n width: 100%;\n height: 36px;\n border: 1px solid #ddd;\n border-radius: 5px;\n background: #fff;\n transition-duration: 200ms;\n transition-property: border-color, box-shadow, width, height, background-color, opacity;\n transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n}\n.vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) .vue-treeselect__control:hover {\n border-color: #cfcfcf;\n}\n.vue-treeselect--focused:not(.vue-treeselect--open) .vue-treeselect__control {\n border-color: #039be5;\n box-shadow: 0 0 0 3px rgba(3, 155, 229, 0.1);\n}\n.vue-treeselect--disabled .vue-treeselect__control {\n background-color: #f9f9f9;\n}\n.vue-treeselect--open .vue-treeselect__control {\n border-color: #cfcfcf;\n}\n.vue-treeselect--open.vue-treeselect--open-below .vue-treeselect__control {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n.vue-treeselect--open.vue-treeselect--open-above .vue-treeselect__control {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.vue-treeselect__value-container,\n.vue-treeselect__multi-value {\n width: 100%;\n vertical-align: middle;\n}\n.vue-treeselect__value-container {\n display: table-cell;\n position: relative;\n}\n.vue-treeselect--searchable:not(.vue-treeselect--disabled) .vue-treeselect__value-container {\n cursor: text;\n}\n.vue-treeselect__multi-value {\n display: inline-block;\n}\n.vue-treeselect--has-value .vue-treeselect__multi-value {\n margin-bottom: 5px;\n}\n.vue-treeselect__placeholder,\n.vue-treeselect__single-value {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding-left: 5px;\n padding-right: 5px;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n line-height: 34px;\n user-select: none;\n pointer-events: none;\n}\n.vue-treeselect__placeholder {\n color: #bdbdbd;\n}\n.vue-treeselect__single-value {\n color: #333;\n}\n.vue-treeselect--focused.vue-treeselect--searchable .vue-treeselect__single-value {\n color: #bdbdbd;\n}\n.vue-treeselect--disabled .vue-treeselect__single-value {\n position: static;\n}\n.vue-treeselect__multi-value-item-container {\n display: inline-block;\n padding-top: 5px;\n padding-right: 5px;\n vertical-align: top;\n}\n[dir=\"rtl\"] .vue-treeselect__multi-value-item-container {\n padding-right: 0;\n padding-left: 5px;\n}\n.vue-treeselect__multi-value-item {\n cursor: pointer;\n display: inline-table;\n background: #e3f2fd;\n padding: 2px 0;\n border: 1px solid transparent;\n border-radius: 2px;\n color: #039be5;\n font-size: 12px;\n vertical-align: top;\n}\n.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-disabled):hover .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new):hover {\n cursor: pointer;\n background: #e3f2fd;\n color: #039be5;\n}\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-disabled {\n cursor: default;\n background: #f5f5f5;\n color: #757575;\n}\n.vue-treeselect--disabled .vue-treeselect__multi-value-item {\n cursor: default;\n background: #fff;\n border-color: #e5e5e5;\n color: #555;\n}\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new {\n background: #e8f5e9;\n}\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new:hover {\n background: #e8f5e9;\n}\n.vue-treeselect__value-remove,\n.vue-treeselect__multi-value-label {\n display: table-cell;\n padding: 0 5px;\n vertical-align: middle;\n}\n.vue-treeselect__value-remove {\n color: #039be5;\n padding-left: 5px;\n border-left: 1px solid #fff;\n line-height: 0;\n}\n[dir=\"rtl\"] .vue-treeselect__value-remove {\n border-left: 0 none;\n border-right: 1px solid #fff;\n}\n.vue-treeselect__multi-value-item:hover .vue-treeselect__value-remove {\n color: #e53935;\n}\n.vue-treeselect--disabled .vue-treeselect__value-remove,\n.vue-treeselect__multi-value-item-disabled .vue-treeselect__value-remove {\n display: none;\n}\n.vue-treeselect__value-remove > svg {\n width: 6px;\n height: 6px;\n}\n.vue-treeselect__multi-value-label {\n padding-right: 5px;\n white-space: pre-line;\n user-select: none;\n}\n.vue-treeselect__limit-tip {\n display: inline-block;\n padding-top: 5px;\n padding-right: 5px;\n vertical-align: top;\n}\n[dir=\"rtl\"] .vue-treeselect__limit-tip {\n padding-right: 0;\n padding-left: 5px;\n}\n.vue-treeselect__limit-tip-text {\n cursor: default;\n display: block;\n margin: 2px 0;\n padding: 1px 0;\n color: #bdbdbd;\n font-size: 12px;\n font-weight: 600;\n}\n.vue-treeselect__input-container {\n display: block;\n max-width: 100%;\n outline: none;\n}\n.vue-treeselect--single .vue-treeselect__input-container {\n font-size: inherit;\n height: 100%;\n}\n.vue-treeselect--multi .vue-treeselect__input-container {\n display: inline-block;\n font-size: 12px;\n vertical-align: top;\n}\n.vue-treeselect--searchable .vue-treeselect__input-container {\n padding-left: 5px;\n padding-right: 5px;\n}\n.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container {\n padding-top: 5px;\n padding-left: 0;\n}\n[dir=\"rtl\"] .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container {\n padding-left: 5px;\n padding-right: 0;\n}\n.vue-treeselect--disabled .vue-treeselect__input-container {\n display: none;\n}\n.vue-treeselect__input,\n.vue-treeselect__sizer {\n margin: 0;\n line-height: inherit;\n font-family: inherit;\n font-size: inherit;\n}\n.vue-treeselect__input {\n max-width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: none;\n box-sizing: content-box;\n box-shadow: none;\n background: none transparent;\n line-height: 1;\n vertical-align: middle;\n}\n.vue-treeselect__input::-ms-clear {\n display: none;\n}\n.vue-treeselect--single .vue-treeselect__input {\n width: 100%;\n height: 100%;\n}\n.vue-treeselect--multi .vue-treeselect__input {\n padding-top: 3px;\n padding-bottom: 3px;\n}\n.vue-treeselect--has-value .vue-treeselect__input {\n line-height: inherit;\n vertical-align: top;\n}\n.vue-treeselect__sizer {\n position: absolute;\n top: 0;\n left: 0;\n visibility: hidden;\n height: 0;\n overflow: scroll;\n white-space: pre;\n}\n.vue-treeselect__x-container {\n display: table-cell;\n vertical-align: middle;\n width: 20px;\n text-align: center;\n line-height: 0;\n cursor: pointer;\n color: #ccc;\n animation: 200ms vue-treeselect-animation-fade-in cubic-bezier(0.075, 0.82, 0.165, 1);\n}\n.vue-treeselect__x-container:hover {\n color: #e53935;\n}\n.vue-treeselect__x {\n width: 8px;\n height: 8px;\n}\n.vue-treeselect__control-arrow-container {\n display: table-cell;\n vertical-align: middle;\n width: 20px;\n text-align: center;\n line-height: 0;\n cursor: pointer;\n}\n.vue-treeselect--disabled .vue-treeselect__control-arrow-container {\n cursor: default;\n}\n.vue-treeselect__control-arrow {\n width: 9px;\n height: 9px;\n color: #ccc;\n}\n.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover .vue-treeselect__control-arrow {\n color: #616161;\n}\n.vue-treeselect--disabled .vue-treeselect__control-arrow {\n opacity: 0.35;\n}\n.vue-treeselect__control-arrow--rotated {\n transform: rotateZ(180deg);\n}\n/**\n * Menu\n */\n.vue-treeselect__menu-container {\n position: absolute;\n left: 0;\n width: 100%;\n overflow: visible;\n transition: 0s;\n}\n.vue-treeselect--open-below:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container {\n top: 100%;\n}\n.vue-treeselect--open-above:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container {\n bottom: 100%;\n}\n.vue-treeselect__menu {\n cursor: default;\n padding-top: 5px;\n padding-bottom: 5px;\n display: block;\n position: absolute;\n overflow-x: hidden;\n overflow-y: auto;\n width: auto;\n border: 1px solid #cfcfcf;\n background: #fff;\n line-height: 180%;\n -webkit-overflow-scrolling: touch;\n}\n.vue-treeselect--open-below .vue-treeselect__menu {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n top: 0;\n margin-top: -1px;\n border-top-color: #f2f2f2;\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\n}\n.vue-treeselect--open-above .vue-treeselect__menu {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n bottom: 0;\n margin-bottom: -1px;\n border-bottom-color: #f2f2f2;\n}\n.vue-treeselect__indent-level-0 .vue-treeselect__option {\n padding-left: 5px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-0 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 5px;\n}\n.vue-treeselect__indent-level-0 .vue-treeselect__tip {\n padding-left: 25px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-0 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 25px;\n}\n.vue-treeselect__indent-level-1 .vue-treeselect__option {\n padding-left: 25px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-1 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 25px;\n}\n.vue-treeselect__indent-level-1 .vue-treeselect__tip {\n padding-left: 45px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-1 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 45px;\n}\n.vue-treeselect__indent-level-2 .vue-treeselect__option {\n padding-left: 45px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-2 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 45px;\n}\n.vue-treeselect__indent-level-2 .vue-treeselect__tip {\n padding-left: 65px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-2 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 65px;\n}\n.vue-treeselect__indent-level-3 .vue-treeselect__option {\n padding-left: 65px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-3 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 65px;\n}\n.vue-treeselect__indent-level-3 .vue-treeselect__tip {\n padding-left: 85px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-3 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 85px;\n}\n.vue-treeselect__indent-level-4 .vue-treeselect__option {\n padding-left: 85px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-4 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 85px;\n}\n.vue-treeselect__indent-level-4 .vue-treeselect__tip {\n padding-left: 105px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-4 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 105px;\n}\n.vue-treeselect__indent-level-5 .vue-treeselect__option {\n padding-left: 105px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-5 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 105px;\n}\n.vue-treeselect__indent-level-5 .vue-treeselect__tip {\n padding-left: 125px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-5 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 125px;\n}\n.vue-treeselect__indent-level-6 .vue-treeselect__option {\n padding-left: 125px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-6 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 125px;\n}\n.vue-treeselect__indent-level-6 .vue-treeselect__tip {\n padding-left: 145px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-6 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 145px;\n}\n.vue-treeselect__indent-level-7 .vue-treeselect__option {\n padding-left: 145px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-7 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 145px;\n}\n.vue-treeselect__indent-level-7 .vue-treeselect__tip {\n padding-left: 165px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-7 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 165px;\n}\n.vue-treeselect__indent-level-8 .vue-treeselect__option {\n padding-left: 165px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-8 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 165px;\n}\n.vue-treeselect__indent-level-8 .vue-treeselect__tip {\n padding-left: 185px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-8 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 185px;\n}\n.vue-treeselect__option {\n padding-left: 5px;\n padding-right: 5px;\n display: table;\n table-layout: fixed;\n width: 100%;\n}\n.vue-treeselect__option--highlight {\n background: #f5f5f5;\n}\n.vue-treeselect--single .vue-treeselect__option--selected {\n background: #e3f2fd;\n font-weight: 600;\n}\n.vue-treeselect--single .vue-treeselect__option--selected:hover {\n background: #e3f2fd;\n}\n.vue-treeselect__option--hide {\n display: none;\n}\n.vue-treeselect__option-arrow-container,\n.vue-treeselect__option-arrow-placeholder {\n display: table-cell;\n vertical-align: middle;\n width: 20px;\n text-align: center;\n line-height: 0;\n}\n.vue-treeselect__option-arrow-container {\n cursor: pointer;\n}\n.vue-treeselect__option-arrow {\n display: inline-block;\n width: 9px;\n height: 9px;\n color: #ccc;\n vertical-align: middle;\n transition: 200ms transform cubic-bezier(0.19, 1, 0.22, 1);\n transform: rotateZ(-90deg);\n}\n[dir=\"rtl\"] .vue-treeselect__option-arrow {\n transform: rotateZ(90deg);\n}\n.vue-treeselect__option-arrow-container:hover .vue-treeselect__option-arrow,\n.vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover .vue-treeselect__option-arrow {\n color: #616161;\n}\n.vue-treeselect__option-arrow--rotated {\n transform: rotateZ(0);\n}\n[dir=\"rtl\"] .vue-treeselect__option-arrow--rotated {\n transform: rotateZ(0);\n}\n.vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter {\n transform: rotateZ(-90deg) !important;\n}\n[dir=\"rtl\"] .vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter {\n transform: rotateZ(90deg) !important;\n}\n.vue-treeselect__label-container {\n display: table-cell;\n vertical-align: middle;\n cursor: pointer;\n display: table;\n width: 100%;\n table-layout: fixed;\n color: inherit;\n}\n.vue-treeselect__option--disabled .vue-treeselect__label-container {\n cursor: not-allowed;\n color: rgba(0, 0, 0, 0.25);\n}\n.vue-treeselect__checkbox-container {\n display: table-cell;\n width: 20px;\n min-width: 20px;\n height: 100%;\n text-align: center;\n vertical-align: middle;\n}\n.vue-treeselect__checkbox {\n display: block;\n margin: auto;\n width: 12px;\n height: 12px;\n border-width: 1px;\n border-style: solid;\n border-radius: 2px;\n position: relative;\n transition: 200ms all cubic-bezier(0.075, 0.82, 0.165, 1);\n}\n.vue-treeselect__check-mark,\n.vue-treeselect__minus-mark {\n display: block;\n position: absolute;\n left: 1px;\n top: 1px;\n background-repeat: no-repeat;\n opacity: 0;\n transition: 200ms all ease;\n}\n.vue-treeselect__minus-mark {\n width: 8px;\n height: 8px;\n background-image: url(\"./assets/checkbox-indeterminate.png\");\n background-size: 8px 8px;\n}\n@media (min-resolution: 1.5dppx) {\n .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate@2x.png\");\n }\n}\n@media (min-resolution: 192dpi) {\n .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate@2x.png\");\n }\n}\n@media (min-resolution: 288dpi) {\n .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate@3x.png\");\n }\n}\n.vue-treeselect__checkbox--indeterminate > .vue-treeselect__minus-mark {\n opacity: 1;\n}\n.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate-disabled.png\");\n}\n@media (min-resolution: 1.5dppx) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate-disabled@2x.png\");\n }\n}\n@media (min-resolution: 192dpi) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate-disabled@2x.png\");\n }\n}\n@media (min-resolution: 288dpi) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate-disabled@3x.png\");\n }\n}\n.vue-treeselect__check-mark {\n width: 8px;\n height: 8px;\n background-image: url(\"./assets/checkbox-checked.png\");\n background-size: 8px 8px;\n transform: scaleY(0.125);\n}\n@media (min-resolution: 1.5dppx) {\n .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked@2x.png\");\n }\n}\n@media (min-resolution: 192dpi) {\n .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked@2x.png\");\n }\n}\n@media (min-resolution: 288dpi) {\n .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked@3x.png\");\n }\n}\n.vue-treeselect__checkbox--checked > .vue-treeselect__check-mark {\n opacity: 1;\n transform: scaleY(1);\n}\n.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked-disabled.png\");\n}\n@media (min-resolution: 1.5dppx) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked-disabled@2x.png\");\n }\n}\n@media (min-resolution: 192dpi) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked-disabled@2x.png\");\n }\n}\n@media (min-resolution: 288dpi) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked-disabled@3x.png\");\n }\n}\n.vue-treeselect__checkbox--unchecked {\n border-color: #e0e0e0;\n background: #fff;\n}\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--unchecked {\n border-color: #039be5;\n background: #fff;\n}\n.vue-treeselect__checkbox--indeterminate {\n border-color: #039be5;\n background: #039be5;\n}\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--indeterminate {\n border-color: #039be5;\n background: #039be5;\n}\n.vue-treeselect__checkbox--checked {\n border-color: #039be5;\n background: #039be5;\n}\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--checked {\n border-color: #039be5;\n background: #039be5;\n}\n.vue-treeselect__checkbox--disabled {\n border-color: #e0e0e0;\n background-color: #f7f7f7;\n}\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--disabled {\n border-color: #e0e0e0;\n background-color: #f7f7f7;\n}\n.vue-treeselect__label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: table-cell;\n padding-left: 5px;\n max-width: 100%;\n vertical-align: middle;\n cursor: inherit;\n}\n[dir=\"rtl\"] .vue-treeselect__label {\n padding-left: 0;\n padding-right: 5px;\n}\n.vue-treeselect__count {\n margin-left: 5px;\n font-weight: 400;\n opacity: 0.6;\n}\n[dir=\"rtl\"] .vue-treeselect__count {\n margin-left: 0;\n margin-right: 5px;\n}\n.vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 5px;\n display: table;\n table-layout: fixed;\n width: 100%;\n color: #757575;\n}\n.vue-treeselect__tip-text {\n display: table-cell;\n vertical-align: middle;\n padding-left: 5px;\n padding-right: 5px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n font-size: 12px;\n}\n.vue-treeselect__error-tip .vue-treeselect__retry {\n cursor: pointer;\n margin-left: 5px;\n font-style: normal;\n font-weight: 600;\n text-decoration: none;\n color: #039be5;\n}\n[dir=\"rtl\"] .vue-treeselect__error-tip .vue-treeselect__retry {\n margin-left: 0;\n margin-right: 5px;\n}\n.vue-treeselect__icon-container {\n display: table-cell;\n vertical-align: middle;\n width: 20px;\n text-align: center;\n line-height: 0;\n}\n.vue-treeselect--single .vue-treeselect__icon-container {\n padding-left: 5px;\n}\n[dir=\"rtl\"] .vue-treeselect--single .vue-treeselect__icon-container {\n padding-left: 0;\n padding-right: 5px;\n}\n.vue-treeselect__icon-warning {\n display: block;\n margin: auto;\n border-radius: 50%;\n position: relative;\n width: 12px;\n height: 12px;\n background: #fb8c00;\n}\n.vue-treeselect__icon-warning::after {\n display: block;\n position: absolute;\n content: \"\";\n left: 5px;\n top: 2.5px;\n width: 2px;\n height: 1px;\n border: 0 solid #fff;\n border-top-width: 5px;\n border-bottom-width: 1px;\n}\n.vue-treeselect__icon-error {\n display: block;\n margin: auto;\n border-radius: 50%;\n position: relative;\n width: 12px;\n height: 12px;\n background: #e53935;\n}\n.vue-treeselect__icon-error::before,\n.vue-treeselect__icon-error::after {\n display: block;\n position: absolute;\n content: \"\";\n background: #fff;\n transform: rotate(45deg);\n}\n.vue-treeselect__icon-error::before {\n width: 6px;\n height: 2px;\n left: 3px;\n top: 5px;\n}\n.vue-treeselect__icon-error::after {\n width: 2px;\n height: 6px;\n left: 5px;\n top: 3px;\n}\n.vue-treeselect__icon-loader {\n display: block;\n margin: auto;\n position: relative;\n width: 12px;\n height: 12px;\n text-align: center;\n animation: 1.6s vue-treeselect-animation-rotate linear infinite;\n}\n.vue-treeselect__icon-loader::before,\n.vue-treeselect__icon-loader::after {\n border-radius: 50%;\n position: absolute;\n content: \"\";\n left: 0;\n top: 0;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0.6;\n animation: 1.6s vue-treeselect-animation-bounce ease-in-out infinite;\n}\n.vue-treeselect__icon-loader::before {\n background: #039be5;\n}\n.vue-treeselect__icon-loader::after {\n background: #b3e5fc;\n animation-delay: -0.8s;\n}\n/**\n * Menu Portal\n */\n.vue-treeselect__menu-placeholder {\n display: none;\n}\n.vue-treeselect__portal-target {\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n height: 0;\n width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n overflow: visible;\n box-sizing: border-box;\n}\n","/**\n * Dependencies\n */\n\n@import \"~material-colors/dist/colors.less\";\n@import \"~easings-css/easings.less\";\n\n/**\n * Variables\n */\n\n@treeselect-font-size: 1em;\n@treeselect-font-size-sm: 12px;\n@treeselect-padding: 5px;\n@treeselect-border-radius-lg: 5px;\n@treeselect-border-radius-sm: 2px;\n@treeselect-narrow-cell-width: 20px;\n@treeselect-wide-cell-width: 100%;\n@treeselect-icon-size: 12px;\n@treeselect-transition-duration: 200ms;\n@treeselect-transition-duration-slow: 400ms;\n@treeselect-max-level: 8;\n\n@treeselect-control-height: 36px;\n@treeselect-control-inner-height: @treeselect-control-height - @treeselect-control-border-width * 2;\n@treeselect-control-border-width: 1px;\n@treeselect-control-border-color: #ddd;\n@treeselect-control-border-color-hover: #cfcfcf;\n@treeselect-control-border-color-active: @treeselect-control-border-color-hover;\n@treeselect-control-border-color-focus: @md-light-blue-600;\n@treeselect-control-border-radius: @treeselect-border-radius-lg;\n@treeselect-control-bg: #fff;\n@treeselect-control-box-shadow-focus: 0 0 0 3px fade(@treeselect-control-border-color-focus, 10%);\n@treeselect-control-bg-disabled: #f9f9f9;\n\n@treeselect-placeholder-font-color: @md-grey-400;\n@treeselect-single-value-font-color: #333;\n@treeselect-single-value-font-color-focused: @treeselect-placeholder-font-color;\n@treeselect-multi-value-margin-x: 0;\n@treeselect-multi-value-margin-y: 2px;\n@treeselect-multi-value-padding-x: @treeselect-padding;\n@treeselect-multi-value-padding-y: 0;\n@treeselect-multi-value-font-size: @treeselect-font-size-sm;\n@treeselect-multi-value-font-color: @md-light-blue-600;\n@treeselect-multi-value-item-bg: @md-blue-50;\n@treeselect-multi-value-item-bg-new: @md-green-50;\n@treeselect-multi-value-item-border-width: 1px;\n@treeselect-multi-value-item-border-color: transparent;\n@treeselect-multi-value-font-color-hover: @treeselect-multi-value-font-color;\n@treeselect-multi-value-item-bg-hover: @treeselect-multi-value-item-bg;\n@treeselect-multi-value-item-bg-new-hover: @treeselect-multi-value-item-bg-new;\n@treeselect-multi-value-font-color-disabled: @md-grey-600;\n@treeselect-multi-value-item-bg-disabled: @md-grey-100;\n@treeselect-multi-value-item-font-color-control-disabled: #555;\n@treeselect-multi-value-item-bg-control-disabled: #fff;\n@treeselect-multi-value-item-border-color-control-disabled: #e5e5e5;\n@treeselect-multi-value-remove-color: @treeselect-multi-value-font-color;\n@treeselect-multi-value-remove-color-hover: @md-red-600;\n@treeselect-multi-value-remove-size: 6px;\n@treeselect-multi-value-divider-color: #fff;\n@treeselect-limit-tip-font-color: @md-grey-400;\n@treeselect-limit-tip-font-size: @treeselect-multi-value-font-size;\n@treeselect-limit-tip-font-weight: 600;\n@treeselect-single-input-font-size: inherit;\n@treeselect-multi-input-font-size: @treeselect-multi-value-font-size;\n\n@treeselect-menu-bg: #fff;\n@treeselect-menu-padding-y: @treeselect-padding;\n@treeselect-menu-line-height: 180%;\n@treeselect-menu-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\n@treeselect-control-menu-divider-color: #f2f2f2;\n\n@treeselect-arrow-size: 9px;\n@treeselect-arrow-color: #ccc;\n@treeselect-arrow-color-hover: @md-grey-700;\n@treeselect-arrow-transition-timing-function: @ease-out-expo;\n\n@treeselect-x-size: 8px;\n@treeselect-x-color: @treeselect-arrow-color;\n@treeselect-x-color-hover: @md-red-600;\n\n@treeselect-option-bg-highlight: @md-grey-100;\n@treeselect-option-selected-bg: @md-blue-50;\n@treeselect-option-selected-bg-hover: @treeselect-option-selected-bg;\n@treeselect-checkbox-size: @treeselect-icon-size;\n@treeselect-checkbox-border-radius: @treeselect-border-radius-sm;\n@treeselect-checkbox-color: @md-grey-300;\n@treeselect-checkbox-color-highlight: @md-light-blue-600;\n@treeselect-checkbox-border-color: @treeselect-checkbox-color;\n@treeselect-checkbox-bg: #fff;\n@treeselect-checkbox-border-color-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-bg-hover: @treeselect-checkbox-bg;\n@treeselect-checkbox-indeterminate-border-color: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-indeterminate-bg: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-indeterminate-icon: \"./assets/checkbox-indeterminate.png\";\n@treeselect-checkbox-indeterminate-border-color-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-indeterminate-bg-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-checked-border-color: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-checked-bg: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-checked-icon: \"./assets/checkbox-checked.png\";\n@treeselect-checkbox-checked-border-color-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-checked-bg-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-disabled-border-color: @treeselect-checkbox-border-color;\n@treeselect-checkbox-disabled-bg-color: darken(@treeselect-checkbox-bg, 3%);\n@treeselect-checkbox-disabled-indeterminate-icon: \"./assets/checkbox-indeterminate-disabled.png\";\n@treeselect-checkbox-disabled-checked-icon: \"./assets/checkbox-checked-disabled.png\";\n@treeselect-option-label-color: inherit;\n@treeselect-option-label-color-disabled: rgba(0, 0, 0, 0.25);\n\n@treeselect-loader-color-dark: @md-light-blue-600;\n@treeselect-loader-color-light: @md-light-blue-100;\n@treeselect-loader-animation-duration: 1.6s;\n@treeselect-warning-icon-bg: @md-orange-600;\n@treeselect-error-icon-bg: @md-red-600;\n@treeselect-tip-color: @md-grey-600;\n@treeselect-tip-font-size: @treeselect-font-size-sm;\n@treeselect-retry-text-color: @md-light-blue-600;\n\n\n/**\n * Mixins\n */\n\n.clickable() {\n cursor: pointer;\n}\n\n.inputtable() {\n cursor: text;\n}\n\n.forbidden() {\n cursor: not-allowed;\n}\n\n.reset-cursor() {\n cursor: default;\n}\n\n.rounded() {\n border-radius: 50%;\n}\n\n.border-radius-top(@size) {\n border-top-left-radius: @size;\n border-top-right-radius: @size;\n}\n\n.border-radius-bottom(@size) {\n border-bottom-left-radius: @size;\n border-bottom-right-radius: @size;\n}\n\n.text-truncate() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.horizontal-padding(@value) {\n padding-left: @value;\n padding-right: @value;\n}\n\n.vertical-padding(@value) {\n padding-top: @value;\n padding-bottom: @value;\n}\n\n.icon() {\n display: block;\n margin: auto;\n}\n\n.row() {\n .horizontal-padding(@treeselect-padding);\n\n display: table;\n table-layout: fixed;\n width: 100%;\n}\n\n.cell() {\n display: table-cell;\n vertical-align: middle;\n}\n\n.wide-cell() {\n .cell();\n .horizontal-padding(@treeselect-padding);\n .text-truncate();\n\n width: @treeselect-wide-cell-width;\n}\n\n.narrow-cell() {\n .cell();\n\n width: @treeselect-narrow-cell-width;\n text-align: center;\n line-height: 0;\n}\n\n// based on: https://github.com/strues/retinajs/blob/master/dist/retina.less\n.retina(@path, @cap: 2) { // stylelint-disable-line selector-class-pattern\n @lowretina: ~\"(min-resolution: 1.5dppx)\";\n @2xpath: replace(@path, \"(\\.\\w+)$\", \"@2x$1\");\n\n background-image: url(@path);\n\n @media @lowretina {\n background-image: url(@2xpath);\n }\n\n .create-queries() when (@cap >= 2) {\n .loop(@env) when (@env <= @cap) {\n @retinapath: replace(@path, \"(\\.\\w+)$\", \"@@{env}x$1\");\n @media (min-resolution: @env * 96dpi) {\n background-image: url(@retinapath);\n }\n\n .loop((@env + 1));\n }\n\n .loop(2);\n }\n .create-queries();\n}\n\n/**\n * Helpers\n */\n\n.vue-treeselect-helper-hide {\n display: none;\n}\n\n.vue-treeselect-helper-zoom-effect-off {\n transform: none !important; // stylelint-disable-line declaration-no-important\n}\n\n\n/**\n * Animations\n */\n\n@keyframes vue-treeselect-animation-fade-in {\n 0% {\n opacity: 0;\n }\n}\n\n@keyframes vue-treeselect-animation-bounce {\n 0%, 100% {\n transform: scale(0);\n }\n 50% {\n transform: scale(1);\n }\n}\n\n@keyframes vue-treeselect-animation-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n\n/**\n * Transitions\n */\n\n.vue-treeselect__multi-value-item--transition {\n &-enter-active,\n &-leave-active {\n transition-duration: @treeselect-transition-duration;\n transition-property: transform, opacity;\n }\n\n &-enter-active {\n transition-timing-function: @ease-out-circ;\n }\n\n &-leave-active {\n transition-timing-function: @ease-out-cubic;\n // trigger animation when element is removed\n position: absolute;\n }\n\n &-enter,\n &-leave-to {\n transform: scale(0.7);\n opacity: 0;\n }\n\n &-move {\n transition: @treeselect-transition-duration transform @ease-out-quart;\n }\n}\n\n.vue-treeselect__menu--transition {\n &-enter-active,\n &-leave-active {\n // to be overriden\n }\n\n &-enter,\n &-leave-to {\n // to be overriden\n }\n}\n\n.vue-treeselect__list--transition {\n &-enter-active,\n &-leave-active {\n // to be overriden\n }\n\n &-enter,\n &-leave-to {\n // to be overriden\n }\n}\n\n\n/**\n * Namespace\n */\n\n.vue-treeselect {\n position: relative;\n text-align: left;\n\n [dir=\"rtl\"] & {\n text-align: right;\n }\n\n div,\n span {\n box-sizing: border-box;\n }\n\n svg {\n fill: currentColor;\n }\n}\n\n\n/**\n * Control\n */\n\n.vue-treeselect__control {\n .row();\n\n height: @treeselect-control-height;\n border: @treeselect-control-border-width solid @treeselect-control-border-color;\n border-radius: @treeselect-control-border-radius;\n background: @treeselect-control-bg;\n transition-duration: @treeselect-transition-duration;\n transition-property: border-color, box-shadow, width, height, background-color, opacity;\n transition-timing-function: @ease-out-cubic;\n\n .vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) &:hover {\n border-color: @treeselect-control-border-color-hover;\n }\n\n .vue-treeselect--focused:not(.vue-treeselect--open) & {\n border-color: @treeselect-control-border-color-focus;\n box-shadow: @treeselect-control-box-shadow-focus;\n }\n\n .vue-treeselect--disabled & {\n background-color: @treeselect-control-bg-disabled;\n }\n\n .vue-treeselect--open & {\n border-color: @treeselect-control-border-color-active;\n }\n\n .vue-treeselect--open.vue-treeselect--open-below & {\n .border-radius-bottom(0);\n }\n\n .vue-treeselect--open.vue-treeselect--open-above & {\n .border-radius-top(0);\n }\n}\n\n.vue-treeselect__value-container,\n.vue-treeselect__multi-value {\n width: 100%;\n vertical-align: middle;\n}\n\n.vue-treeselect__value-container {\n display: table-cell;\n position: relative;\n\n .vue-treeselect--searchable:not(.vue-treeselect--disabled) & {\n // The real input is small and not covering the whole control.\n // We show an I-shape cursor to give user a hint that\n // clicking anywhere in the control will make the input focused.\n .inputtable();\n }\n}\n\n.vue-treeselect__multi-value {\n display: inline-block;\n\n .vue-treeselect--has-value & {\n margin-bottom: @treeselect-padding;\n }\n}\n\n.vue-treeselect__placeholder,\n.vue-treeselect__single-value {\n .text-truncate();\n .horizontal-padding(@treeselect-padding);\n\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n line-height: @treeselect-control-inner-height;\n user-select: none;\n pointer-events: none;\n}\n\n.vue-treeselect__placeholder {\n color: @treeselect-placeholder-font-color;\n}\n\n.vue-treeselect__single-value {\n color: @treeselect-single-value-font-color;\n\n .vue-treeselect--focused.vue-treeselect--searchable & {\n color: @treeselect-single-value-font-color-focused;\n }\n\n .vue-treeselect--disabled & {\n // #274 Fix for IE\n position: static;\n }\n}\n\n.vue-treeselect__multi-value-item-container {\n display: inline-block;\n padding-top: @treeselect-padding;\n padding-right: @treeselect-padding;\n vertical-align: top;\n\n [dir=\"rtl\"] & {\n padding-right: 0;\n padding-left: @treeselect-padding;\n }\n}\n\n.vue-treeselect__multi-value-item {\n .clickable();\n\n display: inline-table;\n background: @treeselect-multi-value-item-bg;\n // Table elements do not have margin, so we set at the container element.\n padding: @treeselect-multi-value-margin-y @treeselect-multi-value-margin-x;\n border: @treeselect-multi-value-item-border-width solid @treeselect-multi-value-item-border-color;\n border-radius: @treeselect-border-radius-sm;\n color: @treeselect-multi-value-font-color;\n font-size: @treeselect-multi-value-font-size;\n vertical-align: top; // stylelint-disable-line plugin/declaration-block-no-ignored-properties\n\n .vue-treeselect:not(.vue-treeselect--disabled) &:not(.vue-treeselect__multi-value-item-disabled):hover &:not(.vue-treeselect__multi-value-item-new) &:not(.vue-treeselect__multi-value-item-new):hover {\n .clickable();\n\n background: @treeselect-multi-value-item-bg-hover;\n color: @treeselect-multi-value-font-color-hover;\n }\n\n &.vue-treeselect__multi-value-item-disabled {\n .reset-cursor();\n\n background: @treeselect-multi-value-item-bg-disabled;\n color: @treeselect-multi-value-font-color-disabled;\n }\n\n .vue-treeselect--disabled & {\n .reset-cursor();\n\n background: @treeselect-multi-value-item-bg-control-disabled;\n border-color: @treeselect-multi-value-item-border-color-control-disabled;\n color: @treeselect-multi-value-item-font-color-control-disabled;\n }\n\n &.vue-treeselect__multi-value-item-new {\n background: @treeselect-multi-value-item-bg-new;\n &:hover {\n background: @treeselect-multi-value-item-bg-new;\n }\n }\n}\n\n.vue-treeselect__value-remove,\n.vue-treeselect__multi-value-label {\n display: table-cell;\n padding: @treeselect-multi-value-padding-y @treeselect-multi-value-padding-x;\n vertical-align: middle;\n}\n\n.vue-treeselect__value-remove {\n color: @treeselect-multi-value-remove-color;\n padding-left: @treeselect-multi-value-padding-x;\n border-left: 1px solid @treeselect-multi-value-divider-color;\n line-height: 0;\n\n [dir=\"rtl\"] & {\n border-left: 0 none;\n border-right: 1px solid @treeselect-multi-value-divider-color;\n }\n\n .vue-treeselect__multi-value-item:hover & {\n color: @treeselect-multi-value-remove-color-hover;\n }\n\n .vue-treeselect--disabled &,\n .vue-treeselect__multi-value-item-disabled & {\n display: none;\n }\n\n > svg {\n width: @treeselect-multi-value-remove-size;\n height: @treeselect-multi-value-remove-size;\n }\n}\n\n.vue-treeselect__multi-value-label {\n padding-right: @treeselect-multi-value-padding-x;\n white-space: pre-line;\n user-select: none;\n}\n\n.vue-treeselect__limit-tip {\n display: inline-block;\n padding-top: @treeselect-padding;\n padding-right: @treeselect-padding;\n vertical-align: top;\n\n [dir=\"rtl\"] & {\n padding-right: 0;\n padding-left: @treeselect-padding;\n }\n}\n\n.vue-treeselect__limit-tip-text {\n .reset-cursor();\n\n display: block;\n margin: @treeselect-multi-value-margin-y @treeselect-multi-value-margin-x;\n padding: (@treeselect-multi-value-padding-y + @treeselect-multi-value-item-border-width) 0;\n color: @treeselect-limit-tip-font-color;\n font-size: @treeselect-limit-tip-font-size;\n font-weight: @treeselect-limit-tip-font-weight;\n}\n\n.vue-treeselect__input-container {\n display: block;\n max-width: 100%;\n outline: none;\n\n .vue-treeselect--single & {\n font-size: @treeselect-single-input-font-size;\n height: 100%;\n }\n\n .vue-treeselect--multi & {\n display: inline-block;\n font-size: @treeselect-multi-input-font-size;\n vertical-align: top;\n }\n\n .vue-treeselect--searchable & {\n .horizontal-padding(@treeselect-padding);\n }\n\n .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value & {\n padding-top: @treeselect-padding;\n padding-left: 0;\n\n [dir=\"rtl\"] & {\n padding-left: @treeselect-padding;\n padding-right: 0;\n }\n }\n\n .vue-treeselect--disabled & {\n display: none;\n }\n}\n\n.vue-treeselect__input,\n.vue-treeselect__sizer {\n margin: 0;\n line-height: inherit;\n font-family: inherit;\n font-size: inherit;\n}\n\n.vue-treeselect__input {\n max-width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: none;\n box-sizing: content-box;\n box-shadow: none;\n background: none transparent;\n line-height: 1;\n vertical-align: middle;\n\n &::-ms-clear {\n display: none;\n }\n\n .vue-treeselect--single & {\n width: 100%;\n height: 100%;\n }\n\n .vue-treeselect--multi & {\n .vertical-padding(@treeselect-multi-value-margin-y + @treeselect-multi-value-item-border-width);\n }\n\n .vue-treeselect--has-value & {\n line-height: inherit;\n vertical-align: top;\n }\n}\n\n.vue-treeselect__sizer {\n position: absolute;\n top: 0;\n left: 0;\n visibility: hidden;\n height: 0;\n overflow: scroll;\n white-space: pre;\n}\n\n.vue-treeselect__x-container {\n .narrow-cell();\n .clickable();\n\n color: @treeselect-x-color;\n animation: @treeselect-transition-duration vue-treeselect-animation-fade-in @ease-out-circ;\n\n &:hover {\n color: @treeselect-x-color-hover;\n }\n}\n\n.vue-treeselect__x {\n width: @treeselect-x-size;\n height: @treeselect-x-size;\n}\n\n.vue-treeselect__control-arrow-container {\n .narrow-cell();\n .clickable();\n\n .vue-treeselect--disabled & {\n .reset-cursor();\n }\n}\n\n.vue-treeselect__control-arrow {\n width: @treeselect-arrow-size;\n height: @treeselect-arrow-size;\n color: @treeselect-arrow-color;\n\n .vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover & {\n color: @treeselect-arrow-color-hover;\n }\n\n .vue-treeselect--disabled & {\n opacity: 0.35;\n }\n}\n\n.vue-treeselect__control-arrow--rotated {\n transform: rotateZ(180deg);\n}\n\n\n/**\n * Menu\n */\n\n.vue-treeselect__menu-container {\n position: absolute;\n left: 0;\n width: 100%;\n overflow: visible;\n transition: 0s;\n\n .vue-treeselect--open-below:not(.vue-treeselect--append-to-body) & {\n top: 100%;\n }\n\n .vue-treeselect--open-above:not(.vue-treeselect--append-to-body) & {\n bottom: 100%;\n }\n}\n\n.vue-treeselect__menu {\n .reset-cursor(); // set to normal cursor since text is unselectable\n .vertical-padding(@treeselect-menu-padding-y);\n\n display: block;\n position: absolute;\n overflow-x: hidden;\n overflow-y: auto;\n // IE9 does not properly handle `width: 100%` with scrollbar when `box-sizing: border-box`\n width: auto;\n border: 1px solid @treeselect-control-border-color-active;\n background: @treeselect-menu-bg;\n line-height: @treeselect-menu-line-height;\n // https://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/\n -webkit-overflow-scrolling: touch;\n\n .vue-treeselect--open-below & {\n .border-radius-bottom(@treeselect-border-radius-lg);\n\n top: 0;\n margin-top: (-@treeselect-control-border-width);\n border-top-color: @treeselect-control-menu-divider-color;\n box-shadow: @treeselect-menu-box-shadow;\n }\n\n .vue-treeselect--open-above & {\n .border-radius-top(@treeselect-border-radius-lg);\n\n bottom: 0;\n margin-bottom: (-@treeselect-control-border-width);\n border-bottom-color: @treeselect-control-menu-divider-color;\n }\n}\n\n.generate-level-indentations(@i) when (@i >= 0) {\n .generate-level-indentations((@i - 1));\n\n .vue-treeselect__indent-level-@{i} {\n .vue-treeselect__option {\n padding-left: @treeselect-padding + @i * @treeselect-narrow-cell-width;\n\n [dir=\"rtl\"] & {\n padding-left: @treeselect-padding;\n padding-right: @treeselect-padding + @i * @treeselect-narrow-cell-width;\n }\n }\n\n .vue-treeselect__tip {\n padding-left: @treeselect-padding + (@i + 1) * @treeselect-narrow-cell-width;\n\n [dir=\"rtl\"] & {\n padding-left: @treeselect-padding;\n padding-right: @treeselect-padding + (@i + 1) * @treeselect-narrow-cell-width;\n }\n }\n }\n}\n.generate-level-indentations(@treeselect-max-level);\n\n.vue-treeselect__option {\n .row();\n}\n\n.vue-treeselect__option--highlight {\n background: @treeselect-option-bg-highlight;\n}\n\n.vue-treeselect__option--selected {\n // note that these should override `.vue-treeselect__option--highlight`\n .vue-treeselect--single & {\n background: @treeselect-option-selected-bg;\n font-weight: 600;\n\n &:hover {\n background: @treeselect-option-selected-bg-hover;\n }\n }\n}\n\n.vue-treeselect__option--hide {\n display: none;\n}\n\n.vue-treeselect__option-arrow-container,\n.vue-treeselect__option-arrow-placeholder {\n .narrow-cell();\n}\n\n.vue-treeselect__option-arrow-container {\n .clickable();\n}\n\n.vue-treeselect__option-arrow {\n display: inline-block;\n width: @treeselect-arrow-size;\n height: @treeselect-arrow-size;\n color: @treeselect-arrow-color;\n vertical-align: middle;\n transition: @treeselect-transition-duration transform @treeselect-arrow-transition-timing-function;\n transform: rotateZ(-90deg);\n\n [dir=\"rtl\"] & {\n transform: rotateZ(90deg);\n }\n\n .vue-treeselect__option-arrow-container:hover &,\n .vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover & {\n color: @treeselect-arrow-color-hover;\n }\n}\n\n.vue-treeselect__option-arrow--rotated {\n transform: rotateZ(0);\n\n [dir=\"rtl\"] & {\n transform: rotateZ(0);\n }\n\n &.vue-treeselect__option-arrow--prepare-enter {\n transform: rotateZ(-90deg) !important; // stylelint-disable-line declaration-no-important\n\n [dir=\"rtl\"] & {\n transform: rotateZ(90deg) !important; // stylelint-disable-line declaration-no-important\n }\n }\n}\n\n.vue-treeselect__label-container {\n .cell();\n .clickable();\n\n display: table;\n width: 100%;\n table-layout: fixed;\n color: @treeselect-option-label-color;\n\n .vue-treeselect__option--disabled & {\n .forbidden();\n\n color: @treeselect-option-label-color-disabled;\n }\n}\n\n.vue-treeselect__checkbox-container {\n display: table-cell;\n width: @treeselect-narrow-cell-width;\n min-width: @treeselect-narrow-cell-width;\n height: 100%;\n text-align: center;\n vertical-align: middle;\n}\n\n.vue-treeselect__checkbox {\n display: block;\n margin: auto;\n width: @treeselect-checkbox-size;\n height: @treeselect-checkbox-size;\n border-width: 1px;\n border-style: solid;\n border-radius: @treeselect-border-radius-sm;\n position: relative;\n transition: @treeselect-transition-duration all @ease-out-circ;\n}\n\n.vue-treeselect__check-mark,\n.vue-treeselect__minus-mark {\n display: block;\n position: absolute;\n left: 1px;\n top: 1px;\n background-repeat: no-repeat;\n opacity: 0;\n transition: @treeselect-transition-duration all ease;\n}\n\n.vue-treeselect__minus-mark {\n width: image-width(@treeselect-checkbox-indeterminate-icon);\n height: image-height(@treeselect-checkbox-indeterminate-icon);\n // Svg icons are rendered differently in different browsers thus unacceptable.\n // Png provides the best consistency with a drawback that\n // its color can't be controlled by CSS.\n .retina(@treeselect-checkbox-indeterminate-icon, 3);\n background-size: image-size(@treeselect-checkbox-indeterminate-icon);\n\n .vue-treeselect__checkbox--indeterminate > & {\n opacity: 1;\n }\n\n .vue-treeselect__checkbox--disabled & {\n .retina(@treeselect-checkbox-disabled-indeterminate-icon, 3);\n }\n}\n\n.vue-treeselect__check-mark {\n width: image-width(@treeselect-checkbox-checked-icon);\n height: image-height(@treeselect-checkbox-checked-icon);\n .retina(@treeselect-checkbox-checked-icon, 3);\n background-size: image-size(@treeselect-checkbox-checked-icon);\n // Set initial height to 1px.\n transform: scaleY(1 / unit(image-height(@treeselect-checkbox-checked-icon)));\n\n .vue-treeselect__checkbox--checked > & {\n opacity: 1;\n transform: scaleY(1);\n }\n\n .vue-treeselect__checkbox--disabled & {\n .retina(@treeselect-checkbox-disabled-checked-icon, 3);\n }\n}\n\n.vue-treeselect__checkbox--unchecked {\n border-color: @treeselect-checkbox-border-color;\n background: @treeselect-checkbox-bg;\n\n .vue-treeselect__label-container:hover & {\n border-color: @treeselect-checkbox-border-color-hover;\n background: @treeselect-checkbox-bg-hover;\n }\n}\n\n.vue-treeselect__checkbox--indeterminate {\n border-color: @treeselect-checkbox-indeterminate-border-color;\n background: @treeselect-checkbox-indeterminate-bg;\n\n .vue-treeselect__label-container:hover & {\n border-color: @treeselect-checkbox-indeterminate-border-color-hover;\n background: @treeselect-checkbox-indeterminate-bg-hover;\n }\n}\n\n.vue-treeselect__checkbox--checked {\n border-color: @treeselect-checkbox-checked-border-color;\n background: @treeselect-checkbox-checked-bg;\n\n .vue-treeselect__label-container:hover & {\n border-color: @treeselect-checkbox-checked-border-color-hover;\n background: @treeselect-checkbox-checked-bg-hover;\n }\n}\n\n.vue-treeselect__checkbox--disabled {\n border-color: @treeselect-checkbox-disabled-border-color;\n background-color: @treeselect-checkbox-disabled-bg-color;\n\n .vue-treeselect__label-container:hover & {\n border-color: @treeselect-checkbox-disabled-border-color;\n background-color: @treeselect-checkbox-disabled-bg-color;\n }\n}\n\n\n.vue-treeselect__label {\n .text-truncate();\n\n display: table-cell;\n padding-left: @treeselect-padding;\n max-width: 100%;\n vertical-align: middle;\n cursor: inherit; // override user agent style\n\n [dir=\"rtl\"] & {\n padding-left: 0;\n padding-right: @treeselect-padding;\n }\n}\n\n.vue-treeselect__count {\n margin-left: @treeselect-padding;\n font-weight: 400;\n opacity: 0.6;\n\n [dir=\"rtl\"] & {\n margin-left: 0;\n margin-right: @treeselect-padding;\n }\n}\n\n.vue-treeselect__tip {\n .row();\n\n color: @treeselect-tip-color;\n}\n\n.vue-treeselect__tip-text {\n .wide-cell();\n\n font-size: @treeselect-tip-font-size;\n}\n\n.vue-treeselect__retry {\n .vue-treeselect__error-tip & {\n .clickable();\n\n margin-left: @treeselect-padding;\n font-style: normal;\n font-weight: 600;\n text-decoration: none;\n color: @treeselect-retry-text-color;\n\n [dir=\"rtl\"] & {\n margin-left: 0;\n margin-right: @treeselect-padding;\n }\n }\n}\n\n.vue-treeselect__icon-container {\n .narrow-cell();\n\n .vue-treeselect--single & {\n padding-left: @treeselect-padding;\n\n [dir=\"rtl\"] & {\n padding-left: 0;\n padding-right: @treeselect-padding;\n }\n }\n}\n\n.vue-treeselect__icon-warning {\n .icon();\n .rounded();\n\n position: relative;\n width: @treeselect-icon-size;\n height: @treeselect-icon-size;\n background: @treeselect-warning-icon-bg;\n\n &::after {\n display: block;\n position: absolute;\n content: \"\";\n left: 5px;\n top: 2.5px;\n width: 2px;\n height: 1px;\n border: 0 solid #fff;\n border-top-width: 5px;\n border-bottom-width: 1px;\n }\n}\n\n.vue-treeselect__icon-error {\n .icon();\n .rounded();\n\n @stroke-length: 6px;\n\n position: relative;\n width: @treeselect-icon-size;\n height: @treeselect-icon-size;\n background: @treeselect-error-icon-bg;\n\n &::before,\n &::after {\n display: block;\n position: absolute;\n content: \"\";\n background: #fff;\n transform: rotate(45deg);\n }\n\n &::before {\n width: @stroke-length;\n height: 2px;\n left: 3px;\n top: 5px;\n }\n\n &::after {\n width: 2px;\n height: @stroke-length;\n left: 5px;\n top: 3px;\n }\n}\n\n.vue-treeselect__icon-loader {\n .icon();\n\n position: relative;\n width: @treeselect-icon-size;\n height: @treeselect-icon-size;\n text-align: center;\n animation: @treeselect-loader-animation-duration vue-treeselect-animation-rotate linear infinite;\n\n &::before,\n &::after {\n .rounded();\n\n position: absolute;\n content: \"\";\n left: 0;\n top: 0;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0.6;\n animation: @treeselect-loader-animation-duration vue-treeselect-animation-bounce ease-in-out infinite;\n }\n\n &::before {\n background: @treeselect-loader-color-dark;\n }\n\n &::after {\n background: @treeselect-loader-color-light;\n animation-delay: -(@treeselect-loader-animation-duration / 2);\n }\n}\n\n\n/**\n * Menu Portal\n */\n\n.vue-treeselect__menu-placeholder {\n display: none;\n}\n\n.vue-treeselect__portal-target {\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n height: 0;\n width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n overflow: visible;\n box-sizing: border-box;\n}\n","@md-red-50: #ffebee;\n@md-red-100: #ffcdd2;\n@md-red-200: #ef9a9a;\n@md-red-300: #e57373;\n@md-red-400: #ef5350;\n@md-red-500: #f44336;\n@md-red-600: #e53935;\n@md-red-700: #d32f2f;\n@md-red-800: #c62828;\n@md-red-900: #b71c1c;\n@md-red-a100: #ff8a80;\n@md-red-a200: #ff5252;\n@md-red-a400: #ff1744;\n@md-red-a700: #d50000;\n\n@md-pink-50: #fce4ec;\n@md-pink-100: #f8bbd0;\n@md-pink-200: #f48fb1;\n@md-pink-300: #f06292;\n@md-pink-400: #ec407a;\n@md-pink-500: #e91e63;\n@md-pink-600: #d81b60;\n@md-pink-700: #c2185b;\n@md-pink-800: #ad1457;\n@md-pink-900: #880e4f;\n@md-pink-a100: #ff80ab;\n@md-pink-a200: #ff4081;\n@md-pink-a400: #f50057;\n@md-pink-a700: #c51162;\n\n@md-purple-50: #f3e5f5;\n@md-purple-100: #e1bee7;\n@md-purple-200: #ce93d8;\n@md-purple-300: #ba68c8;\n@md-purple-400: #ab47bc;\n@md-purple-500: #9c27b0;\n@md-purple-600: #8e24aa;\n@md-purple-700: #7b1fa2;\n@md-purple-800: #6a1b9a;\n@md-purple-900: #4a148c;\n@md-purple-a100: #ea80fc;\n@md-purple-a200: #e040fb;\n@md-purple-a400: #d500f9;\n@md-purple-a700: #aa00ff;\n\n@md-deep-purple-50: #ede7f6;\n@md-deep-purple-100: #d1c4e9;\n@md-deep-purple-200: #b39ddb;\n@md-deep-purple-300: #9575cd;\n@md-deep-purple-400: #7e57c2;\n@md-deep-purple-500: #673ab7;\n@md-deep-purple-600: #5e35b1;\n@md-deep-purple-700: #512da8;\n@md-deep-purple-800: #4527a0;\n@md-deep-purple-900: #311b92;\n@md-deep-purple-a100: #b388ff;\n@md-deep-purple-a200: #7c4dff;\n@md-deep-purple-a400: #651fff;\n@md-deep-purple-a700: #6200ea;\n\n@md-indigo-50: #e8eaf6;\n@md-indigo-100: #c5cae9;\n@md-indigo-200: #9fa8da;\n@md-indigo-300: #7986cb;\n@md-indigo-400: #5c6bc0;\n@md-indigo-500: #3f51b5;\n@md-indigo-600: #3949ab;\n@md-indigo-700: #303f9f;\n@md-indigo-800: #283593;\n@md-indigo-900: #1a237e;\n@md-indigo-a100: #8c9eff;\n@md-indigo-a200: #536dfe;\n@md-indigo-a400: #3d5afe;\n@md-indigo-a700: #304ffe;\n\n@md-blue-50: #e3f2fd;\n@md-blue-100: #bbdefb;\n@md-blue-200: #90caf9;\n@md-blue-300: #64b5f6;\n@md-blue-400: #42a5f5;\n@md-blue-500: #2196f3;\n@md-blue-600: #1e88e5;\n@md-blue-700: #1976d2;\n@md-blue-800: #1565c0;\n@md-blue-900: #0d47a1;\n@md-blue-a100: #82b1ff;\n@md-blue-a200: #448aff;\n@md-blue-a400: #2979ff;\n@md-blue-a700: #2962ff;\n\n@md-light-blue-50: #e1f5fe;\n@md-light-blue-100: #b3e5fc;\n@md-light-blue-200: #81d4fa;\n@md-light-blue-300: #4fc3f7;\n@md-light-blue-400: #29b6f6;\n@md-light-blue-500: #03a9f4;\n@md-light-blue-600: #039be5;\n@md-light-blue-700: #0288d1;\n@md-light-blue-800: #0277bd;\n@md-light-blue-900: #01579b;\n@md-light-blue-a100: #80d8ff;\n@md-light-blue-a200: #40c4ff;\n@md-light-blue-a400: #00b0ff;\n@md-light-blue-a700: #0091ea;\n\n@md-cyan-50: #e0f7fa;\n@md-cyan-100: #b2ebf2;\n@md-cyan-200: #80deea;\n@md-cyan-300: #4dd0e1;\n@md-cyan-400: #26c6da;\n@md-cyan-500: #00bcd4;\n@md-cyan-600: #00acc1;\n@md-cyan-700: #0097a7;\n@md-cyan-800: #00838f;\n@md-cyan-900: #006064;\n@md-cyan-a100: #84ffff;\n@md-cyan-a200: #18ffff;\n@md-cyan-a400: #00e5ff;\n@md-cyan-a700: #00b8d4;\n\n@md-teal-50: #e0f2f1;\n@md-teal-100: #b2dfdb;\n@md-teal-200: #80cbc4;\n@md-teal-300: #4db6ac;\n@md-teal-400: #26a69a;\n@md-teal-500: #009688;\n@md-teal-600: #00897b;\n@md-teal-700: #00796b;\n@md-teal-800: #00695c;\n@md-teal-900: #004d40;\n@md-teal-a100: #a7ffeb;\n@md-teal-a200: #64ffda;\n@md-teal-a400: #1de9b6;\n@md-teal-a700: #00bfa5;\n\n@md-green-50: #e8f5e9;\n@md-green-100: #c8e6c9;\n@md-green-200: #a5d6a7;\n@md-green-300: #81c784;\n@md-green-400: #66bb6a;\n@md-green-500: #4caf50;\n@md-green-600: #43a047;\n@md-green-700: #388e3c;\n@md-green-800: #2e7d32;\n@md-green-900: #1b5e20;\n@md-green-a100: #b9f6ca;\n@md-green-a200: #69f0ae;\n@md-green-a400: #00e676;\n@md-green-a700: #00c853;\n\n@md-light-green-50: #f1f8e9;\n@md-light-green-100: #dcedc8;\n@md-light-green-200: #c5e1a5;\n@md-light-green-300: #aed581;\n@md-light-green-400: #9ccc65;\n@md-light-green-500: #8bc34a;\n@md-light-green-600: #7cb342;\n@md-light-green-700: #689f38;\n@md-light-green-800: #558b2f;\n@md-light-green-900: #33691e;\n@md-light-green-a100: #ccff90;\n@md-light-green-a200: #b2ff59;\n@md-light-green-a400: #76ff03;\n@md-light-green-a700: #64dd17;\n\n@md-lime-50: #f9fbe7;\n@md-lime-100: #f0f4c3;\n@md-lime-200: #e6ee9c;\n@md-lime-300: #dce775;\n@md-lime-400: #d4e157;\n@md-lime-500: #cddc39;\n@md-lime-600: #c0ca33;\n@md-lime-700: #afb42b;\n@md-lime-800: #9e9d24;\n@md-lime-900: #827717;\n@md-lime-a100: #f4ff81;\n@md-lime-a200: #eeff41;\n@md-lime-a400: #c6ff00;\n@md-lime-a700: #aeea00;\n\n@md-yellow-50: #fffde7;\n@md-yellow-100: #fff9c4;\n@md-yellow-200: #fff59d;\n@md-yellow-300: #fff176;\n@md-yellow-400: #ffee58;\n@md-yellow-500: #ffeb3b;\n@md-yellow-600: #fdd835;\n@md-yellow-700: #fbc02d;\n@md-yellow-800: #f9a825;\n@md-yellow-900: #f57f17;\n@md-yellow-a100: #ffff8d;\n@md-yellow-a200: #ffff00;\n@md-yellow-a400: #ffea00;\n@md-yellow-a700: #ffd600;\n\n@md-amber-50: #fff8e1;\n@md-amber-100: #ffecb3;\n@md-amber-200: #ffe082;\n@md-amber-300: #ffd54f;\n@md-amber-400: #ffca28;\n@md-amber-500: #ffc107;\n@md-amber-600: #ffb300;\n@md-amber-700: #ffa000;\n@md-amber-800: #ff8f00;\n@md-amber-900: #ff6f00;\n@md-amber-a100: #ffe57f;\n@md-amber-a200: #ffd740;\n@md-amber-a400: #ffc400;\n@md-amber-a700: #ffab00;\n\n@md-orange-50: #fff3e0;\n@md-orange-100: #ffe0b2;\n@md-orange-200: #ffcc80;\n@md-orange-300: #ffb74d;\n@md-orange-400: #ffa726;\n@md-orange-500: #ff9800;\n@md-orange-600: #fb8c00;\n@md-orange-700: #f57c00;\n@md-orange-800: #ef6c00;\n@md-orange-900: #e65100;\n@md-orange-a100: #ffd180;\n@md-orange-a200: #ffab40;\n@md-orange-a400: #ff9100;\n@md-orange-a700: #ff6d00;\n\n@md-deep-orange-50: #fbe9e7;\n@md-deep-orange-100: #ffccbc;\n@md-deep-orange-200: #ffab91;\n@md-deep-orange-300: #ff8a65;\n@md-deep-orange-400: #ff7043;\n@md-deep-orange-500: #ff5722;\n@md-deep-orange-600: #f4511e;\n@md-deep-orange-700: #e64a19;\n@md-deep-orange-800: #d84315;\n@md-deep-orange-900: #bf360c;\n@md-deep-orange-a100: #ff9e80;\n@md-deep-orange-a200: #ff6e40;\n@md-deep-orange-a400: #ff3d00;\n@md-deep-orange-a700: #dd2c00;\n\n@md-brown-50: #efebe9;\n@md-brown-100: #d7ccc8;\n@md-brown-200: #bcaaa4;\n@md-brown-300: #a1887f;\n@md-brown-400: #8d6e63;\n@md-brown-500: #795548;\n@md-brown-600: #6d4c41;\n@md-brown-700: #5d4037;\n@md-brown-800: #4e342e;\n@md-brown-900: #3e2723;\n\n@md-grey-50: #fafafa;\n@md-grey-100: #f5f5f5;\n@md-grey-200: #eeeeee;\n@md-grey-300: #e0e0e0;\n@md-grey-400: #bdbdbd;\n@md-grey-500: #9e9e9e;\n@md-grey-600: #757575;\n@md-grey-700: #616161;\n@md-grey-800: #424242;\n@md-grey-900: #212121;\n\n@md-blue-grey-50: #eceff1;\n@md-blue-grey-100: #cfd8dc;\n@md-blue-grey-200: #b0bec5;\n@md-blue-grey-300: #90a4ae;\n@md-blue-grey-400: #78909c;\n@md-blue-grey-500: #607d8b;\n@md-blue-grey-600: #546e7a;\n@md-blue-grey-700: #455a64;\n@md-blue-grey-800: #37474f;\n@md-blue-grey-900: #263238;\n\n@md-dark-text-primary: rgba(0, 0, 0, 0.87);\n@md-dark-text-secondary: rgba(0, 0, 0, 0.54);\n@md-dark-text-disabled: rgba(0, 0, 0, 0.38);\n@md-dark-text-dividers: rgba(0, 0, 0, 0.12);\n\n@md-light-text-primary: rgba(255, 255, 255, 1);\n@md-light-text-secondary: rgba(255, 255, 255, 0.7);\n@md-light-text-disabled: rgba(255, 255, 255, 0.5);\n@md-light-text-dividers: rgba(255, 255, 255, 0.12);\n\n@md-dark-icons-active: rgba(0, 0, 0, 0.54);\n@md-dark-icons-inactive: rgba(0, 0, 0, 0.38);\n\n@md-light-icons-active: rgba(255, 255, 255, 1);\n@md-light-icons-inactive: rgba(255, 255, 255, 0.5);\n\n@md-white: #ffffff;\n\n@md-black: #000000;\n\n\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.min.css b/dist/vue-treeselect.min.css deleted file mode 100644 index 85a02786..00000000 --- a/dist/vue-treeselect.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee - * Released under the MIT License. - * https://vue-treeselect.js.org/ - */.vue-treeselect-helper-hide{display:none}.vue-treeselect-helper-zoom-effect-off{-ms-transform:none!important;transform:none!important}@keyframes vue-treeselect-animation-fade-in{0%{opacity:0}}@keyframes vue-treeselect-animation-bounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}@keyframes vue-treeselect-animation-rotate{to{transform:rotate(1turn)}}.vue-treeselect__multi-value-item--transition-enter-active,.vue-treeselect__multi-value-item--transition-leave-active{transition-duration:.2s;transition-property:transform,opacity}.vue-treeselect__multi-value-item--transition-enter-active{transition-timing-function:cubic-bezier(.075,.82,.165,1)}.vue-treeselect__multi-value-item--transition-leave-active{transition-timing-function:cubic-bezier(.215,.61,.355,1);position:absolute}.vue-treeselect__multi-value-item--transition-enter,.vue-treeselect__multi-value-item--transition-leave-to{-ms-transform:scale(.7);transform:scale(.7);opacity:0}.vue-treeselect__multi-value-item--transition-move{transition:transform .2s cubic-bezier(.165,.84,.44,1)}.vue-treeselect{position:relative;text-align:left}[dir=rtl] .vue-treeselect{text-align:right}.vue-treeselect div,.vue-treeselect span{box-sizing:border-box}.vue-treeselect svg{fill:currentColor}.vue-treeselect__control{padding-left:5px;padding-right:5px;display:table;table-layout:fixed;width:100%;height:36px;border:1px solid #ddd;border-radius:5px;background:#fff;transition-duration:.2s;transition-property:border-color,box-shadow,width,height,background-color,opacity;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) .vue-treeselect__control:hover{border-color:#cfcfcf}.vue-treeselect--focused:not(.vue-treeselect--open) .vue-treeselect__control{border-color:#039be5;box-shadow:0 0 0 3px rgba(3,155,229,.1)}.vue-treeselect--disabled .vue-treeselect__control{background-color:#f9f9f9}.vue-treeselect--open .vue-treeselect__control{border-color:#cfcfcf}.vue-treeselect--open.vue-treeselect--open-below .vue-treeselect__control{border-bottom-left-radius:0;border-bottom-right-radius:0}.vue-treeselect--open.vue-treeselect--open-above .vue-treeselect__control{border-top-left-radius:0;border-top-right-radius:0}.vue-treeselect__multi-value,.vue-treeselect__value-container{width:100%;vertical-align:middle}.vue-treeselect__value-container{display:table-cell;position:relative}.vue-treeselect--searchable:not(.vue-treeselect--disabled) .vue-treeselect__value-container{cursor:text}.vue-treeselect__multi-value{display:inline-block}.vue-treeselect--has-value .vue-treeselect__multi-value{margin-bottom:5px}.vue-treeselect__placeholder,.vue-treeselect__single-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:5px;padding-right:5px;position:absolute;top:0;right:0;bottom:0;left:0;line-height:34px;-webkit-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.vue-treeselect__placeholder{color:#bdbdbd}.vue-treeselect__single-value{color:#333}.vue-treeselect--focused.vue-treeselect--searchable .vue-treeselect__single-value{color:#bdbdbd}.vue-treeselect--disabled .vue-treeselect__single-value{position:static}.vue-treeselect__multi-value-item-container{display:inline-block;padding-top:5px;padding-right:5px;vertical-align:top}[dir=rtl] .vue-treeselect__multi-value-item-container{padding-right:0;padding-left:5px}.vue-treeselect__multi-value-item{display:inline-table;padding:2px 0;border:1px solid rgba(0,0,0,0);border-radius:2px;font-size:12px;vertical-align:top}.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-disabled):hover .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new):hover,.vue-treeselect__multi-value-item{cursor:pointer;background:#e3f2fd;color:#039be5}.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-disabled{cursor:default;background:#f5f5f5;color:#757575}.vue-treeselect--disabled .vue-treeselect__multi-value-item{cursor:default;background:#fff;border-color:#e5e5e5;color:#555}.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new,.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new:hover{background:#e8f5e9}.vue-treeselect__multi-value-label,.vue-treeselect__value-remove{display:table-cell;padding:0 5px;vertical-align:middle}.vue-treeselect__value-remove{color:#039be5;padding-left:5px;border-left:1px solid #fff;line-height:0}[dir=rtl] .vue-treeselect__value-remove{border-left:0;border-right:1px solid #fff}.vue-treeselect__multi-value-item:hover .vue-treeselect__value-remove{color:#e53935}.vue-treeselect--disabled .vue-treeselect__value-remove,.vue-treeselect__multi-value-item-disabled .vue-treeselect__value-remove{display:none}.vue-treeselect__value-remove>svg{width:6px;height:6px}.vue-treeselect__multi-value-label{padding-right:5px;white-space:pre-line;-webkit-user-select:none;-ms-user-select:none;user-select:none}.vue-treeselect__limit-tip{display:inline-block;padding-top:5px;padding-right:5px;vertical-align:top}[dir=rtl] .vue-treeselect__limit-tip{padding-right:0;padding-left:5px}.vue-treeselect__limit-tip-text{cursor:default;display:block;margin:2px 0;padding:1px 0;color:#bdbdbd;font-size:12px;font-weight:600}.vue-treeselect__input-container{display:block;max-width:100%;outline:none}.vue-treeselect--single .vue-treeselect__input-container{font-size:inherit;height:100%}.vue-treeselect--multi .vue-treeselect__input-container{display:inline-block;font-size:12px;vertical-align:top}.vue-treeselect--searchable .vue-treeselect__input-container{padding-left:5px;padding-right:5px}.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container{padding-top:5px;padding-left:0}[dir=rtl] .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container{padding-left:5px;padding-right:0}.vue-treeselect--disabled .vue-treeselect__input-container{display:none}.vue-treeselect__input,.vue-treeselect__sizer{margin:0;line-height:inherit;font-family:inherit;font-size:inherit}.vue-treeselect__input{max-width:100%;margin:0;padding:0;border:0;outline:none;box-sizing:content-box;box-shadow:none;background:none rgba(0,0,0,0);line-height:1;vertical-align:middle}.vue-treeselect__input::-ms-clear{display:none}.vue-treeselect--single .vue-treeselect__input{width:100%;height:100%}.vue-treeselect--multi .vue-treeselect__input{padding-top:3px;padding-bottom:3px}.vue-treeselect--has-value .vue-treeselect__input{line-height:inherit;vertical-align:top}.vue-treeselect__sizer{position:absolute;top:0;left:0;visibility:hidden;height:0;overflow:scroll;white-space:pre}.vue-treeselect__x-container{display:table-cell;vertical-align:middle;width:20px;text-align:center;line-height:0;cursor:pointer;color:#ccc;animation:vue-treeselect-animation-fade-in .2s cubic-bezier(.075,.82,.165,1)}.vue-treeselect__x-container:hover{color:#e53935}.vue-treeselect__x{width:8px;height:8px}.vue-treeselect__control-arrow-container{display:table-cell;vertical-align:middle;width:20px;text-align:center;line-height:0;cursor:pointer}.vue-treeselect--disabled .vue-treeselect__control-arrow-container{cursor:default}.vue-treeselect__control-arrow{width:9px;height:9px;color:#ccc}.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover .vue-treeselect__control-arrow{color:#616161}.vue-treeselect--disabled .vue-treeselect__control-arrow{opacity:.35}.vue-treeselect__control-arrow--rotated{-ms-transform:rotate(180deg);transform:rotate(180deg)}.vue-treeselect__menu-container{position:absolute;left:0;width:100%;overflow:visible;transition:0s}.vue-treeselect--open-below:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container{top:100%}.vue-treeselect--open-above:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container{bottom:100%}.vue-treeselect__menu{cursor:default;padding-top:5px;padding-bottom:5px;display:block;position:absolute;overflow-x:hidden;overflow-y:auto;width:auto;border:1px solid #cfcfcf;background:#fff;line-height:180%;-webkit-overflow-scrolling:touch}.vue-treeselect--open-below .vue-treeselect__menu{border-bottom-left-radius:5px;border-bottom-right-radius:5px;top:0;margin-top:-1px;border-top-color:#f2f2f2;box-shadow:0 1px 0 rgba(0,0,0,.06)}.vue-treeselect--open-above .vue-treeselect__menu{border-top-left-radius:5px;border-top-right-radius:5px;bottom:0;margin-bottom:-1px;border-bottom-color:#f2f2f2}.vue-treeselect__indent-level-0 .vue-treeselect__option{padding-left:5px}[dir=rtl] .vue-treeselect__indent-level-0 .vue-treeselect__option{padding-left:5px;padding-right:5px}.vue-treeselect__indent-level-0 .vue-treeselect__tip{padding-left:25px}[dir=rtl] .vue-treeselect__indent-level-0 .vue-treeselect__tip{padding-left:5px;padding-right:25px}.vue-treeselect__indent-level-1 .vue-treeselect__option{padding-left:25px}[dir=rtl] .vue-treeselect__indent-level-1 .vue-treeselect__option{padding-left:5px;padding-right:25px}.vue-treeselect__indent-level-1 .vue-treeselect__tip{padding-left:45px}[dir=rtl] .vue-treeselect__indent-level-1 .vue-treeselect__tip{padding-left:5px;padding-right:45px}.vue-treeselect__indent-level-2 .vue-treeselect__option{padding-left:45px}[dir=rtl] .vue-treeselect__indent-level-2 .vue-treeselect__option{padding-left:5px;padding-right:45px}.vue-treeselect__indent-level-2 .vue-treeselect__tip{padding-left:65px}[dir=rtl] .vue-treeselect__indent-level-2 .vue-treeselect__tip{padding-left:5px;padding-right:65px}.vue-treeselect__indent-level-3 .vue-treeselect__option{padding-left:65px}[dir=rtl] .vue-treeselect__indent-level-3 .vue-treeselect__option{padding-left:5px;padding-right:65px}.vue-treeselect__indent-level-3 .vue-treeselect__tip{padding-left:85px}[dir=rtl] .vue-treeselect__indent-level-3 .vue-treeselect__tip{padding-left:5px;padding-right:85px}.vue-treeselect__indent-level-4 .vue-treeselect__option{padding-left:85px}[dir=rtl] .vue-treeselect__indent-level-4 .vue-treeselect__option{padding-left:5px;padding-right:85px}.vue-treeselect__indent-level-4 .vue-treeselect__tip{padding-left:105px}[dir=rtl] .vue-treeselect__indent-level-4 .vue-treeselect__tip{padding-left:5px;padding-right:105px}.vue-treeselect__indent-level-5 .vue-treeselect__option{padding-left:105px}[dir=rtl] .vue-treeselect__indent-level-5 .vue-treeselect__option{padding-left:5px;padding-right:105px}.vue-treeselect__indent-level-5 .vue-treeselect__tip{padding-left:125px}[dir=rtl] .vue-treeselect__indent-level-5 .vue-treeselect__tip{padding-left:5px;padding-right:125px}.vue-treeselect__indent-level-6 .vue-treeselect__option{padding-left:125px}[dir=rtl] .vue-treeselect__indent-level-6 .vue-treeselect__option{padding-left:5px;padding-right:125px}.vue-treeselect__indent-level-6 .vue-treeselect__tip{padding-left:145px}[dir=rtl] .vue-treeselect__indent-level-6 .vue-treeselect__tip{padding-left:5px;padding-right:145px}.vue-treeselect__indent-level-7 .vue-treeselect__option{padding-left:145px}[dir=rtl] .vue-treeselect__indent-level-7 .vue-treeselect__option{padding-left:5px;padding-right:145px}.vue-treeselect__indent-level-7 .vue-treeselect__tip{padding-left:165px}[dir=rtl] .vue-treeselect__indent-level-7 .vue-treeselect__tip{padding-left:5px;padding-right:165px}.vue-treeselect__indent-level-8 .vue-treeselect__option{padding-left:165px}[dir=rtl] .vue-treeselect__indent-level-8 .vue-treeselect__option{padding-left:5px;padding-right:165px}.vue-treeselect__indent-level-8 .vue-treeselect__tip{padding-left:185px}[dir=rtl] .vue-treeselect__indent-level-8 .vue-treeselect__tip{padding-left:5px;padding-right:185px}.vue-treeselect__option{padding-left:5px;padding-right:5px;display:table;table-layout:fixed;width:100%}.vue-treeselect__option--highlight{background:#f5f5f5}.vue-treeselect--single .vue-treeselect__option--selected{background:#e3f2fd;font-weight:600}.vue-treeselect--single .vue-treeselect__option--selected:hover{background:#e3f2fd}.vue-treeselect__option--hide{display:none}.vue-treeselect__option-arrow-container,.vue-treeselect__option-arrow-placeholder{display:table-cell;vertical-align:middle;width:20px;text-align:center;line-height:0}.vue-treeselect__option-arrow-container{cursor:pointer}.vue-treeselect__option-arrow{display:inline-block;width:9px;height:9px;color:#ccc;vertical-align:middle;transition:transform .2s cubic-bezier(.19,1,.22,1);-ms-transform:rotate(-90deg);transform:rotate(-90deg)}[dir=rtl] .vue-treeselect__option-arrow{-ms-transform:rotate(90deg);transform:rotate(90deg)}.vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover .vue-treeselect__option-arrow,.vue-treeselect__option-arrow-container:hover .vue-treeselect__option-arrow{color:#616161}.vue-treeselect__option-arrow--rotated,[dir=rtl] .vue-treeselect__option-arrow--rotated{-ms-transform:rotate(0);transform:rotate(0)}.vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter{-ms-transform:rotate(-90deg)!important;transform:rotate(-90deg)!important}[dir=rtl] .vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter{-ms-transform:rotate(90deg)!important;transform:rotate(90deg)!important}.vue-treeselect__label-container{display:table-cell;vertical-align:middle;cursor:pointer;display:table;width:100%;table-layout:fixed;color:inherit}.vue-treeselect__option--disabled .vue-treeselect__label-container{cursor:not-allowed;color:rgba(0,0,0,.25)}.vue-treeselect__checkbox-container{display:table-cell;width:20px;min-width:20px;height:100%;text-align:center;vertical-align:middle}.vue-treeselect__checkbox{display:block;margin:auto;width:12px;height:12px;border-width:1px;border-style:solid;border-radius:2px;position:relative;transition:all .2s cubic-bezier(.075,.82,.165,1)}.vue-treeselect__check-mark,.vue-treeselect__minus-mark{display:block;position:absolute;left:1px;top:1px;background-repeat:no-repeat;opacity:0;transition:all .2s ease}.vue-treeselect__minus-mark{width:8px;height:8px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=);background-size:8px 8px}@media (-webkit-min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:288dpi){.vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAAD///////////////+PQt5oAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==)}}.vue-treeselect__checkbox--indeterminate>.vue-treeselect__minus-mark{opacity:1}.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAADi4uLh4eHOxeSRAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=)}@media (-webkit-min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:288dpi){.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAADh4eHg4ODNzc3h4eEYfw2wAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==)}}.vue-treeselect__check-mark{width:8px;height:8px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAQlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////8IX9KGAAAAFXRSTlMA8u24NxILB+Tawb6jiH1zRz0xIQIIP3GUAAAAMklEQVQI1y3FtQEAMQDDQD+EGbz/qkEVOpyEOP6PudKjZNSXn4Jm2CKRdBKzSLsFWl8fMG0Bl6Jk1rMAAAAASUVORK5CYII=);background-size:8px 8px;-ms-transform:scaleY(.125);transform:scaleY(.125)}@media (-webkit-min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC)}}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC)}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:288dpi){.vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAWlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////9ZMre9AAAAHXRSTlMA/PiJhGNI9XlEHJB/b2ldV08+Oibk49vPp6QhAYgGBuwAAACCSURBVCjPrdHdDoIwDAXgTWAqCigo/+f9X5OwnoUwtis4V92XNWladUl+rzQPeQJAN2EHxoOnsPn7/oYk8fxBv08Rr/deOH/aZ2Nm8ZJ+s573QGfWKnNuZGzWm3+lv2V3pcU1XQ385/yjmBoM3Z+dXvlbYLLD3ujhTaOM3KaIXvNkFkuSEvYy1LqOAAAAAElFTkSuQmCC)}}.vue-treeselect__checkbox--checked>.vue-treeselect__check-mark{opacity:1;-ms-transform:scaleY(1);transform:scaleY(1)}.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAP1BMVEUAAADj4+Pf39/h4eHh4eHh4eHk5OTh4eHg4ODi4uLh4eHh4eHg4ODh4eHh4eHg4ODh4eHh4eHp6en////h4eFqcyvUAAAAFHRSTlMAOQfy7bgS5NrBvqOIfXNHMSELAgQ/iFsAAAA2SURBVAjXY4AANjYIzcjMAaVFuBkY+RkEWERYmRjYRXjANAOfiIgIFxNIAa8IpxBEi6AwiAQAK2MBd7xY8csAAAAASUVORK5CYII=)}@media (-webkit-min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:288dpi){.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAUVBMVEUAAADh4eHh4eHh4eHh4eHi4uLi4uLh4eHh4eHh4eHf39/j4+Ph4eHh4eHh4eHg4ODi4uLh4eHh4eHi4uLh4eHh4eHh4eHh4eHh4eH////h4eF3FMFTAAAAGnRSTlMA+/eJhGhfSHE9JBzz5KaQf3pXT0Xbz0I5AYDw8F0AAAB+SURBVCjPrdHbDoMgEEVRKAii1dZe9fz/hxplTiKIT7qfYCWTEEZdUvOwbckNAD2WHeh3brHW5f5EzGQ+iN+b1Gt6KPvtv16Dn6JX9M9ya3/A1yfu5dlyduL6Hec7mXY6ddXLPP2lpABGZ8PWXfYLTJxZekVhhl7eTX24zZPNKXoRC7zQLjUAAAAASUVORK5CYII=)}}.vue-treeselect__checkbox--unchecked{border-color:#e0e0e0;background:#fff}.vue-treeselect__label-container:hover .vue-treeselect__checkbox--unchecked{border-color:#039be5;background:#fff}.vue-treeselect__checkbox--checked,.vue-treeselect__checkbox--indeterminate,.vue-treeselect__label-container:hover .vue-treeselect__checkbox--checked,.vue-treeselect__label-container:hover .vue-treeselect__checkbox--indeterminate{border-color:#039be5;background:#039be5}.vue-treeselect__checkbox--disabled,.vue-treeselect__label-container:hover .vue-treeselect__checkbox--disabled{border-color:#e0e0e0;background-color:#f7f7f7}.vue-treeselect__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:table-cell;padding-left:5px;max-width:100%;vertical-align:middle;cursor:inherit}[dir=rtl] .vue-treeselect__label{padding-left:0;padding-right:5px}.vue-treeselect__count{margin-left:5px;font-weight:400;opacity:.6}[dir=rtl] .vue-treeselect__count{margin-left:0;margin-right:5px}.vue-treeselect__tip{padding-left:5px;padding-right:5px;display:table;table-layout:fixed;width:100%;color:#757575}.vue-treeselect__tip-text{display:table-cell;vertical-align:middle;padding-left:5px;padding-right:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-size:12px}.vue-treeselect__error-tip .vue-treeselect__retry{cursor:pointer;margin-left:5px;font-style:normal;font-weight:600;text-decoration:none;color:#039be5}[dir=rtl] .vue-treeselect__error-tip .vue-treeselect__retry{margin-left:0;margin-right:5px}.vue-treeselect__icon-container{display:table-cell;vertical-align:middle;width:20px;text-align:center;line-height:0}.vue-treeselect--single .vue-treeselect__icon-container{padding-left:5px}[dir=rtl] .vue-treeselect--single .vue-treeselect__icon-container{padding-left:0;padding-right:5px}.vue-treeselect__icon-warning{display:block;margin:auto;border-radius:50%;position:relative;width:12px;height:12px;background:#fb8c00}.vue-treeselect__icon-warning:after{display:block;position:absolute;content:"";left:5px;top:2.5px;width:2px;height:1px;border-color:#fff;border-style:solid;border-width:5px 0 1px}.vue-treeselect__icon-error{display:block;margin:auto;border-radius:50%;position:relative;width:12px;height:12px;background:#e53935}.vue-treeselect__icon-error:after,.vue-treeselect__icon-error:before{display:block;position:absolute;content:"";background:#fff;-ms-transform:rotate(45deg);transform:rotate(45deg)}.vue-treeselect__icon-error:before{width:6px;height:2px;left:3px;top:5px}.vue-treeselect__icon-error:after{width:2px;height:6px;left:5px;top:3px}.vue-treeselect__icon-loader{display:block;margin:auto;position:relative;width:12px;height:12px;text-align:center;animation:vue-treeselect-animation-rotate 1.6s linear infinite}.vue-treeselect__icon-loader:after,.vue-treeselect__icon-loader:before{border-radius:50%;position:absolute;content:"";left:0;top:0;display:block;width:100%;height:100%;opacity:.6;animation:vue-treeselect-animation-bounce 1.6s ease-in-out infinite}.vue-treeselect__icon-loader:before{background:#039be5}.vue-treeselect__icon-loader:after{background:#b3e5fc;animation-delay:-.8s}.vue-treeselect__menu-placeholder{display:none}.vue-treeselect__portal-target{position:absolute;display:block;left:0;top:0;height:0;width:0;padding:0;margin:0;border:0;overflow:visible;box-sizing:border-box} \ No newline at end of file diff --git a/dist/vue-treeselect.umd.js b/dist/vue-treeselect.umd.js deleted file mode 100644 index a79e938a..00000000 --- a/dist/vue-treeselect.umd.js +++ /dev/null @@ -1,5075 +0,0 @@ -/*! - * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee - * Released under the MIT License. - * https://vue-treeselect.js.org/ - */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("Vue")); - else if(typeof define === 'function' && define.amd) - define(["Vue"], factory); - else if(typeof exports === 'object') - exports["VueTreeselect"] = factory(require("Vue")); - else - root["VueTreeselect"] = factory(root["Vue"]); -})(window, function(__WEBPACK_EXTERNAL_MODULE__36__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/"; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 38); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayWithHoles = __webpack_require__(1); - -var iterableToArrayLimit = __webpack_require__(2); - -var unsupportedIterableToArray = __webpack_require__(3); - -var nonIterableRest = __webpack_require__(5); - -function _slicedToArray(arr, i) { - return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); -} - -module.exports = _slicedToArray; - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -module.exports = _arrayWithHoles; - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; -} - -module.exports = _iterableToArrayLimit; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayLikeToArray = __webpack_require__(4); - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(n); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); -} - -module.exports = _unsupportedIterableToArray; - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } - - return arr2; -} - -module.exports = _arrayLikeToArray; - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} - -module.exports = _nonIterableRest; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayWithoutHoles = __webpack_require__(7); - -var iterableToArray = __webpack_require__(8); - -var unsupportedIterableToArray = __webpack_require__(3); - -var nonIterableSpread = __webpack_require__(9); - -function _toConsumableArray(arr) { - return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); -} - -module.exports = _toConsumableArray; - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayLikeToArray = __webpack_require__(4); - -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return arrayLikeToArray(arr); -} - -module.exports = _arrayWithoutHoles; - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); -} - -module.exports = _iterableToArray; - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} - -module.exports = _nonIterableSpread; - -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -module.exports = _defineProperty; - -/***/ }), -/* 11 */ -/***/ (function(module, exports) { - -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -module.exports = noop; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(13), - now = __webpack_require__(14), - toNumber = __webpack_require__(18); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ -function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - timeWaiting = wait - timeSinceLastCall; - - return maxing - ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) - : timeWaiting; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); - } - - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; -} - -module.exports = debounce; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -var root = __webpack_require__(15); - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return root.Date.now(); -}; - -module.exports = now; - - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -var freeGlobal = __webpack_require__(16); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17))) - -/***/ }), -/* 17 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(13), - isSymbol = __webpack_require__(19); - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = toNumber; - - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseGetTag = __webpack_require__(20), - isObjectLike = __webpack_require__(24); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -module.exports = isSymbol; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -var Symbol = __webpack_require__(21), - getRawTag = __webpack_require__(22), - objectToString = __webpack_require__(23); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -var root = __webpack_require__(15); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -var Symbol = __webpack_require__(21); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -module.exports = getRawTag; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -module.exports = objectToString; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports) { - -module.exports = isPromise; - -function isPromise(obj) { - return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; -} - - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -var before = __webpack_require__(27); - -/** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ -function once(func) { - return before(2, func); -} - -module.exports = once; - - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__(28); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; -} - -module.exports = before; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -var toFinite = __webpack_require__(29); - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -module.exports = toInteger; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -var toNumber = __webpack_require__(18); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -module.exports = toFinite; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports) { - -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} - -module.exports = constant; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports) { - -function _typeof(obj) { - "@babel/helpers - typeof"; - - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); -} - -module.exports = _typeof; - -/***/ }), -/* 33 */ -/***/ (function(module, exports) { - -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -module.exports = last; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function fuzzysearch (needle, haystack) { - var tlen = haystack.length; - var qlen = needle.length; - if (qlen > tlen) { - return false; - } - if (qlen === tlen) { - return needle === haystack; - } - outer: for (var i = 0, j = 0; i < qlen; i++) { - var nch = needle.charCodeAt(i); - while (j < tlen) { - if (haystack.charCodeAt(j++) === nch) { - continue outer; - } - } - return false; - } - return true; -} - -module.exports = fuzzysearch; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports) { - -var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/ - -module.exports = function mergeJSXProps (objs) { - return objs.reduce(function (a, b) { - var aa, bb, key, nestedKey, temp - for (key in b) { - aa = a[key] - bb = b[key] - if (aa && nestRE.test(key)) { - // normalize class - if (key === 'class') { - if (typeof aa === 'string') { - temp = aa - a[key] = aa = {} - aa[temp] = true - } - if (typeof bb === 'string') { - temp = bb - b[key] = bb = {} - bb[temp] = true - } - } - if (key === 'on' || key === 'nativeOn' || key === 'hook') { - // merge functions - for (nestedKey in bb) { - aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey]) - } - } else if (Array.isArray(aa)) { - a[key] = aa.concat(bb) - } else if (Array.isArray(bb)) { - a[key] = [aa].concat(bb) - } else { - for (nestedKey in bb) { - aa[nestedKey] = bb[nestedKey] - } - } - } else { - a[key] = b[key] - } - } - return a - }, {}) -} - -function mergeFn (a, b) { - return function () { - a && a.apply(this, arguments) - b && b.apply(this, arguments) - } -} - - -/***/ }), -/* 36 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE__36__; - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin - -/***/ }), -/* 38 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); - -// EXPORTS -__webpack_require__.d(__webpack_exports__, "Treeselect", function() { return /* reexport */ Treeselect; }); -__webpack_require__.d(__webpack_exports__, "treeselectMixin", function() { return /* reexport */ treeselectMixin; }); -__webpack_require__.d(__webpack_exports__, "LOAD_ROOT_OPTIONS", function() { return /* reexport */ LOAD_ROOT_OPTIONS; }); -__webpack_require__.d(__webpack_exports__, "LOAD_CHILDREN_OPTIONS", function() { return /* reexport */ LOAD_CHILDREN_OPTIONS; }); -__webpack_require__.d(__webpack_exports__, "ASYNC_SEARCH", function() { return /* reexport */ ASYNC_SEARCH; }); -__webpack_require__.d(__webpack_exports__, "VERSION", function() { return /* binding */ VERSION; }); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js -var slicedToArray = __webpack_require__(0); -var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js -var toConsumableArray = __webpack_require__(6); -var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js -var defineProperty = __webpack_require__(10); -var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); - -// EXTERNAL MODULE: ./node_modules/lodash/noop.js -var noop = __webpack_require__(11); - -// CONCATENATED MODULE: ./src/utils/noop.js - -// CONCATENATED MODULE: ./src/utils/warning.js - - -var warning_warning = false ? undefined : function warning(checker, complainer) { - if (!checker()) { - var _console; - - var message = ['[Vue-Treeselect Warning]'].concat(complainer()); - - (_console = console).error.apply(_console, toConsumableArray_default()(message)); - } -}; -// CONCATENATED MODULE: ./src/utils/onLeftClick.js -function onLeftClick(mouseDownHandler) { - return function onMouseDown(evt) { - if (evt.type === 'mousedown' && evt.button === 0) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - mouseDownHandler.call.apply(mouseDownHandler, [this, evt].concat(args)); - } - }; -} -// CONCATENATED MODULE: ./src/utils/scrollIntoView.js -function scrollIntoView($scrollingEl, $focusedEl) { - var scrollingReact = $scrollingEl.getBoundingClientRect(); - var focusedRect = $focusedEl.getBoundingClientRect(); - var overScroll = $focusedEl.offsetHeight / 3; - - if (focusedRect.bottom + overScroll > scrollingReact.bottom) { - $scrollingEl.scrollTop = Math.min($focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll, $scrollingEl.scrollHeight); - } else if (focusedRect.top - overScroll < scrollingReact.top) { - $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0); - } -} -// EXTERNAL MODULE: ./node_modules/lodash/debounce.js -var debounce = __webpack_require__(12); -var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce); - -// CONCATENATED MODULE: ./src/utils/debounce.js - -// CONCATENATED MODULE: ./node_modules/watch-size/index.es.mjs -var index_es_index = (function (element, listener) { - var expand = document.createElement('_'); - var shrink = expand.appendChild(document.createElement('_')); - var expandChild = expand.appendChild(document.createElement('_')); - var shrinkChild = shrink.appendChild(document.createElement('_')); - - var lastWidth = void 0, - lastHeight = void 0; - - shrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1'; - shrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%'; - shrinkChild.style.width = shrinkChild.style.height = '200%'; - - element.appendChild(expand); - - test(); - - return stop; - - function test() { - unbind(); - - var width = element.offsetWidth; - var height = element.offsetHeight; - - if (width !== lastWidth || height !== lastHeight) { - lastWidth = width; - lastHeight = height; - - expandChild.style.width = width * 2 + 'px'; - expandChild.style.height = height * 2 + 'px'; - - expand.scrollLeft = expand.scrollWidth; - expand.scrollTop = expand.scrollHeight; - shrink.scrollLeft = shrink.scrollWidth; - shrink.scrollTop = shrink.scrollHeight; - - listener({ width: width, height: height }); - } - - shrink.addEventListener('scroll', test); - expand.addEventListener('scroll', test); - } - - function unbind() { - shrink.removeEventListener('scroll', test); - expand.removeEventListener('scroll', test); - } - - function stop() { - unbind(); - - element.removeChild(expand); - } -}); - -/* harmony default export */ var index_es = (index_es_index); - -// CONCATENATED MODULE: ./src/utils/removeFromArray.js -function removeFromArray(arr, elem) { - var idx = arr.indexOf(elem); - if (idx !== -1) arr.splice(idx, 1); -} -// CONCATENATED MODULE: ./src/utils/watchSize.js - - -var intervalId; -var registered = []; -var INTERVAL_DURATION = 100; - -function run() { - intervalId = setInterval(function () { - registered.forEach(test); - }, INTERVAL_DURATION); -} - -function stop() { - clearInterval(intervalId); - intervalId = null; -} - -function test(item) { - var $el = item.$el, - listener = item.listener, - lastWidth = item.lastWidth, - lastHeight = item.lastHeight; - var width = $el.offsetWidth; - var height = $el.offsetHeight; - - if (lastWidth !== width || lastHeight !== height) { - item.lastWidth = width; - item.lastHeight = height; - listener({ - width: width, - height: height - }); - } -} - -function watchSizeForIE9($el, listener) { - var item = { - $el: $el, - listener: listener, - lastWidth: null, - lastHeight: null - }; - - var unwatch = function unwatch() { - removeFromArray(registered, item); - if (!registered.length) stop(); - }; - - registered.push(item); - test(item); - run(); - return unwatch; -} - -function watchSize($el, listener) { - var isIE9 = document.documentMode === 9; - var locked = true; - - var wrappedListener = function wrappedListener() { - return locked || listener.apply(void 0, arguments); - }; - - var implementation = isIE9 ? watchSizeForIE9 : index_es; - var removeSizeWatcher = implementation($el, wrappedListener); - locked = false; - return removeSizeWatcher; -} -// CONCATENATED MODULE: ./src/utils/setupResizeAndScrollEventListeners.js -function findScrollParents($el) { - var $scrollParents = []; - var $parent = $el.parentNode; - - while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) { - if (isScrollElment($parent)) $scrollParents.push($parent); - $parent = $parent.parentNode; - } - - $scrollParents.push(window); - return $scrollParents; -} - -function isScrollElment($el) { - var _getComputedStyle = getComputedStyle($el), - overflow = _getComputedStyle.overflow, - overflowX = _getComputedStyle.overflowX, - overflowY = _getComputedStyle.overflowY; - - return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX); -} - -function setupResizeAndScrollEventListeners($el, listener) { - var $scrollParents = findScrollParents($el); - window.addEventListener('resize', listener, { - passive: true - }); - $scrollParents.forEach(function (scrollParent) { - scrollParent.addEventListener('scroll', listener, { - passive: true - }); - }); - return function removeEventListeners() { - window.removeEventListener('resize', listener, { - passive: true - }); - $scrollParents.forEach(function ($scrollParent) { - $scrollParent.removeEventListener('scroll', listener, { - passive: true - }); - }); - }; -} -// CONCATENATED MODULE: ./src/utils/isNaN.js -function isNaN_isNaN(x) { - return x !== x; -} -// EXTERNAL MODULE: ./node_modules/is-promise/index.js -var is_promise = __webpack_require__(25); -var is_promise_default = /*#__PURE__*/__webpack_require__.n(is_promise); - -// CONCATENATED MODULE: ./src/utils/isPromise.js - -// EXTERNAL MODULE: ./node_modules/lodash/once.js -var once = __webpack_require__(26); -var once_default = /*#__PURE__*/__webpack_require__.n(once); - -// CONCATENATED MODULE: ./src/utils/once.js - -// EXTERNAL MODULE: ./node_modules/lodash/identity.js -var identity = __webpack_require__(30); -var identity_default = /*#__PURE__*/__webpack_require__.n(identity); - -// CONCATENATED MODULE: ./src/utils/identity.js - -// EXTERNAL MODULE: ./node_modules/lodash/constant.js -var constant = __webpack_require__(31); -var constant_default = /*#__PURE__*/__webpack_require__.n(constant); - -// CONCATENATED MODULE: ./src/utils/constant.js - -// CONCATENATED MODULE: ./src/utils/createMap.js -var createMap = function createMap() { - return Object.create(null); -}; -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js -var helpers_typeof = __webpack_require__(32); -var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof); - -// CONCATENATED MODULE: ./src/utils/deepExtend.js - - -function isPlainObject(value) { - if (value == null || typeof_default()(value) !== 'object') return false; - return Object.getPrototypeOf(value) === Object.prototype; -} - -function copy(obj, key, value) { - if (isPlainObject(value)) { - obj[key] || (obj[key] = {}); - deepExtend(obj[key], value); - } else { - obj[key] = value; - } -} - -function deepExtend(target, source) { - if (isPlainObject(source)) { - var keys = Object.keys(source); - - for (var i = 0, len = keys.length; i < len; i++) { - copy(target, keys[i], source[keys[i]]); - } - } - - return target; -} -// EXTERNAL MODULE: ./node_modules/lodash/last.js -var lodash_last = __webpack_require__(33); -var last_default = /*#__PURE__*/__webpack_require__.n(lodash_last); - -// CONCATENATED MODULE: ./src/utils/last.js - -// CONCATENATED MODULE: ./src/utils/includes.js -function includes(arrOrStr, elem) { - return arrOrStr.indexOf(elem) !== -1; -} -// CONCATENATED MODULE: ./src/utils/find.js -function find(arr, predicate, ctx) { - for (var i = 0, len = arr.length; i < len; i++) { - if (predicate.call(ctx, arr[i], i, arr)) return arr[i]; - } - - return undefined; -} -// CONCATENATED MODULE: ./src/utils/quickDiff.js -function quickDiff(arrA, arrB) { - if (arrA.length !== arrB.length) return true; - - for (var i = 0; i < arrA.length; i++) { - if (arrA[i] !== arrB[i]) return true; - } - - return false; -} -// CONCATENATED MODULE: ./src/utils/index.js - - - - - - - - - - - - - - - - - - - -// CONCATENATED MODULE: ./src/constants.js -var NO_PARENT_NODE = null; -var UNCHECKED = 0; -var INDETERMINATE = 1; -var CHECKED = 2; -var ALL_CHILDREN = 'ALL_CHILDREN'; -var ALL_DESCENDANTS = 'ALL_DESCENDANTS'; -var LEAF_CHILDREN = 'LEAF_CHILDREN'; -var LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'; -var LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'; -var LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'; -var ASYNC_SEARCH = 'ASYNC_SEARCH'; -var ALL = 'ALL'; -var BRANCH_PRIORITY = 'BRANCH_PRIORITY'; -var LEAF_PRIORITY = 'LEAF_PRIORITY'; -var ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'; -var ORDER_SELECTED = 'ORDER_SELECTED'; -var LEVEL = 'LEVEL'; -var INDEX = 'INDEX'; -var KEY_CODES = { - BACKSPACE: 8, - ENTER: 13, - ESCAPE: 27, - END: 35, - HOME: 36, - ARROW_LEFT: 37, - ARROW_UP: 38, - ARROW_RIGHT: 39, - ARROW_DOWN: 40, - DELETE: 46 -}; -var INPUT_DEBOUNCE_DELAY = false ? undefined : 200; -var MIN_INPUT_WIDTH = 5; -var MENU_BUFFER = 40; -// EXTERNAL MODULE: ./node_modules/fuzzysearch/index.js -var fuzzysearch = __webpack_require__(34); -var fuzzysearch_default = /*#__PURE__*/__webpack_require__.n(fuzzysearch); - -// CONCATENATED MODULE: ./src/mixins/treeselectMixin.js - - - - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - - - - - -function sortValueByIndex(a, b) { - var i = 0; - - do { - if (a.level < i) return -1; - if (b.level < i) return 1; - if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]; - i++; - } while (true); -} - -function sortValueByLevel(a, b) { - return a.level === b.level ? sortValueByIndex(a, b) : a.level - b.level; -} - -function createAsyncOptionsStates() { - return { - isLoaded: false, - isLoading: false, - loadingError: '' - }; -} - -function slugify(str) { - var map = { - a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä', - e: 'é|è|ê|ë|E|É|È|Ê|Ë', - i: 'í|ì|î|ï|I|Í|Ì|Î|Ï', - o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö', - u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü' - }; - str = str.toLowerCase(); - - for (var pattern in map) { - str = str.replace(new RegExp(map[pattern], 'g'), pattern); - } - - return str; -} - -function stringifyOptionPropValue(value) { - if (typeof value === 'string') return value; - if (typeof value === 'number' && !isNaN_isNaN(value)) return value + ''; - return ''; -} - -function match(enableFuzzyMatch, replaceAccents, needle, haystack) { - return enableFuzzyMatch ? fuzzysearch_default()(needle, haystack) : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle); -} - -function getErrorMessage(err) { - return err.message || String(err); -} - -var instanceId = 0; -/* harmony default export */ var treeselectMixin = ({ - provide: function provide() { - return { - instance: this - }; - }, - props: { - allowClearingDisabled: { - type: Boolean, - default: false - }, - allowSelectingDisabledDescendants: { - type: Boolean, - default: false - }, - alwaysOpen: { - type: Boolean, - default: false - }, - appendToBody: { - type: Boolean, - default: false - }, - async: { - type: Boolean, - default: false - }, - autoFocus: { - type: Boolean, - default: false - }, - autoLoadRootOptions: { - type: Boolean, - default: true - }, - autoDeselectAncestors: { - type: Boolean, - default: false - }, - autoDeselectDescendants: { - type: Boolean, - default: false - }, - autoSelectAncestors: { - type: Boolean, - default: false - }, - autoSelectDescendants: { - type: Boolean, - default: false - }, - backspaceRemoves: { - type: Boolean, - default: true - }, - beforeClearAll: { - type: Function, - default: constant_default()(true) - }, - branchNodesFirst: { - type: Boolean, - default: false - }, - cacheOptions: { - type: Boolean, - default: true - }, - clearable: { - type: Boolean, - default: true - }, - clearAllText: { - type: String, - default: 'Clear all' - }, - clearOnSelect: { - type: Boolean, - default: false - }, - clearValueText: { - type: String, - default: 'Clear value' - }, - closeOnSelect: { - type: Boolean, - default: true - }, - defaultExpandLevel: { - type: Number, - default: 0 - }, - defaultOptions: { - default: false - }, - deleteRemoves: { - type: Boolean, - default: true - }, - delimiter: { - type: String, - default: ',' - }, - flattenSearchResults: { - type: Boolean, - default: false - }, - disableBranchNodes: { - type: Boolean, - default: false - }, - disabled: { - type: Boolean, - default: false - }, - disableFuzzyMatching: { - type: Boolean, - default: false - }, - flat: { - type: Boolean, - default: false - }, - instanceId: { - default: function _default() { - return "".concat(instanceId++, "$$"); - }, - type: [String, Number] - }, - joinValues: { - type: Boolean, - default: false - }, - limit: { - type: Number, - default: Infinity - }, - limitText: { - type: Function, - default: function limitTextDefault(count) { - return "and ".concat(count, " more"); - } - }, - loadingText: { - type: String, - default: 'Loading...' - }, - loadOptions: { - type: Function - }, - matchKeys: { - type: Array, - default: constant_default()(['label']) - }, - maxHeight: { - type: Number, - default: 300 - }, - multiple: { - type: Boolean, - default: false - }, - name: { - type: String - }, - noChildrenText: { - type: String, - default: 'No sub-options.' - }, - noOptionsText: { - type: String, - default: 'No options available.' - }, - noResultsText: { - type: String, - default: 'No results found...' - }, - normalizer: { - type: Function, - default: identity_default.a - }, - openDirection: { - type: String, - default: 'auto', - validator: function validator(value) { - var acceptableValues = ['auto', 'top', 'bottom', 'above', 'below']; - return includes(acceptableValues, value); - } - }, - openOnClick: { - type: Boolean, - default: true - }, - openOnFocus: { - type: Boolean, - default: false - }, - options: { - type: Array - }, - placeholder: { - type: String, - default: 'Select...' - }, - required: { - type: Boolean, - default: false - }, - retryText: { - type: String, - default: 'Retry?' - }, - retryTitle: { - type: String, - default: 'Click to retry' - }, - searchable: { - type: Boolean, - default: true - }, - searchNested: { - type: Boolean, - default: false - }, - searchPromptText: { - type: String, - default: 'Type to search...' - }, - showCount: { - type: Boolean, - default: false - }, - showCountOf: { - type: String, - default: ALL_CHILDREN, - validator: function validator(value) { - var acceptableValues = [ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS]; - return includes(acceptableValues, value); - } - }, - showCountOnSearch: null, - sortValueBy: { - type: String, - default: ORDER_SELECTED, - validator: function validator(value) { - var acceptableValues = [ORDER_SELECTED, LEVEL, INDEX]; - return includes(acceptableValues, value); - } - }, - tabIndex: { - type: Number, - default: 0 - }, - value: null, - valueConsistsOf: { - type: String, - default: BRANCH_PRIORITY, - validator: function validator(value) { - var acceptableValues = [ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE]; - return includes(acceptableValues, value); - } - }, - valueFormat: { - type: String, - default: 'id' - }, - zIndex: { - type: [Number, String], - default: 999 - }, - inputDebounceDelay: { - type: Number, - default: INPUT_DEBOUNCE_DELAY - }, - replaceAccents: { - type: Boolean, - default: false - } - }, - data: function data() { - return { - trigger: { - isFocused: false, - searchQuery: '' - }, - menu: { - isOpen: false, - current: null, - lastScrollPosition: 0, - placement: 'bottom' - }, - forest: { - normalizedOptions: [], - nodeMap: createMap(), - checkedStateMap: createMap(), - selectedNodeIds: this.extractCheckedNodeIdsFromValue(), - selectedNodeMap: createMap() - }, - rootOptionsStates: createAsyncOptionsStates(), - localSearch: { - active: false, - noResults: true, - countMap: createMap() - }, - remoteSearch: createMap() - }; - }, - computed: { - selectedNodes: function selectedNodes() { - return this.forest.selectedNodeIds.map(this.getNode); - }, - internalValue: function internalValue() { - var _this = this; - - var internalValue; - - if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) { - internalValue = this.forest.selectedNodeIds.slice(); - } else if (this.valueConsistsOf === BRANCH_PRIORITY) { - internalValue = this.forest.selectedNodeIds.filter(function (id) { - var node = _this.getNode(id); - - if (node.isRootNode) return true; - return !_this.isSelected(node.parentNode); - }); - } else if (this.valueConsistsOf === LEAF_PRIORITY) { - internalValue = this.forest.selectedNodeIds.filter(function (id) { - var node = _this.getNode(id); - - if (node.isLeaf) return true; - return node.children.length === 0; - }); - } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) { - var _internalValue; - - var indeterminateNodeIds = []; - internalValue = this.forest.selectedNodeIds.slice(); - this.selectedNodes.forEach(function (selectedNode) { - selectedNode.ancestors.forEach(function (ancestor) { - if (includes(indeterminateNodeIds, ancestor.id)) return; - if (includes(internalValue, ancestor.id)) return; - indeterminateNodeIds.push(ancestor.id); - }); - }); - - (_internalValue = internalValue).push.apply(_internalValue, indeterminateNodeIds); - } - - if (this.sortValueBy === LEVEL) { - internalValue.sort(function (a, b) { - return sortValueByLevel(_this.getNode(a), _this.getNode(b)); - }); - } else if (this.sortValueBy === INDEX) { - internalValue.sort(function (a, b) { - return sortValueByIndex(_this.getNode(a), _this.getNode(b)); - }); - } - - return internalValue; - }, - hasValue: function hasValue() { - return this.internalValue.length > 0; - }, - single: function single() { - return !this.multiple; - }, - visibleOptionIds: function visibleOptionIds() { - var _this2 = this; - - var visibleOptionIds = []; - this.traverseAllNodesByIndex(function (node) { - if (!_this2.localSearch.active || _this2.shouldOptionBeIncludedInSearchResult(node)) { - visibleOptionIds.push(node.id); - } - - if (node.isBranch && !_this2.shouldExpand(node)) { - return false; - } - }); - return visibleOptionIds; - }, - hasVisibleOptions: function hasVisibleOptions() { - return this.visibleOptionIds.length !== 0; - }, - showCountOnSearchComputed: function showCountOnSearchComputed() { - return typeof this.showCountOnSearch === 'boolean' ? this.showCountOnSearch : this.showCount; - }, - hasBranchNodes: function hasBranchNodes() { - return this.forest.normalizedOptions.some(function (rootNode) { - return rootNode.isBranch; - }); - }, - shouldFlattenOptions: function shouldFlattenOptions() { - return this.localSearch.active && this.flattenSearchResults; - } - }, - watch: { - alwaysOpen: function alwaysOpen(newValue) { - if (newValue) this.openMenu();else this.closeMenu(); - }, - branchNodesFirst: function branchNodesFirst() { - this.initialize(); - }, - disabled: function disabled(newValue) { - if (newValue && this.menu.isOpen) this.closeMenu();else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu(); - }, - flat: function flat() { - this.initialize(); - }, - internalValue: function internalValue(newValue, oldValue) { - var hasChanged = quickDiff(newValue, oldValue); - if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId()); - }, - matchKeys: function matchKeys() { - this.initialize(); - }, - multiple: function multiple(newValue) { - if (newValue) this.buildForestState(); - }, - options: { - handler: function handler() { - if (this.async) return; - this.initialize(); - this.rootOptionsStates.isLoaded = Array.isArray(this.options); - }, - deep: true, - immediate: true - }, - 'trigger.searchQuery': function triggerSearchQuery() { - if (this.async) { - this.handleRemoteSearch(); - } else { - this.handleLocalSearch(); - } - - this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId()); - }, - value: function value() { - var nodeIdsFromValue = this.extractCheckedNodeIdsFromValue(); - var hasChanged = quickDiff(nodeIdsFromValue, this.internalValue); - if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue); - } - }, - methods: { - verifyProps: function verifyProps() { - var _this3 = this; - - warning_warning(function () { - return _this3.async ? _this3.searchable : true; - }, function () { - return 'For async search mode, the value of "searchable" prop must be true.'; - }); - - if (this.options == null && !this.loadOptions) { - warning_warning(function () { - return false; - }, function () { - return 'Are you meant to dynamically load options? You need to use "loadOptions" prop.'; - }); - } - - if (this.flat) { - warning_warning(function () { - return _this3.multiple; - }, function () { - return 'You are using flat mode. But you forgot to add "multiple=true"?'; - }); - } - - if (!this.flat) { - var propNames = ['autoSelectAncestors', 'autoSelectDescendants', 'autoDeselectAncestors', 'autoDeselectDescendants']; - propNames.forEach(function (propName) { - warning_warning(function () { - return !_this3[propName]; - }, function () { - return "\"".concat(propName, "\" only applies to flat mode."); - }); - }); - } - }, - resetFlags: function resetFlags() { - this._blurOnSelect = false; - }, - initialize: function initialize() { - var options = this.async ? this.getRemoteSearchEntry().options : this.options; - - if (Array.isArray(options)) { - var prevNodeMap = this.forest.nodeMap; - this.forest.nodeMap = createMap(); - this.keepDataOfSelectedNodes(prevNodeMap); - this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap); - this.fixSelectedNodeIds(this.internalValue); - } else { - this.forest.normalizedOptions = []; - } - }, - getInstanceId: function getInstanceId() { - return this.instanceId == null ? this.id : this.instanceId; - }, - getValue: function getValue() { - var _this4 = this; - - if (this.valueFormat === 'id') { - return this.multiple ? this.internalValue.slice() : this.internalValue[0]; - } - - var rawNodes = this.internalValue.map(function (id) { - return _this4.getNode(id).raw; - }); - return this.multiple ? rawNodes : rawNodes[0]; - }, - getNode: function getNode(nodeId) { - warning_warning(function () { - return nodeId != null; - }, function () { - return "Invalid node id: ".concat(nodeId); - }); - if (nodeId == null) return null; - return nodeId in this.forest.nodeMap ? this.forest.nodeMap[nodeId] : this.createFallbackNode(nodeId); - }, - createFallbackNode: function createFallbackNode(id) { - var raw = this.extractNodeFromValue(id); - var label = this.enhancedNormalizer(raw).label || "".concat(id, " (unknown)"); - var fallbackNode = { - id: id, - label: label, - ancestors: [], - parentNode: NO_PARENT_NODE, - isFallbackNode: true, - isRootNode: true, - isLeaf: true, - isBranch: false, - isDisabled: false, - isNew: false, - index: [-1], - level: 0, - raw: raw - }; - return this.$set(this.forest.nodeMap, id, fallbackNode); - }, - extractCheckedNodeIdsFromValue: function extractCheckedNodeIdsFromValue() { - var _this5 = this; - - if (this.value == null) return []; - - if (this.valueFormat === 'id') { - return this.multiple ? this.value.slice() : [this.value]; - } - - return (this.multiple ? this.value : [this.value]).map(function (node) { - return _this5.enhancedNormalizer(node); - }).map(function (node) { - return node.id; - }); - }, - extractNodeFromValue: function extractNodeFromValue(id) { - var _this6 = this; - - var defaultNode = { - id: id - }; - - if (this.valueFormat === 'id') { - return defaultNode; - } - - var valueArray = this.multiple ? Array.isArray(this.value) ? this.value : [] : this.value ? [this.value] : []; - var matched = find(valueArray, function (node) { - return node && _this6.enhancedNormalizer(node).id === id; - }); - return matched || defaultNode; - }, - fixSelectedNodeIds: function fixSelectedNodeIds(nodeIdListOfPrevValue) { - var _this7 = this; - - var nextSelectedNodeIds = []; - - if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) { - nextSelectedNodeIds = nodeIdListOfPrevValue; - } else if (this.valueConsistsOf === BRANCH_PRIORITY) { - nodeIdListOfPrevValue.forEach(function (nodeId) { - nextSelectedNodeIds.push(nodeId); - - var node = _this7.getNode(nodeId); - - if (node.isBranch) _this7.traverseDescendantsBFS(node, function (descendant) { - nextSelectedNodeIds.push(descendant.id); - }); - }); - } else if (this.valueConsistsOf === LEAF_PRIORITY) { - var map = createMap(); - var queue = nodeIdListOfPrevValue.slice(); - - while (queue.length) { - var nodeId = queue.shift(); - var node = this.getNode(nodeId); - nextSelectedNodeIds.push(nodeId); - if (node.isRootNode) continue; - if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length; - if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id); - } - } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) { - var _map = createMap(); - - var _queue = nodeIdListOfPrevValue.filter(function (nodeId) { - var node = _this7.getNode(nodeId); - - return node.isLeaf || node.children.length === 0; - }); - - while (_queue.length) { - var _nodeId = _queue.shift(); - - var _node = this.getNode(_nodeId); - - nextSelectedNodeIds.push(_nodeId); - if (_node.isRootNode) continue; - if (!(_node.parentNode.id in _map)) _map[_node.parentNode.id] = _node.parentNode.children.length; - if (--_map[_node.parentNode.id] === 0) _queue.push(_node.parentNode.id); - } - } - - var hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds); - if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds; - this.buildForestState(); - }, - keepDataOfSelectedNodes: function keepDataOfSelectedNodes(prevNodeMap) { - var _this8 = this; - - this.forest.selectedNodeIds.forEach(function (id) { - if (!prevNodeMap[id]) return; - - var node = _objectSpread({}, prevNodeMap[id], { - isFallbackNode: true - }); - - _this8.$set(_this8.forest.nodeMap, id, node); - }); - }, - isSelected: function isSelected(node) { - return this.forest.selectedNodeMap[node.id] === true; - }, - traverseDescendantsBFS: function traverseDescendantsBFS(parentNode, callback) { - if (!parentNode.isBranch) return; - var queue = parentNode.children.slice(); - - while (queue.length) { - var currNode = queue[0]; - if (currNode.isBranch) queue.push.apply(queue, toConsumableArray_default()(currNode.children)); - callback(currNode); - queue.shift(); - } - }, - traverseDescendantsDFS: function traverseDescendantsDFS(parentNode, callback) { - var _this9 = this; - - if (!parentNode.isBranch) return; - parentNode.children.forEach(function (child) { - _this9.traverseDescendantsDFS(child, callback); - - callback(child); - }); - }, - traverseAllNodesDFS: function traverseAllNodesDFS(callback) { - var _this10 = this; - - this.forest.normalizedOptions.forEach(function (rootNode) { - _this10.traverseDescendantsDFS(rootNode, callback); - - callback(rootNode); - }); - }, - traverseAllNodesByIndex: function traverseAllNodesByIndex(callback) { - var walk = function walk(parentNode) { - parentNode.children.forEach(function (child) { - if (callback(child) !== false && child.isBranch) { - walk(child); - } - }); - }; - - walk({ - children: this.forest.normalizedOptions - }); - }, - toggleClickOutsideEvent: function toggleClickOutsideEvent(enabled) { - if (enabled) { - document.addEventListener('mousedown', this.handleClickOutside, false); - } else { - document.removeEventListener('mousedown', this.handleClickOutside, false); - } - }, - getValueContainer: function getValueContainer() { - return this.$refs.control.$refs['value-container']; - }, - getInput: function getInput() { - return this.getValueContainer().$refs.input; - }, - focusInput: function focusInput() { - this.getInput().focus(); - }, - blurInput: function blurInput() { - this.getInput().blur(); - }, - handleMouseDown: onLeftClick(function handleMouseDown(evt) { - evt.preventDefault(); - evt.stopPropagation(); - if (this.disabled) return; - var isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target); - - if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) { - this.openMenu(); - } - - if (this._blurOnSelect) { - this.blurInput(); - } else { - this.focusInput(); - } - - this.resetFlags(); - }), - handleClickOutside: function handleClickOutside(evt) { - if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) { - this.blurInput(); - this.closeMenu(); - } - }, - handleLocalSearch: function handleLocalSearch() { - var _this11 = this; - - var searchQuery = this.trigger.searchQuery; - - var done = function done() { - return _this11.resetHighlightedOptionWhenNecessary(true); - }; - - if (!searchQuery) { - this.localSearch.active = false; - return done(); - } - - this.localSearch.active = true; - this.localSearch.noResults = true; - this.traverseAllNodesDFS(function (node) { - if (node.isBranch) { - var _this11$$set; - - node.isExpandedOnSearch = false; - node.showAllChildrenOnSearch = false; - node.isMatched = false; - node.hasMatchedDescendants = false; - - _this11.$set(_this11.localSearch.countMap, node.id, (_this11$$set = {}, defineProperty_default()(_this11$$set, ALL_CHILDREN, 0), defineProperty_default()(_this11$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this11$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this11$$set, LEAF_DESCENDANTS, 0), _this11$$set)); - } - }); - var lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase(); - var splitSearchQuery = lowerCasedSearchQuery.replace(/\s+/g, ' ').split(' '); - this.traverseAllNodesDFS(function (node) { - if (_this11.searchNested && splitSearchQuery.length > 1) { - node.isMatched = splitSearchQuery.every(function (filterValue) { - return match(false, false, filterValue, node.nestedSearchLabel); - }); - } else { - node.isMatched = _this11.matchKeys.some(function (matchKey) { - return match(!_this11.disableFuzzyMatching, _this11.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]); - }); - } - - if (node.isMatched) { - _this11.localSearch.noResults = false; - node.ancestors.forEach(function (ancestor) { - return _this11.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++; - }); - if (node.isLeaf) node.ancestors.forEach(function (ancestor) { - return _this11.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++; - }); - - if (node.parentNode !== NO_PARENT_NODE) { - _this11.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1; - if (node.isLeaf) _this11.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1; - } - } - - if ((node.isMatched || node.isBranch && node.isExpandedOnSearch) && node.parentNode !== NO_PARENT_NODE) { - node.parentNode.isExpandedOnSearch = true; - node.parentNode.hasMatchedDescendants = true; - } - }); - done(); - }, - handleRemoteSearch: function handleRemoteSearch() { - var _this12 = this; - - var searchQuery = this.trigger.searchQuery; - var entry = this.getRemoteSearchEntry(); - - var done = function done() { - _this12.initialize(); - - _this12.resetHighlightedOptionWhenNecessary(true); - }; - - if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) { - return done(); - } - - this.callLoadOptionsProp({ - action: ASYNC_SEARCH, - args: { - searchQuery: searchQuery - }, - isPending: function isPending() { - return entry.isLoading; - }, - start: function start() { - entry.isLoading = true; - entry.isLoaded = false; - entry.loadingError = ''; - }, - succeed: function succeed(options) { - entry.isLoaded = true; - entry.options = options; - if (_this12.trigger.searchQuery === searchQuery) done(); - }, - fail: function fail(err) { - entry.loadingError = getErrorMessage(err); - }, - end: function end() { - entry.isLoading = false; - } - }); - }, - getRemoteSearchEntry: function getRemoteSearchEntry() { - var _this13 = this; - - var searchQuery = this.trigger.searchQuery; - - var entry = this.remoteSearch[searchQuery] || _objectSpread({}, createAsyncOptionsStates(), { - options: [] - }); - - this.$watch(function () { - return entry.options; - }, function () { - if (_this13.trigger.searchQuery === searchQuery) _this13.initialize(); - }, { - deep: true - }); - - if (searchQuery === '') { - if (Array.isArray(this.defaultOptions)) { - entry.options = this.defaultOptions; - entry.isLoaded = true; - return entry; - } else if (this.defaultOptions !== true) { - entry.isLoaded = true; - return entry; - } - } - - if (!this.remoteSearch[searchQuery]) { - this.$set(this.remoteSearch, searchQuery, entry); - } - - return entry; - }, - shouldExpand: function shouldExpand(node) { - return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded; - }, - shouldOptionBeIncludedInSearchResult: function shouldOptionBeIncludedInSearchResult(node) { - if (node.isMatched) return true; - if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true; - if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true; - return false; - }, - shouldShowOptionInMenu: function shouldShowOptionInMenu(node) { - if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) { - return false; - } - - return true; - }, - getControl: function getControl() { - return this.$refs.control.$el; - }, - getMenu: function getMenu() { - var ref = this.appendToBody ? this.$refs.portal.portalTarget : this; - var $menu = ref.$refs.menu.$refs.menu; - return $menu && $menu.nodeName !== '#comment' ? $menu : null; - }, - setCurrentHighlightedOption: function setCurrentHighlightedOption(node) { - var _this14 = this; - - var scroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var prev = this.menu.current; - - if (prev != null && prev in this.forest.nodeMap) { - this.forest.nodeMap[prev].isHighlighted = false; - } - - this.menu.current = node.id; - node.isHighlighted = true; - - if (this.menu.isOpen && scroll) { - var scrollToOption = function scrollToOption() { - var $menu = _this14.getMenu(); - - var $option = $menu.querySelector(".vue-treeselect__option[data-id=\"".concat(node.id, "\"]")); - if ($option) scrollIntoView($menu, $option); - }; - - if (this.getMenu()) { - scrollToOption(); - } else { - this.$nextTick(scrollToOption); - } - } - }, - resetHighlightedOptionWhenNecessary: function resetHighlightedOptionWhenNecessary() { - var forceReset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - var current = this.menu.current; - - if (forceReset || current == null || !(current in this.forest.nodeMap) || !this.shouldShowOptionInMenu(this.getNode(current))) { - this.highlightFirstOption(); - } - }, - highlightFirstOption: function highlightFirstOption() { - if (!this.hasVisibleOptions) return; - var first = this.visibleOptionIds[0]; - this.setCurrentHighlightedOption(this.getNode(first)); - }, - highlightPrevOption: function highlightPrevOption() { - if (!this.hasVisibleOptions) return; - var prev = this.visibleOptionIds.indexOf(this.menu.current) - 1; - if (prev === -1) return this.highlightLastOption(); - this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev])); - }, - highlightNextOption: function highlightNextOption() { - if (!this.hasVisibleOptions) return; - var next = this.visibleOptionIds.indexOf(this.menu.current) + 1; - if (next === this.visibleOptionIds.length) return this.highlightFirstOption(); - this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next])); - }, - highlightLastOption: function highlightLastOption() { - if (!this.hasVisibleOptions) return; - var last = last_default()(this.visibleOptionIds); - this.setCurrentHighlightedOption(this.getNode(last)); - }, - resetSearchQuery: function resetSearchQuery() { - this.trigger.searchQuery = ''; - }, - closeMenu: function closeMenu() { - if (!this.menu.isOpen || !this.disabled && this.alwaysOpen) return; - this.saveMenuScrollPosition(); - this.menu.isOpen = false; - this.toggleClickOutsideEvent(false); - this.resetSearchQuery(); - this.$emit('close', this.getValue(), this.getInstanceId()); - }, - openMenu: function openMenu() { - if (this.disabled || this.menu.isOpen) return; - this.menu.isOpen = true; - this.$nextTick(this.resetHighlightedOptionWhenNecessary); - this.$nextTick(this.restoreMenuScrollPosition); - if (!this.options && !this.async) this.loadRootOptions(); - this.toggleClickOutsideEvent(true); - this.$emit('open', this.getInstanceId()); - }, - toggleMenu: function toggleMenu() { - if (this.menu.isOpen) { - this.closeMenu(); - } else { - this.openMenu(); - } - }, - toggleExpanded: function toggleExpanded(node) { - var nextState; - - if (this.localSearch.active) { - nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch; - if (nextState) node.showAllChildrenOnSearch = true; - } else { - nextState = node.isExpanded = !node.isExpanded; - } - - if (nextState && !node.childrenStates.isLoaded) { - this.loadChildrenOptions(node); - } - }, - buildForestState: function buildForestState() { - var _this15 = this; - - var selectedNodeMap = createMap(); - this.forest.selectedNodeIds.forEach(function (selectedNodeId) { - selectedNodeMap[selectedNodeId] = true; - }); - this.forest.selectedNodeMap = selectedNodeMap; - var checkedStateMap = createMap(); - - if (this.multiple) { - this.traverseAllNodesByIndex(function (node) { - checkedStateMap[node.id] = UNCHECKED; - }); - this.selectedNodes.forEach(function (selectedNode) { - checkedStateMap[selectedNode.id] = CHECKED; - - if (!_this15.flat && !_this15.disableBranchNodes) { - selectedNode.ancestors.forEach(function (ancestorNode) { - if (!_this15.isSelected(ancestorNode)) { - checkedStateMap[ancestorNode.id] = INDETERMINATE; - } - }); - } - }); - } - - this.forest.checkedStateMap = checkedStateMap; - }, - enhancedNormalizer: function enhancedNormalizer(raw) { - return _objectSpread({}, raw, {}, this.normalizer(raw, this.getInstanceId())); - }, - normalize: function normalize(parentNode, nodes, prevNodeMap) { - var _this16 = this; - - var normalizedOptions = nodes.map(function (node) { - return [_this16.enhancedNormalizer(node), node]; - }).map(function (_ref, index) { - var _ref2 = slicedToArray_default()(_ref, 2), - node = _ref2[0], - raw = _ref2[1]; - - _this16.checkDuplication(node); - - _this16.verifyNodeShape(node); - - var id = node.id, - label = node.label, - children = node.children, - isDefaultExpanded = node.isDefaultExpanded; - var isRootNode = parentNode === NO_PARENT_NODE; - var level = isRootNode ? 0 : parentNode.level + 1; - var isBranch = Array.isArray(children) || children === null; - var isLeaf = !isBranch; - var isDisabled = !!node.isDisabled || !_this16.flat && !isRootNode && parentNode.isDisabled; - var isNew = !!node.isNew; - - var lowerCased = _this16.matchKeys.reduce(function (prev, key) { - return _objectSpread({}, prev, defineProperty_default()({}, key, stringifyOptionPropValue(node[key]).toLocaleLowerCase())); - }, {}); - - var nestedSearchLabel = isRootNode ? lowerCased.label : parentNode.nestedSearchLabel + ' ' + lowerCased.label; - - var normalized = _this16.$set(_this16.forest.nodeMap, id, createMap()); - - _this16.$set(normalized, 'id', id); - - _this16.$set(normalized, 'label', label); - - _this16.$set(normalized, 'level', level); - - _this16.$set(normalized, 'ancestors', isRootNode ? [] : [parentNode].concat(parentNode.ancestors)); - - _this16.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index)); - - _this16.$set(normalized, 'parentNode', parentNode); - - _this16.$set(normalized, 'lowerCased', lowerCased); - - _this16.$set(normalized, 'nestedSearchLabel', nestedSearchLabel); - - _this16.$set(normalized, 'isDisabled', isDisabled); - - _this16.$set(normalized, 'isNew', isNew); - - _this16.$set(normalized, 'isMatched', false); - - _this16.$set(normalized, 'isHighlighted', false); - - _this16.$set(normalized, 'isBranch', isBranch); - - _this16.$set(normalized, 'isLeaf', isLeaf); - - _this16.$set(normalized, 'isRootNode', isRootNode); - - _this16.$set(normalized, 'raw', raw); - - if (isBranch) { - var _this16$$set; - - var isLoaded = Array.isArray(children); - - _this16.$set(normalized, 'childrenStates', _objectSpread({}, createAsyncOptionsStates(), { - isLoaded: isLoaded - })); - - _this16.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean' ? isDefaultExpanded : level < _this16.defaultExpandLevel); - - _this16.$set(normalized, 'hasMatchedDescendants', false); - - _this16.$set(normalized, 'hasDisabledDescendants', false); - - _this16.$set(normalized, 'isExpandedOnSearch', false); - - _this16.$set(normalized, 'showAllChildrenOnSearch', false); - - _this16.$set(normalized, 'count', (_this16$$set = {}, defineProperty_default()(_this16$$set, ALL_CHILDREN, 0), defineProperty_default()(_this16$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this16$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this16$$set, LEAF_DESCENDANTS, 0), _this16$$set)); - - _this16.$set(normalized, 'children', isLoaded ? _this16.normalize(normalized, children, prevNodeMap) : []); - - if (isDefaultExpanded === true) normalized.ancestors.forEach(function (ancestor) { - ancestor.isExpanded = true; - }); - - if (!isLoaded && typeof _this16.loadOptions !== 'function') { - warning_warning(function () { - return false; - }, function () { - return 'Unloaded branch node detected. "loadOptions" prop is required to load its children.'; - }); - } else if (!isLoaded && normalized.isExpanded) { - _this16.loadChildrenOptions(normalized); - } - } - - normalized.ancestors.forEach(function (ancestor) { - return ancestor.count[ALL_DESCENDANTS]++; - }); - if (isLeaf) normalized.ancestors.forEach(function (ancestor) { - return ancestor.count[LEAF_DESCENDANTS]++; - }); - - if (!isRootNode) { - parentNode.count[ALL_CHILDREN] += 1; - if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1; - if (isDisabled) parentNode.hasDisabledDescendants = true; - } - - if (prevNodeMap && prevNodeMap[id]) { - var prev = prevNodeMap[id]; - normalized.isMatched = prev.isMatched; - normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch; - normalized.isHighlighted = prev.isHighlighted; - - if (prev.isBranch && normalized.isBranch) { - normalized.isExpanded = prev.isExpanded; - normalized.isExpandedOnSearch = prev.isExpandedOnSearch; - - if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) { - normalized.isExpanded = false; - } else { - normalized.childrenStates = _objectSpread({}, prev.childrenStates); - } - } - } - - return normalized; - }); - - if (this.branchNodesFirst) { - var branchNodes = normalizedOptions.filter(function (option) { - return option.isBranch; - }); - var leafNodes = normalizedOptions.filter(function (option) { - return option.isLeaf; - }); - normalizedOptions = branchNodes.concat(leafNodes); - } - - return normalizedOptions; - }, - loadRootOptions: function loadRootOptions() { - var _this17 = this; - - this.callLoadOptionsProp({ - action: LOAD_ROOT_OPTIONS, - isPending: function isPending() { - return _this17.rootOptionsStates.isLoading; - }, - start: function start() { - _this17.rootOptionsStates.isLoading = true; - _this17.rootOptionsStates.loadingError = ''; - }, - succeed: function succeed() { - _this17.rootOptionsStates.isLoaded = true; - - _this17.$nextTick(function () { - _this17.resetHighlightedOptionWhenNecessary(true); - }); - }, - fail: function fail(err) { - _this17.rootOptionsStates.loadingError = getErrorMessage(err); - }, - end: function end() { - _this17.rootOptionsStates.isLoading = false; - } - }); - }, - loadChildrenOptions: function loadChildrenOptions(parentNode) { - var _this18 = this; - - var id = parentNode.id, - raw = parentNode.raw; - this.callLoadOptionsProp({ - action: LOAD_CHILDREN_OPTIONS, - args: { - parentNode: raw - }, - isPending: function isPending() { - return _this18.getNode(id).childrenStates.isLoading; - }, - start: function start() { - _this18.getNode(id).childrenStates.isLoading = true; - _this18.getNode(id).childrenStates.loadingError = ''; - }, - succeed: function succeed() { - _this18.getNode(id).childrenStates.isLoaded = true; - }, - fail: function fail(err) { - _this18.getNode(id).childrenStates.loadingError = getErrorMessage(err); - }, - end: function end() { - _this18.getNode(id).childrenStates.isLoading = false; - } - }); - }, - callLoadOptionsProp: function callLoadOptionsProp(_ref3) { - var action = _ref3.action, - args = _ref3.args, - isPending = _ref3.isPending, - start = _ref3.start, - succeed = _ref3.succeed, - fail = _ref3.fail, - end = _ref3.end; - - if (!this.loadOptions || isPending()) { - return; - } - - start(); - var callback = once_default()(function (err, result) { - if (err) { - fail(err); - } else { - succeed(result); - } - - end(); - }); - var result = this.loadOptions(_objectSpread({ - id: this.getInstanceId(), - instanceId: this.getInstanceId(), - action: action - }, args, { - callback: callback - })); - - if (is_promise_default()(result)) { - result.then(function () { - callback(); - }, function (err) { - callback(err); - }).catch(function (err) { - console.error(err); - }); - } - }, - checkDuplication: function checkDuplication(node) { - var _this19 = this; - - warning_warning(function () { - return !(node.id in _this19.forest.nodeMap && !_this19.forest.nodeMap[node.id].isFallbackNode); - }, function () { - return "Detected duplicate presence of node id ".concat(JSON.stringify(node.id), ". ") + "Their labels are \"".concat(_this19.forest.nodeMap[node.id].label, "\" and \"").concat(node.label, "\" respectively."); - }); - }, - verifyNodeShape: function verifyNodeShape(node) { - warning_warning(function () { - return !(node.children === undefined && node.isBranch === true); - }, function () { - return 'Are you meant to declare an unloaded branch node? ' + '`isBranch: true` is no longer supported, please use `children: null` instead.'; - }); - }, - select: function select(node) { - if (this.disabled || node.isDisabled) { - return; - } - - if (this.single) { - this.clear(); - } - - var nextState = this.multiple && !this.flat ? this.forest.checkedStateMap[node.id] === UNCHECKED : !this.isSelected(node); - - if (nextState) { - this._selectNode(node); - } else { - this._deselectNode(node); - } - - this.buildForestState(); - - if (nextState) { - this.$emit('select', node.raw, this.getInstanceId()); - } else { - this.$emit('deselect', node.raw, this.getInstanceId()); - } - - if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) { - this.resetSearchQuery(); - } - - if (this.single && this.closeOnSelect) { - this.closeMenu(); - - if (this.searchable) { - this._blurOnSelect = true; - } - } - }, - clear: function clear() { - var _this20 = this; - - if (this.hasValue) { - if (this.single || this.allowClearingDisabled) { - this.forest.selectedNodeIds = []; - } else { - this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(function (nodeId) { - return _this20.getNode(nodeId).isDisabled; - }); - } - - this.buildForestState(); - } - }, - _selectNode: function _selectNode(node) { - var _this21 = this; - - if (this.single || this.disableBranchNodes) { - return this.addValue(node); - } - - if (this.flat) { - this.addValue(node); - - if (this.autoSelectAncestors) { - node.ancestors.forEach(function (ancestor) { - if (!_this21.isSelected(ancestor) && !ancestor.isDisabled) _this21.addValue(ancestor); - }); - } else if (this.autoSelectDescendants) { - this.traverseDescendantsBFS(node, function (descendant) { - if (!_this21.isSelected(descendant) && !descendant.isDisabled) _this21.addValue(descendant); - }); - } - - return; - } - - var isFullyChecked = node.isLeaf || !node.hasDisabledDescendants || this.allowSelectingDisabledDescendants; - - if (isFullyChecked) { - this.addValue(node); - } - - if (node.isBranch) { - this.traverseDescendantsBFS(node, function (descendant) { - if (!descendant.isDisabled || _this21.allowSelectingDisabledDescendants) { - _this21.addValue(descendant); - } - }); - } - - if (isFullyChecked) { - var curr = node; - - while ((curr = curr.parentNode) !== NO_PARENT_NODE) { - if (curr.children.every(this.isSelected)) this.addValue(curr);else break; - } - } - }, - _deselectNode: function _deselectNode(node) { - var _this22 = this; - - if (this.disableBranchNodes) { - return this.removeValue(node); - } - - if (this.flat) { - this.removeValue(node); - - if (this.autoDeselectAncestors) { - node.ancestors.forEach(function (ancestor) { - if (_this22.isSelected(ancestor) && !ancestor.isDisabled) _this22.removeValue(ancestor); - }); - } else if (this.autoDeselectDescendants) { - this.traverseDescendantsBFS(node, function (descendant) { - if (_this22.isSelected(descendant) && !descendant.isDisabled) _this22.removeValue(descendant); - }); - } - - return; - } - - var hasUncheckedSomeDescendants = false; - - if (node.isBranch) { - this.traverseDescendantsDFS(node, function (descendant) { - if (!descendant.isDisabled || _this22.allowSelectingDisabledDescendants) { - _this22.removeValue(descendant); - - hasUncheckedSomeDescendants = true; - } - }); - } - - if (node.isLeaf || hasUncheckedSomeDescendants || node.children.length === 0) { - this.removeValue(node); - var curr = node; - - while ((curr = curr.parentNode) !== NO_PARENT_NODE) { - if (this.isSelected(curr)) this.removeValue(curr);else break; - } - } - }, - addValue: function addValue(node) { - this.forest.selectedNodeIds.push(node.id); - this.forest.selectedNodeMap[node.id] = true; - }, - removeValue: function removeValue(node) { - removeFromArray(this.forest.selectedNodeIds, node.id); - delete this.forest.selectedNodeMap[node.id]; - }, - removeLastValue: function removeLastValue() { - if (!this.hasValue) return; - if (this.single) return this.clear(); - var lastValue = last_default()(this.internalValue); - var lastSelectedNode = this.getNode(lastValue); - this.select(lastSelectedNode); - }, - saveMenuScrollPosition: function saveMenuScrollPosition() { - var $menu = this.getMenu(); - if ($menu) this.menu.lastScrollPosition = $menu.scrollTop; - }, - restoreMenuScrollPosition: function restoreMenuScrollPosition() { - var $menu = this.getMenu(); - if ($menu) $menu.scrollTop = this.menu.lastScrollPosition; - } - }, - created: function created() { - this.verifyProps(); - this.resetFlags(); - }, - mounted: function mounted() { - if (this.autoFocus) this.focusInput(); - if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions(); - if (this.alwaysOpen) this.openMenu(); - if (this.async && this.defaultOptions) this.handleRemoteSearch(); - }, - destroyed: function destroyed() { - this.toggleClickOutsideEvent(false); - } -}); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HiddenFields.vue?vue&type=script&lang=js& - - -function stringifyValue(value) { - if (typeof value === 'string') return value; - if (value != null && !isNaN_isNaN(value)) return JSON.stringify(value); - return ''; -} - -/* harmony default export */ var HiddenFieldsvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--hidden-fields', - inject: ['instance'], - functional: true, - render: function render(_, context) { - var h = arguments[0]; - var instance = context.injections.instance; - if (!instance.name || instance.disabled || !instance.hasValue) return null; - var stringifiedValues = instance.internalValue.map(stringifyValue); - if (instance.multiple && instance.joinValues) stringifiedValues = [stringifiedValues.join(instance.delimiter)]; - return stringifiedValues.map(function (stringifiedValue, i) { - return h("input", { - attrs: { - type: "hidden", - name: instance.name - }, - domProps: { - "value": stringifiedValue - }, - key: 'hidden-field-' + i - }); - }); - } -}); -// CONCATENATED MODULE: ./src/components/HiddenFields.vue?vue&type=script&lang=js& - /* harmony default export */ var components_HiddenFieldsvue_type_script_lang_js_ = (HiddenFieldsvue_type_script_lang_js_); -// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js -/* globals __VUE_SSR_CONTEXT__ */ - -// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). -// This module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle. - -function normalizeComponent ( - scriptExports, - render, - staticRenderFns, - functionalTemplate, - injectStyles, - scopeId, - moduleIdentifier, /* server only */ - shadowMode /* vue-cli only */ -) { - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (render) { - options.render = render - options.staticRenderFns = staticRenderFns - options._compiled = true - } - - // functional template - if (functionalTemplate) { - options.functional = true - } - - // scopedId - if (scopeId) { - options._scopeId = 'data-v-' + scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = shadowMode - ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } - : injectStyles - } - - if (hook) { - if (options.functional) { - // for template-only hot-reload because in that case the render fn doesn't - // go through the normalizer - options._injectStyles = hook - // register for functional component in vue file - var originalRender = options.render - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return originalRender(h, context) - } - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } - } - - return { - exports: scriptExports, - options: options - } -} - -// CONCATENATED MODULE: ./src/components/HiddenFields.vue -var HiddenFields_render, staticRenderFns - - - - -/* normalize component */ - -var component = normalizeComponent( - components_HiddenFieldsvue_type_script_lang_js_, - HiddenFields_render, - staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var api; } -component.options.__file = "src/components/HiddenFields.vue" -/* harmony default export */ var HiddenFields = (component.exports); -// EXTERNAL MODULE: ./node_modules/babel-helper-vue-jsx-merge-props/index.js -var babel_helper_vue_jsx_merge_props = __webpack_require__(35); -var babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props); - -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Input.vue?vue&type=script&lang=js& - - - -var keysThatRequireMenuBeingOpen = [KEY_CODES.ENTER, KEY_CODES.END, KEY_CODES.HOME, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN]; -/* harmony default export */ var Inputvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--input', - inject: ['instance'], - data: function data() { - return { - inputWidth: MIN_INPUT_WIDTH, - value: '' - }; - }, - computed: { - needAutoSize: function needAutoSize() { - var instance = this.instance; - return instance.searchable && !instance.disabled && instance.multiple; - }, - inputStyle: function inputStyle() { - return { - width: this.needAutoSize ? "".concat(this.inputWidth, "px") : null - }; - } - }, - watch: { - 'instance.trigger.searchQuery': function instanceTriggerSearchQuery(newValue) { - this.value = newValue; - }, - value: function value() { - if (this.needAutoSize) this.$nextTick(this.updateInputWidth); - } - }, - created: function created() { - this.debouncedCallback = debounce_default()(this.updateSearchQuery, this.instance.inputDebounceDelay, { - leading: false, - trailing: true - }); - }, - methods: { - clear: function clear() { - this.onInput({ - target: { - value: '' - } - }); - }, - focus: function focus() { - var instance = this.instance; - - if (!instance.disabled) { - this.$refs.input && this.$refs.input.focus(); - } - }, - blur: function blur() { - this.$refs.input && this.$refs.input.blur(); - }, - onFocus: function onFocus() { - var instance = this.instance; - instance.trigger.isFocused = true; - if (instance.openOnFocus) instance.openMenu(); - }, - onBlur: function onBlur() { - var instance = this.instance; - var menu = instance.getMenu(); - - if (menu && document.activeElement === menu) { - return this.focus(); - } - - instance.trigger.isFocused = false; - instance.closeMenu(); - }, - onInput: function onInput(evt) { - var value = evt.target.value; - this.value = value; - - if (value) { - this.debouncedCallback(); - } else { - this.debouncedCallback.cancel(); - this.updateSearchQuery(); - } - }, - onKeyDown: function onKeyDown(evt) { - var instance = this.instance; - var key = 'which' in evt ? evt.which : evt.keyCode; - if (evt.ctrlKey || evt.shiftKey || evt.altKey || evt.metaKey) return; - - if (!instance.menu.isOpen && includes(keysThatRequireMenuBeingOpen, key)) { - evt.preventDefault(); - return instance.openMenu(); - } - - switch (key) { - case KEY_CODES.BACKSPACE: - { - if (instance.backspaceRemoves && !this.value.length) { - instance.removeLastValue(); - } - - break; - } - - case KEY_CODES.ENTER: - { - evt.preventDefault(); - if (instance.menu.current === null) return; - var current = instance.getNode(instance.menu.current); - if (current.isBranch && instance.disableBranchNodes) return; - instance.select(current); - break; - } - - case KEY_CODES.ESCAPE: - { - if (this.value.length) { - this.clear(); - } else if (instance.menu.isOpen) { - instance.closeMenu(); - } - - break; - } - - case KEY_CODES.END: - { - evt.preventDefault(); - instance.highlightLastOption(); - break; - } - - case KEY_CODES.HOME: - { - evt.preventDefault(); - instance.highlightFirstOption(); - break; - } - - case KEY_CODES.ARROW_LEFT: - { - var _current = instance.getNode(instance.menu.current); - - if (_current.isBranch && instance.shouldExpand(_current)) { - evt.preventDefault(); - instance.toggleExpanded(_current); - } else if (!_current.isRootNode && (_current.isLeaf || _current.isBranch && !instance.shouldExpand(_current))) { - evt.preventDefault(); - instance.setCurrentHighlightedOption(_current.parentNode); - } - - break; - } - - case KEY_CODES.ARROW_UP: - { - evt.preventDefault(); - instance.highlightPrevOption(); - break; - } - - case KEY_CODES.ARROW_RIGHT: - { - var _current2 = instance.getNode(instance.menu.current); - - if (_current2.isBranch && !instance.shouldExpand(_current2)) { - evt.preventDefault(); - instance.toggleExpanded(_current2); - } - - break; - } - - case KEY_CODES.ARROW_DOWN: - { - evt.preventDefault(); - instance.highlightNextOption(); - break; - } - - case KEY_CODES.DELETE: - { - if (instance.deleteRemoves && !this.value.length) { - instance.removeLastValue(); - } - - break; - } - - default: - { - instance.openMenu(); - } - } - }, - onMouseDown: function onMouseDown(evt) { - if (this.value.length) { - evt.stopPropagation(); - } - }, - renderInputContainer: function renderInputContainer() { - var h = this.$createElement; - var instance = this.instance; - var props = {}; - var children = []; - - if (instance.searchable && !instance.disabled) { - children.push(this.renderInput()); - if (this.needAutoSize) children.push(this.renderSizer()); - } - - if (!instance.searchable) { - deepExtend(props, { - on: { - focus: this.onFocus, - blur: this.onBlur, - keydown: this.onKeyDown - }, - ref: 'input' - }); - } - - if (!instance.searchable && !instance.disabled) { - deepExtend(props, { - attrs: { - tabIndex: instance.tabIndex - } - }); - } - - return h("div", babel_helper_vue_jsx_merge_props_default()([{ - "class": "vue-treeselect__input-container" - }, props]), [children]); - }, - renderInput: function renderInput() { - var h = this.$createElement; - var instance = this.instance; - return h("input", { - ref: "input", - "class": "vue-treeselect__input", - attrs: { - type: "text", - autocomplete: "off", - tabIndex: instance.tabIndex, - required: instance.required && !instance.hasValue - }, - domProps: { - "value": this.value - }, - style: this.inputStyle, - on: { - "focus": this.onFocus, - "input": this.onInput, - "blur": this.onBlur, - "keydown": this.onKeyDown, - "mousedown": this.onMouseDown - } - }); - }, - renderSizer: function renderSizer() { - var h = this.$createElement; - return h("div", { - ref: "sizer", - "class": "vue-treeselect__sizer" - }, [this.value]); - }, - updateInputWidth: function updateInputWidth() { - this.inputWidth = Math.max(MIN_INPUT_WIDTH, this.$refs.sizer.scrollWidth + 15); - }, - updateSearchQuery: function updateSearchQuery() { - var instance = this.instance; - instance.trigger.searchQuery = this.value; - } - }, - render: function render() { - return this.renderInputContainer(); - } -}); -// CONCATENATED MODULE: ./src/components/Input.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Inputvue_type_script_lang_js_ = (Inputvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Input.vue -var Input_render, Input_staticRenderFns - - - - -/* normalize component */ - -var Input_component = normalizeComponent( - components_Inputvue_type_script_lang_js_, - Input_render, - Input_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Input_api; } -Input_component.options.__file = "src/components/Input.vue" -/* harmony default export */ var Input = (Input_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Placeholder.vue?vue&type=script&lang=js& -/* harmony default export */ var Placeholdervue_type_script_lang_js_ = ({ - name: 'vue-treeselect--placeholder', - inject: ['instance'], - render: function render() { - var h = arguments[0]; - var instance = this.instance; - var placeholderClass = { - 'vue-treeselect__placeholder': true, - 'vue-treeselect-helper-zoom-effect-off': true, - 'vue-treeselect-helper-hide': instance.hasValue || instance.trigger.searchQuery - }; - return h("div", { - "class": placeholderClass - }, [instance.placeholder]); - } -}); -// CONCATENATED MODULE: ./src/components/Placeholder.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Placeholdervue_type_script_lang_js_ = (Placeholdervue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Placeholder.vue -var Placeholder_render, Placeholder_staticRenderFns - - - - -/* normalize component */ - -var Placeholder_component = normalizeComponent( - components_Placeholdervue_type_script_lang_js_, - Placeholder_render, - Placeholder_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Placeholder_api; } -Placeholder_component.options.__file = "src/components/Placeholder.vue" -/* harmony default export */ var Placeholder = (Placeholder_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SingleValue.vue?vue&type=script&lang=js& - - -/* harmony default export */ var SingleValuevue_type_script_lang_js_ = ({ - name: 'vue-treeselect--single-value', - inject: ['instance'], - methods: { - renderSingleValueLabel: function renderSingleValueLabel() { - var instance = this.instance; - var node = instance.selectedNodes[0]; - var customValueLabelRenderer = instance.$scopedSlots['value-label']; - return customValueLabelRenderer ? customValueLabelRenderer({ - node: node - }) : node.label; - } - }, - render: function render() { - var h = arguments[0]; - var instance = this.instance, - renderValueContainer = this.$parent.renderValueContainer; - var shouldShowValue = instance.hasValue && !instance.trigger.searchQuery; - return renderValueContainer([shouldShowValue && h("div", { - "class": "vue-treeselect__single-value" - }, [this.renderSingleValueLabel()]), h(Placeholder), h(Input, { - ref: "input" - })]); - } -}); -// CONCATENATED MODULE: ./src/components/SingleValue.vue?vue&type=script&lang=js& - /* harmony default export */ var components_SingleValuevue_type_script_lang_js_ = (SingleValuevue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/SingleValue.vue -var SingleValue_render, SingleValue_staticRenderFns - - - - -/* normalize component */ - -var SingleValue_component = normalizeComponent( - components_SingleValuevue_type_script_lang_js_, - SingleValue_render, - SingleValue_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var SingleValue_api; } -SingleValue_component.options.__file = "src/components/SingleValue.vue" -/* harmony default export */ var SingleValue = (SingleValue_component.exports); -// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=template&id=364b6320& -var Deletevue_type_template_id_364b6320_render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "svg", - { - attrs: { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 348.333 348.333" - } - }, - [ - _c("path", { - attrs: { - d: - "M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z" - } - }) - ] - ) -} -var Deletevue_type_template_id_364b6320_staticRenderFns = [] -Deletevue_type_template_id_364b6320_render._withStripped = true - - -// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=template&id=364b6320& - -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=script&lang=js& -/* harmony default export */ var Deletevue_type_script_lang_js_ = ({ - name: 'vue-treeselect--x' -}); -// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=script&lang=js& - /* harmony default export */ var icons_Deletevue_type_script_lang_js_ = (Deletevue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/icons/Delete.vue - - - - - -/* normalize component */ - -var Delete_component = normalizeComponent( - icons_Deletevue_type_script_lang_js_, - Deletevue_type_template_id_364b6320_render, - Deletevue_type_template_id_364b6320_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Delete_api; } -Delete_component.options.__file = "src/components/icons/Delete.vue" -/* harmony default export */ var Delete = (Delete_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValueItem.vue?vue&type=script&lang=js& - - -/* harmony default export */ var MultiValueItemvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--multi-value-item', - inject: ['instance'], - props: { - node: { - type: Object, - required: true - } - }, - methods: { - handleMouseDown: onLeftClick(function handleMouseDown() { - var instance = this.instance, - node = this.node; - instance.select(node); - }) - }, - render: function render() { - var h = arguments[0]; - var instance = this.instance, - node = this.node; - var itemClass = { - 'vue-treeselect__multi-value-item': true, - 'vue-treeselect__multi-value-item-disabled': node.isDisabled, - 'vue-treeselect__multi-value-item-new': node.isNew - }; - var customValueLabelRenderer = instance.$scopedSlots['value-label']; - var labelRenderer = customValueLabelRenderer ? customValueLabelRenderer({ - node: node - }) : node.label; - return h("div", { - "class": "vue-treeselect__multi-value-item-container" - }, [h("div", { - "class": itemClass, - on: { - "mousedown": this.handleMouseDown - } - }, [h("span", { - "class": "vue-treeselect__multi-value-label" - }, [labelRenderer]), h("span", { - "class": "vue-treeselect__icon vue-treeselect__value-remove" - }, [h(Delete)])])]); - } -}); -// CONCATENATED MODULE: ./src/components/MultiValueItem.vue?vue&type=script&lang=js& - /* harmony default export */ var components_MultiValueItemvue_type_script_lang_js_ = (MultiValueItemvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/MultiValueItem.vue -var MultiValueItem_render, MultiValueItem_staticRenderFns - - - - -/* normalize component */ - -var MultiValueItem_component = normalizeComponent( - components_MultiValueItemvue_type_script_lang_js_, - MultiValueItem_render, - MultiValueItem_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var MultiValueItem_api; } -MultiValueItem_component.options.__file = "src/components/MultiValueItem.vue" -/* harmony default export */ var MultiValueItem = (MultiValueItem_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValue.vue?vue&type=script&lang=js& - - - - -/* harmony default export */ var MultiValuevue_type_script_lang_js_ = ({ - name: 'vue-treeselect--multi-value', - inject: ['instance'], - methods: { - renderMultiValueItems: function renderMultiValueItems() { - var h = this.$createElement; - var instance = this.instance; - return instance.internalValue.slice(0, instance.limit).map(instance.getNode).map(function (node) { - return h(MultiValueItem, { - key: "multi-value-item-".concat(node.id), - attrs: { - node: node - } - }); - }); - }, - renderExceedLimitTip: function renderExceedLimitTip() { - var h = this.$createElement; - var instance = this.instance; - var count = instance.internalValue.length - instance.limit; - if (count <= 0) return null; - return h("div", { - "class": "vue-treeselect__limit-tip vue-treeselect-helper-zoom-effect-off", - key: "exceed-limit-tip" - }, [h("span", { - "class": "vue-treeselect__limit-tip-text" - }, [instance.limitText(count)])]); - } - }, - render: function render() { - var h = arguments[0]; - var renderValueContainer = this.$parent.renderValueContainer; - var transitionGroupProps = { - props: { - tag: 'div', - name: 'vue-treeselect__multi-value-item--transition', - appear: true - } - }; - return renderValueContainer(h("transition-group", babel_helper_vue_jsx_merge_props_default()([{ - "class": "vue-treeselect__multi-value" - }, transitionGroupProps]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), h(Placeholder, { - key: "placeholder" - }), h(Input, { - ref: "input", - key: "input" - })])); - } -}); -// CONCATENATED MODULE: ./src/components/MultiValue.vue?vue&type=script&lang=js& - /* harmony default export */ var components_MultiValuevue_type_script_lang_js_ = (MultiValuevue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/MultiValue.vue -var MultiValue_render, MultiValue_staticRenderFns - - - - -/* normalize component */ - -var MultiValue_component = normalizeComponent( - components_MultiValuevue_type_script_lang_js_, - MultiValue_render, - MultiValue_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var MultiValue_api; } -MultiValue_component.options.__file = "src/components/MultiValue.vue" -/* harmony default export */ var MultiValue = (MultiValue_component.exports); -// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4& -var Arrowvue_type_template_id_11186cd4_render = function() { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c( - "svg", - { - attrs: { - xmlns: "http://www.w3.org/2000/svg", - viewBox: "0 0 292.362 292.362" - } - }, - [ - _c("path", { - attrs: { - d: - "M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z" - } - }) - ] - ) -} -var Arrowvue_type_template_id_11186cd4_staticRenderFns = [] -Arrowvue_type_template_id_11186cd4_render._withStripped = true - - -// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4& - -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=script&lang=js& -/* harmony default export */ var Arrowvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--arrow' -}); -// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=script&lang=js& - /* harmony default export */ var icons_Arrowvue_type_script_lang_js_ = (Arrowvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/icons/Arrow.vue - - - - - -/* normalize component */ - -var Arrow_component = normalizeComponent( - icons_Arrowvue_type_script_lang_js_, - Arrowvue_type_template_id_11186cd4_render, - Arrowvue_type_template_id_11186cd4_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Arrow_api; } -Arrow_component.options.__file = "src/components/icons/Arrow.vue" -/* harmony default export */ var Arrow = (Arrow_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Control.vue?vue&type=script&lang=js& - - - - - -/* harmony default export */ var Controlvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--control', - inject: ['instance'], - computed: { - shouldShowX: function shouldShowX() { - var instance = this.instance; - return instance.clearable && !instance.disabled && instance.hasValue && (this.hasUndisabledValue || instance.allowClearingDisabled); - }, - shouldShowArrow: function shouldShowArrow() { - var instance = this.instance; - if (!instance.alwaysOpen) return true; - return !instance.menu.isOpen; - }, - hasUndisabledValue: function hasUndisabledValue() { - var instance = this.instance; - return instance.hasValue && instance.internalValue.some(function (id) { - return !instance.getNode(id).isDisabled; - }); - } - }, - methods: { - renderX: function renderX() { - var h = this.$createElement; - var instance = this.instance; - var title = instance.multiple ? instance.clearAllText : instance.clearValueText; - if (!this.shouldShowX) return null; - return h("div", { - "class": "vue-treeselect__x-container", - attrs: { - title: title - }, - on: { - "mousedown": this.handleMouseDownOnX - } - }, [h(Delete, { - "class": "vue-treeselect__x" - })]); - }, - renderArrow: function renderArrow() { - var h = this.$createElement; - var instance = this.instance; - var arrowClass = { - 'vue-treeselect__control-arrow': true, - 'vue-treeselect__control-arrow--rotated': instance.menu.isOpen - }; - if (!this.shouldShowArrow) return null; - return h("div", { - "class": "vue-treeselect__control-arrow-container", - on: { - "mousedown": this.handleMouseDownOnArrow - } - }, [h(Arrow, { - "class": arrowClass - })]); - }, - handleMouseDownOnX: onLeftClick(function handleMouseDownOnX(evt) { - evt.stopPropagation(); - evt.preventDefault(); - var instance = this.instance; - var result = instance.beforeClearAll(); - - var handler = function handler(shouldClear) { - if (shouldClear) instance.clear(); - }; - - if (is_promise_default()(result)) { - result.then(handler); - } else { - setTimeout(function () { - return handler(result); - }, 0); - } - }), - handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnArrow(evt) { - evt.preventDefault(); - evt.stopPropagation(); - var instance = this.instance; - instance.focusInput(); - instance.toggleMenu(); - }), - renderValueContainer: function renderValueContainer(children) { - var h = this.$createElement; - return h("div", { - "class": "vue-treeselect__value-container" - }, [children]); - } - }, - render: function render() { - var h = arguments[0]; - var instance = this.instance; - var ValueContainer = instance.single ? SingleValue : MultiValue; - return h("div", { - "class": "vue-treeselect__control", - on: { - "mousedown": instance.handleMouseDown - } - }, [h(ValueContainer, { - ref: "value-container" - }), this.renderX(), this.renderArrow()]); - } -}); -// CONCATENATED MODULE: ./src/components/Control.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Controlvue_type_script_lang_js_ = (Controlvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Control.vue -var Control_render, Control_staticRenderFns - - - - -/* normalize component */ - -var Control_component = normalizeComponent( - components_Controlvue_type_script_lang_js_, - Control_render, - Control_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Control_api; } -Control_component.options.__file = "src/components/Control.vue" -/* harmony default export */ var Control = (Control_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Tip.vue?vue&type=script&lang=js& -/* harmony default export */ var Tipvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--tip', - functional: true, - props: { - type: { - type: String, - required: true - }, - icon: { - type: String, - required: true - } - }, - render: function render(_, context) { - var h = arguments[0]; - var props = context.props, - children = context.children; - return h("div", { - "class": "vue-treeselect__tip vue-treeselect__".concat(props.type, "-tip") - }, [h("div", { - "class": "vue-treeselect__icon-container" - }, [h("span", { - "class": "vue-treeselect__icon-".concat(props.icon) - })]), h("span", { - "class": "vue-treeselect__tip-text vue-treeselect__".concat(props.type, "-tip-text") - }, [children])]); - } -}); -// CONCATENATED MODULE: ./src/components/Tip.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Tipvue_type_script_lang_js_ = (Tipvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Tip.vue -var Tip_render, Tip_staticRenderFns - - - - -/* normalize component */ - -var Tip_component = normalizeComponent( - components_Tipvue_type_script_lang_js_, - Tip_render, - Tip_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Tip_api; } -Tip_component.options.__file = "src/components/Tip.vue" -/* harmony default export */ var Tip = (Tip_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Option.vue?vue&type=script&lang=js& - - - - - -var arrowPlaceholder, checkMark, minusMark; -var Option = { - name: 'vue-treeselect--option', - inject: ['instance'], - props: { - node: { - type: Object, - required: true - } - }, - computed: { - shouldExpand: function shouldExpand() { - var instance = this.instance, - node = this.node; - return node.isBranch && instance.shouldExpand(node); - }, - shouldShow: function shouldShow() { - var instance = this.instance, - node = this.node; - return instance.shouldShowOptionInMenu(node); - } - }, - methods: { - renderOption: function renderOption() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - var optionClass = { - 'vue-treeselect__option': true, - 'vue-treeselect__option--disabled': node.isDisabled, - 'vue-treeselect__option--selected': instance.isSelected(node), - 'vue-treeselect__option--highlight': node.isHighlighted, - 'vue-treeselect__option--matched': instance.localSearch.active && node.isMatched, - 'vue-treeselect__option--hide': !this.shouldShow - }; - return h("div", { - "class": optionClass, - on: { - "mouseenter": this.handleMouseEnterOption - }, - attrs: { - "data-id": node.id - } - }, [this.renderArrow(), this.renderLabelContainer([this.renderCheckboxContainer([this.renderCheckbox()]), this.renderLabel()])]); - }, - renderSubOptionsList: function renderSubOptionsList() { - var h = this.$createElement; - if (!this.shouldExpand) return null; - return h("div", { - "class": "vue-treeselect__list" - }, [this.renderSubOptions(), this.renderNoChildrenTip(), this.renderLoadingChildrenTip(), this.renderLoadingChildrenErrorTip()]); - }, - renderArrow: function renderArrow() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (instance.shouldFlattenOptions && this.shouldShow) return null; - - if (node.isBranch) { - var transitionProps = { - props: { - name: 'vue-treeselect__option-arrow--prepare', - appear: true - } - }; - var arrowClass = { - 'vue-treeselect__option-arrow': true, - 'vue-treeselect__option-arrow--rotated': this.shouldExpand - }; - return h("div", { - "class": "vue-treeselect__option-arrow-container", - on: { - "mousedown": this.handleMouseDownOnArrow - } - }, [h("transition", transitionProps, [h(Arrow, { - "class": arrowClass - })])]); - } - - if (instance.hasBranchNodes) { - if (!arrowPlaceholder) arrowPlaceholder = h("div", { - "class": "vue-treeselect__option-arrow-placeholder" - }, ["\xA0"]); - return arrowPlaceholder; - } - - return null; - }, - renderLabelContainer: function renderLabelContainer(children) { - var h = this.$createElement; - return h("div", { - "class": "vue-treeselect__label-container", - on: { - "mousedown": this.handleMouseDownOnLabelContainer - } - }, [children]); - }, - renderCheckboxContainer: function renderCheckboxContainer(children) { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (instance.single) return null; - if (instance.disableBranchNodes && node.isBranch) return null; - return h("div", { - "class": "vue-treeselect__checkbox-container" - }, [children]); - }, - renderCheckbox: function renderCheckbox() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - var checkedState = instance.forest.checkedStateMap[node.id]; - var checkboxClass = { - 'vue-treeselect__checkbox': true, - 'vue-treeselect__checkbox--checked': checkedState === CHECKED, - 'vue-treeselect__checkbox--indeterminate': checkedState === INDETERMINATE, - 'vue-treeselect__checkbox--unchecked': checkedState === UNCHECKED, - 'vue-treeselect__checkbox--disabled': node.isDisabled - }; - if (!checkMark) checkMark = h("span", { - "class": "vue-treeselect__check-mark" - }); - if (!minusMark) minusMark = h("span", { - "class": "vue-treeselect__minus-mark" - }); - return h("span", { - "class": checkboxClass - }, [checkMark, minusMark]); - }, - renderLabel: function renderLabel() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - var shouldShowCount = node.isBranch && (instance.localSearch.active ? instance.showCountOnSearchComputed : instance.showCount); - var count = shouldShowCount ? instance.localSearch.active ? instance.localSearch.countMap[node.id][instance.showCountOf] : node.count[instance.showCountOf] : NaN; - var labelClassName = 'vue-treeselect__label'; - var countClassName = 'vue-treeselect__count'; - var customLabelRenderer = instance.$scopedSlots['option-label']; - if (customLabelRenderer) return customLabelRenderer({ - node: node, - shouldShowCount: shouldShowCount, - count: count, - labelClassName: labelClassName, - countClassName: countClassName - }); - return h("label", { - "class": labelClassName - }, [node.label, shouldShowCount && h("span", { - "class": countClassName - }, ["(", count, ")"])]); - }, - renderSubOptions: function renderSubOptions() { - var h = this.$createElement; - var node = this.node; - if (!node.childrenStates.isLoaded) return null; - return node.children.map(function (childNode) { - return h(Option, { - attrs: { - node: childNode - }, - key: childNode.id - }); - }); - }, - renderNoChildrenTip: function renderNoChildrenTip() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (!node.childrenStates.isLoaded || node.children.length) return null; - return h(Tip, { - attrs: { - type: "no-children", - icon: "warning" - } - }, [instance.noChildrenText]); - }, - renderLoadingChildrenTip: function renderLoadingChildrenTip() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (!node.childrenStates.isLoading) return null; - return h(Tip, { - attrs: { - type: "loading", - icon: "loader" - } - }, [instance.loadingText]); - }, - renderLoadingChildrenErrorTip: function renderLoadingChildrenErrorTip() { - var h = this.$createElement; - var instance = this.instance, - node = this.node; - if (!node.childrenStates.loadingError) return null; - return h(Tip, { - attrs: { - type: "error", - icon: "error" - } - }, [node.childrenStates.loadingError, h("a", { - "class": "vue-treeselect__retry", - attrs: { - title: instance.retryTitle - }, - on: { - "mousedown": this.handleMouseDownOnRetry - } - }, [instance.retryText])]); - }, - handleMouseEnterOption: function handleMouseEnterOption(evt) { - var instance = this.instance, - node = this.node; - if (evt.target !== evt.currentTarget) return; - instance.setCurrentHighlightedOption(node, false); - }, - handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnOptionArrow() { - var instance = this.instance, - node = this.node; - instance.toggleExpanded(node); - }), - handleMouseDownOnLabelContainer: onLeftClick(function handleMouseDownOnLabelContainer() { - var instance = this.instance, - node = this.node; - - if (node.isBranch && instance.disableBranchNodes) { - instance.toggleExpanded(node); - } else { - instance.select(node); - } - }), - handleMouseDownOnRetry: onLeftClick(function handleMouseDownOnRetry() { - var instance = this.instance, - node = this.node; - instance.loadChildrenOptions(node); - }) - }, - render: function render() { - var h = arguments[0]; - var node = this.node; - var indentLevel = this.instance.shouldFlattenOptions ? 0 : node.level; - - var listItemClass = defineProperty_default()({ - 'vue-treeselect__list-item': true - }, "vue-treeselect__indent-level-".concat(indentLevel), true); - - var transitionProps = { - props: { - name: 'vue-treeselect__list--transition' - } - }; - var ariaSelected = this.instance.selectedNodes.length ? 'true' : 'false'; - return h("div", { - "class": listItemClass, - attrs: { - role: "option", - tabindex: "0", - "aria-selected": ariaSelected - } - }, [this.renderOption(), node.isBranch && h("transition", transitionProps, [this.renderSubOptionsList()])]); - } -}; -/* harmony default export */ var Optionvue_type_script_lang_js_ = (Option); -// CONCATENATED MODULE: ./src/components/Option.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Optionvue_type_script_lang_js_ = (Optionvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Option.vue -var Option_render, Option_staticRenderFns - - - - -/* normalize component */ - -var Option_component = normalizeComponent( - components_Optionvue_type_script_lang_js_, - Option_render, - Option_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Option_api; } -Option_component.options.__file = "src/components/Option.vue" -/* harmony default export */ var components_Option = (Option_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Menu.vue?vue&type=script&lang=js& - - - - -var directionMap = { - top: 'top', - bottom: 'bottom', - above: 'top', - below: 'bottom' -}; -/* harmony default export */ var Menuvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--menu', - inject: ['instance'], - computed: { - menuStyle: function menuStyle() { - var instance = this.instance; - return { - maxHeight: instance.maxHeight + 'px' - }; - }, - menuContainerStyle: function menuContainerStyle() { - var instance = this.instance; - return { - zIndex: instance.appendToBody ? null : instance.zIndex - }; - } - }, - watch: { - 'instance.menu.isOpen': function instanceMenuIsOpen(newValue) { - if (newValue) { - this.$nextTick(this.onMenuOpen); - } else { - this.onMenuClose(); - } - } - }, - created: function created() { - this.menuSizeWatcher = null; - this.menuResizeAndScrollEventListeners = null; - }, - mounted: function mounted() { - var instance = this.instance; - if (instance.menu.isOpen) this.$nextTick(this.onMenuOpen); - }, - destroyed: function destroyed() { - this.onMenuClose(); - }, - methods: { - renderMenu: function renderMenu() { - var h = this.$createElement; - var instance = this.instance; - if (!instance.menu.isOpen) return null; - return h("div", { - ref: "menu", - "class": "vue-treeselect__menu", - on: { - "mousedown": instance.handleMouseDown - }, - style: this.menuStyle - }, [this.renderBeforeList(), instance.async ? this.renderAsyncSearchMenuInner() : instance.localSearch.active ? this.renderLocalSearchMenuInner() : this.renderNormalMenuInner(), this.renderAfterList()]); - }, - renderBeforeList: function renderBeforeList() { - var instance = this.instance; - var beforeListRenderer = instance.$scopedSlots['before-list']; - return beforeListRenderer ? beforeListRenderer() : null; - }, - renderAfterList: function renderAfterList() { - var instance = this.instance; - var afterListRenderer = instance.$scopedSlots['after-list']; - return afterListRenderer ? afterListRenderer() : null; - }, - renderNormalMenuInner: function renderNormalMenuInner() { - var instance = this.instance; - - if (instance.rootOptionsStates.isLoading) { - return this.renderLoadingOptionsTip(); - } else if (instance.rootOptionsStates.loadingError) { - return this.renderLoadingRootOptionsErrorTip(); - } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) { - return this.renderNoAvailableOptionsTip(); - } else { - return this.renderOptionList(); - } - }, - renderLocalSearchMenuInner: function renderLocalSearchMenuInner() { - var instance = this.instance; - - if (instance.rootOptionsStates.isLoading) { - return this.renderLoadingOptionsTip(); - } else if (instance.rootOptionsStates.loadingError) { - return this.renderLoadingRootOptionsErrorTip(); - } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) { - return this.renderNoAvailableOptionsTip(); - } else if (instance.localSearch.noResults) { - return this.renderNoResultsTip(); - } else { - return this.renderOptionList(); - } - }, - renderAsyncSearchMenuInner: function renderAsyncSearchMenuInner() { - var instance = this.instance; - var entry = instance.getRemoteSearchEntry(); - var shouldShowSearchPromptTip = instance.trigger.searchQuery === '' && !instance.defaultOptions; - var shouldShowNoResultsTip = shouldShowSearchPromptTip ? false : entry.isLoaded && entry.options.length === 0; - - if (shouldShowSearchPromptTip) { - return this.renderSearchPromptTip(); - } else if (entry.isLoading) { - return this.renderLoadingOptionsTip(); - } else if (entry.loadingError) { - return this.renderAsyncSearchLoadingErrorTip(); - } else if (shouldShowNoResultsTip) { - return this.renderNoResultsTip(); - } else { - return this.renderOptionList(); - } - }, - renderOptionList: function renderOptionList() { - var h = this.$createElement; - var instance = this.instance; - return h("div", { - "class": "vue-treeselect__list", - attrs: { - role: "listbox", - tabindex: "-1" - } - }, [instance.forest.normalizedOptions.map(function (rootNode) { - return h(components_Option, { - attrs: { - node: rootNode - }, - key: rootNode.id - }); - })]); - }, - renderSearchPromptTip: function renderSearchPromptTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "search-prompt", - icon: "warning" - } - }, [instance.searchPromptText]); - }, - renderLoadingOptionsTip: function renderLoadingOptionsTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "loading", - icon: "loader" - } - }, [instance.loadingText]); - }, - renderLoadingRootOptionsErrorTip: function renderLoadingRootOptionsErrorTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "error", - icon: "error" - } - }, [instance.rootOptionsStates.loadingError, h("a", { - "class": "vue-treeselect__retry", - on: { - "click": instance.loadRootOptions - }, - attrs: { - title: instance.retryTitle - } - }, [instance.retryText])]); - }, - renderAsyncSearchLoadingErrorTip: function renderAsyncSearchLoadingErrorTip() { - var h = this.$createElement; - var instance = this.instance; - var entry = instance.getRemoteSearchEntry(); - return h(Tip, { - attrs: { - type: "error", - icon: "error" - } - }, [entry.loadingError, h("a", { - "class": "vue-treeselect__retry", - on: { - "click": instance.handleRemoteSearch - }, - attrs: { - title: instance.retryTitle - } - }, [instance.retryText])]); - }, - renderNoAvailableOptionsTip: function renderNoAvailableOptionsTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "no-options", - icon: "warning" - } - }, [instance.noOptionsText]); - }, - renderNoResultsTip: function renderNoResultsTip() { - var h = this.$createElement; - var instance = this.instance; - return h(Tip, { - attrs: { - type: "no-results", - icon: "warning" - } - }, [instance.noResultsText]); - }, - onMenuOpen: function onMenuOpen() { - this.adjustMenuOpenDirection(); - this.setupMenuSizeWatcher(); - this.setupMenuResizeAndScrollEventListeners(); - }, - onMenuClose: function onMenuClose() { - this.removeMenuSizeWatcher(); - this.removeMenuResizeAndScrollEventListeners(); - }, - adjustMenuOpenDirection: function adjustMenuOpenDirection() { - var instance = this.instance; - if (!instance.menu.isOpen) return; - var $menu = instance.getMenu(); - var $control = instance.getControl(); - var menuRect = $menu.getBoundingClientRect(); - var controlRect = $control.getBoundingClientRect(); - var menuHeight = menuRect.height; - var viewportHeight = window.innerHeight; - var spaceAbove = controlRect.top; - var spaceBelow = window.innerHeight - controlRect.bottom; - var isControlInViewport = controlRect.top >= 0 && controlRect.top <= viewportHeight || controlRect.top < 0 && controlRect.bottom > 0; - var hasEnoughSpaceBelow = spaceBelow > menuHeight + MENU_BUFFER; - var hasEnoughSpaceAbove = spaceAbove > menuHeight + MENU_BUFFER; - - if (!isControlInViewport) { - instance.closeMenu(); - } else if (instance.openDirection !== 'auto') { - instance.menu.placement = directionMap[instance.openDirection]; - } else if (hasEnoughSpaceBelow || !hasEnoughSpaceAbove) { - instance.menu.placement = 'bottom'; - } else { - instance.menu.placement = 'top'; - } - }, - setupMenuSizeWatcher: function setupMenuSizeWatcher() { - var instance = this.instance; - var $menu = instance.getMenu(); - if (this.menuSizeWatcher) return; - this.menuSizeWatcher = { - remove: watchSize($menu, this.adjustMenuOpenDirection) - }; - }, - setupMenuResizeAndScrollEventListeners: function setupMenuResizeAndScrollEventListeners() { - var instance = this.instance; - var $control = instance.getControl(); - if (this.menuResizeAndScrollEventListeners) return; - this.menuResizeAndScrollEventListeners = { - remove: setupResizeAndScrollEventListeners($control, this.adjustMenuOpenDirection) - }; - }, - removeMenuSizeWatcher: function removeMenuSizeWatcher() { - if (!this.menuSizeWatcher) return; - this.menuSizeWatcher.remove(); - this.menuSizeWatcher = null; - }, - removeMenuResizeAndScrollEventListeners: function removeMenuResizeAndScrollEventListeners() { - if (!this.menuResizeAndScrollEventListeners) return; - this.menuResizeAndScrollEventListeners.remove(); - this.menuResizeAndScrollEventListeners = null; - } - }, - render: function render() { - var h = arguments[0]; - return h("div", { - ref: "menu-container", - "class": "vue-treeselect__menu-container", - style: this.menuContainerStyle - }, [h("transition", { - attrs: { - name: "vue-treeselect__menu--transition" - } - }, [this.renderMenu()])]); - } -}); -// CONCATENATED MODULE: ./src/components/Menu.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Menuvue_type_script_lang_js_ = (Menuvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Menu.vue -var Menu_render, Menu_staticRenderFns - - - - -/* normalize component */ - -var Menu_component = normalizeComponent( - components_Menuvue_type_script_lang_js_, - Menu_render, - Menu_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Menu_api; } -Menu_component.options.__file = "src/components/Menu.vue" -/* harmony default export */ var Menu = (Menu_component.exports); -// EXTERNAL MODULE: external "Vue" -var external_Vue_ = __webpack_require__(36); -var external_Vue_default = /*#__PURE__*/__webpack_require__.n(external_Vue_); - -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MenuPortal.vue?vue&type=script&lang=js& - - -function MenuPortalvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function MenuPortalvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { MenuPortalvue_type_script_lang_js_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { MenuPortalvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - - - - -var PortalTarget = { - name: 'vue-treeselect--portal-target', - inject: ['instance'], - watch: { - 'instance.menu.isOpen': function instanceMenuIsOpen(newValue) { - if (newValue) { - this.setupHandlers(); - } else { - this.removeHandlers(); - } - }, - 'instance.menu.placement': function instanceMenuPlacement() { - this.updateMenuContainerOffset(); - } - }, - created: function created() { - this.controlResizeAndScrollEventListeners = null; - this.controlSizeWatcher = null; - }, - mounted: function mounted() { - var instance = this.instance; - if (instance.menu.isOpen) this.setupHandlers(); - }, - methods: { - setupHandlers: function setupHandlers() { - this.updateWidth(); - this.updateMenuContainerOffset(); - this.setupControlResizeAndScrollEventListeners(); - this.setupControlSizeWatcher(); - }, - removeHandlers: function removeHandlers() { - this.removeControlResizeAndScrollEventListeners(); - this.removeControlSizeWatcher(); - }, - setupControlResizeAndScrollEventListeners: function setupControlResizeAndScrollEventListeners() { - var instance = this.instance; - var $control = instance.getControl(); - if (this.controlResizeAndScrollEventListeners) return; - this.controlResizeAndScrollEventListeners = { - remove: setupResizeAndScrollEventListeners($control, this.updateMenuContainerOffset) - }; - }, - setupControlSizeWatcher: function setupControlSizeWatcher() { - var _this = this; - - var instance = this.instance; - var $control = instance.getControl(); - if (this.controlSizeWatcher) return; - this.controlSizeWatcher = { - remove: watchSize($control, function () { - _this.updateWidth(); - - _this.updateMenuContainerOffset(); - }) - }; - }, - removeControlResizeAndScrollEventListeners: function removeControlResizeAndScrollEventListeners() { - if (!this.controlResizeAndScrollEventListeners) return; - this.controlResizeAndScrollEventListeners.remove(); - this.controlResizeAndScrollEventListeners = null; - }, - removeControlSizeWatcher: function removeControlSizeWatcher() { - if (!this.controlSizeWatcher) return; - this.controlSizeWatcher.remove(); - this.controlSizeWatcher = null; - }, - updateWidth: function updateWidth() { - var instance = this.instance; - var $portalTarget = this.$el; - var $control = instance.getControl(); - var controlRect = $control.getBoundingClientRect(); - $portalTarget.style.width = controlRect.width + 'px'; - }, - updateMenuContainerOffset: function updateMenuContainerOffset() { - var instance = this.instance; - var $control = instance.getControl(); - var $portalTarget = this.$el; - var controlRect = $control.getBoundingClientRect(); - var portalTargetRect = $portalTarget.getBoundingClientRect(); - var offsetY = instance.menu.placement === 'bottom' ? controlRect.height : 0; - var left = Math.round(controlRect.left - portalTargetRect.left) + 'px'; - var top = Math.round(controlRect.top - portalTargetRect.top + offsetY) + 'px'; - var menuContainerStyle = this.$refs.menu.$refs['menu-container'].style; - var transformVariations = ['transform', 'webkitTransform', 'MozTransform', 'msTransform']; - var transform = find(transformVariations, function (t) { - return t in document.body.style; - }); - menuContainerStyle[transform] = "translate(".concat(left, ", ").concat(top, ")"); - } - }, - render: function render() { - var h = arguments[0]; - var instance = this.instance; - var portalTargetClass = ['vue-treeselect__portal-target', instance.wrapperClass]; - var portalTargetStyle = { - zIndex: instance.zIndex - }; - return h("div", { - "class": portalTargetClass, - style: portalTargetStyle, - attrs: { - "data-instance-id": instance.getInstanceId() - } - }, [h(Menu, { - ref: "menu" - })]); - }, - destroyed: function destroyed() { - this.removeHandlers(); - } -}; -var placeholder; -/* harmony default export */ var MenuPortalvue_type_script_lang_js_ = ({ - name: 'vue-treeselect--menu-portal', - created: function created() { - this.portalTarget = null; - }, - mounted: function mounted() { - this.setup(); - }, - destroyed: function destroyed() { - this.teardown(); - }, - methods: { - setup: function setup() { - var el = document.createElement('div'); - document.body.appendChild(el); - this.portalTarget = new external_Vue_default.a(MenuPortalvue_type_script_lang_js_objectSpread({ - el: el, - parent: this - }, PortalTarget)); - }, - teardown: function teardown() { - document.body.removeChild(this.portalTarget.$el); - this.portalTarget.$el.innerHTML = ''; - this.portalTarget.$destroy(); - this.portalTarget = null; - } - }, - render: function render() { - var h = arguments[0]; - if (!placeholder) placeholder = h("div", { - "class": "vue-treeselect__menu-placeholder" - }); - return placeholder; - } -}); -// CONCATENATED MODULE: ./src/components/MenuPortal.vue?vue&type=script&lang=js& - /* harmony default export */ var components_MenuPortalvue_type_script_lang_js_ = (MenuPortalvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/MenuPortal.vue -var MenuPortal_render, MenuPortal_staticRenderFns - - - - -/* normalize component */ - -var MenuPortal_component = normalizeComponent( - components_MenuPortalvue_type_script_lang_js_, - MenuPortal_render, - MenuPortal_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var MenuPortal_api; } -MenuPortal_component.options.__file = "src/components/MenuPortal.vue" -/* harmony default export */ var MenuPortal = (MenuPortal_component.exports); -// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Treeselect.vue?vue&type=script&lang=js& - - - - - -/* harmony default export */ var Treeselectvue_type_script_lang_js_ = ({ - name: 'vue-treeselect', - mixins: [treeselectMixin], - computed: { - wrapperClass: function wrapperClass() { - return { - 'vue-treeselect': true, - 'vue-treeselect--single': this.single, - 'vue-treeselect--multi': this.multiple, - 'vue-treeselect--searchable': this.searchable, - 'vue-treeselect--disabled': this.disabled, - 'vue-treeselect--focused': this.trigger.isFocused, - 'vue-treeselect--has-value': this.hasValue, - 'vue-treeselect--open': this.menu.isOpen, - 'vue-treeselect--open-above': this.menu.placement === 'top', - 'vue-treeselect--open-below': this.menu.placement === 'bottom', - 'vue-treeselect--branch-nodes-disabled': this.disableBranchNodes, - 'vue-treeselect--append-to-body': this.appendToBody - }; - } - }, - render: function render() { - var h = arguments[0]; - return h("div", { - ref: "wrapper", - "class": this.wrapperClass - }, [h(HiddenFields), h(Control, { - ref: "control" - }), this.appendToBody ? h(MenuPortal, { - ref: "portal" - }) : h(Menu, { - ref: "menu" - })]); - } -}); -// CONCATENATED MODULE: ./src/components/Treeselect.vue?vue&type=script&lang=js& - /* harmony default export */ var components_Treeselectvue_type_script_lang_js_ = (Treeselectvue_type_script_lang_js_); -// CONCATENATED MODULE: ./src/components/Treeselect.vue -var Treeselect_render, Treeselect_staticRenderFns - - - - -/* normalize component */ - -var Treeselect_component = normalizeComponent( - components_Treeselectvue_type_script_lang_js_, - Treeselect_render, - Treeselect_staticRenderFns, - false, - null, - null, - null - -) - -/* hot reload */ -if (false) { var Treeselect_api; } -Treeselect_component.options.__file = "src/components/Treeselect.vue" -/* harmony default export */ var Treeselect = (Treeselect_component.exports); -// EXTERNAL MODULE: ./src/style.less -var style = __webpack_require__(37); - -// CONCATENATED MODULE: ./src/index.js - - - -/* harmony default export */ var src = __webpack_exports__["default"] = (Treeselect); - - -var VERSION = "0.4.0"; - -/***/ }) -/******/ ]); -}); -//# sourceMappingURL=vue-treeselect.umd.js.map \ No newline at end of file diff --git a/dist/vue-treeselect.umd.js.map b/dist/vue-treeselect.umd.js.map deleted file mode 100644 index fafa1da5..00000000 --- a/dist/vue-treeselect.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://VueTreeselect/webpack/universalModuleDefinition","webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://VueTreeselect/./node_modules/lodash/noop.js","webpack://VueTreeselect/./node_modules/lodash/debounce.js","webpack://VueTreeselect/./node_modules/lodash/isObject.js","webpack://VueTreeselect/./node_modules/lodash/now.js","webpack://VueTreeselect/./node_modules/lodash/_root.js","webpack://VueTreeselect/./node_modules/lodash/_freeGlobal.js","webpack://VueTreeselect/(webpack)/buildin/global.js","webpack://VueTreeselect/./node_modules/lodash/toNumber.js","webpack://VueTreeselect/./node_modules/lodash/isSymbol.js","webpack://VueTreeselect/./node_modules/lodash/_baseGetTag.js","webpack://VueTreeselect/./node_modules/lodash/_Symbol.js","webpack://VueTreeselect/./node_modules/lodash/_getRawTag.js","webpack://VueTreeselect/./node_modules/lodash/_objectToString.js","webpack://VueTreeselect/./node_modules/lodash/isObjectLike.js","webpack://VueTreeselect/./node_modules/is-promise/index.js","webpack://VueTreeselect/./node_modules/lodash/once.js","webpack://VueTreeselect/./node_modules/lodash/before.js","webpack://VueTreeselect/./node_modules/lodash/toInteger.js","webpack://VueTreeselect/./node_modules/lodash/toFinite.js","webpack://VueTreeselect/./node_modules/lodash/identity.js","webpack://VueTreeselect/./node_modules/lodash/constant.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/typeof.js","webpack://VueTreeselect/./node_modules/lodash/last.js","webpack://VueTreeselect/./node_modules/fuzzysearch/index.js","webpack://VueTreeselect/./node_modules/babel-helper-vue-jsx-merge-props/index.js","webpack://VueTreeselect/external \"Vue\"","webpack://VueTreeselect/./src/style.less?1f4a","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./node_modules/watch-size/index.es.mjs","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/utils/index.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./src/components/HiddenFields.vue?750c","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue?449d","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/Placeholder.vue?238d","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/SingleValue.vue?5aaa","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?ada5","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue?9a1f","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/MultiValue.vue?6f61","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?525a","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Control.vue?57ab","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/./src/components/Tip.vue?5960","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue?0a09","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue?c349","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue?ca92","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/components/Treeselect.vue?85a0","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["warning","process","noop","checker","complainer","message","concat","console","error","onLeftClick","mouseDownHandler","onMouseDown","evt","type","button","args","call","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","removeFromArray","arr","elem","idx","indexOf","splice","intervalId","registered","INTERVAL_DURATION","run","setInterval","forEach","test","stop","clearInterval","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","unwatch","length","push","watchSize","isIE9","document","documentMode","locked","wrappedListener","implementation","watchSizeForBrowsersOtherThanIE9","removeSizeWatcher","findScrollParents","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","isScrollElment","window","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","addEventListener","passive","scrollParent","removeEventListeners","removeEventListener","$scrollParent","isNaN","x","createMap","Object","create","isPlainObject","value","getPrototypeOf","prototype","copy","obj","key","deepExtend","target","source","keys","i","len","includes","arrOrStr","find","predicate","ctx","undefined","quickDiff","arrA","arrB","NO_PARENT_NODE","UNCHECKED","INDETERMINATE","CHECKED","ALL_CHILDREN","ALL_DESCENDANTS","LEAF_CHILDREN","LEAF_DESCENDANTS","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","ALL","BRANCH_PRIORITY","LEAF_PRIORITY","ALL_WITH_INDETERMINATE","ORDER_SELECTED","LEVEL","INDEX","KEY_CODES","BACKSPACE","ENTER","ESCAPE","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DELETE","INPUT_DEBOUNCE_DELAY","MIN_INPUT_WIDTH","MENU_BUFFER","sortValueByIndex","a","b","level","index","sortValueByLevel","createAsyncOptionsStates","isLoaded","isLoading","loadingError","slugify","str","map","e","o","u","toLowerCase","pattern","replace","RegExp","stringifyOptionPropValue","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","limitTextDefault","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","name","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","acceptableValues","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","hasChanged","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propNames","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","label","enhancedNormalizer","fallbackNode","isFallbackNode","isDisabled","isNew","$set","defaultNode","valueArray","matched","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","isClickedOnValueContainer","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","ref","portal","portalTarget","$menu","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","Treeselect","VERSION","PKG_VERSION"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AChBA,eAAe,mBAAO,CAAC,EAAY;AACnC,UAAU,mBAAO,CAAC,EAAO;AACzB,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO,YAAY;AAC9B,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,8CAA8C,kBAAkB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9BA,WAAW,mBAAO,CAAC,EAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;ACRA;AACA;;AAEA;;;;;;;;ACHA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACnBA,eAAe,mBAAO,CAAC,EAAY;AACnC,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjEA,iBAAiB,mBAAO,CAAC,EAAe;AACxC,mBAAmB,mBAAO,CAAC,EAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA,aAAa,mBAAO,CAAC,EAAW;AAChC,gBAAgB,mBAAO,CAAC,EAAc;AACtC,qBAAqB,mBAAO,CAAC,EAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3BA,WAAW,mBAAO,CAAC,EAAS;;AAE5B;AACA;;AAEA;;;;;;;ACLA,aAAa,mBAAO,CAAC,EAAW;;AAEhC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA;;AAEA;AACA;AACA;;;;;;;ACJA,aAAa,mBAAO,CAAC,EAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,EAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACvCA,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACnCA,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,EAAE;AACf;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,SAAS;AACtB;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA,WAAW,SAAS,GAAG,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzBA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yB;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACnBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACvBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC5FA,IAAI,mBAAM;AACsD;AACL;;;AAG3D;AAC0F;AAC1F,gBAAgB,kBAAU;AAC1B,EAAE,+CAAM;AACR,EAAE,mBAAM;AACR;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAYf;AACD;AACe,kE;;;;;;;AChCf;AACA;AAEA,oCACA,eADA,EAEA,aAFA,EAGA,cAHA,EAIA,oBAJA,EAKA,kBALA,EAMA,qBANA,EAOA,oBAPA;AAUA;AACA,+BADA;AAEA,sBAFA;AAIA;AAAA;AACA,iCADA;AAEA;AAFA;AAAA,GAJA;AASA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA,uBACA,kBADA,IAEA,iBAHA;AAKA,KATA;AAWA,cAXA,wBAWA;AACA;AACA;AADA;AAGA;AAfA,GATA;AA2BA;AACA,kCADA,sCACA,QADA,EACA;AACA;AACA,KAHA;AAKA,SALA,mBAKA;AAEA;AACA;AARA,GA3BA;AAsCA,SAtCA,qBAsCA;AACA,gDACA,sBADA,EAEA,gCAFA,EAGA;AAAA;AAAA;AAAA,KAHA;AAKA,GA5CA;AA8CA;AACA,SADA,mBACA;AACA;AACA;AAAA;AAAA;AADA;AAGA,KALA;AAOA,SAPA,mBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA;AACA,KAbA;AAeA,QAfA,kBAeA;AACA;AACA,KAjBA;AAmBA,WAnBA,qBAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA;AACA,KAzBA;AA2BA,UA3BA,oBA2BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;;AAIA;AACA;AACA;;AAEA;AACA;AACA,KAvCA;AAyCA,WAzCA,mBAyCA,GAzCA,EAyCA;AAAA,UACA,KADA,GACA,UADA,CACA,KADA;AAGA;;AAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KApDA;AAuDA,aAvDA,qBAuDA,GAvDA,EAuDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAIA;AAEA,oEACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA,aAHA,MAGA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AAEA;AACA;AAvEA;AAyEA,KA9IA;AAgJA,eAhJA,uBAgJA,GAhJA,EAgJA;AAEA;AAGA;AACA;AACA,KAvJA;AAyJA,wBAzJA,kCAyJA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BADA;AAEA,6BAFA;AAGA;AAHA,WADA;AAMA;AANA;AAQA;;AAEA;AACA;AACA;AACA;AADA;AADA;AAKA;;AAEA,aACA;AAAA;AAAA,mBACA,QADA,EADA;AAKA,KA3LA;AA6LA,eA7LA,yBA6LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA;AAAA;AACA,wCADA;AAAA;AAEA,sBAFA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,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;;AAEA;AACA;AACA;AACA,yDADA;AAEA;AAFA;AADA;AAMA;AACA,8CADA;AAEA;AAFA;AAKA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,YACA,kCACA;AAAA;AAAA,UADA,EADA,EADA;AAOA;;AAKA;AACA,kDACA;AAAA;AAAA,oBADA;AAIA;AACA;;AAEA;AACA,KA5EA;AA8EA,wBA9EA,gCA8EA,QA9EA,EA8EA;AAAA;AACA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KApFA;AAsFA,2BAtFA,mCAsFA,QAtFA,EAsFA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAEA,aACA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KAjGA;AAmGA,kBAnGA,4BAmGA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA;AACA,wCADA;AAEA,qEAFA;AAGA,iFAHA;AAIA,yEAJA;AAKA;AALA;AAQA,kCACA;AAAA;AAAA,QADA;AAGA,kCACA;AAAA;AAAA,QADA;AAIA,aACA;AAAA;AAAA,UACA,SADA,EAEA,SAFA,EADA;AAMA,KA3HA;AA6HA,eA7HA,yBA6HA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA,4BACA,gDACA,kCADA,GAEA,kBAFA,CADA;AAMA,oCACA,8BACA,4DADA,GAEA,gCAHA,GAIA,GAJA;AAKA;AACA;AACA;AAEA;AACA,kBADA;AAEA,wCAFA;AAGA,oBAHA;AAIA,sCAJA;AAKA;AALA;AAQA,aACA;AAAA;AAAA,UACA,UADA,EAEA,mBACA;AAAA;AAAA,2BAHA,EADA;AAQA,KA9JA;AAgKA,oBAhKA,8BAgKA;AAAA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA;AAAA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,UADA;AAAA;AAGA,KAxKA;AA0KA,uBA1KA,iCA0KA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,mCADA;AAGA,KAlLA;AAoLA,4BApLA,sCAoLA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,gCADA;AAGA,KA5LA;AA8LA,iCA9LA,2CA8LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,gCADA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAFA,EADA;AAQA,KA3MA;AA6MA,0BA7MA,kCA6MA,GA7MA,EA6MA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAKA;AAEA;AACA,KArNA;AAuNA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA,CAvNA;AA6NA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KARA,CA7NA;AAuOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA;AAvOA,GAzBA;AAuQA,QAvQA,oBAuQA;AAAA;AAAA,QACA,IADA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;AAYA;AAZA;AAcA;AAhBA,GAJA;AAuBA,QAvBA,oBAuBA;AAAA;AACA,WACA;AAAA;AAAA;AAAA,QACA,eADA,EAEA;AAAA;AAAA,MAFA,EAGA;AAAA;AAAA;AAAA;AAAA,MAHA,EADA;AAOA;AA/BA,G;;ACPsN,CAAgB,oHAAG,EAAC,C;;ACA1O,IAAI,iBAAM,EAAE,0BAAe;AACmC;AACL;;;AAGzD;AAC0F;AAC1F,IAAI,oBAAS,GAAG,kBAAU;AAC1B,EAAE,6CAAM;AACR,EAAE,iBAAM;AACR,EAAE,0BAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;;;;ACjCxB;AACA;AACA;AAEe+G,mFAAf;AACA;AACA;AAOO,IAAMC,OAAO,GAAGC,OAAhB,C","file":"vue-treeselect.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Vue\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueTreeselect\"] = factory(require(\"Vue\"));\n\telse\n\t\troot[\"VueTreeselect\"] = factory(root[\"Vue\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__36__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 38);\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/\n\nmodule.exports = function mergeJSXProps (objs) {\n return objs.reduce(function (a, b) {\n var aa, bb, key, nestedKey, temp\n for (key in b) {\n aa = a[key]\n bb = b[key]\n if (aa && nestRE.test(key)) {\n // normalize class\n if (key === 'class') {\n if (typeof aa === 'string') {\n temp = aa\n a[key] = aa = {}\n aa[temp] = true\n }\n if (typeof bb === 'string') {\n temp = bb\n b[key] = bb = {}\n bb[temp] = true\n }\n }\n if (key === 'on' || key === 'nativeOn' || key === 'hook') {\n // merge functions\n for (nestedKey in bb) {\n aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])\n }\n } else if (Array.isArray(aa)) {\n a[key] = aa.concat(bb)\n } else if (Array.isArray(bb)) {\n a[key] = [aa].concat(bb)\n } else {\n for (nestedKey in bb) {\n aa[nestedKey] = bb[nestedKey]\n }\n }\n } else {\n a[key] = b[key]\n }\n }\n return a\n }, {})\n}\n\nfunction mergeFn (a, b) {\n return function () {\n a && a.apply(this, arguments)\n b && b.apply(this, arguments)\n }\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__36__;","// extracted by mini-css-extract-plugin","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","var index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\nexport default index;\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// ========================\r\n// Debugging Helpers\r\n// ========================\r\n\r\nexport { warning } from './warning'\r\n\r\n// ========================\r\n// DOM Utilities\r\n// ========================\r\n\r\nexport { onLeftClick } from './onLeftClick'\r\nexport { scrollIntoView } from './scrollIntoView'\r\nexport { debounce } from './debounce'\r\nexport { watchSize } from './watchSize'\r\nexport { setupResizeAndScrollEventListeners } from './setupResizeAndScrollEventListeners'\r\n\r\n// ========================\r\n// Language Helpers\r\n// ========================\r\n\r\nexport { isNaN } from './isNaN'\r\nexport { isPromise } from './isPromise'\r\nexport { once } from './once'\r\nexport { noop } from './noop'\r\nexport { identity } from './identity'\r\nexport { constant } from './constant'\r\nexport { createMap } from './createMap'\r\nexport { deepExtend } from './deepExtend'\r\nexport { last } from './last'\r\nexport { includes } from './includes'\r\nexport { find } from './find'\r\nexport { removeFromArray } from './removeFromArray'\r\n\r\n// ========================\r\n// Other Utilities\r\n// ========================\r\n\r\nexport { quickDiff } from './quickDiff'\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.umd.min.js b/dist/vue-treeselect.umd.min.js deleted file mode 100644 index cacecb8a..00000000 --- a/dist/vue-treeselect.umd.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee - * Released under the MIT License. - * https://vue-treeselect.js.org/ - */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Vue")):"function"==typeof define&&define.amd?define(["Vue"],t):"object"==typeof exports?exports.VueTreeselect=t(require("Vue")):e.VueTreeselect=t(e.Vue)}(window,(function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=38)}([function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){var n=/^(attrs|props|on|nativeOn|class|style|hook)$/;function i(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}}e.exports=function(e){return e.reduce((function(e,t){var r,o,s,a,l;for(s in t)if(r=e[s],o=t[s],r&&n.test(s))if("class"===s&&("string"==typeof r&&(l=r,e[s]=r={},r[l]=!0),"string"==typeof o&&(l=o,t[s]=o={},o[l]=!0)),"on"===s||"nativeOn"===s||"hook"===s)for(a in o)r[a]=i(r[a],o[a]);else if(Array.isArray(r))e[s]=r.concat(o);else if(Array.isArray(o))e[s]=[r].concat(o);else for(a in o)r[a]=o[a];else e[s]=t[s];return e}),{})}},function(e,t,n){var i=n(23),r=n(24),o=n(3),s=n(25);e.exports=function(e){return i(e)||r(e)||o(e)||s()}},function(e,t,n){var i=n(4);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=t||n<0||m&&e-p>=u}function O(){var e=r();if(b(e))return _(e);h=setTimeout(O,function(e){var n=t-(e-f);return m?a(n,u-(e-p)):n}(e))}function _(e){return h=void 0,g&&l?y(e):(l=c=void 0,d)}function E(){var e=r(),n=b(e);if(l=arguments,c=this,f=e,n){if(void 0===h)return S(f);if(m)return clearTimeout(h),h=setTimeout(O,t),y(f)}return void 0===h&&(h=setTimeout(O,t)),d}return t=o(t)||0,i(n)&&(v=!!n.leading,u=(m="maxWait"in n)?s(o(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=c=h=void 0},E.flush=function(){return void 0===h?d:_(r())},E}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var i=n(27),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},function(e,t,n){var i=n(7),r=n(29),o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},function(e,t,n){var i=n(8).Symbol;e.exports=i},function(e,t){e.exports=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}},function(e,t,n){var i=n(34);e.exports=function(e){return i(2,e)}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var i=n(20),r=n(21),o=n(3),s=n(22);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||s()}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";e.exports=function(e,t){var n=t.length,i=e.length;if(i>n)return!1;if(i===n)return e===t;e:for(var r=0,o=0;r0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},function(e,t,n){var i=n(36);e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var i=n(9);e.exports=function(e){return e?(e=i(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"Treeselect",(function(){return nt})),n.d(t,"treeselectMixin",(function(){return de})),n.d(t,"LOAD_ROOT_OPTIONS",(function(){return H})),n.d(t,"LOAD_CHILDREN_OPTIONS",(function(){return W})),n.d(t,"ASYNC_SEARCH",(function(){return Q})),n.d(t,"VERSION",(function(){return it}));var i=n(16),r=n.n(i),o=n(2),s=n.n(o),a=n(0),l=n.n(a),c=n(5),u=n.n(c).a;function d(e){return function(t){if("mousedown"===t.type&&0===t.button){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rn.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight):i.top-r0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"==typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){P(e,t)&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue();P(e,this.internalValue)&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(u((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||u((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&u((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"].forEach((function(t){u((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=T(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(null,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return u((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n={id:e,label:this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),ancestors:[],parentNode:null,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};return"id"===this.valueFormat?n:F(this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],(function(n){return n&&t.enhancedNormalizer(n).id===e}))||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||"ALL"===this.valueConsistsOf)n=e;else if("BRANCH_PRIORITY"===this.valueConsistsOf)e.forEach((function(e){n.push(e);var i=t.getNode(e);i.isBranch&&t.traverseDescendantsBFS(i,(function(e){n.push(e.id)}))}));else if("LEAF_PRIORITY"===this.valueConsistsOf)for(var i=T(),r=e.slice();r.length;){var o=r.shift(),s=this.getNode(o);n.push(o),s.isRootNode||(s.parentNode.id in i||(i[s.parentNode.id]=s.parentNode.children.length),0==--i[s.parentNode.id]&&r.push(s.parentNode.id))}else if("ALL_WITH_INDETERMINATE"===this.valueConsistsOf)for(var a=T(),l=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));l.length;){var c=l.shift(),u=this.getNode(c);n.push(c),u.isRootNode||(u.parentNode.id in a||(a[u.parentNode.id]=u.parentNode.children.length),0==--a[u.parentNode.id]&&l.push(u.parentNode.id))}P(this.forest.selectedNodeIds,n)&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var i=oe({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,i)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch)for(var n=e.children.slice();n.length;){var i=n[0];i.isBranch&&n.push.apply(n,s()(i.children)),t(i),n.shift()}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){!function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))}({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:d((function(e){(e.preventDefault(),e.stopPropagation(),this.disabled)||(this.getValueContainer().$el.contains(e.target)&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags())})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},l()(n,"ALL_CHILDREN",0),l()(n,"ALL_DESCENDANTS",0),l()(n,"LEAF_CHILDREN",0),l()(n,"LEAF_DESCENDANTS",0),n)))}));var i=t.trim().toLocaleLowerCase(),r=i.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&r.length>1?t.isMatched=r.every((function(e){return le(!1,!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return le(!e.disableFuzzyMatching,e.replaceAccents,i,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].ALL_DESCENDANTS++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].LEAF_DESCENDANTS++})),null!==t.parentNode&&(e.localSearch.countMap[t.parentNode.id].ALL_CHILDREN+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id].LEAF_CHILDREN+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&null!==t.parentNode&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),i=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return i();this.callLoadOptionsProp({action:Q,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(r){n.isLoaded=!0,n.options=r,e.trigger.searchQuery===t&&i()},fail:function(e){n.loadingError=ce(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=(this.appendToBody?this.$refs.portal.portalTarget:this).$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.menu.current;if(null!=i&&i in this.forest.nodeMap&&(this.forest.nodeMap[i].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var r=function(){var n=t.getMenu(),i=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));i&&h(n,i)};this.getMenu()?r():this.$nextTick(r)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=k()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch)&&(e.showAllChildrenOnSearch=!0):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=T();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=T();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=0})),this.selectedNodes.forEach((function(t){n[t.id]=2,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=1)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return oe({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var i=this,o=t.map((function(e){return[i.enhancedNormalizer(e),e]})).map((function(t,o){var s=r()(t,2),a=s[0],c=s[1];i.checkDuplication(a),i.verifyNodeShape(a);var d=a.id,h=a.label,f=a.children,p=a.isDefaultExpanded,v=null===e,m=v?0:e.level+1,g=Array.isArray(f)||null===f,y=!g,S=!!a.isDisabled||!i.flat&&!v&&e.isDisabled,b=!!a.isNew,O=i.matchKeys.reduce((function(e,t){return oe({},e,l()({},t,(n=a[t],"string"==typeof n?n:"number"!=typeof n||N(n)?"":n+"").toLocaleLowerCase()));var n}),{}),_=v?O.label:e.nestedSearchLabel+" "+O.label,E=i.$set(i.forest.nodeMap,d,T());if(i.$set(E,"id",d),i.$set(E,"label",h),i.$set(E,"level",m),i.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),i.$set(E,"index",(v?[]:e.index).concat(o)),i.$set(E,"parentNode",e),i.$set(E,"lowerCased",O),i.$set(E,"nestedSearchLabel",_),i.$set(E,"isDisabled",S),i.$set(E,"isNew",b),i.$set(E,"isMatched",!1),i.$set(E,"isHighlighted",!1),i.$set(E,"isBranch",g),i.$set(E,"isLeaf",y),i.$set(E,"isRootNode",v),i.$set(E,"raw",c),g){var x,L=Array.isArray(f);i.$set(E,"childrenStates",oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{isLoaded:L})),i.$set(E,"isExpanded","boolean"==typeof p?p:mo+40,c=a>o+40;r.top>=0&&r.top<=s||r.top<0&&r.bottom>0?"auto"!==e.openDirection?e.menu.placement=Qe[e.openDirection]:e.menu.placement=l||!c?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:O(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:E(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},void 0,void 0,!1,null,null,null);Ye.options.__file="src/components/Menu.vue";var qe=Ye.exports,Ke=n(19),Xe=n.n(Ke);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Je,Ge={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){this.instance.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:E(e,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:O(t,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl().getBoundingClientRect();t.style.width=n.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),o="bottom"===e.menu.placement?i.height:0,s=Math.round(i.left-r.left)+"px",a=Math.round(i.top-r.top+o)+"px";this.$refs.menu.$refs["menu-container"].style[F(["transform","webkitTransform","MozTransform","msTransform"],(function(e){return e in document.body.style}))]="translate(".concat(s,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],i={zIndex:t.zIndex};return e("div",{class:n,style:i,attrs:{"data-instance-id":t.getInstanceId()}},[e(qe,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},Ze=fe({name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new Xe.a(function(e){for(var t=1;t arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__19__;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","var index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\nexport default index;\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","\r\n","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","\r\n","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file From ce2afdb16c9e047be06514e2413cd11bedb28e6b Mon Sep 17 00:00:00 2001 From: antoniovv Date: Mon, 6 Apr 2020 16:13:23 -0500 Subject: [PATCH 3/3] fix: aria --- dist/vue-treeselect.cjs.js | 3949 +++++++++++++++++++++ dist/vue-treeselect.cjs.js.map | 1 + dist/vue-treeselect.cjs.min.js | 7 + dist/vue-treeselect.cjs.min.js.map | 1 + dist/vue-treeselect.css | 952 ++++++ dist/vue-treeselect.css.map | 1 + dist/vue-treeselect.min.css | 5 + dist/vue-treeselect.umd.js | 5082 ++++++++++++++++++++++++++++ dist/vue-treeselect.umd.js.map | 1 + dist/vue-treeselect.umd.min.js | 7 + dist/vue-treeselect.umd.min.js.map | 1 + src/components/Option.vue | 6 +- 12 files changed, 10011 insertions(+), 2 deletions(-) create mode 100644 dist/vue-treeselect.cjs.js create mode 100644 dist/vue-treeselect.cjs.js.map create mode 100644 dist/vue-treeselect.cjs.min.js create mode 100644 dist/vue-treeselect.cjs.min.js.map create mode 100644 dist/vue-treeselect.css create mode 100644 dist/vue-treeselect.css.map create mode 100644 dist/vue-treeselect.min.css create mode 100644 dist/vue-treeselect.umd.js create mode 100644 dist/vue-treeselect.umd.js.map create mode 100644 dist/vue-treeselect.umd.min.js create mode 100644 dist/vue-treeselect.umd.min.js.map diff --git a/dist/vue-treeselect.cjs.js b/dist/vue-treeselect.cjs.js new file mode 100644 index 00000000..36332d62 --- /dev/null +++ b/dist/vue-treeselect.cjs.js @@ -0,0 +1,3949 @@ +/*! + * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee + * Released under the MIT License. + * https://vue-treeselect.js.org/ + */ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/"; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 16); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = require("@babel/runtime/helpers/slicedToArray"); + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +module.exports = require("@babel/runtime/helpers/toConsumableArray"); + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +module.exports = require("@babel/runtime/helpers/defineProperty"); + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +module.exports = require("lodash/noop"); + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +module.exports = require("lodash/debounce"); + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +module.exports = require("watch-size"); + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +module.exports = require("is-promise"); + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +module.exports = require("lodash/once"); + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +module.exports = require("lodash/identity"); + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +module.exports = require("lodash/constant"); + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +module.exports = require("@babel/runtime/helpers/typeof"); + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +module.exports = require("lodash/last"); + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +module.exports = require("fuzzysearch"); + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +module.exports = require("babel-helper-vue-jsx-merge-props"); + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +module.exports = require("vue"); + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 16 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "Treeselect", function() { return /* reexport */ Treeselect; }); +__webpack_require__.d(__webpack_exports__, "treeselectMixin", function() { return /* reexport */ treeselectMixin; }); +__webpack_require__.d(__webpack_exports__, "LOAD_ROOT_OPTIONS", function() { return /* reexport */ LOAD_ROOT_OPTIONS; }); +__webpack_require__.d(__webpack_exports__, "LOAD_CHILDREN_OPTIONS", function() { return /* reexport */ LOAD_CHILDREN_OPTIONS; }); +__webpack_require__.d(__webpack_exports__, "ASYNC_SEARCH", function() { return /* reexport */ ASYNC_SEARCH; }); +__webpack_require__.d(__webpack_exports__, "VERSION", function() { return /* binding */ VERSION; }); + +// EXTERNAL MODULE: external "@babel/runtime/helpers/slicedToArray" +var slicedToArray_ = __webpack_require__(0); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray_); + +// EXTERNAL MODULE: external "@babel/runtime/helpers/toConsumableArray" +var toConsumableArray_ = __webpack_require__(1); +var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray_); + +// EXTERNAL MODULE: external "@babel/runtime/helpers/defineProperty" +var defineProperty_ = __webpack_require__(2); +var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_); + +// EXTERNAL MODULE: external "lodash/noop" +var noop_ = __webpack_require__(3); +var noop_default = /*#__PURE__*/__webpack_require__.n(noop_); + +// CONCATENATED MODULE: ./src/utils/noop.js + +// CONCATENATED MODULE: ./src/utils/warning.js + + +var warning_warning = process.env.NODE_ENV === 'production' ? noop_default.a : function warning(checker, complainer) { + if (!checker()) { + var _console; + + var message = ['[Vue-Treeselect Warning]'].concat(complainer()); + + (_console = console).error.apply(_console, toConsumableArray_default()(message)); + } +}; +// CONCATENATED MODULE: ./src/utils/onLeftClick.js +function onLeftClick(mouseDownHandler) { + return function onMouseDown(evt) { + if (evt.type === 'mousedown' && evt.button === 0) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + mouseDownHandler.call.apply(mouseDownHandler, [this, evt].concat(args)); + } + }; +} +// CONCATENATED MODULE: ./src/utils/scrollIntoView.js +function scrollIntoView($scrollingEl, $focusedEl) { + var scrollingReact = $scrollingEl.getBoundingClientRect(); + var focusedRect = $focusedEl.getBoundingClientRect(); + var overScroll = $focusedEl.offsetHeight / 3; + + if (focusedRect.bottom + overScroll > scrollingReact.bottom) { + $scrollingEl.scrollTop = Math.min($focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll, $scrollingEl.scrollHeight); + } else if (focusedRect.top - overScroll < scrollingReact.top) { + $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0); + } +} +// EXTERNAL MODULE: external "lodash/debounce" +var debounce_ = __webpack_require__(4); +var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_); + +// CONCATENATED MODULE: ./src/utils/debounce.js + +// EXTERNAL MODULE: external "watch-size" +var external_watch_size_ = __webpack_require__(5); +var external_watch_size_default = /*#__PURE__*/__webpack_require__.n(external_watch_size_); + +// CONCATENATED MODULE: ./src/utils/removeFromArray.js +function removeFromArray(arr, elem) { + var idx = arr.indexOf(elem); + if (idx !== -1) arr.splice(idx, 1); +} +// CONCATENATED MODULE: ./src/utils/watchSize.js + + +var intervalId; +var registered = []; +var INTERVAL_DURATION = 100; + +function run() { + intervalId = setInterval(function () { + registered.forEach(test); + }, INTERVAL_DURATION); +} + +function stop() { + clearInterval(intervalId); + intervalId = null; +} + +function test(item) { + var $el = item.$el, + listener = item.listener, + lastWidth = item.lastWidth, + lastHeight = item.lastHeight; + var width = $el.offsetWidth; + var height = $el.offsetHeight; + + if (lastWidth !== width || lastHeight !== height) { + item.lastWidth = width; + item.lastHeight = height; + listener({ + width: width, + height: height + }); + } +} + +function watchSizeForIE9($el, listener) { + var item = { + $el: $el, + listener: listener, + lastWidth: null, + lastHeight: null + }; + + var unwatch = function unwatch() { + removeFromArray(registered, item); + if (!registered.length) stop(); + }; + + registered.push(item); + test(item); + run(); + return unwatch; +} + +function watchSize($el, listener) { + var isIE9 = document.documentMode === 9; + var locked = true; + + var wrappedListener = function wrappedListener() { + return locked || listener.apply(void 0, arguments); + }; + + var implementation = isIE9 ? watchSizeForIE9 : external_watch_size_default.a; + var removeSizeWatcher = implementation($el, wrappedListener); + locked = false; + return removeSizeWatcher; +} +// CONCATENATED MODULE: ./src/utils/setupResizeAndScrollEventListeners.js +function findScrollParents($el) { + var $scrollParents = []; + var $parent = $el.parentNode; + + while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) { + if (isScrollElment($parent)) $scrollParents.push($parent); + $parent = $parent.parentNode; + } + + $scrollParents.push(window); + return $scrollParents; +} + +function isScrollElment($el) { + var _getComputedStyle = getComputedStyle($el), + overflow = _getComputedStyle.overflow, + overflowX = _getComputedStyle.overflowX, + overflowY = _getComputedStyle.overflowY; + + return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX); +} + +function setupResizeAndScrollEventListeners($el, listener) { + var $scrollParents = findScrollParents($el); + window.addEventListener('resize', listener, { + passive: true + }); + $scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', listener, { + passive: true + }); + }); + return function removeEventListeners() { + window.removeEventListener('resize', listener, { + passive: true + }); + $scrollParents.forEach(function ($scrollParent) { + $scrollParent.removeEventListener('scroll', listener, { + passive: true + }); + }); + }; +} +// CONCATENATED MODULE: ./src/utils/isNaN.js +function isNaN_isNaN(x) { + return x !== x; +} +// EXTERNAL MODULE: external "is-promise" +var external_is_promise_ = __webpack_require__(6); +var external_is_promise_default = /*#__PURE__*/__webpack_require__.n(external_is_promise_); + +// CONCATENATED MODULE: ./src/utils/isPromise.js + +// EXTERNAL MODULE: external "lodash/once" +var once_ = __webpack_require__(7); +var once_default = /*#__PURE__*/__webpack_require__.n(once_); + +// CONCATENATED MODULE: ./src/utils/once.js + +// EXTERNAL MODULE: external "lodash/identity" +var identity_ = __webpack_require__(8); +var identity_default = /*#__PURE__*/__webpack_require__.n(identity_); + +// CONCATENATED MODULE: ./src/utils/identity.js + +// EXTERNAL MODULE: external "lodash/constant" +var constant_ = __webpack_require__(9); +var constant_default = /*#__PURE__*/__webpack_require__.n(constant_); + +// CONCATENATED MODULE: ./src/utils/constant.js + +// CONCATENATED MODULE: ./src/utils/createMap.js +var createMap = function createMap() { + return Object.create(null); +}; +// EXTERNAL MODULE: external "@babel/runtime/helpers/typeof" +var typeof_ = __webpack_require__(10); +var typeof_default = /*#__PURE__*/__webpack_require__.n(typeof_); + +// CONCATENATED MODULE: ./src/utils/deepExtend.js + + +function isPlainObject(value) { + if (value == null || typeof_default()(value) !== 'object') return false; + return Object.getPrototypeOf(value) === Object.prototype; +} + +function copy(obj, key, value) { + if (isPlainObject(value)) { + obj[key] || (obj[key] = {}); + deepExtend(obj[key], value); + } else { + obj[key] = value; + } +} + +function deepExtend(target, source) { + if (isPlainObject(source)) { + var keys = Object.keys(source); + + for (var i = 0, len = keys.length; i < len; i++) { + copy(target, keys[i], source[keys[i]]); + } + } + + return target; +} +// EXTERNAL MODULE: external "lodash/last" +var last_ = __webpack_require__(11); +var last_default = /*#__PURE__*/__webpack_require__.n(last_); + +// CONCATENATED MODULE: ./src/utils/last.js + +// CONCATENATED MODULE: ./src/utils/includes.js +function includes(arrOrStr, elem) { + return arrOrStr.indexOf(elem) !== -1; +} +// CONCATENATED MODULE: ./src/utils/find.js +function find(arr, predicate, ctx) { + for (var i = 0, len = arr.length; i < len; i++) { + if (predicate.call(ctx, arr[i], i, arr)) return arr[i]; + } + + return undefined; +} +// CONCATENATED MODULE: ./src/utils/quickDiff.js +function quickDiff(arrA, arrB) { + if (arrA.length !== arrB.length) return true; + + for (var i = 0; i < arrA.length; i++) { + if (arrA[i] !== arrB[i]) return true; + } + + return false; +} +// CONCATENATED MODULE: ./src/utils/index.js + + + + + + + + + + + + + + + + + + + +// CONCATENATED MODULE: ./src/constants.js +var NO_PARENT_NODE = null; +var UNCHECKED = 0; +var INDETERMINATE = 1; +var CHECKED = 2; +var ALL_CHILDREN = 'ALL_CHILDREN'; +var ALL_DESCENDANTS = 'ALL_DESCENDANTS'; +var LEAF_CHILDREN = 'LEAF_CHILDREN'; +var LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'; +var LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'; +var LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'; +var ASYNC_SEARCH = 'ASYNC_SEARCH'; +var ALL = 'ALL'; +var BRANCH_PRIORITY = 'BRANCH_PRIORITY'; +var LEAF_PRIORITY = 'LEAF_PRIORITY'; +var ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'; +var ORDER_SELECTED = 'ORDER_SELECTED'; +var LEVEL = 'LEVEL'; +var INDEX = 'INDEX'; +var KEY_CODES = { + BACKSPACE: 8, + ENTER: 13, + ESCAPE: 27, + END: 35, + HOME: 36, + ARROW_LEFT: 37, + ARROW_UP: 38, + ARROW_RIGHT: 39, + ARROW_DOWN: 40, + DELETE: 46 +}; +var INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing' ? 10 : 200; +var MIN_INPUT_WIDTH = 5; +var MENU_BUFFER = 40; +// EXTERNAL MODULE: external "fuzzysearch" +var external_fuzzysearch_ = __webpack_require__(12); +var external_fuzzysearch_default = /*#__PURE__*/__webpack_require__.n(external_fuzzysearch_); + +// CONCATENATED MODULE: ./src/mixins/treeselectMixin.js + + + + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + + + + + +function sortValueByIndex(a, b) { + var i = 0; + + do { + if (a.level < i) return -1; + if (b.level < i) return 1; + if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]; + i++; + } while (true); +} + +function sortValueByLevel(a, b) { + return a.level === b.level ? sortValueByIndex(a, b) : a.level - b.level; +} + +function createAsyncOptionsStates() { + return { + isLoaded: false, + isLoading: false, + loadingError: '' + }; +} + +function slugify(str) { + var map = { + a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä', + e: 'é|è|ê|ë|E|É|È|Ê|Ë', + i: 'í|ì|î|ï|I|Í|Ì|Î|Ï', + o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö', + u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü' + }; + str = str.toLowerCase(); + + for (var pattern in map) { + str = str.replace(new RegExp(map[pattern], 'g'), pattern); + } + + return str; +} + +function stringifyOptionPropValue(value) { + if (typeof value === 'string') return value; + if (typeof value === 'number' && !isNaN_isNaN(value)) return value + ''; + return ''; +} + +function match(enableFuzzyMatch, replaceAccents, needle, haystack) { + return enableFuzzyMatch ? external_fuzzysearch_default()(needle, haystack) : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle); +} + +function getErrorMessage(err) { + return err.message || String(err); +} + +var instanceId = 0; +/* harmony default export */ var treeselectMixin = ({ + provide: function provide() { + return { + instance: this + }; + }, + props: { + allowClearingDisabled: { + type: Boolean, + default: false + }, + allowSelectingDisabledDescendants: { + type: Boolean, + default: false + }, + alwaysOpen: { + type: Boolean, + default: false + }, + appendToBody: { + type: Boolean, + default: false + }, + async: { + type: Boolean, + default: false + }, + autoFocus: { + type: Boolean, + default: false + }, + autoLoadRootOptions: { + type: Boolean, + default: true + }, + autoDeselectAncestors: { + type: Boolean, + default: false + }, + autoDeselectDescendants: { + type: Boolean, + default: false + }, + autoSelectAncestors: { + type: Boolean, + default: false + }, + autoSelectDescendants: { + type: Boolean, + default: false + }, + backspaceRemoves: { + type: Boolean, + default: true + }, + beforeClearAll: { + type: Function, + default: constant_default()(true) + }, + branchNodesFirst: { + type: Boolean, + default: false + }, + cacheOptions: { + type: Boolean, + default: true + }, + clearable: { + type: Boolean, + default: true + }, + clearAllText: { + type: String, + default: 'Clear all' + }, + clearOnSelect: { + type: Boolean, + default: false + }, + clearValueText: { + type: String, + default: 'Clear value' + }, + closeOnSelect: { + type: Boolean, + default: true + }, + defaultExpandLevel: { + type: Number, + default: 0 + }, + defaultOptions: { + default: false + }, + deleteRemoves: { + type: Boolean, + default: true + }, + delimiter: { + type: String, + default: ',' + }, + flattenSearchResults: { + type: Boolean, + default: false + }, + disableBranchNodes: { + type: Boolean, + default: false + }, + disabled: { + type: Boolean, + default: false + }, + disableFuzzyMatching: { + type: Boolean, + default: false + }, + flat: { + type: Boolean, + default: false + }, + instanceId: { + default: function _default() { + return "".concat(instanceId++, "$$"); + }, + type: [String, Number] + }, + joinValues: { + type: Boolean, + default: false + }, + limit: { + type: Number, + default: Infinity + }, + limitText: { + type: Function, + default: function limitTextDefault(count) { + return "and ".concat(count, " more"); + } + }, + loadingText: { + type: String, + default: 'Loading...' + }, + loadOptions: { + type: Function + }, + matchKeys: { + type: Array, + default: constant_default()(['label']) + }, + maxHeight: { + type: Number, + default: 300 + }, + multiple: { + type: Boolean, + default: false + }, + name: { + type: String + }, + noChildrenText: { + type: String, + default: 'No sub-options.' + }, + noOptionsText: { + type: String, + default: 'No options available.' + }, + noResultsText: { + type: String, + default: 'No results found...' + }, + normalizer: { + type: Function, + default: identity_default.a + }, + openDirection: { + type: String, + default: 'auto', + validator: function validator(value) { + var acceptableValues = ['auto', 'top', 'bottom', 'above', 'below']; + return includes(acceptableValues, value); + } + }, + openOnClick: { + type: Boolean, + default: true + }, + openOnFocus: { + type: Boolean, + default: false + }, + options: { + type: Array + }, + placeholder: { + type: String, + default: 'Select...' + }, + required: { + type: Boolean, + default: false + }, + retryText: { + type: String, + default: 'Retry?' + }, + retryTitle: { + type: String, + default: 'Click to retry' + }, + searchable: { + type: Boolean, + default: true + }, + searchNested: { + type: Boolean, + default: false + }, + searchPromptText: { + type: String, + default: 'Type to search...' + }, + showCount: { + type: Boolean, + default: false + }, + showCountOf: { + type: String, + default: ALL_CHILDREN, + validator: function validator(value) { + var acceptableValues = [ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS]; + return includes(acceptableValues, value); + } + }, + showCountOnSearch: null, + sortValueBy: { + type: String, + default: ORDER_SELECTED, + validator: function validator(value) { + var acceptableValues = [ORDER_SELECTED, LEVEL, INDEX]; + return includes(acceptableValues, value); + } + }, + tabIndex: { + type: Number, + default: 0 + }, + value: null, + valueConsistsOf: { + type: String, + default: BRANCH_PRIORITY, + validator: function validator(value) { + var acceptableValues = [ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE]; + return includes(acceptableValues, value); + } + }, + valueFormat: { + type: String, + default: 'id' + }, + zIndex: { + type: [Number, String], + default: 999 + }, + inputDebounceDelay: { + type: Number, + default: INPUT_DEBOUNCE_DELAY + }, + replaceAccents: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + trigger: { + isFocused: false, + searchQuery: '' + }, + menu: { + isOpen: false, + current: null, + lastScrollPosition: 0, + placement: 'bottom' + }, + forest: { + normalizedOptions: [], + nodeMap: createMap(), + checkedStateMap: createMap(), + selectedNodeIds: this.extractCheckedNodeIdsFromValue(), + selectedNodeMap: createMap() + }, + rootOptionsStates: createAsyncOptionsStates(), + localSearch: { + active: false, + noResults: true, + countMap: createMap() + }, + remoteSearch: createMap() + }; + }, + computed: { + selectedNodes: function selectedNodes() { + return this.forest.selectedNodeIds.map(this.getNode); + }, + internalValue: function internalValue() { + var _this = this; + + var internalValue; + + if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) { + internalValue = this.forest.selectedNodeIds.slice(); + } else if (this.valueConsistsOf === BRANCH_PRIORITY) { + internalValue = this.forest.selectedNodeIds.filter(function (id) { + var node = _this.getNode(id); + + if (node.isRootNode) return true; + return !_this.isSelected(node.parentNode); + }); + } else if (this.valueConsistsOf === LEAF_PRIORITY) { + internalValue = this.forest.selectedNodeIds.filter(function (id) { + var node = _this.getNode(id); + + if (node.isLeaf) return true; + return node.children.length === 0; + }); + } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) { + var _internalValue; + + var indeterminateNodeIds = []; + internalValue = this.forest.selectedNodeIds.slice(); + this.selectedNodes.forEach(function (selectedNode) { + selectedNode.ancestors.forEach(function (ancestor) { + if (includes(indeterminateNodeIds, ancestor.id)) return; + if (includes(internalValue, ancestor.id)) return; + indeterminateNodeIds.push(ancestor.id); + }); + }); + + (_internalValue = internalValue).push.apply(_internalValue, indeterminateNodeIds); + } + + if (this.sortValueBy === LEVEL) { + internalValue.sort(function (a, b) { + return sortValueByLevel(_this.getNode(a), _this.getNode(b)); + }); + } else if (this.sortValueBy === INDEX) { + internalValue.sort(function (a, b) { + return sortValueByIndex(_this.getNode(a), _this.getNode(b)); + }); + } + + return internalValue; + }, + hasValue: function hasValue() { + return this.internalValue.length > 0; + }, + single: function single() { + return !this.multiple; + }, + visibleOptionIds: function visibleOptionIds() { + var _this2 = this; + + var visibleOptionIds = []; + this.traverseAllNodesByIndex(function (node) { + if (!_this2.localSearch.active || _this2.shouldOptionBeIncludedInSearchResult(node)) { + visibleOptionIds.push(node.id); + } + + if (node.isBranch && !_this2.shouldExpand(node)) { + return false; + } + }); + return visibleOptionIds; + }, + hasVisibleOptions: function hasVisibleOptions() { + return this.visibleOptionIds.length !== 0; + }, + showCountOnSearchComputed: function showCountOnSearchComputed() { + return typeof this.showCountOnSearch === 'boolean' ? this.showCountOnSearch : this.showCount; + }, + hasBranchNodes: function hasBranchNodes() { + return this.forest.normalizedOptions.some(function (rootNode) { + return rootNode.isBranch; + }); + }, + shouldFlattenOptions: function shouldFlattenOptions() { + return this.localSearch.active && this.flattenSearchResults; + } + }, + watch: { + alwaysOpen: function alwaysOpen(newValue) { + if (newValue) this.openMenu();else this.closeMenu(); + }, + branchNodesFirst: function branchNodesFirst() { + this.initialize(); + }, + disabled: function disabled(newValue) { + if (newValue && this.menu.isOpen) this.closeMenu();else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu(); + }, + flat: function flat() { + this.initialize(); + }, + internalValue: function internalValue(newValue, oldValue) { + var hasChanged = quickDiff(newValue, oldValue); + if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId()); + }, + matchKeys: function matchKeys() { + this.initialize(); + }, + multiple: function multiple(newValue) { + if (newValue) this.buildForestState(); + }, + options: { + handler: function handler() { + if (this.async) return; + this.initialize(); + this.rootOptionsStates.isLoaded = Array.isArray(this.options); + }, + deep: true, + immediate: true + }, + 'trigger.searchQuery': function triggerSearchQuery() { + if (this.async) { + this.handleRemoteSearch(); + } else { + this.handleLocalSearch(); + } + + this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId()); + }, + value: function value() { + var nodeIdsFromValue = this.extractCheckedNodeIdsFromValue(); + var hasChanged = quickDiff(nodeIdsFromValue, this.internalValue); + if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue); + } + }, + methods: { + verifyProps: function verifyProps() { + var _this3 = this; + + warning_warning(function () { + return _this3.async ? _this3.searchable : true; + }, function () { + return 'For async search mode, the value of "searchable" prop must be true.'; + }); + + if (this.options == null && !this.loadOptions) { + warning_warning(function () { + return false; + }, function () { + return 'Are you meant to dynamically load options? You need to use "loadOptions" prop.'; + }); + } + + if (this.flat) { + warning_warning(function () { + return _this3.multiple; + }, function () { + return 'You are using flat mode. But you forgot to add "multiple=true"?'; + }); + } + + if (!this.flat) { + var propNames = ['autoSelectAncestors', 'autoSelectDescendants', 'autoDeselectAncestors', 'autoDeselectDescendants']; + propNames.forEach(function (propName) { + warning_warning(function () { + return !_this3[propName]; + }, function () { + return "\"".concat(propName, "\" only applies to flat mode."); + }); + }); + } + }, + resetFlags: function resetFlags() { + this._blurOnSelect = false; + }, + initialize: function initialize() { + var options = this.async ? this.getRemoteSearchEntry().options : this.options; + + if (Array.isArray(options)) { + var prevNodeMap = this.forest.nodeMap; + this.forest.nodeMap = createMap(); + this.keepDataOfSelectedNodes(prevNodeMap); + this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap); + this.fixSelectedNodeIds(this.internalValue); + } else { + this.forest.normalizedOptions = []; + } + }, + getInstanceId: function getInstanceId() { + return this.instanceId == null ? this.id : this.instanceId; + }, + getValue: function getValue() { + var _this4 = this; + + if (this.valueFormat === 'id') { + return this.multiple ? this.internalValue.slice() : this.internalValue[0]; + } + + var rawNodes = this.internalValue.map(function (id) { + return _this4.getNode(id).raw; + }); + return this.multiple ? rawNodes : rawNodes[0]; + }, + getNode: function getNode(nodeId) { + warning_warning(function () { + return nodeId != null; + }, function () { + return "Invalid node id: ".concat(nodeId); + }); + if (nodeId == null) return null; + return nodeId in this.forest.nodeMap ? this.forest.nodeMap[nodeId] : this.createFallbackNode(nodeId); + }, + createFallbackNode: function createFallbackNode(id) { + var raw = this.extractNodeFromValue(id); + var label = this.enhancedNormalizer(raw).label || "".concat(id, " (unknown)"); + var fallbackNode = { + id: id, + label: label, + ancestors: [], + parentNode: NO_PARENT_NODE, + isFallbackNode: true, + isRootNode: true, + isLeaf: true, + isBranch: false, + isDisabled: false, + isNew: false, + index: [-1], + level: 0, + raw: raw + }; + return this.$set(this.forest.nodeMap, id, fallbackNode); + }, + extractCheckedNodeIdsFromValue: function extractCheckedNodeIdsFromValue() { + var _this5 = this; + + if (this.value == null) return []; + + if (this.valueFormat === 'id') { + return this.multiple ? this.value.slice() : [this.value]; + } + + return (this.multiple ? this.value : [this.value]).map(function (node) { + return _this5.enhancedNormalizer(node); + }).map(function (node) { + return node.id; + }); + }, + extractNodeFromValue: function extractNodeFromValue(id) { + var _this6 = this; + + var defaultNode = { + id: id + }; + + if (this.valueFormat === 'id') { + return defaultNode; + } + + var valueArray = this.multiple ? Array.isArray(this.value) ? this.value : [] : this.value ? [this.value] : []; + var matched = find(valueArray, function (node) { + return node && _this6.enhancedNormalizer(node).id === id; + }); + return matched || defaultNode; + }, + fixSelectedNodeIds: function fixSelectedNodeIds(nodeIdListOfPrevValue) { + var _this7 = this; + + var nextSelectedNodeIds = []; + + if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) { + nextSelectedNodeIds = nodeIdListOfPrevValue; + } else if (this.valueConsistsOf === BRANCH_PRIORITY) { + nodeIdListOfPrevValue.forEach(function (nodeId) { + nextSelectedNodeIds.push(nodeId); + + var node = _this7.getNode(nodeId); + + if (node.isBranch) _this7.traverseDescendantsBFS(node, function (descendant) { + nextSelectedNodeIds.push(descendant.id); + }); + }); + } else if (this.valueConsistsOf === LEAF_PRIORITY) { + var map = createMap(); + var queue = nodeIdListOfPrevValue.slice(); + + while (queue.length) { + var nodeId = queue.shift(); + var node = this.getNode(nodeId); + nextSelectedNodeIds.push(nodeId); + if (node.isRootNode) continue; + if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length; + if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id); + } + } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) { + var _map = createMap(); + + var _queue = nodeIdListOfPrevValue.filter(function (nodeId) { + var node = _this7.getNode(nodeId); + + return node.isLeaf || node.children.length === 0; + }); + + while (_queue.length) { + var _nodeId = _queue.shift(); + + var _node = this.getNode(_nodeId); + + nextSelectedNodeIds.push(_nodeId); + if (_node.isRootNode) continue; + if (!(_node.parentNode.id in _map)) _map[_node.parentNode.id] = _node.parentNode.children.length; + if (--_map[_node.parentNode.id] === 0) _queue.push(_node.parentNode.id); + } + } + + var hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds); + if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds; + this.buildForestState(); + }, + keepDataOfSelectedNodes: function keepDataOfSelectedNodes(prevNodeMap) { + var _this8 = this; + + this.forest.selectedNodeIds.forEach(function (id) { + if (!prevNodeMap[id]) return; + + var node = _objectSpread({}, prevNodeMap[id], { + isFallbackNode: true + }); + + _this8.$set(_this8.forest.nodeMap, id, node); + }); + }, + isSelected: function isSelected(node) { + return this.forest.selectedNodeMap[node.id] === true; + }, + traverseDescendantsBFS: function traverseDescendantsBFS(parentNode, callback) { + if (!parentNode.isBranch) return; + var queue = parentNode.children.slice(); + + while (queue.length) { + var currNode = queue[0]; + if (currNode.isBranch) queue.push.apply(queue, toConsumableArray_default()(currNode.children)); + callback(currNode); + queue.shift(); + } + }, + traverseDescendantsDFS: function traverseDescendantsDFS(parentNode, callback) { + var _this9 = this; + + if (!parentNode.isBranch) return; + parentNode.children.forEach(function (child) { + _this9.traverseDescendantsDFS(child, callback); + + callback(child); + }); + }, + traverseAllNodesDFS: function traverseAllNodesDFS(callback) { + var _this10 = this; + + this.forest.normalizedOptions.forEach(function (rootNode) { + _this10.traverseDescendantsDFS(rootNode, callback); + + callback(rootNode); + }); + }, + traverseAllNodesByIndex: function traverseAllNodesByIndex(callback) { + var walk = function walk(parentNode) { + parentNode.children.forEach(function (child) { + if (callback(child) !== false && child.isBranch) { + walk(child); + } + }); + }; + + walk({ + children: this.forest.normalizedOptions + }); + }, + toggleClickOutsideEvent: function toggleClickOutsideEvent(enabled) { + if (enabled) { + document.addEventListener('mousedown', this.handleClickOutside, false); + } else { + document.removeEventListener('mousedown', this.handleClickOutside, false); + } + }, + getValueContainer: function getValueContainer() { + return this.$refs.control.$refs['value-container']; + }, + getInput: function getInput() { + return this.getValueContainer().$refs.input; + }, + focusInput: function focusInput() { + this.getInput().focus(); + }, + blurInput: function blurInput() { + this.getInput().blur(); + }, + handleMouseDown: onLeftClick(function handleMouseDown(evt) { + evt.preventDefault(); + evt.stopPropagation(); + if (this.disabled) return; + var isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target); + + if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) { + this.openMenu(); + } + + if (this._blurOnSelect) { + this.blurInput(); + } else { + this.focusInput(); + } + + this.resetFlags(); + }), + handleClickOutside: function handleClickOutside(evt) { + if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) { + this.blurInput(); + this.closeMenu(); + } + }, + handleLocalSearch: function handleLocalSearch() { + var _this11 = this; + + var searchQuery = this.trigger.searchQuery; + + var done = function done() { + return _this11.resetHighlightedOptionWhenNecessary(true); + }; + + if (!searchQuery) { + this.localSearch.active = false; + return done(); + } + + this.localSearch.active = true; + this.localSearch.noResults = true; + this.traverseAllNodesDFS(function (node) { + if (node.isBranch) { + var _this11$$set; + + node.isExpandedOnSearch = false; + node.showAllChildrenOnSearch = false; + node.isMatched = false; + node.hasMatchedDescendants = false; + + _this11.$set(_this11.localSearch.countMap, node.id, (_this11$$set = {}, defineProperty_default()(_this11$$set, ALL_CHILDREN, 0), defineProperty_default()(_this11$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this11$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this11$$set, LEAF_DESCENDANTS, 0), _this11$$set)); + } + }); + var lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase(); + var splitSearchQuery = lowerCasedSearchQuery.replace(/\s+/g, ' ').split(' '); + this.traverseAllNodesDFS(function (node) { + if (_this11.searchNested && splitSearchQuery.length > 1) { + node.isMatched = splitSearchQuery.every(function (filterValue) { + return match(false, false, filterValue, node.nestedSearchLabel); + }); + } else { + node.isMatched = _this11.matchKeys.some(function (matchKey) { + return match(!_this11.disableFuzzyMatching, _this11.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]); + }); + } + + if (node.isMatched) { + _this11.localSearch.noResults = false; + node.ancestors.forEach(function (ancestor) { + return _this11.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++; + }); + if (node.isLeaf) node.ancestors.forEach(function (ancestor) { + return _this11.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++; + }); + + if (node.parentNode !== NO_PARENT_NODE) { + _this11.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1; + if (node.isLeaf) _this11.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1; + } + } + + if ((node.isMatched || node.isBranch && node.isExpandedOnSearch) && node.parentNode !== NO_PARENT_NODE) { + node.parentNode.isExpandedOnSearch = true; + node.parentNode.hasMatchedDescendants = true; + } + }); + done(); + }, + handleRemoteSearch: function handleRemoteSearch() { + var _this12 = this; + + var searchQuery = this.trigger.searchQuery; + var entry = this.getRemoteSearchEntry(); + + var done = function done() { + _this12.initialize(); + + _this12.resetHighlightedOptionWhenNecessary(true); + }; + + if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) { + return done(); + } + + this.callLoadOptionsProp({ + action: ASYNC_SEARCH, + args: { + searchQuery: searchQuery + }, + isPending: function isPending() { + return entry.isLoading; + }, + start: function start() { + entry.isLoading = true; + entry.isLoaded = false; + entry.loadingError = ''; + }, + succeed: function succeed(options) { + entry.isLoaded = true; + entry.options = options; + if (_this12.trigger.searchQuery === searchQuery) done(); + }, + fail: function fail(err) { + entry.loadingError = getErrorMessage(err); + }, + end: function end() { + entry.isLoading = false; + } + }); + }, + getRemoteSearchEntry: function getRemoteSearchEntry() { + var _this13 = this; + + var searchQuery = this.trigger.searchQuery; + + var entry = this.remoteSearch[searchQuery] || _objectSpread({}, createAsyncOptionsStates(), { + options: [] + }); + + this.$watch(function () { + return entry.options; + }, function () { + if (_this13.trigger.searchQuery === searchQuery) _this13.initialize(); + }, { + deep: true + }); + + if (searchQuery === '') { + if (Array.isArray(this.defaultOptions)) { + entry.options = this.defaultOptions; + entry.isLoaded = true; + return entry; + } else if (this.defaultOptions !== true) { + entry.isLoaded = true; + return entry; + } + } + + if (!this.remoteSearch[searchQuery]) { + this.$set(this.remoteSearch, searchQuery, entry); + } + + return entry; + }, + shouldExpand: function shouldExpand(node) { + return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded; + }, + shouldOptionBeIncludedInSearchResult: function shouldOptionBeIncludedInSearchResult(node) { + if (node.isMatched) return true; + if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true; + if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true; + return false; + }, + shouldShowOptionInMenu: function shouldShowOptionInMenu(node) { + if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) { + return false; + } + + return true; + }, + getControl: function getControl() { + return this.$refs.control.$el; + }, + getMenu: function getMenu() { + var ref = this.appendToBody ? this.$refs.portal.portalTarget : this; + var $menu = ref.$refs.menu.$refs.menu; + return $menu && $menu.nodeName !== '#comment' ? $menu : null; + }, + setCurrentHighlightedOption: function setCurrentHighlightedOption(node) { + var _this14 = this; + + var scroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var prev = this.menu.current; + + if (prev != null && prev in this.forest.nodeMap) { + this.forest.nodeMap[prev].isHighlighted = false; + } + + this.menu.current = node.id; + node.isHighlighted = true; + + if (this.menu.isOpen && scroll) { + var scrollToOption = function scrollToOption() { + var $menu = _this14.getMenu(); + + var $option = $menu.querySelector(".vue-treeselect__option[data-id=\"".concat(node.id, "\"]")); + if ($option) scrollIntoView($menu, $option); + }; + + if (this.getMenu()) { + scrollToOption(); + } else { + this.$nextTick(scrollToOption); + } + } + }, + resetHighlightedOptionWhenNecessary: function resetHighlightedOptionWhenNecessary() { + var forceReset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var current = this.menu.current; + + if (forceReset || current == null || !(current in this.forest.nodeMap) || !this.shouldShowOptionInMenu(this.getNode(current))) { + this.highlightFirstOption(); + } + }, + highlightFirstOption: function highlightFirstOption() { + if (!this.hasVisibleOptions) return; + var first = this.visibleOptionIds[0]; + this.setCurrentHighlightedOption(this.getNode(first)); + }, + highlightPrevOption: function highlightPrevOption() { + if (!this.hasVisibleOptions) return; + var prev = this.visibleOptionIds.indexOf(this.menu.current) - 1; + if (prev === -1) return this.highlightLastOption(); + this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev])); + }, + highlightNextOption: function highlightNextOption() { + if (!this.hasVisibleOptions) return; + var next = this.visibleOptionIds.indexOf(this.menu.current) + 1; + if (next === this.visibleOptionIds.length) return this.highlightFirstOption(); + this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next])); + }, + highlightLastOption: function highlightLastOption() { + if (!this.hasVisibleOptions) return; + var last = last_default()(this.visibleOptionIds); + this.setCurrentHighlightedOption(this.getNode(last)); + }, + resetSearchQuery: function resetSearchQuery() { + this.trigger.searchQuery = ''; + }, + closeMenu: function closeMenu() { + if (!this.menu.isOpen || !this.disabled && this.alwaysOpen) return; + this.saveMenuScrollPosition(); + this.menu.isOpen = false; + this.toggleClickOutsideEvent(false); + this.resetSearchQuery(); + this.$emit('close', this.getValue(), this.getInstanceId()); + }, + openMenu: function openMenu() { + if (this.disabled || this.menu.isOpen) return; + this.menu.isOpen = true; + this.$nextTick(this.resetHighlightedOptionWhenNecessary); + this.$nextTick(this.restoreMenuScrollPosition); + if (!this.options && !this.async) this.loadRootOptions(); + this.toggleClickOutsideEvent(true); + this.$emit('open', this.getInstanceId()); + }, + toggleMenu: function toggleMenu() { + if (this.menu.isOpen) { + this.closeMenu(); + } else { + this.openMenu(); + } + }, + toggleExpanded: function toggleExpanded(node) { + var nextState; + + if (this.localSearch.active) { + nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch; + if (nextState) node.showAllChildrenOnSearch = true; + } else { + nextState = node.isExpanded = !node.isExpanded; + } + + if (nextState && !node.childrenStates.isLoaded) { + this.loadChildrenOptions(node); + } + }, + buildForestState: function buildForestState() { + var _this15 = this; + + var selectedNodeMap = createMap(); + this.forest.selectedNodeIds.forEach(function (selectedNodeId) { + selectedNodeMap[selectedNodeId] = true; + }); + this.forest.selectedNodeMap = selectedNodeMap; + var checkedStateMap = createMap(); + + if (this.multiple) { + this.traverseAllNodesByIndex(function (node) { + checkedStateMap[node.id] = UNCHECKED; + }); + this.selectedNodes.forEach(function (selectedNode) { + checkedStateMap[selectedNode.id] = CHECKED; + + if (!_this15.flat && !_this15.disableBranchNodes) { + selectedNode.ancestors.forEach(function (ancestorNode) { + if (!_this15.isSelected(ancestorNode)) { + checkedStateMap[ancestorNode.id] = INDETERMINATE; + } + }); + } + }); + } + + this.forest.checkedStateMap = checkedStateMap; + }, + enhancedNormalizer: function enhancedNormalizer(raw) { + return _objectSpread({}, raw, {}, this.normalizer(raw, this.getInstanceId())); + }, + normalize: function normalize(parentNode, nodes, prevNodeMap) { + var _this16 = this; + + var normalizedOptions = nodes.map(function (node) { + return [_this16.enhancedNormalizer(node), node]; + }).map(function (_ref, index) { + var _ref2 = slicedToArray_default()(_ref, 2), + node = _ref2[0], + raw = _ref2[1]; + + _this16.checkDuplication(node); + + _this16.verifyNodeShape(node); + + var id = node.id, + label = node.label, + children = node.children, + isDefaultExpanded = node.isDefaultExpanded; + var isRootNode = parentNode === NO_PARENT_NODE; + var level = isRootNode ? 0 : parentNode.level + 1; + var isBranch = Array.isArray(children) || children === null; + var isLeaf = !isBranch; + var isDisabled = !!node.isDisabled || !_this16.flat && !isRootNode && parentNode.isDisabled; + var isNew = !!node.isNew; + + var lowerCased = _this16.matchKeys.reduce(function (prev, key) { + return _objectSpread({}, prev, defineProperty_default()({}, key, stringifyOptionPropValue(node[key]).toLocaleLowerCase())); + }, {}); + + var nestedSearchLabel = isRootNode ? lowerCased.label : parentNode.nestedSearchLabel + ' ' + lowerCased.label; + + var normalized = _this16.$set(_this16.forest.nodeMap, id, createMap()); + + _this16.$set(normalized, 'id', id); + + _this16.$set(normalized, 'label', label); + + _this16.$set(normalized, 'level', level); + + _this16.$set(normalized, 'ancestors', isRootNode ? [] : [parentNode].concat(parentNode.ancestors)); + + _this16.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index)); + + _this16.$set(normalized, 'parentNode', parentNode); + + _this16.$set(normalized, 'lowerCased', lowerCased); + + _this16.$set(normalized, 'nestedSearchLabel', nestedSearchLabel); + + _this16.$set(normalized, 'isDisabled', isDisabled); + + _this16.$set(normalized, 'isNew', isNew); + + _this16.$set(normalized, 'isMatched', false); + + _this16.$set(normalized, 'isHighlighted', false); + + _this16.$set(normalized, 'isBranch', isBranch); + + _this16.$set(normalized, 'isLeaf', isLeaf); + + _this16.$set(normalized, 'isRootNode', isRootNode); + + _this16.$set(normalized, 'raw', raw); + + if (isBranch) { + var _this16$$set; + + var isLoaded = Array.isArray(children); + + _this16.$set(normalized, 'childrenStates', _objectSpread({}, createAsyncOptionsStates(), { + isLoaded: isLoaded + })); + + _this16.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean' ? isDefaultExpanded : level < _this16.defaultExpandLevel); + + _this16.$set(normalized, 'hasMatchedDescendants', false); + + _this16.$set(normalized, 'hasDisabledDescendants', false); + + _this16.$set(normalized, 'isExpandedOnSearch', false); + + _this16.$set(normalized, 'showAllChildrenOnSearch', false); + + _this16.$set(normalized, 'count', (_this16$$set = {}, defineProperty_default()(_this16$$set, ALL_CHILDREN, 0), defineProperty_default()(_this16$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this16$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this16$$set, LEAF_DESCENDANTS, 0), _this16$$set)); + + _this16.$set(normalized, 'children', isLoaded ? _this16.normalize(normalized, children, prevNodeMap) : []); + + if (isDefaultExpanded === true) normalized.ancestors.forEach(function (ancestor) { + ancestor.isExpanded = true; + }); + + if (!isLoaded && typeof _this16.loadOptions !== 'function') { + warning_warning(function () { + return false; + }, function () { + return 'Unloaded branch node detected. "loadOptions" prop is required to load its children.'; + }); + } else if (!isLoaded && normalized.isExpanded) { + _this16.loadChildrenOptions(normalized); + } + } + + normalized.ancestors.forEach(function (ancestor) { + return ancestor.count[ALL_DESCENDANTS]++; + }); + if (isLeaf) normalized.ancestors.forEach(function (ancestor) { + return ancestor.count[LEAF_DESCENDANTS]++; + }); + + if (!isRootNode) { + parentNode.count[ALL_CHILDREN] += 1; + if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1; + if (isDisabled) parentNode.hasDisabledDescendants = true; + } + + if (prevNodeMap && prevNodeMap[id]) { + var prev = prevNodeMap[id]; + normalized.isMatched = prev.isMatched; + normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch; + normalized.isHighlighted = prev.isHighlighted; + + if (prev.isBranch && normalized.isBranch) { + normalized.isExpanded = prev.isExpanded; + normalized.isExpandedOnSearch = prev.isExpandedOnSearch; + + if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) { + normalized.isExpanded = false; + } else { + normalized.childrenStates = _objectSpread({}, prev.childrenStates); + } + } + } + + return normalized; + }); + + if (this.branchNodesFirst) { + var branchNodes = normalizedOptions.filter(function (option) { + return option.isBranch; + }); + var leafNodes = normalizedOptions.filter(function (option) { + return option.isLeaf; + }); + normalizedOptions = branchNodes.concat(leafNodes); + } + + return normalizedOptions; + }, + loadRootOptions: function loadRootOptions() { + var _this17 = this; + + this.callLoadOptionsProp({ + action: LOAD_ROOT_OPTIONS, + isPending: function isPending() { + return _this17.rootOptionsStates.isLoading; + }, + start: function start() { + _this17.rootOptionsStates.isLoading = true; + _this17.rootOptionsStates.loadingError = ''; + }, + succeed: function succeed() { + _this17.rootOptionsStates.isLoaded = true; + + _this17.$nextTick(function () { + _this17.resetHighlightedOptionWhenNecessary(true); + }); + }, + fail: function fail(err) { + _this17.rootOptionsStates.loadingError = getErrorMessage(err); + }, + end: function end() { + _this17.rootOptionsStates.isLoading = false; + } + }); + }, + loadChildrenOptions: function loadChildrenOptions(parentNode) { + var _this18 = this; + + var id = parentNode.id, + raw = parentNode.raw; + this.callLoadOptionsProp({ + action: LOAD_CHILDREN_OPTIONS, + args: { + parentNode: raw + }, + isPending: function isPending() { + return _this18.getNode(id).childrenStates.isLoading; + }, + start: function start() { + _this18.getNode(id).childrenStates.isLoading = true; + _this18.getNode(id).childrenStates.loadingError = ''; + }, + succeed: function succeed() { + _this18.getNode(id).childrenStates.isLoaded = true; + }, + fail: function fail(err) { + _this18.getNode(id).childrenStates.loadingError = getErrorMessage(err); + }, + end: function end() { + _this18.getNode(id).childrenStates.isLoading = false; + } + }); + }, + callLoadOptionsProp: function callLoadOptionsProp(_ref3) { + var action = _ref3.action, + args = _ref3.args, + isPending = _ref3.isPending, + start = _ref3.start, + succeed = _ref3.succeed, + fail = _ref3.fail, + end = _ref3.end; + + if (!this.loadOptions || isPending()) { + return; + } + + start(); + var callback = once_default()(function (err, result) { + if (err) { + fail(err); + } else { + succeed(result); + } + + end(); + }); + var result = this.loadOptions(_objectSpread({ + id: this.getInstanceId(), + instanceId: this.getInstanceId(), + action: action + }, args, { + callback: callback + })); + + if (external_is_promise_default()(result)) { + result.then(function () { + callback(); + }, function (err) { + callback(err); + }).catch(function (err) { + console.error(err); + }); + } + }, + checkDuplication: function checkDuplication(node) { + var _this19 = this; + + warning_warning(function () { + return !(node.id in _this19.forest.nodeMap && !_this19.forest.nodeMap[node.id].isFallbackNode); + }, function () { + return "Detected duplicate presence of node id ".concat(JSON.stringify(node.id), ". ") + "Their labels are \"".concat(_this19.forest.nodeMap[node.id].label, "\" and \"").concat(node.label, "\" respectively."); + }); + }, + verifyNodeShape: function verifyNodeShape(node) { + warning_warning(function () { + return !(node.children === undefined && node.isBranch === true); + }, function () { + return 'Are you meant to declare an unloaded branch node? ' + '`isBranch: true` is no longer supported, please use `children: null` instead.'; + }); + }, + select: function select(node) { + if (this.disabled || node.isDisabled) { + return; + } + + if (this.single) { + this.clear(); + } + + var nextState = this.multiple && !this.flat ? this.forest.checkedStateMap[node.id] === UNCHECKED : !this.isSelected(node); + + if (nextState) { + this._selectNode(node); + } else { + this._deselectNode(node); + } + + this.buildForestState(); + + if (nextState) { + this.$emit('select', node.raw, this.getInstanceId()); + } else { + this.$emit('deselect', node.raw, this.getInstanceId()); + } + + if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) { + this.resetSearchQuery(); + } + + if (this.single && this.closeOnSelect) { + this.closeMenu(); + + if (this.searchable) { + this._blurOnSelect = true; + } + } + }, + clear: function clear() { + var _this20 = this; + + if (this.hasValue) { + if (this.single || this.allowClearingDisabled) { + this.forest.selectedNodeIds = []; + } else { + this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(function (nodeId) { + return _this20.getNode(nodeId).isDisabled; + }); + } + + this.buildForestState(); + } + }, + _selectNode: function _selectNode(node) { + var _this21 = this; + + if (this.single || this.disableBranchNodes) { + return this.addValue(node); + } + + if (this.flat) { + this.addValue(node); + + if (this.autoSelectAncestors) { + node.ancestors.forEach(function (ancestor) { + if (!_this21.isSelected(ancestor) && !ancestor.isDisabled) _this21.addValue(ancestor); + }); + } else if (this.autoSelectDescendants) { + this.traverseDescendantsBFS(node, function (descendant) { + if (!_this21.isSelected(descendant) && !descendant.isDisabled) _this21.addValue(descendant); + }); + } + + return; + } + + var isFullyChecked = node.isLeaf || !node.hasDisabledDescendants || this.allowSelectingDisabledDescendants; + + if (isFullyChecked) { + this.addValue(node); + } + + if (node.isBranch) { + this.traverseDescendantsBFS(node, function (descendant) { + if (!descendant.isDisabled || _this21.allowSelectingDisabledDescendants) { + _this21.addValue(descendant); + } + }); + } + + if (isFullyChecked) { + var curr = node; + + while ((curr = curr.parentNode) !== NO_PARENT_NODE) { + if (curr.children.every(this.isSelected)) this.addValue(curr);else break; + } + } + }, + _deselectNode: function _deselectNode(node) { + var _this22 = this; + + if (this.disableBranchNodes) { + return this.removeValue(node); + } + + if (this.flat) { + this.removeValue(node); + + if (this.autoDeselectAncestors) { + node.ancestors.forEach(function (ancestor) { + if (_this22.isSelected(ancestor) && !ancestor.isDisabled) _this22.removeValue(ancestor); + }); + } else if (this.autoDeselectDescendants) { + this.traverseDescendantsBFS(node, function (descendant) { + if (_this22.isSelected(descendant) && !descendant.isDisabled) _this22.removeValue(descendant); + }); + } + + return; + } + + var hasUncheckedSomeDescendants = false; + + if (node.isBranch) { + this.traverseDescendantsDFS(node, function (descendant) { + if (!descendant.isDisabled || _this22.allowSelectingDisabledDescendants) { + _this22.removeValue(descendant); + + hasUncheckedSomeDescendants = true; + } + }); + } + + if (node.isLeaf || hasUncheckedSomeDescendants || node.children.length === 0) { + this.removeValue(node); + var curr = node; + + while ((curr = curr.parentNode) !== NO_PARENT_NODE) { + if (this.isSelected(curr)) this.removeValue(curr);else break; + } + } + }, + addValue: function addValue(node) { + this.forest.selectedNodeIds.push(node.id); + this.forest.selectedNodeMap[node.id] = true; + }, + removeValue: function removeValue(node) { + removeFromArray(this.forest.selectedNodeIds, node.id); + delete this.forest.selectedNodeMap[node.id]; + }, + removeLastValue: function removeLastValue() { + if (!this.hasValue) return; + if (this.single) return this.clear(); + var lastValue = last_default()(this.internalValue); + var lastSelectedNode = this.getNode(lastValue); + this.select(lastSelectedNode); + }, + saveMenuScrollPosition: function saveMenuScrollPosition() { + var $menu = this.getMenu(); + if ($menu) this.menu.lastScrollPosition = $menu.scrollTop; + }, + restoreMenuScrollPosition: function restoreMenuScrollPosition() { + var $menu = this.getMenu(); + if ($menu) $menu.scrollTop = this.menu.lastScrollPosition; + } + }, + created: function created() { + this.verifyProps(); + this.resetFlags(); + }, + mounted: function mounted() { + if (this.autoFocus) this.focusInput(); + if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions(); + if (this.alwaysOpen) this.openMenu(); + if (this.async && this.defaultOptions) this.handleRemoteSearch(); + }, + destroyed: function destroyed() { + this.toggleClickOutsideEvent(false); + } +}); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HiddenFields.vue?vue&type=script&lang=js& + + +function stringifyValue(value) { + if (typeof value === 'string') return value; + if (value != null && !isNaN_isNaN(value)) return JSON.stringify(value); + return ''; +} + +/* harmony default export */ var HiddenFieldsvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--hidden-fields', + inject: ['instance'], + functional: true, + render: function render(_, context) { + var h = arguments[0]; + var instance = context.injections.instance; + if (!instance.name || instance.disabled || !instance.hasValue) return null; + var stringifiedValues = instance.internalValue.map(stringifyValue); + if (instance.multiple && instance.joinValues) stringifiedValues = [stringifiedValues.join(instance.delimiter)]; + return stringifiedValues.map(function (stringifiedValue, i) { + return h("input", { + attrs: { + type: "hidden", + name: instance.name + }, + domProps: { + "value": stringifiedValue + }, + key: 'hidden-field-' + i + }); + }); + } +}); +// CONCATENATED MODULE: ./src/components/HiddenFields.vue?vue&type=script&lang=js& + /* harmony default export */ var components_HiddenFieldsvue_type_script_lang_js_ = (HiddenFieldsvue_type_script_lang_js_); +// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. + +function normalizeComponent ( + scriptExports, + render, + staticRenderFns, + functionalTemplate, + injectStyles, + scopeId, + moduleIdentifier, /* server only */ + shadowMode /* vue-cli only */ +) { + // Vue.extend constructor export interop + var options = typeof scriptExports === 'function' + ? scriptExports.options + : scriptExports + + // render functions + if (render) { + options.render = render + options.staticRenderFns = staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true + } + + // scopedId + if (scopeId) { + options._scopeId = 'data-v-' + scopeId + } + + var hook + if (moduleIdentifier) { // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = shadowMode + ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } + : injectStyles + } + + if (hook) { + if (options.functional) { + // for template-only hot-reload because in that case the render fn doesn't + // go through the normalizer + options._injectStyles = hook + // register for functional component in vue file + var originalRender = options.render + options.render = function renderWithStyleInjection (h, context) { + hook.call(context) + return originalRender(h, context) + } + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate + options.beforeCreate = existing + ? [].concat(existing, hook) + : [hook] + } + } + + return { + exports: scriptExports, + options: options + } +} + +// CONCATENATED MODULE: ./src/components/HiddenFields.vue +var HiddenFields_render, staticRenderFns + + + + +/* normalize component */ + +var component = normalizeComponent( + components_HiddenFieldsvue_type_script_lang_js_, + HiddenFields_render, + staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/components/HiddenFields.vue" +/* harmony default export */ var HiddenFields = (component.exports); +// EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props" +var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(13); +var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Input.vue?vue&type=script&lang=js& + + + +var keysThatRequireMenuBeingOpen = [KEY_CODES.ENTER, KEY_CODES.END, KEY_CODES.HOME, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN]; +/* harmony default export */ var Inputvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--input', + inject: ['instance'], + data: function data() { + return { + inputWidth: MIN_INPUT_WIDTH, + value: '' + }; + }, + computed: { + needAutoSize: function needAutoSize() { + var instance = this.instance; + return instance.searchable && !instance.disabled && instance.multiple; + }, + inputStyle: function inputStyle() { + return { + width: this.needAutoSize ? "".concat(this.inputWidth, "px") : null + }; + } + }, + watch: { + 'instance.trigger.searchQuery': function instanceTriggerSearchQuery(newValue) { + this.value = newValue; + }, + value: function value() { + if (this.needAutoSize) this.$nextTick(this.updateInputWidth); + } + }, + created: function created() { + this.debouncedCallback = debounce_default()(this.updateSearchQuery, this.instance.inputDebounceDelay, { + leading: false, + trailing: true + }); + }, + methods: { + clear: function clear() { + this.onInput({ + target: { + value: '' + } + }); + }, + focus: function focus() { + var instance = this.instance; + + if (!instance.disabled) { + this.$refs.input && this.$refs.input.focus(); + } + }, + blur: function blur() { + this.$refs.input && this.$refs.input.blur(); + }, + onFocus: function onFocus() { + var instance = this.instance; + instance.trigger.isFocused = true; + if (instance.openOnFocus) instance.openMenu(); + }, + onBlur: function onBlur() { + var instance = this.instance; + var menu = instance.getMenu(); + + if (menu && document.activeElement === menu) { + return this.focus(); + } + + instance.trigger.isFocused = false; + instance.closeMenu(); + }, + onInput: function onInput(evt) { + var value = evt.target.value; + this.value = value; + + if (value) { + this.debouncedCallback(); + } else { + this.debouncedCallback.cancel(); + this.updateSearchQuery(); + } + }, + onKeyDown: function onKeyDown(evt) { + var instance = this.instance; + var key = 'which' in evt ? evt.which : evt.keyCode; + if (evt.ctrlKey || evt.shiftKey || evt.altKey || evt.metaKey) return; + + if (!instance.menu.isOpen && includes(keysThatRequireMenuBeingOpen, key)) { + evt.preventDefault(); + return instance.openMenu(); + } + + switch (key) { + case KEY_CODES.BACKSPACE: + { + if (instance.backspaceRemoves && !this.value.length) { + instance.removeLastValue(); + } + + break; + } + + case KEY_CODES.ENTER: + { + evt.preventDefault(); + if (instance.menu.current === null) return; + var current = instance.getNode(instance.menu.current); + if (current.isBranch && instance.disableBranchNodes) return; + instance.select(current); + break; + } + + case KEY_CODES.ESCAPE: + { + if (this.value.length) { + this.clear(); + } else if (instance.menu.isOpen) { + instance.closeMenu(); + } + + break; + } + + case KEY_CODES.END: + { + evt.preventDefault(); + instance.highlightLastOption(); + break; + } + + case KEY_CODES.HOME: + { + evt.preventDefault(); + instance.highlightFirstOption(); + break; + } + + case KEY_CODES.ARROW_LEFT: + { + var _current = instance.getNode(instance.menu.current); + + if (_current.isBranch && instance.shouldExpand(_current)) { + evt.preventDefault(); + instance.toggleExpanded(_current); + } else if (!_current.isRootNode && (_current.isLeaf || _current.isBranch && !instance.shouldExpand(_current))) { + evt.preventDefault(); + instance.setCurrentHighlightedOption(_current.parentNode); + } + + break; + } + + case KEY_CODES.ARROW_UP: + { + evt.preventDefault(); + instance.highlightPrevOption(); + break; + } + + case KEY_CODES.ARROW_RIGHT: + { + var _current2 = instance.getNode(instance.menu.current); + + if (_current2.isBranch && !instance.shouldExpand(_current2)) { + evt.preventDefault(); + instance.toggleExpanded(_current2); + } + + break; + } + + case KEY_CODES.ARROW_DOWN: + { + evt.preventDefault(); + instance.highlightNextOption(); + break; + } + + case KEY_CODES.DELETE: + { + if (instance.deleteRemoves && !this.value.length) { + instance.removeLastValue(); + } + + break; + } + + default: + { + instance.openMenu(); + } + } + }, + onMouseDown: function onMouseDown(evt) { + if (this.value.length) { + evt.stopPropagation(); + } + }, + renderInputContainer: function renderInputContainer() { + var h = this.$createElement; + var instance = this.instance; + var props = {}; + var children = []; + + if (instance.searchable && !instance.disabled) { + children.push(this.renderInput()); + if (this.needAutoSize) children.push(this.renderSizer()); + } + + if (!instance.searchable) { + deepExtend(props, { + on: { + focus: this.onFocus, + blur: this.onBlur, + keydown: this.onKeyDown + }, + ref: 'input' + }); + } + + if (!instance.searchable && !instance.disabled) { + deepExtend(props, { + attrs: { + tabIndex: instance.tabIndex + } + }); + } + + return h("div", external_babel_helper_vue_jsx_merge_props_default()([{ + "class": "vue-treeselect__input-container" + }, props]), [children]); + }, + renderInput: function renderInput() { + var h = this.$createElement; + var instance = this.instance; + return h("input", { + ref: "input", + "class": "vue-treeselect__input", + attrs: { + type: "text", + autocomplete: "off", + tabIndex: instance.tabIndex, + required: instance.required && !instance.hasValue + }, + domProps: { + "value": this.value + }, + style: this.inputStyle, + on: { + "focus": this.onFocus, + "input": this.onInput, + "blur": this.onBlur, + "keydown": this.onKeyDown, + "mousedown": this.onMouseDown + } + }); + }, + renderSizer: function renderSizer() { + var h = this.$createElement; + return h("div", { + ref: "sizer", + "class": "vue-treeselect__sizer" + }, [this.value]); + }, + updateInputWidth: function updateInputWidth() { + this.inputWidth = Math.max(MIN_INPUT_WIDTH, this.$refs.sizer.scrollWidth + 15); + }, + updateSearchQuery: function updateSearchQuery() { + var instance = this.instance; + instance.trigger.searchQuery = this.value; + } + }, + render: function render() { + return this.renderInputContainer(); + } +}); +// CONCATENATED MODULE: ./src/components/Input.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Inputvue_type_script_lang_js_ = (Inputvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Input.vue +var Input_render, Input_staticRenderFns + + + + +/* normalize component */ + +var Input_component = normalizeComponent( + components_Inputvue_type_script_lang_js_, + Input_render, + Input_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Input_api; } +Input_component.options.__file = "src/components/Input.vue" +/* harmony default export */ var Input = (Input_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Placeholder.vue?vue&type=script&lang=js& +/* harmony default export */ var Placeholdervue_type_script_lang_js_ = ({ + name: 'vue-treeselect--placeholder', + inject: ['instance'], + render: function render() { + var h = arguments[0]; + var instance = this.instance; + var placeholderClass = { + 'vue-treeselect__placeholder': true, + 'vue-treeselect-helper-zoom-effect-off': true, + 'vue-treeselect-helper-hide': instance.hasValue || instance.trigger.searchQuery + }; + return h("div", { + "class": placeholderClass + }, [instance.placeholder]); + } +}); +// CONCATENATED MODULE: ./src/components/Placeholder.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Placeholdervue_type_script_lang_js_ = (Placeholdervue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Placeholder.vue +var Placeholder_render, Placeholder_staticRenderFns + + + + +/* normalize component */ + +var Placeholder_component = normalizeComponent( + components_Placeholdervue_type_script_lang_js_, + Placeholder_render, + Placeholder_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Placeholder_api; } +Placeholder_component.options.__file = "src/components/Placeholder.vue" +/* harmony default export */ var Placeholder = (Placeholder_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SingleValue.vue?vue&type=script&lang=js& + + +/* harmony default export */ var SingleValuevue_type_script_lang_js_ = ({ + name: 'vue-treeselect--single-value', + inject: ['instance'], + methods: { + renderSingleValueLabel: function renderSingleValueLabel() { + var instance = this.instance; + var node = instance.selectedNodes[0]; + var customValueLabelRenderer = instance.$scopedSlots['value-label']; + return customValueLabelRenderer ? customValueLabelRenderer({ + node: node + }) : node.label; + } + }, + render: function render() { + var h = arguments[0]; + var instance = this.instance, + renderValueContainer = this.$parent.renderValueContainer; + var shouldShowValue = instance.hasValue && !instance.trigger.searchQuery; + return renderValueContainer([shouldShowValue && h("div", { + "class": "vue-treeselect__single-value" + }, [this.renderSingleValueLabel()]), h(Placeholder), h(Input, { + ref: "input" + })]); + } +}); +// CONCATENATED MODULE: ./src/components/SingleValue.vue?vue&type=script&lang=js& + /* harmony default export */ var components_SingleValuevue_type_script_lang_js_ = (SingleValuevue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/SingleValue.vue +var SingleValue_render, SingleValue_staticRenderFns + + + + +/* normalize component */ + +var SingleValue_component = normalizeComponent( + components_SingleValuevue_type_script_lang_js_, + SingleValue_render, + SingleValue_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var SingleValue_api; } +SingleValue_component.options.__file = "src/components/SingleValue.vue" +/* harmony default export */ var SingleValue = (SingleValue_component.exports); +// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=template&id=364b6320& +var Deletevue_type_template_id_364b6320_render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "svg", + { + attrs: { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 348.333 348.333" + } + }, + [ + _c("path", { + attrs: { + d: + "M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z" + } + }) + ] + ) +} +var Deletevue_type_template_id_364b6320_staticRenderFns = [] +Deletevue_type_template_id_364b6320_render._withStripped = true + + +// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=template&id=364b6320& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=script&lang=js& +/* harmony default export */ var Deletevue_type_script_lang_js_ = ({ + name: 'vue-treeselect--x' +}); +// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=script&lang=js& + /* harmony default export */ var icons_Deletevue_type_script_lang_js_ = (Deletevue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/icons/Delete.vue + + + + + +/* normalize component */ + +var Delete_component = normalizeComponent( + icons_Deletevue_type_script_lang_js_, + Deletevue_type_template_id_364b6320_render, + Deletevue_type_template_id_364b6320_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Delete_api; } +Delete_component.options.__file = "src/components/icons/Delete.vue" +/* harmony default export */ var Delete = (Delete_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValueItem.vue?vue&type=script&lang=js& + + +/* harmony default export */ var MultiValueItemvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--multi-value-item', + inject: ['instance'], + props: { + node: { + type: Object, + required: true + } + }, + methods: { + handleMouseDown: onLeftClick(function handleMouseDown() { + var instance = this.instance, + node = this.node; + instance.select(node); + }) + }, + render: function render() { + var h = arguments[0]; + var instance = this.instance, + node = this.node; + var itemClass = { + 'vue-treeselect__multi-value-item': true, + 'vue-treeselect__multi-value-item-disabled': node.isDisabled, + 'vue-treeselect__multi-value-item-new': node.isNew + }; + var customValueLabelRenderer = instance.$scopedSlots['value-label']; + var labelRenderer = customValueLabelRenderer ? customValueLabelRenderer({ + node: node + }) : node.label; + return h("div", { + "class": "vue-treeselect__multi-value-item-container" + }, [h("div", { + "class": itemClass, + on: { + "mousedown": this.handleMouseDown + } + }, [h("span", { + "class": "vue-treeselect__multi-value-label" + }, [labelRenderer]), h("span", { + "class": "vue-treeselect__icon vue-treeselect__value-remove" + }, [h(Delete)])])]); + } +}); +// CONCATENATED MODULE: ./src/components/MultiValueItem.vue?vue&type=script&lang=js& + /* harmony default export */ var components_MultiValueItemvue_type_script_lang_js_ = (MultiValueItemvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/MultiValueItem.vue +var MultiValueItem_render, MultiValueItem_staticRenderFns + + + + +/* normalize component */ + +var MultiValueItem_component = normalizeComponent( + components_MultiValueItemvue_type_script_lang_js_, + MultiValueItem_render, + MultiValueItem_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var MultiValueItem_api; } +MultiValueItem_component.options.__file = "src/components/MultiValueItem.vue" +/* harmony default export */ var MultiValueItem = (MultiValueItem_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValue.vue?vue&type=script&lang=js& + + + + +/* harmony default export */ var MultiValuevue_type_script_lang_js_ = ({ + name: 'vue-treeselect--multi-value', + inject: ['instance'], + methods: { + renderMultiValueItems: function renderMultiValueItems() { + var h = this.$createElement; + var instance = this.instance; + return instance.internalValue.slice(0, instance.limit).map(instance.getNode).map(function (node) { + return h(MultiValueItem, { + key: "multi-value-item-".concat(node.id), + attrs: { + node: node + } + }); + }); + }, + renderExceedLimitTip: function renderExceedLimitTip() { + var h = this.$createElement; + var instance = this.instance; + var count = instance.internalValue.length - instance.limit; + if (count <= 0) return null; + return h("div", { + "class": "vue-treeselect__limit-tip vue-treeselect-helper-zoom-effect-off", + key: "exceed-limit-tip" + }, [h("span", { + "class": "vue-treeselect__limit-tip-text" + }, [instance.limitText(count)])]); + } + }, + render: function render() { + var h = arguments[0]; + var renderValueContainer = this.$parent.renderValueContainer; + var transitionGroupProps = { + props: { + tag: 'div', + name: 'vue-treeselect__multi-value-item--transition', + appear: true + } + }; + return renderValueContainer(h("transition-group", external_babel_helper_vue_jsx_merge_props_default()([{ + "class": "vue-treeselect__multi-value" + }, transitionGroupProps]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), h(Placeholder, { + key: "placeholder" + }), h(Input, { + ref: "input", + key: "input" + })])); + } +}); +// CONCATENATED MODULE: ./src/components/MultiValue.vue?vue&type=script&lang=js& + /* harmony default export */ var components_MultiValuevue_type_script_lang_js_ = (MultiValuevue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/MultiValue.vue +var MultiValue_render, MultiValue_staticRenderFns + + + + +/* normalize component */ + +var MultiValue_component = normalizeComponent( + components_MultiValuevue_type_script_lang_js_, + MultiValue_render, + MultiValue_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var MultiValue_api; } +MultiValue_component.options.__file = "src/components/MultiValue.vue" +/* harmony default export */ var MultiValue = (MultiValue_component.exports); +// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4& +var Arrowvue_type_template_id_11186cd4_render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "svg", + { + attrs: { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 292.362 292.362" + } + }, + [ + _c("path", { + attrs: { + d: + "M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z" + } + }) + ] + ) +} +var Arrowvue_type_template_id_11186cd4_staticRenderFns = [] +Arrowvue_type_template_id_11186cd4_render._withStripped = true + + +// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=script&lang=js& +/* harmony default export */ var Arrowvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--arrow' +}); +// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=script&lang=js& + /* harmony default export */ var icons_Arrowvue_type_script_lang_js_ = (Arrowvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/icons/Arrow.vue + + + + + +/* normalize component */ + +var Arrow_component = normalizeComponent( + icons_Arrowvue_type_script_lang_js_, + Arrowvue_type_template_id_11186cd4_render, + Arrowvue_type_template_id_11186cd4_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Arrow_api; } +Arrow_component.options.__file = "src/components/icons/Arrow.vue" +/* harmony default export */ var Arrow = (Arrow_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Control.vue?vue&type=script&lang=js& + + + + + +/* harmony default export */ var Controlvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--control', + inject: ['instance'], + computed: { + shouldShowX: function shouldShowX() { + var instance = this.instance; + return instance.clearable && !instance.disabled && instance.hasValue && (this.hasUndisabledValue || instance.allowClearingDisabled); + }, + shouldShowArrow: function shouldShowArrow() { + var instance = this.instance; + if (!instance.alwaysOpen) return true; + return !instance.menu.isOpen; + }, + hasUndisabledValue: function hasUndisabledValue() { + var instance = this.instance; + return instance.hasValue && instance.internalValue.some(function (id) { + return !instance.getNode(id).isDisabled; + }); + } + }, + methods: { + renderX: function renderX() { + var h = this.$createElement; + var instance = this.instance; + var title = instance.multiple ? instance.clearAllText : instance.clearValueText; + if (!this.shouldShowX) return null; + return h("div", { + "class": "vue-treeselect__x-container", + attrs: { + title: title + }, + on: { + "mousedown": this.handleMouseDownOnX + } + }, [h(Delete, { + "class": "vue-treeselect__x" + })]); + }, + renderArrow: function renderArrow() { + var h = this.$createElement; + var instance = this.instance; + var arrowClass = { + 'vue-treeselect__control-arrow': true, + 'vue-treeselect__control-arrow--rotated': instance.menu.isOpen + }; + if (!this.shouldShowArrow) return null; + return h("div", { + "class": "vue-treeselect__control-arrow-container", + on: { + "mousedown": this.handleMouseDownOnArrow + } + }, [h(Arrow, { + "class": arrowClass + })]); + }, + handleMouseDownOnX: onLeftClick(function handleMouseDownOnX(evt) { + evt.stopPropagation(); + evt.preventDefault(); + var instance = this.instance; + var result = instance.beforeClearAll(); + + var handler = function handler(shouldClear) { + if (shouldClear) instance.clear(); + }; + + if (external_is_promise_default()(result)) { + result.then(handler); + } else { + setTimeout(function () { + return handler(result); + }, 0); + } + }), + handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnArrow(evt) { + evt.preventDefault(); + evt.stopPropagation(); + var instance = this.instance; + instance.focusInput(); + instance.toggleMenu(); + }), + renderValueContainer: function renderValueContainer(children) { + var h = this.$createElement; + return h("div", { + "class": "vue-treeselect__value-container" + }, [children]); + } + }, + render: function render() { + var h = arguments[0]; + var instance = this.instance; + var ValueContainer = instance.single ? SingleValue : MultiValue; + return h("div", { + "class": "vue-treeselect__control", + on: { + "mousedown": instance.handleMouseDown + } + }, [h(ValueContainer, { + ref: "value-container" + }), this.renderX(), this.renderArrow()]); + } +}); +// CONCATENATED MODULE: ./src/components/Control.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Controlvue_type_script_lang_js_ = (Controlvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Control.vue +var Control_render, Control_staticRenderFns + + + + +/* normalize component */ + +var Control_component = normalizeComponent( + components_Controlvue_type_script_lang_js_, + Control_render, + Control_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Control_api; } +Control_component.options.__file = "src/components/Control.vue" +/* harmony default export */ var Control = (Control_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Tip.vue?vue&type=script&lang=js& +/* harmony default export */ var Tipvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--tip', + functional: true, + props: { + type: { + type: String, + required: true + }, + icon: { + type: String, + required: true + } + }, + render: function render(_, context) { + var h = arguments[0]; + var props = context.props, + children = context.children; + return h("div", { + "class": "vue-treeselect__tip vue-treeselect__".concat(props.type, "-tip") + }, [h("div", { + "class": "vue-treeselect__icon-container" + }, [h("span", { + "class": "vue-treeselect__icon-".concat(props.icon) + })]), h("span", { + "class": "vue-treeselect__tip-text vue-treeselect__".concat(props.type, "-tip-text") + }, [children])]); + } +}); +// CONCATENATED MODULE: ./src/components/Tip.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Tipvue_type_script_lang_js_ = (Tipvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Tip.vue +var Tip_render, Tip_staticRenderFns + + + + +/* normalize component */ + +var Tip_component = normalizeComponent( + components_Tipvue_type_script_lang_js_, + Tip_render, + Tip_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Tip_api; } +Tip_component.options.__file = "src/components/Tip.vue" +/* harmony default export */ var Tip = (Tip_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Option.vue?vue&type=script&lang=js& + + + + + +var arrowPlaceholder, checkMark, minusMark; +var Option = { + name: 'vue-treeselect--option', + inject: ['instance'], + props: { + node: { + type: Object, + required: true + } + }, + computed: { + shouldExpand: function shouldExpand() { + var instance = this.instance, + node = this.node; + return node.isBranch && instance.shouldExpand(node); + }, + shouldShow: function shouldShow() { + var instance = this.instance, + node = this.node; + return instance.shouldShowOptionInMenu(node); + } + }, + methods: { + renderOption: function renderOption() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + var optionClass = { + 'vue-treeselect__option': true, + 'vue-treeselect__option--disabled': node.isDisabled, + 'vue-treeselect__option--selected': instance.isSelected(node), + 'vue-treeselect__option--highlight': node.isHighlighted, + 'vue-treeselect__option--matched': instance.localSearch.active && node.isMatched, + 'vue-treeselect__option--hide': !this.shouldShow + }; + return h("div", { + "class": optionClass, + on: { + "mouseenter": this.handleMouseEnterOption + }, + attrs: { + "data-id": node.id + } + }, [this.renderArrow(), this.renderLabelContainer([this.renderCheckboxContainer([this.renderCheckbox()]), this.renderLabel()])]); + }, + renderSubOptionsList: function renderSubOptionsList() { + var h = this.$createElement; + if (!this.shouldExpand) return null; + return h("div", { + "class": "vue-treeselect__list" + }, [this.renderSubOptions(), this.renderNoChildrenTip(), this.renderLoadingChildrenTip(), this.renderLoadingChildrenErrorTip()]); + }, + renderArrow: function renderArrow() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (instance.shouldFlattenOptions && this.shouldShow) return null; + + if (node.isBranch) { + var transitionProps = { + props: { + name: 'vue-treeselect__option-arrow--prepare', + appear: true + } + }; + var arrowClass = { + 'vue-treeselect__option-arrow': true, + 'vue-treeselect__option-arrow--rotated': this.shouldExpand + }; + return h("div", { + "class": "vue-treeselect__option-arrow-container", + on: { + "mousedown": this.handleMouseDownOnArrow + } + }, [h("transition", transitionProps, [h(Arrow, { + "class": arrowClass + })])]); + } + + if (instance.hasBranchNodes) { + if (!arrowPlaceholder) arrowPlaceholder = h("div", { + "class": "vue-treeselect__option-arrow-placeholder" + }, ["\xA0"]); + return arrowPlaceholder; + } + + return null; + }, + renderLabelContainer: function renderLabelContainer(children) { + var h = this.$createElement; + return h("div", { + "class": "vue-treeselect__label-container", + on: { + "mousedown": this.handleMouseDownOnLabelContainer + } + }, [children]); + }, + renderCheckboxContainer: function renderCheckboxContainer(children) { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (instance.single) return null; + if (instance.disableBranchNodes && node.isBranch) return null; + return h("div", { + "class": "vue-treeselect__checkbox-container" + }, [children]); + }, + renderCheckbox: function renderCheckbox() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + var checkedState = instance.forest.checkedStateMap[node.id]; + var checkboxClass = { + 'vue-treeselect__checkbox': true, + 'vue-treeselect__checkbox--checked': checkedState === CHECKED, + 'vue-treeselect__checkbox--indeterminate': checkedState === INDETERMINATE, + 'vue-treeselect__checkbox--unchecked': checkedState === UNCHECKED, + 'vue-treeselect__checkbox--disabled': node.isDisabled + }; + if (!checkMark) checkMark = h("span", { + "class": "vue-treeselect__check-mark" + }); + if (!minusMark) minusMark = h("span", { + "class": "vue-treeselect__minus-mark" + }); + return h("span", { + "class": checkboxClass + }, [checkMark, minusMark]); + }, + renderLabel: function renderLabel() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + var shouldShowCount = node.isBranch && (instance.localSearch.active ? instance.showCountOnSearchComputed : instance.showCount); + var count = shouldShowCount ? instance.localSearch.active ? instance.localSearch.countMap[node.id][instance.showCountOf] : node.count[instance.showCountOf] : NaN; + var labelClassName = 'vue-treeselect__label'; + var countClassName = 'vue-treeselect__count'; + var customLabelRenderer = instance.$scopedSlots['option-label']; + if (customLabelRenderer) return customLabelRenderer({ + node: node, + shouldShowCount: shouldShowCount, + count: count, + labelClassName: labelClassName, + countClassName: countClassName + }); + return h("label", { + "class": labelClassName + }, [node.label, shouldShowCount && h("span", { + "class": countClassName + }, ["(", count, ")"])]); + }, + renderSubOptions: function renderSubOptions() { + var h = this.$createElement; + var node = this.node; + if (!node.childrenStates.isLoaded) return null; + return node.children.map(function (childNode) { + return h(Option, { + attrs: { + node: childNode + }, + key: childNode.id + }); + }); + }, + renderNoChildrenTip: function renderNoChildrenTip() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (!node.childrenStates.isLoaded || node.children.length) return null; + return h(Tip, { + attrs: { + type: "no-children", + icon: "warning" + } + }, [instance.noChildrenText]); + }, + renderLoadingChildrenTip: function renderLoadingChildrenTip() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (!node.childrenStates.isLoading) return null; + return h(Tip, { + attrs: { + type: "loading", + icon: "loader" + } + }, [instance.loadingText]); + }, + renderLoadingChildrenErrorTip: function renderLoadingChildrenErrorTip() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (!node.childrenStates.loadingError) return null; + return h(Tip, { + attrs: { + type: "error", + icon: "error" + } + }, [node.childrenStates.loadingError, h("a", { + "class": "vue-treeselect__retry", + attrs: { + title: instance.retryTitle + }, + on: { + "mousedown": this.handleMouseDownOnRetry + } + }, [instance.retryText])]); + }, + handleMouseEnterOption: function handleMouseEnterOption(evt) { + var instance = this.instance, + node = this.node; + if (evt.target !== evt.currentTarget) return; + instance.setCurrentHighlightedOption(node, false); + }, + handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnOptionArrow() { + var instance = this.instance, + node = this.node; + instance.toggleExpanded(node); + }), + handleMouseDownOnLabelContainer: onLeftClick(function handleMouseDownOnLabelContainer() { + var instance = this.instance, + node = this.node; + + if (node.isBranch && instance.disableBranchNodes) { + instance.toggleExpanded(node); + } else { + instance.select(node); + } + }), + handleMouseDownOnRetry: onLeftClick(function handleMouseDownOnRetry() { + var instance = this.instance, + node = this.node; + instance.loadChildrenOptions(node); + }) + }, + render: function render() { + var _this = this; + + var h = arguments[0]; + var node = this.node; + var indentLevel = this.instance.shouldFlattenOptions ? 0 : node.level; + + var listItemClass = defineProperty_default()({ + 'vue-treeselect__list-item': true + }, "vue-treeselect__indent-level-".concat(indentLevel), true); + + var transitionProps = { + props: { + name: 'vue-treeselect__list--transition' + } + }; + var isSelected = false; + this.instance.selectedNodes.some(function (e) { + return e.id === _this.node.id; + }); + isSelected = "".concat(isSelected); + console.log(); + return h("div", { + "class": listItemClass, + attrs: { + role: "option", + tabindex: "0", + "aria-selected": ariaSelected + } + }, [this.renderOption(), node.isBranch && h("transition", transitionProps, [this.renderSubOptionsList()])]); + } +}; +/* harmony default export */ var Optionvue_type_script_lang_js_ = (Option); +// CONCATENATED MODULE: ./src/components/Option.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Optionvue_type_script_lang_js_ = (Optionvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Option.vue +var Option_render, Option_staticRenderFns + + + + +/* normalize component */ + +var Option_component = normalizeComponent( + components_Optionvue_type_script_lang_js_, + Option_render, + Option_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Option_api; } +Option_component.options.__file = "src/components/Option.vue" +/* harmony default export */ var components_Option = (Option_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Menu.vue?vue&type=script&lang=js& + + + + +var directionMap = { + top: 'top', + bottom: 'bottom', + above: 'top', + below: 'bottom' +}; +/* harmony default export */ var Menuvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--menu', + inject: ['instance'], + computed: { + menuStyle: function menuStyle() { + var instance = this.instance; + return { + maxHeight: instance.maxHeight + 'px' + }; + }, + menuContainerStyle: function menuContainerStyle() { + var instance = this.instance; + return { + zIndex: instance.appendToBody ? null : instance.zIndex + }; + } + }, + watch: { + 'instance.menu.isOpen': function instanceMenuIsOpen(newValue) { + if (newValue) { + this.$nextTick(this.onMenuOpen); + } else { + this.onMenuClose(); + } + } + }, + created: function created() { + this.menuSizeWatcher = null; + this.menuResizeAndScrollEventListeners = null; + }, + mounted: function mounted() { + var instance = this.instance; + if (instance.menu.isOpen) this.$nextTick(this.onMenuOpen); + }, + destroyed: function destroyed() { + this.onMenuClose(); + }, + methods: { + renderMenu: function renderMenu() { + var h = this.$createElement; + var instance = this.instance; + if (!instance.menu.isOpen) return null; + return h("div", { + ref: "menu", + "class": "vue-treeselect__menu", + on: { + "mousedown": instance.handleMouseDown + }, + style: this.menuStyle + }, [this.renderBeforeList(), instance.async ? this.renderAsyncSearchMenuInner() : instance.localSearch.active ? this.renderLocalSearchMenuInner() : this.renderNormalMenuInner(), this.renderAfterList()]); + }, + renderBeforeList: function renderBeforeList() { + var instance = this.instance; + var beforeListRenderer = instance.$scopedSlots['before-list']; + return beforeListRenderer ? beforeListRenderer() : null; + }, + renderAfterList: function renderAfterList() { + var instance = this.instance; + var afterListRenderer = instance.$scopedSlots['after-list']; + return afterListRenderer ? afterListRenderer() : null; + }, + renderNormalMenuInner: function renderNormalMenuInner() { + var instance = this.instance; + + if (instance.rootOptionsStates.isLoading) { + return this.renderLoadingOptionsTip(); + } else if (instance.rootOptionsStates.loadingError) { + return this.renderLoadingRootOptionsErrorTip(); + } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) { + return this.renderNoAvailableOptionsTip(); + } else { + return this.renderOptionList(); + } + }, + renderLocalSearchMenuInner: function renderLocalSearchMenuInner() { + var instance = this.instance; + + if (instance.rootOptionsStates.isLoading) { + return this.renderLoadingOptionsTip(); + } else if (instance.rootOptionsStates.loadingError) { + return this.renderLoadingRootOptionsErrorTip(); + } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) { + return this.renderNoAvailableOptionsTip(); + } else if (instance.localSearch.noResults) { + return this.renderNoResultsTip(); + } else { + return this.renderOptionList(); + } + }, + renderAsyncSearchMenuInner: function renderAsyncSearchMenuInner() { + var instance = this.instance; + var entry = instance.getRemoteSearchEntry(); + var shouldShowSearchPromptTip = instance.trigger.searchQuery === '' && !instance.defaultOptions; + var shouldShowNoResultsTip = shouldShowSearchPromptTip ? false : entry.isLoaded && entry.options.length === 0; + + if (shouldShowSearchPromptTip) { + return this.renderSearchPromptTip(); + } else if (entry.isLoading) { + return this.renderLoadingOptionsTip(); + } else if (entry.loadingError) { + return this.renderAsyncSearchLoadingErrorTip(); + } else if (shouldShowNoResultsTip) { + return this.renderNoResultsTip(); + } else { + return this.renderOptionList(); + } + }, + renderOptionList: function renderOptionList() { + var h = this.$createElement; + var instance = this.instance; + return h("div", { + "class": "vue-treeselect__list", + attrs: { + role: "listbox", + tabindex: "-1" + } + }, [instance.forest.normalizedOptions.map(function (rootNode) { + return h(components_Option, { + attrs: { + node: rootNode + }, + key: rootNode.id + }); + })]); + }, + renderSearchPromptTip: function renderSearchPromptTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "search-prompt", + icon: "warning" + } + }, [instance.searchPromptText]); + }, + renderLoadingOptionsTip: function renderLoadingOptionsTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "loading", + icon: "loader" + } + }, [instance.loadingText]); + }, + renderLoadingRootOptionsErrorTip: function renderLoadingRootOptionsErrorTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "error", + icon: "error" + } + }, [instance.rootOptionsStates.loadingError, h("a", { + "class": "vue-treeselect__retry", + on: { + "click": instance.loadRootOptions + }, + attrs: { + title: instance.retryTitle + } + }, [instance.retryText])]); + }, + renderAsyncSearchLoadingErrorTip: function renderAsyncSearchLoadingErrorTip() { + var h = this.$createElement; + var instance = this.instance; + var entry = instance.getRemoteSearchEntry(); + return h(Tip, { + attrs: { + type: "error", + icon: "error" + } + }, [entry.loadingError, h("a", { + "class": "vue-treeselect__retry", + on: { + "click": instance.handleRemoteSearch + }, + attrs: { + title: instance.retryTitle + } + }, [instance.retryText])]); + }, + renderNoAvailableOptionsTip: function renderNoAvailableOptionsTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "no-options", + icon: "warning" + } + }, [instance.noOptionsText]); + }, + renderNoResultsTip: function renderNoResultsTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "no-results", + icon: "warning" + } + }, [instance.noResultsText]); + }, + onMenuOpen: function onMenuOpen() { + this.adjustMenuOpenDirection(); + this.setupMenuSizeWatcher(); + this.setupMenuResizeAndScrollEventListeners(); + }, + onMenuClose: function onMenuClose() { + this.removeMenuSizeWatcher(); + this.removeMenuResizeAndScrollEventListeners(); + }, + adjustMenuOpenDirection: function adjustMenuOpenDirection() { + var instance = this.instance; + if (!instance.menu.isOpen) return; + var $menu = instance.getMenu(); + var $control = instance.getControl(); + var menuRect = $menu.getBoundingClientRect(); + var controlRect = $control.getBoundingClientRect(); + var menuHeight = menuRect.height; + var viewportHeight = window.innerHeight; + var spaceAbove = controlRect.top; + var spaceBelow = window.innerHeight - controlRect.bottom; + var isControlInViewport = controlRect.top >= 0 && controlRect.top <= viewportHeight || controlRect.top < 0 && controlRect.bottom > 0; + var hasEnoughSpaceBelow = spaceBelow > menuHeight + MENU_BUFFER; + var hasEnoughSpaceAbove = spaceAbove > menuHeight + MENU_BUFFER; + + if (!isControlInViewport) { + instance.closeMenu(); + } else if (instance.openDirection !== 'auto') { + instance.menu.placement = directionMap[instance.openDirection]; + } else if (hasEnoughSpaceBelow || !hasEnoughSpaceAbove) { + instance.menu.placement = 'bottom'; + } else { + instance.menu.placement = 'top'; + } + }, + setupMenuSizeWatcher: function setupMenuSizeWatcher() { + var instance = this.instance; + var $menu = instance.getMenu(); + if (this.menuSizeWatcher) return; + this.menuSizeWatcher = { + remove: watchSize($menu, this.adjustMenuOpenDirection) + }; + }, + setupMenuResizeAndScrollEventListeners: function setupMenuResizeAndScrollEventListeners() { + var instance = this.instance; + var $control = instance.getControl(); + if (this.menuResizeAndScrollEventListeners) return; + this.menuResizeAndScrollEventListeners = { + remove: setupResizeAndScrollEventListeners($control, this.adjustMenuOpenDirection) + }; + }, + removeMenuSizeWatcher: function removeMenuSizeWatcher() { + if (!this.menuSizeWatcher) return; + this.menuSizeWatcher.remove(); + this.menuSizeWatcher = null; + }, + removeMenuResizeAndScrollEventListeners: function removeMenuResizeAndScrollEventListeners() { + if (!this.menuResizeAndScrollEventListeners) return; + this.menuResizeAndScrollEventListeners.remove(); + this.menuResizeAndScrollEventListeners = null; + } + }, + render: function render() { + var h = arguments[0]; + return h("div", { + ref: "menu-container", + "class": "vue-treeselect__menu-container", + style: this.menuContainerStyle + }, [h("transition", { + attrs: { + name: "vue-treeselect__menu--transition" + } + }, [this.renderMenu()])]); + } +}); +// CONCATENATED MODULE: ./src/components/Menu.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Menuvue_type_script_lang_js_ = (Menuvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Menu.vue +var Menu_render, Menu_staticRenderFns + + + + +/* normalize component */ + +var Menu_component = normalizeComponent( + components_Menuvue_type_script_lang_js_, + Menu_render, + Menu_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Menu_api; } +Menu_component.options.__file = "src/components/Menu.vue" +/* harmony default export */ var Menu = (Menu_component.exports); +// EXTERNAL MODULE: external "vue" +var external_vue_ = __webpack_require__(14); +var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MenuPortal.vue?vue&type=script&lang=js& + + +function MenuPortalvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function MenuPortalvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { MenuPortalvue_type_script_lang_js_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { MenuPortalvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + + + + +var PortalTarget = { + name: 'vue-treeselect--portal-target', + inject: ['instance'], + watch: { + 'instance.menu.isOpen': function instanceMenuIsOpen(newValue) { + if (newValue) { + this.setupHandlers(); + } else { + this.removeHandlers(); + } + }, + 'instance.menu.placement': function instanceMenuPlacement() { + this.updateMenuContainerOffset(); + } + }, + created: function created() { + this.controlResizeAndScrollEventListeners = null; + this.controlSizeWatcher = null; + }, + mounted: function mounted() { + var instance = this.instance; + if (instance.menu.isOpen) this.setupHandlers(); + }, + methods: { + setupHandlers: function setupHandlers() { + this.updateWidth(); + this.updateMenuContainerOffset(); + this.setupControlResizeAndScrollEventListeners(); + this.setupControlSizeWatcher(); + }, + removeHandlers: function removeHandlers() { + this.removeControlResizeAndScrollEventListeners(); + this.removeControlSizeWatcher(); + }, + setupControlResizeAndScrollEventListeners: function setupControlResizeAndScrollEventListeners() { + var instance = this.instance; + var $control = instance.getControl(); + if (this.controlResizeAndScrollEventListeners) return; + this.controlResizeAndScrollEventListeners = { + remove: setupResizeAndScrollEventListeners($control, this.updateMenuContainerOffset) + }; + }, + setupControlSizeWatcher: function setupControlSizeWatcher() { + var _this = this; + + var instance = this.instance; + var $control = instance.getControl(); + if (this.controlSizeWatcher) return; + this.controlSizeWatcher = { + remove: watchSize($control, function () { + _this.updateWidth(); + + _this.updateMenuContainerOffset(); + }) + }; + }, + removeControlResizeAndScrollEventListeners: function removeControlResizeAndScrollEventListeners() { + if (!this.controlResizeAndScrollEventListeners) return; + this.controlResizeAndScrollEventListeners.remove(); + this.controlResizeAndScrollEventListeners = null; + }, + removeControlSizeWatcher: function removeControlSizeWatcher() { + if (!this.controlSizeWatcher) return; + this.controlSizeWatcher.remove(); + this.controlSizeWatcher = null; + }, + updateWidth: function updateWidth() { + var instance = this.instance; + var $portalTarget = this.$el; + var $control = instance.getControl(); + var controlRect = $control.getBoundingClientRect(); + $portalTarget.style.width = controlRect.width + 'px'; + }, + updateMenuContainerOffset: function updateMenuContainerOffset() { + var instance = this.instance; + var $control = instance.getControl(); + var $portalTarget = this.$el; + var controlRect = $control.getBoundingClientRect(); + var portalTargetRect = $portalTarget.getBoundingClientRect(); + var offsetY = instance.menu.placement === 'bottom' ? controlRect.height : 0; + var left = Math.round(controlRect.left - portalTargetRect.left) + 'px'; + var top = Math.round(controlRect.top - portalTargetRect.top + offsetY) + 'px'; + var menuContainerStyle = this.$refs.menu.$refs['menu-container'].style; + var transformVariations = ['transform', 'webkitTransform', 'MozTransform', 'msTransform']; + var transform = find(transformVariations, function (t) { + return t in document.body.style; + }); + menuContainerStyle[transform] = "translate(".concat(left, ", ").concat(top, ")"); + } + }, + render: function render() { + var h = arguments[0]; + var instance = this.instance; + var portalTargetClass = ['vue-treeselect__portal-target', instance.wrapperClass]; + var portalTargetStyle = { + zIndex: instance.zIndex + }; + return h("div", { + "class": portalTargetClass, + style: portalTargetStyle, + attrs: { + "data-instance-id": instance.getInstanceId() + } + }, [h(Menu, { + ref: "menu" + })]); + }, + destroyed: function destroyed() { + this.removeHandlers(); + } +}; +var placeholder; +/* harmony default export */ var MenuPortalvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--menu-portal', + created: function created() { + this.portalTarget = null; + }, + mounted: function mounted() { + this.setup(); + }, + destroyed: function destroyed() { + this.teardown(); + }, + methods: { + setup: function setup() { + var el = document.createElement('div'); + document.body.appendChild(el); + this.portalTarget = new external_vue_default.a(MenuPortalvue_type_script_lang_js_objectSpread({ + el: el, + parent: this + }, PortalTarget)); + }, + teardown: function teardown() { + document.body.removeChild(this.portalTarget.$el); + this.portalTarget.$el.innerHTML = ''; + this.portalTarget.$destroy(); + this.portalTarget = null; + } + }, + render: function render() { + var h = arguments[0]; + if (!placeholder) placeholder = h("div", { + "class": "vue-treeselect__menu-placeholder" + }); + return placeholder; + } +}); +// CONCATENATED MODULE: ./src/components/MenuPortal.vue?vue&type=script&lang=js& + /* harmony default export */ var components_MenuPortalvue_type_script_lang_js_ = (MenuPortalvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/MenuPortal.vue +var MenuPortal_render, MenuPortal_staticRenderFns + + + + +/* normalize component */ + +var MenuPortal_component = normalizeComponent( + components_MenuPortalvue_type_script_lang_js_, + MenuPortal_render, + MenuPortal_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var MenuPortal_api; } +MenuPortal_component.options.__file = "src/components/MenuPortal.vue" +/* harmony default export */ var MenuPortal = (MenuPortal_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Treeselect.vue?vue&type=script&lang=js& + + + + + +/* harmony default export */ var Treeselectvue_type_script_lang_js_ = ({ + name: 'vue-treeselect', + mixins: [treeselectMixin], + computed: { + wrapperClass: function wrapperClass() { + return { + 'vue-treeselect': true, + 'vue-treeselect--single': this.single, + 'vue-treeselect--multi': this.multiple, + 'vue-treeselect--searchable': this.searchable, + 'vue-treeselect--disabled': this.disabled, + 'vue-treeselect--focused': this.trigger.isFocused, + 'vue-treeselect--has-value': this.hasValue, + 'vue-treeselect--open': this.menu.isOpen, + 'vue-treeselect--open-above': this.menu.placement === 'top', + 'vue-treeselect--open-below': this.menu.placement === 'bottom', + 'vue-treeselect--branch-nodes-disabled': this.disableBranchNodes, + 'vue-treeselect--append-to-body': this.appendToBody + }; + } + }, + render: function render() { + var h = arguments[0]; + return h("div", { + ref: "wrapper", + "class": this.wrapperClass + }, [h(HiddenFields), h(Control, { + ref: "control" + }), this.appendToBody ? h(MenuPortal, { + ref: "portal" + }) : h(Menu, { + ref: "menu" + })]); + } +}); +// CONCATENATED MODULE: ./src/components/Treeselect.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Treeselectvue_type_script_lang_js_ = (Treeselectvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Treeselect.vue +var Treeselect_render, Treeselect_staticRenderFns + + + + +/* normalize component */ + +var Treeselect_component = normalizeComponent( + components_Treeselectvue_type_script_lang_js_, + Treeselect_render, + Treeselect_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Treeselect_api; } +Treeselect_component.options.__file = "src/components/Treeselect.vue" +/* harmony default export */ var Treeselect = (Treeselect_component.exports); +// EXTERNAL MODULE: ./src/style.less +var style = __webpack_require__(15); + +// CONCATENATED MODULE: ./src/index.js + + + +/* harmony default export */ var src = __webpack_exports__["default"] = (Treeselect); + + +var VERSION = "0.4.0"; + +/***/ }) +/******/ ]); +//# sourceMappingURL=vue-treeselect.cjs.js.map \ No newline at end of file diff --git a/dist/vue-treeselect.cjs.js.map b/dist/vue-treeselect.cjs.js.map new file mode 100644 index 00000000..24d33d00 --- /dev/null +++ b/dist/vue-treeselect.cjs.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/external \"@babel/runtime/helpers/slicedToArray\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/toConsumableArray\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/defineProperty\"","webpack://VueTreeselect/external \"lodash/noop\"","webpack://VueTreeselect/external \"lodash/debounce\"","webpack://VueTreeselect/external \"watch-size\"","webpack://VueTreeselect/external \"is-promise\"","webpack://VueTreeselect/external \"lodash/once\"","webpack://VueTreeselect/external \"lodash/identity\"","webpack://VueTreeselect/external \"lodash/constant\"","webpack://VueTreeselect/external \"@babel/runtime/helpers/typeof\"","webpack://VueTreeselect/external \"lodash/last\"","webpack://VueTreeselect/external \"fuzzysearch\"","webpack://VueTreeselect/external \"babel-helper-vue-jsx-merge-props\"","webpack://VueTreeselect/external \"vue\"","webpack://VueTreeselect/./src/style.less?1f4a","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/utils/index.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./src/components/HiddenFields.vue?750c","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue?449d","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/Placeholder.vue?238d","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/SingleValue.vue?5aaa","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?ada5","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue?9a1f","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/MultiValue.vue?6f61","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?525a","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Control.vue?57ab","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/./src/components/Tip.vue?5960","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue?0a09","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue?c349","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue?ca92","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/components/Treeselect.vue?85a0","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["warning","process","env","NODE_ENV","noop","checker","complainer","message","concat","console","error","onLeftClick","mouseDownHandler","onMouseDown","evt","type","button","args","call","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","removeFromArray","arr","elem","idx","indexOf","splice","intervalId","registered","INTERVAL_DURATION","run","setInterval","forEach","test","stop","clearInterval","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","unwatch","length","push","watchSize","isIE9","document","documentMode","locked","wrappedListener","implementation","watchSizeForBrowsersOtherThanIE9","removeSizeWatcher","findScrollParents","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","isScrollElment","window","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","addEventListener","passive","scrollParent","removeEventListeners","removeEventListener","$scrollParent","isNaN","x","createMap","Object","create","isPlainObject","value","getPrototypeOf","prototype","copy","obj","key","deepExtend","target","source","keys","i","len","includes","arrOrStr","find","predicate","ctx","undefined","quickDiff","arrA","arrB","NO_PARENT_NODE","UNCHECKED","INDETERMINATE","CHECKED","ALL_CHILDREN","ALL_DESCENDANTS","LEAF_CHILDREN","LEAF_DESCENDANTS","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","ALL","BRANCH_PRIORITY","LEAF_PRIORITY","ALL_WITH_INDETERMINATE","ORDER_SELECTED","LEVEL","INDEX","KEY_CODES","BACKSPACE","ENTER","ESCAPE","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DELETE","INPUT_DEBOUNCE_DELAY","MIN_INPUT_WIDTH","MENU_BUFFER","sortValueByIndex","a","b","level","index","sortValueByLevel","createAsyncOptionsStates","isLoaded","isLoading","loadingError","slugify","str","map","e","o","u","toLowerCase","pattern","replace","RegExp","stringifyOptionPropValue","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","limitTextDefault","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","name","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","acceptableValues","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","hasChanged","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propNames","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","label","enhancedNormalizer","fallbackNode","isFallbackNode","isDisabled","isNew","$set","defaultNode","valueArray","matched","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","isClickedOnValueContainer","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","ref","portal","portalTarget","$menu","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","Treeselect","VERSION","PKG_VERSION"],"mappings":";;;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,iE;;;;;;ACAA,qE;;;;;;ACAA,kE;;;;;;ACAA,wC;;;;;;ACAA,4C;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CAAC,KAAKnD,KAAvB,IAAgC,KAAKE,mBAAzC,EAA8D,KAAKqP,eAAL;AAC9D,QAAI,KAAKzP,UAAT,EAAqB,KAAK4H,QAAL;AACrB,QAAI,KAAK1H,KAAL,IAAc,KAAKoB,cAAvB,EAAuC,KAAKmH,kBAAL;AACxC,GAx2DY;AA02DbuJ,WA12Da,uBA02DD;AAEV,SAAK9G,uBAAL,CAA6B,KAA7B;AACD;AA72DY,CAAf,E;;AC7EA;;AAEA;AACA;AAEA;AAEA;AACA;;AAEA;AACA,uCADA;AAEA,sBAFA;AAGA,kBAHA;AAKA,QALA,kBAKA,CALA,EAKA,OALA,EAKA;AAAA;AAAA,QACA,QADA,GACA,kBADA,CACA,QADA;AAGA;AAEA;AAEA,uEACA,0CADA;AAIA;AAAA,aACA;AAAA;AAAA;AACA;AADA;AAAA;AAAA,mBAEA;AAFA;AAGA;AAHA,QADA;AAAA;AAOA;AAvBA,G;;ACXwN,CAAgB,wHAAG,EAAC,C;;ACA5O;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC5FA,IAAI,mBAAM;AACsD;AACL;;;AAG3D;AAC0F;AAC1F,gBAAgB,kBAAU;AAC1B,EAAE,+CAAM;AACR,EAAE,mBAAM;AACR;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAYf;AACD;AACe,kE;;;;;;;AChCf;AACA;AAEA,oCACA,eADA,EAEA,aAFA,EAGA,cAHA,EAIA,oBAJA,EAKA,kBALA,EAMA,qBANA,EAOA,oBAPA;AAUA;AACA,+BADA;AAEA,sBAFA;AAIA;AAAA;AACA,iCADA;AAEA;AAFA;AAAA,GAJA;AASA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA,uBACA,kBADA,IAEA,iBAHA;AAKA,KATA;AAWA,cAXA,wBAWA;AACA;AACA;AADA;AAGA;AAfA,GATA;AA2BA;AACA,kCADA,sCACA,QADA,EACA;AACA;AACA,KAHA;AAKA,SALA,mBAKA;AAEA;AACA;AARA,GA3BA;AAsCA,SAtCA,qBAsCA;AACA,gDACA,sBADA,EAEA,gCAFA,EAGA;AAAA;AAAA;AAAA,KAHA;AAKA,GA5CA;AA8CA;AACA,SADA,mBACA;AACA;AACA;AAAA;AAAA;AADA;AAGA,KALA;AAOA,SAPA,mBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA;AACA,KAbA;AAeA,QAfA,kBAeA;AACA;AACA,KAjBA;AAmBA,WAnBA,qBAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA;AACA,KAzBA;AA2BA,UA3BA,oBA2BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;;AAIA;AACA;AACA;;AAEA;AACA;AACA,KAvCA;AAyCA,WAzCA,mBAyCA,GAzCA,EAyCA;AAAA,UACA,KADA,GACA,UADA,CACA,KADA;AAGA;;AAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KApDA;AAuDA,aAvDA,qBAuDA,GAvDA,EAuDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAIA;AAEA,oEACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA,aAHA,MAGA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AAEA;AACA;AAvEA;AAyEA,KA9IA;AAgJA,eAhJA,uBAgJA,GAhJA,EAgJA;AAEA;AAGA;AACA;AACA,KAvJA;AAyJA,wBAzJA,kCAyJA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BADA;AAEA,6BAFA;AAGA;AAHA,WADA;AAMA;AANA;AAQA;;AAEA;AACA;AACA;AACA;AADA;AADA;AAKA;;AAEA,aACA;AAAA;AAAA,mBACA,QADA,EADA;AAKA,KA3LA;AA6LA,eA7LA,yBA6LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA;AAAA;AACA,wCADA;AAAA;AAEA,sBAFA;AAGA,6BAHA;AAIA,qCAJA;AAKA;AALA;AAAA;AAAA,mBAMA;AANA;AAOA,8BAPA;AAAA;AAAA,mBAQA,YARA;AAAA,mBASA,YATA;AAAA,kBAUA,WAVA;AAAA,qBAWA,cAXA;AAAA,uBAYA;AAZA;AAAA,QADA;AAgBA,KAhNA;AAkNA,eAlNA,yBAkNA;AAAA;AACA,aACA;AAAA;AAAA;AAAA,sBADA;AAGA,KAtNA;AAwNA,oBAxNA,8BAwNA;AACA,iCACA,eADA,EAEA,iCAFA;AAIA,KA7NA;AA+NA,qBA/NA,+BA+NA;AAAA,UACA,Q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AACA,IAAI,KAAU,EAAE,gBAYf;AACD,aAAS;AACM,qDAAS,Q;;;AChCxB;AACA;AACA;AACA;AAEA;AAEA;AACA,gCADA;AAEA,sBAFA;AAIA;AACA;AACA,kBADA;AAEA;AAFA;AADA,GAJA;AAWA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KALA;AAOA,cAPA,wBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAXA,GAXA;AAyBA;AACA,gBADA,0BACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA,sCADA;AAEA,2DAFA;AAGA,qEAHA;AAIA,+DAJA;AAKA,wFALA;AAMA;AANA;AASA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAEA,2BACA,8BACA,qBADA,EADA,EAIA,kBAJA,EAFA,EADA;AAWA,KAvBA;AAyBA,wBAzBA,kCAyBA;AAAA;AACA;AAEA,aACA;AAAA;AAAA,UACA,uBADA,EAEA,0BAFA,EAGA,+BAHA,EAIA,oCAJA,EADA;AAQA,KApCA;AAsCA,eAtCA,yBAsCA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;;AAEA;AACA;AACA;AACA,yDADA;AAEA;AAFA;AADA;AAMA;AACA,8CADA;AAEA;AAFA;AAKA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,YACA,kCACA;AAAA;AAAA,UADA,EADA,EADA;AAOA;;AAKA;AACA,kDACA;AAAA;AAAA,oBADA;AAIA;AACA;;AAEA;AACA,KA5EA;AA8EA,wBA9EA,gCA8EA,QA9EA,EA8EA;AAAA;AACA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KApFA;AAsFA,2BAtFA,mCAsFA,QAtFA,EAsFA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAEA,aACA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KAjGA;AAmGA,kBAnGA,4BAmGA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA;AACA,wCADA;AAEA,qEAFA;AAGA,iFAHA;AAIA,yEAJA;AAKA;AALA;AAQA,kCACA;AAAA;AAAA,QADA;AAGA,kCACA;AAAA;AAAA,QADA;AAIA,aACA;AAAA;AAAA,UACA,SADA,EAEA,SAFA,EADA;AAMA,KA3HA;AA6HA,eA7HA,yBA6HA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA,4BACA,gDACA,kCADA,GAEA,kBAFA,CADA;AAMA,oCACA,8BACA,4DADA,GAEA,gCAHA,GAIA,GAJA;AAKA;AACA;AACA;AAEA;AACA,kBADA;AAEA,wCAFA;AAGA,oBAHA;AAIA,sCAJA;AAKA;AALA;AAQA,aACA;AAAA;AAAA,UACA,UADA,EAEA,mBACA;AAAA;AAAA,2BAHA,EADA;AAQA,KA9JA;AAgKA,oBAhKA,8BAgKA;AAAA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA;AAAA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,UADA;AAAA;AAGA,KAxKA;AA0KA,uBA1KA,iCA0KA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,mCADA;AAGA,KAlLA;AAoLA,4BApLA,sCAoLA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,gCADA;AAGA,KA5LA;AA8LA,iCA9LA,2CA8LA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,gCADA,EAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAFA,EADA;AAQA,KA3MA;AA6MA,0BA7MA,kCA6MA,GA7MA,EA6MA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAKA;AAEA;AACA,KArNA;AAuNA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA,CAvNA;AA6NA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KARA,CA7NA;AAuOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA;AAvOA,GAzBA;AAuQA,QAvQA,oBAuQA;AAAA;;AAAA;AAAA,QACA,IADA,GACA,IADA,CACA,IADA;AAEA;;AACA;AACA;AADA,8CAEA,WAFA,GAEA,IAFA;;AAIA;AACA;AACA;AADA;AADA;AAMA;AACA;AAAA;AAAA;AACA;AACA;AACA,WACA;AACA,4BADA;AAAA;AAEA,sBAFA;AAGA,qBAHA;AAIA;AAJA;AAAA,QAKA,mBALA,EAMA,iBACA,kCACA,2BADA,EAPA,EADA;AAcA;AAtSA;AA0SA,2E;;AClTkN,CAAgB,4GAAG,EAAC,C;;ACAtO,IAAI,aAAM,EAAE,sBAAe;AAC+B;AACL;;;AAGrD;AAC0F;AAC1F,IAAI,gBAAS,GAAG,kBAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,aAAM;AACR,EAAE,sBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,mBAYf;AACD,gBAAS;AACM,sEAAS,Q;;AChCxB;AACA;AACA;AACA;AAEA;AACA,YADA;AAEA,kBAFA;AAGA,cAHA;AAIA;AAJA;AAOA;AACA,8BADA;AAEA,sBAFA;AAIA;AACA,aADA,uBACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA,KAPA;AASA,sBATA,gCASA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA;AAfA,GAJA;AAsBA;AACA,0BADA,8BACA,QADA,EACA;AACA;AAEA;AACA,OAHA,MAGA;AACA;AACA;AACA;AARA,GAtBA;AAiCA,SAjCA,qBAiCA;AACA;AACA;AACA,GApCA;AAsCA,SAtCA,qBAsCA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA1CA;AA4CA,WA5CA,uBA4CA;AACA;AACA,GA9CA;AAgDA;AACA,cADA,wBACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,uBADA,EAEA,iBACA,iCADA,GAEA,8BACA,iCADA,GAEA,4BANA,EAOA,sBAPA,EADA;AAWA,KAjBA;AAmBA,oBAnBA,8BAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,kCACA,oBADA,GAEA,IAFA;AAGA,KA1BA;AA4BA,mBA5BA,6BA4BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,iCACA,mBADA,GAEA,IAFA;AAGA,KAnCA;AAqCA,yBArCA,mCAqCA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA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;AACR,EAAE,oBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,iBAYf;AACD,cAAS;AACM,uDAAS,Q;;;;;;;;;;;;AChCxB;AACA;AACA;AAEA;AACA,uCADA;AAEA,sBAFA;AAIA;AACA,0BADA,8BACA,QADA,EACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAPA;AASA,6BATA,mCASA;AACA;AACA;AAXA,GAJA;AAkBA,SAlBA,qBAkBA;AACA;AACA;AACA,GArBA;AAuBA,SAvBA,qBAuBA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA3BA;AA6BA;AACA,iBADA,2BACA;AACA;AACA;AACA;AACA;AACA,KANA;AAQA,kBARA,4BAQA;AACA;AACA;AACA,KAXA;AAaA,6CAbA,uDAaA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AADA;AAGA,KAvBA;AAyBA,2BAzBA,qCAyBA;AAAA;;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AACA;;AACA;AACA,SAHA;AADA;AAMA,KAtCA;AAwCA,8CAxCA,wDAwCA;AACA;AAEA;AACA;AACA,KA7CA;AA+CA,4BA/CA,sCA+CA;AACA;AAEA;AACA;AACA,KApDA;AAsDA,eAtDA,yBAsDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AAEA;AACA,KA7DA;AA+DA,6BA/DA,uCA+DA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AA9EA,GA7BA;AA8GA,QA9GA,oBA8GA;AAAA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AAAA;AAAA;AAEA,WACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QACA;AAAA;AAAA,MADA,EADA;AAKA,G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;AACR,EAAE,0BAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;;;;ACjCxB;AACA;AACA;AAEe+G,mFAAf;AACA;AACA;AAOO,IAAMC,OAAO,GAAGC,OAAhB,C","file":"vue-treeselect.cjs.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n","module.exports = require(\"@babel/runtime/helpers/slicedToArray\");","module.exports = require(\"@babel/runtime/helpers/toConsumableArray\");","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"lodash/noop\");","module.exports = require(\"lodash/debounce\");","module.exports = require(\"watch-size\");","module.exports = require(\"is-promise\");","module.exports = require(\"lodash/once\");","module.exports = require(\"lodash/identity\");","module.exports = require(\"lodash/constant\");","module.exports = require(\"@babel/runtime/helpers/typeof\");","module.exports = require(\"lodash/last\");","module.exports = require(\"fuzzysearch\");","module.exports = require(\"babel-helper-vue-jsx-merge-props\");","module.exports = require(\"vue\");","// extracted by mini-css-extract-plugin","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// ========================\r\n// Debugging Helpers\r\n// ========================\r\n\r\nexport { warning } from './warning'\r\n\r\n// ========================\r\n// DOM Utilities\r\n// ========================\r\n\r\nexport { onLeftClick } from './onLeftClick'\r\nexport { scrollIntoView } from './scrollIntoView'\r\nexport { debounce } from './debounce'\r\nexport { watchSize } from './watchSize'\r\nexport { setupResizeAndScrollEventListeners } from './setupResizeAndScrollEventListeners'\r\n\r\n// ========================\r\n// Language Helpers\r\n// ========================\r\n\r\nexport { isNaN } from './isNaN'\r\nexport { isPromise } from './isPromise'\r\nexport { once } from './once'\r\nexport { noop } from './noop'\r\nexport { identity } from './identity'\r\nexport { constant } from './constant'\r\nexport { createMap } from './createMap'\r\nexport { deepExtend } from './deepExtend'\r\nexport { last } from './last'\r\nexport { includes } from './includes'\r\nexport { find } from './find'\r\nexport { removeFromArray } from './removeFromArray'\r\n\r\n// ========================\r\n// Other Utilities\r\n// ========================\r\n\r\nexport { quickDiff } from './quickDiff'\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.cjs.min.js b/dist/vue-treeselect.cjs.min.js new file mode 100644 index 00000000..3dc417d6 --- /dev/null +++ b/dist/vue-treeselect.cjs.min.js @@ -0,0 +1,7 @@ +/*! + * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee + * Released under the MIT License. + * https://vue-treeselect.js.org/ + */ +module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=16)}([function(e,t){e.exports=require("@babel/runtime/helpers/defineProperty")},function(e,t){e.exports=require("babel-helper-vue-jsx-merge-props")},function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("lodash/noop")},function(e,t){e.exports=require("lodash/debounce")},function(e,t){e.exports=require("is-promise")},function(e,t){e.exports=require("lodash/once")},function(e,t){e.exports=require("lodash/identity")},function(e,t){e.exports=require("lodash/constant")},function(e,t){e.exports=require("lodash/last")},function(e,t){e.exports=require("@babel/runtime/helpers/slicedToArray")},function(e,t){e.exports=require("watch-size")},function(e,t){e.exports=require("@babel/runtime/helpers/typeof")},function(e,t){e.exports=require("fuzzysearch")},function(e,t){e.exports=require("vue")},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"Treeselect",(function(){return it})),n.d(t,"treeselectMixin",(function(){return he})),n.d(t,"LOAD_ROOT_OPTIONS",(function(){return W})),n.d(t,"LOAD_CHILDREN_OPTIONS",(function(){return q})),n.d(t,"ASYNC_SEARCH",(function(){return Q})),n.d(t,"VERSION",(function(){return rt}));var i=n(10),r=n.n(i),s=n(2),o=n.n(s),a=n(0),l=n.n(a),c=n(3),u=n.n(c).a;function d(e){return function(t){if("mousedown"===t.type&&0===t.button){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rn.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight):i.top-r0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"==typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){j(e,t)&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue();j(e,this.internalValue)&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(u((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||u((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&u((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"].forEach((function(t){u((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=R(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(null,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return u((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n={id:e,label:this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),ancestors:[],parentNode:null,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};return"id"===this.valueFormat?n:H(this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],(function(n){return n&&t.enhancedNormalizer(n).id===e}))||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||"ALL"===this.valueConsistsOf)n=e;else if("BRANCH_PRIORITY"===this.valueConsistsOf)e.forEach((function(e){n.push(e);var i=t.getNode(e);i.isBranch&&t.traverseDescendantsBFS(i,(function(e){n.push(e.id)}))}));else if("LEAF_PRIORITY"===this.valueConsistsOf)for(var i=R(),r=e.slice();r.length;){var s=r.shift(),o=this.getNode(s);n.push(s),o.isRootNode||(o.parentNode.id in i||(i[o.parentNode.id]=o.parentNode.children.length),0==--i[o.parentNode.id]&&r.push(o.parentNode.id))}else if("ALL_WITH_INDETERMINATE"===this.valueConsistsOf)for(var a=R(),l=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));l.length;){var c=l.shift(),u=this.getNode(c);n.push(c),u.isRootNode||(u.parentNode.id in a||(a[u.parentNode.id]=u.parentNode.children.length),0==--a[u.parentNode.id]&&l.push(u.parentNode.id))}j(this.forest.selectedNodeIds,n)&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var i=oe({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,i)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch)for(var n=e.children.slice();n.length;){var i=n[0];i.isBranch&&n.push.apply(n,o()(i.children)),t(i),n.shift()}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){!function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))}({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:d((function(e){(e.preventDefault(),e.stopPropagation(),this.disabled)||(this.getValueContainer().$el.contains(e.target)&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags())})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},l()(n,"ALL_CHILDREN",0),l()(n,"ALL_DESCENDANTS",0),l()(n,"LEAF_CHILDREN",0),l()(n,"LEAF_DESCENDANTS",0),n)))}));var i=t.trim().toLocaleLowerCase(),r=i.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&r.length>1?t.isMatched=r.every((function(e){return ce(!1,!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return ce(!e.disableFuzzyMatching,e.replaceAccents,i,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].ALL_DESCENDANTS++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].LEAF_DESCENDANTS++})),null!==t.parentNode&&(e.localSearch.countMap[t.parentNode.id].ALL_CHILDREN+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id].LEAF_CHILDREN+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&null!==t.parentNode&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),i=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return i();this.callLoadOptionsProp({action:Q,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(r){n.isLoaded=!0,n.options=r,e.trigger.searchQuery===t&&i()},fail:function(e){n.loadingError=ue(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=(this.appendToBody?this.$refs.portal.portalTarget:this).$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.menu.current;if(null!=i&&i in this.forest.nodeMap&&(this.forest.nodeMap[i].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var r=function(){var n=t.getMenu(),i=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));i&&h(n,i)};this.getMenu()?r():this.$nextTick(r)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=F()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch)&&(e.showAllChildrenOnSearch=!0):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=R();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=R();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=0})),this.selectedNodes.forEach((function(t){n[t.id]=2,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=1)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return oe({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var i=this,s=t.map((function(e){return[i.enhancedNormalizer(e),e]})).map((function(t,s){var o=r()(t,2),a=o[0],c=o[1];i.checkDuplication(a),i.verifyNodeShape(a);var d=a.id,h=a.label,p=a.children,f=a.isDefaultExpanded,v=null===e,m=v?0:e.level+1,g=Array.isArray(p)||null===p,S=!g,O=!!a.isDisabled||!i.flat&&!v&&e.isDisabled,y=!!a.isNew,b=i.matchKeys.reduce((function(e,t){return oe({},e,l()({},t,(n=a[t],"string"==typeof n?n:"number"!=typeof n||L(n)?"":n+"").toLocaleLowerCase()));var n}),{}),_=v?b.label:e.nestedSearchLabel+" "+b.label,E=i.$set(i.forest.nodeMap,d,R());if(i.$set(E,"id",d),i.$set(E,"label",h),i.$set(E,"level",m),i.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),i.$set(E,"index",(v?[]:e.index).concat(s)),i.$set(E,"parentNode",e),i.$set(E,"lowerCased",b),i.$set(E,"nestedSearchLabel",_),i.$set(E,"isDisabled",O),i.$set(E,"isNew",y),i.$set(E,"isMatched",!1),i.$set(E,"isHighlighted",!1),i.$set(E,"isBranch",g),i.$set(E,"isLeaf",S),i.$set(E,"isRootNode",v),i.$set(E,"raw",c),g){var N,w=Array.isArray(p);i.$set(E,"childrenStates",oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{isLoaded:w})),i.$set(E,"isExpanded","boolean"==typeof f?f:ms+40,c=a>s+40;r.top>=0&&r.top<=o||r.top<0&&r.bottom>0?"auto"!==e.openDirection?e.menu.placement=Qe[e.openDirection]:e.menu.placement=l||!c?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:_(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:N(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},void 0,void 0,!1,null,null,null);Ye.options.__file="src/components/Menu.vue";var Ke=Ye.exports,Xe=n(14),Ue=n.n(Xe);function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Ge,Ze={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){this.instance.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:N(e,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:_(t,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl().getBoundingClientRect();t.style.width=n.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),s="bottom"===e.menu.placement?i.height:0,o=Math.round(i.left-r.left)+"px",a=Math.round(i.top-r.top+s)+"px";this.$refs.menu.$refs["menu-container"].style[H(["transform","webkitTransform","MozTransform","msTransform"],(function(e){return e in document.body.style}))]="translate(".concat(o,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],i={zIndex:t.zIndex};return e("div",{class:n,style:i,attrs:{"data-instance-id":t.getInstanceId()}},[e(Ke,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},et=fe({name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new Ue.a(function(e){for(var t=1;t scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","\r\n","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","\r\n","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.css b/dist/vue-treeselect.css new file mode 100644 index 00000000..c84d2a6c --- /dev/null +++ b/dist/vue-treeselect.css @@ -0,0 +1,952 @@ +/*! + * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee + * Released under the MIT License. + * https://vue-treeselect.js.org/ + */ +/** + * Dependencies + */ +/** + * Variables + */ +/** + * Mixins + */ +/** + * Helpers + */ +.vue-treeselect-helper-hide { + display: none; +} +.vue-treeselect-helper-zoom-effect-off { + -ms-transform: none !important; + transform: none !important; +} +/** + * Animations + */ +@keyframes vue-treeselect-animation-fade-in { + 0% { + opacity: 0; + } +} +@keyframes vue-treeselect-animation-bounce { + 0%, + 100% { + transform: scale(0); + } + 50% { + transform: scale(1); + } +} +@keyframes vue-treeselect-animation-rotate { + 100% { + transform: rotate(360deg); + } +} +/** + * Transitions + */ +.vue-treeselect__multi-value-item--transition-enter-active, +.vue-treeselect__multi-value-item--transition-leave-active { + transition-duration: 200ms; + transition-property: transform, opacity; +} +.vue-treeselect__multi-value-item--transition-enter-active { + transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); +} +.vue-treeselect__multi-value-item--transition-leave-active { + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); + position: absolute; +} +.vue-treeselect__multi-value-item--transition-enter, +.vue-treeselect__multi-value-item--transition-leave-to { + -ms-transform: scale(0.7); + transform: scale(0.7); + opacity: 0; +} +.vue-treeselect__multi-value-item--transition-move { + transition: 200ms transform cubic-bezier(0.165, 0.84, 0.44, 1); +} +/** + * Namespace + */ +.vue-treeselect { + position: relative; + text-align: left; +} +[dir="rtl"] .vue-treeselect { + text-align: right; +} +.vue-treeselect div, +.vue-treeselect span { + box-sizing: border-box; +} +.vue-treeselect svg { + fill: currentColor; +} +/** + * Control + */ +.vue-treeselect__control { + padding-left: 5px; + padding-right: 5px; + display: table; + table-layout: fixed; + width: 100%; + height: 36px; + border: 1px solid #ddd; + border-radius: 5px; + background: #fff; + transition-duration: 200ms; + transition-property: border-color, box-shadow, width, height, background-color, opacity; + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); +} +.vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) .vue-treeselect__control:hover { + border-color: #cfcfcf; +} +.vue-treeselect--focused:not(.vue-treeselect--open) .vue-treeselect__control { + border-color: #039be5; + box-shadow: 0 0 0 3px rgba(3, 155, 229, 0.1); +} +.vue-treeselect--disabled .vue-treeselect__control { + background-color: #f9f9f9; +} +.vue-treeselect--open .vue-treeselect__control { + border-color: #cfcfcf; +} +.vue-treeselect--open.vue-treeselect--open-below .vue-treeselect__control { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.vue-treeselect--open.vue-treeselect--open-above .vue-treeselect__control { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.vue-treeselect__value-container, +.vue-treeselect__multi-value { + width: 100%; + vertical-align: middle; +} +.vue-treeselect__value-container { + display: table-cell; + position: relative; +} +.vue-treeselect--searchable:not(.vue-treeselect--disabled) .vue-treeselect__value-container { + cursor: text; +} +.vue-treeselect__multi-value { + display: inline-block; +} +.vue-treeselect--has-value .vue-treeselect__multi-value { + margin-bottom: 5px; +} +.vue-treeselect__placeholder, +.vue-treeselect__single-value { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-left: 5px; + padding-right: 5px; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + line-height: 34px; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; +} +.vue-treeselect__placeholder { + color: #bdbdbd; +} +.vue-treeselect__single-value { + color: #333; +} +.vue-treeselect--focused.vue-treeselect--searchable .vue-treeselect__single-value { + color: #bdbdbd; +} +.vue-treeselect--disabled .vue-treeselect__single-value { + position: static; +} +.vue-treeselect__multi-value-item-container { + display: inline-block; + padding-top: 5px; + padding-right: 5px; + vertical-align: top; +} +[dir="rtl"] .vue-treeselect__multi-value-item-container { + padding-right: 0; + padding-left: 5px; +} +.vue-treeselect__multi-value-item { + cursor: pointer; + display: inline-table; + background: #e3f2fd; + padding: 2px 0; + border: 1px solid transparent; + border-radius: 2px; + color: #039be5; + font-size: 12px; + vertical-align: top; +} +.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-disabled):hover .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new):hover { + cursor: pointer; + background: #e3f2fd; + color: #039be5; +} +.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-disabled { + cursor: default; + background: #f5f5f5; + color: #757575; +} +.vue-treeselect--disabled .vue-treeselect__multi-value-item { + cursor: default; + background: #fff; + border-color: #e5e5e5; + color: #555; +} +.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new { + background: #e8f5e9; +} +.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new:hover { + background: #e8f5e9; +} +.vue-treeselect__value-remove, +.vue-treeselect__multi-value-label { + display: table-cell; + padding: 0 5px; + vertical-align: middle; +} +.vue-treeselect__value-remove { + color: #039be5; + padding-left: 5px; + border-left: 1px solid #fff; + line-height: 0; +} +[dir="rtl"] .vue-treeselect__value-remove { + border-left: 0 none; + border-right: 1px solid #fff; +} +.vue-treeselect__multi-value-item:hover .vue-treeselect__value-remove { + color: #e53935; +} +.vue-treeselect--disabled .vue-treeselect__value-remove, +.vue-treeselect__multi-value-item-disabled .vue-treeselect__value-remove { + display: none; +} +.vue-treeselect__value-remove > svg { + width: 6px; + height: 6px; +} +.vue-treeselect__multi-value-label { + padding-right: 5px; + white-space: pre-line; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.vue-treeselect__limit-tip { + display: inline-block; + padding-top: 5px; + padding-right: 5px; + vertical-align: top; +} +[dir="rtl"] .vue-treeselect__limit-tip { + padding-right: 0; + padding-left: 5px; +} +.vue-treeselect__limit-tip-text { + cursor: default; + display: block; + margin: 2px 0; + padding: 1px 0; + color: #bdbdbd; + font-size: 12px; + font-weight: 600; +} +.vue-treeselect__input-container { + display: block; + max-width: 100%; + outline: none; +} +.vue-treeselect--single .vue-treeselect__input-container { + font-size: inherit; + height: 100%; +} +.vue-treeselect--multi .vue-treeselect__input-container { + display: inline-block; + font-size: 12px; + vertical-align: top; +} +.vue-treeselect--searchable .vue-treeselect__input-container { + padding-left: 5px; + padding-right: 5px; +} +.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container { + padding-top: 5px; + padding-left: 0; +} +[dir="rtl"] .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container { + padding-left: 5px; + padding-right: 0; +} +.vue-treeselect--disabled .vue-treeselect__input-container { + display: none; +} +.vue-treeselect__input, +.vue-treeselect__sizer { + margin: 0; + line-height: inherit; + font-family: inherit; + font-size: inherit; +} +.vue-treeselect__input { + max-width: 100%; + margin: 0; + padding: 0; + border: 0; + outline: none; + box-sizing: content-box; + box-shadow: none; + background: none transparent; + line-height: 1; + vertical-align: middle; +} +.vue-treeselect__input::-ms-clear { + display: none; +} +.vue-treeselect--single .vue-treeselect__input { + width: 100%; + height: 100%; +} +.vue-treeselect--multi .vue-treeselect__input { + padding-top: 3px; + padding-bottom: 3px; +} +.vue-treeselect--has-value .vue-treeselect__input { + line-height: inherit; + vertical-align: top; +} +.vue-treeselect__sizer { + position: absolute; + top: 0; + left: 0; + visibility: hidden; + height: 0; + overflow: scroll; + white-space: pre; +} +.vue-treeselect__x-container { + display: table-cell; + vertical-align: middle; + width: 20px; + text-align: center; + line-height: 0; + cursor: pointer; + color: #ccc; + animation: 200ms vue-treeselect-animation-fade-in cubic-bezier(0.075, 0.82, 0.165, 1); +} +.vue-treeselect__x-container:hover { + color: #e53935; +} +.vue-treeselect__x { + width: 8px; + height: 8px; +} +.vue-treeselect__control-arrow-container { + display: table-cell; + vertical-align: middle; + width: 20px; + text-align: center; + line-height: 0; + cursor: pointer; +} +.vue-treeselect--disabled .vue-treeselect__control-arrow-container { + cursor: default; +} +.vue-treeselect__control-arrow { + width: 9px; + height: 9px; + color: #ccc; +} +.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover .vue-treeselect__control-arrow { + color: #616161; +} +.vue-treeselect--disabled .vue-treeselect__control-arrow { + opacity: 0.35; +} +.vue-treeselect__control-arrow--rotated { + -ms-transform: rotate(180deg); + transform: rotateZ(180deg); +} +/** + * Menu + */ +.vue-treeselect__menu-container { + position: absolute; + left: 0; + width: 100%; + overflow: visible; + transition: 0s; +} +.vue-treeselect--open-below:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container { + top: 100%; +} +.vue-treeselect--open-above:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container { + bottom: 100%; +} +.vue-treeselect__menu { + cursor: default; + padding-top: 5px; + padding-bottom: 5px; + display: block; + position: absolute; + overflow-x: hidden; + overflow-y: auto; + width: auto; + border: 1px solid #cfcfcf; + background: #fff; + line-height: 180%; + -webkit-overflow-scrolling: touch; +} +.vue-treeselect--open-below .vue-treeselect__menu { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + top: 0; + margin-top: -1px; + border-top-color: #f2f2f2; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06); +} +.vue-treeselect--open-above .vue-treeselect__menu { + border-top-left-radius: 5px; + border-top-right-radius: 5px; + bottom: 0; + margin-bottom: -1px; + border-bottom-color: #f2f2f2; +} +.vue-treeselect__indent-level-0 .vue-treeselect__option { + padding-left: 5px; +} +[dir="rtl"] .vue-treeselect__indent-level-0 .vue-treeselect__option { + padding-left: 5px; + padding-right: 5px; +} +.vue-treeselect__indent-level-0 .vue-treeselect__tip { + padding-left: 25px; +} +[dir="rtl"] .vue-treeselect__indent-level-0 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 25px; +} +.vue-treeselect__indent-level-1 .vue-treeselect__option { + padding-left: 25px; +} +[dir="rtl"] .vue-treeselect__indent-level-1 .vue-treeselect__option { + padding-left: 5px; + padding-right: 25px; +} +.vue-treeselect__indent-level-1 .vue-treeselect__tip { + padding-left: 45px; +} +[dir="rtl"] .vue-treeselect__indent-level-1 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 45px; +} +.vue-treeselect__indent-level-2 .vue-treeselect__option { + padding-left: 45px; +} +[dir="rtl"] .vue-treeselect__indent-level-2 .vue-treeselect__option { + padding-left: 5px; + padding-right: 45px; +} +.vue-treeselect__indent-level-2 .vue-treeselect__tip { + padding-left: 65px; +} +[dir="rtl"] .vue-treeselect__indent-level-2 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 65px; +} +.vue-treeselect__indent-level-3 .vue-treeselect__option { + padding-left: 65px; +} +[dir="rtl"] .vue-treeselect__indent-level-3 .vue-treeselect__option { + padding-left: 5px; + padding-right: 65px; +} +.vue-treeselect__indent-level-3 .vue-treeselect__tip { + padding-left: 85px; +} +[dir="rtl"] .vue-treeselect__indent-level-3 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 85px; +} +.vue-treeselect__indent-level-4 .vue-treeselect__option { + padding-left: 85px; +} +[dir="rtl"] .vue-treeselect__indent-level-4 .vue-treeselect__option { + padding-left: 5px; + padding-right: 85px; +} +.vue-treeselect__indent-level-4 .vue-treeselect__tip { + padding-left: 105px; +} +[dir="rtl"] .vue-treeselect__indent-level-4 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 105px; +} +.vue-treeselect__indent-level-5 .vue-treeselect__option { + padding-left: 105px; +} +[dir="rtl"] .vue-treeselect__indent-level-5 .vue-treeselect__option { + padding-left: 5px; + padding-right: 105px; +} +.vue-treeselect__indent-level-5 .vue-treeselect__tip { + padding-left: 125px; +} +[dir="rtl"] .vue-treeselect__indent-level-5 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 125px; +} +.vue-treeselect__indent-level-6 .vue-treeselect__option { + padding-left: 125px; +} +[dir="rtl"] .vue-treeselect__indent-level-6 .vue-treeselect__option { + padding-left: 5px; + padding-right: 125px; +} +.vue-treeselect__indent-level-6 .vue-treeselect__tip { + padding-left: 145px; +} +[dir="rtl"] .vue-treeselect__indent-level-6 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 145px; +} +.vue-treeselect__indent-level-7 .vue-treeselect__option { + padding-left: 145px; +} +[dir="rtl"] .vue-treeselect__indent-level-7 .vue-treeselect__option { + padding-left: 5px; + padding-right: 145px; +} +.vue-treeselect__indent-level-7 .vue-treeselect__tip { + padding-left: 165px; +} +[dir="rtl"] .vue-treeselect__indent-level-7 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 165px; +} +.vue-treeselect__indent-level-8 .vue-treeselect__option { + padding-left: 165px; +} +[dir="rtl"] .vue-treeselect__indent-level-8 .vue-treeselect__option { + padding-left: 5px; + padding-right: 165px; +} +.vue-treeselect__indent-level-8 .vue-treeselect__tip { + padding-left: 185px; +} +[dir="rtl"] .vue-treeselect__indent-level-8 .vue-treeselect__tip { + padding-left: 5px; + padding-right: 185px; +} +.vue-treeselect__option { + padding-left: 5px; + padding-right: 5px; + display: table; + table-layout: fixed; + width: 100%; +} +.vue-treeselect__option--highlight { + background: #f5f5f5; +} +.vue-treeselect--single .vue-treeselect__option--selected { + background: #e3f2fd; + font-weight: 600; +} +.vue-treeselect--single .vue-treeselect__option--selected:hover { + background: #e3f2fd; +} +.vue-treeselect__option--hide { + display: none; +} +.vue-treeselect__option-arrow-container, +.vue-treeselect__option-arrow-placeholder { + display: table-cell; + vertical-align: middle; + width: 20px; + text-align: center; + line-height: 0; +} +.vue-treeselect__option-arrow-container { + cursor: pointer; +} +.vue-treeselect__option-arrow { + display: inline-block; + width: 9px; + height: 9px; + color: #ccc; + vertical-align: middle; + transition: 200ms transform cubic-bezier(0.19, 1, 0.22, 1); + -ms-transform: rotate(-90deg); + transform: rotateZ(-90deg); +} +[dir="rtl"] .vue-treeselect__option-arrow { + -ms-transform: rotate(90deg); + transform: rotateZ(90deg); +} +.vue-treeselect__option-arrow-container:hover .vue-treeselect__option-arrow, +.vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover .vue-treeselect__option-arrow { + color: #616161; +} +.vue-treeselect__option-arrow--rotated { + -ms-transform: rotate(0); + transform: rotateZ(0); +} +[dir="rtl"] .vue-treeselect__option-arrow--rotated { + -ms-transform: rotate(0); + transform: rotateZ(0); +} +.vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter { + -ms-transform: rotate(-90deg) !important; + transform: rotateZ(-90deg) !important; +} +[dir="rtl"] .vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter { + -ms-transform: rotate(90deg) !important; + transform: rotateZ(90deg) !important; +} +.vue-treeselect__label-container { + display: table-cell; + vertical-align: middle; + cursor: pointer; + display: table; + width: 100%; + table-layout: fixed; + color: inherit; +} +.vue-treeselect__option--disabled .vue-treeselect__label-container { + cursor: not-allowed; + color: rgba(0, 0, 0, 0.25); +} +.vue-treeselect__checkbox-container { + display: table-cell; + width: 20px; + min-width: 20px; + height: 100%; + text-align: center; + vertical-align: middle; +} +.vue-treeselect__checkbox { + display: block; + margin: auto; + width: 12px; + height: 12px; + border-width: 1px; + border-style: solid; + border-radius: 2px; + position: relative; + transition: 200ms all cubic-bezier(0.075, 0.82, 0.165, 1); +} +.vue-treeselect__check-mark, +.vue-treeselect__minus-mark { + display: block; + position: absolute; + left: 1px; + top: 1px; + background-repeat: no-repeat; + opacity: 0; + transition: 200ms all ease; +} +.vue-treeselect__minus-mark { + width: 8px; + height: 8px; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=); + background-size: 8px 8px; +} +@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) { + .vue-treeselect__minus-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==); + } +} +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + .vue-treeselect__minus-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==); + } +} +@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { + .vue-treeselect__minus-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAAD///////////////+PQt5oAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==); + } +} +.vue-treeselect__checkbox--indeterminate > .vue-treeselect__minus-mark { + opacity: 1; +} +.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAADi4uLh4eHOxeSRAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=); +} +@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) { + .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==); + } +} +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==); + } +} +@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { + .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAADh4eHg4ODNzc3h4eEYfw2wAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==); + } +} +.vue-treeselect__check-mark { + width: 8px; + height: 8px; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAQlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////8IX9KGAAAAFXRSTlMA8u24NxILB+Tawb6jiH1zRz0xIQIIP3GUAAAAMklEQVQI1y3FtQEAMQDDQD+EGbz/qkEVOpyEOP6PudKjZNSXn4Jm2CKRdBKzSLsFWl8fMG0Bl6Jk1rMAAAAASUVORK5CYII=); + background-size: 8px 8px; + -ms-transform: scaleY(0.125); + transform: scaleY(0.125); +} +@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) { + .vue-treeselect__check-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC); + } +} +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + .vue-treeselect__check-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC); + } +} +@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { + .vue-treeselect__check-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAWlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////9ZMre9AAAAHXRSTlMA/PiJhGNI9XlEHJB/b2ldV08+Oibk49vPp6QhAYgGBuwAAACCSURBVCjPrdHdDoIwDAXgTWAqCigo/+f9X5OwnoUwtis4V92XNWladUl+rzQPeQJAN2EHxoOnsPn7/oYk8fxBv08Rr/deOH/aZ2Nm8ZJ+s573QGfWKnNuZGzWm3+lv2V3pcU1XQ385/yjmBoM3Z+dXvlbYLLD3ujhTaOM3KaIXvNkFkuSEvYy1LqOAAAAAElFTkSuQmCC); + } +} +.vue-treeselect__checkbox--checked > .vue-treeselect__check-mark { + opacity: 1; + -ms-transform: scaleY(1); + transform: scaleY(1); +} +.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAP1BMVEUAAADj4+Pf39/h4eHh4eHh4eHk5OTh4eHg4ODi4uLh4eHh4eHg4ODh4eHh4eHg4ODh4eHh4eHp6en////h4eFqcyvUAAAAFHRSTlMAOQfy7bgS5NrBvqOIfXNHMSELAgQ/iFsAAAA2SURBVAjXY4AANjYIzcjMAaVFuBkY+RkEWERYmRjYRXjANAOfiIgIFxNIAa8IpxBEi6AwiAQAK2MBd7xY8csAAAAASUVORK5CYII=); +} +@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) { + .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==); + } +} +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==); + } +} +@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) { + .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAUVBMVEUAAADh4eHh4eHh4eHh4eHi4uLi4uLh4eHh4eHh4eHf39/j4+Ph4eHh4eHh4eHg4ODi4uLh4eHh4eHi4uLh4eHh4eHh4eHh4eHh4eH////h4eF3FMFTAAAAGnRSTlMA+/eJhGhfSHE9JBzz5KaQf3pXT0Xbz0I5AYDw8F0AAAB+SURBVCjPrdHbDoMgEEVRKAii1dZe9fz/hxplTiKIT7qfYCWTEEZdUvOwbckNAD2WHeh3brHW5f5EzGQ+iN+b1Gt6KPvtv16Dn6JX9M9ya3/A1yfu5dlyduL6Hec7mXY6ddXLPP2lpABGZ8PWXfYLTJxZekVhhl7eTX24zZPNKXoRC7zQLjUAAAAASUVORK5CYII=); + } +} +.vue-treeselect__checkbox--unchecked { + border-color: #e0e0e0; + background: #fff; +} +.vue-treeselect__label-container:hover .vue-treeselect__checkbox--unchecked { + border-color: #039be5; + background: #fff; +} +.vue-treeselect__checkbox--indeterminate { + border-color: #039be5; + background: #039be5; +} +.vue-treeselect__label-container:hover .vue-treeselect__checkbox--indeterminate { + border-color: #039be5; + background: #039be5; +} +.vue-treeselect__checkbox--checked { + border-color: #039be5; + background: #039be5; +} +.vue-treeselect__label-container:hover .vue-treeselect__checkbox--checked { + border-color: #039be5; + background: #039be5; +} +.vue-treeselect__checkbox--disabled { + border-color: #e0e0e0; + background-color: #f7f7f7; +} +.vue-treeselect__label-container:hover .vue-treeselect__checkbox--disabled { + border-color: #e0e0e0; + background-color: #f7f7f7; +} +.vue-treeselect__label { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: table-cell; + padding-left: 5px; + max-width: 100%; + vertical-align: middle; + cursor: inherit; +} +[dir="rtl"] .vue-treeselect__label { + padding-left: 0; + padding-right: 5px; +} +.vue-treeselect__count { + margin-left: 5px; + font-weight: 400; + opacity: 0.6; +} +[dir="rtl"] .vue-treeselect__count { + margin-left: 0; + margin-right: 5px; +} +.vue-treeselect__tip { + padding-left: 5px; + padding-right: 5px; + display: table; + table-layout: fixed; + width: 100%; + color: #757575; +} +.vue-treeselect__tip-text { + display: table-cell; + vertical-align: middle; + padding-left: 5px; + padding-right: 5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + font-size: 12px; +} +.vue-treeselect__error-tip .vue-treeselect__retry { + cursor: pointer; + margin-left: 5px; + font-style: normal; + font-weight: 600; + text-decoration: none; + color: #039be5; +} +[dir="rtl"] .vue-treeselect__error-tip .vue-treeselect__retry { + margin-left: 0; + margin-right: 5px; +} +.vue-treeselect__icon-container { + display: table-cell; + vertical-align: middle; + width: 20px; + text-align: center; + line-height: 0; +} +.vue-treeselect--single .vue-treeselect__icon-container { + padding-left: 5px; +} +[dir="rtl"] .vue-treeselect--single .vue-treeselect__icon-container { + padding-left: 0; + padding-right: 5px; +} +.vue-treeselect__icon-warning { + display: block; + margin: auto; + border-radius: 50%; + position: relative; + width: 12px; + height: 12px; + background: #fb8c00; +} +.vue-treeselect__icon-warning::after { + display: block; + position: absolute; + content: ""; + left: 5px; + top: 2.5px; + width: 2px; + height: 1px; + border: 0 solid #fff; + border-top-width: 5px; + border-bottom-width: 1px; +} +.vue-treeselect__icon-error { + display: block; + margin: auto; + border-radius: 50%; + position: relative; + width: 12px; + height: 12px; + background: #e53935; +} +.vue-treeselect__icon-error::before, +.vue-treeselect__icon-error::after { + display: block; + position: absolute; + content: ""; + background: #fff; + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} +.vue-treeselect__icon-error::before { + width: 6px; + height: 2px; + left: 3px; + top: 5px; +} +.vue-treeselect__icon-error::after { + width: 2px; + height: 6px; + left: 5px; + top: 3px; +} +.vue-treeselect__icon-loader { + display: block; + margin: auto; + position: relative; + width: 12px; + height: 12px; + text-align: center; + animation: 1.6s vue-treeselect-animation-rotate linear infinite; +} +.vue-treeselect__icon-loader::before, +.vue-treeselect__icon-loader::after { + border-radius: 50%; + position: absolute; + content: ""; + left: 0; + top: 0; + display: block; + width: 100%; + height: 100%; + opacity: 0.6; + animation: 1.6s vue-treeselect-animation-bounce ease-in-out infinite; +} +.vue-treeselect__icon-loader::before { + background: #039be5; +} +.vue-treeselect__icon-loader::after { + background: #b3e5fc; + animation-delay: -0.8s; +} +/** + * Menu Portal + */ +.vue-treeselect__menu-placeholder { + display: none; +} +.vue-treeselect__portal-target { + position: absolute; + display: block; + left: 0; + top: 0; + height: 0; + width: 0; + padding: 0; + margin: 0; + border: 0; + overflow: visible; + box-sizing: border-box; +} + + +/*# sourceMappingURL=vue-treeselect.css.map*/ \ No newline at end of file diff --git a/dist/vue-treeselect.css.map b/dist/vue-treeselect.css.map new file mode 100644 index 00000000..d784806e --- /dev/null +++ b/dist/vue-treeselect.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://VueTreeselect/style.less","webpack://VueTreeselect/./src/style.less","webpack://VueTreeselect/./node_modules/material-colors/dist/colors.less"],"names":[],"mappings":";;;;;AAAA;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AC8NF;EACE;AD5NF;AC+NA;EACE;MAAA;AD7NF;AACA;;EAEE;ACkOF;EACE;IACE;EDhOF;AACF;ACmOA;EACE;;IACE;EDhOF;ECkOA;IACE;EDhOF;AACF;ACmOA;EACE;IACE;EDjOF;AACF;AACA;;EAEE;ACu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ADvMN;AC4MA;EA/1BE;EACA;EA/BA;EAi4BA;EACA;EACA;EACA;AD1MF;AC4ME;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AD1MJ;AC8MA;EAt3BE;EACA;EA/BA;EA05BA;EACA;EACA;EACA;AD9MF;ACgNE;;EAEE;EACA;EACA;EACA;EACA;MAAA;AD9MJ;ACiNE;EACE;EACA;EACA;EACA;AD/MJ;ACkNE;EACE;EACA;EACA;EACA;ADhNJ;ACoNA;EAz5BE;EACA;EA25BA;EACA;EACA;EACA;EACA;ADlNF;ACoNE;;EAh8BA;EAo8BE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ADnNJ;ACsNE;EACE;ADpNJ;ACuNE;EACE;EACA;ADrNJ;AACA;;EAEE;AC2NF;EACE;ADzNF;AC4NA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AD1NF","file":"vue-treeselect.css","sourcesContent":["/**\n * Dependencies\n */\n/**\n * Variables\n */\n/**\n * Mixins\n */\n/**\n * Helpers\n */\n.vue-treeselect-helper-hide {\n display: none;\n}\n.vue-treeselect-helper-zoom-effect-off {\n transform: none !important;\n}\n/**\n * Animations\n */\n@keyframes vue-treeselect-animation-fade-in {\n 0% {\n opacity: 0;\n }\n}\n@keyframes vue-treeselect-animation-bounce {\n 0%,\n 100% {\n transform: scale(0);\n }\n 50% {\n transform: scale(1);\n }\n}\n@keyframes vue-treeselect-animation-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n/**\n * Transitions\n */\n.vue-treeselect__multi-value-item--transition-enter-active,\n.vue-treeselect__multi-value-item--transition-leave-active {\n transition-duration: 200ms;\n transition-property: transform, opacity;\n}\n.vue-treeselect__multi-value-item--transition-enter-active {\n transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);\n}\n.vue-treeselect__multi-value-item--transition-leave-active {\n transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n position: absolute;\n}\n.vue-treeselect__multi-value-item--transition-enter,\n.vue-treeselect__multi-value-item--transition-leave-to {\n transform: scale(0.7);\n opacity: 0;\n}\n.vue-treeselect__multi-value-item--transition-move {\n transition: 200ms transform cubic-bezier(0.165, 0.84, 0.44, 1);\n}\n/**\n * Namespace\n */\n.vue-treeselect {\n position: relative;\n text-align: left;\n}\n[dir=\"rtl\"] .vue-treeselect {\n text-align: right;\n}\n.vue-treeselect div,\n.vue-treeselect span {\n box-sizing: border-box;\n}\n.vue-treeselect svg {\n fill: currentColor;\n}\n/**\n * Control\n */\n.vue-treeselect__control {\n padding-left: 5px;\n padding-right: 5px;\n display: table;\n table-layout: fixed;\n width: 100%;\n height: 36px;\n border: 1px solid #ddd;\n border-radius: 5px;\n background: #fff;\n transition-duration: 200ms;\n transition-property: border-color, box-shadow, width, height, background-color, opacity;\n transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n}\n.vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) .vue-treeselect__control:hover {\n border-color: #cfcfcf;\n}\n.vue-treeselect--focused:not(.vue-treeselect--open) .vue-treeselect__control {\n border-color: #039be5;\n box-shadow: 0 0 0 3px rgba(3, 155, 229, 0.1);\n}\n.vue-treeselect--disabled .vue-treeselect__control {\n background-color: #f9f9f9;\n}\n.vue-treeselect--open .vue-treeselect__control {\n border-color: #cfcfcf;\n}\n.vue-treeselect--open.vue-treeselect--open-below .vue-treeselect__control {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n.vue-treeselect--open.vue-treeselect--open-above .vue-treeselect__control {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.vue-treeselect__value-container,\n.vue-treeselect__multi-value {\n width: 100%;\n vertical-align: middle;\n}\n.vue-treeselect__value-container {\n display: table-cell;\n position: relative;\n}\n.vue-treeselect--searchable:not(.vue-treeselect--disabled) .vue-treeselect__value-container {\n cursor: text;\n}\n.vue-treeselect__multi-value {\n display: inline-block;\n}\n.vue-treeselect--has-value .vue-treeselect__multi-value {\n margin-bottom: 5px;\n}\n.vue-treeselect__placeholder,\n.vue-treeselect__single-value {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding-left: 5px;\n padding-right: 5px;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n line-height: 34px;\n user-select: none;\n pointer-events: none;\n}\n.vue-treeselect__placeholder {\n color: #bdbdbd;\n}\n.vue-treeselect__single-value {\n color: #333;\n}\n.vue-treeselect--focused.vue-treeselect--searchable .vue-treeselect__single-value {\n color: #bdbdbd;\n}\n.vue-treeselect--disabled .vue-treeselect__single-value {\n position: static;\n}\n.vue-treeselect__multi-value-item-container {\n display: inline-block;\n padding-top: 5px;\n padding-right: 5px;\n vertical-align: top;\n}\n[dir=\"rtl\"] .vue-treeselect__multi-value-item-container {\n padding-right: 0;\n padding-left: 5px;\n}\n.vue-treeselect__multi-value-item {\n cursor: pointer;\n display: inline-table;\n background: #e3f2fd;\n padding: 2px 0;\n border: 1px solid transparent;\n border-radius: 2px;\n color: #039be5;\n font-size: 12px;\n vertical-align: top;\n}\n.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-disabled):hover .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new):hover {\n cursor: pointer;\n background: #e3f2fd;\n color: #039be5;\n}\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-disabled {\n cursor: default;\n background: #f5f5f5;\n color: #757575;\n}\n.vue-treeselect--disabled .vue-treeselect__multi-value-item {\n cursor: default;\n background: #fff;\n border-color: #e5e5e5;\n color: #555;\n}\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new {\n background: #e8f5e9;\n}\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new:hover {\n background: #e8f5e9;\n}\n.vue-treeselect__value-remove,\n.vue-treeselect__multi-value-label {\n display: table-cell;\n padding: 0 5px;\n vertical-align: middle;\n}\n.vue-treeselect__value-remove {\n color: #039be5;\n padding-left: 5px;\n border-left: 1px solid #fff;\n line-height: 0;\n}\n[dir=\"rtl\"] .vue-treeselect__value-remove {\n border-left: 0 none;\n border-right: 1px solid #fff;\n}\n.vue-treeselect__multi-value-item:hover .vue-treeselect__value-remove {\n color: #e53935;\n}\n.vue-treeselect--disabled .vue-treeselect__value-remove,\n.vue-treeselect__multi-value-item-disabled .vue-treeselect__value-remove {\n display: none;\n}\n.vue-treeselect__value-remove > svg {\n width: 6px;\n height: 6px;\n}\n.vue-treeselect__multi-value-label {\n padding-right: 5px;\n white-space: pre-line;\n user-select: none;\n}\n.vue-treeselect__limit-tip {\n display: inline-block;\n padding-top: 5px;\n padding-right: 5px;\n vertical-align: top;\n}\n[dir=\"rtl\"] .vue-treeselect__limit-tip {\n padding-right: 0;\n padding-left: 5px;\n}\n.vue-treeselect__limit-tip-text {\n cursor: default;\n display: block;\n margin: 2px 0;\n padding: 1px 0;\n color: #bdbdbd;\n font-size: 12px;\n font-weight: 600;\n}\n.vue-treeselect__input-container {\n display: block;\n max-width: 100%;\n outline: none;\n}\n.vue-treeselect--single .vue-treeselect__input-container {\n font-size: inherit;\n height: 100%;\n}\n.vue-treeselect--multi .vue-treeselect__input-container {\n display: inline-block;\n font-size: 12px;\n vertical-align: top;\n}\n.vue-treeselect--searchable .vue-treeselect__input-container {\n padding-left: 5px;\n padding-right: 5px;\n}\n.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container {\n padding-top: 5px;\n padding-left: 0;\n}\n[dir=\"rtl\"] .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container {\n padding-left: 5px;\n padding-right: 0;\n}\n.vue-treeselect--disabled .vue-treeselect__input-container {\n display: none;\n}\n.vue-treeselect__input,\n.vue-treeselect__sizer {\n margin: 0;\n line-height: inherit;\n font-family: inherit;\n font-size: inherit;\n}\n.vue-treeselect__input {\n max-width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: none;\n box-sizing: content-box;\n box-shadow: none;\n background: none transparent;\n line-height: 1;\n vertical-align: middle;\n}\n.vue-treeselect__input::-ms-clear {\n display: none;\n}\n.vue-treeselect--single .vue-treeselect__input {\n width: 100%;\n height: 100%;\n}\n.vue-treeselect--multi .vue-treeselect__input {\n padding-top: 3px;\n padding-bottom: 3px;\n}\n.vue-treeselect--has-value .vue-treeselect__input {\n line-height: inherit;\n vertical-align: top;\n}\n.vue-treeselect__sizer {\n position: absolute;\n top: 0;\n left: 0;\n visibility: hidden;\n height: 0;\n overflow: scroll;\n white-space: pre;\n}\n.vue-treeselect__x-container {\n display: table-cell;\n vertical-align: middle;\n width: 20px;\n text-align: center;\n line-height: 0;\n cursor: pointer;\n color: #ccc;\n animation: 200ms vue-treeselect-animation-fade-in cubic-bezier(0.075, 0.82, 0.165, 1);\n}\n.vue-treeselect__x-container:hover {\n color: #e53935;\n}\n.vue-treeselect__x {\n width: 8px;\n height: 8px;\n}\n.vue-treeselect__control-arrow-container {\n display: table-cell;\n vertical-align: middle;\n width: 20px;\n text-align: center;\n line-height: 0;\n cursor: pointer;\n}\n.vue-treeselect--disabled .vue-treeselect__control-arrow-container {\n cursor: default;\n}\n.vue-treeselect__control-arrow {\n width: 9px;\n height: 9px;\n color: #ccc;\n}\n.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover .vue-treeselect__control-arrow {\n color: #616161;\n}\n.vue-treeselect--disabled .vue-treeselect__control-arrow {\n opacity: 0.35;\n}\n.vue-treeselect__control-arrow--rotated {\n transform: rotateZ(180deg);\n}\n/**\n * Menu\n */\n.vue-treeselect__menu-container {\n position: absolute;\n left: 0;\n width: 100%;\n overflow: visible;\n transition: 0s;\n}\n.vue-treeselect--open-below:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container {\n top: 100%;\n}\n.vue-treeselect--open-above:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container {\n bottom: 100%;\n}\n.vue-treeselect__menu {\n cursor: default;\n padding-top: 5px;\n padding-bottom: 5px;\n display: block;\n position: absolute;\n overflow-x: hidden;\n overflow-y: auto;\n width: auto;\n border: 1px solid #cfcfcf;\n background: #fff;\n line-height: 180%;\n -webkit-overflow-scrolling: touch;\n}\n.vue-treeselect--open-below .vue-treeselect__menu {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n top: 0;\n margin-top: -1px;\n border-top-color: #f2f2f2;\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\n}\n.vue-treeselect--open-above .vue-treeselect__menu {\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n bottom: 0;\n margin-bottom: -1px;\n border-bottom-color: #f2f2f2;\n}\n.vue-treeselect__indent-level-0 .vue-treeselect__option {\n padding-left: 5px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-0 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 5px;\n}\n.vue-treeselect__indent-level-0 .vue-treeselect__tip {\n padding-left: 25px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-0 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 25px;\n}\n.vue-treeselect__indent-level-1 .vue-treeselect__option {\n padding-left: 25px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-1 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 25px;\n}\n.vue-treeselect__indent-level-1 .vue-treeselect__tip {\n padding-left: 45px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-1 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 45px;\n}\n.vue-treeselect__indent-level-2 .vue-treeselect__option {\n padding-left: 45px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-2 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 45px;\n}\n.vue-treeselect__indent-level-2 .vue-treeselect__tip {\n padding-left: 65px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-2 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 65px;\n}\n.vue-treeselect__indent-level-3 .vue-treeselect__option {\n padding-left: 65px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-3 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 65px;\n}\n.vue-treeselect__indent-level-3 .vue-treeselect__tip {\n padding-left: 85px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-3 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 85px;\n}\n.vue-treeselect__indent-level-4 .vue-treeselect__option {\n padding-left: 85px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-4 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 85px;\n}\n.vue-treeselect__indent-level-4 .vue-treeselect__tip {\n padding-left: 105px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-4 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 105px;\n}\n.vue-treeselect__indent-level-5 .vue-treeselect__option {\n padding-left: 105px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-5 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 105px;\n}\n.vue-treeselect__indent-level-5 .vue-treeselect__tip {\n padding-left: 125px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-5 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 125px;\n}\n.vue-treeselect__indent-level-6 .vue-treeselect__option {\n padding-left: 125px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-6 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 125px;\n}\n.vue-treeselect__indent-level-6 .vue-treeselect__tip {\n padding-left: 145px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-6 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 145px;\n}\n.vue-treeselect__indent-level-7 .vue-treeselect__option {\n padding-left: 145px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-7 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 145px;\n}\n.vue-treeselect__indent-level-7 .vue-treeselect__tip {\n padding-left: 165px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-7 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 165px;\n}\n.vue-treeselect__indent-level-8 .vue-treeselect__option {\n padding-left: 165px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-8 .vue-treeselect__option {\n padding-left: 5px;\n padding-right: 165px;\n}\n.vue-treeselect__indent-level-8 .vue-treeselect__tip {\n padding-left: 185px;\n}\n[dir=\"rtl\"] .vue-treeselect__indent-level-8 .vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 185px;\n}\n.vue-treeselect__option {\n padding-left: 5px;\n padding-right: 5px;\n display: table;\n table-layout: fixed;\n width: 100%;\n}\n.vue-treeselect__option--highlight {\n background: #f5f5f5;\n}\n.vue-treeselect--single .vue-treeselect__option--selected {\n background: #e3f2fd;\n font-weight: 600;\n}\n.vue-treeselect--single .vue-treeselect__option--selected:hover {\n background: #e3f2fd;\n}\n.vue-treeselect__option--hide {\n display: none;\n}\n.vue-treeselect__option-arrow-container,\n.vue-treeselect__option-arrow-placeholder {\n display: table-cell;\n vertical-align: middle;\n width: 20px;\n text-align: center;\n line-height: 0;\n}\n.vue-treeselect__option-arrow-container {\n cursor: pointer;\n}\n.vue-treeselect__option-arrow {\n display: inline-block;\n width: 9px;\n height: 9px;\n color: #ccc;\n vertical-align: middle;\n transition: 200ms transform cubic-bezier(0.19, 1, 0.22, 1);\n transform: rotateZ(-90deg);\n}\n[dir=\"rtl\"] .vue-treeselect__option-arrow {\n transform: rotateZ(90deg);\n}\n.vue-treeselect__option-arrow-container:hover .vue-treeselect__option-arrow,\n.vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover .vue-treeselect__option-arrow {\n color: #616161;\n}\n.vue-treeselect__option-arrow--rotated {\n transform: rotateZ(0);\n}\n[dir=\"rtl\"] .vue-treeselect__option-arrow--rotated {\n transform: rotateZ(0);\n}\n.vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter {\n transform: rotateZ(-90deg) !important;\n}\n[dir=\"rtl\"] .vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter {\n transform: rotateZ(90deg) !important;\n}\n.vue-treeselect__label-container {\n display: table-cell;\n vertical-align: middle;\n cursor: pointer;\n display: table;\n width: 100%;\n table-layout: fixed;\n color: inherit;\n}\n.vue-treeselect__option--disabled .vue-treeselect__label-container {\n cursor: not-allowed;\n color: rgba(0, 0, 0, 0.25);\n}\n.vue-treeselect__checkbox-container {\n display: table-cell;\n width: 20px;\n min-width: 20px;\n height: 100%;\n text-align: center;\n vertical-align: middle;\n}\n.vue-treeselect__checkbox {\n display: block;\n margin: auto;\n width: 12px;\n height: 12px;\n border-width: 1px;\n border-style: solid;\n border-radius: 2px;\n position: relative;\n transition: 200ms all cubic-bezier(0.075, 0.82, 0.165, 1);\n}\n.vue-treeselect__check-mark,\n.vue-treeselect__minus-mark {\n display: block;\n position: absolute;\n left: 1px;\n top: 1px;\n background-repeat: no-repeat;\n opacity: 0;\n transition: 200ms all ease;\n}\n.vue-treeselect__minus-mark {\n width: 8px;\n height: 8px;\n background-image: url(\"./assets/checkbox-indeterminate.png\");\n background-size: 8px 8px;\n}\n@media (min-resolution: 1.5dppx) {\n .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate@2x.png\");\n }\n}\n@media (min-resolution: 192dpi) {\n .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate@2x.png\");\n }\n}\n@media (min-resolution: 288dpi) {\n .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate@3x.png\");\n }\n}\n.vue-treeselect__checkbox--indeterminate > .vue-treeselect__minus-mark {\n opacity: 1;\n}\n.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate-disabled.png\");\n}\n@media (min-resolution: 1.5dppx) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate-disabled@2x.png\");\n }\n}\n@media (min-resolution: 192dpi) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate-disabled@2x.png\");\n }\n}\n@media (min-resolution: 288dpi) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\n background-image: url(\"./assets/checkbox-indeterminate-disabled@3x.png\");\n }\n}\n.vue-treeselect__check-mark {\n width: 8px;\n height: 8px;\n background-image: url(\"./assets/checkbox-checked.png\");\n background-size: 8px 8px;\n transform: scaleY(0.125);\n}\n@media (min-resolution: 1.5dppx) {\n .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked@2x.png\");\n }\n}\n@media (min-resolution: 192dpi) {\n .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked@2x.png\");\n }\n}\n@media (min-resolution: 288dpi) {\n .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked@3x.png\");\n }\n}\n.vue-treeselect__checkbox--checked > .vue-treeselect__check-mark {\n opacity: 1;\n transform: scaleY(1);\n}\n.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked-disabled.png\");\n}\n@media (min-resolution: 1.5dppx) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked-disabled@2x.png\");\n }\n}\n@media (min-resolution: 192dpi) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked-disabled@2x.png\");\n }\n}\n@media (min-resolution: 288dpi) {\n .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\n background-image: url(\"./assets/checkbox-checked-disabled@3x.png\");\n }\n}\n.vue-treeselect__checkbox--unchecked {\n border-color: #e0e0e0;\n background: #fff;\n}\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--unchecked {\n border-color: #039be5;\n background: #fff;\n}\n.vue-treeselect__checkbox--indeterminate {\n border-color: #039be5;\n background: #039be5;\n}\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--indeterminate {\n border-color: #039be5;\n background: #039be5;\n}\n.vue-treeselect__checkbox--checked {\n border-color: #039be5;\n background: #039be5;\n}\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--checked {\n border-color: #039be5;\n background: #039be5;\n}\n.vue-treeselect__checkbox--disabled {\n border-color: #e0e0e0;\n background-color: #f7f7f7;\n}\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--disabled {\n border-color: #e0e0e0;\n background-color: #f7f7f7;\n}\n.vue-treeselect__label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: table-cell;\n padding-left: 5px;\n max-width: 100%;\n vertical-align: middle;\n cursor: inherit;\n}\n[dir=\"rtl\"] .vue-treeselect__label {\n padding-left: 0;\n padding-right: 5px;\n}\n.vue-treeselect__count {\n margin-left: 5px;\n font-weight: 400;\n opacity: 0.6;\n}\n[dir=\"rtl\"] .vue-treeselect__count {\n margin-left: 0;\n margin-right: 5px;\n}\n.vue-treeselect__tip {\n padding-left: 5px;\n padding-right: 5px;\n display: table;\n table-layout: fixed;\n width: 100%;\n color: #757575;\n}\n.vue-treeselect__tip-text {\n display: table-cell;\n vertical-align: middle;\n padding-left: 5px;\n padding-right: 5px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n font-size: 12px;\n}\n.vue-treeselect__error-tip .vue-treeselect__retry {\n cursor: pointer;\n margin-left: 5px;\n font-style: normal;\n font-weight: 600;\n text-decoration: none;\n color: #039be5;\n}\n[dir=\"rtl\"] .vue-treeselect__error-tip .vue-treeselect__retry {\n margin-left: 0;\n margin-right: 5px;\n}\n.vue-treeselect__icon-container {\n display: table-cell;\n vertical-align: middle;\n width: 20px;\n text-align: center;\n line-height: 0;\n}\n.vue-treeselect--single .vue-treeselect__icon-container {\n padding-left: 5px;\n}\n[dir=\"rtl\"] .vue-treeselect--single .vue-treeselect__icon-container {\n padding-left: 0;\n padding-right: 5px;\n}\n.vue-treeselect__icon-warning {\n display: block;\n margin: auto;\n border-radius: 50%;\n position: relative;\n width: 12px;\n height: 12px;\n background: #fb8c00;\n}\n.vue-treeselect__icon-warning::after {\n display: block;\n position: absolute;\n content: \"\";\n left: 5px;\n top: 2.5px;\n width: 2px;\n height: 1px;\n border: 0 solid #fff;\n border-top-width: 5px;\n border-bottom-width: 1px;\n}\n.vue-treeselect__icon-error {\n display: block;\n margin: auto;\n border-radius: 50%;\n position: relative;\n width: 12px;\n height: 12px;\n background: #e53935;\n}\n.vue-treeselect__icon-error::before,\n.vue-treeselect__icon-error::after {\n display: block;\n position: absolute;\n content: \"\";\n background: #fff;\n transform: rotate(45deg);\n}\n.vue-treeselect__icon-error::before {\n width: 6px;\n height: 2px;\n left: 3px;\n top: 5px;\n}\n.vue-treeselect__icon-error::after {\n width: 2px;\n height: 6px;\n left: 5px;\n top: 3px;\n}\n.vue-treeselect__icon-loader {\n display: block;\n margin: auto;\n position: relative;\n width: 12px;\n height: 12px;\n text-align: center;\n animation: 1.6s vue-treeselect-animation-rotate linear infinite;\n}\n.vue-treeselect__icon-loader::before,\n.vue-treeselect__icon-loader::after {\n border-radius: 50%;\n position: absolute;\n content: \"\";\n left: 0;\n top: 0;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0.6;\n animation: 1.6s vue-treeselect-animation-bounce ease-in-out infinite;\n}\n.vue-treeselect__icon-loader::before {\n background: #039be5;\n}\n.vue-treeselect__icon-loader::after {\n background: #b3e5fc;\n animation-delay: -0.8s;\n}\n/**\n * Menu Portal\n */\n.vue-treeselect__menu-placeholder {\n display: none;\n}\n.vue-treeselect__portal-target {\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n height: 0;\n width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n overflow: visible;\n box-sizing: border-box;\n}\n","/**\n * Dependencies\n */\n\n@import \"~material-colors/dist/colors.less\";\n@import \"~easings-css/easings.less\";\n\n/**\n * Variables\n */\n\n@treeselect-font-size: 1em;\n@treeselect-font-size-sm: 12px;\n@treeselect-padding: 5px;\n@treeselect-border-radius-lg: 5px;\n@treeselect-border-radius-sm: 2px;\n@treeselect-narrow-cell-width: 20px;\n@treeselect-wide-cell-width: 100%;\n@treeselect-icon-size: 12px;\n@treeselect-transition-duration: 200ms;\n@treeselect-transition-duration-slow: 400ms;\n@treeselect-max-level: 8;\n\n@treeselect-control-height: 36px;\n@treeselect-control-inner-height: @treeselect-control-height - @treeselect-control-border-width * 2;\n@treeselect-control-border-width: 1px;\n@treeselect-control-border-color: #ddd;\n@treeselect-control-border-color-hover: #cfcfcf;\n@treeselect-control-border-color-active: @treeselect-control-border-color-hover;\n@treeselect-control-border-color-focus: @md-light-blue-600;\n@treeselect-control-border-radius: @treeselect-border-radius-lg;\n@treeselect-control-bg: #fff;\n@treeselect-control-box-shadow-focus: 0 0 0 3px fade(@treeselect-control-border-color-focus, 10%);\n@treeselect-control-bg-disabled: #f9f9f9;\n\n@treeselect-placeholder-font-color: @md-grey-400;\n@treeselect-single-value-font-color: #333;\n@treeselect-single-value-font-color-focused: @treeselect-placeholder-font-color;\n@treeselect-multi-value-margin-x: 0;\n@treeselect-multi-value-margin-y: 2px;\n@treeselect-multi-value-padding-x: @treeselect-padding;\n@treeselect-multi-value-padding-y: 0;\n@treeselect-multi-value-font-size: @treeselect-font-size-sm;\n@treeselect-multi-value-font-color: @md-light-blue-600;\n@treeselect-multi-value-item-bg: @md-blue-50;\n@treeselect-multi-value-item-bg-new: @md-green-50;\n@treeselect-multi-value-item-border-width: 1px;\n@treeselect-multi-value-item-border-color: transparent;\n@treeselect-multi-value-font-color-hover: @treeselect-multi-value-font-color;\n@treeselect-multi-value-item-bg-hover: @treeselect-multi-value-item-bg;\n@treeselect-multi-value-item-bg-new-hover: @treeselect-multi-value-item-bg-new;\n@treeselect-multi-value-font-color-disabled: @md-grey-600;\n@treeselect-multi-value-item-bg-disabled: @md-grey-100;\n@treeselect-multi-value-item-font-color-control-disabled: #555;\n@treeselect-multi-value-item-bg-control-disabled: #fff;\n@treeselect-multi-value-item-border-color-control-disabled: #e5e5e5;\n@treeselect-multi-value-remove-color: @treeselect-multi-value-font-color;\n@treeselect-multi-value-remove-color-hover: @md-red-600;\n@treeselect-multi-value-remove-size: 6px;\n@treeselect-multi-value-divider-color: #fff;\n@treeselect-limit-tip-font-color: @md-grey-400;\n@treeselect-limit-tip-font-size: @treeselect-multi-value-font-size;\n@treeselect-limit-tip-font-weight: 600;\n@treeselect-single-input-font-size: inherit;\n@treeselect-multi-input-font-size: @treeselect-multi-value-font-size;\n\n@treeselect-menu-bg: #fff;\n@treeselect-menu-padding-y: @treeselect-padding;\n@treeselect-menu-line-height: 180%;\n@treeselect-menu-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\n@treeselect-control-menu-divider-color: #f2f2f2;\n\n@treeselect-arrow-size: 9px;\n@treeselect-arrow-color: #ccc;\n@treeselect-arrow-color-hover: @md-grey-700;\n@treeselect-arrow-transition-timing-function: @ease-out-expo;\n\n@treeselect-x-size: 8px;\n@treeselect-x-color: @treeselect-arrow-color;\n@treeselect-x-color-hover: @md-red-600;\n\n@treeselect-option-bg-highlight: @md-grey-100;\n@treeselect-option-selected-bg: @md-blue-50;\n@treeselect-option-selected-bg-hover: @treeselect-option-selected-bg;\n@treeselect-checkbox-size: @treeselect-icon-size;\n@treeselect-checkbox-border-radius: @treeselect-border-radius-sm;\n@treeselect-checkbox-color: @md-grey-300;\n@treeselect-checkbox-color-highlight: @md-light-blue-600;\n@treeselect-checkbox-border-color: @treeselect-checkbox-color;\n@treeselect-checkbox-bg: #fff;\n@treeselect-checkbox-border-color-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-bg-hover: @treeselect-checkbox-bg;\n@treeselect-checkbox-indeterminate-border-color: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-indeterminate-bg: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-indeterminate-icon: \"./assets/checkbox-indeterminate.png\";\n@treeselect-checkbox-indeterminate-border-color-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-indeterminate-bg-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-checked-border-color: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-checked-bg: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-checked-icon: \"./assets/checkbox-checked.png\";\n@treeselect-checkbox-checked-border-color-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-checked-bg-hover: @treeselect-checkbox-color-highlight;\n@treeselect-checkbox-disabled-border-color: @treeselect-checkbox-border-color;\n@treeselect-checkbox-disabled-bg-color: darken(@treeselect-checkbox-bg, 3%);\n@treeselect-checkbox-disabled-indeterminate-icon: \"./assets/checkbox-indeterminate-disabled.png\";\n@treeselect-checkbox-disabled-checked-icon: \"./assets/checkbox-checked-disabled.png\";\n@treeselect-option-label-color: inherit;\n@treeselect-option-label-color-disabled: rgba(0, 0, 0, 0.25);\n\n@treeselect-loader-color-dark: @md-light-blue-600;\n@treeselect-loader-color-light: @md-light-blue-100;\n@treeselect-loader-animation-duration: 1.6s;\n@treeselect-warning-icon-bg: @md-orange-600;\n@treeselect-error-icon-bg: @md-red-600;\n@treeselect-tip-color: @md-grey-600;\n@treeselect-tip-font-size: @treeselect-font-size-sm;\n@treeselect-retry-text-color: @md-light-blue-600;\n\n\n/**\n * Mixins\n */\n\n.clickable() {\n cursor: pointer;\n}\n\n.inputtable() {\n cursor: text;\n}\n\n.forbidden() {\n cursor: not-allowed;\n}\n\n.reset-cursor() {\n cursor: default;\n}\n\n.rounded() {\n border-radius: 50%;\n}\n\n.border-radius-top(@size) {\n border-top-left-radius: @size;\n border-top-right-radius: @size;\n}\n\n.border-radius-bottom(@size) {\n border-bottom-left-radius: @size;\n border-bottom-right-radius: @size;\n}\n\n.text-truncate() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.horizontal-padding(@value) {\n padding-left: @value;\n padding-right: @value;\n}\n\n.vertical-padding(@value) {\n padding-top: @value;\n padding-bottom: @value;\n}\n\n.icon() {\n display: block;\n margin: auto;\n}\n\n.row() {\n .horizontal-padding(@treeselect-padding);\n\n display: table;\n table-layout: fixed;\n width: 100%;\n}\n\n.cell() {\n display: table-cell;\n vertical-align: middle;\n}\n\n.wide-cell() {\n .cell();\n .horizontal-padding(@treeselect-padding);\n .text-truncate();\n\n width: @treeselect-wide-cell-width;\n}\n\n.narrow-cell() {\n .cell();\n\n width: @treeselect-narrow-cell-width;\n text-align: center;\n line-height: 0;\n}\n\n// based on: https://github.com/strues/retinajs/blob/master/dist/retina.less\n.retina(@path, @cap: 2) { // stylelint-disable-line selector-class-pattern\n @lowretina: ~\"(min-resolution: 1.5dppx)\";\n @2xpath: replace(@path, \"(\\.\\w+)$\", \"@2x$1\");\n\n background-image: url(@path);\n\n @media @lowretina {\n background-image: url(@2xpath);\n }\n\n .create-queries() when (@cap >= 2) {\n .loop(@env) when (@env <= @cap) {\n @retinapath: replace(@path, \"(\\.\\w+)$\", \"@@{env}x$1\");\n @media (min-resolution: @env * 96dpi) {\n background-image: url(@retinapath);\n }\n\n .loop((@env + 1));\n }\n\n .loop(2);\n }\n .create-queries();\n}\n\n/**\n * Helpers\n */\n\n.vue-treeselect-helper-hide {\n display: none;\n}\n\n.vue-treeselect-helper-zoom-effect-off {\n transform: none !important; // stylelint-disable-line declaration-no-important\n}\n\n\n/**\n * Animations\n */\n\n@keyframes vue-treeselect-animation-fade-in {\n 0% {\n opacity: 0;\n }\n}\n\n@keyframes vue-treeselect-animation-bounce {\n 0%, 100% {\n transform: scale(0);\n }\n 50% {\n transform: scale(1);\n }\n}\n\n@keyframes vue-treeselect-animation-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n\n/**\n * Transitions\n */\n\n.vue-treeselect__multi-value-item--transition {\n &-enter-active,\n &-leave-active {\n transition-duration: @treeselect-transition-duration;\n transition-property: transform, opacity;\n }\n\n &-enter-active {\n transition-timing-function: @ease-out-circ;\n }\n\n &-leave-active {\n transition-timing-function: @ease-out-cubic;\n // trigger animation when element is removed\n position: absolute;\n }\n\n &-enter,\n &-leave-to {\n transform: scale(0.7);\n opacity: 0;\n }\n\n &-move {\n transition: @treeselect-transition-duration transform @ease-out-quart;\n }\n}\n\n.vue-treeselect__menu--transition {\n &-enter-active,\n &-leave-active {\n // to be overriden\n }\n\n &-enter,\n &-leave-to {\n // to be overriden\n }\n}\n\n.vue-treeselect__list--transition {\n &-enter-active,\n &-leave-active {\n // to be overriden\n }\n\n &-enter,\n &-leave-to {\n // to be overriden\n }\n}\n\n\n/**\n * Namespace\n */\n\n.vue-treeselect {\n position: relative;\n text-align: left;\n\n [dir=\"rtl\"] & {\n text-align: right;\n }\n\n div,\n span {\n box-sizing: border-box;\n }\n\n svg {\n fill: currentColor;\n }\n}\n\n\n/**\n * Control\n */\n\n.vue-treeselect__control {\n .row();\n\n height: @treeselect-control-height;\n border: @treeselect-control-border-width solid @treeselect-control-border-color;\n border-radius: @treeselect-control-border-radius;\n background: @treeselect-control-bg;\n transition-duration: @treeselect-transition-duration;\n transition-property: border-color, box-shadow, width, height, background-color, opacity;\n transition-timing-function: @ease-out-cubic;\n\n .vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) &:hover {\n border-color: @treeselect-control-border-color-hover;\n }\n\n .vue-treeselect--focused:not(.vue-treeselect--open) & {\n border-color: @treeselect-control-border-color-focus;\n box-shadow: @treeselect-control-box-shadow-focus;\n }\n\n .vue-treeselect--disabled & {\n background-color: @treeselect-control-bg-disabled;\n }\n\n .vue-treeselect--open & {\n border-color: @treeselect-control-border-color-active;\n }\n\n .vue-treeselect--open.vue-treeselect--open-below & {\n .border-radius-bottom(0);\n }\n\n .vue-treeselect--open.vue-treeselect--open-above & {\n .border-radius-top(0);\n }\n}\n\n.vue-treeselect__value-container,\n.vue-treeselect__multi-value {\n width: 100%;\n vertical-align: middle;\n}\n\n.vue-treeselect__value-container {\n display: table-cell;\n position: relative;\n\n .vue-treeselect--searchable:not(.vue-treeselect--disabled) & {\n // The real input is small and not covering the whole control.\n // We show an I-shape cursor to give user a hint that\n // clicking anywhere in the control will make the input focused.\n .inputtable();\n }\n}\n\n.vue-treeselect__multi-value {\n display: inline-block;\n\n .vue-treeselect--has-value & {\n margin-bottom: @treeselect-padding;\n }\n}\n\n.vue-treeselect__placeholder,\n.vue-treeselect__single-value {\n .text-truncate();\n .horizontal-padding(@treeselect-padding);\n\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n line-height: @treeselect-control-inner-height;\n user-select: none;\n pointer-events: none;\n}\n\n.vue-treeselect__placeholder {\n color: @treeselect-placeholder-font-color;\n}\n\n.vue-treeselect__single-value {\n color: @treeselect-single-value-font-color;\n\n .vue-treeselect--focused.vue-treeselect--searchable & {\n color: @treeselect-single-value-font-color-focused;\n }\n\n .vue-treeselect--disabled & {\n // #274 Fix for IE\n position: static;\n }\n}\n\n.vue-treeselect__multi-value-item-container {\n display: inline-block;\n padding-top: @treeselect-padding;\n padding-right: @treeselect-padding;\n vertical-align: top;\n\n [dir=\"rtl\"] & {\n padding-right: 0;\n padding-left: @treeselect-padding;\n }\n}\n\n.vue-treeselect__multi-value-item {\n .clickable();\n\n display: inline-table;\n background: @treeselect-multi-value-item-bg;\n // Table elements do not have margin, so we set at the container element.\n padding: @treeselect-multi-value-margin-y @treeselect-multi-value-margin-x;\n border: @treeselect-multi-value-item-border-width solid @treeselect-multi-value-item-border-color;\n border-radius: @treeselect-border-radius-sm;\n color: @treeselect-multi-value-font-color;\n font-size: @treeselect-multi-value-font-size;\n vertical-align: top; // stylelint-disable-line plugin/declaration-block-no-ignored-properties\n\n .vue-treeselect:not(.vue-treeselect--disabled) &:not(.vue-treeselect__multi-value-item-disabled):hover &:not(.vue-treeselect__multi-value-item-new) &:not(.vue-treeselect__multi-value-item-new):hover {\n .clickable();\n\n background: @treeselect-multi-value-item-bg-hover;\n color: @treeselect-multi-value-font-color-hover;\n }\n\n &.vue-treeselect__multi-value-item-disabled {\n .reset-cursor();\n\n background: @treeselect-multi-value-item-bg-disabled;\n color: @treeselect-multi-value-font-color-disabled;\n }\n\n .vue-treeselect--disabled & {\n .reset-cursor();\n\n background: @treeselect-multi-value-item-bg-control-disabled;\n border-color: @treeselect-multi-value-item-border-color-control-disabled;\n color: @treeselect-multi-value-item-font-color-control-disabled;\n }\n\n &.vue-treeselect__multi-value-item-new {\n background: @treeselect-multi-value-item-bg-new;\n &:hover {\n background: @treeselect-multi-value-item-bg-new;\n }\n }\n}\n\n.vue-treeselect__value-remove,\n.vue-treeselect__multi-value-label {\n display: table-cell;\n padding: @treeselect-multi-value-padding-y @treeselect-multi-value-padding-x;\n vertical-align: middle;\n}\n\n.vue-treeselect__value-remove {\n color: @treeselect-multi-value-remove-color;\n padding-left: @treeselect-multi-value-padding-x;\n border-left: 1px solid @treeselect-multi-value-divider-color;\n line-height: 0;\n\n [dir=\"rtl\"] & {\n border-left: 0 none;\n border-right: 1px solid @treeselect-multi-value-divider-color;\n }\n\n .vue-treeselect__multi-value-item:hover & {\n color: @treeselect-multi-value-remove-color-hover;\n }\n\n .vue-treeselect--disabled &,\n .vue-treeselect__multi-value-item-disabled & {\n display: none;\n }\n\n > svg {\n width: @treeselect-multi-value-remove-size;\n height: @treeselect-multi-value-remove-size;\n }\n}\n\n.vue-treeselect__multi-value-label {\n padding-right: @treeselect-multi-value-padding-x;\n white-space: pre-line;\n user-select: none;\n}\n\n.vue-treeselect__limit-tip {\n display: inline-block;\n padding-top: @treeselect-padding;\n padding-right: @treeselect-padding;\n vertical-align: top;\n\n [dir=\"rtl\"] & {\n padding-right: 0;\n padding-left: @treeselect-padding;\n }\n}\n\n.vue-treeselect__limit-tip-text {\n .reset-cursor();\n\n display: block;\n margin: @treeselect-multi-value-margin-y @treeselect-multi-value-margin-x;\n padding: (@treeselect-multi-value-padding-y + @treeselect-multi-value-item-border-width) 0;\n color: @treeselect-limit-tip-font-color;\n font-size: @treeselect-limit-tip-font-size;\n font-weight: @treeselect-limit-tip-font-weight;\n}\n\n.vue-treeselect__input-container {\n display: block;\n max-width: 100%;\n outline: none;\n\n .vue-treeselect--single & {\n font-size: @treeselect-single-input-font-size;\n height: 100%;\n }\n\n .vue-treeselect--multi & {\n display: inline-block;\n font-size: @treeselect-multi-input-font-size;\n vertical-align: top;\n }\n\n .vue-treeselect--searchable & {\n .horizontal-padding(@treeselect-padding);\n }\n\n .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value & {\n padding-top: @treeselect-padding;\n padding-left: 0;\n\n [dir=\"rtl\"] & {\n padding-left: @treeselect-padding;\n padding-right: 0;\n }\n }\n\n .vue-treeselect--disabled & {\n display: none;\n }\n}\n\n.vue-treeselect__input,\n.vue-treeselect__sizer {\n margin: 0;\n line-height: inherit;\n font-family: inherit;\n font-size: inherit;\n}\n\n.vue-treeselect__input {\n max-width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: none;\n box-sizing: content-box;\n box-shadow: none;\n background: none transparent;\n line-height: 1;\n vertical-align: middle;\n\n &::-ms-clear {\n display: none;\n }\n\n .vue-treeselect--single & {\n width: 100%;\n height: 100%;\n }\n\n .vue-treeselect--multi & {\n .vertical-padding(@treeselect-multi-value-margin-y + @treeselect-multi-value-item-border-width);\n }\n\n .vue-treeselect--has-value & {\n line-height: inherit;\n vertical-align: top;\n }\n}\n\n.vue-treeselect__sizer {\n position: absolute;\n top: 0;\n left: 0;\n visibility: hidden;\n height: 0;\n overflow: scroll;\n white-space: pre;\n}\n\n.vue-treeselect__x-container {\n .narrow-cell();\n .clickable();\n\n color: @treeselect-x-color;\n animation: @treeselect-transition-duration vue-treeselect-animation-fade-in @ease-out-circ;\n\n &:hover {\n color: @treeselect-x-color-hover;\n }\n}\n\n.vue-treeselect__x {\n width: @treeselect-x-size;\n height: @treeselect-x-size;\n}\n\n.vue-treeselect__control-arrow-container {\n .narrow-cell();\n .clickable();\n\n .vue-treeselect--disabled & {\n .reset-cursor();\n }\n}\n\n.vue-treeselect__control-arrow {\n width: @treeselect-arrow-size;\n height: @treeselect-arrow-size;\n color: @treeselect-arrow-color;\n\n .vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover & {\n color: @treeselect-arrow-color-hover;\n }\n\n .vue-treeselect--disabled & {\n opacity: 0.35;\n }\n}\n\n.vue-treeselect__control-arrow--rotated {\n transform: rotateZ(180deg);\n}\n\n\n/**\n * Menu\n */\n\n.vue-treeselect__menu-container {\n position: absolute;\n left: 0;\n width: 100%;\n overflow: visible;\n transition: 0s;\n\n .vue-treeselect--open-below:not(.vue-treeselect--append-to-body) & {\n top: 100%;\n }\n\n .vue-treeselect--open-above:not(.vue-treeselect--append-to-body) & {\n bottom: 100%;\n }\n}\n\n.vue-treeselect__menu {\n .reset-cursor(); // set to normal cursor since text is unselectable\n .vertical-padding(@treeselect-menu-padding-y);\n\n display: block;\n position: absolute;\n overflow-x: hidden;\n overflow-y: auto;\n // IE9 does not properly handle `width: 100%` with scrollbar when `box-sizing: border-box`\n width: auto;\n border: 1px solid @treeselect-control-border-color-active;\n background: @treeselect-menu-bg;\n line-height: @treeselect-menu-line-height;\n // https://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/\n -webkit-overflow-scrolling: touch;\n\n .vue-treeselect--open-below & {\n .border-radius-bottom(@treeselect-border-radius-lg);\n\n top: 0;\n margin-top: (-@treeselect-control-border-width);\n border-top-color: @treeselect-control-menu-divider-color;\n box-shadow: @treeselect-menu-box-shadow;\n }\n\n .vue-treeselect--open-above & {\n .border-radius-top(@treeselect-border-radius-lg);\n\n bottom: 0;\n margin-bottom: (-@treeselect-control-border-width);\n border-bottom-color: @treeselect-control-menu-divider-color;\n }\n}\n\n.generate-level-indentations(@i) when (@i >= 0) {\n .generate-level-indentations((@i - 1));\n\n .vue-treeselect__indent-level-@{i} {\n .vue-treeselect__option {\n padding-left: @treeselect-padding + @i * @treeselect-narrow-cell-width;\n\n [dir=\"rtl\"] & {\n padding-left: @treeselect-padding;\n padding-right: @treeselect-padding + @i * @treeselect-narrow-cell-width;\n }\n }\n\n .vue-treeselect__tip {\n padding-left: @treeselect-padding + (@i + 1) * @treeselect-narrow-cell-width;\n\n [dir=\"rtl\"] & {\n padding-left: @treeselect-padding;\n padding-right: @treeselect-padding + (@i + 1) * @treeselect-narrow-cell-width;\n }\n }\n }\n}\n.generate-level-indentations(@treeselect-max-level);\n\n.vue-treeselect__option {\n .row();\n}\n\n.vue-treeselect__option--highlight {\n background: @treeselect-option-bg-highlight;\n}\n\n.vue-treeselect__option--selected {\n // note that these should override `.vue-treeselect__option--highlight`\n .vue-treeselect--single & {\n background: @treeselect-option-selected-bg;\n font-weight: 600;\n\n &:hover {\n background: @treeselect-option-selected-bg-hover;\n }\n }\n}\n\n.vue-treeselect__option--hide {\n display: none;\n}\n\n.vue-treeselect__option-arrow-container,\n.vue-treeselect__option-arrow-placeholder {\n .narrow-cell();\n}\n\n.vue-treeselect__option-arrow-container {\n .clickable();\n}\n\n.vue-treeselect__option-arrow {\n display: inline-block;\n width: @treeselect-arrow-size;\n height: @treeselect-arrow-size;\n color: @treeselect-arrow-color;\n vertical-align: middle;\n transition: @treeselect-transition-duration transform @treeselect-arrow-transition-timing-function;\n transform: rotateZ(-90deg);\n\n [dir=\"rtl\"] & {\n transform: rotateZ(90deg);\n }\n\n .vue-treeselect__option-arrow-container:hover &,\n .vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover & {\n color: @treeselect-arrow-color-hover;\n }\n}\n\n.vue-treeselect__option-arrow--rotated {\n transform: rotateZ(0);\n\n [dir=\"rtl\"] & {\n transform: rotateZ(0);\n }\n\n &.vue-treeselect__option-arrow--prepare-enter {\n transform: rotateZ(-90deg) !important; // stylelint-disable-line declaration-no-important\n\n [dir=\"rtl\"] & {\n transform: rotateZ(90deg) !important; // stylelint-disable-line declaration-no-important\n }\n }\n}\n\n.vue-treeselect__label-container {\n .cell();\n .clickable();\n\n display: table;\n width: 100%;\n table-layout: fixed;\n color: @treeselect-option-label-color;\n\n .vue-treeselect__option--disabled & {\n .forbidden();\n\n color: @treeselect-option-label-color-disabled;\n }\n}\n\n.vue-treeselect__checkbox-container {\n display: table-cell;\n width: @treeselect-narrow-cell-width;\n min-width: @treeselect-narrow-cell-width;\n height: 100%;\n text-align: center;\n vertical-align: middle;\n}\n\n.vue-treeselect__checkbox {\n display: block;\n margin: auto;\n width: @treeselect-checkbox-size;\n height: @treeselect-checkbox-size;\n border-width: 1px;\n border-style: solid;\n border-radius: @treeselect-border-radius-sm;\n position: relative;\n transition: @treeselect-transition-duration all @ease-out-circ;\n}\n\n.vue-treeselect__check-mark,\n.vue-treeselect__minus-mark {\n display: block;\n position: absolute;\n left: 1px;\n top: 1px;\n background-repeat: no-repeat;\n opacity: 0;\n transition: @treeselect-transition-duration all ease;\n}\n\n.vue-treeselect__minus-mark {\n width: image-width(@treeselect-checkbox-indeterminate-icon);\n height: image-height(@treeselect-checkbox-indeterminate-icon);\n // Svg icons are rendered differently in different browsers thus unacceptable.\n // Png provides the best consistency with a drawback that\n // its color can't be controlled by CSS.\n .retina(@treeselect-checkbox-indeterminate-icon, 3);\n background-size: image-size(@treeselect-checkbox-indeterminate-icon);\n\n .vue-treeselect__checkbox--indeterminate > & {\n opacity: 1;\n }\n\n .vue-treeselect__checkbox--disabled & {\n .retina(@treeselect-checkbox-disabled-indeterminate-icon, 3);\n }\n}\n\n.vue-treeselect__check-mark {\n width: image-width(@treeselect-checkbox-checked-icon);\n height: image-height(@treeselect-checkbox-checked-icon);\n .retina(@treeselect-checkbox-checked-icon, 3);\n background-size: image-size(@treeselect-checkbox-checked-icon);\n // Set initial height to 1px.\n transform: scaleY(1 / unit(image-height(@treeselect-checkbox-checked-icon)));\n\n .vue-treeselect__checkbox--checked > & {\n opacity: 1;\n transform: scaleY(1);\n }\n\n .vue-treeselect__checkbox--disabled & {\n .retina(@treeselect-checkbox-disabled-checked-icon, 3);\n }\n}\n\n.vue-treeselect__checkbox--unchecked {\n border-color: @treeselect-checkbox-border-color;\n background: @treeselect-checkbox-bg;\n\n .vue-treeselect__label-container:hover & {\n border-color: @treeselect-checkbox-border-color-hover;\n background: @treeselect-checkbox-bg-hover;\n }\n}\n\n.vue-treeselect__checkbox--indeterminate {\n border-color: @treeselect-checkbox-indeterminate-border-color;\n background: @treeselect-checkbox-indeterminate-bg;\n\n .vue-treeselect__label-container:hover & {\n border-color: @treeselect-checkbox-indeterminate-border-color-hover;\n background: @treeselect-checkbox-indeterminate-bg-hover;\n }\n}\n\n.vue-treeselect__checkbox--checked {\n border-color: @treeselect-checkbox-checked-border-color;\n background: @treeselect-checkbox-checked-bg;\n\n .vue-treeselect__label-container:hover & {\n border-color: @treeselect-checkbox-checked-border-color-hover;\n background: @treeselect-checkbox-checked-bg-hover;\n }\n}\n\n.vue-treeselect__checkbox--disabled {\n border-color: @treeselect-checkbox-disabled-border-color;\n background-color: @treeselect-checkbox-disabled-bg-color;\n\n .vue-treeselect__label-container:hover & {\n border-color: @treeselect-checkbox-disabled-border-color;\n background-color: @treeselect-checkbox-disabled-bg-color;\n }\n}\n\n\n.vue-treeselect__label {\n .text-truncate();\n\n display: table-cell;\n padding-left: @treeselect-padding;\n max-width: 100%;\n vertical-align: middle;\n cursor: inherit; // override user agent style\n\n [dir=\"rtl\"] & {\n padding-left: 0;\n padding-right: @treeselect-padding;\n }\n}\n\n.vue-treeselect__count {\n margin-left: @treeselect-padding;\n font-weight: 400;\n opacity: 0.6;\n\n [dir=\"rtl\"] & {\n margin-left: 0;\n margin-right: @treeselect-padding;\n }\n}\n\n.vue-treeselect__tip {\n .row();\n\n color: @treeselect-tip-color;\n}\n\n.vue-treeselect__tip-text {\n .wide-cell();\n\n font-size: @treeselect-tip-font-size;\n}\n\n.vue-treeselect__retry {\n .vue-treeselect__error-tip & {\n .clickable();\n\n margin-left: @treeselect-padding;\n font-style: normal;\n font-weight: 600;\n text-decoration: none;\n color: @treeselect-retry-text-color;\n\n [dir=\"rtl\"] & {\n margin-left: 0;\n margin-right: @treeselect-padding;\n }\n }\n}\n\n.vue-treeselect__icon-container {\n .narrow-cell();\n\n .vue-treeselect--single & {\n padding-left: @treeselect-padding;\n\n [dir=\"rtl\"] & {\n padding-left: 0;\n padding-right: @treeselect-padding;\n }\n }\n}\n\n.vue-treeselect__icon-warning {\n .icon();\n .rounded();\n\n position: relative;\n width: @treeselect-icon-size;\n height: @treeselect-icon-size;\n background: @treeselect-warning-icon-bg;\n\n &::after {\n display: block;\n position: absolute;\n content: \"\";\n left: 5px;\n top: 2.5px;\n width: 2px;\n height: 1px;\n border: 0 solid #fff;\n border-top-width: 5px;\n border-bottom-width: 1px;\n }\n}\n\n.vue-treeselect__icon-error {\n .icon();\n .rounded();\n\n @stroke-length: 6px;\n\n position: relative;\n width: @treeselect-icon-size;\n height: @treeselect-icon-size;\n background: @treeselect-error-icon-bg;\n\n &::before,\n &::after {\n display: block;\n position: absolute;\n content: \"\";\n background: #fff;\n transform: rotate(45deg);\n }\n\n &::before {\n width: @stroke-length;\n height: 2px;\n left: 3px;\n top: 5px;\n }\n\n &::after {\n width: 2px;\n height: @stroke-length;\n left: 5px;\n top: 3px;\n }\n}\n\n.vue-treeselect__icon-loader {\n .icon();\n\n position: relative;\n width: @treeselect-icon-size;\n height: @treeselect-icon-size;\n text-align: center;\n animation: @treeselect-loader-animation-duration vue-treeselect-animation-rotate linear infinite;\n\n &::before,\n &::after {\n .rounded();\n\n position: absolute;\n content: \"\";\n left: 0;\n top: 0;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0.6;\n animation: @treeselect-loader-animation-duration vue-treeselect-animation-bounce ease-in-out infinite;\n }\n\n &::before {\n background: @treeselect-loader-color-dark;\n }\n\n &::after {\n background: @treeselect-loader-color-light;\n animation-delay: -(@treeselect-loader-animation-duration / 2);\n }\n}\n\n\n/**\n * Menu Portal\n */\n\n.vue-treeselect__menu-placeholder {\n display: none;\n}\n\n.vue-treeselect__portal-target {\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n height: 0;\n width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n overflow: visible;\n box-sizing: border-box;\n}\n","@md-red-50: #ffebee;\n@md-red-100: #ffcdd2;\n@md-red-200: #ef9a9a;\n@md-red-300: #e57373;\n@md-red-400: #ef5350;\n@md-red-500: #f44336;\n@md-red-600: #e53935;\n@md-red-700: #d32f2f;\n@md-red-800: #c62828;\n@md-red-900: #b71c1c;\n@md-red-a100: #ff8a80;\n@md-red-a200: #ff5252;\n@md-red-a400: #ff1744;\n@md-red-a700: #d50000;\n\n@md-pink-50: #fce4ec;\n@md-pink-100: #f8bbd0;\n@md-pink-200: #f48fb1;\n@md-pink-300: #f06292;\n@md-pink-400: #ec407a;\n@md-pink-500: #e91e63;\n@md-pink-600: #d81b60;\n@md-pink-700: #c2185b;\n@md-pink-800: #ad1457;\n@md-pink-900: #880e4f;\n@md-pink-a100: #ff80ab;\n@md-pink-a200: #ff4081;\n@md-pink-a400: #f50057;\n@md-pink-a700: #c51162;\n\n@md-purple-50: #f3e5f5;\n@md-purple-100: #e1bee7;\n@md-purple-200: #ce93d8;\n@md-purple-300: #ba68c8;\n@md-purple-400: #ab47bc;\n@md-purple-500: #9c27b0;\n@md-purple-600: #8e24aa;\n@md-purple-700: #7b1fa2;\n@md-purple-800: #6a1b9a;\n@md-purple-900: #4a148c;\n@md-purple-a100: #ea80fc;\n@md-purple-a200: #e040fb;\n@md-purple-a400: #d500f9;\n@md-purple-a700: #aa00ff;\n\n@md-deep-purple-50: #ede7f6;\n@md-deep-purple-100: #d1c4e9;\n@md-deep-purple-200: #b39ddb;\n@md-deep-purple-300: #9575cd;\n@md-deep-purple-400: #7e57c2;\n@md-deep-purple-500: #673ab7;\n@md-deep-purple-600: #5e35b1;\n@md-deep-purple-700: #512da8;\n@md-deep-purple-800: #4527a0;\n@md-deep-purple-900: #311b92;\n@md-deep-purple-a100: #b388ff;\n@md-deep-purple-a200: #7c4dff;\n@md-deep-purple-a400: #651fff;\n@md-deep-purple-a700: #6200ea;\n\n@md-indigo-50: #e8eaf6;\n@md-indigo-100: #c5cae9;\n@md-indigo-200: #9fa8da;\n@md-indigo-300: #7986cb;\n@md-indigo-400: #5c6bc0;\n@md-indigo-500: #3f51b5;\n@md-indigo-600: #3949ab;\n@md-indigo-700: #303f9f;\n@md-indigo-800: #283593;\n@md-indigo-900: #1a237e;\n@md-indigo-a100: #8c9eff;\n@md-indigo-a200: #536dfe;\n@md-indigo-a400: #3d5afe;\n@md-indigo-a700: #304ffe;\n\n@md-blue-50: #e3f2fd;\n@md-blue-100: #bbdefb;\n@md-blue-200: #90caf9;\n@md-blue-300: #64b5f6;\n@md-blue-400: #42a5f5;\n@md-blue-500: #2196f3;\n@md-blue-600: #1e88e5;\n@md-blue-700: #1976d2;\n@md-blue-800: #1565c0;\n@md-blue-900: #0d47a1;\n@md-blue-a100: #82b1ff;\n@md-blue-a200: #448aff;\n@md-blue-a400: #2979ff;\n@md-blue-a700: #2962ff;\n\n@md-light-blue-50: #e1f5fe;\n@md-light-blue-100: #b3e5fc;\n@md-light-blue-200: #81d4fa;\n@md-light-blue-300: #4fc3f7;\n@md-light-blue-400: #29b6f6;\n@md-light-blue-500: #03a9f4;\n@md-light-blue-600: #039be5;\n@md-light-blue-700: #0288d1;\n@md-light-blue-800: #0277bd;\n@md-light-blue-900: #01579b;\n@md-light-blue-a100: #80d8ff;\n@md-light-blue-a200: #40c4ff;\n@md-light-blue-a400: #00b0ff;\n@md-light-blue-a700: #0091ea;\n\n@md-cyan-50: #e0f7fa;\n@md-cyan-100: #b2ebf2;\n@md-cyan-200: #80deea;\n@md-cyan-300: #4dd0e1;\n@md-cyan-400: #26c6da;\n@md-cyan-500: #00bcd4;\n@md-cyan-600: #00acc1;\n@md-cyan-700: #0097a7;\n@md-cyan-800: #00838f;\n@md-cyan-900: #006064;\n@md-cyan-a100: #84ffff;\n@md-cyan-a200: #18ffff;\n@md-cyan-a400: #00e5ff;\n@md-cyan-a700: #00b8d4;\n\n@md-teal-50: #e0f2f1;\n@md-teal-100: #b2dfdb;\n@md-teal-200: #80cbc4;\n@md-teal-300: #4db6ac;\n@md-teal-400: #26a69a;\n@md-teal-500: #009688;\n@md-teal-600: #00897b;\n@md-teal-700: #00796b;\n@md-teal-800: #00695c;\n@md-teal-900: #004d40;\n@md-teal-a100: #a7ffeb;\n@md-teal-a200: #64ffda;\n@md-teal-a400: #1de9b6;\n@md-teal-a700: #00bfa5;\n\n@md-green-50: #e8f5e9;\n@md-green-100: #c8e6c9;\n@md-green-200: #a5d6a7;\n@md-green-300: #81c784;\n@md-green-400: #66bb6a;\n@md-green-500: #4caf50;\n@md-green-600: #43a047;\n@md-green-700: #388e3c;\n@md-green-800: #2e7d32;\n@md-green-900: #1b5e20;\n@md-green-a100: #b9f6ca;\n@md-green-a200: #69f0ae;\n@md-green-a400: #00e676;\n@md-green-a700: #00c853;\n\n@md-light-green-50: #f1f8e9;\n@md-light-green-100: #dcedc8;\n@md-light-green-200: #c5e1a5;\n@md-light-green-300: #aed581;\n@md-light-green-400: #9ccc65;\n@md-light-green-500: #8bc34a;\n@md-light-green-600: #7cb342;\n@md-light-green-700: #689f38;\n@md-light-green-800: #558b2f;\n@md-light-green-900: #33691e;\n@md-light-green-a100: #ccff90;\n@md-light-green-a200: #b2ff59;\n@md-light-green-a400: #76ff03;\n@md-light-green-a700: #64dd17;\n\n@md-lime-50: #f9fbe7;\n@md-lime-100: #f0f4c3;\n@md-lime-200: #e6ee9c;\n@md-lime-300: #dce775;\n@md-lime-400: #d4e157;\n@md-lime-500: #cddc39;\n@md-lime-600: #c0ca33;\n@md-lime-700: #afb42b;\n@md-lime-800: #9e9d24;\n@md-lime-900: #827717;\n@md-lime-a100: #f4ff81;\n@md-lime-a200: #eeff41;\n@md-lime-a400: #c6ff00;\n@md-lime-a700: #aeea00;\n\n@md-yellow-50: #fffde7;\n@md-yellow-100: #fff9c4;\n@md-yellow-200: #fff59d;\n@md-yellow-300: #fff176;\n@md-yellow-400: #ffee58;\n@md-yellow-500: #ffeb3b;\n@md-yellow-600: #fdd835;\n@md-yellow-700: #fbc02d;\n@md-yellow-800: #f9a825;\n@md-yellow-900: #f57f17;\n@md-yellow-a100: #ffff8d;\n@md-yellow-a200: #ffff00;\n@md-yellow-a400: #ffea00;\n@md-yellow-a700: #ffd600;\n\n@md-amber-50: #fff8e1;\n@md-amber-100: #ffecb3;\n@md-amber-200: #ffe082;\n@md-amber-300: #ffd54f;\n@md-amber-400: #ffca28;\n@md-amber-500: #ffc107;\n@md-amber-600: #ffb300;\n@md-amber-700: #ffa000;\n@md-amber-800: #ff8f00;\n@md-amber-900: #ff6f00;\n@md-amber-a100: #ffe57f;\n@md-amber-a200: #ffd740;\n@md-amber-a400: #ffc400;\n@md-amber-a700: #ffab00;\n\n@md-orange-50: #fff3e0;\n@md-orange-100: #ffe0b2;\n@md-orange-200: #ffcc80;\n@md-orange-300: #ffb74d;\n@md-orange-400: #ffa726;\n@md-orange-500: #ff9800;\n@md-orange-600: #fb8c00;\n@md-orange-700: #f57c00;\n@md-orange-800: #ef6c00;\n@md-orange-900: #e65100;\n@md-orange-a100: #ffd180;\n@md-orange-a200: #ffab40;\n@md-orange-a400: #ff9100;\n@md-orange-a700: #ff6d00;\n\n@md-deep-orange-50: #fbe9e7;\n@md-deep-orange-100: #ffccbc;\n@md-deep-orange-200: #ffab91;\n@md-deep-orange-300: #ff8a65;\n@md-deep-orange-400: #ff7043;\n@md-deep-orange-500: #ff5722;\n@md-deep-orange-600: #f4511e;\n@md-deep-orange-700: #e64a19;\n@md-deep-orange-800: #d84315;\n@md-deep-orange-900: #bf360c;\n@md-deep-orange-a100: #ff9e80;\n@md-deep-orange-a200: #ff6e40;\n@md-deep-orange-a400: #ff3d00;\n@md-deep-orange-a700: #dd2c00;\n\n@md-brown-50: #efebe9;\n@md-brown-100: #d7ccc8;\n@md-brown-200: #bcaaa4;\n@md-brown-300: #a1887f;\n@md-brown-400: #8d6e63;\n@md-brown-500: #795548;\n@md-brown-600: #6d4c41;\n@md-brown-700: #5d4037;\n@md-brown-800: #4e342e;\n@md-brown-900: #3e2723;\n\n@md-grey-50: #fafafa;\n@md-grey-100: #f5f5f5;\n@md-grey-200: #eeeeee;\n@md-grey-300: #e0e0e0;\n@md-grey-400: #bdbdbd;\n@md-grey-500: #9e9e9e;\n@md-grey-600: #757575;\n@md-grey-700: #616161;\n@md-grey-800: #424242;\n@md-grey-900: #212121;\n\n@md-blue-grey-50: #eceff1;\n@md-blue-grey-100: #cfd8dc;\n@md-blue-grey-200: #b0bec5;\n@md-blue-grey-300: #90a4ae;\n@md-blue-grey-400: #78909c;\n@md-blue-grey-500: #607d8b;\n@md-blue-grey-600: #546e7a;\n@md-blue-grey-700: #455a64;\n@md-blue-grey-800: #37474f;\n@md-blue-grey-900: #263238;\n\n@md-dark-text-primary: rgba(0, 0, 0, 0.87);\n@md-dark-text-secondary: rgba(0, 0, 0, 0.54);\n@md-dark-text-disabled: rgba(0, 0, 0, 0.38);\n@md-dark-text-dividers: rgba(0, 0, 0, 0.12);\n\n@md-light-text-primary: rgba(255, 255, 255, 1);\n@md-light-text-secondary: rgba(255, 255, 255, 0.7);\n@md-light-text-disabled: rgba(255, 255, 255, 0.5);\n@md-light-text-dividers: rgba(255, 255, 255, 0.12);\n\n@md-dark-icons-active: rgba(0, 0, 0, 0.54);\n@md-dark-icons-inactive: rgba(0, 0, 0, 0.38);\n\n@md-light-icons-active: rgba(255, 255, 255, 1);\n@md-light-icons-inactive: rgba(255, 255, 255, 0.5);\n\n@md-white: #ffffff;\n\n@md-black: #000000;\n\n\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.min.css b/dist/vue-treeselect.min.css new file mode 100644 index 00000000..85a02786 --- /dev/null +++ b/dist/vue-treeselect.min.css @@ -0,0 +1,5 @@ +/*! + * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee + * Released under the MIT License. + * https://vue-treeselect.js.org/ + */.vue-treeselect-helper-hide{display:none}.vue-treeselect-helper-zoom-effect-off{-ms-transform:none!important;transform:none!important}@keyframes vue-treeselect-animation-fade-in{0%{opacity:0}}@keyframes vue-treeselect-animation-bounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}@keyframes vue-treeselect-animation-rotate{to{transform:rotate(1turn)}}.vue-treeselect__multi-value-item--transition-enter-active,.vue-treeselect__multi-value-item--transition-leave-active{transition-duration:.2s;transition-property:transform,opacity}.vue-treeselect__multi-value-item--transition-enter-active{transition-timing-function:cubic-bezier(.075,.82,.165,1)}.vue-treeselect__multi-value-item--transition-leave-active{transition-timing-function:cubic-bezier(.215,.61,.355,1);position:absolute}.vue-treeselect__multi-value-item--transition-enter,.vue-treeselect__multi-value-item--transition-leave-to{-ms-transform:scale(.7);transform:scale(.7);opacity:0}.vue-treeselect__multi-value-item--transition-move{transition:transform .2s cubic-bezier(.165,.84,.44,1)}.vue-treeselect{position:relative;text-align:left}[dir=rtl] .vue-treeselect{text-align:right}.vue-treeselect div,.vue-treeselect span{box-sizing:border-box}.vue-treeselect svg{fill:currentColor}.vue-treeselect__control{padding-left:5px;padding-right:5px;display:table;table-layout:fixed;width:100%;height:36px;border:1px solid #ddd;border-radius:5px;background:#fff;transition-duration:.2s;transition-property:border-color,box-shadow,width,height,background-color,opacity;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) .vue-treeselect__control:hover{border-color:#cfcfcf}.vue-treeselect--focused:not(.vue-treeselect--open) .vue-treeselect__control{border-color:#039be5;box-shadow:0 0 0 3px rgba(3,155,229,.1)}.vue-treeselect--disabled .vue-treeselect__control{background-color:#f9f9f9}.vue-treeselect--open .vue-treeselect__control{border-color:#cfcfcf}.vue-treeselect--open.vue-treeselect--open-below .vue-treeselect__control{border-bottom-left-radius:0;border-bottom-right-radius:0}.vue-treeselect--open.vue-treeselect--open-above .vue-treeselect__control{border-top-left-radius:0;border-top-right-radius:0}.vue-treeselect__multi-value,.vue-treeselect__value-container{width:100%;vertical-align:middle}.vue-treeselect__value-container{display:table-cell;position:relative}.vue-treeselect--searchable:not(.vue-treeselect--disabled) .vue-treeselect__value-container{cursor:text}.vue-treeselect__multi-value{display:inline-block}.vue-treeselect--has-value .vue-treeselect__multi-value{margin-bottom:5px}.vue-treeselect__placeholder,.vue-treeselect__single-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:5px;padding-right:5px;position:absolute;top:0;right:0;bottom:0;left:0;line-height:34px;-webkit-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.vue-treeselect__placeholder{color:#bdbdbd}.vue-treeselect__single-value{color:#333}.vue-treeselect--focused.vue-treeselect--searchable .vue-treeselect__single-value{color:#bdbdbd}.vue-treeselect--disabled .vue-treeselect__single-value{position:static}.vue-treeselect__multi-value-item-container{display:inline-block;padding-top:5px;padding-right:5px;vertical-align:top}[dir=rtl] .vue-treeselect__multi-value-item-container{padding-right:0;padding-left:5px}.vue-treeselect__multi-value-item{display:inline-table;padding:2px 0;border:1px solid rgba(0,0,0,0);border-radius:2px;font-size:12px;vertical-align:top}.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-disabled):hover .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new):hover,.vue-treeselect__multi-value-item{cursor:pointer;background:#e3f2fd;color:#039be5}.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-disabled{cursor:default;background:#f5f5f5;color:#757575}.vue-treeselect--disabled .vue-treeselect__multi-value-item{cursor:default;background:#fff;border-color:#e5e5e5;color:#555}.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new,.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new:hover{background:#e8f5e9}.vue-treeselect__multi-value-label,.vue-treeselect__value-remove{display:table-cell;padding:0 5px;vertical-align:middle}.vue-treeselect__value-remove{color:#039be5;padding-left:5px;border-left:1px solid #fff;line-height:0}[dir=rtl] .vue-treeselect__value-remove{border-left:0;border-right:1px solid #fff}.vue-treeselect__multi-value-item:hover .vue-treeselect__value-remove{color:#e53935}.vue-treeselect--disabled .vue-treeselect__value-remove,.vue-treeselect__multi-value-item-disabled .vue-treeselect__value-remove{display:none}.vue-treeselect__value-remove>svg{width:6px;height:6px}.vue-treeselect__multi-value-label{padding-right:5px;white-space:pre-line;-webkit-user-select:none;-ms-user-select:none;user-select:none}.vue-treeselect__limit-tip{display:inline-block;padding-top:5px;padding-right:5px;vertical-align:top}[dir=rtl] .vue-treeselect__limit-tip{padding-right:0;padding-left:5px}.vue-treeselect__limit-tip-text{cursor:default;display:block;margin:2px 0;padding:1px 0;color:#bdbdbd;font-size:12px;font-weight:600}.vue-treeselect__input-container{display:block;max-width:100%;outline:none}.vue-treeselect--single .vue-treeselect__input-container{font-size:inherit;height:100%}.vue-treeselect--multi .vue-treeselect__input-container{display:inline-block;font-size:12px;vertical-align:top}.vue-treeselect--searchable .vue-treeselect__input-container{padding-left:5px;padding-right:5px}.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container{padding-top:5px;padding-left:0}[dir=rtl] .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container{padding-left:5px;padding-right:0}.vue-treeselect--disabled .vue-treeselect__input-container{display:none}.vue-treeselect__input,.vue-treeselect__sizer{margin:0;line-height:inherit;font-family:inherit;font-size:inherit}.vue-treeselect__input{max-width:100%;margin:0;padding:0;border:0;outline:none;box-sizing:content-box;box-shadow:none;background:none rgba(0,0,0,0);line-height:1;vertical-align:middle}.vue-treeselect__input::-ms-clear{display:none}.vue-treeselect--single .vue-treeselect__input{width:100%;height:100%}.vue-treeselect--multi .vue-treeselect__input{padding-top:3px;padding-bottom:3px}.vue-treeselect--has-value .vue-treeselect__input{line-height:inherit;vertical-align:top}.vue-treeselect__sizer{position:absolute;top:0;left:0;visibility:hidden;height:0;overflow:scroll;white-space:pre}.vue-treeselect__x-container{display:table-cell;vertical-align:middle;width:20px;text-align:center;line-height:0;cursor:pointer;color:#ccc;animation:vue-treeselect-animation-fade-in .2s cubic-bezier(.075,.82,.165,1)}.vue-treeselect__x-container:hover{color:#e53935}.vue-treeselect__x{width:8px;height:8px}.vue-treeselect__control-arrow-container{display:table-cell;vertical-align:middle;width:20px;text-align:center;line-height:0;cursor:pointer}.vue-treeselect--disabled .vue-treeselect__control-arrow-container{cursor:default}.vue-treeselect__control-arrow{width:9px;height:9px;color:#ccc}.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover .vue-treeselect__control-arrow{color:#616161}.vue-treeselect--disabled .vue-treeselect__control-arrow{opacity:.35}.vue-treeselect__control-arrow--rotated{-ms-transform:rotate(180deg);transform:rotate(180deg)}.vue-treeselect__menu-container{position:absolute;left:0;width:100%;overflow:visible;transition:0s}.vue-treeselect--open-below:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container{top:100%}.vue-treeselect--open-above:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container{bottom:100%}.vue-treeselect__menu{cursor:default;padding-top:5px;padding-bottom:5px;display:block;position:absolute;overflow-x:hidden;overflow-y:auto;width:auto;border:1px solid #cfcfcf;background:#fff;line-height:180%;-webkit-overflow-scrolling:touch}.vue-treeselect--open-below .vue-treeselect__menu{border-bottom-left-radius:5px;border-bottom-right-radius:5px;top:0;margin-top:-1px;border-top-color:#f2f2f2;box-shadow:0 1px 0 rgba(0,0,0,.06)}.vue-treeselect--open-above .vue-treeselect__menu{border-top-left-radius:5px;border-top-right-radius:5px;bottom:0;margin-bottom:-1px;border-bottom-color:#f2f2f2}.vue-treeselect__indent-level-0 .vue-treeselect__option{padding-left:5px}[dir=rtl] .vue-treeselect__indent-level-0 .vue-treeselect__option{padding-left:5px;padding-right:5px}.vue-treeselect__indent-level-0 .vue-treeselect__tip{padding-left:25px}[dir=rtl] .vue-treeselect__indent-level-0 .vue-treeselect__tip{padding-left:5px;padding-right:25px}.vue-treeselect__indent-level-1 .vue-treeselect__option{padding-left:25px}[dir=rtl] .vue-treeselect__indent-level-1 .vue-treeselect__option{padding-left:5px;padding-right:25px}.vue-treeselect__indent-level-1 .vue-treeselect__tip{padding-left:45px}[dir=rtl] .vue-treeselect__indent-level-1 .vue-treeselect__tip{padding-left:5px;padding-right:45px}.vue-treeselect__indent-level-2 .vue-treeselect__option{padding-left:45px}[dir=rtl] .vue-treeselect__indent-level-2 .vue-treeselect__option{padding-left:5px;padding-right:45px}.vue-treeselect__indent-level-2 .vue-treeselect__tip{padding-left:65px}[dir=rtl] .vue-treeselect__indent-level-2 .vue-treeselect__tip{padding-left:5px;padding-right:65px}.vue-treeselect__indent-level-3 .vue-treeselect__option{padding-left:65px}[dir=rtl] .vue-treeselect__indent-level-3 .vue-treeselect__option{padding-left:5px;padding-right:65px}.vue-treeselect__indent-level-3 .vue-treeselect__tip{padding-left:85px}[dir=rtl] .vue-treeselect__indent-level-3 .vue-treeselect__tip{padding-left:5px;padding-right:85px}.vue-treeselect__indent-level-4 .vue-treeselect__option{padding-left:85px}[dir=rtl] .vue-treeselect__indent-level-4 .vue-treeselect__option{padding-left:5px;padding-right:85px}.vue-treeselect__indent-level-4 .vue-treeselect__tip{padding-left:105px}[dir=rtl] .vue-treeselect__indent-level-4 .vue-treeselect__tip{padding-left:5px;padding-right:105px}.vue-treeselect__indent-level-5 .vue-treeselect__option{padding-left:105px}[dir=rtl] .vue-treeselect__indent-level-5 .vue-treeselect__option{padding-left:5px;padding-right:105px}.vue-treeselect__indent-level-5 .vue-treeselect__tip{padding-left:125px}[dir=rtl] .vue-treeselect__indent-level-5 .vue-treeselect__tip{padding-left:5px;padding-right:125px}.vue-treeselect__indent-level-6 .vue-treeselect__option{padding-left:125px}[dir=rtl] .vue-treeselect__indent-level-6 .vue-treeselect__option{padding-left:5px;padding-right:125px}.vue-treeselect__indent-level-6 .vue-treeselect__tip{padding-left:145px}[dir=rtl] .vue-treeselect__indent-level-6 .vue-treeselect__tip{padding-left:5px;padding-right:145px}.vue-treeselect__indent-level-7 .vue-treeselect__option{padding-left:145px}[dir=rtl] .vue-treeselect__indent-level-7 .vue-treeselect__option{padding-left:5px;padding-right:145px}.vue-treeselect__indent-level-7 .vue-treeselect__tip{padding-left:165px}[dir=rtl] .vue-treeselect__indent-level-7 .vue-treeselect__tip{padding-left:5px;padding-right:165px}.vue-treeselect__indent-level-8 .vue-treeselect__option{padding-left:165px}[dir=rtl] .vue-treeselect__indent-level-8 .vue-treeselect__option{padding-left:5px;padding-right:165px}.vue-treeselect__indent-level-8 .vue-treeselect__tip{padding-left:185px}[dir=rtl] .vue-treeselect__indent-level-8 .vue-treeselect__tip{padding-left:5px;padding-right:185px}.vue-treeselect__option{padding-left:5px;padding-right:5px;display:table;table-layout:fixed;width:100%}.vue-treeselect__option--highlight{background:#f5f5f5}.vue-treeselect--single .vue-treeselect__option--selected{background:#e3f2fd;font-weight:600}.vue-treeselect--single .vue-treeselect__option--selected:hover{background:#e3f2fd}.vue-treeselect__option--hide{display:none}.vue-treeselect__option-arrow-container,.vue-treeselect__option-arrow-placeholder{display:table-cell;vertical-align:middle;width:20px;text-align:center;line-height:0}.vue-treeselect__option-arrow-container{cursor:pointer}.vue-treeselect__option-arrow{display:inline-block;width:9px;height:9px;color:#ccc;vertical-align:middle;transition:transform .2s cubic-bezier(.19,1,.22,1);-ms-transform:rotate(-90deg);transform:rotate(-90deg)}[dir=rtl] .vue-treeselect__option-arrow{-ms-transform:rotate(90deg);transform:rotate(90deg)}.vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover .vue-treeselect__option-arrow,.vue-treeselect__option-arrow-container:hover .vue-treeselect__option-arrow{color:#616161}.vue-treeselect__option-arrow--rotated,[dir=rtl] .vue-treeselect__option-arrow--rotated{-ms-transform:rotate(0);transform:rotate(0)}.vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter{-ms-transform:rotate(-90deg)!important;transform:rotate(-90deg)!important}[dir=rtl] .vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter{-ms-transform:rotate(90deg)!important;transform:rotate(90deg)!important}.vue-treeselect__label-container{display:table-cell;vertical-align:middle;cursor:pointer;display:table;width:100%;table-layout:fixed;color:inherit}.vue-treeselect__option--disabled .vue-treeselect__label-container{cursor:not-allowed;color:rgba(0,0,0,.25)}.vue-treeselect__checkbox-container{display:table-cell;width:20px;min-width:20px;height:100%;text-align:center;vertical-align:middle}.vue-treeselect__checkbox{display:block;margin:auto;width:12px;height:12px;border-width:1px;border-style:solid;border-radius:2px;position:relative;transition:all .2s cubic-bezier(.075,.82,.165,1)}.vue-treeselect__check-mark,.vue-treeselect__minus-mark{display:block;position:absolute;left:1px;top:1px;background-repeat:no-repeat;opacity:0;transition:all .2s ease}.vue-treeselect__minus-mark{width:8px;height:8px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=);background-size:8px 8px}@media (-webkit-min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:288dpi){.vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAAD///////////////+PQt5oAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==)}}.vue-treeselect__checkbox--indeterminate>.vue-treeselect__minus-mark{opacity:1}.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAADi4uLh4eHOxeSRAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=)}@media (-webkit-min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:288dpi){.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAADh4eHg4ODNzc3h4eEYfw2wAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==)}}.vue-treeselect__check-mark{width:8px;height:8px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAQlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////8IX9KGAAAAFXRSTlMA8u24NxILB+Tawb6jiH1zRz0xIQIIP3GUAAAAMklEQVQI1y3FtQEAMQDDQD+EGbz/qkEVOpyEOP6PudKjZNSXn4Jm2CKRdBKzSLsFWl8fMG0Bl6Jk1rMAAAAASUVORK5CYII=);background-size:8px 8px;-ms-transform:scaleY(.125);transform:scaleY(.125)}@media (-webkit-min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC)}}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC)}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:288dpi){.vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAWlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////9ZMre9AAAAHXRSTlMA/PiJhGNI9XlEHJB/b2ldV08+Oibk49vPp6QhAYgGBuwAAACCSURBVCjPrdHdDoIwDAXgTWAqCigo/+f9X5OwnoUwtis4V92XNWladUl+rzQPeQJAN2EHxoOnsPn7/oYk8fxBv08Rr/deOH/aZ2Nm8ZJ+s573QGfWKnNuZGzWm3+lv2V3pcU1XQ385/yjmBoM3Z+dXvlbYLLD3ujhTaOM3KaIXvNkFkuSEvYy1LqOAAAAAElFTkSuQmCC)}}.vue-treeselect__checkbox--checked>.vue-treeselect__check-mark{opacity:1;-ms-transform:scaleY(1);transform:scaleY(1)}.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAP1BMVEUAAADj4+Pf39/h4eHh4eHh4eHk5OTh4eHg4ODi4uLh4eHh4eHg4ODh4eHh4eHg4ODh4eHh4eHp6en////h4eFqcyvUAAAAFHRSTlMAOQfy7bgS5NrBvqOIfXNHMSELAgQ/iFsAAAA2SURBVAjXY4AANjYIzcjMAaVFuBkY+RkEWERYmRjYRXjANAOfiIgIFxNIAa8IpxBEi6AwiAQAK2MBd7xY8csAAAAASUVORK5CYII=)}@media (-webkit-min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==)}}@media (-webkit-min-device-pixel-ratio:3),(min-resolution:288dpi){.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAUVBMVEUAAADh4eHh4eHh4eHh4eHi4uLi4uLh4eHh4eHh4eHf39/j4+Ph4eHh4eHh4eHg4ODi4uLh4eHh4eHi4uLh4eHh4eHh4eHh4eHh4eH////h4eF3FMFTAAAAGnRSTlMA+/eJhGhfSHE9JBzz5KaQf3pXT0Xbz0I5AYDw8F0AAAB+SURBVCjPrdHbDoMgEEVRKAii1dZe9fz/hxplTiKIT7qfYCWTEEZdUvOwbckNAD2WHeh3brHW5f5EzGQ+iN+b1Gt6KPvtv16Dn6JX9M9ya3/A1yfu5dlyduL6Hec7mXY6ddXLPP2lpABGZ8PWXfYLTJxZekVhhl7eTX24zZPNKXoRC7zQLjUAAAAASUVORK5CYII=)}}.vue-treeselect__checkbox--unchecked{border-color:#e0e0e0;background:#fff}.vue-treeselect__label-container:hover .vue-treeselect__checkbox--unchecked{border-color:#039be5;background:#fff}.vue-treeselect__checkbox--checked,.vue-treeselect__checkbox--indeterminate,.vue-treeselect__label-container:hover .vue-treeselect__checkbox--checked,.vue-treeselect__label-container:hover .vue-treeselect__checkbox--indeterminate{border-color:#039be5;background:#039be5}.vue-treeselect__checkbox--disabled,.vue-treeselect__label-container:hover .vue-treeselect__checkbox--disabled{border-color:#e0e0e0;background-color:#f7f7f7}.vue-treeselect__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:table-cell;padding-left:5px;max-width:100%;vertical-align:middle;cursor:inherit}[dir=rtl] .vue-treeselect__label{padding-left:0;padding-right:5px}.vue-treeselect__count{margin-left:5px;font-weight:400;opacity:.6}[dir=rtl] .vue-treeselect__count{margin-left:0;margin-right:5px}.vue-treeselect__tip{padding-left:5px;padding-right:5px;display:table;table-layout:fixed;width:100%;color:#757575}.vue-treeselect__tip-text{display:table-cell;vertical-align:middle;padding-left:5px;padding-right:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;font-size:12px}.vue-treeselect__error-tip .vue-treeselect__retry{cursor:pointer;margin-left:5px;font-style:normal;font-weight:600;text-decoration:none;color:#039be5}[dir=rtl] .vue-treeselect__error-tip .vue-treeselect__retry{margin-left:0;margin-right:5px}.vue-treeselect__icon-container{display:table-cell;vertical-align:middle;width:20px;text-align:center;line-height:0}.vue-treeselect--single .vue-treeselect__icon-container{padding-left:5px}[dir=rtl] .vue-treeselect--single .vue-treeselect__icon-container{padding-left:0;padding-right:5px}.vue-treeselect__icon-warning{display:block;margin:auto;border-radius:50%;position:relative;width:12px;height:12px;background:#fb8c00}.vue-treeselect__icon-warning:after{display:block;position:absolute;content:"";left:5px;top:2.5px;width:2px;height:1px;border-color:#fff;border-style:solid;border-width:5px 0 1px}.vue-treeselect__icon-error{display:block;margin:auto;border-radius:50%;position:relative;width:12px;height:12px;background:#e53935}.vue-treeselect__icon-error:after,.vue-treeselect__icon-error:before{display:block;position:absolute;content:"";background:#fff;-ms-transform:rotate(45deg);transform:rotate(45deg)}.vue-treeselect__icon-error:before{width:6px;height:2px;left:3px;top:5px}.vue-treeselect__icon-error:after{width:2px;height:6px;left:5px;top:3px}.vue-treeselect__icon-loader{display:block;margin:auto;position:relative;width:12px;height:12px;text-align:center;animation:vue-treeselect-animation-rotate 1.6s linear infinite}.vue-treeselect__icon-loader:after,.vue-treeselect__icon-loader:before{border-radius:50%;position:absolute;content:"";left:0;top:0;display:block;width:100%;height:100%;opacity:.6;animation:vue-treeselect-animation-bounce 1.6s ease-in-out infinite}.vue-treeselect__icon-loader:before{background:#039be5}.vue-treeselect__icon-loader:after{background:#b3e5fc;animation-delay:-.8s}.vue-treeselect__menu-placeholder{display:none}.vue-treeselect__portal-target{position:absolute;display:block;left:0;top:0;height:0;width:0;padding:0;margin:0;border:0;overflow:visible;box-sizing:border-box} \ No newline at end of file diff --git a/dist/vue-treeselect.umd.js b/dist/vue-treeselect.umd.js new file mode 100644 index 00000000..78f06967 --- /dev/null +++ b/dist/vue-treeselect.umd.js @@ -0,0 +1,5082 @@ +/*! + * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee + * Released under the MIT License. + * https://vue-treeselect.js.org/ + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("Vue")); + else if(typeof define === 'function' && define.amd) + define(["Vue"], factory); + else if(typeof exports === 'object') + exports["VueTreeselect"] = factory(require("Vue")); + else + root["VueTreeselect"] = factory(root["Vue"]); +})(window, function(__WEBPACK_EXTERNAL_MODULE__36__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/"; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 38); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithHoles = __webpack_require__(1); + +var iterableToArrayLimit = __webpack_require__(2); + +var unsupportedIterableToArray = __webpack_require__(3); + +var nonIterableRest = __webpack_require__(5); + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArray; + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +module.exports = _arrayWithHoles; + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +module.exports = _iterableToArrayLimit; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__(4); + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +} + +module.exports = _unsupportedIterableToArray; + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + + return arr2; +} + +module.exports = _arrayLikeToArray; + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _nonIterableRest; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithoutHoles = __webpack_require__(7); + +var iterableToArray = __webpack_require__(8); + +var unsupportedIterableToArray = __webpack_require__(3); + +var nonIterableSpread = __webpack_require__(9); + +function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); +} + +module.exports = _toConsumableArray; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__(4); + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); +} + +module.exports = _arrayWithoutHoles; + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); +} + +module.exports = _iterableToArray; + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _nonIterableSpread; + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +module.exports = _defineProperty; + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = noop; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(13), + now = __webpack_require__(14), + toNumber = __webpack_require__(18); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(15); + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +module.exports = now; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__(16); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17))) + +/***/ }), +/* 17 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(13), + isSymbol = __webpack_require__(19); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = toNumber; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(20), + isObjectLike = __webpack_require__(24); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(21), + getRawTag = __webpack_require__(22), + objectToString = __webpack_require__(23); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(15); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(21); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +module.exports = isPromise; + +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; +} + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +var before = __webpack_require__(27); + +/** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ +function once(func) { + return before(2, func); +} + +module.exports = once; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(28); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +var toFinite = __webpack_require__(29); + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +module.exports = toInteger; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +var toNumber = __webpack_require__(18); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +module.exports = toFinite; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + + return _typeof(obj); +} + +module.exports = _typeof; + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +module.exports = last; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function fuzzysearch (needle, haystack) { + var tlen = haystack.length; + var qlen = needle.length; + if (qlen > tlen) { + return false; + } + if (qlen === tlen) { + return needle === haystack; + } + outer: for (var i = 0, j = 0; i < qlen; i++) { + var nch = needle.charCodeAt(i); + while (j < tlen) { + if (haystack.charCodeAt(j++) === nch) { + continue outer; + } + } + return false; + } + return true; +} + +module.exports = fuzzysearch; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/ + +module.exports = function mergeJSXProps (objs) { + return objs.reduce(function (a, b) { + var aa, bb, key, nestedKey, temp + for (key in b) { + aa = a[key] + bb = b[key] + if (aa && nestRE.test(key)) { + // normalize class + if (key === 'class') { + if (typeof aa === 'string') { + temp = aa + a[key] = aa = {} + aa[temp] = true + } + if (typeof bb === 'string') { + temp = bb + b[key] = bb = {} + bb[temp] = true + } + } + if (key === 'on' || key === 'nativeOn' || key === 'hook') { + // merge functions + for (nestedKey in bb) { + aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey]) + } + } else if (Array.isArray(aa)) { + a[key] = aa.concat(bb) + } else if (Array.isArray(bb)) { + a[key] = [aa].concat(bb) + } else { + for (nestedKey in bb) { + aa[nestedKey] = bb[nestedKey] + } + } + } else { + a[key] = b[key] + } + } + return a + }, {}) +} + +function mergeFn (a, b) { + return function () { + a && a.apply(this, arguments) + b && b.apply(this, arguments) + } +} + + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__36__; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 38 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "Treeselect", function() { return /* reexport */ Treeselect; }); +__webpack_require__.d(__webpack_exports__, "treeselectMixin", function() { return /* reexport */ treeselectMixin; }); +__webpack_require__.d(__webpack_exports__, "LOAD_ROOT_OPTIONS", function() { return /* reexport */ LOAD_ROOT_OPTIONS; }); +__webpack_require__.d(__webpack_exports__, "LOAD_CHILDREN_OPTIONS", function() { return /* reexport */ LOAD_CHILDREN_OPTIONS; }); +__webpack_require__.d(__webpack_exports__, "ASYNC_SEARCH", function() { return /* reexport */ ASYNC_SEARCH; }); +__webpack_require__.d(__webpack_exports__, "VERSION", function() { return /* binding */ VERSION; }); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(0); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js +var toConsumableArray = __webpack_require__(6); +var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js +var defineProperty = __webpack_require__(10); +var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); + +// EXTERNAL MODULE: ./node_modules/lodash/noop.js +var noop = __webpack_require__(11); + +// CONCATENATED MODULE: ./src/utils/noop.js + +// CONCATENATED MODULE: ./src/utils/warning.js + + +var warning_warning = false ? undefined : function warning(checker, complainer) { + if (!checker()) { + var _console; + + var message = ['[Vue-Treeselect Warning]'].concat(complainer()); + + (_console = console).error.apply(_console, toConsumableArray_default()(message)); + } +}; +// CONCATENATED MODULE: ./src/utils/onLeftClick.js +function onLeftClick(mouseDownHandler) { + return function onMouseDown(evt) { + if (evt.type === 'mousedown' && evt.button === 0) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + mouseDownHandler.call.apply(mouseDownHandler, [this, evt].concat(args)); + } + }; +} +// CONCATENATED MODULE: ./src/utils/scrollIntoView.js +function scrollIntoView($scrollingEl, $focusedEl) { + var scrollingReact = $scrollingEl.getBoundingClientRect(); + var focusedRect = $focusedEl.getBoundingClientRect(); + var overScroll = $focusedEl.offsetHeight / 3; + + if (focusedRect.bottom + overScroll > scrollingReact.bottom) { + $scrollingEl.scrollTop = Math.min($focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll, $scrollingEl.scrollHeight); + } else if (focusedRect.top - overScroll < scrollingReact.top) { + $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0); + } +} +// EXTERNAL MODULE: ./node_modules/lodash/debounce.js +var debounce = __webpack_require__(12); +var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce); + +// CONCATENATED MODULE: ./src/utils/debounce.js + +// CONCATENATED MODULE: ./node_modules/watch-size/index.es.mjs +var index_es_index = (function (element, listener) { + var expand = document.createElement('_'); + var shrink = expand.appendChild(document.createElement('_')); + var expandChild = expand.appendChild(document.createElement('_')); + var shrinkChild = shrink.appendChild(document.createElement('_')); + + var lastWidth = void 0, + lastHeight = void 0; + + shrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1'; + shrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%'; + shrinkChild.style.width = shrinkChild.style.height = '200%'; + + element.appendChild(expand); + + test(); + + return stop; + + function test() { + unbind(); + + var width = element.offsetWidth; + var height = element.offsetHeight; + + if (width !== lastWidth || height !== lastHeight) { + lastWidth = width; + lastHeight = height; + + expandChild.style.width = width * 2 + 'px'; + expandChild.style.height = height * 2 + 'px'; + + expand.scrollLeft = expand.scrollWidth; + expand.scrollTop = expand.scrollHeight; + shrink.scrollLeft = shrink.scrollWidth; + shrink.scrollTop = shrink.scrollHeight; + + listener({ width: width, height: height }); + } + + shrink.addEventListener('scroll', test); + expand.addEventListener('scroll', test); + } + + function unbind() { + shrink.removeEventListener('scroll', test); + expand.removeEventListener('scroll', test); + } + + function stop() { + unbind(); + + element.removeChild(expand); + } +}); + +/* harmony default export */ var index_es = (index_es_index); + +// CONCATENATED MODULE: ./src/utils/removeFromArray.js +function removeFromArray(arr, elem) { + var idx = arr.indexOf(elem); + if (idx !== -1) arr.splice(idx, 1); +} +// CONCATENATED MODULE: ./src/utils/watchSize.js + + +var intervalId; +var registered = []; +var INTERVAL_DURATION = 100; + +function run() { + intervalId = setInterval(function () { + registered.forEach(test); + }, INTERVAL_DURATION); +} + +function stop() { + clearInterval(intervalId); + intervalId = null; +} + +function test(item) { + var $el = item.$el, + listener = item.listener, + lastWidth = item.lastWidth, + lastHeight = item.lastHeight; + var width = $el.offsetWidth; + var height = $el.offsetHeight; + + if (lastWidth !== width || lastHeight !== height) { + item.lastWidth = width; + item.lastHeight = height; + listener({ + width: width, + height: height + }); + } +} + +function watchSizeForIE9($el, listener) { + var item = { + $el: $el, + listener: listener, + lastWidth: null, + lastHeight: null + }; + + var unwatch = function unwatch() { + removeFromArray(registered, item); + if (!registered.length) stop(); + }; + + registered.push(item); + test(item); + run(); + return unwatch; +} + +function watchSize($el, listener) { + var isIE9 = document.documentMode === 9; + var locked = true; + + var wrappedListener = function wrappedListener() { + return locked || listener.apply(void 0, arguments); + }; + + var implementation = isIE9 ? watchSizeForIE9 : index_es; + var removeSizeWatcher = implementation($el, wrappedListener); + locked = false; + return removeSizeWatcher; +} +// CONCATENATED MODULE: ./src/utils/setupResizeAndScrollEventListeners.js +function findScrollParents($el) { + var $scrollParents = []; + var $parent = $el.parentNode; + + while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) { + if (isScrollElment($parent)) $scrollParents.push($parent); + $parent = $parent.parentNode; + } + + $scrollParents.push(window); + return $scrollParents; +} + +function isScrollElment($el) { + var _getComputedStyle = getComputedStyle($el), + overflow = _getComputedStyle.overflow, + overflowX = _getComputedStyle.overflowX, + overflowY = _getComputedStyle.overflowY; + + return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX); +} + +function setupResizeAndScrollEventListeners($el, listener) { + var $scrollParents = findScrollParents($el); + window.addEventListener('resize', listener, { + passive: true + }); + $scrollParents.forEach(function (scrollParent) { + scrollParent.addEventListener('scroll', listener, { + passive: true + }); + }); + return function removeEventListeners() { + window.removeEventListener('resize', listener, { + passive: true + }); + $scrollParents.forEach(function ($scrollParent) { + $scrollParent.removeEventListener('scroll', listener, { + passive: true + }); + }); + }; +} +// CONCATENATED MODULE: ./src/utils/isNaN.js +function isNaN_isNaN(x) { + return x !== x; +} +// EXTERNAL MODULE: ./node_modules/is-promise/index.js +var is_promise = __webpack_require__(25); +var is_promise_default = /*#__PURE__*/__webpack_require__.n(is_promise); + +// CONCATENATED MODULE: ./src/utils/isPromise.js + +// EXTERNAL MODULE: ./node_modules/lodash/once.js +var once = __webpack_require__(26); +var once_default = /*#__PURE__*/__webpack_require__.n(once); + +// CONCATENATED MODULE: ./src/utils/once.js + +// EXTERNAL MODULE: ./node_modules/lodash/identity.js +var identity = __webpack_require__(30); +var identity_default = /*#__PURE__*/__webpack_require__.n(identity); + +// CONCATENATED MODULE: ./src/utils/identity.js + +// EXTERNAL MODULE: ./node_modules/lodash/constant.js +var constant = __webpack_require__(31); +var constant_default = /*#__PURE__*/__webpack_require__.n(constant); + +// CONCATENATED MODULE: ./src/utils/constant.js + +// CONCATENATED MODULE: ./src/utils/createMap.js +var createMap = function createMap() { + return Object.create(null); +}; +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js +var helpers_typeof = __webpack_require__(32); +var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof); + +// CONCATENATED MODULE: ./src/utils/deepExtend.js + + +function isPlainObject(value) { + if (value == null || typeof_default()(value) !== 'object') return false; + return Object.getPrototypeOf(value) === Object.prototype; +} + +function copy(obj, key, value) { + if (isPlainObject(value)) { + obj[key] || (obj[key] = {}); + deepExtend(obj[key], value); + } else { + obj[key] = value; + } +} + +function deepExtend(target, source) { + if (isPlainObject(source)) { + var keys = Object.keys(source); + + for (var i = 0, len = keys.length; i < len; i++) { + copy(target, keys[i], source[keys[i]]); + } + } + + return target; +} +// EXTERNAL MODULE: ./node_modules/lodash/last.js +var lodash_last = __webpack_require__(33); +var last_default = /*#__PURE__*/__webpack_require__.n(lodash_last); + +// CONCATENATED MODULE: ./src/utils/last.js + +// CONCATENATED MODULE: ./src/utils/includes.js +function includes(arrOrStr, elem) { + return arrOrStr.indexOf(elem) !== -1; +} +// CONCATENATED MODULE: ./src/utils/find.js +function find(arr, predicate, ctx) { + for (var i = 0, len = arr.length; i < len; i++) { + if (predicate.call(ctx, arr[i], i, arr)) return arr[i]; + } + + return undefined; +} +// CONCATENATED MODULE: ./src/utils/quickDiff.js +function quickDiff(arrA, arrB) { + if (arrA.length !== arrB.length) return true; + + for (var i = 0; i < arrA.length; i++) { + if (arrA[i] !== arrB[i]) return true; + } + + return false; +} +// CONCATENATED MODULE: ./src/utils/index.js + + + + + + + + + + + + + + + + + + + +// CONCATENATED MODULE: ./src/constants.js +var NO_PARENT_NODE = null; +var UNCHECKED = 0; +var INDETERMINATE = 1; +var CHECKED = 2; +var ALL_CHILDREN = 'ALL_CHILDREN'; +var ALL_DESCENDANTS = 'ALL_DESCENDANTS'; +var LEAF_CHILDREN = 'LEAF_CHILDREN'; +var LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'; +var LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'; +var LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'; +var ASYNC_SEARCH = 'ASYNC_SEARCH'; +var ALL = 'ALL'; +var BRANCH_PRIORITY = 'BRANCH_PRIORITY'; +var LEAF_PRIORITY = 'LEAF_PRIORITY'; +var ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'; +var ORDER_SELECTED = 'ORDER_SELECTED'; +var LEVEL = 'LEVEL'; +var INDEX = 'INDEX'; +var KEY_CODES = { + BACKSPACE: 8, + ENTER: 13, + ESCAPE: 27, + END: 35, + HOME: 36, + ARROW_LEFT: 37, + ARROW_UP: 38, + ARROW_RIGHT: 39, + ARROW_DOWN: 40, + DELETE: 46 +}; +var INPUT_DEBOUNCE_DELAY = false ? undefined : 200; +var MIN_INPUT_WIDTH = 5; +var MENU_BUFFER = 40; +// EXTERNAL MODULE: ./node_modules/fuzzysearch/index.js +var fuzzysearch = __webpack_require__(34); +var fuzzysearch_default = /*#__PURE__*/__webpack_require__.n(fuzzysearch); + +// CONCATENATED MODULE: ./src/mixins/treeselectMixin.js + + + + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + + + + + +function sortValueByIndex(a, b) { + var i = 0; + + do { + if (a.level < i) return -1; + if (b.level < i) return 1; + if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]; + i++; + } while (true); +} + +function sortValueByLevel(a, b) { + return a.level === b.level ? sortValueByIndex(a, b) : a.level - b.level; +} + +function createAsyncOptionsStates() { + return { + isLoaded: false, + isLoading: false, + loadingError: '' + }; +} + +function slugify(str) { + var map = { + a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä', + e: 'é|è|ê|ë|E|É|È|Ê|Ë', + i: 'í|ì|î|ï|I|Í|Ì|Î|Ï', + o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö', + u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü' + }; + str = str.toLowerCase(); + + for (var pattern in map) { + str = str.replace(new RegExp(map[pattern], 'g'), pattern); + } + + return str; +} + +function stringifyOptionPropValue(value) { + if (typeof value === 'string') return value; + if (typeof value === 'number' && !isNaN_isNaN(value)) return value + ''; + return ''; +} + +function match(enableFuzzyMatch, replaceAccents, needle, haystack) { + return enableFuzzyMatch ? fuzzysearch_default()(needle, haystack) : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle); +} + +function getErrorMessage(err) { + return err.message || String(err); +} + +var instanceId = 0; +/* harmony default export */ var treeselectMixin = ({ + provide: function provide() { + return { + instance: this + }; + }, + props: { + allowClearingDisabled: { + type: Boolean, + default: false + }, + allowSelectingDisabledDescendants: { + type: Boolean, + default: false + }, + alwaysOpen: { + type: Boolean, + default: false + }, + appendToBody: { + type: Boolean, + default: false + }, + async: { + type: Boolean, + default: false + }, + autoFocus: { + type: Boolean, + default: false + }, + autoLoadRootOptions: { + type: Boolean, + default: true + }, + autoDeselectAncestors: { + type: Boolean, + default: false + }, + autoDeselectDescendants: { + type: Boolean, + default: false + }, + autoSelectAncestors: { + type: Boolean, + default: false + }, + autoSelectDescendants: { + type: Boolean, + default: false + }, + backspaceRemoves: { + type: Boolean, + default: true + }, + beforeClearAll: { + type: Function, + default: constant_default()(true) + }, + branchNodesFirst: { + type: Boolean, + default: false + }, + cacheOptions: { + type: Boolean, + default: true + }, + clearable: { + type: Boolean, + default: true + }, + clearAllText: { + type: String, + default: 'Clear all' + }, + clearOnSelect: { + type: Boolean, + default: false + }, + clearValueText: { + type: String, + default: 'Clear value' + }, + closeOnSelect: { + type: Boolean, + default: true + }, + defaultExpandLevel: { + type: Number, + default: 0 + }, + defaultOptions: { + default: false + }, + deleteRemoves: { + type: Boolean, + default: true + }, + delimiter: { + type: String, + default: ',' + }, + flattenSearchResults: { + type: Boolean, + default: false + }, + disableBranchNodes: { + type: Boolean, + default: false + }, + disabled: { + type: Boolean, + default: false + }, + disableFuzzyMatching: { + type: Boolean, + default: false + }, + flat: { + type: Boolean, + default: false + }, + instanceId: { + default: function _default() { + return "".concat(instanceId++, "$$"); + }, + type: [String, Number] + }, + joinValues: { + type: Boolean, + default: false + }, + limit: { + type: Number, + default: Infinity + }, + limitText: { + type: Function, + default: function limitTextDefault(count) { + return "and ".concat(count, " more"); + } + }, + loadingText: { + type: String, + default: 'Loading...' + }, + loadOptions: { + type: Function + }, + matchKeys: { + type: Array, + default: constant_default()(['label']) + }, + maxHeight: { + type: Number, + default: 300 + }, + multiple: { + type: Boolean, + default: false + }, + name: { + type: String + }, + noChildrenText: { + type: String, + default: 'No sub-options.' + }, + noOptionsText: { + type: String, + default: 'No options available.' + }, + noResultsText: { + type: String, + default: 'No results found...' + }, + normalizer: { + type: Function, + default: identity_default.a + }, + openDirection: { + type: String, + default: 'auto', + validator: function validator(value) { + var acceptableValues = ['auto', 'top', 'bottom', 'above', 'below']; + return includes(acceptableValues, value); + } + }, + openOnClick: { + type: Boolean, + default: true + }, + openOnFocus: { + type: Boolean, + default: false + }, + options: { + type: Array + }, + placeholder: { + type: String, + default: 'Select...' + }, + required: { + type: Boolean, + default: false + }, + retryText: { + type: String, + default: 'Retry?' + }, + retryTitle: { + type: String, + default: 'Click to retry' + }, + searchable: { + type: Boolean, + default: true + }, + searchNested: { + type: Boolean, + default: false + }, + searchPromptText: { + type: String, + default: 'Type to search...' + }, + showCount: { + type: Boolean, + default: false + }, + showCountOf: { + type: String, + default: ALL_CHILDREN, + validator: function validator(value) { + var acceptableValues = [ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS]; + return includes(acceptableValues, value); + } + }, + showCountOnSearch: null, + sortValueBy: { + type: String, + default: ORDER_SELECTED, + validator: function validator(value) { + var acceptableValues = [ORDER_SELECTED, LEVEL, INDEX]; + return includes(acceptableValues, value); + } + }, + tabIndex: { + type: Number, + default: 0 + }, + value: null, + valueConsistsOf: { + type: String, + default: BRANCH_PRIORITY, + validator: function validator(value) { + var acceptableValues = [ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE]; + return includes(acceptableValues, value); + } + }, + valueFormat: { + type: String, + default: 'id' + }, + zIndex: { + type: [Number, String], + default: 999 + }, + inputDebounceDelay: { + type: Number, + default: INPUT_DEBOUNCE_DELAY + }, + replaceAccents: { + type: Boolean, + default: false + } + }, + data: function data() { + return { + trigger: { + isFocused: false, + searchQuery: '' + }, + menu: { + isOpen: false, + current: null, + lastScrollPosition: 0, + placement: 'bottom' + }, + forest: { + normalizedOptions: [], + nodeMap: createMap(), + checkedStateMap: createMap(), + selectedNodeIds: this.extractCheckedNodeIdsFromValue(), + selectedNodeMap: createMap() + }, + rootOptionsStates: createAsyncOptionsStates(), + localSearch: { + active: false, + noResults: true, + countMap: createMap() + }, + remoteSearch: createMap() + }; + }, + computed: { + selectedNodes: function selectedNodes() { + return this.forest.selectedNodeIds.map(this.getNode); + }, + internalValue: function internalValue() { + var _this = this; + + var internalValue; + + if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) { + internalValue = this.forest.selectedNodeIds.slice(); + } else if (this.valueConsistsOf === BRANCH_PRIORITY) { + internalValue = this.forest.selectedNodeIds.filter(function (id) { + var node = _this.getNode(id); + + if (node.isRootNode) return true; + return !_this.isSelected(node.parentNode); + }); + } else if (this.valueConsistsOf === LEAF_PRIORITY) { + internalValue = this.forest.selectedNodeIds.filter(function (id) { + var node = _this.getNode(id); + + if (node.isLeaf) return true; + return node.children.length === 0; + }); + } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) { + var _internalValue; + + var indeterminateNodeIds = []; + internalValue = this.forest.selectedNodeIds.slice(); + this.selectedNodes.forEach(function (selectedNode) { + selectedNode.ancestors.forEach(function (ancestor) { + if (includes(indeterminateNodeIds, ancestor.id)) return; + if (includes(internalValue, ancestor.id)) return; + indeterminateNodeIds.push(ancestor.id); + }); + }); + + (_internalValue = internalValue).push.apply(_internalValue, indeterminateNodeIds); + } + + if (this.sortValueBy === LEVEL) { + internalValue.sort(function (a, b) { + return sortValueByLevel(_this.getNode(a), _this.getNode(b)); + }); + } else if (this.sortValueBy === INDEX) { + internalValue.sort(function (a, b) { + return sortValueByIndex(_this.getNode(a), _this.getNode(b)); + }); + } + + return internalValue; + }, + hasValue: function hasValue() { + return this.internalValue.length > 0; + }, + single: function single() { + return !this.multiple; + }, + visibleOptionIds: function visibleOptionIds() { + var _this2 = this; + + var visibleOptionIds = []; + this.traverseAllNodesByIndex(function (node) { + if (!_this2.localSearch.active || _this2.shouldOptionBeIncludedInSearchResult(node)) { + visibleOptionIds.push(node.id); + } + + if (node.isBranch && !_this2.shouldExpand(node)) { + return false; + } + }); + return visibleOptionIds; + }, + hasVisibleOptions: function hasVisibleOptions() { + return this.visibleOptionIds.length !== 0; + }, + showCountOnSearchComputed: function showCountOnSearchComputed() { + return typeof this.showCountOnSearch === 'boolean' ? this.showCountOnSearch : this.showCount; + }, + hasBranchNodes: function hasBranchNodes() { + return this.forest.normalizedOptions.some(function (rootNode) { + return rootNode.isBranch; + }); + }, + shouldFlattenOptions: function shouldFlattenOptions() { + return this.localSearch.active && this.flattenSearchResults; + } + }, + watch: { + alwaysOpen: function alwaysOpen(newValue) { + if (newValue) this.openMenu();else this.closeMenu(); + }, + branchNodesFirst: function branchNodesFirst() { + this.initialize(); + }, + disabled: function disabled(newValue) { + if (newValue && this.menu.isOpen) this.closeMenu();else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu(); + }, + flat: function flat() { + this.initialize(); + }, + internalValue: function internalValue(newValue, oldValue) { + var hasChanged = quickDiff(newValue, oldValue); + if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId()); + }, + matchKeys: function matchKeys() { + this.initialize(); + }, + multiple: function multiple(newValue) { + if (newValue) this.buildForestState(); + }, + options: { + handler: function handler() { + if (this.async) return; + this.initialize(); + this.rootOptionsStates.isLoaded = Array.isArray(this.options); + }, + deep: true, + immediate: true + }, + 'trigger.searchQuery': function triggerSearchQuery() { + if (this.async) { + this.handleRemoteSearch(); + } else { + this.handleLocalSearch(); + } + + this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId()); + }, + value: function value() { + var nodeIdsFromValue = this.extractCheckedNodeIdsFromValue(); + var hasChanged = quickDiff(nodeIdsFromValue, this.internalValue); + if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue); + } + }, + methods: { + verifyProps: function verifyProps() { + var _this3 = this; + + warning_warning(function () { + return _this3.async ? _this3.searchable : true; + }, function () { + return 'For async search mode, the value of "searchable" prop must be true.'; + }); + + if (this.options == null && !this.loadOptions) { + warning_warning(function () { + return false; + }, function () { + return 'Are you meant to dynamically load options? You need to use "loadOptions" prop.'; + }); + } + + if (this.flat) { + warning_warning(function () { + return _this3.multiple; + }, function () { + return 'You are using flat mode. But you forgot to add "multiple=true"?'; + }); + } + + if (!this.flat) { + var propNames = ['autoSelectAncestors', 'autoSelectDescendants', 'autoDeselectAncestors', 'autoDeselectDescendants']; + propNames.forEach(function (propName) { + warning_warning(function () { + return !_this3[propName]; + }, function () { + return "\"".concat(propName, "\" only applies to flat mode."); + }); + }); + } + }, + resetFlags: function resetFlags() { + this._blurOnSelect = false; + }, + initialize: function initialize() { + var options = this.async ? this.getRemoteSearchEntry().options : this.options; + + if (Array.isArray(options)) { + var prevNodeMap = this.forest.nodeMap; + this.forest.nodeMap = createMap(); + this.keepDataOfSelectedNodes(prevNodeMap); + this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap); + this.fixSelectedNodeIds(this.internalValue); + } else { + this.forest.normalizedOptions = []; + } + }, + getInstanceId: function getInstanceId() { + return this.instanceId == null ? this.id : this.instanceId; + }, + getValue: function getValue() { + var _this4 = this; + + if (this.valueFormat === 'id') { + return this.multiple ? this.internalValue.slice() : this.internalValue[0]; + } + + var rawNodes = this.internalValue.map(function (id) { + return _this4.getNode(id).raw; + }); + return this.multiple ? rawNodes : rawNodes[0]; + }, + getNode: function getNode(nodeId) { + warning_warning(function () { + return nodeId != null; + }, function () { + return "Invalid node id: ".concat(nodeId); + }); + if (nodeId == null) return null; + return nodeId in this.forest.nodeMap ? this.forest.nodeMap[nodeId] : this.createFallbackNode(nodeId); + }, + createFallbackNode: function createFallbackNode(id) { + var raw = this.extractNodeFromValue(id); + var label = this.enhancedNormalizer(raw).label || "".concat(id, " (unknown)"); + var fallbackNode = { + id: id, + label: label, + ancestors: [], + parentNode: NO_PARENT_NODE, + isFallbackNode: true, + isRootNode: true, + isLeaf: true, + isBranch: false, + isDisabled: false, + isNew: false, + index: [-1], + level: 0, + raw: raw + }; + return this.$set(this.forest.nodeMap, id, fallbackNode); + }, + extractCheckedNodeIdsFromValue: function extractCheckedNodeIdsFromValue() { + var _this5 = this; + + if (this.value == null) return []; + + if (this.valueFormat === 'id') { + return this.multiple ? this.value.slice() : [this.value]; + } + + return (this.multiple ? this.value : [this.value]).map(function (node) { + return _this5.enhancedNormalizer(node); + }).map(function (node) { + return node.id; + }); + }, + extractNodeFromValue: function extractNodeFromValue(id) { + var _this6 = this; + + var defaultNode = { + id: id + }; + + if (this.valueFormat === 'id') { + return defaultNode; + } + + var valueArray = this.multiple ? Array.isArray(this.value) ? this.value : [] : this.value ? [this.value] : []; + var matched = find(valueArray, function (node) { + return node && _this6.enhancedNormalizer(node).id === id; + }); + return matched || defaultNode; + }, + fixSelectedNodeIds: function fixSelectedNodeIds(nodeIdListOfPrevValue) { + var _this7 = this; + + var nextSelectedNodeIds = []; + + if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) { + nextSelectedNodeIds = nodeIdListOfPrevValue; + } else if (this.valueConsistsOf === BRANCH_PRIORITY) { + nodeIdListOfPrevValue.forEach(function (nodeId) { + nextSelectedNodeIds.push(nodeId); + + var node = _this7.getNode(nodeId); + + if (node.isBranch) _this7.traverseDescendantsBFS(node, function (descendant) { + nextSelectedNodeIds.push(descendant.id); + }); + }); + } else if (this.valueConsistsOf === LEAF_PRIORITY) { + var map = createMap(); + var queue = nodeIdListOfPrevValue.slice(); + + while (queue.length) { + var nodeId = queue.shift(); + var node = this.getNode(nodeId); + nextSelectedNodeIds.push(nodeId); + if (node.isRootNode) continue; + if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length; + if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id); + } + } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) { + var _map = createMap(); + + var _queue = nodeIdListOfPrevValue.filter(function (nodeId) { + var node = _this7.getNode(nodeId); + + return node.isLeaf || node.children.length === 0; + }); + + while (_queue.length) { + var _nodeId = _queue.shift(); + + var _node = this.getNode(_nodeId); + + nextSelectedNodeIds.push(_nodeId); + if (_node.isRootNode) continue; + if (!(_node.parentNode.id in _map)) _map[_node.parentNode.id] = _node.parentNode.children.length; + if (--_map[_node.parentNode.id] === 0) _queue.push(_node.parentNode.id); + } + } + + var hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds); + if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds; + this.buildForestState(); + }, + keepDataOfSelectedNodes: function keepDataOfSelectedNodes(prevNodeMap) { + var _this8 = this; + + this.forest.selectedNodeIds.forEach(function (id) { + if (!prevNodeMap[id]) return; + + var node = _objectSpread({}, prevNodeMap[id], { + isFallbackNode: true + }); + + _this8.$set(_this8.forest.nodeMap, id, node); + }); + }, + isSelected: function isSelected(node) { + return this.forest.selectedNodeMap[node.id] === true; + }, + traverseDescendantsBFS: function traverseDescendantsBFS(parentNode, callback) { + if (!parentNode.isBranch) return; + var queue = parentNode.children.slice(); + + while (queue.length) { + var currNode = queue[0]; + if (currNode.isBranch) queue.push.apply(queue, toConsumableArray_default()(currNode.children)); + callback(currNode); + queue.shift(); + } + }, + traverseDescendantsDFS: function traverseDescendantsDFS(parentNode, callback) { + var _this9 = this; + + if (!parentNode.isBranch) return; + parentNode.children.forEach(function (child) { + _this9.traverseDescendantsDFS(child, callback); + + callback(child); + }); + }, + traverseAllNodesDFS: function traverseAllNodesDFS(callback) { + var _this10 = this; + + this.forest.normalizedOptions.forEach(function (rootNode) { + _this10.traverseDescendantsDFS(rootNode, callback); + + callback(rootNode); + }); + }, + traverseAllNodesByIndex: function traverseAllNodesByIndex(callback) { + var walk = function walk(parentNode) { + parentNode.children.forEach(function (child) { + if (callback(child) !== false && child.isBranch) { + walk(child); + } + }); + }; + + walk({ + children: this.forest.normalizedOptions + }); + }, + toggleClickOutsideEvent: function toggleClickOutsideEvent(enabled) { + if (enabled) { + document.addEventListener('mousedown', this.handleClickOutside, false); + } else { + document.removeEventListener('mousedown', this.handleClickOutside, false); + } + }, + getValueContainer: function getValueContainer() { + return this.$refs.control.$refs['value-container']; + }, + getInput: function getInput() { + return this.getValueContainer().$refs.input; + }, + focusInput: function focusInput() { + this.getInput().focus(); + }, + blurInput: function blurInput() { + this.getInput().blur(); + }, + handleMouseDown: onLeftClick(function handleMouseDown(evt) { + evt.preventDefault(); + evt.stopPropagation(); + if (this.disabled) return; + var isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target); + + if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) { + this.openMenu(); + } + + if (this._blurOnSelect) { + this.blurInput(); + } else { + this.focusInput(); + } + + this.resetFlags(); + }), + handleClickOutside: function handleClickOutside(evt) { + if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) { + this.blurInput(); + this.closeMenu(); + } + }, + handleLocalSearch: function handleLocalSearch() { + var _this11 = this; + + var searchQuery = this.trigger.searchQuery; + + var done = function done() { + return _this11.resetHighlightedOptionWhenNecessary(true); + }; + + if (!searchQuery) { + this.localSearch.active = false; + return done(); + } + + this.localSearch.active = true; + this.localSearch.noResults = true; + this.traverseAllNodesDFS(function (node) { + if (node.isBranch) { + var _this11$$set; + + node.isExpandedOnSearch = false; + node.showAllChildrenOnSearch = false; + node.isMatched = false; + node.hasMatchedDescendants = false; + + _this11.$set(_this11.localSearch.countMap, node.id, (_this11$$set = {}, defineProperty_default()(_this11$$set, ALL_CHILDREN, 0), defineProperty_default()(_this11$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this11$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this11$$set, LEAF_DESCENDANTS, 0), _this11$$set)); + } + }); + var lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase(); + var splitSearchQuery = lowerCasedSearchQuery.replace(/\s+/g, ' ').split(' '); + this.traverseAllNodesDFS(function (node) { + if (_this11.searchNested && splitSearchQuery.length > 1) { + node.isMatched = splitSearchQuery.every(function (filterValue) { + return match(false, false, filterValue, node.nestedSearchLabel); + }); + } else { + node.isMatched = _this11.matchKeys.some(function (matchKey) { + return match(!_this11.disableFuzzyMatching, _this11.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]); + }); + } + + if (node.isMatched) { + _this11.localSearch.noResults = false; + node.ancestors.forEach(function (ancestor) { + return _this11.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++; + }); + if (node.isLeaf) node.ancestors.forEach(function (ancestor) { + return _this11.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++; + }); + + if (node.parentNode !== NO_PARENT_NODE) { + _this11.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1; + if (node.isLeaf) _this11.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1; + } + } + + if ((node.isMatched || node.isBranch && node.isExpandedOnSearch) && node.parentNode !== NO_PARENT_NODE) { + node.parentNode.isExpandedOnSearch = true; + node.parentNode.hasMatchedDescendants = true; + } + }); + done(); + }, + handleRemoteSearch: function handleRemoteSearch() { + var _this12 = this; + + var searchQuery = this.trigger.searchQuery; + var entry = this.getRemoteSearchEntry(); + + var done = function done() { + _this12.initialize(); + + _this12.resetHighlightedOptionWhenNecessary(true); + }; + + if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) { + return done(); + } + + this.callLoadOptionsProp({ + action: ASYNC_SEARCH, + args: { + searchQuery: searchQuery + }, + isPending: function isPending() { + return entry.isLoading; + }, + start: function start() { + entry.isLoading = true; + entry.isLoaded = false; + entry.loadingError = ''; + }, + succeed: function succeed(options) { + entry.isLoaded = true; + entry.options = options; + if (_this12.trigger.searchQuery === searchQuery) done(); + }, + fail: function fail(err) { + entry.loadingError = getErrorMessage(err); + }, + end: function end() { + entry.isLoading = false; + } + }); + }, + getRemoteSearchEntry: function getRemoteSearchEntry() { + var _this13 = this; + + var searchQuery = this.trigger.searchQuery; + + var entry = this.remoteSearch[searchQuery] || _objectSpread({}, createAsyncOptionsStates(), { + options: [] + }); + + this.$watch(function () { + return entry.options; + }, function () { + if (_this13.trigger.searchQuery === searchQuery) _this13.initialize(); + }, { + deep: true + }); + + if (searchQuery === '') { + if (Array.isArray(this.defaultOptions)) { + entry.options = this.defaultOptions; + entry.isLoaded = true; + return entry; + } else if (this.defaultOptions !== true) { + entry.isLoaded = true; + return entry; + } + } + + if (!this.remoteSearch[searchQuery]) { + this.$set(this.remoteSearch, searchQuery, entry); + } + + return entry; + }, + shouldExpand: function shouldExpand(node) { + return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded; + }, + shouldOptionBeIncludedInSearchResult: function shouldOptionBeIncludedInSearchResult(node) { + if (node.isMatched) return true; + if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true; + if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true; + return false; + }, + shouldShowOptionInMenu: function shouldShowOptionInMenu(node) { + if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) { + return false; + } + + return true; + }, + getControl: function getControl() { + return this.$refs.control.$el; + }, + getMenu: function getMenu() { + var ref = this.appendToBody ? this.$refs.portal.portalTarget : this; + var $menu = ref.$refs.menu.$refs.menu; + return $menu && $menu.nodeName !== '#comment' ? $menu : null; + }, + setCurrentHighlightedOption: function setCurrentHighlightedOption(node) { + var _this14 = this; + + var scroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var prev = this.menu.current; + + if (prev != null && prev in this.forest.nodeMap) { + this.forest.nodeMap[prev].isHighlighted = false; + } + + this.menu.current = node.id; + node.isHighlighted = true; + + if (this.menu.isOpen && scroll) { + var scrollToOption = function scrollToOption() { + var $menu = _this14.getMenu(); + + var $option = $menu.querySelector(".vue-treeselect__option[data-id=\"".concat(node.id, "\"]")); + if ($option) scrollIntoView($menu, $option); + }; + + if (this.getMenu()) { + scrollToOption(); + } else { + this.$nextTick(scrollToOption); + } + } + }, + resetHighlightedOptionWhenNecessary: function resetHighlightedOptionWhenNecessary() { + var forceReset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var current = this.menu.current; + + if (forceReset || current == null || !(current in this.forest.nodeMap) || !this.shouldShowOptionInMenu(this.getNode(current))) { + this.highlightFirstOption(); + } + }, + highlightFirstOption: function highlightFirstOption() { + if (!this.hasVisibleOptions) return; + var first = this.visibleOptionIds[0]; + this.setCurrentHighlightedOption(this.getNode(first)); + }, + highlightPrevOption: function highlightPrevOption() { + if (!this.hasVisibleOptions) return; + var prev = this.visibleOptionIds.indexOf(this.menu.current) - 1; + if (prev === -1) return this.highlightLastOption(); + this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev])); + }, + highlightNextOption: function highlightNextOption() { + if (!this.hasVisibleOptions) return; + var next = this.visibleOptionIds.indexOf(this.menu.current) + 1; + if (next === this.visibleOptionIds.length) return this.highlightFirstOption(); + this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next])); + }, + highlightLastOption: function highlightLastOption() { + if (!this.hasVisibleOptions) return; + var last = last_default()(this.visibleOptionIds); + this.setCurrentHighlightedOption(this.getNode(last)); + }, + resetSearchQuery: function resetSearchQuery() { + this.trigger.searchQuery = ''; + }, + closeMenu: function closeMenu() { + if (!this.menu.isOpen || !this.disabled && this.alwaysOpen) return; + this.saveMenuScrollPosition(); + this.menu.isOpen = false; + this.toggleClickOutsideEvent(false); + this.resetSearchQuery(); + this.$emit('close', this.getValue(), this.getInstanceId()); + }, + openMenu: function openMenu() { + if (this.disabled || this.menu.isOpen) return; + this.menu.isOpen = true; + this.$nextTick(this.resetHighlightedOptionWhenNecessary); + this.$nextTick(this.restoreMenuScrollPosition); + if (!this.options && !this.async) this.loadRootOptions(); + this.toggleClickOutsideEvent(true); + this.$emit('open', this.getInstanceId()); + }, + toggleMenu: function toggleMenu() { + if (this.menu.isOpen) { + this.closeMenu(); + } else { + this.openMenu(); + } + }, + toggleExpanded: function toggleExpanded(node) { + var nextState; + + if (this.localSearch.active) { + nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch; + if (nextState) node.showAllChildrenOnSearch = true; + } else { + nextState = node.isExpanded = !node.isExpanded; + } + + if (nextState && !node.childrenStates.isLoaded) { + this.loadChildrenOptions(node); + } + }, + buildForestState: function buildForestState() { + var _this15 = this; + + var selectedNodeMap = createMap(); + this.forest.selectedNodeIds.forEach(function (selectedNodeId) { + selectedNodeMap[selectedNodeId] = true; + }); + this.forest.selectedNodeMap = selectedNodeMap; + var checkedStateMap = createMap(); + + if (this.multiple) { + this.traverseAllNodesByIndex(function (node) { + checkedStateMap[node.id] = UNCHECKED; + }); + this.selectedNodes.forEach(function (selectedNode) { + checkedStateMap[selectedNode.id] = CHECKED; + + if (!_this15.flat && !_this15.disableBranchNodes) { + selectedNode.ancestors.forEach(function (ancestorNode) { + if (!_this15.isSelected(ancestorNode)) { + checkedStateMap[ancestorNode.id] = INDETERMINATE; + } + }); + } + }); + } + + this.forest.checkedStateMap = checkedStateMap; + }, + enhancedNormalizer: function enhancedNormalizer(raw) { + return _objectSpread({}, raw, {}, this.normalizer(raw, this.getInstanceId())); + }, + normalize: function normalize(parentNode, nodes, prevNodeMap) { + var _this16 = this; + + var normalizedOptions = nodes.map(function (node) { + return [_this16.enhancedNormalizer(node), node]; + }).map(function (_ref, index) { + var _ref2 = slicedToArray_default()(_ref, 2), + node = _ref2[0], + raw = _ref2[1]; + + _this16.checkDuplication(node); + + _this16.verifyNodeShape(node); + + var id = node.id, + label = node.label, + children = node.children, + isDefaultExpanded = node.isDefaultExpanded; + var isRootNode = parentNode === NO_PARENT_NODE; + var level = isRootNode ? 0 : parentNode.level + 1; + var isBranch = Array.isArray(children) || children === null; + var isLeaf = !isBranch; + var isDisabled = !!node.isDisabled || !_this16.flat && !isRootNode && parentNode.isDisabled; + var isNew = !!node.isNew; + + var lowerCased = _this16.matchKeys.reduce(function (prev, key) { + return _objectSpread({}, prev, defineProperty_default()({}, key, stringifyOptionPropValue(node[key]).toLocaleLowerCase())); + }, {}); + + var nestedSearchLabel = isRootNode ? lowerCased.label : parentNode.nestedSearchLabel + ' ' + lowerCased.label; + + var normalized = _this16.$set(_this16.forest.nodeMap, id, createMap()); + + _this16.$set(normalized, 'id', id); + + _this16.$set(normalized, 'label', label); + + _this16.$set(normalized, 'level', level); + + _this16.$set(normalized, 'ancestors', isRootNode ? [] : [parentNode].concat(parentNode.ancestors)); + + _this16.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index)); + + _this16.$set(normalized, 'parentNode', parentNode); + + _this16.$set(normalized, 'lowerCased', lowerCased); + + _this16.$set(normalized, 'nestedSearchLabel', nestedSearchLabel); + + _this16.$set(normalized, 'isDisabled', isDisabled); + + _this16.$set(normalized, 'isNew', isNew); + + _this16.$set(normalized, 'isMatched', false); + + _this16.$set(normalized, 'isHighlighted', false); + + _this16.$set(normalized, 'isBranch', isBranch); + + _this16.$set(normalized, 'isLeaf', isLeaf); + + _this16.$set(normalized, 'isRootNode', isRootNode); + + _this16.$set(normalized, 'raw', raw); + + if (isBranch) { + var _this16$$set; + + var isLoaded = Array.isArray(children); + + _this16.$set(normalized, 'childrenStates', _objectSpread({}, createAsyncOptionsStates(), { + isLoaded: isLoaded + })); + + _this16.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean' ? isDefaultExpanded : level < _this16.defaultExpandLevel); + + _this16.$set(normalized, 'hasMatchedDescendants', false); + + _this16.$set(normalized, 'hasDisabledDescendants', false); + + _this16.$set(normalized, 'isExpandedOnSearch', false); + + _this16.$set(normalized, 'showAllChildrenOnSearch', false); + + _this16.$set(normalized, 'count', (_this16$$set = {}, defineProperty_default()(_this16$$set, ALL_CHILDREN, 0), defineProperty_default()(_this16$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this16$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this16$$set, LEAF_DESCENDANTS, 0), _this16$$set)); + + _this16.$set(normalized, 'children', isLoaded ? _this16.normalize(normalized, children, prevNodeMap) : []); + + if (isDefaultExpanded === true) normalized.ancestors.forEach(function (ancestor) { + ancestor.isExpanded = true; + }); + + if (!isLoaded && typeof _this16.loadOptions !== 'function') { + warning_warning(function () { + return false; + }, function () { + return 'Unloaded branch node detected. "loadOptions" prop is required to load its children.'; + }); + } else if (!isLoaded && normalized.isExpanded) { + _this16.loadChildrenOptions(normalized); + } + } + + normalized.ancestors.forEach(function (ancestor) { + return ancestor.count[ALL_DESCENDANTS]++; + }); + if (isLeaf) normalized.ancestors.forEach(function (ancestor) { + return ancestor.count[LEAF_DESCENDANTS]++; + }); + + if (!isRootNode) { + parentNode.count[ALL_CHILDREN] += 1; + if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1; + if (isDisabled) parentNode.hasDisabledDescendants = true; + } + + if (prevNodeMap && prevNodeMap[id]) { + var prev = prevNodeMap[id]; + normalized.isMatched = prev.isMatched; + normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch; + normalized.isHighlighted = prev.isHighlighted; + + if (prev.isBranch && normalized.isBranch) { + normalized.isExpanded = prev.isExpanded; + normalized.isExpandedOnSearch = prev.isExpandedOnSearch; + + if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) { + normalized.isExpanded = false; + } else { + normalized.childrenStates = _objectSpread({}, prev.childrenStates); + } + } + } + + return normalized; + }); + + if (this.branchNodesFirst) { + var branchNodes = normalizedOptions.filter(function (option) { + return option.isBranch; + }); + var leafNodes = normalizedOptions.filter(function (option) { + return option.isLeaf; + }); + normalizedOptions = branchNodes.concat(leafNodes); + } + + return normalizedOptions; + }, + loadRootOptions: function loadRootOptions() { + var _this17 = this; + + this.callLoadOptionsProp({ + action: LOAD_ROOT_OPTIONS, + isPending: function isPending() { + return _this17.rootOptionsStates.isLoading; + }, + start: function start() { + _this17.rootOptionsStates.isLoading = true; + _this17.rootOptionsStates.loadingError = ''; + }, + succeed: function succeed() { + _this17.rootOptionsStates.isLoaded = true; + + _this17.$nextTick(function () { + _this17.resetHighlightedOptionWhenNecessary(true); + }); + }, + fail: function fail(err) { + _this17.rootOptionsStates.loadingError = getErrorMessage(err); + }, + end: function end() { + _this17.rootOptionsStates.isLoading = false; + } + }); + }, + loadChildrenOptions: function loadChildrenOptions(parentNode) { + var _this18 = this; + + var id = parentNode.id, + raw = parentNode.raw; + this.callLoadOptionsProp({ + action: LOAD_CHILDREN_OPTIONS, + args: { + parentNode: raw + }, + isPending: function isPending() { + return _this18.getNode(id).childrenStates.isLoading; + }, + start: function start() { + _this18.getNode(id).childrenStates.isLoading = true; + _this18.getNode(id).childrenStates.loadingError = ''; + }, + succeed: function succeed() { + _this18.getNode(id).childrenStates.isLoaded = true; + }, + fail: function fail(err) { + _this18.getNode(id).childrenStates.loadingError = getErrorMessage(err); + }, + end: function end() { + _this18.getNode(id).childrenStates.isLoading = false; + } + }); + }, + callLoadOptionsProp: function callLoadOptionsProp(_ref3) { + var action = _ref3.action, + args = _ref3.args, + isPending = _ref3.isPending, + start = _ref3.start, + succeed = _ref3.succeed, + fail = _ref3.fail, + end = _ref3.end; + + if (!this.loadOptions || isPending()) { + return; + } + + start(); + var callback = once_default()(function (err, result) { + if (err) { + fail(err); + } else { + succeed(result); + } + + end(); + }); + var result = this.loadOptions(_objectSpread({ + id: this.getInstanceId(), + instanceId: this.getInstanceId(), + action: action + }, args, { + callback: callback + })); + + if (is_promise_default()(result)) { + result.then(function () { + callback(); + }, function (err) { + callback(err); + }).catch(function (err) { + console.error(err); + }); + } + }, + checkDuplication: function checkDuplication(node) { + var _this19 = this; + + warning_warning(function () { + return !(node.id in _this19.forest.nodeMap && !_this19.forest.nodeMap[node.id].isFallbackNode); + }, function () { + return "Detected duplicate presence of node id ".concat(JSON.stringify(node.id), ". ") + "Their labels are \"".concat(_this19.forest.nodeMap[node.id].label, "\" and \"").concat(node.label, "\" respectively."); + }); + }, + verifyNodeShape: function verifyNodeShape(node) { + warning_warning(function () { + return !(node.children === undefined && node.isBranch === true); + }, function () { + return 'Are you meant to declare an unloaded branch node? ' + '`isBranch: true` is no longer supported, please use `children: null` instead.'; + }); + }, + select: function select(node) { + if (this.disabled || node.isDisabled) { + return; + } + + if (this.single) { + this.clear(); + } + + var nextState = this.multiple && !this.flat ? this.forest.checkedStateMap[node.id] === UNCHECKED : !this.isSelected(node); + + if (nextState) { + this._selectNode(node); + } else { + this._deselectNode(node); + } + + this.buildForestState(); + + if (nextState) { + this.$emit('select', node.raw, this.getInstanceId()); + } else { + this.$emit('deselect', node.raw, this.getInstanceId()); + } + + if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) { + this.resetSearchQuery(); + } + + if (this.single && this.closeOnSelect) { + this.closeMenu(); + + if (this.searchable) { + this._blurOnSelect = true; + } + } + }, + clear: function clear() { + var _this20 = this; + + if (this.hasValue) { + if (this.single || this.allowClearingDisabled) { + this.forest.selectedNodeIds = []; + } else { + this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(function (nodeId) { + return _this20.getNode(nodeId).isDisabled; + }); + } + + this.buildForestState(); + } + }, + _selectNode: function _selectNode(node) { + var _this21 = this; + + if (this.single || this.disableBranchNodes) { + return this.addValue(node); + } + + if (this.flat) { + this.addValue(node); + + if (this.autoSelectAncestors) { + node.ancestors.forEach(function (ancestor) { + if (!_this21.isSelected(ancestor) && !ancestor.isDisabled) _this21.addValue(ancestor); + }); + } else if (this.autoSelectDescendants) { + this.traverseDescendantsBFS(node, function (descendant) { + if (!_this21.isSelected(descendant) && !descendant.isDisabled) _this21.addValue(descendant); + }); + } + + return; + } + + var isFullyChecked = node.isLeaf || !node.hasDisabledDescendants || this.allowSelectingDisabledDescendants; + + if (isFullyChecked) { + this.addValue(node); + } + + if (node.isBranch) { + this.traverseDescendantsBFS(node, function (descendant) { + if (!descendant.isDisabled || _this21.allowSelectingDisabledDescendants) { + _this21.addValue(descendant); + } + }); + } + + if (isFullyChecked) { + var curr = node; + + while ((curr = curr.parentNode) !== NO_PARENT_NODE) { + if (curr.children.every(this.isSelected)) this.addValue(curr);else break; + } + } + }, + _deselectNode: function _deselectNode(node) { + var _this22 = this; + + if (this.disableBranchNodes) { + return this.removeValue(node); + } + + if (this.flat) { + this.removeValue(node); + + if (this.autoDeselectAncestors) { + node.ancestors.forEach(function (ancestor) { + if (_this22.isSelected(ancestor) && !ancestor.isDisabled) _this22.removeValue(ancestor); + }); + } else if (this.autoDeselectDescendants) { + this.traverseDescendantsBFS(node, function (descendant) { + if (_this22.isSelected(descendant) && !descendant.isDisabled) _this22.removeValue(descendant); + }); + } + + return; + } + + var hasUncheckedSomeDescendants = false; + + if (node.isBranch) { + this.traverseDescendantsDFS(node, function (descendant) { + if (!descendant.isDisabled || _this22.allowSelectingDisabledDescendants) { + _this22.removeValue(descendant); + + hasUncheckedSomeDescendants = true; + } + }); + } + + if (node.isLeaf || hasUncheckedSomeDescendants || node.children.length === 0) { + this.removeValue(node); + var curr = node; + + while ((curr = curr.parentNode) !== NO_PARENT_NODE) { + if (this.isSelected(curr)) this.removeValue(curr);else break; + } + } + }, + addValue: function addValue(node) { + this.forest.selectedNodeIds.push(node.id); + this.forest.selectedNodeMap[node.id] = true; + }, + removeValue: function removeValue(node) { + removeFromArray(this.forest.selectedNodeIds, node.id); + delete this.forest.selectedNodeMap[node.id]; + }, + removeLastValue: function removeLastValue() { + if (!this.hasValue) return; + if (this.single) return this.clear(); + var lastValue = last_default()(this.internalValue); + var lastSelectedNode = this.getNode(lastValue); + this.select(lastSelectedNode); + }, + saveMenuScrollPosition: function saveMenuScrollPosition() { + var $menu = this.getMenu(); + if ($menu) this.menu.lastScrollPosition = $menu.scrollTop; + }, + restoreMenuScrollPosition: function restoreMenuScrollPosition() { + var $menu = this.getMenu(); + if ($menu) $menu.scrollTop = this.menu.lastScrollPosition; + } + }, + created: function created() { + this.verifyProps(); + this.resetFlags(); + }, + mounted: function mounted() { + if (this.autoFocus) this.focusInput(); + if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions(); + if (this.alwaysOpen) this.openMenu(); + if (this.async && this.defaultOptions) this.handleRemoteSearch(); + }, + destroyed: function destroyed() { + this.toggleClickOutsideEvent(false); + } +}); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HiddenFields.vue?vue&type=script&lang=js& + + +function stringifyValue(value) { + if (typeof value === 'string') return value; + if (value != null && !isNaN_isNaN(value)) return JSON.stringify(value); + return ''; +} + +/* harmony default export */ var HiddenFieldsvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--hidden-fields', + inject: ['instance'], + functional: true, + render: function render(_, context) { + var h = arguments[0]; + var instance = context.injections.instance; + if (!instance.name || instance.disabled || !instance.hasValue) return null; + var stringifiedValues = instance.internalValue.map(stringifyValue); + if (instance.multiple && instance.joinValues) stringifiedValues = [stringifiedValues.join(instance.delimiter)]; + return stringifiedValues.map(function (stringifiedValue, i) { + return h("input", { + attrs: { + type: "hidden", + name: instance.name + }, + domProps: { + "value": stringifiedValue + }, + key: 'hidden-field-' + i + }); + }); + } +}); +// CONCATENATED MODULE: ./src/components/HiddenFields.vue?vue&type=script&lang=js& + /* harmony default export */ var components_HiddenFieldsvue_type_script_lang_js_ = (HiddenFieldsvue_type_script_lang_js_); +// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. + +function normalizeComponent ( + scriptExports, + render, + staticRenderFns, + functionalTemplate, + injectStyles, + scopeId, + moduleIdentifier, /* server only */ + shadowMode /* vue-cli only */ +) { + // Vue.extend constructor export interop + var options = typeof scriptExports === 'function' + ? scriptExports.options + : scriptExports + + // render functions + if (render) { + options.render = render + options.staticRenderFns = staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true + } + + // scopedId + if (scopeId) { + options._scopeId = 'data-v-' + scopeId + } + + var hook + if (moduleIdentifier) { // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = shadowMode + ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } + : injectStyles + } + + if (hook) { + if (options.functional) { + // for template-only hot-reload because in that case the render fn doesn't + // go through the normalizer + options._injectStyles = hook + // register for functional component in vue file + var originalRender = options.render + options.render = function renderWithStyleInjection (h, context) { + hook.call(context) + return originalRender(h, context) + } + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate + options.beforeCreate = existing + ? [].concat(existing, hook) + : [hook] + } + } + + return { + exports: scriptExports, + options: options + } +} + +// CONCATENATED MODULE: ./src/components/HiddenFields.vue +var HiddenFields_render, staticRenderFns + + + + +/* normalize component */ + +var component = normalizeComponent( + components_HiddenFieldsvue_type_script_lang_js_, + HiddenFields_render, + staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var api; } +component.options.__file = "src/components/HiddenFields.vue" +/* harmony default export */ var HiddenFields = (component.exports); +// EXTERNAL MODULE: ./node_modules/babel-helper-vue-jsx-merge-props/index.js +var babel_helper_vue_jsx_merge_props = __webpack_require__(35); +var babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Input.vue?vue&type=script&lang=js& + + + +var keysThatRequireMenuBeingOpen = [KEY_CODES.ENTER, KEY_CODES.END, KEY_CODES.HOME, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN]; +/* harmony default export */ var Inputvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--input', + inject: ['instance'], + data: function data() { + return { + inputWidth: MIN_INPUT_WIDTH, + value: '' + }; + }, + computed: { + needAutoSize: function needAutoSize() { + var instance = this.instance; + return instance.searchable && !instance.disabled && instance.multiple; + }, + inputStyle: function inputStyle() { + return { + width: this.needAutoSize ? "".concat(this.inputWidth, "px") : null + }; + } + }, + watch: { + 'instance.trigger.searchQuery': function instanceTriggerSearchQuery(newValue) { + this.value = newValue; + }, + value: function value() { + if (this.needAutoSize) this.$nextTick(this.updateInputWidth); + } + }, + created: function created() { + this.debouncedCallback = debounce_default()(this.updateSearchQuery, this.instance.inputDebounceDelay, { + leading: false, + trailing: true + }); + }, + methods: { + clear: function clear() { + this.onInput({ + target: { + value: '' + } + }); + }, + focus: function focus() { + var instance = this.instance; + + if (!instance.disabled) { + this.$refs.input && this.$refs.input.focus(); + } + }, + blur: function blur() { + this.$refs.input && this.$refs.input.blur(); + }, + onFocus: function onFocus() { + var instance = this.instance; + instance.trigger.isFocused = true; + if (instance.openOnFocus) instance.openMenu(); + }, + onBlur: function onBlur() { + var instance = this.instance; + var menu = instance.getMenu(); + + if (menu && document.activeElement === menu) { + return this.focus(); + } + + instance.trigger.isFocused = false; + instance.closeMenu(); + }, + onInput: function onInput(evt) { + var value = evt.target.value; + this.value = value; + + if (value) { + this.debouncedCallback(); + } else { + this.debouncedCallback.cancel(); + this.updateSearchQuery(); + } + }, + onKeyDown: function onKeyDown(evt) { + var instance = this.instance; + var key = 'which' in evt ? evt.which : evt.keyCode; + if (evt.ctrlKey || evt.shiftKey || evt.altKey || evt.metaKey) return; + + if (!instance.menu.isOpen && includes(keysThatRequireMenuBeingOpen, key)) { + evt.preventDefault(); + return instance.openMenu(); + } + + switch (key) { + case KEY_CODES.BACKSPACE: + { + if (instance.backspaceRemoves && !this.value.length) { + instance.removeLastValue(); + } + + break; + } + + case KEY_CODES.ENTER: + { + evt.preventDefault(); + if (instance.menu.current === null) return; + var current = instance.getNode(instance.menu.current); + if (current.isBranch && instance.disableBranchNodes) return; + instance.select(current); + break; + } + + case KEY_CODES.ESCAPE: + { + if (this.value.length) { + this.clear(); + } else if (instance.menu.isOpen) { + instance.closeMenu(); + } + + break; + } + + case KEY_CODES.END: + { + evt.preventDefault(); + instance.highlightLastOption(); + break; + } + + case KEY_CODES.HOME: + { + evt.preventDefault(); + instance.highlightFirstOption(); + break; + } + + case KEY_CODES.ARROW_LEFT: + { + var _current = instance.getNode(instance.menu.current); + + if (_current.isBranch && instance.shouldExpand(_current)) { + evt.preventDefault(); + instance.toggleExpanded(_current); + } else if (!_current.isRootNode && (_current.isLeaf || _current.isBranch && !instance.shouldExpand(_current))) { + evt.preventDefault(); + instance.setCurrentHighlightedOption(_current.parentNode); + } + + break; + } + + case KEY_CODES.ARROW_UP: + { + evt.preventDefault(); + instance.highlightPrevOption(); + break; + } + + case KEY_CODES.ARROW_RIGHT: + { + var _current2 = instance.getNode(instance.menu.current); + + if (_current2.isBranch && !instance.shouldExpand(_current2)) { + evt.preventDefault(); + instance.toggleExpanded(_current2); + } + + break; + } + + case KEY_CODES.ARROW_DOWN: + { + evt.preventDefault(); + instance.highlightNextOption(); + break; + } + + case KEY_CODES.DELETE: + { + if (instance.deleteRemoves && !this.value.length) { + instance.removeLastValue(); + } + + break; + } + + default: + { + instance.openMenu(); + } + } + }, + onMouseDown: function onMouseDown(evt) { + if (this.value.length) { + evt.stopPropagation(); + } + }, + renderInputContainer: function renderInputContainer() { + var h = this.$createElement; + var instance = this.instance; + var props = {}; + var children = []; + + if (instance.searchable && !instance.disabled) { + children.push(this.renderInput()); + if (this.needAutoSize) children.push(this.renderSizer()); + } + + if (!instance.searchable) { + deepExtend(props, { + on: { + focus: this.onFocus, + blur: this.onBlur, + keydown: this.onKeyDown + }, + ref: 'input' + }); + } + + if (!instance.searchable && !instance.disabled) { + deepExtend(props, { + attrs: { + tabIndex: instance.tabIndex + } + }); + } + + return h("div", babel_helper_vue_jsx_merge_props_default()([{ + "class": "vue-treeselect__input-container" + }, props]), [children]); + }, + renderInput: function renderInput() { + var h = this.$createElement; + var instance = this.instance; + return h("input", { + ref: "input", + "class": "vue-treeselect__input", + attrs: { + type: "text", + autocomplete: "off", + tabIndex: instance.tabIndex, + required: instance.required && !instance.hasValue + }, + domProps: { + "value": this.value + }, + style: this.inputStyle, + on: { + "focus": this.onFocus, + "input": this.onInput, + "blur": this.onBlur, + "keydown": this.onKeyDown, + "mousedown": this.onMouseDown + } + }); + }, + renderSizer: function renderSizer() { + var h = this.$createElement; + return h("div", { + ref: "sizer", + "class": "vue-treeselect__sizer" + }, [this.value]); + }, + updateInputWidth: function updateInputWidth() { + this.inputWidth = Math.max(MIN_INPUT_WIDTH, this.$refs.sizer.scrollWidth + 15); + }, + updateSearchQuery: function updateSearchQuery() { + var instance = this.instance; + instance.trigger.searchQuery = this.value; + } + }, + render: function render() { + return this.renderInputContainer(); + } +}); +// CONCATENATED MODULE: ./src/components/Input.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Inputvue_type_script_lang_js_ = (Inputvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Input.vue +var Input_render, Input_staticRenderFns + + + + +/* normalize component */ + +var Input_component = normalizeComponent( + components_Inputvue_type_script_lang_js_, + Input_render, + Input_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Input_api; } +Input_component.options.__file = "src/components/Input.vue" +/* harmony default export */ var Input = (Input_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Placeholder.vue?vue&type=script&lang=js& +/* harmony default export */ var Placeholdervue_type_script_lang_js_ = ({ + name: 'vue-treeselect--placeholder', + inject: ['instance'], + render: function render() { + var h = arguments[0]; + var instance = this.instance; + var placeholderClass = { + 'vue-treeselect__placeholder': true, + 'vue-treeselect-helper-zoom-effect-off': true, + 'vue-treeselect-helper-hide': instance.hasValue || instance.trigger.searchQuery + }; + return h("div", { + "class": placeholderClass + }, [instance.placeholder]); + } +}); +// CONCATENATED MODULE: ./src/components/Placeholder.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Placeholdervue_type_script_lang_js_ = (Placeholdervue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Placeholder.vue +var Placeholder_render, Placeholder_staticRenderFns + + + + +/* normalize component */ + +var Placeholder_component = normalizeComponent( + components_Placeholdervue_type_script_lang_js_, + Placeholder_render, + Placeholder_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Placeholder_api; } +Placeholder_component.options.__file = "src/components/Placeholder.vue" +/* harmony default export */ var Placeholder = (Placeholder_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SingleValue.vue?vue&type=script&lang=js& + + +/* harmony default export */ var SingleValuevue_type_script_lang_js_ = ({ + name: 'vue-treeselect--single-value', + inject: ['instance'], + methods: { + renderSingleValueLabel: function renderSingleValueLabel() { + var instance = this.instance; + var node = instance.selectedNodes[0]; + var customValueLabelRenderer = instance.$scopedSlots['value-label']; + return customValueLabelRenderer ? customValueLabelRenderer({ + node: node + }) : node.label; + } + }, + render: function render() { + var h = arguments[0]; + var instance = this.instance, + renderValueContainer = this.$parent.renderValueContainer; + var shouldShowValue = instance.hasValue && !instance.trigger.searchQuery; + return renderValueContainer([shouldShowValue && h("div", { + "class": "vue-treeselect__single-value" + }, [this.renderSingleValueLabel()]), h(Placeholder), h(Input, { + ref: "input" + })]); + } +}); +// CONCATENATED MODULE: ./src/components/SingleValue.vue?vue&type=script&lang=js& + /* harmony default export */ var components_SingleValuevue_type_script_lang_js_ = (SingleValuevue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/SingleValue.vue +var SingleValue_render, SingleValue_staticRenderFns + + + + +/* normalize component */ + +var SingleValue_component = normalizeComponent( + components_SingleValuevue_type_script_lang_js_, + SingleValue_render, + SingleValue_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var SingleValue_api; } +SingleValue_component.options.__file = "src/components/SingleValue.vue" +/* harmony default export */ var SingleValue = (SingleValue_component.exports); +// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=template&id=364b6320& +var Deletevue_type_template_id_364b6320_render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "svg", + { + attrs: { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 348.333 348.333" + } + }, + [ + _c("path", { + attrs: { + d: + "M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z" + } + }) + ] + ) +} +var Deletevue_type_template_id_364b6320_staticRenderFns = [] +Deletevue_type_template_id_364b6320_render._withStripped = true + + +// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=template&id=364b6320& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=script&lang=js& +/* harmony default export */ var Deletevue_type_script_lang_js_ = ({ + name: 'vue-treeselect--x' +}); +// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=script&lang=js& + /* harmony default export */ var icons_Deletevue_type_script_lang_js_ = (Deletevue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/icons/Delete.vue + + + + + +/* normalize component */ + +var Delete_component = normalizeComponent( + icons_Deletevue_type_script_lang_js_, + Deletevue_type_template_id_364b6320_render, + Deletevue_type_template_id_364b6320_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Delete_api; } +Delete_component.options.__file = "src/components/icons/Delete.vue" +/* harmony default export */ var Delete = (Delete_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValueItem.vue?vue&type=script&lang=js& + + +/* harmony default export */ var MultiValueItemvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--multi-value-item', + inject: ['instance'], + props: { + node: { + type: Object, + required: true + } + }, + methods: { + handleMouseDown: onLeftClick(function handleMouseDown() { + var instance = this.instance, + node = this.node; + instance.select(node); + }) + }, + render: function render() { + var h = arguments[0]; + var instance = this.instance, + node = this.node; + var itemClass = { + 'vue-treeselect__multi-value-item': true, + 'vue-treeselect__multi-value-item-disabled': node.isDisabled, + 'vue-treeselect__multi-value-item-new': node.isNew + }; + var customValueLabelRenderer = instance.$scopedSlots['value-label']; + var labelRenderer = customValueLabelRenderer ? customValueLabelRenderer({ + node: node + }) : node.label; + return h("div", { + "class": "vue-treeselect__multi-value-item-container" + }, [h("div", { + "class": itemClass, + on: { + "mousedown": this.handleMouseDown + } + }, [h("span", { + "class": "vue-treeselect__multi-value-label" + }, [labelRenderer]), h("span", { + "class": "vue-treeselect__icon vue-treeselect__value-remove" + }, [h(Delete)])])]); + } +}); +// CONCATENATED MODULE: ./src/components/MultiValueItem.vue?vue&type=script&lang=js& + /* harmony default export */ var components_MultiValueItemvue_type_script_lang_js_ = (MultiValueItemvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/MultiValueItem.vue +var MultiValueItem_render, MultiValueItem_staticRenderFns + + + + +/* normalize component */ + +var MultiValueItem_component = normalizeComponent( + components_MultiValueItemvue_type_script_lang_js_, + MultiValueItem_render, + MultiValueItem_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var MultiValueItem_api; } +MultiValueItem_component.options.__file = "src/components/MultiValueItem.vue" +/* harmony default export */ var MultiValueItem = (MultiValueItem_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValue.vue?vue&type=script&lang=js& + + + + +/* harmony default export */ var MultiValuevue_type_script_lang_js_ = ({ + name: 'vue-treeselect--multi-value', + inject: ['instance'], + methods: { + renderMultiValueItems: function renderMultiValueItems() { + var h = this.$createElement; + var instance = this.instance; + return instance.internalValue.slice(0, instance.limit).map(instance.getNode).map(function (node) { + return h(MultiValueItem, { + key: "multi-value-item-".concat(node.id), + attrs: { + node: node + } + }); + }); + }, + renderExceedLimitTip: function renderExceedLimitTip() { + var h = this.$createElement; + var instance = this.instance; + var count = instance.internalValue.length - instance.limit; + if (count <= 0) return null; + return h("div", { + "class": "vue-treeselect__limit-tip vue-treeselect-helper-zoom-effect-off", + key: "exceed-limit-tip" + }, [h("span", { + "class": "vue-treeselect__limit-tip-text" + }, [instance.limitText(count)])]); + } + }, + render: function render() { + var h = arguments[0]; + var renderValueContainer = this.$parent.renderValueContainer; + var transitionGroupProps = { + props: { + tag: 'div', + name: 'vue-treeselect__multi-value-item--transition', + appear: true + } + }; + return renderValueContainer(h("transition-group", babel_helper_vue_jsx_merge_props_default()([{ + "class": "vue-treeselect__multi-value" + }, transitionGroupProps]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), h(Placeholder, { + key: "placeholder" + }), h(Input, { + ref: "input", + key: "input" + })])); + } +}); +// CONCATENATED MODULE: ./src/components/MultiValue.vue?vue&type=script&lang=js& + /* harmony default export */ var components_MultiValuevue_type_script_lang_js_ = (MultiValuevue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/MultiValue.vue +var MultiValue_render, MultiValue_staticRenderFns + + + + +/* normalize component */ + +var MultiValue_component = normalizeComponent( + components_MultiValuevue_type_script_lang_js_, + MultiValue_render, + MultiValue_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var MultiValue_api; } +MultiValue_component.options.__file = "src/components/MultiValue.vue" +/* harmony default export */ var MultiValue = (MultiValue_component.exports); +// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4& +var Arrowvue_type_template_id_11186cd4_render = function() { + var _vm = this + var _h = _vm.$createElement + var _c = _vm._self._c || _h + return _c( + "svg", + { + attrs: { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 292.362 292.362" + } + }, + [ + _c("path", { + attrs: { + d: + "M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z" + } + }) + ] + ) +} +var Arrowvue_type_template_id_11186cd4_staticRenderFns = [] +Arrowvue_type_template_id_11186cd4_render._withStripped = true + + +// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4& + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=script&lang=js& +/* harmony default export */ var Arrowvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--arrow' +}); +// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=script&lang=js& + /* harmony default export */ var icons_Arrowvue_type_script_lang_js_ = (Arrowvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/icons/Arrow.vue + + + + + +/* normalize component */ + +var Arrow_component = normalizeComponent( + icons_Arrowvue_type_script_lang_js_, + Arrowvue_type_template_id_11186cd4_render, + Arrowvue_type_template_id_11186cd4_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Arrow_api; } +Arrow_component.options.__file = "src/components/icons/Arrow.vue" +/* harmony default export */ var Arrow = (Arrow_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Control.vue?vue&type=script&lang=js& + + + + + +/* harmony default export */ var Controlvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--control', + inject: ['instance'], + computed: { + shouldShowX: function shouldShowX() { + var instance = this.instance; + return instance.clearable && !instance.disabled && instance.hasValue && (this.hasUndisabledValue || instance.allowClearingDisabled); + }, + shouldShowArrow: function shouldShowArrow() { + var instance = this.instance; + if (!instance.alwaysOpen) return true; + return !instance.menu.isOpen; + }, + hasUndisabledValue: function hasUndisabledValue() { + var instance = this.instance; + return instance.hasValue && instance.internalValue.some(function (id) { + return !instance.getNode(id).isDisabled; + }); + } + }, + methods: { + renderX: function renderX() { + var h = this.$createElement; + var instance = this.instance; + var title = instance.multiple ? instance.clearAllText : instance.clearValueText; + if (!this.shouldShowX) return null; + return h("div", { + "class": "vue-treeselect__x-container", + attrs: { + title: title + }, + on: { + "mousedown": this.handleMouseDownOnX + } + }, [h(Delete, { + "class": "vue-treeselect__x" + })]); + }, + renderArrow: function renderArrow() { + var h = this.$createElement; + var instance = this.instance; + var arrowClass = { + 'vue-treeselect__control-arrow': true, + 'vue-treeselect__control-arrow--rotated': instance.menu.isOpen + }; + if (!this.shouldShowArrow) return null; + return h("div", { + "class": "vue-treeselect__control-arrow-container", + on: { + "mousedown": this.handleMouseDownOnArrow + } + }, [h(Arrow, { + "class": arrowClass + })]); + }, + handleMouseDownOnX: onLeftClick(function handleMouseDownOnX(evt) { + evt.stopPropagation(); + evt.preventDefault(); + var instance = this.instance; + var result = instance.beforeClearAll(); + + var handler = function handler(shouldClear) { + if (shouldClear) instance.clear(); + }; + + if (is_promise_default()(result)) { + result.then(handler); + } else { + setTimeout(function () { + return handler(result); + }, 0); + } + }), + handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnArrow(evt) { + evt.preventDefault(); + evt.stopPropagation(); + var instance = this.instance; + instance.focusInput(); + instance.toggleMenu(); + }), + renderValueContainer: function renderValueContainer(children) { + var h = this.$createElement; + return h("div", { + "class": "vue-treeselect__value-container" + }, [children]); + } + }, + render: function render() { + var h = arguments[0]; + var instance = this.instance; + var ValueContainer = instance.single ? SingleValue : MultiValue; + return h("div", { + "class": "vue-treeselect__control", + on: { + "mousedown": instance.handleMouseDown + } + }, [h(ValueContainer, { + ref: "value-container" + }), this.renderX(), this.renderArrow()]); + } +}); +// CONCATENATED MODULE: ./src/components/Control.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Controlvue_type_script_lang_js_ = (Controlvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Control.vue +var Control_render, Control_staticRenderFns + + + + +/* normalize component */ + +var Control_component = normalizeComponent( + components_Controlvue_type_script_lang_js_, + Control_render, + Control_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Control_api; } +Control_component.options.__file = "src/components/Control.vue" +/* harmony default export */ var Control = (Control_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Tip.vue?vue&type=script&lang=js& +/* harmony default export */ var Tipvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--tip', + functional: true, + props: { + type: { + type: String, + required: true + }, + icon: { + type: String, + required: true + } + }, + render: function render(_, context) { + var h = arguments[0]; + var props = context.props, + children = context.children; + return h("div", { + "class": "vue-treeselect__tip vue-treeselect__".concat(props.type, "-tip") + }, [h("div", { + "class": "vue-treeselect__icon-container" + }, [h("span", { + "class": "vue-treeselect__icon-".concat(props.icon) + })]), h("span", { + "class": "vue-treeselect__tip-text vue-treeselect__".concat(props.type, "-tip-text") + }, [children])]); + } +}); +// CONCATENATED MODULE: ./src/components/Tip.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Tipvue_type_script_lang_js_ = (Tipvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Tip.vue +var Tip_render, Tip_staticRenderFns + + + + +/* normalize component */ + +var Tip_component = normalizeComponent( + components_Tipvue_type_script_lang_js_, + Tip_render, + Tip_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Tip_api; } +Tip_component.options.__file = "src/components/Tip.vue" +/* harmony default export */ var Tip = (Tip_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Option.vue?vue&type=script&lang=js& + + + + + +var arrowPlaceholder, checkMark, minusMark; +var Option = { + name: 'vue-treeselect--option', + inject: ['instance'], + props: { + node: { + type: Object, + required: true + } + }, + computed: { + shouldExpand: function shouldExpand() { + var instance = this.instance, + node = this.node; + return node.isBranch && instance.shouldExpand(node); + }, + shouldShow: function shouldShow() { + var instance = this.instance, + node = this.node; + return instance.shouldShowOptionInMenu(node); + } + }, + methods: { + renderOption: function renderOption() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + var optionClass = { + 'vue-treeselect__option': true, + 'vue-treeselect__option--disabled': node.isDisabled, + 'vue-treeselect__option--selected': instance.isSelected(node), + 'vue-treeselect__option--highlight': node.isHighlighted, + 'vue-treeselect__option--matched': instance.localSearch.active && node.isMatched, + 'vue-treeselect__option--hide': !this.shouldShow + }; + return h("div", { + "class": optionClass, + on: { + "mouseenter": this.handleMouseEnterOption + }, + attrs: { + "data-id": node.id + } + }, [this.renderArrow(), this.renderLabelContainer([this.renderCheckboxContainer([this.renderCheckbox()]), this.renderLabel()])]); + }, + renderSubOptionsList: function renderSubOptionsList() { + var h = this.$createElement; + if (!this.shouldExpand) return null; + return h("div", { + "class": "vue-treeselect__list" + }, [this.renderSubOptions(), this.renderNoChildrenTip(), this.renderLoadingChildrenTip(), this.renderLoadingChildrenErrorTip()]); + }, + renderArrow: function renderArrow() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (instance.shouldFlattenOptions && this.shouldShow) return null; + + if (node.isBranch) { + var transitionProps = { + props: { + name: 'vue-treeselect__option-arrow--prepare', + appear: true + } + }; + var arrowClass = { + 'vue-treeselect__option-arrow': true, + 'vue-treeselect__option-arrow--rotated': this.shouldExpand + }; + return h("div", { + "class": "vue-treeselect__option-arrow-container", + on: { + "mousedown": this.handleMouseDownOnArrow + } + }, [h("transition", transitionProps, [h(Arrow, { + "class": arrowClass + })])]); + } + + if (instance.hasBranchNodes) { + if (!arrowPlaceholder) arrowPlaceholder = h("div", { + "class": "vue-treeselect__option-arrow-placeholder" + }, ["\xA0"]); + return arrowPlaceholder; + } + + return null; + }, + renderLabelContainer: function renderLabelContainer(children) { + var h = this.$createElement; + return h("div", { + "class": "vue-treeselect__label-container", + on: { + "mousedown": this.handleMouseDownOnLabelContainer + } + }, [children]); + }, + renderCheckboxContainer: function renderCheckboxContainer(children) { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (instance.single) return null; + if (instance.disableBranchNodes && node.isBranch) return null; + return h("div", { + "class": "vue-treeselect__checkbox-container" + }, [children]); + }, + renderCheckbox: function renderCheckbox() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + var checkedState = instance.forest.checkedStateMap[node.id]; + var checkboxClass = { + 'vue-treeselect__checkbox': true, + 'vue-treeselect__checkbox--checked': checkedState === CHECKED, + 'vue-treeselect__checkbox--indeterminate': checkedState === INDETERMINATE, + 'vue-treeselect__checkbox--unchecked': checkedState === UNCHECKED, + 'vue-treeselect__checkbox--disabled': node.isDisabled + }; + if (!checkMark) checkMark = h("span", { + "class": "vue-treeselect__check-mark" + }); + if (!minusMark) minusMark = h("span", { + "class": "vue-treeselect__minus-mark" + }); + return h("span", { + "class": checkboxClass + }, [checkMark, minusMark]); + }, + renderLabel: function renderLabel() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + var shouldShowCount = node.isBranch && (instance.localSearch.active ? instance.showCountOnSearchComputed : instance.showCount); + var count = shouldShowCount ? instance.localSearch.active ? instance.localSearch.countMap[node.id][instance.showCountOf] : node.count[instance.showCountOf] : NaN; + var labelClassName = 'vue-treeselect__label'; + var countClassName = 'vue-treeselect__count'; + var customLabelRenderer = instance.$scopedSlots['option-label']; + if (customLabelRenderer) return customLabelRenderer({ + node: node, + shouldShowCount: shouldShowCount, + count: count, + labelClassName: labelClassName, + countClassName: countClassName + }); + return h("label", { + "class": labelClassName + }, [node.label, shouldShowCount && h("span", { + "class": countClassName + }, ["(", count, ")"])]); + }, + renderSubOptions: function renderSubOptions() { + var h = this.$createElement; + var node = this.node; + if (!node.childrenStates.isLoaded) return null; + return node.children.map(function (childNode) { + return h(Option, { + attrs: { + node: childNode + }, + key: childNode.id + }); + }); + }, + renderNoChildrenTip: function renderNoChildrenTip() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (!node.childrenStates.isLoaded || node.children.length) return null; + return h(Tip, { + attrs: { + type: "no-children", + icon: "warning" + } + }, [instance.noChildrenText]); + }, + renderLoadingChildrenTip: function renderLoadingChildrenTip() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (!node.childrenStates.isLoading) return null; + return h(Tip, { + attrs: { + type: "loading", + icon: "loader" + } + }, [instance.loadingText]); + }, + renderLoadingChildrenErrorTip: function renderLoadingChildrenErrorTip() { + var h = this.$createElement; + var instance = this.instance, + node = this.node; + if (!node.childrenStates.loadingError) return null; + return h(Tip, { + attrs: { + type: "error", + icon: "error" + } + }, [node.childrenStates.loadingError, h("a", { + "class": "vue-treeselect__retry", + attrs: { + title: instance.retryTitle + }, + on: { + "mousedown": this.handleMouseDownOnRetry + } + }, [instance.retryText])]); + }, + handleMouseEnterOption: function handleMouseEnterOption(evt) { + var instance = this.instance, + node = this.node; + if (evt.target !== evt.currentTarget) return; + instance.setCurrentHighlightedOption(node, false); + }, + handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnOptionArrow() { + var instance = this.instance, + node = this.node; + instance.toggleExpanded(node); + }), + handleMouseDownOnLabelContainer: onLeftClick(function handleMouseDownOnLabelContainer() { + var instance = this.instance, + node = this.node; + + if (node.isBranch && instance.disableBranchNodes) { + instance.toggleExpanded(node); + } else { + instance.select(node); + } + }), + handleMouseDownOnRetry: onLeftClick(function handleMouseDownOnRetry() { + var instance = this.instance, + node = this.node; + instance.loadChildrenOptions(node); + }) + }, + render: function render() { + var _this = this; + + var h = arguments[0]; + var node = this.node; + var indentLevel = this.instance.shouldFlattenOptions ? 0 : node.level; + + var listItemClass = defineProperty_default()({ + 'vue-treeselect__list-item': true + }, "vue-treeselect__indent-level-".concat(indentLevel), true); + + var transitionProps = { + props: { + name: 'vue-treeselect__list--transition' + } + }; + var isSelected = false; + this.instance.selectedNodes.some(function (e) { + return e.id === _this.node.id; + }); + isSelected = "".concat(isSelected); + console.log(); + return h("div", { + "class": listItemClass, + attrs: { + role: "option", + tabindex: "0", + "aria-selected": ariaSelected + } + }, [this.renderOption(), node.isBranch && h("transition", transitionProps, [this.renderSubOptionsList()])]); + } +}; +/* harmony default export */ var Optionvue_type_script_lang_js_ = (Option); +// CONCATENATED MODULE: ./src/components/Option.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Optionvue_type_script_lang_js_ = (Optionvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Option.vue +var Option_render, Option_staticRenderFns + + + + +/* normalize component */ + +var Option_component = normalizeComponent( + components_Optionvue_type_script_lang_js_, + Option_render, + Option_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Option_api; } +Option_component.options.__file = "src/components/Option.vue" +/* harmony default export */ var components_Option = (Option_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Menu.vue?vue&type=script&lang=js& + + + + +var directionMap = { + top: 'top', + bottom: 'bottom', + above: 'top', + below: 'bottom' +}; +/* harmony default export */ var Menuvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--menu', + inject: ['instance'], + computed: { + menuStyle: function menuStyle() { + var instance = this.instance; + return { + maxHeight: instance.maxHeight + 'px' + }; + }, + menuContainerStyle: function menuContainerStyle() { + var instance = this.instance; + return { + zIndex: instance.appendToBody ? null : instance.zIndex + }; + } + }, + watch: { + 'instance.menu.isOpen': function instanceMenuIsOpen(newValue) { + if (newValue) { + this.$nextTick(this.onMenuOpen); + } else { + this.onMenuClose(); + } + } + }, + created: function created() { + this.menuSizeWatcher = null; + this.menuResizeAndScrollEventListeners = null; + }, + mounted: function mounted() { + var instance = this.instance; + if (instance.menu.isOpen) this.$nextTick(this.onMenuOpen); + }, + destroyed: function destroyed() { + this.onMenuClose(); + }, + methods: { + renderMenu: function renderMenu() { + var h = this.$createElement; + var instance = this.instance; + if (!instance.menu.isOpen) return null; + return h("div", { + ref: "menu", + "class": "vue-treeselect__menu", + on: { + "mousedown": instance.handleMouseDown + }, + style: this.menuStyle + }, [this.renderBeforeList(), instance.async ? this.renderAsyncSearchMenuInner() : instance.localSearch.active ? this.renderLocalSearchMenuInner() : this.renderNormalMenuInner(), this.renderAfterList()]); + }, + renderBeforeList: function renderBeforeList() { + var instance = this.instance; + var beforeListRenderer = instance.$scopedSlots['before-list']; + return beforeListRenderer ? beforeListRenderer() : null; + }, + renderAfterList: function renderAfterList() { + var instance = this.instance; + var afterListRenderer = instance.$scopedSlots['after-list']; + return afterListRenderer ? afterListRenderer() : null; + }, + renderNormalMenuInner: function renderNormalMenuInner() { + var instance = this.instance; + + if (instance.rootOptionsStates.isLoading) { + return this.renderLoadingOptionsTip(); + } else if (instance.rootOptionsStates.loadingError) { + return this.renderLoadingRootOptionsErrorTip(); + } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) { + return this.renderNoAvailableOptionsTip(); + } else { + return this.renderOptionList(); + } + }, + renderLocalSearchMenuInner: function renderLocalSearchMenuInner() { + var instance = this.instance; + + if (instance.rootOptionsStates.isLoading) { + return this.renderLoadingOptionsTip(); + } else if (instance.rootOptionsStates.loadingError) { + return this.renderLoadingRootOptionsErrorTip(); + } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) { + return this.renderNoAvailableOptionsTip(); + } else if (instance.localSearch.noResults) { + return this.renderNoResultsTip(); + } else { + return this.renderOptionList(); + } + }, + renderAsyncSearchMenuInner: function renderAsyncSearchMenuInner() { + var instance = this.instance; + var entry = instance.getRemoteSearchEntry(); + var shouldShowSearchPromptTip = instance.trigger.searchQuery === '' && !instance.defaultOptions; + var shouldShowNoResultsTip = shouldShowSearchPromptTip ? false : entry.isLoaded && entry.options.length === 0; + + if (shouldShowSearchPromptTip) { + return this.renderSearchPromptTip(); + } else if (entry.isLoading) { + return this.renderLoadingOptionsTip(); + } else if (entry.loadingError) { + return this.renderAsyncSearchLoadingErrorTip(); + } else if (shouldShowNoResultsTip) { + return this.renderNoResultsTip(); + } else { + return this.renderOptionList(); + } + }, + renderOptionList: function renderOptionList() { + var h = this.$createElement; + var instance = this.instance; + return h("div", { + "class": "vue-treeselect__list", + attrs: { + role: "listbox", + tabindex: "-1" + } + }, [instance.forest.normalizedOptions.map(function (rootNode) { + return h(components_Option, { + attrs: { + node: rootNode + }, + key: rootNode.id + }); + })]); + }, + renderSearchPromptTip: function renderSearchPromptTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "search-prompt", + icon: "warning" + } + }, [instance.searchPromptText]); + }, + renderLoadingOptionsTip: function renderLoadingOptionsTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "loading", + icon: "loader" + } + }, [instance.loadingText]); + }, + renderLoadingRootOptionsErrorTip: function renderLoadingRootOptionsErrorTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "error", + icon: "error" + } + }, [instance.rootOptionsStates.loadingError, h("a", { + "class": "vue-treeselect__retry", + on: { + "click": instance.loadRootOptions + }, + attrs: { + title: instance.retryTitle + } + }, [instance.retryText])]); + }, + renderAsyncSearchLoadingErrorTip: function renderAsyncSearchLoadingErrorTip() { + var h = this.$createElement; + var instance = this.instance; + var entry = instance.getRemoteSearchEntry(); + return h(Tip, { + attrs: { + type: "error", + icon: "error" + } + }, [entry.loadingError, h("a", { + "class": "vue-treeselect__retry", + on: { + "click": instance.handleRemoteSearch + }, + attrs: { + title: instance.retryTitle + } + }, [instance.retryText])]); + }, + renderNoAvailableOptionsTip: function renderNoAvailableOptionsTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "no-options", + icon: "warning" + } + }, [instance.noOptionsText]); + }, + renderNoResultsTip: function renderNoResultsTip() { + var h = this.$createElement; + var instance = this.instance; + return h(Tip, { + attrs: { + type: "no-results", + icon: "warning" + } + }, [instance.noResultsText]); + }, + onMenuOpen: function onMenuOpen() { + this.adjustMenuOpenDirection(); + this.setupMenuSizeWatcher(); + this.setupMenuResizeAndScrollEventListeners(); + }, + onMenuClose: function onMenuClose() { + this.removeMenuSizeWatcher(); + this.removeMenuResizeAndScrollEventListeners(); + }, + adjustMenuOpenDirection: function adjustMenuOpenDirection() { + var instance = this.instance; + if (!instance.menu.isOpen) return; + var $menu = instance.getMenu(); + var $control = instance.getControl(); + var menuRect = $menu.getBoundingClientRect(); + var controlRect = $control.getBoundingClientRect(); + var menuHeight = menuRect.height; + var viewportHeight = window.innerHeight; + var spaceAbove = controlRect.top; + var spaceBelow = window.innerHeight - controlRect.bottom; + var isControlInViewport = controlRect.top >= 0 && controlRect.top <= viewportHeight || controlRect.top < 0 && controlRect.bottom > 0; + var hasEnoughSpaceBelow = spaceBelow > menuHeight + MENU_BUFFER; + var hasEnoughSpaceAbove = spaceAbove > menuHeight + MENU_BUFFER; + + if (!isControlInViewport) { + instance.closeMenu(); + } else if (instance.openDirection !== 'auto') { + instance.menu.placement = directionMap[instance.openDirection]; + } else if (hasEnoughSpaceBelow || !hasEnoughSpaceAbove) { + instance.menu.placement = 'bottom'; + } else { + instance.menu.placement = 'top'; + } + }, + setupMenuSizeWatcher: function setupMenuSizeWatcher() { + var instance = this.instance; + var $menu = instance.getMenu(); + if (this.menuSizeWatcher) return; + this.menuSizeWatcher = { + remove: watchSize($menu, this.adjustMenuOpenDirection) + }; + }, + setupMenuResizeAndScrollEventListeners: function setupMenuResizeAndScrollEventListeners() { + var instance = this.instance; + var $control = instance.getControl(); + if (this.menuResizeAndScrollEventListeners) return; + this.menuResizeAndScrollEventListeners = { + remove: setupResizeAndScrollEventListeners($control, this.adjustMenuOpenDirection) + }; + }, + removeMenuSizeWatcher: function removeMenuSizeWatcher() { + if (!this.menuSizeWatcher) return; + this.menuSizeWatcher.remove(); + this.menuSizeWatcher = null; + }, + removeMenuResizeAndScrollEventListeners: function removeMenuResizeAndScrollEventListeners() { + if (!this.menuResizeAndScrollEventListeners) return; + this.menuResizeAndScrollEventListeners.remove(); + this.menuResizeAndScrollEventListeners = null; + } + }, + render: function render() { + var h = arguments[0]; + return h("div", { + ref: "menu-container", + "class": "vue-treeselect__menu-container", + style: this.menuContainerStyle + }, [h("transition", { + attrs: { + name: "vue-treeselect__menu--transition" + } + }, [this.renderMenu()])]); + } +}); +// CONCATENATED MODULE: ./src/components/Menu.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Menuvue_type_script_lang_js_ = (Menuvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Menu.vue +var Menu_render, Menu_staticRenderFns + + + + +/* normalize component */ + +var Menu_component = normalizeComponent( + components_Menuvue_type_script_lang_js_, + Menu_render, + Menu_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Menu_api; } +Menu_component.options.__file = "src/components/Menu.vue" +/* harmony default export */ var Menu = (Menu_component.exports); +// EXTERNAL MODULE: external "Vue" +var external_Vue_ = __webpack_require__(36); +var external_Vue_default = /*#__PURE__*/__webpack_require__.n(external_Vue_); + +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MenuPortal.vue?vue&type=script&lang=js& + + +function MenuPortalvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function MenuPortalvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { MenuPortalvue_type_script_lang_js_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { MenuPortalvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + + + + +var PortalTarget = { + name: 'vue-treeselect--portal-target', + inject: ['instance'], + watch: { + 'instance.menu.isOpen': function instanceMenuIsOpen(newValue) { + if (newValue) { + this.setupHandlers(); + } else { + this.removeHandlers(); + } + }, + 'instance.menu.placement': function instanceMenuPlacement() { + this.updateMenuContainerOffset(); + } + }, + created: function created() { + this.controlResizeAndScrollEventListeners = null; + this.controlSizeWatcher = null; + }, + mounted: function mounted() { + var instance = this.instance; + if (instance.menu.isOpen) this.setupHandlers(); + }, + methods: { + setupHandlers: function setupHandlers() { + this.updateWidth(); + this.updateMenuContainerOffset(); + this.setupControlResizeAndScrollEventListeners(); + this.setupControlSizeWatcher(); + }, + removeHandlers: function removeHandlers() { + this.removeControlResizeAndScrollEventListeners(); + this.removeControlSizeWatcher(); + }, + setupControlResizeAndScrollEventListeners: function setupControlResizeAndScrollEventListeners() { + var instance = this.instance; + var $control = instance.getControl(); + if (this.controlResizeAndScrollEventListeners) return; + this.controlResizeAndScrollEventListeners = { + remove: setupResizeAndScrollEventListeners($control, this.updateMenuContainerOffset) + }; + }, + setupControlSizeWatcher: function setupControlSizeWatcher() { + var _this = this; + + var instance = this.instance; + var $control = instance.getControl(); + if (this.controlSizeWatcher) return; + this.controlSizeWatcher = { + remove: watchSize($control, function () { + _this.updateWidth(); + + _this.updateMenuContainerOffset(); + }) + }; + }, + removeControlResizeAndScrollEventListeners: function removeControlResizeAndScrollEventListeners() { + if (!this.controlResizeAndScrollEventListeners) return; + this.controlResizeAndScrollEventListeners.remove(); + this.controlResizeAndScrollEventListeners = null; + }, + removeControlSizeWatcher: function removeControlSizeWatcher() { + if (!this.controlSizeWatcher) return; + this.controlSizeWatcher.remove(); + this.controlSizeWatcher = null; + }, + updateWidth: function updateWidth() { + var instance = this.instance; + var $portalTarget = this.$el; + var $control = instance.getControl(); + var controlRect = $control.getBoundingClientRect(); + $portalTarget.style.width = controlRect.width + 'px'; + }, + updateMenuContainerOffset: function updateMenuContainerOffset() { + var instance = this.instance; + var $control = instance.getControl(); + var $portalTarget = this.$el; + var controlRect = $control.getBoundingClientRect(); + var portalTargetRect = $portalTarget.getBoundingClientRect(); + var offsetY = instance.menu.placement === 'bottom' ? controlRect.height : 0; + var left = Math.round(controlRect.left - portalTargetRect.left) + 'px'; + var top = Math.round(controlRect.top - portalTargetRect.top + offsetY) + 'px'; + var menuContainerStyle = this.$refs.menu.$refs['menu-container'].style; + var transformVariations = ['transform', 'webkitTransform', 'MozTransform', 'msTransform']; + var transform = find(transformVariations, function (t) { + return t in document.body.style; + }); + menuContainerStyle[transform] = "translate(".concat(left, ", ").concat(top, ")"); + } + }, + render: function render() { + var h = arguments[0]; + var instance = this.instance; + var portalTargetClass = ['vue-treeselect__portal-target', instance.wrapperClass]; + var portalTargetStyle = { + zIndex: instance.zIndex + }; + return h("div", { + "class": portalTargetClass, + style: portalTargetStyle, + attrs: { + "data-instance-id": instance.getInstanceId() + } + }, [h(Menu, { + ref: "menu" + })]); + }, + destroyed: function destroyed() { + this.removeHandlers(); + } +}; +var placeholder; +/* harmony default export */ var MenuPortalvue_type_script_lang_js_ = ({ + name: 'vue-treeselect--menu-portal', + created: function created() { + this.portalTarget = null; + }, + mounted: function mounted() { + this.setup(); + }, + destroyed: function destroyed() { + this.teardown(); + }, + methods: { + setup: function setup() { + var el = document.createElement('div'); + document.body.appendChild(el); + this.portalTarget = new external_Vue_default.a(MenuPortalvue_type_script_lang_js_objectSpread({ + el: el, + parent: this + }, PortalTarget)); + }, + teardown: function teardown() { + document.body.removeChild(this.portalTarget.$el); + this.portalTarget.$el.innerHTML = ''; + this.portalTarget.$destroy(); + this.portalTarget = null; + } + }, + render: function render() { + var h = arguments[0]; + if (!placeholder) placeholder = h("div", { + "class": "vue-treeselect__menu-placeholder" + }); + return placeholder; + } +}); +// CONCATENATED MODULE: ./src/components/MenuPortal.vue?vue&type=script&lang=js& + /* harmony default export */ var components_MenuPortalvue_type_script_lang_js_ = (MenuPortalvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/MenuPortal.vue +var MenuPortal_render, MenuPortal_staticRenderFns + + + + +/* normalize component */ + +var MenuPortal_component = normalizeComponent( + components_MenuPortalvue_type_script_lang_js_, + MenuPortal_render, + MenuPortal_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var MenuPortal_api; } +MenuPortal_component.options.__file = "src/components/MenuPortal.vue" +/* harmony default export */ var MenuPortal = (MenuPortal_component.exports); +// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Treeselect.vue?vue&type=script&lang=js& + + + + + +/* harmony default export */ var Treeselectvue_type_script_lang_js_ = ({ + name: 'vue-treeselect', + mixins: [treeselectMixin], + computed: { + wrapperClass: function wrapperClass() { + return { + 'vue-treeselect': true, + 'vue-treeselect--single': this.single, + 'vue-treeselect--multi': this.multiple, + 'vue-treeselect--searchable': this.searchable, + 'vue-treeselect--disabled': this.disabled, + 'vue-treeselect--focused': this.trigger.isFocused, + 'vue-treeselect--has-value': this.hasValue, + 'vue-treeselect--open': this.menu.isOpen, + 'vue-treeselect--open-above': this.menu.placement === 'top', + 'vue-treeselect--open-below': this.menu.placement === 'bottom', + 'vue-treeselect--branch-nodes-disabled': this.disableBranchNodes, + 'vue-treeselect--append-to-body': this.appendToBody + }; + } + }, + render: function render() { + var h = arguments[0]; + return h("div", { + ref: "wrapper", + "class": this.wrapperClass + }, [h(HiddenFields), h(Control, { + ref: "control" + }), this.appendToBody ? h(MenuPortal, { + ref: "portal" + }) : h(Menu, { + ref: "menu" + })]); + } +}); +// CONCATENATED MODULE: ./src/components/Treeselect.vue?vue&type=script&lang=js& + /* harmony default export */ var components_Treeselectvue_type_script_lang_js_ = (Treeselectvue_type_script_lang_js_); +// CONCATENATED MODULE: ./src/components/Treeselect.vue +var Treeselect_render, Treeselect_staticRenderFns + + + + +/* normalize component */ + +var Treeselect_component = normalizeComponent( + components_Treeselectvue_type_script_lang_js_, + Treeselect_render, + Treeselect_staticRenderFns, + false, + null, + null, + null + +) + +/* hot reload */ +if (false) { var Treeselect_api; } +Treeselect_component.options.__file = "src/components/Treeselect.vue" +/* harmony default export */ var Treeselect = (Treeselect_component.exports); +// EXTERNAL MODULE: ./src/style.less +var style = __webpack_require__(37); + +// CONCATENATED MODULE: ./src/index.js + + + +/* harmony default export */ var src = __webpack_exports__["default"] = (Treeselect); + + +var VERSION = "0.4.0"; + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=vue-treeselect.umd.js.map \ No newline at end of file diff --git a/dist/vue-treeselect.umd.js.map b/dist/vue-treeselect.umd.js.map new file mode 100644 index 00000000..6d29d320 --- /dev/null +++ b/dist/vue-treeselect.umd.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://VueTreeselect/webpack/universalModuleDefinition","webpack://VueTreeselect/webpack/bootstrap","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://VueTreeselect/./node_modules/lodash/noop.js","webpack://VueTreeselect/./node_modules/lodash/debounce.js","webpack://VueTreeselect/./node_modules/lodash/isObject.js","webpack://VueTreeselect/./node_modules/lodash/now.js","webpack://VueTreeselect/./node_modules/lodash/_root.js","webpack://VueTreeselect/./node_modules/lodash/_freeGlobal.js","webpack://VueTreeselect/(webpack)/buildin/global.js","webpack://VueTreeselect/./node_modules/lodash/toNumber.js","webpack://VueTreeselect/./node_modules/lodash/isSymbol.js","webpack://VueTreeselect/./node_modules/lodash/_baseGetTag.js","webpack://VueTreeselect/./node_modules/lodash/_Symbol.js","webpack://VueTreeselect/./node_modules/lodash/_getRawTag.js","webpack://VueTreeselect/./node_modules/lodash/_objectToString.js","webpack://VueTreeselect/./node_modules/lodash/isObjectLike.js","webpack://VueTreeselect/./node_modules/is-promise/index.js","webpack://VueTreeselect/./node_modules/lodash/once.js","webpack://VueTreeselect/./node_modules/lodash/before.js","webpack://VueTreeselect/./node_modules/lodash/toInteger.js","webpack://VueTreeselect/./node_modules/lodash/toFinite.js","webpack://VueTreeselect/./node_modules/lodash/identity.js","webpack://VueTreeselect/./node_modules/lodash/constant.js","webpack://VueTreeselect/./node_modules/@babel/runtime/helpers/typeof.js","webpack://VueTreeselect/./node_modules/lodash/last.js","webpack://VueTreeselect/./node_modules/fuzzysearch/index.js","webpack://VueTreeselect/./node_modules/babel-helper-vue-jsx-merge-props/index.js","webpack://VueTreeselect/external \"Vue\"","webpack://VueTreeselect/./src/style.less?1f4a","webpack://VueTreeselect/./src/utils/warning.js","webpack://VueTreeselect/./src/utils/onLeftClick.js","webpack://VueTreeselect/./src/utils/scrollIntoView.js","webpack://VueTreeselect/./node_modules/watch-size/index.es.mjs","webpack://VueTreeselect/./src/utils/removeFromArray.js","webpack://VueTreeselect/./src/utils/watchSize.js","webpack://VueTreeselect/./src/utils/setupResizeAndScrollEventListeners.js","webpack://VueTreeselect/./src/utils/isNaN.js","webpack://VueTreeselect/./src/utils/createMap.js","webpack://VueTreeselect/./src/utils/deepExtend.js","webpack://VueTreeselect/./src/utils/includes.js","webpack://VueTreeselect/./src/utils/find.js","webpack://VueTreeselect/./src/utils/quickDiff.js","webpack://VueTreeselect/./src/utils/index.js","webpack://VueTreeselect/./src/constants.js","webpack://VueTreeselect/./src/mixins/treeselectMixin.js","webpack://VueTreeselect/src/components/HiddenFields.vue","webpack://VueTreeselect/./src/components/HiddenFields.vue?750c","webpack://VueTreeselect/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://VueTreeselect/./src/components/HiddenFields.vue","webpack://VueTreeselect/src/components/Input.vue","webpack://VueTreeselect/./src/components/Input.vue?449d","webpack://VueTreeselect/./src/components/Input.vue","webpack://VueTreeselect/src/components/Placeholder.vue","webpack://VueTreeselect/./src/components/Placeholder.vue?238d","webpack://VueTreeselect/./src/components/Placeholder.vue","webpack://VueTreeselect/src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/SingleValue.vue?5aaa","webpack://VueTreeselect/./src/components/SingleValue.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?2d39","webpack://VueTreeselect/src/components/icons/Delete.vue","webpack://VueTreeselect/./src/components/icons/Delete.vue?ada5","webpack://VueTreeselect/./src/components/icons/Delete.vue","webpack://VueTreeselect/src/components/MultiValueItem.vue","webpack://VueTreeselect/./src/components/MultiValueItem.vue?9a1f","webpack://VueTreeselect/./src/components/MultiValueItem.vue","webpack://VueTreeselect/src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/MultiValue.vue?6f61","webpack://VueTreeselect/./src/components/MultiValue.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?2ad4","webpack://VueTreeselect/src/components/icons/Arrow.vue","webpack://VueTreeselect/./src/components/icons/Arrow.vue?525a","webpack://VueTreeselect/./src/components/icons/Arrow.vue","webpack://VueTreeselect/src/components/Control.vue","webpack://VueTreeselect/./src/components/Control.vue?57ab","webpack://VueTreeselect/./src/components/Control.vue","webpack://VueTreeselect/src/components/Tip.vue","webpack://VueTreeselect/./src/components/Tip.vue?5960","webpack://VueTreeselect/./src/components/Tip.vue","webpack://VueTreeselect/src/components/Option.vue","webpack://VueTreeselect/./src/components/Option.vue?0a09","webpack://VueTreeselect/./src/components/Option.vue","webpack://VueTreeselect/src/components/Menu.vue","webpack://VueTreeselect/./src/components/Menu.vue?c349","webpack://VueTreeselect/./src/components/Menu.vue","webpack://VueTreeselect/src/components/MenuPortal.vue","webpack://VueTreeselect/./src/components/MenuPortal.vue?ca92","webpack://VueTreeselect/./src/components/MenuPortal.vue","webpack://VueTreeselect/src/components/Treeselect.vue","webpack://VueTreeselect/./src/components/Treeselect.vue?85a0","webpack://VueTreeselect/./src/components/Treeselect.vue","webpack://VueTreeselect/./src/index.js"],"names":["warning","process","noop","checker","complainer","message","concat","console","error","onLeftClick","mouseDownHandler","onMouseDown","evt","type","button","args","call","scrollIntoView","$scrollingEl","$focusedEl","scrollingReact","getBoundingClientRect","focusedRect","overScroll","offsetHeight","bottom","scrollTop","Math","min","offsetTop","clientHeight","scrollHeight","top","max","removeFromArray","arr","elem","idx","indexOf","splice","intervalId","registered","INTERVAL_DURATION","run","setInterval","forEach","test","stop","clearInterval","item","$el","listener","lastWidth","lastHeight","width","offsetWidth","height","watchSizeForIE9","unwatch","length","push","watchSize","isIE9","document","documentMode","locked","wrappedListener","implementation","watchSizeForBrowsersOtherThanIE9","removeSizeWatcher","findScrollParents","$scrollParents","$parent","parentNode","nodeName","nodeType","ELEMENT_NODE","isScrollElment","window","getComputedStyle","overflow","overflowX","overflowY","setupResizeAndScrollEventListeners","addEventListener","passive","scrollParent","removeEventListeners","removeEventListener","$scrollParent","isNaN","x","createMap","Object","create","isPlainObject","value","getPrototypeOf","prototype","copy","obj","key","deepExtend","target","source","keys","i","len","includes","arrOrStr","find","predicate","ctx","undefined","quickDiff","arrA","arrB","NO_PARENT_NODE","UNCHECKED","INDETERMINATE","CHECKED","ALL_CHILDREN","ALL_DESCENDANTS","LEAF_CHILDREN","LEAF_DESCENDANTS","LOAD_ROOT_OPTIONS","LOAD_CHILDREN_OPTIONS","ASYNC_SEARCH","ALL","BRANCH_PRIORITY","LEAF_PRIORITY","ALL_WITH_INDETERMINATE","ORDER_SELECTED","LEVEL","INDEX","KEY_CODES","BACKSPACE","ENTER","ESCAPE","END","HOME","ARROW_LEFT","ARROW_UP","ARROW_RIGHT","ARROW_DOWN","DELETE","INPUT_DEBOUNCE_DELAY","MIN_INPUT_WIDTH","MENU_BUFFER","sortValueByIndex","a","b","level","index","sortValueByLevel","createAsyncOptionsStates","isLoaded","isLoading","loadingError","slugify","str","map","e","o","u","toLowerCase","pattern","replace","RegExp","stringifyOptionPropValue","match","enableFuzzyMatch","replaceAccents","needle","haystack","fuzzysearch","getErrorMessage","err","String","instanceId","provide","instance","props","allowClearingDisabled","Boolean","default","allowSelectingDisabledDescendants","alwaysOpen","appendToBody","async","autoFocus","autoLoadRootOptions","autoDeselectAncestors","autoDeselectDescendants","autoSelectAncestors","autoSelectDescendants","backspaceRemoves","beforeClearAll","Function","constant","branchNodesFirst","cacheOptions","clearable","clearAllText","clearOnSelect","clearValueText","closeOnSelect","defaultExpandLevel","Number","defaultOptions","deleteRemoves","delimiter","flattenSearchResults","disableBranchNodes","disabled","disableFuzzyMatching","flat","joinValues","limit","Infinity","limitText","limitTextDefault","count","loadingText","loadOptions","matchKeys","Array","maxHeight","multiple","name","noChildrenText","noOptionsText","noResultsText","normalizer","identity","openDirection","validator","acceptableValues","openOnClick","openOnFocus","options","placeholder","required","retryText","retryTitle","searchable","searchNested","searchPromptText","showCount","showCountOf","showCountOnSearch","sortValueBy","tabIndex","valueConsistsOf","valueFormat","zIndex","inputDebounceDelay","data","trigger","isFocused","searchQuery","menu","isOpen","current","lastScrollPosition","placement","forest","normalizedOptions","nodeMap","checkedStateMap","selectedNodeIds","extractCheckedNodeIdsFromValue","selectedNodeMap","rootOptionsStates","localSearch","active","noResults","countMap","remoteSearch","computed","selectedNodes","getNode","internalValue","single","slice","filter","id","node","isRootNode","isSelected","isLeaf","children","indeterminateNodeIds","selectedNode","ancestors","ancestor","sort","hasValue","visibleOptionIds","traverseAllNodesByIndex","shouldOptionBeIncludedInSearchResult","isBranch","shouldExpand","hasVisibleOptions","showCountOnSearchComputed","hasBranchNodes","some","rootNode","shouldFlattenOptions","watch","newValue","openMenu","closeMenu","initialize","oldValue","hasChanged","$emit","getValue","getInstanceId","buildForestState","handler","isArray","deep","immediate","handleRemoteSearch","handleLocalSearch","nodeIdsFromValue","fixSelectedNodeIds","methods","verifyProps","propNames","propName","resetFlags","_blurOnSelect","getRemoteSearchEntry","prevNodeMap","keepDataOfSelectedNodes","normalize","rawNodes","raw","nodeId","createFallbackNode","extractNodeFromValue","label","enhancedNormalizer","fallbackNode","isFallbackNode","isDisabled","isNew","$set","defaultNode","valueArray","matched","nodeIdListOfPrevValue","nextSelectedNodeIds","traverseDescendantsBFS","descendant","queue","shift","callback","currNode","traverseDescendantsDFS","child","traverseAllNodesDFS","walk","toggleClickOutsideEvent","enabled","handleClickOutside","getValueContainer","$refs","control","getInput","input","focusInput","focus","blurInput","blur","handleMouseDown","preventDefault","stopPropagation","isClickedOnValueContainer","contains","wrapper","done","resetHighlightedOptionWhenNecessary","isExpandedOnSearch","showAllChildrenOnSearch","isMatched","hasMatchedDescendants","lowerCasedSearchQuery","trim","toLocaleLowerCase","splitSearchQuery","split","every","filterValue","nestedSearchLabel","matchKey","lowerCased","entry","callLoadOptionsProp","action","isPending","start","succeed","fail","end","$watch","isExpanded","shouldShowOptionInMenu","getControl","getMenu","ref","portal","portalTarget","$menu","setCurrentHighlightedOption","scroll","prev","isHighlighted","scrollToOption","$option","querySelector","$nextTick","forceReset","highlightFirstOption","first","highlightPrevOption","highlightLastOption","highlightNextOption","next","last","getLast","resetSearchQuery","saveMenuScrollPosition","restoreMenuScrollPosition","loadRootOptions","toggleMenu","toggleExpanded","nextState","childrenStates","loadChildrenOptions","selectedNodeId","ancestorNode","nodes","checkDuplication","verifyNodeShape","isDefaultExpanded","reduce","normalized","hasDisabledDescendants","branchNodes","option","leafNodes","once","result","isPromise","then","catch","JSON","stringify","select","clear","_selectNode","_deselectNode","addValue","isFullyChecked","curr","removeValue","hasUncheckedSomeDescendants","removeLastValue","lastValue","lastSelectedNode","created","mounted","destroyed","Treeselect","VERSION","PKG_VERSION"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,qBAAqB,mBAAO,CAAC,CAAkB;;AAE/C,2BAA2B,mBAAO,CAAC,CAAwB;;AAE3D,iCAAiC,mBAAO,CAAC,CAA8B;;AAEvE,sBAAsB,mBAAO,CAAC,CAAmB;;AAEjD;AACA;AACA;;AAEA,gC;;;;;;ACZA;AACA;AACA;;AAEA,iC;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C,+BAA+B;AAC5E;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA,uC;;;;;;AC3BA,uBAAuB,mBAAO,CAAC,CAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6C;;;;;;ACXA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;;AAEA;AACA;;AAEA,mC;;;;;;ACVA;AACA;AACA;;AAEA,kC;;;;;;ACJA,wBAAwB,mBAAO,CAAC,CAAqB;;AAErD,sBAAsB,mBAAO,CAAC,CAAmB;;AAEjD,iCAAiC,mBAAO,CAAC,CAA8B;;AAEvE,wBAAwB,mBAAO,CAAC,CAAqB;;AAErD;AACA;AACA;;AAEA,oC;;;;;;ACZA,uBAAuB,mBAAO,CAAC,CAAoB;;AAEnD;AACA;AACA;;AAEA,oC;;;;;;ACNA;AACA;AACA;;AAEA,kC;;;;;;ACJA;AACA;AACA;;AAEA,oC;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;;AAEA,iC;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AChBA,eAAe,mBAAO,CAAC,EAAY;AACnC,UAAU,mBAAO,CAAC,EAAO;AACzB,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO,YAAY;AAC9B,WAAW,QAAQ;AACnB;AACA,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,8CAA8C,kBAAkB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9BA,WAAW,mBAAO,CAAC,EAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;;AAEA;AACA;;AAEA;;;;;;;ACRA;AACA;;AAEA;;;;;;;;ACHA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACnBA,eAAe,mBAAO,CAAC,EAAY;AACnC,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjEA,iBAAiB,mBAAO,CAAC,EAAe;AACxC,mBAAmB,mBAAO,CAAC,EAAgB;;AAE3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA,aAAa,mBAAO,CAAC,EAAW;AAChC,gBAAgB,mBAAO,CAAC,EAAc;AACtC,qBAAqB,mBAAO,CAAC,EAAmB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3BA,WAAW,mBAAO,CAAC,EAAS;;AAE5B;AACA;;AAEA;;;;;;;ACLA,aAAa,mBAAO,CAAC,EAAW;;AAEhC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA;;AAEA;AACA;AACA;;;;;;;ACJA,aAAa,mBAAO,CAAC,EAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxBA,gBAAgB,mBAAO,CAAC,EAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACvCA,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACnCA,eAAe,mBAAO,CAAC,EAAY;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,EAAE;AACf;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,SAAS;AACtB;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA,WAAW,SAAS,GAAG,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzBA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yB;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACnBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACvBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjDA,iD;;;;;;ACAA,uC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAEO,IAAMA,eAAO,GAAGC,MAAA,GACQC,SADR,GAEnB,SAASF,OAAT,CAAiBG,OAAjB,EAA0BC,UAA1B,EAAsC;AACtC,MAAI,CAACD,OAAO,EAAZ,EAAgB;AAAA;;AACd,QAAME,OAAO,GAAG,CAAE,0BAAF,EAA+BC,MAA/B,CAAsCF,UAAU,EAAhD,CAAhB;;AAEA,gBAAAG,OAAO,EAACC,KAAR,6CAAiBH,OAAjB;AACD;AACF,CARI,C;;ACFA,SAASI,WAAT,CAAqBC,gBAArB,EAAuC;AAC5C,SAAO,SAASC,WAAT,CAAqBC,GAArB,EAAmC;AACxC,QAAIA,GAAG,CAACC,IAAJ,KAAa,WAAb,IAA4BD,GAAG,CAACE,MAAJ,KAAe,CA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KA;AAAA;AAAA,QACA,QADA,GACA,kBADA,CACA,QADA;AAGA;AAEA;AAEA,uEACA,0CADA;AAIA;AAAA,aACA;AAAA;AAAA;AACA;AADA;AAAA;AAAA,mBAEA;AAFA;AAGA;AAHA,QADA;AAAA;AAOA;AAvBA,G;;ACXwN,CAAgB,wHAAG,EAAC,C;;ACA5O;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AC5FA,IAAI,mBAAM;AACsD;AACL;;;AAG3D;AAC0F;AAC1F,gBAAgB,kBAAU;AAC1B,EAAE,+CAAM;AACR,EAAE,mBAAM;AACR;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAYf;AACD;AACe,kE;;;;;;;AChCf;AACA;AAEA,oCACA,eADA,EAEA,aAFA,EAGA,cAHA,EAIA,oBAJA,EAKA,kBALA,EAMA,qBANA,EAOA,oBAPA;AAUA;AACA,+BADA;AAEA,sBAFA;AAIA;AAAA;AACA,iCADA;AAEA;AAFA;AAAA,GAJA;AASA;AACA,gBADA,0BACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA,aACA,uBACA,kBADA,IAEA,iBAHA;AAKA,KATA;AAWA,cAXA,wBAWA;AACA;AACA;AADA;AAGA;AAfA,GATA;AA2BA;AACA,kCADA,sCACA,QADA,EACA;AACA;AACA,KAHA;AAKA,SALA,mBAKA;AAEA;AACA;AARA,GA3BA;AAsCA,SAtCA,qBAsCA;AACA,gDACA,sBADA,EAEA,gCAFA,EAGA;AAAA;AAAA;AAAA,KAHA;AAKA,GA5CA;AA8CA;AACA,SADA,mBACA;AACA;AACA;AAAA;AAAA;AADA;AAGA,KALA;AAOA,SAPA,mBAOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA;AACA,KAbA;AAeA,QAfA,kBAeA;AACA;AACA,KAjBA;AAmBA,WAnBA,qBAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA;AACA,KAzBA;AA2BA,UA3BA,oBA2BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;;AAIA;AACA;AACA;;AAEA;AACA;AACA,KAvCA;AAyCA,WAzCA,mBAyCA,GAzCA,EAyCA;AAAA,UACA,KADA,GACA,UADA,CACA,KADA;AAGA;;AAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,KApDA;AAuDA,aAvDA,qBAuDA,GAvDA,EAuDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAIA;AAEA,oEACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA,aAFA,MAEA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA,aAHA,MAGA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;;AACA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;AACA;;AACA;AAAA;AACA;AACA;AACA;;AACA;AACA;;AACA;AAAA;AAEA;AACA;AAvEA;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ACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA,sCADA;AAEA,2DAFA;AAGA,qEAHA;AAIA,+DAJA;AAKA,wFALA;AAMA;AANA;AASA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,kBADA,EAEA,2BACA,8BACA,qBADA,EADA,EAIA,kBAJA,EAFA,EADA;AAWA,KAvBA;AAyBA,wBAzBA,kCAyBA;AAAA;AACA;AAEA,aACA;AAAA;AAAA,UACA,uBADA,EAEA,0BAFA,EAGA,+BAHA,EAIA,oCAJA,EADA;AAQA,KApCA;AAsCA,eAtCA,yBAsCA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;;AAEA;AACA;AACA;AACA,yDADA;AAEA;AAFA;AADA;AAMA;AACA,8CADA;AAEA;AAFA;AAKA,eACA;AAAA;AAAA;AAAA;AAAA;AAAA,YACA,kCACA;AAAA;AAAA,UADA,EADA,EADA;AAOA;;AAKA;AACA,kDACA;AAAA;AAAA,oBADA;AAIA;AACA;;AAEA;AACA,KA5EA;AA8EA,wBA9EA,gCA8EA,QA9EA,EA8EA;AAAA;AACA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KApFA;AAsFA,2BAtFA,mCAsFA,QAtFA,EAsFA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA;AAEA,aACA;AAAA;AAAA,UACA,QADA,EADA;AAKA,KAjGA;AAmGA,kBAnGA,4BAmGA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAEA;AACA;AACA,wCADA;AAEA,qEAFA;AAGA,iFAHA;AAIA,yEAJA;AAKA;AALA;AAQA,kCACA;AAAA;AAAA,QAD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CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAKA;AAEA;AACA,KArNA;AAuNA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA,CAvNA;AA6NA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KARA,CA7NA;AAuOA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAAA,UACA,IADA,GACA,IADA,CACA,IADA;AAGA;AACA,KAJA;AAvOA,GAzBA;AAuQA,QAvQA,oBAuQA;AAAA;;AAAA;AAAA,QACA,IADA,GACA,IADA,CACA,IADA;AAEA;;AACA;AACA;AADA,8CAEA,WAFA,GAEA,IAFA;;AAIA;AACA;AACA;AADA;AADA;AAMA;AACA;AAAA;AAAA;AACA;AACA;AACA,WACA;AACA,4BADA;AAAA;AAEA,sBAFA;AAGA,qBAHA;AAIA;AAJA;AAAA,QAKA,mBALA,EAMA,iBACA,kCACA,2BADA,EAPA,EADA;AAcA;AAtSA;AA0SA,2E;;AClTkN,CAAgB,4GAAG,EAAC,C;;ACAtO,IAAI,aAAM,EAAE,sBAAe;AAC+B;AACL;;;AAGrD;AAC0F;AAC1F,IAAI,gBAAS,GAAG,kBAAU;AAC1B,EAAE,yCAAM;AACR,EAAE,aAAM;AACR,EAAE,sBAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,mBAYf;AACD,gBAAS;AACM,sEAAS,Q;;AChCxB;AACA;AACA;AACA;AAEA;AACA,YADA;AAEA,kBAFA;AAGA,cAHA;AAIA;AAJA;AAOA;AACA,8BADA;AAEA,sBAFA;AAIA;AACA,aADA,uBACA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA,KAPA;AASA,sBATA,gCASA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA;AADA;AAGA;AAfA,GAJA;AAsBA;AACA,0BADA,8BACA,QADA,EACA;AACA;AAEA;AACA,OAHA,MAGA;AACA;AACA;AACA;AARA,GAtBA;AAiCA,SAjCA,qBAiCA;AACA;AACA;AACA,GApCA;AAsCA,SAtCA,qBAsCA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAGA;AACA,GA1CA;AA4CA,WA5CA,uBA4CA;AACA;AACA,GA9CA;AAgDA;AACA,cADA,wBACA;AAAA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAGA;AAEA,aACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UACA,uBADA,EAEA,iBACA,iCADA,GAEA,8BACA,iCADA,GAEA,4BANA,EAOA,sBAPA,EADA;AAWA,KAjBA;AAmBA,oBAnBA,8BAmBA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,kCACA,oBADA,GAEA,IAFA;AAGA,KA1BA;AA4BA,mBA5BA,6BA4BA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAEA,iCACA,mBADA,GAEA,IAFA;AAGA,KAnCA;AAqCA,yBArCA,mCAqCA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAjDA;AAmDA,8BAnDA,wCAmDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;;AAGA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA,KAjEA;AAmEA,8BAnEA,wCAmEA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA,+DACA,KADA,GAEA,4CAFA;;AAIA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OA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A3BA;AA6BA;AACA,iBADA,2BACA;AACA;AACA;AACA;AACA;AACA,KANA;AAQA,kBARA,4BAQA;AACA;AACA;AACA,KAXA;AAaA,6CAbA,uDAaA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AADA;AAGA,KAvBA;AAyBA,2BAzBA,qCAyBA;AAAA;;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AAGA;AAEA;AACA;AACA;;AACA;AACA,SAHA;AADA;AAMA,KAtCA;AAwCA,8CAxCA,wDAwCA;AACA;AAEA;AACA;AACA,KA7CA;AA+CA,4BA/CA,sCA+CA;AACA;AAEA;AACA;AACA,KApDA;AAsDA,eAtDA,yBAsDA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AAEA;AACA,KA7DA;AA+DA,6BA/DA,uCA+DA;AAAA,UACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AA9EA,GA7BA;AA8GA,QA9GA,oBA8GA;AAAA;AAAA,QACA,QADA,GACA,IADA,CACA,QADA;AAEA;AACA;AAAA;AAAA;AAEA,WACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QACA;AAAA;AAAA,MADA,EADA;AAKA,GAxHA;AA0HA,WA1HA,uBA0HA;AACA;AACA;AA5HA;AA+HA;AAEA;AACA,qCADA;AAGA,SAHA,qBAGA;AACA;AACA,GALA;AAOA,SAPA,qBAOA;AACA;AACA,GATA;AAWA,WAXA,uBAWA;AACA;AACA,GAbA;AAeA;AACA,SADA,mBACA;AACA;AACA;AAEA;AACA,cADA;AAEA;AAFA,SAGA,YAHA;AAKA,KAVA;AAYA,YAZA,sBAYA;AACA;AACA;AAEA;AACA;AACA;AAlBA,GAfA;AAoCA,QApCA,oBAoCA;AAAA;AACA,oCACA;AAAA;AAAA,MADA;AAIA;AACA;AA1CA,G;;ACtIsN,CAAgB,oHAAG,EAAC,C;;ACA1O,IAAI,iBAAM,EAAE,0BAAe;AACmC;AACL;;;AAGzD;AAC0F;AAC1F,IAAI,oBAAS,GAAG,kBAAU;AAC1B,EAAE,6CAAM;AACR,EAAE,iBAAM;AACR,EAAE,0BAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;AChCxB;AACA;AACA;AACA;AACA;AAEA;AACA,wBADA;AAEA,2BAFA;AAIA;AACA,gBADA,0BACA;AACA;AACA,8BADA;AAEA,6CAFA;AAGA,8CAHA;AAIA,qDAJA;AAKA,iDALA;AAMA,yDANA;AAOA,kDAPA;AAQA,gDARA;AASA,mEATA;AAUA,sEAVA;AAWA,wEAXA;AAYA;AAZA;AAcA;AAhBA,GAJA;AAuBA,QAvBA,oBAuBA;AAAA;AACA,WACA;AAAA;AAAA;AAAA,QACA,eADA,EAEA;AAAA;AAAA,MAFA,EAGA;AAAA;AAAA;AAAA;AAAA,MAHA,EADA;AAOA;AA/BA,G;;ACPsN,CAAgB,oHAAG,EAAC,C;;ACA1O,IAAI,iBAAM,EAAE,0BAAe;AACmC;AACL;;;AAGzD;AAC0F;AAC1F,IAAI,oBAAS,GAAG,kBAAU;AAC1B,EAAE,6CAAM;AACR,EAAE,iBAAM;AACR,EAAE,0BAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,uBAYf;AACD,oBAAS;AACM,mEAAS,Q;;;;;ACjCxB;AACA;AACA;AAEe+G,mFAAf;AACA;AACA;AAOO,IAAMC,OAAO,GAAGC,OAAhB,C","file":"vue-treeselect.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Vue\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"VueTreeselect\"] = factory(require(\"Vue\"));\n\telse\n\t\troot[\"VueTreeselect\"] = factory(root[\"Vue\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__36__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 38);\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/\n\nmodule.exports = function mergeJSXProps (objs) {\n return objs.reduce(function (a, b) {\n var aa, bb, key, nestedKey, temp\n for (key in b) {\n aa = a[key]\n bb = b[key]\n if (aa && nestRE.test(key)) {\n // normalize class\n if (key === 'class') {\n if (typeof aa === 'string') {\n temp = aa\n a[key] = aa = {}\n aa[temp] = true\n }\n if (typeof bb === 'string') {\n temp = bb\n b[key] = bb = {}\n bb[temp] = true\n }\n }\n if (key === 'on' || key === 'nativeOn' || key === 'hook') {\n // merge functions\n for (nestedKey in bb) {\n aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])\n }\n } else if (Array.isArray(aa)) {\n a[key] = aa.concat(bb)\n } else if (Array.isArray(bb)) {\n a[key] = [aa].concat(bb)\n } else {\n for (nestedKey in bb) {\n aa[nestedKey] = bb[nestedKey]\n }\n }\n } else {\n a[key] = b[key]\n }\n }\n return a\n }, {})\n}\n\nfunction mergeFn (a, b) {\n return function () {\n a && a.apply(this, arguments)\n b && b.apply(this, arguments)\n }\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__36__;","// extracted by mini-css-extract-plugin","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","var index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\nexport default index;\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// ========================\r\n// Debugging Helpers\r\n// ========================\r\n\r\nexport { warning } from './warning'\r\n\r\n// ========================\r\n// DOM Utilities\r\n// ========================\r\n\r\nexport { onLeftClick } from './onLeftClick'\r\nexport { scrollIntoView } from './scrollIntoView'\r\nexport { debounce } from './debounce'\r\nexport { watchSize } from './watchSize'\r\nexport { setupResizeAndScrollEventListeners } from './setupResizeAndScrollEventListeners'\r\n\r\n// ========================\r\n// Language Helpers\r\n// ========================\r\n\r\nexport { isNaN } from './isNaN'\r\nexport { isPromise } from './isPromise'\r\nexport { once } from './once'\r\nexport { noop } from './noop'\r\nexport { identity } from './identity'\r\nexport { constant } from './constant'\r\nexport { createMap } from './createMap'\r\nexport { deepExtend } from './deepExtend'\r\nexport { last } from './last'\r\nexport { includes } from './includes'\r\nexport { find } from './find'\r\nexport { removeFromArray } from './removeFromArray'\r\n\r\n// ========================\r\n// Other Utilities\r\n// ========================\r\n\r\nexport { quickDiff } from './quickDiff'\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HiddenFields.vue?vue&type=script&lang=js&\"","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Input.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Placeholder.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValueItem.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MultiValue.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Arrow.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Control.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Tip.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Option.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Menu.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuPortal.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Treeselect.vue?vue&type=script&lang=js&\"","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/vue-treeselect.umd.min.js b/dist/vue-treeselect.umd.min.js new file mode 100644 index 00000000..580020ea --- /dev/null +++ b/dist/vue-treeselect.umd.min.js @@ -0,0 +1,7 @@ +/*! + * vue-treeselect v0.4.0 | (c) 2017-2020 Riophae Lee + * Released under the MIT License. + * https://vue-treeselect.js.org/ + */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Vue")):"function"==typeof define&&define.amd?define(["Vue"],t):"object"==typeof exports?exports.VueTreeselect=t(require("Vue")):e.VueTreeselect=t(e.Vue)}(window,(function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=38)}([function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){var n=/^(attrs|props|on|nativeOn|class|style|hook)$/;function i(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}}e.exports=function(e){return e.reduce((function(e,t){var r,o,s,a,l;for(s in t)if(r=e[s],o=t[s],r&&n.test(s))if("class"===s&&("string"==typeof r&&(l=r,e[s]=r={},r[l]=!0),"string"==typeof o&&(l=o,t[s]=o={},o[l]=!0)),"on"===s||"nativeOn"===s||"hook"===s)for(a in o)r[a]=i(r[a],o[a]);else if(Array.isArray(r))e[s]=r.concat(o);else if(Array.isArray(o))e[s]=[r].concat(o);else for(a in o)r[a]=o[a];else e[s]=t[s];return e}),{})}},function(e,t,n){var i=n(23),r=n(24),o=n(3),s=n(25);e.exports=function(e){return i(e)||r(e)||o(e)||s()}},function(e,t,n){var i=n(4);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=t||n<0||m&&e-p>=u}function O(){var e=r();if(b(e))return _(e);h=setTimeout(O,function(e){var n=t-(e-f);return m?a(n,u-(e-p)):n}(e))}function _(e){return h=void 0,g&&l?y(e):(l=c=void 0,d)}function E(){var e=r(),n=b(e);if(l=arguments,c=this,f=e,n){if(void 0===h)return S(f);if(m)return clearTimeout(h),h=setTimeout(O,t),y(f)}return void 0===h&&(h=setTimeout(O,t)),d}return t=o(t)||0,i(n)&&(v=!!n.leading,u=(m="maxWait"in n)?s(o(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=c=h=void 0},E.flush=function(){return void 0===h?d:_(r())},E}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var i=n(27),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},function(e,t,n){var i=n(7),r=n(29),o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},function(e,t,n){var i=n(8).Symbol;e.exports=i},function(e,t){e.exports=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}},function(e,t,n){var i=n(34);e.exports=function(e){return i(2,e)}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var i=n(20),r=n(21),o=n(3),s=n(22);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||s()}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";e.exports=function(e,t){var n=t.length,i=e.length;if(i>n)return!1;if(i===n)return e===t;e:for(var r=0,o=0;r0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},function(e,t,n){var i=n(36);e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var i=n(9);e.exports=function(e){return e?(e=i(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"Treeselect",(function(){return nt})),n.d(t,"treeselectMixin",(function(){return de})),n.d(t,"LOAD_ROOT_OPTIONS",(function(){return H})),n.d(t,"LOAD_CHILDREN_OPTIONS",(function(){return W})),n.d(t,"ASYNC_SEARCH",(function(){return Q})),n.d(t,"VERSION",(function(){return it}));var i=n(16),r=n.n(i),o=n(2),s=n.n(o),a=n(0),l=n.n(a),c=n(5),u=n.n(c).a;function d(e){return function(t){if("mousedown"===t.type&&0===t.button){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rn.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight):i.top-r0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(n){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(n)||t.push(n.id),n.isBranch&&!e.shouldExpand(n))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"==typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){P(e,t)&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue();P(e,this.internalValue)&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(u((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||u((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&u((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"].forEach((function(t){u((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=T(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(null,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return u((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),n={id:e,label:this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),ancestors:[],parentNode:null,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,n={id:e};return"id"===this.valueFormat?n:F(this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],(function(n){return n&&t.enhancedNormalizer(n).id===e}))||n},fixSelectedNodeIds:function(e){var t=this,n=[];if(this.single||this.flat||this.disableBranchNodes||"ALL"===this.valueConsistsOf)n=e;else if("BRANCH_PRIORITY"===this.valueConsistsOf)e.forEach((function(e){n.push(e);var i=t.getNode(e);i.isBranch&&t.traverseDescendantsBFS(i,(function(e){n.push(e.id)}))}));else if("LEAF_PRIORITY"===this.valueConsistsOf)for(var i=T(),r=e.slice();r.length;){var o=r.shift(),s=this.getNode(o);n.push(o),s.isRootNode||(s.parentNode.id in i||(i[s.parentNode.id]=s.parentNode.children.length),0==--i[s.parentNode.id]&&r.push(s.parentNode.id))}else if("ALL_WITH_INDETERMINATE"===this.valueConsistsOf)for(var a=T(),l=e.filter((function(e){var n=t.getNode(e);return n.isLeaf||0===n.children.length}));l.length;){var c=l.shift(),u=this.getNode(c);n.push(c),u.isRootNode||(u.parentNode.id in a||(a[u.parentNode.id]=u.parentNode.children.length),0==--a[u.parentNode.id]&&l.push(u.parentNode.id))}P(this.forest.selectedNodeIds,n)&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(n){if(e[n]){var i=oe({},e[n],{isFallbackNode:!0});t.$set(t.forest.nodeMap,n,i)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch)for(var n=e.children.slice();n.length;){var i=n[0];i.isBranch&&n.push.apply(n,s()(i.children)),t(i),n.shift()}},traverseDescendantsDFS:function(e,t){var n=this;e.isBranch&&e.children.forEach((function(e){n.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(n){t.traverseDescendantsDFS(n,e),e(n)}))},traverseAllNodesByIndex:function(e){!function t(n){n.children.forEach((function(n){!1!==e(n)&&n.isBranch&&t(n)}))}({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:d((function(e){(e.preventDefault(),e.stopPropagation(),this.disabled)||(this.getValueContainer().$el.contains(e.target)&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags())})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,n=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var n;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(n={},l()(n,"ALL_CHILDREN",0),l()(n,"ALL_DESCENDANTS",0),l()(n,"LEAF_CHILDREN",0),l()(n,"LEAF_DESCENDANTS",0),n)))}));var i=t.trim().toLocaleLowerCase(),r=i.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&r.length>1?t.isMatched=r.every((function(e){return le(!1,!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(n){return le(!e.disableFuzzyMatching,e.replaceAccents,i,t.lowerCased[n])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].ALL_DESCENDANTS++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id].LEAF_DESCENDANTS++})),null!==t.parentNode&&(e.localSearch.countMap[t.parentNode.id].ALL_CHILDREN+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id].LEAF_CHILDREN+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&null!==t.parentNode&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),i=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&n.isLoaded)return i();this.callLoadOptionsProp({action:Q,args:{searchQuery:t},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(r){n.isLoaded=!0,n.options=r,e.trigger.searchQuery===t&&i()},fail:function(e){n.loadingError=ce(e)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,n=this.remoteSearch[t]||oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{options:[]});if(this.$watch((function(){return n.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,n),n},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=(this.appendToBody?this.$refs.portal.portalTarget:this).$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.menu.current;if(null!=i&&i in this.forest.nodeMap&&(this.forest.nodeMap[i].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&n){var r=function(){var n=t.getMenu(),i=n.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));i&&h(n,i)};this.getMenu()?r():this.$nextTick(r)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=k()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch)&&(e.showAllChildrenOnSearch=!0):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=T();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var n=T();this.multiple&&(this.traverseAllNodesByIndex((function(e){n[e.id]=0})),this.selectedNodes.forEach((function(t){n[t.id]=2,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(n[t.id]=1)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(e){return oe({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,n){var i=this,o=t.map((function(e){return[i.enhancedNormalizer(e),e]})).map((function(t,o){var s=r()(t,2),a=s[0],c=s[1];i.checkDuplication(a),i.verifyNodeShape(a);var d=a.id,h=a.label,f=a.children,p=a.isDefaultExpanded,v=null===e,m=v?0:e.level+1,g=Array.isArray(f)||null===f,y=!g,S=!!a.isDisabled||!i.flat&&!v&&e.isDisabled,b=!!a.isNew,O=i.matchKeys.reduce((function(e,t){return oe({},e,l()({},t,(n=a[t],"string"==typeof n?n:"number"!=typeof n||N(n)?"":n+"").toLocaleLowerCase()));var n}),{}),_=v?O.label:e.nestedSearchLabel+" "+O.label,E=i.$set(i.forest.nodeMap,d,T());if(i.$set(E,"id",d),i.$set(E,"label",h),i.$set(E,"level",m),i.$set(E,"ancestors",v?[]:[e].concat(e.ancestors)),i.$set(E,"index",(v?[]:e.index).concat(o)),i.$set(E,"parentNode",e),i.$set(E,"lowerCased",O),i.$set(E,"nestedSearchLabel",_),i.$set(E,"isDisabled",S),i.$set(E,"isNew",b),i.$set(E,"isMatched",!1),i.$set(E,"isHighlighted",!1),i.$set(E,"isBranch",g),i.$set(E,"isLeaf",y),i.$set(E,"isRootNode",v),i.$set(E,"raw",c),g){var x,L=Array.isArray(f);i.$set(E,"childrenStates",oe({},{isLoaded:!1,isLoading:!1,loadingError:""},{isLoaded:L})),i.$set(E,"isExpanded","boolean"==typeof p?p:mo+40,c=a>o+40;r.top>=0&&r.top<=s||r.top<0&&r.bottom>0?"auto"!==e.openDirection?e.menu.placement=Qe[e.openDirection]:e.menu.placement=l||!c?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:O(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:E(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},void 0,void 0,!1,null,null,null);Ye.options.__file="src/components/Menu.vue";var qe=Ye.exports,Ke=n(19),Xe=n.n(Ke);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Je,Ge={name:"vue-treeselect--portal-target",inject:["instance"],watch:{"instance.menu.isOpen":function(e){e?this.setupHandlers():this.removeHandlers()},"instance.menu.placement":function(){this.updateMenuContainerOffset()}},created:function(){this.controlResizeAndScrollEventListeners=null,this.controlSizeWatcher=null},mounted:function(){this.instance.menu.isOpen&&this.setupHandlers()},methods:{setupHandlers:function(){this.updateWidth(),this.updateMenuContainerOffset(),this.setupControlResizeAndScrollEventListeners(),this.setupControlSizeWatcher()},removeHandlers:function(){this.removeControlResizeAndScrollEventListeners(),this.removeControlSizeWatcher()},setupControlResizeAndScrollEventListeners:function(){var e=this.instance.getControl();this.controlResizeAndScrollEventListeners||(this.controlResizeAndScrollEventListeners={remove:E(e,this.updateMenuContainerOffset)})},setupControlSizeWatcher:function(){var e=this,t=this.instance.getControl();this.controlSizeWatcher||(this.controlSizeWatcher={remove:O(t,(function(){e.updateWidth(),e.updateMenuContainerOffset()}))})},removeControlResizeAndScrollEventListeners:function(){this.controlResizeAndScrollEventListeners&&(this.controlResizeAndScrollEventListeners.remove(),this.controlResizeAndScrollEventListeners=null)},removeControlSizeWatcher:function(){this.controlSizeWatcher&&(this.controlSizeWatcher.remove(),this.controlSizeWatcher=null)},updateWidth:function(){var e=this.instance,t=this.$el,n=e.getControl().getBoundingClientRect();t.style.width=n.width+"px"},updateMenuContainerOffset:function(){var e=this.instance,t=e.getControl(),n=this.$el,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),o="bottom"===e.menu.placement?i.height:0,s=Math.round(i.left-r.left)+"px",a=Math.round(i.top-r.top+o)+"px";this.$refs.menu.$refs["menu-container"].style[F(["transform","webkitTransform","MozTransform","msTransform"],(function(e){return e in document.body.style}))]="translate(".concat(s,", ").concat(a,")")}},render:function(){var e=arguments[0],t=this.instance,n=["vue-treeselect__portal-target",t.wrapperClass],i={zIndex:t.zIndex};return e("div",{class:n,style:i,attrs:{"data-instance-id":t.getInstanceId()}},[e(qe,{ref:"menu"})])},destroyed:function(){this.removeHandlers()}},Ze=fe({name:"vue-treeselect--menu-portal",created:function(){this.portalTarget=null},mounted:function(){this.setup()},destroyed:function(){this.teardown()},methods:{setup:function(){var e=document.createElement("div");document.body.appendChild(e),this.portalTarget=new Xe.a(function(e){for(var t=1;t arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","module.exports = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__19__;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\nmodule.exports = before;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","import { noop } from './noop'\r\n\r\nexport const warning = process.env.NODE_ENV === 'production'\r\n ? /* istanbul ignore next */ noop\r\n : function warning(checker, complainer) {\r\n if (!checker()) {\r\n const message = [ '[Vue-Treeselect Warning]' ].concat(complainer())\r\n // eslint-disable-next-line no-console\r\n console.error(...message)\r\n }\r\n }\r\n","export function onLeftClick(mouseDownHandler) {\r\n return function onMouseDown(evt, ...args) {\r\n if (evt.type === 'mousedown' && evt.button === 0) {\r\n mouseDownHandler.call(this, evt, ...args)\r\n }\r\n }\r\n}\r\n","// from react-select\r\nexport function scrollIntoView($scrollingEl, $focusedEl) {\r\n const scrollingReact = $scrollingEl.getBoundingClientRect()\r\n const focusedRect = $focusedEl.getBoundingClientRect()\r\n const overScroll = $focusedEl.offsetHeight / 3\r\n\r\n if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\r\n $scrollingEl.scrollTop = Math.min(\r\n $focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll,\r\n $scrollingEl.scrollHeight,\r\n )\r\n } else if (focusedRect.top - overScroll < scrollingReact.top) {\r\n $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0)\r\n }\r\n}\r\n","import watchSizeForBrowsersOtherThanIE9 from 'watch-size'\r\nimport { removeFromArray } from './removeFromArray'\r\n\r\nlet intervalId\r\nconst registered = []\r\nconst INTERVAL_DURATION = 100\r\n\r\nfunction run() {\r\n intervalId = setInterval(() => {\r\n registered.forEach(test)\r\n }, INTERVAL_DURATION)\r\n}\r\n\r\nfunction stop() {\r\n clearInterval(intervalId)\r\n intervalId = null\r\n}\r\n\r\nfunction test(item) {\r\n const { $el, listener, lastWidth, lastHeight } = item\r\n const width = $el.offsetWidth\r\n const height = $el.offsetHeight\r\n\r\n if (lastWidth !== width || lastHeight !== height) {\r\n item.lastWidth = width\r\n item.lastHeight = height\r\n\r\n listener({ width, height })\r\n }\r\n}\r\n\r\nfunction watchSizeForIE9($el, listener) {\r\n const item = {\r\n $el,\r\n listener,\r\n lastWidth: null,\r\n lastHeight: null,\r\n }\r\n const unwatch = () => {\r\n removeFromArray(registered, item)\r\n if (!registered.length) stop()\r\n }\r\n\r\n registered.push(item)\r\n // The original watch-size will call the listener on initialization.\r\n // Keep the same behavior here.\r\n test(item)\r\n run()\r\n\r\n return unwatch\r\n}\r\n\r\nexport function watchSize($el, listener) {\r\n // See: https://stackoverflow.com/a/31293352\r\n const isIE9 = document.documentMode === 9\r\n // watch-size will call the listener on initialization.\r\n // Disable this behavior with a lock to achieve a clearer code logic.\r\n let locked = true\r\n const wrappedListener = (...args) => locked || listener(...args)\r\n const implementation = isIE9\r\n ? watchSizeForIE9\r\n : watchSizeForBrowsersOtherThanIE9\r\n const removeSizeWatcher = implementation($el, wrappedListener)\r\n locked = false // unlock after initialization\r\n\r\n return removeSizeWatcher\r\n}\r\n","var index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\nexport default index;\n","export function removeFromArray(arr, elem) {\r\n const idx = arr.indexOf(elem)\r\n if (idx !== -1) arr.splice(idx, 1)\r\n}\r\n","function findScrollParents($el) {\r\n const $scrollParents = []\r\n let $parent = $el.parentNode\r\n\r\n while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\r\n if (isScrollElment($parent)) $scrollParents.push($parent)\r\n $parent = $parent.parentNode\r\n }\r\n $scrollParents.push(window)\r\n\r\n return $scrollParents\r\n}\r\n\r\nfunction isScrollElment($el) {\r\n // Firefox wants us to check `-x` and `-y` variations as well\r\n const { overflow, overflowX, overflowY } = getComputedStyle($el)\r\n return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)\r\n}\r\n\r\nexport function setupResizeAndScrollEventListeners($el, listener) {\r\n const $scrollParents = findScrollParents($el)\r\n\r\n window.addEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach(scrollParent => {\r\n scrollParent.addEventListener('scroll', listener, { passive: true })\r\n })\r\n\r\n return function removeEventListeners() {\r\n window.removeEventListener('resize', listener, { passive: true })\r\n $scrollParents.forEach($scrollParent => {\r\n $scrollParent.removeEventListener('scroll', listener, { passive: true })\r\n })\r\n }\r\n}\r\n","export function isNaN(x) {\r\n return x !== x\r\n}\r\n","export const createMap = () => Object.create(null)\r\n","function isPlainObject(value) {\r\n if (value == null || typeof value !== 'object') return false\r\n return Object.getPrototypeOf(value) === Object.prototype\r\n}\r\n\r\nfunction copy(obj, key, value) {\r\n if (isPlainObject(value)) {\r\n obj[key] || (obj[key] = {})\r\n deepExtend(obj[key], value)\r\n } else {\r\n obj[key] = value\r\n }\r\n}\r\n\r\nexport function deepExtend(target, source) {\r\n if (isPlainObject(source)) {\r\n const keys = Object.keys(source)\r\n\r\n for (let i = 0, len = keys.length; i < len; i++) {\r\n copy(target, keys[i], source[keys[i]])\r\n }\r\n }\r\n\r\n return target\r\n}\r\n","export function includes(arrOrStr, elem) {\r\n return arrOrStr.indexOf(elem) !== -1\r\n}\r\n","export function find(arr, predicate, ctx) {\r\n for (let i = 0, len = arr.length; i < len; i++) {\r\n if (predicate.call(ctx, arr[i], i, arr)) return arr[i]\r\n }\r\n return undefined\r\n}\r\n","export function quickDiff(arrA, arrB) {\r\n if (arrA.length !== arrB.length) return true\r\n\r\n for (let i = 0; i < arrA.length; i++) {\r\n if (arrA[i] !== arrB[i]) return true\r\n }\r\n\r\n return false\r\n}\r\n","// Magic value that indicates a root level node.\r\nexport const NO_PARENT_NODE = null\r\n\r\n// Types of checked state.\r\nexport const UNCHECKED = 0\r\nexport const INDETERMINATE = 1\r\nexport const CHECKED = 2\r\n\r\n// Types of count number.\r\nexport const ALL_CHILDREN = 'ALL_CHILDREN'\r\nexport const ALL_DESCENDANTS = 'ALL_DESCENDANTS'\r\nexport const LEAF_CHILDREN = 'LEAF_CHILDREN'\r\nexport const LEAF_DESCENDANTS = 'LEAF_DESCENDANTS'\r\n\r\n// Action types of delayed loading.\r\nexport const LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS'\r\nexport const LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS'\r\nexport const ASYNC_SEARCH = 'ASYNC_SEARCH'\r\n\r\n// Acceptable values of `valueConsistsOf` prop.\r\nexport const ALL = 'ALL'\r\nexport const BRANCH_PRIORITY = 'BRANCH_PRIORITY'\r\nexport const LEAF_PRIORITY = 'LEAF_PRIORITY'\r\nexport const ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE'\r\n\r\n// Acceptable values of `sortValueBy` prop.\r\nexport const ORDER_SELECTED = 'ORDER_SELECTED'\r\nexport const LEVEL = 'LEVEL'\r\nexport const INDEX = 'INDEX'\r\n\r\n// Key codes look-up table.\r\nexport const KEY_CODES = {\r\n BACKSPACE: 8,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n END: 35,\r\n HOME: 36,\r\n ARROW_LEFT: 37,\r\n ARROW_UP: 38,\r\n ARROW_RIGHT: 39,\r\n ARROW_DOWN: 40,\r\n DELETE: 46,\r\n}\r\n\r\n// Other constants.\r\nexport const INPUT_DEBOUNCE_DELAY = process.env.NODE_ENV === 'testing'\r\n ? /* to speed up unit testing */ 10\r\n : /* istanbul ignore next */ 200\r\nexport const MIN_INPUT_WIDTH = 5\r\nexport const MENU_BUFFER = 40\r\n","import {\r\n warning,\r\n onLeftClick, scrollIntoView,\r\n isNaN, isPromise, once,\r\n identity, constant, createMap,\r\n quickDiff, last as getLast, includes, find, removeFromArray,\r\n} from '../utils'\r\n\r\nimport {\r\n NO_PARENT_NODE,\r\n UNCHECKED, INDETERMINATE, CHECKED,\r\n LOAD_ROOT_OPTIONS, LOAD_CHILDREN_OPTIONS, ASYNC_SEARCH,\r\n ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE,\r\n ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS,\r\n ORDER_SELECTED, LEVEL, INDEX, INPUT_DEBOUNCE_DELAY,\r\n} from '../constants'\r\nimport fuzzysearch from 'fuzzysearch'\r\n\r\nfunction sortValueByIndex(a, b) {\r\n let i = 0\r\n do {\r\n if (a.level < i) return -1\r\n if (b.level < i) return 1\r\n if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i]\r\n i++\r\n } while (true)\r\n}\r\n\r\nfunction sortValueByLevel(a, b) {\r\n return a.level === b.level\r\n ? sortValueByIndex(a, b)\r\n : a.level - b.level\r\n}\r\n\r\nfunction createAsyncOptionsStates() {\r\n return {\r\n isLoaded: false,\r\n isLoading: false,\r\n loadingError: '',\r\n }\r\n}\r\n\r\nfunction slugify(str) {\r\n const map = {\r\n a: 'á|à|ã|â|ä|A|À|Á|Ã|Â|Ä',\r\n e: 'é|è|ê|ë|E|É|È|Ê|Ë',\r\n i: 'í|ì|î|ï|I|Í|Ì|Î|Ï',\r\n o: 'ó|ò|ô|õ|ö|O|Ó|Ò|Ô|Õ|Ö',\r\n u: 'ú|ù|û|ü|U|Ú|Ù|Û|Ü',\r\n }\r\n\r\n str = str.toLowerCase()\r\n\r\n for (const pattern in map) {\r\n str = str.replace(new RegExp(map[pattern], 'g'), pattern)\r\n }\r\n return str\r\n}\r\n\r\nfunction stringifyOptionPropValue(value) {\r\n if (typeof value === 'string') return value\r\n if (typeof value === 'number' && !isNaN(value)) return value + ''\r\n // istanbul ignore next\r\n return ''\r\n}\r\n\r\nfunction match(enableFuzzyMatch, replaceAccents, needle, haystack) {\r\n return enableFuzzyMatch\r\n ? fuzzysearch(needle, haystack)\r\n : replaceAccents ? includes(slugify(haystack), slugify(needle)) : includes(haystack, needle)\r\n}\r\n\r\nfunction getErrorMessage(err) {\r\n return err.message || /* istanbul ignore next */String(err)\r\n}\r\n\r\nlet instanceId = 0\r\n\r\nexport default {\r\n provide() {\r\n return {\r\n // Enable access to the instance of root component of vue-treeselect\r\n // across hierarchy.\r\n instance: this,\r\n }\r\n },\r\n\r\n props: {\r\n /**\r\n * Whether to allow resetting value even if there are disabled selected nodes.\r\n */\r\n allowClearingDisabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When an ancestor node is selected/deselected, whether its disabled descendants should be selected/deselected.\r\n * You may want to use this in conjunction with `allowClearingDisabled` prop.\r\n */\r\n allowSelectingDisabledDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether the menu should be always open.\r\n */\r\n alwaysOpen: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Append the menu to ?\r\n */\r\n appendToBody: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable async search mode.\r\n */\r\n async: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically focus the component on mount?\r\n */\r\n autoFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Automatically load root options on mount. When set to `false`, root options will be loaded when the menu is opened.\r\n */\r\n autoLoadRootOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its ancestors. Applies to flat mode only.\r\n */\r\n autoDeselectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user deselects a node, automatically deselect its descendants. Applies to flat mode only.\r\n */\r\n autoDeselectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its ancestors. Applies to flat mode only.\r\n */\r\n autoSelectAncestors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * When user selects a node, automatically select its descendants. Applies to flat mode only.\r\n */\r\n autoSelectDescendants: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing backspace key removes the last item if there is no text input.\r\n */\r\n backspaceRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Function that processes before clearing all input fields.\r\n * Return `false` to prevent value from being cleared.\r\n * @type {function(): (boolean|Promise)}\r\n */\r\n beforeClearAll: {\r\n type: Function,\r\n default: constant(true),\r\n },\r\n\r\n /**\r\n * Show branch nodes before leaf nodes?\r\n */\r\n branchNodesFirst: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Should cache results of every search request?\r\n */\r\n cacheOptions: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Show an \"×\" button that resets value?\r\n */\r\n clearable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button when `multiple: true`.\r\n */\r\n clearAllText: {\r\n type: String,\r\n default: 'Clear all',\r\n },\r\n\r\n /**\r\n * Whether to clear the search input after selecting.\r\n * Use only when `multiple` is `true`.\r\n * For single-select mode, it **always** clears the input after selecting an option regardless of the prop value.\r\n */\r\n clearOnSelect: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Title for the \"×\" button.\r\n */\r\n clearValueText: {\r\n type: String,\r\n default: 'Clear value',\r\n },\r\n\r\n /**\r\n * Whether to close the menu after selecting an option?\r\n * Use only when `multiple` is `true`.\r\n */\r\n closeOnSelect: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * How many levels of branch nodes should be automatically expanded when loaded.\r\n * Set `Infinity` to make all branch nodes expanded by default.\r\n */\r\n defaultExpandLevel: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The default set of options to show before the user starts searching. Used for async search mode.\r\n * When set to `true`, the results for search query as a empty string will be autoloaded.\r\n * @type {boolean|node[]}\r\n */\r\n defaultOptions: {\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether pressing delete key removes the last item if there is no text input.\r\n */\r\n deleteRemoves: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Delimiter to use to join multiple values for the hidden field value.\r\n */\r\n delimiter: {\r\n type: String,\r\n default: ',',\r\n },\r\n\r\n /**\r\n * Only show the nodes that match the search value directly, excluding its ancestors.\r\n *\r\n * @type {Object}\r\n */\r\n flattenSearchResults: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Prevent branch nodes from being selected?\r\n */\r\n disableBranchNodes: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the control?\r\n */\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Disable the fuzzy matching functionality?\r\n */\r\n disableFuzzyMatching: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Whether to enable flat mode or not. Non-flat mode (default) means:\r\n * - Whenever a branch node gets checked, all its children will be checked too\r\n * - Whenever a branch node has all children checked, the branch node itself will be checked too\r\n * Set `true` to disable this mechanism\r\n */\r\n flat: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Will be passed with all events as the last param.\r\n * Useful for identifying events origin.\r\n */\r\n instanceId: {\r\n // Add two trailing \"$\" to distinguish from explictly specified ids.\r\n default: () => `${instanceId++}$$`,\r\n type: [ String, Number ],\r\n },\r\n\r\n /**\r\n * Joins multiple values into a single form field with the `delimiter` (legacy mode).\r\n */\r\n joinValues: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Limit the display of selected options.\r\n * The rest will be hidden within the limitText string.\r\n */\r\n limit: {\r\n type: Number,\r\n default: Infinity,\r\n },\r\n\r\n /**\r\n * Function that processes the message shown when selected elements pass the defined limit.\r\n * @type {function(number): string}\r\n */\r\n limitText: {\r\n type: Function,\r\n default: function limitTextDefault(count) { // eslint-disable-line func-name-matching\r\n return `and ${count} more`\r\n },\r\n },\r\n\r\n /**\r\n * Text displayed when loading options.\r\n */\r\n loadingText: {\r\n type: String,\r\n default: 'Loading...',\r\n },\r\n\r\n /**\r\n * Used for dynamically loading options.\r\n * @type {function({action: string, callback: (function((Error|string)=): void), parentNode: node=, instanceId}): void}\r\n */\r\n loadOptions: {\r\n type: Function,\r\n },\r\n\r\n /**\r\n * Which node properties to filter on.\r\n */\r\n matchKeys: {\r\n type: Array,\r\n default: constant([ 'label' ]),\r\n },\r\n\r\n /**\r\n * Sets `maxHeight` style value of the menu.\r\n */\r\n maxHeight: {\r\n type: Number,\r\n default: 300,\r\n },\r\n\r\n /**\r\n * Set `true` to allow selecting multiple options (a.k.a., multi-select mode).\r\n */\r\n multiple: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Generates a hidden tag with this field name for html forms.\r\n */\r\n name: {\r\n type: String,\r\n },\r\n\r\n /**\r\n * Text displayed when a branch node has no children.\r\n */\r\n noChildrenText: {\r\n type: String,\r\n default: 'No sub-options.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no available options.\r\n */\r\n noOptionsText: {\r\n type: String,\r\n default: 'No options available.',\r\n },\r\n\r\n /**\r\n * Text displayed when there are no matching search results.\r\n */\r\n noResultsText: {\r\n type: String,\r\n default: 'No results found...',\r\n },\r\n\r\n /**\r\n * Used for normalizing source data.\r\n * @type {function(node, instanceId): node}\r\n */\r\n normalizer: {\r\n type: Function,\r\n default: identity,\r\n },\r\n\r\n /**\r\n * By default (`auto`), the menu will open below the control. If there is not\r\n * enough space, vue-treeselect will automatically flip the menu.\r\n * You can use one of other four options to force the menu to be always opened\r\n * to specified direction.\r\n * Acceptable values:\r\n * - `\"auto\"`\r\n * - `\"below\"`\r\n * - `\"bottom\"`\r\n * - `\"above\"`\r\n * - `\"top\"`\r\n */\r\n openDirection: {\r\n type: String,\r\n default: 'auto',\r\n validator(value) {\r\n const acceptableValues = [ 'auto', 'top', 'bottom', 'above', 'below' ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is clicked.\r\n */\r\n openOnClick: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Whether to automatically open the menu when the control is focused.\r\n */\r\n openOnFocus: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Array of available options.\r\n * @type {node[]}\r\n */\r\n options: {\r\n type: Array,\r\n },\r\n\r\n /**\r\n * Field placeholder, displayed when there's no value.\r\n */\r\n placeholder: {\r\n type: String,\r\n default: 'Select...',\r\n },\r\n\r\n /**\r\n * Applies HTML5 required attribute when needed.\r\n */\r\n required: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text displayed asking user whether to retry loading children options.\r\n */\r\n retryText: {\r\n type: String,\r\n default: 'Retry?',\r\n },\r\n\r\n /**\r\n * Title for the retry button.\r\n */\r\n retryTitle: {\r\n type: String,\r\n default: 'Click to retry',\r\n },\r\n\r\n /**\r\n * Enable searching feature?\r\n */\r\n searchable: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n\r\n /**\r\n * Search in ancestor nodes too.\r\n */\r\n searchNested: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Text tip to prompt for async search.\r\n */\r\n searchPromptText: {\r\n type: String,\r\n default: 'Type to search...',\r\n },\r\n\r\n /**\r\n * Whether to show a children count next to the label of each branch node.\r\n */\r\n showCount: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n\r\n /**\r\n * Used in conjunction with `showCount` to specify which type of count number should be displayed.\r\n * Acceptable values:\r\n * - \"ALL_CHILDREN\"\r\n * - \"ALL_DESCENDANTS\"\r\n * - \"LEAF_CHILDREN\"\r\n * - \"LEAF_DESCENDANTS\"\r\n */\r\n showCountOf: {\r\n type: String,\r\n default: ALL_CHILDREN,\r\n validator(value) {\r\n const acceptableValues = [ ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Whether to show children count when searching.\r\n * Fallbacks to the value of `showCount` when not specified.\r\n * @type {boolean}\r\n */\r\n showCountOnSearch: null,\r\n\r\n /**\r\n * In which order the selected options should be displayed in trigger & sorted in `value` array.\r\n * Used for multi-select mode only.\r\n * Acceptable values:\r\n * - \"ORDER_SELECTED\"\r\n * - \"LEVEL\"\r\n * - \"INDEX\"\r\n */\r\n sortValueBy: {\r\n type: String,\r\n default: ORDER_SELECTED,\r\n validator(value) {\r\n const acceptableValues = [ ORDER_SELECTED, LEVEL, INDEX ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Tab index of the control.\r\n */\r\n tabIndex: {\r\n type: Number,\r\n default: 0,\r\n },\r\n\r\n /**\r\n * The value of the control.\r\n * Should be `id` or `node` object for single-select mode, or an array of `id` or `node` object for multi-select mode.\r\n * Its format depends on the `valueFormat` prop.\r\n * For most cases, just use `v-model` instead.\r\n * @type {?Array}\r\n */\r\n value: null,\r\n\r\n /**\r\n * Which kind of nodes should be included in the `value` array in multi-select mode.\r\n * Acceptable values:\r\n * - \"ALL\" - Any node that is checked will be included in the `value` array\r\n * - \"BRANCH_PRIORITY\" (default) - If a branch node is checked, all its descendants will be excluded in the `value` array\r\n * - \"LEAF_PRIORITY\" - If a branch node is checked, this node itself and its branch descendants will be excluded from the `value` array but its leaf descendants will be included\r\n * - \"ALL_WITH_INDETERMINATE\" - Any node that is checked will be included in the `value` array, plus indeterminate nodes\r\n */\r\n valueConsistsOf: {\r\n type: String,\r\n default: BRANCH_PRIORITY,\r\n validator(value) {\r\n const acceptableValues = [ ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE ]\r\n return includes(acceptableValues, value)\r\n },\r\n },\r\n\r\n /**\r\n * Format of `value` prop.\r\n * Note that, when set to `\"object\"`, only `id` & `label` properties are required in each `node` object in `value` prop.\r\n * Acceptable values:\r\n * - \"id\"\r\n * - \"object\"\r\n */\r\n valueFormat: {\r\n type: String,\r\n default: 'id',\r\n },\r\n\r\n /**\r\n * z-index of the menu.\r\n */\r\n zIndex: {\r\n type: [ Number, String ],\r\n default: 999,\r\n },\r\n\r\n /**\r\n * Sync search throttling delay.\r\n */\r\n inputDebounceDelay: {\r\n type: Number,\r\n default: INPUT_DEBOUNCE_DELAY,\r\n },\r\n\r\n /**\r\n * Replace accents for normal letter\r\n */\r\n replaceAccents: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n\r\n data() {\r\n return {\r\n trigger: {\r\n // Is the control focused?\r\n isFocused: false,\r\n // User entered search query - value of the input.\r\n searchQuery: '',\r\n },\r\n\r\n menu: {\r\n // Is the menu opened?\r\n isOpen: false,\r\n // Id of current highlighted option.\r\n current: null,\r\n // The scroll position before last menu closing.\r\n lastScrollPosition: 0,\r\n // Which direction to open the menu.\r\n placement: 'bottom',\r\n },\r\n\r\n forest: {\r\n // Normalized options.\r\n normalizedOptions: [],\r\n // map for quick look-up.\r\n nodeMap: createMap(),\r\n // map, used for multi-select mode.\r\n checkedStateMap: createMap(),\r\n // Id list of all selected options.\r\n selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\r\n // map for fast checking:\r\n // if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true\r\n selectedNodeMap: createMap(),\r\n },\r\n\r\n // States of root options.\r\n rootOptionsStates: createAsyncOptionsStates(),\r\n\r\n localSearch: {\r\n // Has user entered any query to search local options?\r\n active: false,\r\n // Has any options matched the search query?\r\n noResults: true,\r\n // map for counting matched children/descendants.\r\n countMap: createMap(),\r\n },\r\n\r\n // map.\r\n remoteSearch: createMap(),\r\n }\r\n },\r\n\r\n computed: {\r\n /* eslint-disable valid-jsdoc */\r\n /**\r\n * Normalized nodes that have been selected.\r\n * @type {node[]}\r\n */\r\n selectedNodes() {\r\n return this.forest.selectedNodeIds.map(this.getNode)\r\n },\r\n /**\r\n * Id list of selected nodes with `sortValueBy` prop applied.\r\n * @type {nodeId[]}\r\n */\r\n internalValue() {\r\n let internalValue\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isRootNode) return true\r\n return !this.isSelected(node.parentNode)\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n internalValue = this.forest.selectedNodeIds.filter(id => {\r\n const node = this.getNode(id)\r\n if (node.isLeaf) return true\r\n return node.children.length === 0\r\n })\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const indeterminateNodeIds = []\r\n internalValue = this.forest.selectedNodeIds.slice()\r\n this.selectedNodes.forEach(selectedNode => {\r\n selectedNode.ancestors.forEach(ancestor => {\r\n if (includes(indeterminateNodeIds, ancestor.id)) return\r\n if (includes(internalValue, ancestor.id)) return\r\n indeterminateNodeIds.push(ancestor.id)\r\n })\r\n })\r\n internalValue.push(...indeterminateNodeIds)\r\n }\r\n\r\n if (this.sortValueBy === LEVEL) {\r\n internalValue.sort((a, b) => sortValueByLevel(this.getNode(a), this.getNode(b)))\r\n } else if (this.sortValueBy === INDEX) {\r\n internalValue.sort((a, b) => sortValueByIndex(this.getNode(a), this.getNode(b)))\r\n }\r\n\r\n return internalValue\r\n },\r\n /**\r\n * Has any option been selected?\r\n * @type {boolean}\r\n */\r\n hasValue() {\r\n return this.internalValue.length > 0\r\n },\r\n /**\r\n * Single-select mode?\r\n * @type {boolean}\r\n */\r\n single() {\r\n return !this.multiple\r\n },\r\n /**\r\n * Id list of nodes displayed in the menu. Nodes that are considered NOT visible:\r\n * - descendants of a collapsed branch node\r\n * - in local search mode, nodes that are not matched, unless\r\n * - it's a branch node and has matched descendants\r\n * - it's a leaf node and its parent node is explicitly set to show all children\r\n * @type {id[]}\r\n */\r\n visibleOptionIds() {\r\n const visibleOptionIds = []\r\n\r\n this.traverseAllNodesByIndex(node => {\r\n if (!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(node)) {\r\n visibleOptionIds.push(node.id)\r\n }\r\n // Skip the traversal of descendants of a branch node if it's not expanded.\r\n if (node.isBranch && !this.shouldExpand(node)) {\r\n return false\r\n }\r\n })\r\n\r\n return visibleOptionIds\r\n },\r\n /**\r\n * Has any option should be displayed in the menu?\r\n * @type {boolean}\r\n */\r\n hasVisibleOptions() {\r\n return this.visibleOptionIds.length !== 0\r\n },\r\n /**\r\n * Should show children count when searching?\r\n * @type {boolean}\r\n */\r\n showCountOnSearchComputed() {\r\n // Vue doesn't allow setting default prop value based on another prop value.\r\n // So use computed property as a workaround.\r\n // https://github.com/vuejs/vue/issues/6358\r\n return typeof this.showCountOnSearch === 'boolean'\r\n ? this.showCountOnSearch\r\n : this.showCount\r\n },\r\n /**\r\n * Is there any branch node?\r\n * @type {boolean}\r\n */\r\n hasBranchNodes() {\r\n return this.forest.normalizedOptions.some(rootNode => rootNode.isBranch)\r\n },\r\n shouldFlattenOptions() {\r\n return this.localSearch.active && this.flattenSearchResults\r\n },\r\n /* eslint-enable valid-jsdoc */\r\n },\r\n\r\n watch: {\r\n alwaysOpen(newValue) {\r\n if (newValue) this.openMenu()\r\n else this.closeMenu()\r\n },\r\n\r\n branchNodesFirst() {\r\n this.initialize()\r\n },\r\n\r\n disabled(newValue) {\r\n // force close the menu after disabling the control\r\n if (newValue && this.menu.isOpen) this.closeMenu()\r\n else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu()\r\n },\r\n\r\n flat() {\r\n this.initialize()\r\n },\r\n\r\n internalValue(newValue, oldValue) {\r\n const hasChanged = quickDiff(newValue, oldValue)\r\n // #122\r\n // Vue would trigger this watcher when `newValue` and `oldValue` are shallow-equal.\r\n // We emit the `input` event only when the value actually changes.\r\n if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n matchKeys() {\r\n this.initialize()\r\n },\r\n\r\n multiple(newValue) {\r\n // We need to rebuild the state when switching from single-select mode\r\n // to multi-select mode.\r\n // istanbul ignore else\r\n if (newValue) this.buildForestState()\r\n },\r\n\r\n options: {\r\n handler() {\r\n if (this.async) return\r\n // Re-initialize options when the `options` prop has changed.\r\n this.initialize()\r\n this.rootOptionsStates.isLoaded = Array.isArray(this.options)\r\n },\r\n deep: true,\r\n immediate: true,\r\n },\r\n\r\n 'trigger.searchQuery'() {\r\n if (this.async) {\r\n this.handleRemoteSearch()\r\n } else {\r\n this.handleLocalSearch()\r\n }\r\n\r\n this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId())\r\n },\r\n\r\n value() {\r\n const nodeIdsFromValue = this.extractCheckedNodeIdsFromValue()\r\n const hasChanged = quickDiff(nodeIdsFromValue, this.internalValue)\r\n if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue)\r\n },\r\n },\r\n\r\n methods: {\r\n verifyProps() {\r\n warning(\r\n () => this.async ? this.searchable : true,\r\n () => 'For async search mode, the value of \"searchable\" prop must be true.',\r\n )\r\n\r\n if (this.options == null && !this.loadOptions) {\r\n warning(\r\n () => false,\r\n () => 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.',\r\n )\r\n }\r\n\r\n if (this.flat) {\r\n warning(\r\n () => this.multiple,\r\n () => 'You are using flat mode. But you forgot to add \"multiple=true\"?',\r\n )\r\n }\r\n\r\n if (!this.flat) {\r\n const propNames = [\r\n 'autoSelectAncestors',\r\n 'autoSelectDescendants',\r\n 'autoDeselectAncestors',\r\n 'autoDeselectDescendants',\r\n ]\r\n\r\n propNames.forEach(propName => {\r\n warning(\r\n () => !this[propName],\r\n () => `\"${propName}\" only applies to flat mode.`,\r\n )\r\n })\r\n }\r\n },\r\n\r\n resetFlags() {\r\n this._blurOnSelect = false\r\n },\r\n\r\n initialize() {\r\n const options = this.async\r\n ? this.getRemoteSearchEntry().options\r\n : this.options\r\n\r\n if (Array.isArray(options)) {\r\n // In case we are re-initializing options, keep the old state tree temporarily.\r\n const prevNodeMap = this.forest.nodeMap\r\n this.forest.nodeMap = createMap()\r\n this.keepDataOfSelectedNodes(prevNodeMap)\r\n this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap)\r\n // Cases that need fixing `selectedNodeIds`:\r\n // 1) Children options of a checked node have been delayed loaded,\r\n // we should also mark these children as checked. (multi-select mode)\r\n // 2) Root options have been delayed loaded, we need to initialize states\r\n // of these nodes. (multi-select mode)\r\n // 3) Async search mode.\r\n this.fixSelectedNodeIds(this.internalValue)\r\n } else {\r\n this.forest.normalizedOptions = []\r\n }\r\n },\r\n\r\n getInstanceId() {\r\n return this.instanceId == null ? this.id : this.instanceId\r\n },\r\n\r\n getValue() {\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.internalValue.slice()\r\n : this.internalValue[0]\r\n }\r\n\r\n const rawNodes = this.internalValue.map(id => this.getNode(id).raw)\r\n return this.multiple ? rawNodes : rawNodes[0]\r\n },\r\n\r\n getNode(nodeId) {\r\n warning(\r\n () => nodeId != null,\r\n () => `Invalid node id: ${nodeId}`,\r\n )\r\n\r\n if (nodeId == null) return null\r\n\r\n return nodeId in this.forest.nodeMap\r\n ? this.forest.nodeMap[nodeId]\r\n : this.createFallbackNode(nodeId)\r\n },\r\n\r\n createFallbackNode(id) {\r\n // In case there is a default selected node that is not loaded into the tree yet,\r\n // we create a fallback node to keep the component working.\r\n // When the real data is loaded, we'll override this fake node.\r\n\r\n const raw = this.extractNodeFromValue(id)\r\n const label = this.enhancedNormalizer(raw).label || `${id} (unknown)`\r\n const fallbackNode = {\r\n id,\r\n label,\r\n ancestors: [],\r\n parentNode: NO_PARENT_NODE,\r\n isFallbackNode: true,\r\n isRootNode: true,\r\n isLeaf: true,\r\n isBranch: false,\r\n isDisabled: false,\r\n isNew: false,\r\n index: [ -1 ],\r\n level: 0,\r\n raw,\r\n }\r\n\r\n return this.$set(this.forest.nodeMap, id, fallbackNode)\r\n },\r\n\r\n extractCheckedNodeIdsFromValue() {\r\n if (this.value == null) return []\r\n\r\n if (this.valueFormat === 'id') {\r\n return this.multiple\r\n ? this.value.slice()\r\n : [ this.value ]\r\n }\r\n\r\n return (this.multiple ? this.value : [ this.value ])\r\n .map(node => this.enhancedNormalizer(node))\r\n .map(node => node.id)\r\n },\r\n\r\n extractNodeFromValue(id) {\r\n const defaultNode = { id }\r\n\r\n if (this.valueFormat === 'id') {\r\n return defaultNode\r\n }\r\n\r\n const valueArray = this.multiple\r\n ? Array.isArray(this.value) ? this.value : []\r\n : this.value ? [ this.value ] : []\r\n const matched = find(\r\n valueArray,\r\n node => node && this.enhancedNormalizer(node).id === id,\r\n )\r\n\r\n return matched || defaultNode\r\n },\r\n\r\n fixSelectedNodeIds(nodeIdListOfPrevValue) {\r\n let nextSelectedNodeIds = []\r\n\r\n // istanbul ignore else\r\n if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\r\n nextSelectedNodeIds = nodeIdListOfPrevValue\r\n } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\r\n nodeIdListOfPrevValue.forEach(nodeId => {\r\n nextSelectedNodeIds.push(nodeId)\r\n const node = this.getNode(nodeId)\r\n if (node.isBranch) this.traverseDescendantsBFS(node, descendant => {\r\n nextSelectedNodeIds.push(descendant.id)\r\n })\r\n })\r\n } else if (this.valueConsistsOf === LEAF_PRIORITY) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.slice()\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\r\n const map = createMap()\r\n const queue = nodeIdListOfPrevValue.filter(nodeId => {\r\n const node = this.getNode(nodeId)\r\n return node.isLeaf || node.children.length === 0\r\n })\r\n while (queue.length) {\r\n const nodeId = queue.shift()\r\n const node = this.getNode(nodeId)\r\n nextSelectedNodeIds.push(nodeId)\r\n if (node.isRootNode) continue\r\n if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length\r\n if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id)\r\n }\r\n }\r\n\r\n const hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds)\r\n // If `nextSelectedNodeIds` doesn't actually differ from old `selectedNodeIds`,\r\n // we don't make the assignment to avoid triggering its watchers which may cause\r\n // unnecessary calculations.\r\n if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds\r\n\r\n this.buildForestState()\r\n },\r\n\r\n keepDataOfSelectedNodes(prevNodeMap) {\r\n // In case there is any selected node that is not present in the new `options` array.\r\n // It could be useful for async search mode.\r\n this.forest.selectedNodeIds.forEach(id => {\r\n if (!prevNodeMap[id]) return\r\n const node = {\r\n ...prevNodeMap[id],\r\n isFallbackNode: true,\r\n }\r\n this.$set(this.forest.nodeMap, id, node)\r\n })\r\n },\r\n\r\n isSelected(node) {\r\n // whether a node is selected (single-select mode) or fully-checked (multi-select mode)\r\n return this.forest.selectedNodeMap[node.id] === true\r\n },\r\n\r\n traverseDescendantsBFS(parentNode, callback) {\r\n // istanbul ignore if\r\n if (!parentNode.isBranch) return\r\n const queue = parentNode.children.slice()\r\n while (queue.length) {\r\n const currNode = queue[0]\r\n if (currNode.isBranch) queue.push(...currNode.children)\r\n callback(currNode)\r\n queue.shift()\r\n }\r\n },\r\n\r\n traverseDescendantsDFS(parentNode, callback) {\r\n if (!parentNode.isBranch) return\r\n parentNode.children.forEach(child => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(child, callback)\r\n callback(child)\r\n })\r\n },\r\n\r\n traverseAllNodesDFS(callback) {\r\n this.forest.normalizedOptions.forEach(rootNode => {\r\n // deep-level node first\r\n this.traverseDescendantsDFS(rootNode, callback)\r\n callback(rootNode)\r\n })\r\n },\r\n\r\n traverseAllNodesByIndex(callback) {\r\n const walk = parentNode => {\r\n parentNode.children.forEach(child => {\r\n if (callback(child) !== false && child.isBranch) {\r\n walk(child)\r\n }\r\n })\r\n }\r\n\r\n // To simplify the code logic of traversal,\r\n // we create a fake root node that holds all the root options.\r\n walk({ children: this.forest.normalizedOptions })\r\n },\r\n\r\n toggleClickOutsideEvent(enabled) {\r\n if (enabled) {\r\n document.addEventListener('mousedown', this.handleClickOutside, false)\r\n } else {\r\n document.removeEventListener('mousedown', this.handleClickOutside, false)\r\n }\r\n },\r\n\r\n getValueContainer() {\r\n return this.$refs.control.$refs['value-container']\r\n },\r\n\r\n getInput() {\r\n return this.getValueContainer().$refs.input\r\n },\r\n\r\n focusInput() {\r\n this.getInput().focus()\r\n },\r\n\r\n blurInput() {\r\n this.getInput().blur()\r\n },\r\n\r\n handleMouseDown: onLeftClick(function handleMouseDown(evt) {\r\n evt.preventDefault()\r\n evt.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n const isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target)\r\n if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\r\n this.openMenu()\r\n }\r\n\r\n if (this._blurOnSelect) {\r\n this.blurInput()\r\n } else {\r\n // Focus the input or prevent blurring.\r\n this.focusInput()\r\n }\r\n\r\n this.resetFlags()\r\n }),\r\n\r\n handleClickOutside(evt) {\r\n // istanbul ignore else\r\n if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\r\n this.blurInput()\r\n this.closeMenu()\r\n }\r\n },\r\n\r\n handleLocalSearch() {\r\n const { searchQuery } = this.trigger\r\n const done = () => this.resetHighlightedOptionWhenNecessary(true)\r\n\r\n if (!searchQuery) {\r\n // Exit sync search mode.\r\n this.localSearch.active = false\r\n return done()\r\n }\r\n\r\n // Enter sync search mode.\r\n this.localSearch.active = true\r\n\r\n // Reset states.\r\n this.localSearch.noResults = true\r\n this.traverseAllNodesDFS(node => {\r\n if (node.isBranch) {\r\n node.isExpandedOnSearch = false\r\n node.showAllChildrenOnSearch = false\r\n node.isMatched = false\r\n node.hasMatchedDescendants = false\r\n this.$set(this.localSearch.countMap, node.id, {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n }\r\n })\r\n\r\n const lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase()\r\n const splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ')\r\n this.traverseAllNodesDFS(node => {\r\n if (this.searchNested && splitSearchQuery.length > 1) {\r\n node.isMatched = splitSearchQuery.every(filterValue =>\r\n match(false, false, filterValue, node.nestedSearchLabel),\r\n )\r\n } else {\r\n node.isMatched = this.matchKeys.some(matchKey =>\r\n match(!this.disableFuzzyMatching, this.replaceAccents, lowerCasedSearchQuery, node.lowerCased[matchKey]),\r\n )\r\n }\r\n\r\n if (node.isMatched) {\r\n this.localSearch.noResults = false\r\n node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++)\r\n if (node.isLeaf) node.ancestors.forEach(ancestor => this.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++)\r\n if (node.parentNode !== NO_PARENT_NODE) {\r\n this.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1\r\n // istanbul ignore else\r\n if (node.isLeaf) this.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1\r\n }\r\n }\r\n\r\n if (\r\n (node.isMatched || (node.isBranch && node.isExpandedOnSearch)) &&\r\n node.parentNode !== NO_PARENT_NODE\r\n ) {\r\n node.parentNode.isExpandedOnSearch = true\r\n node.parentNode.hasMatchedDescendants = true\r\n }\r\n })\r\n\r\n done()\r\n },\r\n\r\n handleRemoteSearch() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.getRemoteSearchEntry()\r\n const done = () => {\r\n this.initialize()\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n }\r\n\r\n if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\r\n return done()\r\n }\r\n\r\n this.callLoadOptionsProp({\r\n action: ASYNC_SEARCH,\r\n args: { searchQuery },\r\n isPending() {\r\n return entry.isLoading\r\n },\r\n start: () => {\r\n entry.isLoading = true\r\n entry.isLoaded = false\r\n entry.loadingError = ''\r\n },\r\n succeed: options => {\r\n entry.isLoaded = true\r\n entry.options = options\r\n // When the request completes, the search query may have changed.\r\n // We only show these options if they are for the current search query.\r\n if (this.trigger.searchQuery === searchQuery) done()\r\n },\r\n fail: err => {\r\n entry.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n entry.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n getRemoteSearchEntry() {\r\n const { searchQuery } = this.trigger\r\n const entry = this.remoteSearch[searchQuery] || {\r\n ...createAsyncOptionsStates(),\r\n options: [],\r\n }\r\n\r\n // Vue doesn't support directly watching on objects.\r\n this.$watch(\r\n () => entry.options,\r\n () => {\r\n // TODO: potential redundant re-initialization.\r\n if (this.trigger.searchQuery === searchQuery) this.initialize()\r\n },\r\n { deep: true },\r\n )\r\n\r\n if (searchQuery === '') {\r\n if (Array.isArray(this.defaultOptions)) {\r\n entry.options = this.defaultOptions\r\n entry.isLoaded = true\r\n return entry\r\n } else if (this.defaultOptions !== true) {\r\n entry.isLoaded = true\r\n return entry\r\n }\r\n }\r\n\r\n if (!this.remoteSearch[searchQuery]) {\r\n this.$set(this.remoteSearch, searchQuery, entry)\r\n }\r\n\r\n return entry\r\n },\r\n\r\n shouldExpand(node) {\r\n return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded\r\n },\r\n\r\n shouldOptionBeIncludedInSearchResult(node) {\r\n // 1) This option is matched.\r\n if (node.isMatched) return true\r\n // 2) This option is not matched, but has matched descendant(s).\r\n if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true\r\n // 3) This option's parent has no matched descendants,\r\n // but after being expanded, all its children should be shown.\r\n if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true\r\n // 4) The default case.\r\n return false\r\n },\r\n\r\n shouldShowOptionInMenu(node) {\r\n if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\r\n return false\r\n }\r\n return true\r\n },\r\n\r\n getControl() {\r\n return this.$refs.control.$el\r\n },\r\n\r\n getMenu() {\r\n const ref = this.appendToBody ? this.$refs.portal.portalTarget : this\r\n const $menu = ref.$refs.menu.$refs.menu\r\n return $menu && $menu.nodeName !== '#comment' ? $menu : null\r\n },\r\n\r\n setCurrentHighlightedOption(node, scroll = true) {\r\n const prev = this.menu.current\r\n if (prev != null && prev in this.forest.nodeMap) {\r\n this.forest.nodeMap[prev].isHighlighted = false\r\n }\r\n\r\n this.menu.current = node.id\r\n node.isHighlighted = true\r\n\r\n if (this.menu.isOpen && scroll) {\r\n const scrollToOption = () => {\r\n const $menu = this.getMenu()\r\n const $option = $menu.querySelector(`.vue-treeselect__option[data-id=\"${node.id}\"]`)\r\n if ($option) scrollIntoView($menu, $option)\r\n }\r\n\r\n // In case `openMenu()` is just called and the menu is not rendered yet.\r\n if (this.getMenu()) {\r\n scrollToOption()\r\n } else {\r\n // istanbul ignore next\r\n this.$nextTick(scrollToOption)\r\n }\r\n }\r\n },\r\n\r\n resetHighlightedOptionWhenNecessary(forceReset = false) {\r\n const { current } = this.menu\r\n\r\n if (\r\n forceReset || current == null ||\r\n !(current in this.forest.nodeMap) ||\r\n !this.shouldShowOptionInMenu(this.getNode(current))\r\n ) {\r\n this.highlightFirstOption()\r\n }\r\n },\r\n\r\n highlightFirstOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const first = this.visibleOptionIds[0]\r\n this.setCurrentHighlightedOption(this.getNode(first))\r\n },\r\n\r\n highlightPrevOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const prev = this.visibleOptionIds.indexOf(this.menu.current) - 1\r\n if (prev === -1) return this.highlightLastOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]))\r\n },\r\n\r\n highlightNextOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const next = this.visibleOptionIds.indexOf(this.menu.current) + 1\r\n if (next === this.visibleOptionIds.length) return this.highlightFirstOption()\r\n this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]))\r\n },\r\n\r\n highlightLastOption() {\r\n if (!this.hasVisibleOptions) return\r\n\r\n const last = getLast(this.visibleOptionIds)\r\n this.setCurrentHighlightedOption(this.getNode(last))\r\n },\r\n\r\n resetSearchQuery() {\r\n this.trigger.searchQuery = ''\r\n },\r\n\r\n closeMenu() {\r\n if (!this.menu.isOpen || (!this.disabled && this.alwaysOpen)) return\r\n this.saveMenuScrollPosition()\r\n this.menu.isOpen = false\r\n this.toggleClickOutsideEvent(false)\r\n this.resetSearchQuery()\r\n this.$emit('close', this.getValue(), this.getInstanceId())\r\n },\r\n\r\n openMenu() {\r\n if (this.disabled || this.menu.isOpen) return\r\n this.menu.isOpen = true\r\n this.$nextTick(this.resetHighlightedOptionWhenNecessary)\r\n this.$nextTick(this.restoreMenuScrollPosition)\r\n if (!this.options && !this.async) this.loadRootOptions()\r\n this.toggleClickOutsideEvent(true)\r\n this.$emit('open', this.getInstanceId())\r\n },\r\n\r\n toggleMenu() {\r\n if (this.menu.isOpen) {\r\n this.closeMenu()\r\n } else {\r\n this.openMenu()\r\n }\r\n },\r\n\r\n toggleExpanded(node) {\r\n let nextState\r\n\r\n if (this.localSearch.active) {\r\n nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch\r\n if (nextState) node.showAllChildrenOnSearch = true\r\n } else {\r\n nextState = node.isExpanded = !node.isExpanded\r\n }\r\n\r\n if (nextState && !node.childrenStates.isLoaded) {\r\n this.loadChildrenOptions(node)\r\n }\r\n },\r\n\r\n buildForestState() {\r\n const selectedNodeMap = createMap()\r\n this.forest.selectedNodeIds.forEach(selectedNodeId => {\r\n selectedNodeMap[selectedNodeId] = true\r\n })\r\n this.forest.selectedNodeMap = selectedNodeMap\r\n\r\n const checkedStateMap = createMap()\r\n if (this.multiple) {\r\n this.traverseAllNodesByIndex(node => {\r\n checkedStateMap[node.id] = UNCHECKED\r\n })\r\n\r\n this.selectedNodes.forEach(selectedNode => {\r\n checkedStateMap[selectedNode.id] = CHECKED\r\n\r\n if (!this.flat && !this.disableBranchNodes) {\r\n selectedNode.ancestors.forEach(ancestorNode => {\r\n if (!this.isSelected(ancestorNode)) {\r\n checkedStateMap[ancestorNode.id] = INDETERMINATE\r\n }\r\n })\r\n }\r\n })\r\n }\r\n this.forest.checkedStateMap = checkedStateMap\r\n },\r\n\r\n enhancedNormalizer(raw) {\r\n return {\r\n ...raw,\r\n ...this.normalizer(raw, this.getInstanceId()),\r\n }\r\n },\r\n\r\n normalize(parentNode, nodes, prevNodeMap) {\r\n let normalizedOptions = nodes\r\n .map(node => [ this.enhancedNormalizer(node), node ])\r\n .map(([ node, raw ], index) => {\r\n this.checkDuplication(node)\r\n this.verifyNodeShape(node)\r\n\r\n const { id, label, children, isDefaultExpanded } = node\r\n const isRootNode = parentNode === NO_PARENT_NODE\r\n const level = isRootNode ? 0 : parentNode.level + 1\r\n const isBranch = Array.isArray(children) || children === null\r\n const isLeaf = !isBranch\r\n const isDisabled = !!node.isDisabled || (!this.flat && !isRootNode && parentNode.isDisabled)\r\n const isNew = !!node.isNew\r\n const lowerCased = this.matchKeys.reduce((prev, key) => ({\r\n ...prev,\r\n [key]: stringifyOptionPropValue(node[key]).toLocaleLowerCase(),\r\n }), {})\r\n const nestedSearchLabel = isRootNode\r\n ? lowerCased.label\r\n : parentNode.nestedSearchLabel + ' ' + lowerCased.label\r\n\r\n const normalized = this.$set(this.forest.nodeMap, id, createMap())\r\n this.$set(normalized, 'id', id)\r\n this.$set(normalized, 'label', label)\r\n this.$set(normalized, 'level', level)\r\n this.$set(normalized, 'ancestors', isRootNode ? [] : [ parentNode ].concat(parentNode.ancestors))\r\n this.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index))\r\n this.$set(normalized, 'parentNode', parentNode)\r\n this.$set(normalized, 'lowerCased', lowerCased)\r\n this.$set(normalized, 'nestedSearchLabel', nestedSearchLabel)\r\n this.$set(normalized, 'isDisabled', isDisabled)\r\n this.$set(normalized, 'isNew', isNew)\r\n this.$set(normalized, 'isMatched', false)\r\n this.$set(normalized, 'isHighlighted', false)\r\n this.$set(normalized, 'isBranch', isBranch)\r\n this.$set(normalized, 'isLeaf', isLeaf)\r\n this.$set(normalized, 'isRootNode', isRootNode)\r\n this.$set(normalized, 'raw', raw)\r\n\r\n if (isBranch) {\r\n const isLoaded = Array.isArray(children)\r\n\r\n this.$set(normalized, 'childrenStates', {\r\n ...createAsyncOptionsStates(),\r\n isLoaded,\r\n })\r\n this.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean'\r\n ? isDefaultExpanded\r\n : level < this.defaultExpandLevel)\r\n this.$set(normalized, 'hasMatchedDescendants', false)\r\n this.$set(normalized, 'hasDisabledDescendants', false)\r\n this.$set(normalized, 'isExpandedOnSearch', false)\r\n this.$set(normalized, 'showAllChildrenOnSearch', false)\r\n this.$set(normalized, 'count', {\r\n [ALL_CHILDREN]: 0,\r\n [ALL_DESCENDANTS]: 0,\r\n [LEAF_CHILDREN]: 0,\r\n [LEAF_DESCENDANTS]: 0,\r\n })\r\n this.$set(normalized, 'children', isLoaded\r\n ? this.normalize(normalized, children, prevNodeMap)\r\n : [])\r\n\r\n if (isDefaultExpanded === true) normalized.ancestors.forEach(ancestor => {\r\n ancestor.isExpanded = true\r\n })\r\n\r\n if (!isLoaded && typeof this.loadOptions !== 'function') {\r\n warning(\r\n () => false,\r\n () => 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.',\r\n )\r\n } else if (!isLoaded && normalized.isExpanded) {\r\n this.loadChildrenOptions(normalized)\r\n }\r\n }\r\n\r\n normalized.ancestors.forEach(ancestor => ancestor.count[ALL_DESCENDANTS]++)\r\n if (isLeaf) normalized.ancestors.forEach(ancestor => ancestor.count[LEAF_DESCENDANTS]++)\r\n if (!isRootNode) {\r\n parentNode.count[ALL_CHILDREN] += 1\r\n if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1\r\n if (isDisabled) parentNode.hasDisabledDescendants = true\r\n }\r\n\r\n // Preserve previous states.\r\n if (prevNodeMap && prevNodeMap[id]) {\r\n const prev = prevNodeMap[id]\r\n\r\n normalized.isMatched = prev.isMatched\r\n normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch\r\n normalized.isHighlighted = prev.isHighlighted\r\n\r\n if (prev.isBranch && normalized.isBranch) {\r\n normalized.isExpanded = prev.isExpanded\r\n normalized.isExpandedOnSearch = prev.isExpandedOnSearch\r\n // #97\r\n // If `isLoaded` was true, but IS NOT now, we consider this branch node\r\n // to be reset to unloaded state by the user of this component.\r\n if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\r\n // Make sure the node is collapsed, then the user can load its\r\n // children again (by expanding).\r\n normalized.isExpanded = false\r\n // We have reset `childrenStates` and don't want to preserve states here.\r\n } else {\r\n normalized.childrenStates = { ...prev.childrenStates }\r\n }\r\n }\r\n }\r\n\r\n return normalized\r\n })\r\n\r\n if (this.branchNodesFirst) {\r\n const branchNodes = normalizedOptions.filter(option => option.isBranch)\r\n const leafNodes = normalizedOptions.filter(option => option.isLeaf)\r\n normalizedOptions = branchNodes.concat(leafNodes)\r\n }\r\n\r\n return normalizedOptions\r\n },\r\n\r\n loadRootOptions() {\r\n this.callLoadOptionsProp({\r\n action: LOAD_ROOT_OPTIONS,\r\n isPending: () => {\r\n return this.rootOptionsStates.isLoading\r\n },\r\n start: () => {\r\n this.rootOptionsStates.isLoading = true\r\n this.rootOptionsStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.rootOptionsStates.isLoaded = true\r\n // Wait for `options` being re-initialized.\r\n this.$nextTick(() => {\r\n this.resetHighlightedOptionWhenNecessary(true)\r\n })\r\n },\r\n fail: err => {\r\n this.rootOptionsStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.rootOptionsStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n loadChildrenOptions(parentNode) {\r\n // The options may be re-initialized anytime during the loading process.\r\n // So `parentNode` can be stale and we use `getNode()` to avoid that.\r\n\r\n const { id, raw } = parentNode\r\n\r\n this.callLoadOptionsProp({\r\n action: LOAD_CHILDREN_OPTIONS,\r\n args: {\r\n // We always pass the raw node instead of the normalized node to any\r\n // callback provided by the user of this component.\r\n // Because the shape of the raw node is more likely to be closing to\r\n // what the back-end API service of the application needs.\r\n parentNode: raw,\r\n },\r\n isPending: () => {\r\n return this.getNode(id).childrenStates.isLoading\r\n },\r\n start: () => {\r\n this.getNode(id).childrenStates.isLoading = true\r\n this.getNode(id).childrenStates.loadingError = ''\r\n },\r\n succeed: () => {\r\n this.getNode(id).childrenStates.isLoaded = true\r\n },\r\n fail: err => {\r\n this.getNode(id).childrenStates.loadingError = getErrorMessage(err)\r\n },\r\n end: () => {\r\n this.getNode(id).childrenStates.isLoading = false\r\n },\r\n })\r\n },\r\n\r\n callLoadOptionsProp({ action, args, isPending, start, succeed, fail, end }) {\r\n if (!this.loadOptions || isPending()) {\r\n return\r\n }\r\n\r\n start()\r\n\r\n const callback = once((err, result) => {\r\n if (err) {\r\n fail(err)\r\n } else {\r\n succeed(result)\r\n }\r\n\r\n end()\r\n })\r\n const result = this.loadOptions({\r\n id: this.getInstanceId(),\r\n instanceId: this.getInstanceId(),\r\n action,\r\n ...args,\r\n callback,\r\n })\r\n\r\n if (isPromise(result)) {\r\n result.then(() => {\r\n callback()\r\n }, err => {\r\n callback(err)\r\n }).catch(err => {\r\n // istanbul ignore next\r\n console.error(err)\r\n })\r\n }\r\n },\r\n\r\n checkDuplication(node) {\r\n warning(\r\n () => !((node.id in this.forest.nodeMap) && !this.forest.nodeMap[node.id].isFallbackNode),\r\n () => `Detected duplicate presence of node id ${JSON.stringify(node.id)}. ` +\r\n `Their labels are \"${this.forest.nodeMap[node.id].label}\" and \"${node.label}\" respectively.`,\r\n )\r\n },\r\n\r\n verifyNodeShape(node) {\r\n warning(\r\n () => !(node.children === undefined && node.isBranch === true),\r\n () => 'Are you meant to declare an unloaded branch node? ' +\r\n '`isBranch: true` is no longer supported, please use `children: null` instead.',\r\n )\r\n },\r\n\r\n select(node) {\r\n if (this.disabled || node.isDisabled) {\r\n return\r\n }\r\n\r\n if (this.single) {\r\n this.clear()\r\n }\r\n\r\n const nextState = this.multiple && !this.flat\r\n ? this.forest.checkedStateMap[node.id] === UNCHECKED\r\n : !this.isSelected(node)\r\n\r\n if (nextState) {\r\n this._selectNode(node)\r\n } else {\r\n this._deselectNode(node)\r\n }\r\n\r\n this.buildForestState()\r\n\r\n if (nextState) {\r\n this.$emit('select', node.raw, this.getInstanceId())\r\n } else {\r\n this.$emit('deselect', node.raw, this.getInstanceId())\r\n }\r\n\r\n if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\r\n this.resetSearchQuery()\r\n }\r\n\r\n if (this.single && this.closeOnSelect) {\r\n this.closeMenu()\r\n\r\n // istanbul ignore else\r\n if (this.searchable) {\r\n this._blurOnSelect = true\r\n }\r\n }\r\n },\r\n\r\n clear() {\r\n if (this.hasValue) {\r\n if (this.single || this.allowClearingDisabled) {\r\n this.forest.selectedNodeIds = []\r\n } else /* if (this.multiple && !this.allowClearingDisabled) */ {\r\n this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(nodeId =>\r\n this.getNode(nodeId).isDisabled,\r\n )\r\n }\r\n\r\n this.buildForestState()\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _selectNode(node) {\r\n if (this.single || this.disableBranchNodes) {\r\n return this.addValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.addValue(node)\r\n\r\n if (this.autoSelectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (!this.isSelected(ancestor) && !ancestor.isDisabled) this.addValue(ancestor)\r\n })\r\n } else if (this.autoSelectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!this.isSelected(descendant) && !descendant.isDisabled) this.addValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n const isFullyChecked = (\r\n node.isLeaf ||\r\n (/* node.isBranch && */!node.hasDisabledDescendants) ||\r\n (/* node.isBranch && */this.allowSelectingDisabledDescendants)\r\n )\r\n if (isFullyChecked) {\r\n this.addValue(node)\r\n }\r\n\r\n if (node.isBranch) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.addValue(descendant)\r\n }\r\n })\r\n }\r\n\r\n if (isFullyChecked) {\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (curr.children.every(this.isSelected)) this.addValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n // This is meant to be called only by `select()`.\r\n _deselectNode(node) {\r\n if (this.disableBranchNodes) {\r\n return this.removeValue(node)\r\n }\r\n\r\n if (this.flat) {\r\n this.removeValue(node)\r\n\r\n if (this.autoDeselectAncestors) {\r\n node.ancestors.forEach(ancestor => {\r\n if (this.isSelected(ancestor) && !ancestor.isDisabled) this.removeValue(ancestor)\r\n })\r\n } else if (this.autoDeselectDescendants) {\r\n this.traverseDescendantsBFS(node, descendant => {\r\n if (this.isSelected(descendant) && !descendant.isDisabled) this.removeValue(descendant)\r\n })\r\n }\r\n\r\n return\r\n }\r\n\r\n let hasUncheckedSomeDescendants = false\r\n if (node.isBranch) {\r\n this.traverseDescendantsDFS(node, descendant => {\r\n if (!descendant.isDisabled || this.allowSelectingDisabledDescendants) {\r\n this.removeValue(descendant)\r\n hasUncheckedSomeDescendants = true\r\n }\r\n })\r\n }\r\n\r\n if (\r\n node.isLeaf ||\r\n /* node.isBranch && */hasUncheckedSomeDescendants ||\r\n /* node.isBranch && */node.children.length === 0\r\n ) {\r\n this.removeValue(node)\r\n\r\n let curr = node\r\n while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\r\n if (this.isSelected(curr)) this.removeValue(curr)\r\n else break\r\n }\r\n }\r\n },\r\n\r\n addValue(node) {\r\n this.forest.selectedNodeIds.push(node.id)\r\n this.forest.selectedNodeMap[node.id] = true\r\n },\r\n\r\n removeValue(node) {\r\n removeFromArray(this.forest.selectedNodeIds, node.id)\r\n delete this.forest.selectedNodeMap[node.id]\r\n },\r\n\r\n removeLastValue() {\r\n if (!this.hasValue) return\r\n if (this.single) return this.clear()\r\n const lastValue = getLast(this.internalValue)\r\n const lastSelectedNode = this.getNode(lastValue)\r\n this.select(lastSelectedNode) // deselect\r\n },\r\n\r\n saveMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) this.menu.lastScrollPosition = $menu.scrollTop\r\n },\r\n\r\n restoreMenuScrollPosition() {\r\n const $menu = this.getMenu()\r\n // istanbul ignore else\r\n if ($menu) $menu.scrollTop = this.menu.lastScrollPosition\r\n },\r\n },\r\n\r\n created() {\r\n this.verifyProps()\r\n this.resetFlags()\r\n },\r\n\r\n mounted() {\r\n if (this.autoFocus) this.focusInput()\r\n if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions()\r\n if (this.alwaysOpen) this.openMenu()\r\n if (this.async && this.defaultOptions) this.handleRemoteSearch()\r\n },\r\n\r\n destroyed() {\r\n // istanbul ignore next\r\n this.toggleClickOutsideEvent(false)\r\n },\r\n}\r\n","\r\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render, staticRenderFns\nimport script from \"./HiddenFields.vue?vue&type=script&lang=js&\"\nexport * from \"./HiddenFields.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4d48089a')) {\n api.createRecord('4d48089a', component.options)\n } else {\n api.reload('4d48089a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Input.vue?vue&type=script&lang=js&\"\nexport * from \"./Input.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('54844eca')) {\n api.createRecord('54844eca', component.options)\n } else {\n api.reload('54844eca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Input.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Placeholder.vue?vue&type=script&lang=js&\"\nexport * from \"./Placeholder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5a99d1f3')) {\n api.createRecord('5a99d1f3', component.options)\n } else {\n api.reload('5a99d1f3', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Placeholder.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./SingleValue.vue?vue&type=script&lang=js&\"\nexport * from \"./SingleValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('03d19b89')) {\n api.createRecord('03d19b89', component.options)\n } else {\n api.reload('03d19b89', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/SingleValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 348.333 348.333\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=364b6320&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('364b6320')) {\n api.createRecord('364b6320', component.options)\n } else {\n api.reload('364b6320', component.options)\n }\n module.hot.accept(\"./Delete.vue?vue&type=template&id=364b6320&\", function () {\n api.rerender('364b6320', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Delete.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValueItem.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('6dd6c8ca')) {\n api.createRecord('6dd6c8ca', component.options)\n } else {\n api.reload('6dd6c8ca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValueItem.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MultiValue.vue?vue&type=script&lang=js&\"\nexport * from \"./MultiValue.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('14fca5e8')) {\n api.createRecord('14fca5e8', component.options)\n } else {\n api.reload('14fca5e8', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MultiValue.vue\"\nexport default component.exports","\r\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"svg\",\n {\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 292.362 292.362\"\n }\n },\n [\n _c(\"path\", {\n attrs: {\n d:\n \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n }\n })\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n","import { render, staticRenderFns } from \"./Arrow.vue?vue&type=template&id=11186cd4&\"\nimport script from \"./Arrow.vue?vue&type=script&lang=js&\"\nexport * from \"./Arrow.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('11186cd4')) {\n api.createRecord('11186cd4', component.options)\n } else {\n api.reload('11186cd4', component.options)\n }\n module.hot.accept(\"./Arrow.vue?vue&type=template&id=11186cd4&\", function () {\n api.rerender('11186cd4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/icons/Arrow.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Control.vue?vue&type=script&lang=js&\"\nexport * from \"./Control.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('2fa0a0dd')) {\n api.createRecord('2fa0a0dd', component.options)\n } else {\n api.reload('2fa0a0dd', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Control.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Tip.vue?vue&type=script&lang=js&\"\nexport * from \"./Tip.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9f31bdca')) {\n api.createRecord('9f31bdca', component.options)\n } else {\n api.reload('9f31bdca', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Tip.vue\"\nexport default component.exports","\r\n","\r\n","var render, staticRenderFns\nimport script from \"./Option.vue?vue&type=script&lang=js&\"\nexport * from \"./Option.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3dddec25')) {\n api.createRecord('3dddec25', component.options)\n } else {\n api.reload('3dddec25', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Option.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./Menu.vue?vue&type=script&lang=js&\"\nexport * from \"./Menu.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9bcc0be2')) {\n api.createRecord('9bcc0be2', component.options)\n } else {\n api.reload('9bcc0be2', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Menu.vue\"\nexport default component.exports","\r\n","var render, staticRenderFns\nimport script from \"./MenuPortal.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuPortal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('4802d94a')) {\n api.createRecord('4802d94a', component.options)\n } else {\n api.reload('4802d94a', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/MenuPortal.vue\"\nexport default component.exports","var render, staticRenderFns\nimport script from \"./Treeselect.vue?vue&type=script&lang=js&\"\nexport * from \"./Treeselect.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"C:\\\\Development\\\\wiserskills\\\\vue-treeselect\\\\node_modules\\\\vue-hot-reload-api\\\\dist\\\\index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aebf116c')) {\n api.createRecord('aebf116c', component.options)\n } else {\n api.reload('aebf116c', component.options)\n }\n \n }\n}\ncomponent.options.__file = \"src/components/Treeselect.vue\"\nexport default component.exports","\r\n","import Treeselect from './components/Treeselect'\r\nimport treeselectMixin from './mixins/treeselectMixin'\r\nimport './style.less'\r\n\r\nexport default Treeselect\r\nexport { Treeselect, treeselectMixin }\r\nexport {\r\n // Delayed loading.\r\n LOAD_ROOT_OPTIONS,\r\n LOAD_CHILDREN_OPTIONS,\r\n ASYNC_SEARCH,\r\n} from './constants'\r\n\r\nexport const VERSION = PKG_VERSION\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/components/Option.vue b/src/components/Option.vue index 6ccd6d00..05fe11e5 100755 --- a/src/components/Option.vue +++ b/src/components/Option.vue @@ -282,8 +282,10 @@ }, } - const ariaSelected = this.instance.selectedNodes.length ? 'true' : 'false' - + let isSelected = false + this.instance.selectedNodes.some(e => e.id === this.node.id) + isSelected = `${isSelected}` + console.log() return (