PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
build
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-by-attribute"]=function(t){function e(e){for(var n,u,i=e[0],a=e[1],s=e[2],b=0,p=[];b<i.length;b++)u=i[b],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&p.push(o[u][0]),o[u]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n]);for(l&&l(e);p.length;)p.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var t,e=0;e<c.length;e++){for(var r=c[e],n=!0,i=1;i<r.length;i++){var a=r[i];0!==o[a]&&(n=!1)}n&&(c.splice(e--,1),t=u(u.s=r[0]))}return t}var n={},o={35:0},c=[];function u(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,u),r.l=!0,r.exports}u.m=t,u.c=n,u.d=function(t,e,r){u.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},u.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(u.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)u.d(r,n,function(e){return t[e]}.bind(null,n));return r},u.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(e,"a",e),e},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=i.push.bind(i);i.push=e,i=i.slice();for(var s=0;s<i.length;s++)e(i[s]);var l=a;return c.push([697,0]),r()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},104:function(t,e){},105:function(t,e){!function(){t.exports=this.wp.coreData}()},109:function(t,e,r){"use strict";var n=r(0),o=r(1),c=r(3);r(2);e.a=function(t){var e=t.value,r=t.setAttributes;return Object(n.createElement)(c.SelectControl,{label:Object(o.__)("Order products by",'woocommerce'),value:e,options:[{label:Object(o.__)("Newness - newest first",'woocommerce'),value:"date"},{label:Object(o.__)("Price - low to high",'woocommerce'),value:"price_asc"},{label:Object(o.__)("Price - high to low",'woocommerce'),value:"price_desc"},{label:Object(o.__)("Rating - highest first",'woocommerce'),value:"rating"},{label:Object(o.__)("Sales - most first",'woocommerce'),value:"popularity"},{label:Object(o.__)("Title - alphabetical",'woocommerce'),value:"title"},{label:Object(o.__)("Menu Order",'woocommerce'),value:"menu_order"}],onChange:function(t){return r({orderby:t})}})}},11:function(t,e){!function(){t.exports=this.regeneratorRuntime}()},110:function(t,e,r){"use strict";var n=r(10),o=r.n(n),c=r(20),u=r.n(c),i=r(0),a=r(45),s=r(3),l=r(7),b=r.n(l),p=["className","item","isSelected","isLoading","onSelect","disabled"];e.a=function(t){var e=t.className,r=t.item,n=t.isSelected,c=t.isLoading,l=t.onSelect,d=t.disabled,f=u()(t,p);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(a.c,o()({},f,{key:r.id,className:e,isSelected:n,item:r,onSelect:l,isSingle:!0,disabled:d})),n&&c&&Object(i.createElement)("div",{key:"loading",className:b()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(i.createElement)(s.Spinner,null)))}},14:function(t,e,r){"use strict";r.d(e,"m",(function(){return c})),r.d(e,"k",(function(){return u})),r.d(e,"l",(function(){return i})),r.d(e,"h",(function(){return s})),r.d(e,"c",(function(){return l})),r.d(e,"d",(function(){return b})),r.d(e,"g",(function(){return p})),r.d(e,"f",(function(){return d})),r.d(e,"j",(function(){return f})),r.d(e,"i",(function(){return g})),r.d(e,"a",(function(){return O})),r.d(e,"b",(function(){return m})),r.d(e,"e",(function(){return h})),r.d(e,"p",(function(){return w})),r.d(e,"q",(function(){return v})),r.d(e,"n",(function(){return y})),r.d(e,"o",(function(){return _}));var n,o=r(5),c=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,restApiRoutes:{},wordCountType:"words"}),u=c.pluginUrl+"assets/",i=c.pluginUrl+"build/",a=c.buildPhase,s=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=o.STORE_PAGES.checkout.id,b=o.STORE_PAGES.checkout.permalink,p=o.STORE_PAGES.privacy.permalink,d=o.STORE_PAGES.privacy.title,f=o.STORE_PAGES.terms.permalink,g=o.STORE_PAGES.terms.title,O=o.STORE_PAGES.cart.id,m=o.STORE_PAGES.cart.permalink,h=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),j=r(25),w=function(t,e){if(a>2)return Object(j.registerBlockType)(t,e)},v=function(t,e){if(a>1)return Object(j.registerBlockType)(t,e)},y=function(){return a>2},_=function(){return a>1}},161:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(0),o=r(14),c=Object(n.createElement)("img",{src:o.k+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},19:function(t,e){!function(){t.exports=this.wp.apiFetch}()},21:function(t,e){!function(){t.exports=this.wp.url}()},22:function(t,e){!function(){t.exports=this.wp.compose}()},23:function(t,e){!function(){t.exports=this.wp.data}()},24:function(t,e){!function(){t.exports=this.wp.blockEditor}()},25:function(t,e){!function(){t.exports=this.wp.blocks}()},28:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},29:function(t,e){!function(){t.exports=this.moment}()},3:function(t,e){!function(){t.exports=this.wp.components}()},32:function(t,e){!function(){t.exports=this.wp.primitives}()},33:function(t,e){!function(){t.exports=this.wp.dataControls}()},38:function(t,e,r){"use strict";r.d(e,"h",(function(){return d})),r.d(e,"e",(function(){return f})),r.d(e,"b",(function(){return g})),r.d(e,"i",(function(){return O})),r.d(e,"f",(function(){return m})),r.d(e,"c",(function(){return h})),r.d(e,"d",(function(){return j})),r.d(e,"g",(function(){return w})),r.d(e,"a",(function(){return v}));var n=r(4),o=r.n(n),c=r(21),u=r(19),i=r.n(u),a=r(6),s=r(5),l=r(14);function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var d=function(t){var e=t.selected,r=void 0===e?[]:e,n=t.search,o=void 0===n?"":n,u=t.queryArgs,s=function(t){var e=t.selected,r=void 0===e?[]:e,n=t.search,o=void 0===n?"":n,u=t.queryArgs,i=void 0===u?[]:u,a=l.m.productCount>100,s={per_page:a?100:0,catalog_visibility:"any",search:o,orderby:"title",order:"asc"},b=[Object(c.addQueryArgs)("/wc/store/products",p(p({},s),i))];return a&&r.length&&b.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),b}({selected:r,search:o,queryArgs:void 0===u?[]:u});return Promise.all(s.map((function(t){return i()({path:t})}))).then((function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id").map((function(t){return p(p({},t),{},{parent:0})}))})).catch((function(t){throw t}))},f=function(t){return i()({path:"/wc/store/products/".concat(t)})},g=function(){return i()({path:"wc/store/products/attributes"})},O=function(t){return i()({path:"wc/store/products/attributes/".concat(t,"/terms")})},m=function(t){var e=t.selected,r=function(t){var e=t.selected,r=void 0===e?[]:e,n=t.search,o=Object(s.getSetting)("limitTags",!1),u=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:n})];return o&&r.length&&u.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:r})),u}({selected:void 0===e?[]:e,search:t.search});return Promise.all(r.map((function(t){return i()({path:t})}))).then((function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")}))},h=function(t){return i()({path:Object(c.addQueryArgs)("wc/store/products/categories",p({per_page:0},t))})},j=function(t){return i()({path:"wc/store/products/categories/".concat(t)})},w=function(t){return i()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:t})})},v=function(t,e){if(!t.title.raw)return t.slug;var r=1===e.filter((function(e){return e.title.raw===t.title.raw})).length;return t.title.raw+(r?"":" - ".concat(t.slug))}},40:function(t,e,r){"use strict";r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return s}));var n=r(30),o=r.n(n),c=r(11),u=r.n(c),i=r(1),a=function(){var t=o()(u.a.mark((function t(e){var r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!=typeof e.json){t.next=11;break}return t.prev=1,t.next=4,e.json();case 4:return r=t.sent,t.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return t.prev=8,t.t0=t.catch(1),t.abrupt("return",{message:t.t0.message,type:"general"});case 11:return t.abrupt("return",{message:e.message,type:e.type||"general"});case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}(),s=function(t){if(t.data&&"rest_invalid_param"===t.code){var e=Object.values(t.data.params);if(e[0])return e[0]}return(null==t?void 0:t.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.",'woocommerce')}},46:function(t,e){!function(){t.exports=this.wp.escapeHtml}()},47:function(t,e,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(46));e.a=function(t){var e,r,u,i=t.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(e=i).message,u=e.type,r?"general"===u?Object(n.createElement)("span",null,Object(o.__)("The following error was returned",'woocommerce'),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):"api"===u?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API",'woocommerce'),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):r:Object(o.__)("An unknown error occurred which prevented the block from being updated.",'woocommerce')))}},49:function(t,e){!function(){t.exports=this.wp.keycodes}()},5:function(t,e){!function(){t.exports=this.wc.wcSettings}()},52:function(t,e){!function(){t.exports=this.wp.hooks}()},59:function(t,e,r){"use strict";var n=r(4),o=r.n(n),c=r(20),u=r.n(c),i=r(0),a=["srcElement","size"];function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}e.a=function(t){var e=t.srcElement,r=t.size,n=void 0===r?24:r,c=u()(t,a);return Object(i.isValidElement)(e)?Object(i.cloneElement)(e,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({width:n,height:n},c)):null}},6:function(t,e){!function(){t.exports=this.lodash}()},62:function(t,e){!function(){t.exports=this.wp.deprecated}()},69:function(t,e){!function(){t.exports=this.wp.serverSideRender}()},697:function(t,e,r){t.exports=r(779)},698:function(t,e){},699:function(t,e){},73:function(t,e){!function(){t.exports=this.wp.dom}()},74:function(t,e){!function(){t.exports=this.ReactDOM}()},779:function(t,e,r){"use strict";r.r(e);var n=r(0),o=r(1),c=r(59),u=r(32),i=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M2.53 19.65l1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zm-9.2 3.8L7.87 7.79l7.35-3.04h.01l4.95 11.95-7.35 3.05z"}),Object(n.createElement)("circle",{cx:"11",cy:"9",r:"1"}),Object(n.createElement)("path",{d:"M5.88 19.75c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"})),a=r(25),s=r(5),l=(r(698),r(15)),b=r.n(l),p=r(16),d=r.n(p),f=r(17),g=r.n(f),O=r(18),m=r.n(O),h=r(9),j=r.n(h),w=r(24),v=r(69),y=r.n(v),_=r(3),k=(r(2),r(82)),E=r(83),P=r(31),S=r.n(P),x=r(10),C=r.n(x),A=r(45),T=r(22),R=r(30),B=r.n(R),D=r(4),L=r.n(D),N=r(13),M=r.n(N),G=r(11),I=r.n(G),$=r(38),z=r(40);function F(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function V(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?F(Object(r),!0).forEach((function(e){L()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var q=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return Array.isArray(e)?e.find((function(e){return e[r]===t})):null},Q=function(t){return function(e){var r=e.selected,o=void 0===r?[]:r,c=o.length?o[0].attr_slug:null,u=Object(n.useState)(null),i=M()(u,2),a=i[0],s=i[1],l=Object(n.useState)(0),b=M()(l,2),p=b[0],d=b[1],f=Object(n.useState)({}),g=M()(f,2),O=g[0],m=g[1],h=Object(n.useState)(!0),j=M()(h,2),w=j[0],v=j[1],y=Object(n.useState)(!1),_=M()(y,2),k=_[0],E=_[1],P=Object(n.useState)(null),S=M()(P,2),x=S[0],A=S[1];return Object(n.useEffect)((function(){null===a&&Object($.b)().then((function(t){if(t=t.map((function(t){return V(V({},t),{},{parent:0})})),s(t),c){var e=q(c,t,"taxonomy");e&&d(e.id)}})).catch(function(){var t=B()(I.a.mark((function t(e){return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=A,t.next=3,Object(z.a)(e);case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).finally((function(){v(!1)}))}),[a,c]),Object(n.useEffect)((function(){var t=q(p,a);t&&(E(!0),Object($.i)(p).then((function(e){e=e.map((function(e){return V(V({},e),{},{parent:p,attr_slug:t.taxonomy})})),m((function(t){return V(V({},t),{},L()({},p,e))}))})).catch(function(){var t=B()(I.a.mark((function t(e){return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=A,t.next=3,Object(z.a)(e);case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).finally((function(){E(!1)})))}),[p,a]),Object(n.createElement)(t,C()({},e,{attributes:a||[],error:x,expandedAttribute:p,onExpandAttribute:d,isLoading:w,termsAreLoading:k,termsList:O}))}},H=r(47),U=r(7),W=r.n(U),J=r(110),Y=(r(699),function(t){var e=t.attributes,r=t.error,c=t.expandedAttribute,u=t.onChange,i=t.onExpandAttribute,a=t.onOperatorChange,s=t.instanceId,l=t.isCompact,b=t.isLoading,p=t.operator,d=t.selected,f=t.termsAreLoading,g=t.termsList[c]||[],O=[].concat(S()(e),S()(g)),m={clear:Object(o.__)("Clear all product attributes",'woocommerce'),list:Object(o.__)("Product Attributes",'woocommerce'),noItems:Object(o.__)("Your store doesn't have any product attributes.",'woocommerce'),search:Object(o.__)("Search for product attributes",'woocommerce'),selected:function(t){return Object(o.sprintf)(Object(o._n)("%d attribute selected","%d attributes selected",t,'woocommerce'),t)},updated:Object(o.__)("Product attribute search results updated.",'woocommerce')};return r?Object(n.createElement)(H.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(A.b,{className:"woocommerce-product-attributes",list:O,isLoading:b,selected:d.map((function(t){var e=t.id;return O.find((function(t){return t.id===e}))})).filter(Boolean),onChange:u,renderItem:function(t){var e=t.item,r=t.search,a=t.depth,l=void 0===a?0:a,b=["woocommerce-product-attributes__item","woocommerce-search-list__item",{"is-searching":r.length>0,"is-skip-level":0===l&&0!==e.parent}];if(!e.breadcrumbs.length){var p=c===e.id;return Object(n.createElement)(J.a,C()({},t,{className:W.a.apply(void 0,b.concat([{"is-selected":p}])),isSelected:p,item:e,isLoading:f,disabled:"0"===e.count,onSelect:function(t){var e=t.id;return function(){u([]),i(e)}},name:"attributes-".concat(s),countLabel:Object(o.sprintf)(Object(o._n)("%d term","%d terms",e.count,'woocommerce'),e.count),"aria-label":Object(o.sprintf)(Object(o._n)("%1$s, has %2$d term","%1$s, has %2$d terms",e.count,'woocommerce'),e.name,e.count)}))}var d="".concat(e.breadcrumbs[0],": ").concat(e.name);return Object(n.createElement)(A.c,C()({},t,{name:"terms-".concat(s),className:W.a.apply(void 0,b.concat(["has-count"])),countLabel:Object(o.sprintf)(Object(o._n)("%d product","%d products",e.count,'woocommerce'),e.count),"aria-label":Object(o.sprintf)(Object(o._n)("%1$s, has %2$d product","%1$s, has %2$d products",e.count,'woocommerce'),d,e.count)}))},messages:m,isCompact:l,isHierarchical:!0}),!!a&&Object(n.createElement)("div",{className:d.length<2?"screen-reader-text":""},Object(n.createElement)(_.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(o.__)("Display products matching",'woocommerce'),help:Object(o.__)("Pick at least two attributes to use this setting.",'woocommerce'),value:p,onChange:a,options:[{label:Object(o.__)("Any selected attributes",'woocommerce'),value:"any"},{label:Object(o.__)("All selected attributes",'woocommerce'),value:"all"}]})))});Y.defaultProps={isCompact:!1,operator:"any"};var K=Q(Object(T.withInstanceId)(Y)),X=r(109),Z=r(161);function tt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=j()(t);if(e){var o=j()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m()(this,r)}}var et=function(t){g()(r,t);var e=tt(r);function r(){return b()(this,r),e.apply(this,arguments)}return d()(r,[{key:"getInspectorControls",value:function(){var t=this.props.setAttributes,e=this.props.attributes,r=e.attributes,c=e.attrOperator,u=e.columns,i=e.contentVisibility,a=e.orderby,l=e.rows,b=e.alignButtons;return Object(n.createElement)(w.InspectorControls,{key:"inspector"},Object(n.createElement)(_.PanelBody,{title:Object(o.__)("Layout",'woocommerce'),initialOpen:!0},Object(n.createElement)(E.a,{columns:u,rows:l,alignButtons:b,setAttributes:t,minColumns:Object(s.getSetting)("min_columns",1),maxColumns:Object(s.getSetting)("max_columns",6),minRows:Object(s.getSetting)("min_rows",1),maxRows:Object(s.getSetting)("max_rows",6)})),Object(n.createElement)(_.PanelBody,{title:Object(o.__)("Content",'woocommerce'),initialOpen:!0},Object(n.createElement)(k.a,{settings:i,onChange:function(e){return t({contentVisibility:e})}})),Object(n.createElement)(_.PanelBody,{title:Object(o.__)("Filter by Product Attribute",'woocommerce'),initialOpen:!1},Object(n.createElement)(K,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=e.map((function(t){return{id:t.id,attr_slug:t.attr_slug}}));t({attributes:r})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})},isCompact:!0})),Object(n.createElement)(_.PanelBody,{title:Object(o.__)("Order By",'woocommerce'),initialOpen:!1},Object(n.createElement)(X.a,{setAttributes:t,value:a})))}},{key:"renderEditMode",value:function(){var t=this.props,e=t.debouncedSpeak,r=t.setAttributes,u=this.props.attributes;return Object(n.createElement)(_.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:i}),label:Object(o.__)("Products by Attribute",'woocommerce'),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(o.__)("Display a grid of products from your selected attributes.",'woocommerce'),Object(n.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(n.createElement)(K,{selected:u.attributes,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map((function(t){return{id:t.id,attr_slug:t.attr_slug}}));r({attributes:e})},operator:u.attrOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({attrOperator:t})}}),Object(n.createElement)(_.Button,{isPrimary:!0,onClick:function(){r({editMode:!1}),e(Object(o.__)("Showing Products by Attribute block preview.",'woocommerce'))}},Object(o.__)("Done",'woocommerce'))))}},{key:"render",value:function(){var t=this.props,e=t.attributes,r=t.name,c=t.setAttributes,u=e.editMode;return e.isPreview?Z.a:Object(n.createElement)(n.Fragment,null,Object(n.createElement)(w.BlockControls,null,Object(n.createElement)(_.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit"),onClick:function(){return c({editMode:!u})},isActive:u}]})),this.getInspectorControls(),u?this.renderEditMode():Object(n.createElement)(_.Disabled,null,Object(n.createElement)(y.a,{block:r,attributes:e})))}}]),r}(n.Component),rt=Object(_.withSpokenMessages)(et);Object(a.registerBlockType)("woocommerce/products-by-attribute",{title:Object(o.__)("Products by Attribute",'woocommerce'),icon:{src:Object(n.createElement)(c.a,{srcElement:i}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce",'woocommerce')],description:Object(o.__)("Display a grid of products with selected attributes.",'woocommerce'),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:Object(s.getSetting)("default_columns",3)},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:Object(s.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:function(t){return Object(n.createElement)(rt,t)},save:function(){return null}})},78:function(t,e){!function(){t.exports=this.wp.viewport}()},8:function(t,e){!function(){t.exports=this.React}()},82:function(t,e,r){"use strict";var n=r(4),o=r.n(n),c=r(0),u=r(1),i=(r(2),r(3));function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){o()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.a=function(t){var e=t.onChange,r=t.settings,n=r.button,o=r.price,a=r.rating,l=r.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.ToggleControl,{label:Object(u.__)("Product title",'woocommerce'),help:l?Object(u.__)("Product title is visible.",'woocommerce'):Object(u.__)("Product title is hidden.",'woocommerce'),checked:l,onChange:function(){return e(s(s({},r),{},{title:!l}))}}),Object(c.createElement)(i.ToggleControl,{label:Object(u.__)("Product price",'woocommerce'),help:o?Object(u.__)("Product price is visible.",'woocommerce'):Object(u.__)("Product price is hidden.",'woocommerce'),checked:o,onChange:function(){return e(s(s({},r),{},{price:!o}))}}),Object(c.createElement)(i.ToggleControl,{label:Object(u.__)("Product rating",'woocommerce'),help:a?Object(u.__)("Product rating is visible.",'woocommerce'):Object(u.__)("Product rating is hidden.",'woocommerce'),checked:a,onChange:function(){return e(s(s({},r),{},{rating:!a}))}}),Object(c.createElement)(i.ToggleControl,{label:Object(u.__)("Add to Cart button",'woocommerce'),help:n?Object(u.__)("Add to Cart button is visible.",'woocommerce'):Object(u.__)("Add to Cart button is hidden.",'woocommerce'),checked:n,onChange:function(){return e(s(s({},r),{},{button:!n}))}}))}},83:function(t,e,r){"use strict";var n=r(0),o=r(1),c=r(6),u=(r(2),r(3));e.a=function(t){var e=t.columns,r=t.rows,i=t.setAttributes,a=t.alignButtons,s=t.minColumns,l=void 0===s?1:s,b=t.maxColumns,p=void 0===b?6:b,d=t.minRows,f=void 0===d?1:d,g=t.maxRows,O=void 0===g?6:g;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.RangeControl,{label:Object(o.__)("Columns",'woocommerce'),value:e,onChange:function(t){var e=Object(c.clamp)(t,l,p);i({columns:Number.isNaN(e)?"":e})},min:l,max:p}),Object(n.createElement)(u.RangeControl,{label:Object(o.__)("Rows",'woocommerce'),value:r,onChange:function(t){var e=Object(c.clamp)(t,f,O);i({rows:Number.isNaN(e)?"":e})},min:f,max:O}),Object(n.createElement)(u.ToggleControl,{label:Object(o.__)("Align Last Block",'woocommerce'),help:a?Object(o.__)("The last inner block will be aligned vertically.",'woocommerce'):Object(o.__)("The last inner block will follow other content.",'woocommerce'),checked:a,onChange:function(){return i({alignButtons:!a})}}))}},85:function(t,e){!function(){t.exports=this.wp.date}()}});
[-] checkout.js
[edit]
[-] product-on-sale.js
[edit]
[-] style-rtl.css
[edit]
[-] single-product-frontend.asset.php
[edit]
[-] all-products.asset.php
[edit]
[-] vendors-style.css
[edit]
[-] wc-payment-method-cod.asset.php
[edit]
[-] product-categories.asset.php
[edit]
[+]
atomic-block-components
[-] wc-blocks-google-analytics.js
[edit]
[-] active-filters.js
[edit]
[-] product-new.asset.php
[edit]
[-] wc-shared-hocs.js
[edit]
[-] wc-payment-method-paypal.js
[edit]
[-] reviews-by-product.asset.php
[edit]
[-] wc-payment-method-bacs.js
[edit]
[+]
..
[-] active-filters.asset.php
[edit]
[-] product-on-sale.asset.php
[edit]
[-] active-filters-frontend.asset.php
[edit]
[-] featured-category.js
[edit]
[-] products-by-attribute.asset.php
[edit]
[-] cart.asset.php
[edit]
[-] wc-blocks-registry.js
[edit]
[-] wc-settings.js
[edit]
[-] all-products.js
[edit]
[-] price-format.js
[edit]
[-] checkout-frontend.js
[edit]
[-] blocks-checkout.asset.php
[edit]
[+]
vendors--atomic-block-components
[-] featured-product.js
[edit]
[-] price-filter.js
[edit]
[-] product-search.asset.php
[edit]
[-] wc-payment-method-cheque.js
[edit]
[-] product-category.js
[edit]
[-] products-by-attribute.js
[edit]
[-] attribute-filter-frontend.asset.php
[edit]
[-] editor-rtl.css
[edit]
[-] checkout-frontend.asset.php
[edit]
[-] reviews-by-category.js
[edit]
[-] attribute-filter.asset.php
[edit]
[-] wc-blocks-registry.asset.php
[edit]
[-] price-filter-frontend.asset.php
[edit]
[-] wc-shared-context.asset.php
[edit]
[-] wc-payment-method-cheque.asset.php
[edit]
[-] blocks-checkout-editor.asset.php
[edit]
[-] handpicked-products.asset.php
[edit]
[-] wc-payment-method-stripe.asset.php
[edit]
[-] attribute-filter-frontend.js
[edit]
[-] all-reviews.js
[edit]
[-] checkout.asset.php
[edit]
[-] wc-settings.asset.php
[edit]
[-] product-search.js
[edit]
[-] wc-payment-method-bacs.asset.php
[edit]
[-] reviews-frontend.js
[edit]
[-] blocks.asset.php
[edit]
[-] style.css
[edit]
[-] active-filters-frontend.js
[edit]
[-] price-filter-frontend.js
[edit]
[-] wc-blocks-middleware.asset.php
[edit]
[-] handpicked-products.js
[edit]
[-] attribute-filter.js
[edit]
[-] wc-payment-method-cod.js
[edit]
[-] featured-category.asset.php
[edit]
[-] editor.css
[edit]
[-] wc-blocks-middleware.js
[edit]
[-] all-products-frontend.js
[edit]
[-] product-new.js
[edit]
[-] wc-blocks-google-analytics.asset.php
[edit]
[-] all-reviews.asset.php
[edit]
[-] product-top-rated.js
[edit]
[-] blocks.js
[edit]
[-] wc-blocks-data.js
[edit]
[-] single-product-frontend.js
[edit]
[-] product-tag.js
[edit]
[-] all-products-frontend.asset.php
[edit]
[-] product-best-sellers.asset.php
[edit]
[-] featured-product.asset.php
[edit]
[-] cart-frontend.asset.php
[edit]
[-] single-product.js
[edit]
[-] cart-frontend.js
[edit]
[-] reviews-by-product.js
[edit]
[-] blocks-checkout-editor.js
[edit]
[-] wc-blocks-data.asset.php
[edit]
[-] reviews-frontend.asset.php
[edit]
[-] cart.js
[edit]
[-] product-top-rated.asset.php
[edit]
[-] price-format.asset.php
[edit]
[-] product-category.asset.php
[edit]
[-] product-best-sellers.js
[edit]
[-] product-categories.js
[edit]
[-] product-tag.asset.php
[edit]
[-] vendors-style-rtl.css
[edit]
[-] wc-payment-method-paypal.asset.php
[edit]
[-] wc-shared-hocs.asset.php
[edit]
[-] reviews-by-category.asset.php
[edit]
[-] price-filter.asset.php
[edit]
[-] single-product.asset.php
[edit]
[-] wc-payment-method-stripe.js
[edit]
[-] vendors.js
[edit]
[-] blocks-checkout.js
[edit]
[-] wc-shared-context.js
[edit]