WordPress/wp-includes/js/dist/rich-text.min.js
atimmer 86ccb815e7 Build Tools: Update @wordpress packages.
Props pento.
Merges [43843] to trunk.
See #45145.

Built from https://develop.svn.wordpress.org/trunk@44180


git-svn-id: http://core.svn.wordpress.org/trunk@44010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 12:07:58 +00:00

1 line
19 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

this.wp=this.wp||{},this.wp.richText=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=308)}({15:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",function(){return r})},19:function(t,e,n){"use strict";var r=n(31);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||Object(r.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(e,"a",function(){return o})},2:function(t,e){!function(){t.exports=this.lodash}()},27:function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(t){return r(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":r(t)})(t)}n.d(e,"a",function(){return o})},308:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"getFormatTypes",function(){return s}),n.d(r,"getFormatType",function(){return l});var o={};n.r(o),n.d(o,"addFormatTypes",function(){return d}),n.d(o,"removeFormatTypes",function(){return m});var a=n(5),i=n(8),u=n(2);var c=Object(a.combineReducers)({formatTypes:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ADD_FORMAT_TYPES":return Object(i.a)({},t,Object(u.keyBy)(e.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(u.omit)(t,e.names)}return t}}),f=n(33),s=Object(f.a)(function(t){return Object.values(t.formatTypes)},function(t){return[t.formatTypes]});function l(t,e){return t.formatTypes[e]}function d(t){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(u.castArray)(t)}}function m(t){return{type:"REMOVE_FORMAT_TYPES",names:Object(u.castArray)(t)}}Object(a.registerStore)("core/rich-text",{reducer:c,selectors:r,actions:o});var p=n(19);function v(t,e){if(t===e)return!0;if(!t||!e)return!1;if(t.type!==e.type)return!1;var n=t.attributes,r=e.attributes;if(n===r)return!0;if(!n||!r)return!1;var o=Object.keys(n),a=Object.keys(r);if(o.length!==a.length)return!1;for(var i=o.length,u=0;u<i;u++){var c=o[u];if(n[c]!==r[c])return!1}return!0}function h(t){var e=t.formats,n=t.text,r=t.start,o=t.end,a=e.slice(0);return a.forEach(function(t,e){var n=a[e-1];if(n){var r=t.slice(0);r.forEach(function(t,e){var o=n[e];v(t,o)&&(r[e]=o)}),a[e]=r}}),{formats:a,text:n,start:r,end:o}}var y=n(27);function g(t){return 0===t.text.length}function b(t){var e=t.text,n=t.start,r=t.end;return n===r&&(0===e.length||(0===n&&"\u2028"===e.slice(0,1)||(n===e.length&&"\u2028"===e.slice(-1)||"\u2028\u2028"===e.slice(n-1,r+1))))}function x(){return Object(a.select)("core/rich-text").getFormatTypes()}var O=window.Node,j=O.TEXT_NODE,T=O.ELEMENT_NODE;function w(t,e){for(var n in t)if(t[n]===e)return n}function N(t){var e=t.type,n=t.attributes,r=Object(u.find)(x(),function(t){var n=t.match;return e===n.tagName});if(!r)return n?{type:e,attributes:n}:{type:e};if(!n)return{type:r.name};var o={},a={};for(var i in n){var c=w(r.attributes,i);c?o[c]=n[i]:a[i]=n[i]}return{type:r.name,attributes:o,unregisteredAttributes:a}}function E(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.element,n=t.text,r=t.html,o=t.range,a=t.multilineTag,i=t.removeNode,u=t.unwrapNode,c=t.filterString,f=t.removeAttribute;return"string"==typeof n&&n.length>0?{formats:Array(n.length),text:n}:("string"==typeof r&&r.length>0&&(e=function(t,e){var n=t.implementation.createHTMLDocument("").body;return n.innerHTML=e,n}(document,r)),"object"!==Object(y.a)(e)?{formats:[],text:""}:a?function(t){var e=t.element,n=t.range,r=t.multilineTag,o=t.removeNode,a=t.unwrapNode,i=t.filterString,u=t.removeAttribute,c={formats:[],text:""};if(!e||!e.hasChildNodes())return c;for(var f=e.children.length,s=0;s<f;s++){var l=e.children[s];if(l.nodeName.toLowerCase()===r){var d=C({element:l,range:n,multilineTag:r,removeNode:o,unwrapNode:a,filterString:i,removeAttribute:u});0!==s&&(c.formats=c.formats.concat([,]),c.text+="\u2028"),S(c,l,n,d),c.formats=c.formats.concat(d.formats),c.text+=d.text}}return c}({element:e,range:o,multilineTag:a,removeNode:i,unwrapNode:u,filterString:c,removeAttribute:f}):C({element:e,range:o,removeNode:i,unwrapNode:u,filterString:c,removeAttribute:f}))}function S(t,e,n,r){if(n){var o=e.parentNode,a=n.startContainer,i=n.startOffset,u=n.endContainer,c=n.endOffset,f=t.text.length;void 0!==r.start?t.start=f+r.start:e===a?t.start=f+i:o===a&&e===a.childNodes[i]&&(t.start=f),void 0!==r.end?t.end=f+r.end:e===u?t.end=f+c:o===u&&e===u.childNodes[c-1]?t.end=f+r.text.length:o===u&&e===u.childNodes[c]&&(t.end=f)}}function A(t,e,n){if(e){var r=e.startContainer,o=e.endContainer,a=e.startOffset,i=e.endOffset;return t===r&&(a=n(t.nodeValue.slice(0,a)).length),t===o&&(i=n(t.nodeValue.slice(0,i)).length),{startContainer:r,startOffset:a,endContainer:o,endOffset:i}}}function C(t){var e=t.element,n=t.range,r=t.removeNode,o=t.unwrapNode,a=t.filterString,i=t.removeAttribute,u={formats:[],text:""};if(!e)return u;if(!e.hasChildNodes())return S(u,e,n,{formats:[],text:""}),u;for(var c=e.childNodes.length,f=function(t){return t=t.replace(/[\r\n]/g,""),a&&(t=a(t)),t},s=0;s<c;s++){var l=e.childNodes[s];if(l.nodeType!==j){if(l.nodeType===T)if(r&&r(l)||o&&o(l)&&!l.hasChildNodes())S(u,l,n,{formats:[],text:""});else if("BR"!==l.nodeName){var d=u.formats[u.formats.length-1],m=d&&d[d.length-1],h=void 0;if(!o||!o(l)){var y=N({type:l.nodeName.toLowerCase(),attributes:F({element:l,removeAttribute:i})});h=v(y,m)?m:y}var b=C({element:l,range:n,removeNode:r,unwrapNode:o,filterString:a,removeAttribute:i}),x=b.text,O=u.text.length;if(S(u,l,n,b),!g(b)||!h||h.attributes){var w=u.formats;if(h&&h.attributes&&0===x.length)h.object=!0,u.text+="",w[O]?w[O].unshift(h):w[O]=[h];else{u.text+=x;for(var E=b.formats.length;E--;){var D,M=O+E;if(h&&(w[M]?w[M].push(h):w[M]=[h]),b.formats[E])if(w[M])(D=w[M]).push.apply(D,Object(p.a)(b.formats[E]));else w[M]=b.formats[E]}}}}else S(u,l,n,{formats:[],text:""}),u.text+="\n",u.formats.length+=1}else{var P=f(l.nodeValue);S(u,l,n=A(l,n,f),{text:P}),u.text+=P,u.formats.length+=P.length}}return u}function F(t){var e=t.element,n=t.removeAttribute;if(e.hasAttributes()){for(var r,o=e.attributes.length,a=0;a<o;a++){var i=e.attributes[a],u=i.name,c=i.value;n&&n(u)||((r=r||{})[u]=c)}return r}}function D(t,e){var n=t.formats,r=t.text,o=t.start,a=t.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a;"string"==typeof e&&(e=E({text:e}));var c=i+e.text.length;return h({formats:n.slice(0,i).concat(e.formats,n.slice(u)),text:r.slice(0,i)+e.text+r.slice(u),start:c,end:c})}var M="\ufeff";function P(t,e){var n=t.formats,r=t.text,o=t.start,a=t.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a,f=n.slice(0);if(i===c){var s=Object(u.find)(f[i],{type:e.type});if(!s){var l=f[i-1]||[];return D({formats:n,text:r,start:o,end:a},{formats:Object(u.find)(l,{type:e.type})?[Object(u.reject)(l,{type:e.type})]:[Object(p.a)(l).concat([e])],text:M})}for(;Object(u.find)(f[i],s);)_(f,i,e),i--;for(c++;Object(u.find)(f[c],s);)_(f,c,e),c++}else for(var d=i;d<c;d++)_(f,d,e);return h({formats:f,text:r,start:o,end:a})}function _(t,e,n){if(t[e]){var r=t[e].filter(function(t){return t.type!==n.type});r.push(n),t[e]=r}else t[e]=[n]}function L(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return h(e.reduce(function(t,e){var n=e.formats,r=e.text;return{text:t.text+r,formats:t.formats.concat(n)}}))}function R(t,e){var n=t.formats,r=t.start;if(void 0!==r)return Object(u.find)(n[r],{type:e})}function V(t){return Object(a.select)("core/rich-text").getFormatType(t)}function k(t){return t.text}function I(t){var e=t.start,n=t.end;if(void 0!==e&&void 0!==n)return e===n}function H(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof e&&(e=E({text:e})),h(t.reduce(function(t,n){var r=n.formats,o=n.text;return{text:t.text+e.text+o,formats:t.formats.concat(e.formats,r)}}))}function B(t,e){if("string"==typeof(e=Object(i.a)({name:t},e)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(e.name))if(Object(a.select)("core/rich-text").getFormatType(e.name))window.console.error('Format "'+e.name+'" is already registered.');else if(e&&Object(u.isFunction)(e.edit))if("title"in e&&""!==e.title)if("keywords"in e&&e.keywords.length>3)window.console.error('The format "'+e.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof e.title)return Object(a.dispatch)("core/rich-text").addFormatTypes(e),e;window.console.error("Format titles must be strings.")}else window.console.error('The format "'+e.name+'" must have a title.');else window.console.error('The "edit" property must be specified and must be a valid function.');else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function z(t,e){var n=t.formats,r=t.text,o=t.start,a=t.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a,f=n.slice(0);if(i===c){for(var s=Object(u.find)(f[i],{type:e});Object(u.find)(f[i],s);)Y(f,i,e),i--;for(c++;Object(u.find)(f[c],s);)Y(f,c,e),c++}else for(var l=i;l<c;l++)f[l]&&Y(f,l,e);return h({formats:f,text:r,start:o,end:a})}function Y(t,e,n){var r=t[e].filter(function(t){return t.type!==n});r.length?t[e]=r:delete t[e]}function W(t,e,n){return D(t,E(),e,n)}function q(t,e,n){var r=t.formats,o=t.text,a=t.start,i=t.end;return o=o.replace(e,function(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),u=1;u<e;u++)o[u-1]=arguments[u];var c,f=o[o.length-2],s=n;return"function"==typeof s&&(s=n.apply(void 0,[t].concat(o))),"object"===Object(y.a)(s)?(c=s.formats,s=s.text):(c=Array(s.length),r[f]&&(c=c.fill(r[f]))),r=r.slice(0,f).concat(c,r.slice(f+t.length)),a&&(a=i=f+s.length),s}),h({formats:r,text:o,start:a,end:i})}var U="";function X(t,e,n,r){return D(t,{text:U,formats:[[Object(i.a)({},e,{object:!0})]]},n,r)}function $(t){var e=t.formats,n=t.text,r=t.start,o=t.end,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;return void 0===a||void 0===i?{formats:e,text:n}:{formats:e.slice(a,i),text:n.slice(a,i)}}function G(t,e){var n=t.formats,r=t.text,o=t.start,a=t.end;if("string"!=typeof e)return function(t){var e=t.formats,n=t.text,r=t.start,o=t.end,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,u={formats:e.slice(0,a),text:n.slice(0,a)},c={formats:e.slice(i),text:n.slice(i),start:0,end:0};return[q(u,/\u2028+$/,""),q(c,/^\u2028+/,"")]}.apply(void 0,arguments);var i=0;return r.split(e).map(function(t){var r=i,u={formats:n.slice(r,r+t.length),text:t};return i+=e.length+t.length,void 0!==o&&void 0!==a&&(o>=r&&o<i?u.start=o-r:o<r&&a>r&&(u.start=0),a>=r&&a<i?u.end=a-r:o<i&&a>i&&(u.end=t.length)),u})}function J(t,e,n){if(e){var r=n.createEmpty,o=n.append,a=r();return G(t,"\u2028").forEach(function(t,r){o(a,J(t,null,Object(i.a)({},n,{tag:e,multilineIndex:r})))}),a}var u=n.tag,c=n.multilineIndex,f=n.createEmpty,s=n.append,l=n.getLastChild,d=n.getParent,m=n.isText,p=n.getText,v=n.remove,h=n.appendText,y=n.onStartIndex,g=n.onEndIndex,b=n.onEmpty,x=t.formats,O=t.text,j=t.start,T=t.end,w=x.length+1,N=f(u);s(N,"");for(var E=function(t){var e=O.charAt(t),n=x[t],r=x[t-1],o=l(N);n&&n.forEach(function(t,e){if(o&&r&&t===r[e])o=l(o);else{var n=t.type,a=t.attributes,i=t.object,u=d(o),c=s(u,function(t){var e=t.type,n=t.attributes,r=t.object,o=V(e);if(!o)return{type:e,attributes:n,object:r};if(!n)return{type:o.match.tagName,object:o.object};var a={};for(var i in n){var u=o.attributes[i];u?a[u]=n[i]:a[i]=n[i]}return{type:o.match.tagName,object:o.object,attributes:a}}({type:n,attributes:a,object:i}));m(o)&&0===p(o).length&&v(o),o=s(i?u:c,"")}}),y&&0===j&&0===t&&y(N,o,c),g&&0===T&&0===t&&g(N,o,c),""!==e&&("\n"===e?(o=s(d(o),{type:"br",object:!0}),o=s(d(o),"")):m(o)?h(o,e):o=s(d(o),e)),y&&j===t+1&&y(N,o,c),g&&T===t+1&&g(N,o,c)},S=0;S<w;S++)E(S);return b&&0===O.length&&b(N),N}var K=window.Node,Q=K.TEXT_NODE,Z=K.ELEMENT_NODE;function tt(t,e,n){for(var r=t.parentNode,o=0;t=t.previousSibling;)o++;return n=[o].concat(Object(p.a)(n)),r!==e&&(n=tt(r,e,n)),n}function et(t,e){for(e=Object(p.a)(e);t&&e.length>1;)t=t.childNodes[e.shift()];return{node:t,offset:e[0]}}function nt(t){var e=document.implementation.createHTMLDocument("").body;return t?e.appendChild(e.ownerDocument.createElement(t)):e}function rt(t,e){"string"==typeof e&&(e=t.ownerDocument.createTextNode(e));var n=e,r=n.type,o=n.attributes;if(r)for(var a in e=t.ownerDocument.createElement(r),o)e.setAttribute(a,o[a]);return t.appendChild(e)}function ot(t,e){t.appendData(e)}function at(t){return t.lastChild}function it(t){return t.parentNode}function ut(t){return t.nodeType===Q}function ct(t){return t.nodeValue}function ft(t){return t.parentNode.removeChild(t)}function st(t,e){var n=[],r=[];return{body:J(t,e,{createEmpty:nt,append:rt,getLastChild:at,getParent:it,isText:ut,getText:ct,remove:ft,appendText:ot,onStartIndex:function(t,e,r){n=tt(e,t,[e.nodeValue.length]),void 0!==r&&(n=[r].concat(Object(p.a)(n)))},onEndIndex:function(t,e,n){r=tt(e,t,[e.nodeValue.length]),void 0!==n&&(r=[n].concat(Object(p.a)(r)))},onEmpty:function(t){var e=t.ownerDocument.createElement("br");e.setAttribute("data-mce-bogus","1"),t.appendChild(e)}}),selection:{startPath:n,endPath:r}}}function lt(t,e,n){var r=st(t,n),o=r.body,a=r.selection;!function(t,e){var n=0;for(;t.firstChild;){var r=e.childNodes[n],o=t.firstChild.nodeType;r?o!==r.nodeType||o!==Q||t.firstChild.nodeValue!==r.nodeValue?e.replaceChild(t.firstChild,r):t.removeChild(t.firstChild):e.appendChild(t.firstChild),n++}for(;e.childNodes[n];)e.removeChild(e.childNodes[n])}(o,e),void 0!==t.start&&function(t,e){var n=et(e,t.startPath),r=n.node,o=n.offset,a=et(e,t.endPath),i=a.node,u=a.offset,c=window.getSelection(),f=e.ownerDocument.createRange(),s=r===i&&o===u;s&&0===o&&r.previousSibling&&r.previousSibling.nodeType===Z&&"BR"!==r.previousSibling.nodeName?(r.insertData(0,"\ufeff"),f.setStart(r,1),f.setEnd(i,1)):s&&0===o&&r===Q&&0===r.nodeValue.length?(r.insertData(0,"\ufeff"),f.setStart(r,1),f.setEnd(i,1)):(f.setStart(r,o),f.setEnd(i,u));c.removeAllRanges(),c.addRange(f)}(a,e)}var dt=n(59);function mt(t,e){return jt(J(t,e,{createEmpty:pt,append:ht,getLastChild:vt,getParent:gt,isText:bt,getText:xt,remove:Ot,appendText:yt}).children)}function pt(t){return{type:t}}function vt(t){var e=t.children;return e&&e[e.length-1]}function ht(t,e){return"string"==typeof e&&(e={text:e}),e.parent=t,t.children=t.children||[],t.children.push(e),e}function yt(t,e){t.text+=e}function gt(t){return t.parent}function bt(t){return"string"==typeof t.text}function xt(t){return t.text}function Ot(t){var e=t.parent.children.indexOf(t);return-1!==e&&t.parent.children.splice(e,1),t}function jt(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(t){return void 0===t.text?function(t){var e=t.type,n=t.attributes,r=t.object,o=t.children,a="";for(var i in n)Object(dt.isValidAttributeName)(i)&&(a+=" ".concat(i,'="').concat(Object(dt.escapeAttribute)(n[i]),'"'));return r?"<".concat(e).concat(a,">"):"<".concat(e).concat(a,">").concat(jt(o),"</").concat(e,">")}(t):Object(dt.escapeHTML)(t.text)}).join("")}function Tt(t,e){return R(t,e.type)?z(t,e.type):P(t,e)}function wt(t){var e=Object(a.select)("core/rich-text").getFormatType(t);if(e)return Object(a.dispatch)("core/rich-text").removeFormatTypes(t),e;window.console.error("Format ".concat(t," is not registered."))}n.d(e,"applyFormat",function(){return P}),n.d(e,"concat",function(){return L}),n.d(e,"create",function(){return E}),n.d(e,"getActiveFormat",function(){return R}),n.d(e,"getFormatType",function(){return V}),n.d(e,"getFormatTypes",function(){return x}),n.d(e,"getTextContent",function(){return k}),n.d(e,"isCollapsed",function(){return I}),n.d(e,"isEmpty",function(){return g}),n.d(e,"isEmptyLine",function(){return b}),n.d(e,"join",function(){return H}),n.d(e,"registerFormatType",function(){return B}),n.d(e,"removeFormat",function(){return z}),n.d(e,"remove",function(){return W}),n.d(e,"replace",function(){return q}),n.d(e,"insert",function(){return D}),n.d(e,"insertObject",function(){return X}),n.d(e,"slice",function(){return $}),n.d(e,"split",function(){return G}),n.d(e,"apply",function(){return lt}),n.d(e,"unstableToDom",function(){return st}),n.d(e,"toHTMLString",function(){return mt}),n.d(e,"toggleFormat",function(){return Tt}),n.d(e,"unregisterFormatType",function(){return wt})},31:function(t,e,n){"use strict";function r(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}n.d(e,"a",function(){return r})},33:function(t,e,n){"use strict";var r,o;function a(t){return[t]}function i(){var t={clear:function(){t.head=null}};return t}function u(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,e.a=function(t,e){var n,c;function f(){n=o?new WeakMap:i()}function s(){var n,r,o,a,i,f=arguments.length;for(a=new Array(f),o=0;o<f;o++)a[o]=arguments[o];for(i=e.apply(null,a),(n=c(i)).isUniqueByDependants||(n.lastDependants&&!u(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(u(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:t.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return e||(e=a),c=o?function(t){var e,o,a,u,c,f=n,s=!0;for(e=0;e<t.length;e++){if(o=t[e],!(c=o)||"object"!=typeof c){s=!1;break}f.has(o)?f=f.get(o):(a=new WeakMap,f.set(o,a),f=a)}return f.has(r)||((u=i()).isUniqueByDependants=s,f.set(r,u)),f.get(r)}:function(){return n},s.getDependants=e,s.clear=f,f(),s}},5:function(t,e){!function(){t.exports=this.wp.data}()},59:function(t,e){!function(){t.exports=this.wp.escapeHtml}()},8:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(15);function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(e){Object(r.a)(t,e,n[e])})}return t}}});