WordPress/wp-includes/js/dist/editor.min.js

11 lines
188 KiB
JavaScript
Raw Normal View History

this.wp=this.wp||{},this.wp.editor=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="PLxR")}({"16Al":function(t,e,n){"use strict";var r=n("WbBG");function o(){}t.exports=function(){function t(t,e,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=o,n.PropTypes=n,n}},"17x9":function(t,e,n){t.exports=n("16Al")()},"1OyB":function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},"1ZqX":function(t,e){!function(){t.exports=this.wp.data}()},"25BE":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}))},"4JlD":function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?i(s(t),(function(s){var a=encodeURIComponent(r(s))+n;return o(t[s])?i(t[s],(function(t){return a+encodeURIComponent(r(t))})).join(e):a+encodeURIComponent(r(t[s]))})).join(e):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},"4eJC":function(t,e,n){t.exports=function(t,e){var n,r,o,i=0;function s(){var e,s,a=r,c=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s<c;s++)if(a.args[s]!==arguments[s]){a=a.next;continue t}return a!==r&&(a===o&&(o=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=r,a.prev=null,r.prev=a,r=a),a.val}a=a.next}for(e=new Array(c),s=0;s<c;s++)e[s]=arguments[s];return a={args:e,val:t.apply(null,e)},r?(r.prev=a,a.next=r):o=a,i===n?(o=o.prev).next=null:i++,r=a,a.val}return e&&e.maxSize&&(n=e.maxSize),s.clear=function(){r=null,o=null,i=0},s}},"7fqt":function(t,e){!function(){t.exports=this.wp.wordcount}()},CNgt:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},s=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnP
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
/*!
autosize 4.0.4
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
license: MIT
http://www.jacklmoore.com/autosize
*/o=[t,e],void 0===(i="function"==typeof(r=function(t,e){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(t){return n.indexOf(t)>-1},get:function(t){return r[n.indexOf(t)]},set:function(t,e){-1===n.indexOf(t)&&(n.push(t),r.push(e))},delete:function(t){var e=n.indexOf(t);e>-1&&(n.splice(e,1),r.splice(e,1))}}),i=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){i=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function s(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!o.has(t)){var e,n=null,r=null,s=null,a=function(){t.clientWidth!==r&&d()},c=function(e){window.removeEventListener("resize",a,!1),t.removeEventListener("input",d,!1),t.removeEventListener("keyup",d,!1),t.removeEventListener("autosize:destroy",c,!1),t.removeEventListener("autosize:update",d,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),o.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",c,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),t.addEventListener("input",d,!1),t.addEventListener("autosize:update",d,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",o.set(t,{destroy:c,update:d}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,t.style.overflowY=e}function l(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",r=t.clientWidth,e.forEach((function(t){t.node.scrollTop=t.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){l();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(r<e?"hidden"===n.overflowY&&(u("scroll"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),s!==r){s=r;var o=i("autosize:resized");try{t.dispatchEvent(o)}catch(t){}}}}function a(t){var e=o.get(t);e&&e.destroy()}function c(t){var e=o.get(t);e&&e.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(t){return t}).destroy=function(t){return t},u.update=function(t){return t}):((u=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return s(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],a),t},u.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],c),t}),e.default=u,t.exports=e.default})?r.apply(e,o):r)||(t.exports=i)},HSyU:function(t,e){!function(){t.exports=this.wp.blocks}()},"HaE+":function(t,e,n){"use strict";function r(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var s=t.apply(e,n);function a(t){r(s,o,i,a,c,"next",t)}function c(t){r(s,o,i,a,c,"throw",t)}a(void 0)}))}}n.d(e,"a",(function(){return o}))},JX7q:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return r}))},Ji7U:function(t,e,n){"use strict";function r(t,e){return(r=Object.setProtot
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)){if(r.length){var s=o.apply(null,r);s&&t.push(s)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var a in r)n.call(r,a)&&r[a]&&t.push(a);else t.push(r.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},U8pU: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}))},UuzZ:function(t,e){!function(){t.exports=this.wp.autop}()},WbBG:function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},WsEz:function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};var o=[];function i(t,e){return t.optimist&&t.optimist.id===e}function s(t,e){if(!t||"object"!=typeof t||Array.isArray(t))throw new TypeError('Error while handling "'+e.type+'": Optimist requires that state is always a plain object.')}function a(t){if(t){var e=t.optimist;return{optimist:void 0===e?o:e,innerState:function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["optimist"])}}return{optimist:o,innerState:t}}t.exports=function(t){function e(e,n,o){return e.length&&(e=e.concat([{action:o}])),s(n=t(n,o),o),r({optimist:e},n)}return function(n,o){if(o.optimist)switch(o.optimist.type){case"BEGIN":return function(e,n){var o=a(e),i=o.optimist,c=o.innerState;return i=i.concat([{beforeState:c,action:n}]),s(c=t(c,n),n),r({optimist:i},c)}(n,o);case"COMMIT":return function(t,n){var r=a(t),o=r.optimist,s=r.innerState,c=[],u=!1,l=!1;return o.forEach((function(t){u?t.beforeState&&i(t.action,n.optimist.id)?(l=!0,c.push({action:t.action})):c.push(t):t.beforeState&&!i(t.action,n.optimist.id)?(u=!0,c.push(t)):t.beforeState&&i(t.action,n.optimist.id)&&(l=!0)})),l||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist'),e(o=c,s,n)}(n,o);case"REVERT":return function(n,r){var o=a(n),c=o.optimist,u=o.innerState,l=[],d=!1,p=!1,f=u;return c.forEach((function(e){e.beforeState&&i(e.action,r.optimist.id)&&(f=e.beforeState,p=!0),i(e.action,r.optimist.id)||(e.beforeState&&(d=!0),d&&(p&&e.beforeState?l.push({beforeState:f,action:e.action}):l.push(e)),p&&(f=t(f,e.action),s(u,r)))})),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist'),e(c=l,f,r)}(n,o)}var c=a(n),u=c.optimist,l=c.innerState;if(n&&!u.length){var d=t(l,o);return d===l?n:(s(d,o),r({optimist:u},d))}return e(u,l,o)}},t.exports.BEGIN="BEGIN",t.exports.COMMIT="COMMIT",t.exports.REVERT="REVERT"},YLtl:function(t,e){!function(){t.exports=this.lodash}()},YuTi:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},ZU7w:function(t,e){!function(){t.exports=this.wp.nux}()},axFQ:function(t,e){!function(){t.exports=this.wp.blockEditor}()},cDcd:function(t,e){!function(){t.exports=this.React}()},d2gM:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.dispatch;return function(t){return function(n){return Array.isArray(n)?n.filter(Boolean).map(e):t(n)}}}},eGrx:function(t,e){var n=t.exports=functio