woocommerce/assets/js/select2/select2.min.js

13 lines
65 KiB
JavaScript
Raw Normal View History

2016-12-21 11:36:48 +00:00
/*!
* Select2 4.0.3
* https://select2.github.io
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/
2017-06-19 11:49:34 +00:00
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)t=e.fn.select2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};/**
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
var e,n,i;!function(t){function r(e,t){return $.call(e,t)}function s(e,t){var n,i,r,s,o,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(o=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[o])&&(e[o]=e[o].replace(b,"")),e=h.slice(0,h.length-1).concat(e),u=0;u<e.length;u+=1)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(1===u&&(".."===e[2]||".."===e[0]))break;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||g)&&f){for(u=(n=e.split("/")).length;u>0;u-=1){if(i=n.slice(0,u).join("/"),h)for(d=h.length;d>0;d-=1)if((r=f[h.slice(0,d).join("/")])&&(r=r[i])){s=r,a=u;break}if(s)break;!l&&g&&g[i]&&(l=g[i],c=u)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function o(e,n){return function(){var i=w.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),h.apply(t,i.concat([e,n]))}}function a(e){return function(t){return s(t,e)}}function l(e){return function(t){m[e]=t}}function c(e){if(r(v,e)){var n=v[e];delete v[e],_[e]=!0,p.apply(t,n)}if(!r(m,e)&&!r(_,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function d(e){return function(){return y&&y.config&&y.config[e]||{}}}var p,h,f,g,m={},v={},y={},_={},$=Object.prototype.hasOwnProperty,w=[].slice,b=/\.js$/;f=function(e,t){var n,i=u(e),r=i[0];return e=i[1],r&&(n=c(r=s(r,t))),r?e=n&&n.normalize?n.normalize(e,a(t)):s(e,t):(r=(i=u(e=s(e,t)))[0],e=i[1],r&&(n=c(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},g={require:function(e){return o(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:d(e)}}},p=function(e,n,i,s){var a,u,d,p,h,y,$=[],w=typeof i;if(s=s||e,"undefined"===w||"function"===w){for(n=!n.length&&i.length?["require","exports","module"]:n,h=0;h<n.length;h+=1)if(p=f(n[h],s),"require"===(u=p.f))$[h]=g.require(e);else if("exports"===u)$[h]=g.exports(e),y=!0;else if("module"===u)a=$[h]=g.module(e);else if(r(m,u)||r(v,u)||r(_,u))$[h]=c(u);else{if(!p.p)throw new Error(e+" missing "+u);p.p.load(p.n,o(s,!0),l(u),{}),$[h]=m[u]}d=i?i.apply(m[e],$):undefined,e&&(a&&a.exports!==t&&a.exports!==m[e]?m[e]=a.exports:d===t&&y||(m[e]=d))}else e&&(m[e]=i)},e=n=h=function(e,n,i,r,s){if("string"==typeof e)return g[e]?g[e](n):c(f(e,n).f);if(!e.splice){if((y=e).deps&&h(y.deps,y.callback),!n)return;n.splice?(e=n,n=i,i=null):e=t}return n=n||function(){},"function"==typeof i&&(i=r,r=s),r?p(t,e,n,i):setTimeout(function(){p(t,e,n,i)},4),h},h.config=function(e){return h(e)},e._defined=m,(i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),r(m,e)||r(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var i in t)"function"==typeof t[i]&&"constructor"!==i&&n.push(i);return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function i(){var t=Array.prototype.unshift,i=n.prototype.constructor.length,r=e.prototype.constructor;i>0&&(t.call(arguments,e.prototype.constructor),r=n.prototype.constructor),r.apply(this,arguments)}var r=t(n),s=t(e);n.displayName=e.displayName,i.prototype=new function(){this.constructor=i};for(var o=0;o<s.length;o++){var a=s[o];i.prototype[a]=e.prototype[a]}for(var l=0;l<r.length;l++){var c=r[l];i.prototype[c]=function(e){var t=function(){};e in i.prototype&&(t=i.prototype[e]);var r=n.prototype[e];return function(){return Array.prototype.unshift.call(