/* * mobile-select v1.4.0 * Homepage: https://github.com/onlyhom/mobile-select * Released under the MIT License. * (c) 2017-present */ "use strict";function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}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.")}function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}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.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Map"===(n="Object"===n&&o.constructor?o.constructor.name:n)||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i').concat(o,"")}else for(var _s2=0;_s2"+t[_s2]+"";return i}},{key:"renderComponent",value:function(t){this.mobileSelect=document.createElement("div"),this.mobileSelect.className="ms-mobile-select",this.mobileSelect.innerHTML='
\n
\n
\n
\n
'.concat(this.config.cancelBtnText,'
\n
').concat(this.config.title||"",'
\n
').concat(this.config.ensureBtnText,'
\n
\n
\n
\n
\n
\n
\n
\n
\n
'),document.body.appendChild(this.mobileSelect);for(var e="",i=0;i
    '))+this.getOptionsHtmlStr(t[i].data)+"
";this.mobileSelect.querySelector(".ms-wheels").innerHTML=e}},{key:"reRenderWheels",value:function(){var t=this.wheelList.length-this.displayJson.length;if(0'.concat(this.getOptionsHtmlStr(this.displayJson[_e4]),""),i.setAttribute("data-index",_e4.toString()),this.wheelsContain.appendChild(i))}},{key:"checkCascade",value:function(){var e,t=this.config.keyMap;if(this.isJsonType)for(var i=this.wheelsData[0].data,s=0;se.length)for(var s=this.sliderList.length-e.length,n=0;n=this.oversizeBorder&&(this.curDistance[n]=p,this.movePosition(s,this.curDistance[n]),null!=(r=(p=this.config).transitionEnd)&&r.call(p,this.getIndexArr(),this.getCurValue(),this),null!=(p=(r=this.config).onTransitionEnd)&&p.call(r,this.getCurValue(),this.getIndexArr(),this)):(this.updateCurDistance(s,n),this.curDistance[n]=this.fixPosition(this.curDistance[n]),this.curDistance[n]>2*this.optionHeight?this.curDistance[n]=2*this.optionHeight:this.curDistance[n]