WordPress/wp-includes/js/dist/token-list.min.js

1 line
9.2 KiB
JavaScript
Raw Normal View History

this.wp=this.wp||{},this.wp.tokenList=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=377)}({11:function(t,r,e){"use strict";function n(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,r,e){return r&&n(t.prototype,r),e&&n(t,e),t}e.d(r,"a",(function(){return o}))},12:function(t,r,e){"use strict";function n(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}e.d(r,"a",(function(){return n}))},2:function(t,r){!function(){t.exports=this.lodash}()},20:function(t,r,e){t.exports=e(48)},377:function(t,r,e){"use strict";e.r(r),e.d(r,"default",(function(){return c}));var n=e(20),o=e.n(n),i=e(12),a=e(11),u=e(2),c=function(){function t(){var r=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(i.a)(this,t),this.value=e,["entries","forEach","keys","values"].forEach((function(t){r[t]=function(){var r;return(r=this._valueAsArray)[t].apply(r,arguments)}.bind(r)}))}return Object(a.a)(t,[{key:"toString",value:function(){return this.value}},{key:Symbol.iterator,value:o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this._valueAsArray,"t0",1);case 1:return t.abrupt("return",t.t0);case 2:case"end":return t.stop()}}),t,this)}))},{key:"item",value:function(t){return this._valueAsArray[t]}},{key:"contains",value:function(t){return-1!==this._valueAsArray.indexOf(t)}},{key:"add",value:function(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];this.value+=" "+r.join(" ")}},{key:"remove",value:function(){for(var t=arguments.length,r=new Array(t),e=0;e<t;e++)r[e]=arguments[e];this.value=u.without.apply(void 0,[this._valueAsArray].concat(r)).join(" ")}},{key:"toggle",value:function(t,r){return void 0===r&&(r=!this.contains(t)),r?this.add(t):this.remove(t),r}},{key:"replace",value:function(t,r){return!!this.contains(t)&&(this.remove(t),this.add(r),!0)}},{key:"supports",value:function(){return!0}},{key:"value",get:function(){return this._currentValue},set:function(t){t=String(t),this._valueAsArray=Object(u.uniq)(Object(u.compact)(t.split(/\s+/g))),this._currentValue=this._valueAsArray.join(" ")}},{key:"length",get:function(){return this._valueAsArray.length}}]),t}()},48:function(t,r,e){var n=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){var o=r&&r.prototype instanceof v?r:v,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,r,e){var n=f;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return S()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=j(a,e);if(u){if(u===y)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=h;var c=s(t,r,e);if("normal"===c.type){if(n=e.done?p:l,c.arg===y)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=p,e.method