Choices/public/assets/scripts/choices.min.js

2 lines
90 KiB
JavaScript
Raw Normal View History

/*! choices.js v4.0.0 | (c) 2018 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Choices=t():e.Choices=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/public/assets/scripts/",t(t.s=34)}([function(e,t,n){var i=n(26)("wks"),r=n(14),o=n(2).Symbol,s="function"==typeof o;(e.exports=function(e){return i[e]||(i[e]=s&&o[e]||(s?o:r)("Symbol."+e))}).store=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="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},r=t.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=c(0,36).toString(36)}return t},o=(t.generateId=function(e,t){var n=e.id||e.name&&e.name+"-"+r(2)||r(4);return n=n.replace(/(:|\.|\[|\]|,)/g,""),n=t+n},t.getType=function(e){return Object.prototype.toString.call(e).slice(8,-1)}),s=t.isType=function(e,t){var n=o(t);return void 0!==t&&null!==t&&n===e},a=(t.isElement=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":i(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":i(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},t.extend=function e(){for(var t={},n=arguments.length,i=0;i<n;i++){var r=arguments[i];s("Object",r)&&function(n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(s("Object",n[i])?t[i]=e(!0,t[i],n[i]):t[i]=n[i])}(r)}return t},t.wrap=function(e,t){return t=t||document.createElement("div"),e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t.appendChild(e)},t.findAncestor=function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e},t.findAncestorByAttrName=function(e,t){for(var n=e;n;){if(n.hasAttribute(t))return n;n=n.parentElement}return null},t.getAdjacentEl=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e&&t){var i=e.parentNode.parentNode,r=Array.from(i.querySelectorAll(t));return r[r.indexOf(e)+(n>0?1:-1)]}},t.isScrolledIntoView=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e){return n>0?t.scrollTop+t.offsetHeight>=e.offsetTop+e.offsetHeight:e.offsetTop>=t.scrollTop}},t.stripHTML=function(e){return e.replace(/&/g,"&amp;").replace(/>/g,"&rt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}),c=t.getRandomNumber=function(e,t){return Math.floor(Math.random()*(t-e)+e)},l=t.strToEl=function(){var e=document.createElement("div");return function(t){var n=t.trim(),i=void 0;for(e.innerHTML=n,i=e.children[0];e.firstChild;)e.removeChild(e.firstChild);return i}}();t.calcWidthOfInput=function(e){var t=e.value||e.placeholder,n=e.offsetWidth;if(t){var i=l("<span>"+a(t)+"</span>");if(i.style.position="absolute",i.style.padding="0",i.style.top="-9999px",i.style.left="-9999px",i.style.width="auto",i.style.whiteSpace="pre",document.body.contains(e)&&window.getComputedStyle){var r=window.getComputedStyle(e);r&&(i.style.fontSize=r.fontSize,i.style.fontFamily=r.fontFamily,i.style.fontWeight=r.fontWeight,i.style.fontStyle=r.fontStyle,i.style.letterSpacing=r.letterSpacing,i.style.textTransform=r.textTransform,i.style.padding=r.padding)}document.body.appendChild(i),t&&i.offsetWidth!==e.offsetWidth&&(n=i.offsetWidth+4),document.body.removeChild(i)}return n+"px"},t.sortByAlpha=function(e,t){var n=(e.label||e.value).toLowerCase(),i=(t.label||t.value).toLowerCase();return n<i?-1:n>i?1:0},t.sortByScore=function(e,t){return e.score-t.score},t.dispatchEvent=function(e,t){var n=argumen