OwlCyberSecurity - MANAGER
Edit File: product-categories.js
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var r,a,l=t[0],i=t[1],s=t[2],b=0,d=[];b<l.length;b++)a=l[b],Object.prototype.hasOwnProperty.call(n,a)&&n[a]&&d.push(n[a][0]),n[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,s||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,l=1;l<o.length;l++){var i=o[l];0!==n[i]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={29:0},c=[];function a(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;return c.push([747,0]),o()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},110:function(e,t,o){"use strict";o.d(t,"c",(function(){return c})),o.d(t,"d",(function(){return a})),o.d(t,"a",(function(){return l})),o.d(t,"b",(function(){return i}));var r=o(14),n=o(32);const c=(e,t)=>{if(n.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(n.n>1)return Object(r.registerBlockType)(e,t)},l=()=>n.n>2,i=()=>n.n>1},117:function(e,t){},12:function(e,t){e.exports=window.wp.compose},14:function(e,t){e.exports=window.wp.blocks},18:function(e,t){e.exports=window.wp.primitives},3:function(e,t){e.exports=window.wc.wcSettings},32:function(e,t,o){"use strict";o.d(t,"o",(function(){return c})),o.d(t,"m",(function(){return a})),o.d(t,"l",(function(){return l})),o.d(t,"n",(function(){return i})),o.d(t,"j",(function(){return s})),o.d(t,"e",(function(){return u})),o.d(t,"f",(function(){return b})),o.d(t,"g",(function(){return d})),o.d(t,"k",(function(){return p})),o.d(t,"c",(function(){return g})),o.d(t,"d",(function(){return h})),o.d(t,"h",(function(){return w})),o.d(t,"a",(function(){return m})),o.d(t,"i",(function(){return f})),o.d(t,"b",(function(){return O}));var r,n=o(3);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",l=c.pluginUrl+"build/",i=c.buildPhase,s=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,b=n.STORE_PAGES.checkout.permalink,d=n.STORE_PAGES.privacy.permalink,p=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),g=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),h=n.STORE_PAGES.cart.permalink,w=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),m=Object(n.getSetting)("allowedCountries",{}),f=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},4:function(e,t){e.exports=window.wp.components},55:function(e,t,o){"use strict";var r=o(0);t.a=function(e){let{srcElement:t,size:o=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:o,height:o,...n}):null}},6:function(e,t){e.exports=window.lodash},747:function(e,t,o){e.exports=o(866)},748:function(e,t){},749:function(e,t){},76:function(e,t){e.exports=window.wp.serverSideRender},80:function(e,t,o){"use strict";var r=o(7),n=o.n(r),c=o(0),a=o(6),l=o(5),i=o.n(l),s=o(4),u=o(12);o(117);class b extends c.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:o,className:r,help:l,options:u,value:b}=this.props,d="inspector-toggle-button-control-"+o;let p;return l&&(p=Object(a.isFunction)(l)?l(t):l),Object(c.createElement)(s.BaseControl,{id:d,help:p,className:i()("components-toggle-button-control",r)},Object(c.createElement)("label",{id:d+"__label",htmlFor:d,className:"components-toggle-button-control__label"},e),Object(c.createElement)(s.ButtonGroup,{"aria-labelledby":d+"__label"},u.map((t,o)=>{const r={};return b===t.value?(r.isPrimary=!0,r["aria-pressed"]=!0):(r.isSecondary=!0,r["aria-pressed"]=!1),Object(c.createElement)(s.Button,n()({key:`${t.label}-${t.value}-${o}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},r),t.label)})))}}t.a=Object(u.withInstanceId)(b)},866:function(e,t,o){"use strict";o.r(t);var r=o(7),n=o.n(r),c=o(0),a=o(1),l=o(14),i=o(55),s=o(18),u=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7zM20.1 3H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9zM19 19H5V5h14v14z"})),b=o(110),d=(o(748),o(749),o(9)),p=o(76),g=o.n(p),h=(o(2),o(4)),w=o(80);const m=()=>Object(c.createElement)(h.Placeholder,{icon:Object(c.createElement)(i.a,{srcElement:u}),label:Object(a.__)("Product Categories List",'woocommerce'),className:"wc-block-product-categories"},Object(a.__)("This block shows product categories for your store. To use it, you'll first need to create a product and assign it to a category.",'woocommerce'));var f=e=>{let{attributes:t,setAttributes:o,name:r}=e;const n=Object(d.useBlockProps)({className:"wc-block-product-categories"});return Object(c.createElement)("div",n,(()=>{const{hasCount:e,hasImage:r,hasEmpty:n,isDropdown:l,isHierarchical:i}=t;return Object(c.createElement)(d.InspectorControls,{key:"inspector"},Object(c.createElement)(h.PanelBody,{title:Object(a.__)("List Settings",'woocommerce'),initialOpen:!0},Object(c.createElement)(w.a,{label:Object(a.__)("Display style",'woocommerce'),value:l?"dropdown":"list",options:[{label:Object(a.__)("List",'woocommerce'),value:"list"},{label:Object(a.__)("Dropdown",'woocommerce'),value:"dropdown"}],onChange:e=>o({isDropdown:"dropdown"===e})})),Object(c.createElement)(h.PanelBody,{title:Object(a.__)("Content",'woocommerce'),initialOpen:!0},Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show product count",'woocommerce'),help:e?Object(a.__)("Product count is visible.",'woocommerce'):Object(a.__)("Product count is hidden.",'woocommerce'),checked:e,onChange:()=>o({hasCount:!e})}),!l&&Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show category images",'woocommerce'),help:r?Object(a.__)("Category images are visible.",'woocommerce'):Object(a.__)("Category images are hidden.",'woocommerce'),checked:r,onChange:()=>o({hasImage:!r})}),Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show hierarchy",'woocommerce'),help:i?Object(a.__)("Hierarchy is visible.",'woocommerce'):Object(a.__)("Hierarchy is hidden.",'woocommerce'),checked:i,onChange:()=>o({isHierarchical:!i})}),Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show empty categories",'woocommerce'),help:n?Object(a.__)("Empty categories are visible.",'woocommerce'):Object(a.__)("Empty categories are hidden.",'woocommerce'),checked:n,onChange:()=>o({hasEmpty:!n})})))})(),Object(c.createElement)(h.Disabled,null,Object(c.createElement)(g.a,{block:r,attributes:t,EmptyResponsePlaceholder:m})))};Object(l.registerBlockType)("woocommerce/product-categories",{apiVersion:2,title:Object(a.__)("Product Categories List",'woocommerce'),icon:{src:Object(c.createElement)(i.a,{srcElement:u}),foreground:"#7f54b3"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce",'woocommerce')],description:Object(a.__)("Show all product categories as a list or dropdown.",'woocommerce'),supports:{align:["wide","full"],html:!1,...Object(b.b)()&&{color:{background:!1,link:!0},typography:{fontSize:!0,lineHeight:!0}}},example:{attributes:{hasCount:!0,hasImage:!1}},attributes:{align:{type:"string"},hasCount:{type:"boolean",default:!0},hasImage:{type:"boolean",default:!1},hasEmpty:{type:"boolean",default:!1},isDropdown:{type:"boolean",default:!1},isHierarchical:{type:"boolean",default:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:o}=e;return"woocommerce_product_categories"===t&&!(null==o||!o.raw)},transform:e=>{let{instance:t}=e;return Object(l.createBlock)("woocommerce/product-categories",{hasCount:!!t.raw.count,hasEmpty:!t.raw.hide_empty,isDropdown:!!t.raw.dropdown,isHierarchical:!!t.raw.hierarchical})}}]},deprecated:[{attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},migrate:e=>e,save(e){const{hasCount:t,hasEmpty:o,isDropdown:r,isHierarchical:a}=e.attributes,l={};return t&&(l["data-has-count"]=!0),o&&(l["data-has-empty"]=!0),r&&(l["data-is-dropdown"]=!0),a&&(l["data-is-hierarchical"]=!0),Object(c.createElement)("div",n()({className:"is-loading"},l),r?Object(c.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(c.createElement)("ul",{"aria-hidden":!0},Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}}],edit:e=>Object(c.createElement)(f,e),save:()=>null})},9:function(e,t){e.exports=window.wp.blockEditor}});