WordPress/wp-includes/js/dist/block-library.min.js

14 lines
599 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.blockLibrary=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="K51g")}({"+WrK":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));t.a=a},"//kF":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=a},"1CF3":function(e,t){e.exports=window.wp.dom},"1Yn1":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));t.a=a},"1ZqX":function(e,t){e.exports=window.wp.data},"1iEr":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=a},"2gm7":function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=a},"4eJC":function(e,t,n){e.exports=function(e,t){var n,r,o=0;function a(){var a,l,c=n,i=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(l=0;l<i;l++)if(c.args[l]!==arguments[l]){c=c.next;continue e}return c!==n&&(c===r&&(r=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=n,c.prev=null,n.prev=c,n=c),c.val}c=c.next}for(a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return c={args:a,val:e.apply(null,a)},n?(n.prev=c,c.next=n):r=c,o===t.maxSize?(r=r.prev).next=null:o++,n=c,c.val}return t=t||{},a.clear=function(){n=null,r=null,o=0},a}},"A/WM":function(e,t,n){var r;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var n=t.split(r),o=n.length,a=0;a<o;++a)e[n[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){if(t.toString===Object.prototype.toString)for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=new e;t(a,r);var l=[];for(var c in a)a[c]&&l.push(c);return l.join(" ")}}();e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},B9Az:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");var a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=a},Bpkj:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=a},Civd:function(e,t,n){"use strict";var r=n("GRId"),o=n("Tqx9");const a=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=a},FEKF:function(e,t,n){
/*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */
e.exports=function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var l,c=e[Symbol.iterator]();!(r=(l=c.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}return function(){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n)}var r,o,a;return r=n,(o=[{key:"getColorAsync",value:function(e,t,n){e.complete?t.call(e,this.getColor(e,n),n&&n.data):this._bindImageEvents(e,t,n)}},{key:"getColor",value:function(e,t){t=t||{};var n=this._getDefaultColor(t),r=this._getOriginalSize(e),o=this._prepareSizeAndPosition(r,t),a=null,l=n;if(!(o.srcWidth&&o.srcHeight&&o.destWidth&&o.destHeight))return this._prepareResult(n,new Error("FastAverageColor: Incorrect sizes."));if(!this._ctx&&(this._canvas=this._makeCanvas(),this._ctx=this._canvas.getContext&&this._canvas.getContext("2d"),!this._ctx))return this._prepareResult(n,new Error("FastAverageColor: Canvas Context 2D is not supported in this browser."));this._canvas.width=o.destWidth,this._canvas.height=o.destHeight;try{this._ctx.clearRect(0,0,o.destWidth,o.destHeight),this._ctx.drawImage(e,o.srcLeft,o.srcTop,o.srcWidth,o.srcHeight,0,0,o.destWidth,o.destHeight);var c=this._ctx.getImageData(0,0,o.destWidth,o.destHeight).data;l=this.getColorFromArray4(c,t)}catch(e){a=e}return this._prepareResult(l,a)}},{key:"getColorFromArray4",value:function(e,t){t=t||{};var n=e.length;if(n<4)return this._getDefaultColor(t);var r=n-n%4,o=4*(t.step||1),a="_"+(t.algorithm||"sqrt")+"Algorithm";if("function"!=typeof this[a])throw new Error("FastAverageColor: ".concat(t.algorithm," is unknown algorithm."));return this[a](e,r,o)}},{key:"destroy",value:function(){delete this._canvas,delete this._ctx}},{key:"_getDefaultColor",value:function(e){return this._getOption(e,"defaultColor",[255,255,255,255])}},{key:"_getOption",value:function(e,t,n){return void 0===e[t]?n:e[t]}},{key:"_prepareSizeAndPosition",value:function(e,t){var n,r=this._getOption(t,"left",0),o=this._getOption(t,"top",0),a=this._getOption(t,"width",e.width),l=this._getOption(t,"height",e.height),c=a,i=l;return"precision"===t.mode||(a>l?(n=a/l,c=100,i=Math.round(c/n)):(n=l/a,i=100,c=Math.round(i/n)),(c>a||i>l||c<10||i<10)&&(c=a,i=l)),{srcLeft:r,srcTop:o,srcWidth:a,srcHeight:l,destWidth:c,destHeight:i}}},{key:"_simpleAlgorithm",value:function(e,t,n){for(var r=0,o=0,a=0,l=0,c=0,i=0;i<t;i+=n){var s=e[i+3];r+=e[i]*s,o+=e[i+1]*s,a+=e[i+2]*s,l+=s,c++}return l?[Math.round(r/l),Math.round(o/l),Math.round(a/l),Math.round(l/c)]:[0,0,0,0]}},{key:"_sqrtAlgorithm",value:function(e,t,n){for(var r=0,o=0,a=0,l=0,c=0,i=0;i<t;i+=n){var s=e[i],u=e[i+1],m=e[i+2],d=e[i+3];r+=s*s*d,o+=u*u*d,a+=m*m*d,l+=d,c++}return l?[Math.round(Math.sqrt(r/l)),Math.round(Math.sqrt(o/l)),Math.round(Math.sqrt(a/l)),Math.round(l/c)]:[0,0,0,0]}},{key:"_dominantAlgorithm",value:function(e,n,r){for(var o={},a=0;a<n;a+=r){var l=e[a],c=e[a+1],i=e[a+2],s=e[a+3],u=Math.round(l/24)+","+Math.round(c/24)+","+Math.round(i/24);o[u]?o[u]=[o[u][0]+l*s,o[u][1]+c*s,o[u][2]+i*s,o[u][3]+s,o[u][4]+1]:o[u]=[l*s,c*s,i*s,s,1]}var m=t(Object.keys(o).map((function(e){return o[e]})).sort((function(e,t){var n=e[4],r=t[4];return n>r?-1:n===r?0:1}))[0],5),d=m[0],b=m[1],p=m[2],g=m[3],h=m[4];return g?[Math.round(d/g),Math.round(b/g),Math.round(p/g),Math.round(g/h)]:[0,0,0,0]}},{key:"_bindImageEvents",value:function(e,t,n){var r=this,o=(n=n||{})&&n.data,a=this._getDefaultColor(n),l=function(){s(),t.call(e,r.getColor(e,n),o)},c=function(){s(),t.call(e,r._prepareResult(a,new Error("Image error")),o)},i=function(){s(),t.call(e,r._prepareResult(a,new Error("Image abort")),o)},s=function(){e.removeEventListener("load",l),e.remo
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
Update @wordpress packages for Beta 4 Update packages with these bug fixes from Gutenberg: Navigation: Remove hardcoded typography units Handle parsed request Navigation: Refactor modal padding to be simpler and more flexible Show notice on save in site editor Add aria-pressed true/false to Toggle navigation button based on state Components FontSizePicker: Use incremental sequence of numbers Custom keys from theme.json: fix kebabCase conversion Template Part: Fix 'isMissing' condition check Multi-Entity Saving: Decode HTML entities in item titles Font sizes: update default values Query Loop: Add useBlockPreview, fix Query Loop wide alignment Only add dialog role to navigation when modal is open Fix navigation appender Show a UI warning when user does not have permission to update/edit a Navigation block Block editor: Fix Enter handling for nested blocks Update: Use subtitle styles for the palette names Allow publishing a post while not saving changes to non-post entities Update: Block top level useSetting paths Fix Site Logo block alignment issues Editor: when Toggle navigation receives state false, focus ToolsPanel: Allow items to register when panelId is null Block Support Panels - Make block support tools panels compatible Gallery: Fix block registration hook priority Navigation: Fix page list issues in overlay Ensure the overlay menu works when inserting navigation block pattern Restrict Navigation permissions and show UI warning if cannot create Add block gap support for group blocks Try cascading nav styles through classnames Fix: Impossible to edit theme and default colors Fix: Color editor discards colors with default name Site Editor: Fix template author avatar check Template Editing Mode: Fix options dropdown Avoid undo issues when reset parent blocks for controlled blocks Add comment-form and comment-list to html5 theme support and fix comment layout Props hellofromtonya. See #54487. Built from https://develop.svn.wordpress.org/trunk@52402 git-svn-id: http://core.svn.wordpress.org/trunk@51994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 08:02:34 +01:00
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var l=o.apply(null,r);l&&e.push(l)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var c in r)n.call(r,c)&&r[c]&&e.push(c);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},Tqx9:function(e,t){e.exports=window.wp.primitives},TvNi:function(e,t){e.exports=window.wp.plugins},U60i:function(e,t,n){"use strict";n.d(t,"b",(function(){return $})),n.d(t,"c",(function(){return D})),n.d(t,"d",(function(){return Z})),n.d(t,"e",(function(){return J})),n.d(t,"h",(function(){return U})),n.d(t,"f",(function(){return Y})),n.d(t,"g",(function(){return ee})),n.d(t,"a",(function(){return H})),n.d(t,"i",(function(){return I}));var r={};n.r(r),n.d(r,"enableComplementaryArea",(function(){return k})),n.d(r,"disableComplementaryArea",(function(){return w})),n.d(r,"pinItem",(function(){return C})),n.d(r,"unpinItem",(function(){return x})),n.d(r,"toggleFeature",(function(){return S})),n.d(r,"setFeatureValue",(function(){return B})),n.d(r,"setFeatureDefaults",(function(){return T}));var o={};n.r(o),n.d(o,"getActiveComplementaryArea",(function(){return N})),n.d(o,"isItemPinned",(function(){return P})),n.d(o,"isFeatureActive",(function(){return z}));var a=n("wx14"),l=n("GRId"),c=n("TSYQ"),i=n.n(c),s=n("tI+e"),u=n("1ZqX"),m=n("l3Sj"),d=n("RMJe"),b=n("URob"),p=n("Xxwi"),g=n("KEfo"),h=n("bWcr"),v=n("YLtl");const O=Object(u.combineReducers)({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_DEFAULTS"===t.type){const{scope:n,defaults:r}=t;return{...e,[n]:{...e[n],...r}}}return e}}),j=Object(u.combineReducers)({features(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("SET_FEATURE_VALUE"===t.type){const{scope:n,featureName:r,value:o}=t;return{...e,[n]:{...e[n],[r]:o}}}return e}}),y=Object(u.combineReducers)({singleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:r,item:o}=arguments.length>1?arguments[1]:void 0;return"SET_SINGLE_ENABLE_ITEM"===t&&n&&r?{...e,[n]:{...e[n],[r]:o||null}}:e},multipleEnableItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,itemType:n,scope:r,item:o,isEnable:a}=arguments.length>1?arguments[1]:void 0;if("SET_MULTIPLE_ENABLE_ITEM"!==t||!n||!r||!o||Object(v.get)(e,[n,r,o])===a)return e;const l=e[n]||{},c=l[r]||{};return{...e,[n]:{...l,[r]:{...c,[o]:a||!1}}}}});var f=Object(u.combineReducers)({enableItems:y,preferenceDefaults:O,preferences:j});function _(e,t,n){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:n}}function k(e,t){return _("complementaryArea",e,t)}function w(e){return _("complementaryArea",e,void 0)}function E(e,t,n,r){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:r}}function C(e,t){return E("pinnedItems",e,t,!0)}function x(e,t){return E("pinnedItems",e,t,!1)}function S(e,t){return function(n){let{select:r,dispatch:o}=n;const a=r.isFeatureActive(e,t);o.setFeatureValue(e,t,!a)}}function B(e,t,n){return{type:"SET_FEATURE_VALUE",scope:e,featureName:t,value:!!n}}function T(e,t){return{type:"SET_FEATURE_DEFAULTS",scope:e,defaults:t}}function N(e,t){return function(e,t,n){return Object(v.get)(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function P(e,t,n){return!1!==function(e,t,n,r){return Object(v.get)(e.enableItems.multipleEnableItems,[t,n,r])}(e,"pinnedItems",t,n)}function z(e,t,n){var r,o;const a=null===(r=e.preferences.features[t])||void 0===r?void 0:r[n];return!!(void 0!==a?a:null===(o=e.preferenceDefaults.features[t])||void 0===o?void 0:o[n])}const I=Object(u.createReduxStore)("core/interface",{reducer:f,actions:r,selectors:o,persist:["enableItems","preferences"],__experimentalUseThunks: