文件操作 - choices.min.js
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/stanleysteamer/public_html/wp-content/themes/bricks/assets/js/choices.min.js
编辑文件内容
function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,o)}return i}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach(function(t){_defineProperty(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,i){return t&&_defineProperties(e.prototype,t),i&&_defineProperties(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var BricksChoices=function(){return _createClass(function e(t){var i,o,c,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,e),this.element=t,this.isMultiple=t.multiple||!1,this.isFilterElement=null!==t.closest("[data-brx-filter]"),this.choices=null,this.multiplePlaceholderElement=null,this.defaultOptions={searchEnabled:!1,searchPlaceholderValue:(null===(i=window.bricksData.i18n)||void 0===i||null===(i=i.choicesjs)||void 0===i?void 0:i.search)||"Search",itemSelectText:"",removeItemButton:!0,removeItemIconText:function(){var e;return(null===(e=window.bricksData.i18n)||void 0===e||null===(e=e.choicesjs)||void 0===e?void 0:e.removeItemIconText)||"Remove item"},removeItemLabelText:function(e,t){var i;return"".concat((null===(i=window.bricksData.i18n)||void 0===i||null===(i=i.choicesjs)||void 0===i?void 0:i.removeItemIconText)||"Remove item",": ").concat(e)},noResultsText:(null===(o=window.bricksData.i18n)||void 0===o||null===(o=o.choicesjs)||void 0===o?void 0:o.noResultsText)||"No results found",noChoicesText:(null===(c=window.bricksData.i18n)||void 0===c||null===(c=c.choicesjs)||void 0===c?void 0:c.noChoicesText)||"No choices to choose from",shouldSort:!1,allowHTML:!0,classNames:{containerOuter:["bricks-choices"],containerInner:["bricks-choices__inner"],input:["bricks-choices__input"],inputCloned:["bricks-choices__input--cloned"],list:["bricks-choices__list"],listItems:["bricks-choices__list--multiple"],listSingle:["bricks-choices__list--single"],listDropdown:["bricks-choices__list--dropdown"],item:["bricks-choices__item"],itemSelectable:["bricks-choices__item--selectable"],itemDisabled:["bricks-choices__item--disabled"],itemChoice:["bricks-choices__item--choice"],description:["bricks-choices__description"],placeholder:["bricks-choices__placeholder"],group:["bricks-choices__group"],groupHeading:["bricks-choices__heading"],button:["bricks-choices__button"],activeState:["is-active"],focusState:["is-focused"],openState:["is-open"],disabledState:["is-disabled"],highlightedState:["is-highlighted"],selectedState:["is-selected"],flippedState:["is-flipped"],loadingState:["is-loading"],invalidState:["is-invalid"],notice:["bricks-choices__notice"],addChoice:["bricks-choices__item--selectable","add-choice"],noResults:["has-no-results"],noChoices:["has-no-choices"]}},this.options=_objectSpread(_objectSpread({},this.defaultOptions),n),this.init()},[{key:"init",value:function(){var e=this;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){return e.initChoices()}):this.initChoices()}},{key:"initChoices",value:function(){this.choices&&this.choices.destroy(),this.choices=new BrxChoices(this.element,this.options),this.setupMultiplePlaceholder(),this.bindEvents(),this.element._bricksChoices=this}},{key:"bindEvents",value:function(){var e=this;this.choices&&(this.element.addEventListener("change",function(t){e.toggleMultiplePlaceholder(),e.isFilterElement&&e.handleFilterChange(t)}),this.element.addEventListener("choice",function(t){e.handleChoice(t)}))}},{key:"handleFilterChange",value:function(e){}},{key:"handleChoice",value:function(e){}},{key:"updateChoices",value:function(e){this.choices&&(this.choices.clearStore(),this.choices.setChoices(e,"value","label",!0),this.toggleMultiplePlaceholder())}},{key:"getValue",value:function(){return this.choices?this.choices.getValue():null}},{key:"setValue",value:function(e){this.choices&&this.choices.setChoiceByValue(e)}},{key:"destroy",value:function(){this.multiplePlaceholderElement&&(this.multiplePlaceholderElement.remove(),this.multiplePlaceholderElement=null),this.choices&&(this.choices.destroy(),this.choices=null)}},{key:"enable",value:function(){this.choices&&this.choices.enable()}},{key:"disable",value:function(){this.choices&&this.choices.disable()}},{key:"setupMultiplePlaceholder",value:function(){var e,t,i=this,o=this.options.placeholderValue||(null===(e=this.element.dataset)||void 0===e?void 0:e.placeholder)||"";if(this.choices&&this.isMultiple&&!this.options.searchEnabled&&o){this.multiplePlaceholderElement&&this.multiplePlaceholderElement.remove();var c=null===(t=this.choices.containerInner)||void 0===t?void 0:t.element;if(c){var n=document.createElement("div");n.className="bricks-choices__placeholder bricks-choices__placeholder--multiple",n.textContent=o,n.tabIndex=0;var s=function(){var e;!i.choices||null!==(e=i.choices.containerOuter)&&void 0!==e&&e.isDisabled||i.choices.showDropdown()};n.addEventListener("click",s),n.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s())}),c.appendChild(n),this.multiplePlaceholderElement=n,this.toggleMultiplePlaceholder()}}}},{key:"toggleMultiplePlaceholder",value:function(){if(this.multiplePlaceholderElement){var e=Array.from(this.element.selectedOptions||[]).some(function(e){return""!==e.value});this.multiplePlaceholderElement.style.display=e?"none":""}}}])}(),bricksChoicesFn=new BricksFunction({parentNode:document,selector:'select[data-brx-choices="true"]:not([data-brx-filter])',forceReinit:function(e,t){return!bricksIsFrontend},windowVariableCheck:["BrxChoices"],eachElement:function(e){var t,i=(null===(t=e.dataset)||void 0===t?void 0:t.scriptId)||!1;if(i){window.bricksData.choicesInstances.hasOwnProperty(i)&&window.bricksData.choicesInstances[i].destroy();var o=e.dataset.brxChoicesOptions?JSON.parse(e.dataset.brxChoicesOptions):{},c=new BricksChoices(e,o);window.bricksData.choicesInstances[i]=c}}});function bricksChoices(){bricksChoicesFn.run()}document.addEventListener("DOMContentLoaded",bricksChoices);
修改文件时间
将文件时间修改为当前时间的前一年
删除文件