1 line
30 KiB
JavaScript
1 line
30 KiB
JavaScript
|
|
(()=>{var e,t,o,r={2562:(e,t,o)=>{"use strict";o.r(t);var r=o(1609);const l=window.wp.blocks;var i=o(5573),n=o(851);const a=(0,r.createElement)((({className:e,...t})=>(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 23 6",className:(0,n.A)("woo-icon",e),...t,width:46,height:12},(0,r.createElement)("g",{id:"surface1"},(0,r.createElement)("path",{style:{stroke:"none",fillRule:"evenodd",fill:"rgb(52.941179%,24.313726%,100%)",fillOpacity:1},d:"M 9.695312 0.0234375 C 9.15625 0.0234375 8.808594 0.199219 8.492188 0.789062 L 7.066406 3.480469 L 7.066406 1.089844 C 7.066406 0.375 6.726562 0.0234375 6.101562 0.0234375 C 5.472656 0.0234375 5.210938 0.238281 4.898438 0.839844 L 3.546875 3.480469 L 3.546875 1.113281 C 3.546875 0.351562 3.230469 0.0234375 2.46875 0.0234375 L 0.914062 0.0234375 C 0.324219 0.0234375 0 0.300781 0 0.800781 C 0 1.300781 0.3125 1.601562 0.890625 1.601562 L 1.527344 1.601562 L 1.527344 4.621094 C 1.527344 5.472656 2.105469 5.976562 2.929688 5.976562 C 3.757812 5.976562 4.132812 5.648438 4.546875 4.886719 L 5.449219 3.195312 L 5.449219 4.621094 C 5.449219 5.460938 6 5.976562 6.839844 5.976562 C 7.679688 5.976562 7.992188 5.6875 8.46875 4.886719 L 10.546875 1.378906 C 11 0.613281 10.6875 0.0234375 9.683594 0.0234375 C 9.683594 0.0234375 9.683594 0.0234375 9.695312 0.0234375 Z M 9.695312 0.0234375"}),(0,r.createElement)("path",{style:{stroke:"none",fillRule:"evenodd",fill:"rgb(52.941179%,24.313726%,100%)",fillOpacity:1},d:"M 13.605469 0.0234375 C 11.902344 0.0234375 10.609375 1.289062 10.609375 3.007812 C 10.609375 4.722656 11.914062 5.976562 13.605469 5.976562 C 15.296875 5.976562 16.585938 4.710938 16.597656 3.007812 C 16.597656 1.289062 15.296875 0.0234375 13.605469 0.0234375 Z M 13.605469 4.144531 C 12.964844 4.144531 12.527344 3.671875 12.527344 3.007812 C 12.527344 2.34375 12.964844 1.855469 13.605469 1.855469 C 14.242188 1.855469 14.683594 2.34375 14.683594 3.007812 C 14.683594 3.671875 14.257812 4.144531 13.605469 4.144531 Z M 13.605469 4.144531"}),(0,r.createElement)("path",{style:{stroke:"none",fillRule:"evenodd",fill:"rgb(52.941179%,24.313726%,100%)",fillOpacity:1},d:"M 20.007812 0.0234375 C 18.316406 0.0234375 17.011719 1.289062 17.011719 3.007812 C 17.011719 4.722656 18.316406 5.976562 20.007812 5.976562 C 21.695312 5.976562 23 4.710938 23 3.007812 C 23 1.300781 21.695312 0.0234375 20.007812 0.0234375 Z M 20.007812 4.144531 C 19.355469 4.144531 18.941406 3.671875 18.941406 3.007812 C 18.941406 2.34375 19.367188 1.855469 20.007812 1.855469 C 20.644531 1.855469 21.082031 2.34375 21.082031 3.007812 C 21.082031 3.671875 20.65625 4.144531 20.007812 4.144531 Z M 20.007812 4.144531"})))),null);var s=o(7104),c=(o(4686),o(1792),o(2294)),m=o(6087),u=o(9491);const d=window.wp.hooks,p=(0,u.createHigherOrderComponent)((e=>{class t extends m.Component{constructor(...e){super(...e),(0,c.A)(this,"mounted",!1)}componentDidMount(){const{block:e,setAttributes:t}=this.props;e.name.startsWith("woocommerce/")&&t(this.getAttributesWithDefaults())}componentDidUpdate(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}getAttributesWithDefaults(){const e=(0,l.getBlockType)(this.props.block.name);let t=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==e.attributes&&void 0!==e.defaults&&(t=Object.assign({},this.props.attributes||{}),Object.keys(e.attributes).map((o=>(void 0===t[o]&&void 0!==e.defaults[o]&&(t[o]=e.defaults[o]),o)))),t}render(){return(0,r.createElement)(e,{...this.props,attributes:this.getAttributesWithDefaults()})}}return t}),"withDefaultAttributes");(0,d.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",p),(0,d.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",((e,t)=>(t.name.startsWith("woocommerce/")&&Object.keys(t.attributes).map((o=>(void 0===e[o]&&void 0!==t.defaults&&void 0!==t.defaults[o]&&(e[o]=t.defaults[o]),o))),e))),o(9345);const g=window.wp.domReady;var h=o.n(g);class w{register(e,t){return Boolean((0,l.registerBlockType)(e,t))}unregi
|