Server IP : 192.64.112.168 / Your IP : 18.191.234.200 Web Server : Apache System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64 User : expressoneac ( 1128) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/expressoneac/www/wp-content/plugins/woocommerce/assets/client/blocks/ |
Upload File : |
(()=>{var e,t,o,n={5627:(e,t,o)=>{"use strict";o.r(t);var n=o(1609);const r=window.wc.wcTypes,c=window.wp.blocks,l=window.wp.data,a=new Set;var i=o(7104),s=o(498);const u=JSON.parse('{"name":"woocommerce/add-to-cart-form","version":"1.0.0","title":"Add to Cart with Options","description":"Display a button so the customer can add a product to their cart. Options will also be displayed depending on product type. e.g. quantity, variation.","category":"woocommerce-product-elements","attributes":{"isDescendentOfSingleProductBlock":{"type":"boolean","default":false},"quantitySelectorStyle":{"type":"string","enum":["input","stepper"],"default":"input"}},"keywords":["WooCommerce"],"usesContext":["postId"],"textdomain":"woocommerce","supports":{"interactivity":true},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var d=o(6087);const p=window.wp.blockEditor;var m=o(7723);o(6455);const b=({numberOfLines:e=1,tag:t="div",maxWidth:o="100%"})=>{const r=Array.from({length:e},((e,t)=>(0,n.createElement)("span",{className:"wc-block-components-skeleton-text-line","aria-hidden":"true",key:t})));return(0,n.createElement)(t,{className:"wc-block-components-skeleton",style:{maxWidth:o}},r)},f=window.wp.components,w=window.wc.wcSettings;o(5375);let y=function(e){return e.Input="input",e.Stepper="stepper",e}({});const g=e=>e===y.Input?(0,m.__)("Shoppers can enter a number of items to add to cart.","woocommerce"):e===y.Stepper?(0,m.__)("Shoppers can use buttons to change the number of items to add to cart.","woocommerce"):void 0,k=({quantitySelectorStyle:e,setAttributes:t})=>(0,n.createElement)(p.InspectorControls,null,(0,n.createElement)(f.PanelBody,{title:(0,m.__)("Quantity Selector","woocommerce")},(0,n.createElement)(f.__experimentalToggleGroupControl,{className:"wc-block-editor-quantity-selector-style",__nextHasNoMarginBottom:!0,value:e,isBlock:!0,onChange:e=>{t({quantitySelectorStyle:e})},help:g(e)},(0,n.createElement)(f.__experimentalToggleGroupControlOption,{label:(0,m.__)("Input","woocommerce"),value:y.Input}),(0,n.createElement)(f.__experimentalToggleGroupControlOption,{label:(0,m.__)("Stepper","woocommerce"),value:y.Stepper}))));o(6515),o(5193);const v={edit:e=>{const{setAttributes:t}=e,o=(0,w.getSettingWithCoercion)("isStepperLayoutFeatureEnabled",!1,r.isBoolean),c=e.attributes.quantitySelectorStyle!==y.Input&&o?"wc-block-add-to-cart-form--stepper":"wc-block-add-to-cart-form--input",a=(0,p.useBlockProps)({className:`wc-block-add-to-cart-form ${c}`}),{isDescendentOfSingleProductBlock:i}=(({blockClientId:e})=>{const{isDescendentOfSingleProductBlock:t}=(0,l.useSelect)((t=>{const{getBlockParentsByBlockName:o}=t("core/block-editor");return{isDescendentOfSingleProductBlock:o(null==e?void 0:e.replace("block-",""),["woocommerce/single-product"]).length>0}}),[e]);return{isDescendentOfSingleProductBlock:t}})({blockClientId:null==a?void 0:a.id});(0,d.useEffect)((()=>{t({isDescendentOfSingleProductBlock:i})}),[t,i]);const s=(0,l.useSelect)((e=>(e=>{if(!(e=>null===e)(t=e)&&t instanceof Object&&t.constructor===Object){const t=e.getEditedPostType();return"wp_template"===t||"wp_template_part"===t}var t;return!1})(e("core/edit-site"))),[]);return(0,n.createElement)(n.Fragment,null,o&&(0,n.createElement)(k,{quantitySelectorStyle:e.attributes.quantitySelectorStyle,setAttributes:t}),(0,n.createElement)("div",{...a},(0,n.createElement)(f.Tooltip,{text:"Customer will see product add-to-cart options in this space, dependent on the product type. ",position:"bottom right"},(0,n.createElement)("div",{className:"wc-block-editor-add-to-cart-form-container"},(0,n.createElement)(b,{numberOfLines:3}),(0,n.createElement)(f.Disabled,null,(e.attributes.quantitySelectorStyle===y.Input||!o)&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"quantity"},(0,n.createElement)("input",{style:s?{}:{backgroundColor:"#ffffff",lineHeight:"normal",minHeight:"unset",boxSizing:"unset",borderRadius:"unset"},type:"number",value:"1",className:"input-text qty text",readOnly:!0})),(0,n.createElement)("button",{className:"single_add_to_cart_button alt wp-element-button"},(0,m.__)("Add to cart","woocommerce"))),e.attributes.quantitySelectorStyle===y.Stepper&&o&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"quantity wc-block-components-quantity-selector"},(0,n.createElement)("button",{className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus"},"-"),(0,n.createElement)("input",{style:s?{}:{backgroundColor:"#ffffff",lineHeight:"normal",minHeight:"unset",boxSizing:"unset",borderRadius:"unset"},type:"number",value:"1",className:"input-text qty text",readOnly:!0}),(0,n.createElement)("button",{className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus"},"+")),(0,n.createElement)("button",{className:"single_add_to_cart_button alt wp-element-button"},(0,m.__)("Add to cart","woocommerce"))))))))},icon:{src:(0,n.createElement)(i.A,{icon:s.A,className:"wc-block-editor-components-block-icon"})},ancestor:["woocommerce/single-product"],save:()=>null};(({blockName:e,blockMetadata:t,blockSettings:o,isVariationBlock:n=!1,variationName:i,isAvailableOnPostEditor:s})=>{let u="";t||(t=e);const d=(0,l.select)("core/edit-site");(0,l.subscribe)((()=>{var l;const a=u;if(u=function(e){const t=(0,r.isNumber)(e)?void 0:e;return null==t?void 0:t.split("//")[1]}(null==d?void 0:d.getEditedPostId()),a===u||!e)return;let s=Boolean((0,c.getBlockType)(e));if(s&&(null!==(l=u)&&void 0!==l&&l.includes("single-product")||null!=a&&a.includes("single-product"))&&(n&&i?(0,c.unregisterBlockVariation)(e,i):(0,c.unregisterBlockType)(e),s=!1),!s)if(n)(0,c.registerBlockVariation)(e,o);else{var p;const e=(0,r.isEmpty)(null==o?void 0:o.ancestor)?["woocommerce/single-product"]:null==o?void 0:o.ancestor;(0,c.registerBlockType)(t,{...o,ancestor:null!==(p=u)&&void 0!==p&&p.includes("single-product")?void 0:e})}}),"core/edit-site"),(0,l.subscribe)((()=>{(Boolean(i)?a.has(i):a.has(e))||!s||d||(n?(a.add(i),(0,c.registerBlockVariation)(e,o)):(a.add(e),(0,c.registerBlockType)(t,o)))}),"core/edit-post")})({blockName:u.name,blockMetadata:u,blockSettings:v,isAvailableOnPostEditor:!0})},5193:()=>{},6455:()=>{},5375:()=>{},6515:()=>{},1609:e=>{"use strict";e.exports=window.React},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},r={};function c(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e].call(o.exports,o,o.exports,c),o.exports}c.m=n,e=[],c.O=(t,o,n,r)=>{if(!o){var l=1/0;for(u=0;u<e.length;u++){for(var[o,n,r]=e[u],a=!0,i=0;i<o.length;i++)(!1&r||l>=r)&&Object.keys(c.O).every((e=>c.O[e](o[i])))?o.splice(i--,1):(a=!1,r<l&&(l=r));if(a){e.splice(u--,1);var s=n();void 0!==s&&(t=s)}}return t}r=r||0;for(var u=e.length;u>0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[o,n,r]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var r=Object.create(null);c.r(r);var l={};t=t||[null,o({}),o([]),o(o)];for(var a=2&n&&e;"object"==typeof a&&!~t.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach((t=>l[t]=()=>e[t]));return l.default=()=>e,c.d(r,l),r},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.j=2100,(()=>{var e={2100:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var n,r,[l,a,i]=o,s=0;if(l.some((t=>0!==e[t]))){for(n in a)c.o(a,n)&&(c.m[n]=a[n]);if(i)var u=i(c)}for(t&&t(o);s<l.length;s++)r=l[s],c.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return c.O(u)},o=self.webpackChunkwebpackWcBlocksMainJsonp=self.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var l=c.O(void 0,[94],(()=>c(5627)));l=c.O(l),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["add-to-cart-form"]=l})();