PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /home/wallqcyy/www/wp-content/plugins/woocommerce/assets/client/blocks/
Upload File :
Current File : /home/wallqcyy/www/wp-content/plugins/woocommerce/assets/client/blocks/product-review-form.js

(()=>{var e,t,r,o={9547:(e,t,r)=>{"use strict";const o=window.wp.blocks;var s=r(7888);const i=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-review-form","title":"Reviews Form","category":"woocommerce","description":"Display a product\'s reviews form.","textdomain":"woocommerce","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId","postType"],"supports":{"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"example":{"attributes":{"textAlign":"center"}}}');var n=r(4921);const a=window.wp.blockEditor,c=window.wp.components;var l=r(9491),u=r(7723);const d=window.wp.data,p=window.wp.coreData,m=window.wc.data;var w=r(790);const b=()=>{const e=(0,l.useInstanceId)(b);return(0,w.jsxs)("div",{children:[(0,w.jsx)("span",{id:"reply-title",className:"comment-reply-title",role:"heading","aria-level":3,children:(0,u.__)("Add a review","woocommerce")}),(0,w.jsxs)("form",{noValidate:!0,className:"review-form",onSubmit:e=>e.preventDefault(),children:[(0,w.jsxs)("div",{className:"comment-form-rating",children:[(0,w.jsx)("span",{children:(0,u.__)("Your rating *","woocommerce")}),(0,w.jsx)("p",{className:"wp-block-woocommerce-product-reviews__editor__stars"})]}),(0,w.jsxs)("p",{children:[(0,w.jsx)("label",{htmlFor:`review-${e}`,children:(0,u.__)("Your review *","woocommerce")}),(0,w.jsx)("textarea",{id:`review-${e}`,name:"review",cols:45,rows:8,readOnly:!0})]}),(0,w.jsx)("p",{className:"form-submit wp-block-button",children:(0,w.jsx)("input",{name:"submit",type:"submit",className:(0,n.A)("wp-block-button__link",(0,a.__experimentalGetElementClassName)("button")),value:(0,u.__)("Submit","woocommerce"),"aria-disabled":"true"})})]})]})},v=({postId:e,postType:t})=>{const{updateProduct:r}=(0,d.useDispatch)(m.productsStore),o=(0,d.useSelect)((t=>t(m.productsStore).getProduct(Number(e))),[e]),s=void 0===t||void 0===e,i=(0,d.useSelect)((e=>!!t&&!!e(p.store).getPostType(t)?.supports.comments),[t]);if(!s&&o&&!o?.reviews_allowed){const t=[(0,w.jsx)(c.Button,{__next40pxDefaultSize:!0,onClick:()=>void r(Number(e),{reviews_allowed:true}),variant:"primary",children:(0,u._x)("Enable reviews","action that affects the current product","woocommerce")},"enableReviews")];return(0,w.jsx)(a.Warning,{actions:t,children:(0,u.__)("Product Reviews Form block: Reviews are not enabled for this product.","woocommerce")})}return i?(0,w.jsx)(c.Disabled,{children:(0,w.jsx)(b,{})}):(0,w.jsx)(a.Warning,{children:(0,u.__)("Product Reviews Form block: Reviews are not enabled.","woocommerce")})};r(391),r(4043),(0,o.registerBlockType)(i,{icon:s.A,edit:function e({attributes:t,context:r,setAttributes:o}){const{textAlign:s}=t,{postId:i,postType:d}=r,p=(0,l.useInstanceId)(e),m=(0,u.sprintf)("comments-form-edit-%d-desc",p),b=(0,a.useBlockProps)({className:(0,n.A)("comment-respond",{[`has-text-align-${s}`]:s}),"aria-describedby":m});return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(a.BlockControls,{group:"block",children:(0,w.jsx)(a.AlignmentControl,{value:s,onChange:e=>{o({textAlign:e})}})}),(0,w.jsxs)("div",{...b,children:[(0,w.jsx)(v,{postId:i,postType:d}),(0,w.jsx)(c.VisuallyHidden,{id:m,children:(0,u.__)("Reviews form disabled in editor.","woocommerce")})]})]})}})},391:()=>{},4043:()=>{},1609:e=>{"use strict";e.exports=window.React},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},9491:e=>{"use strict";e.exports=window.wp.compose},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return o[e].call(r.exports,r,r.exports,i),r.exports}i.m=o,e=[],i.O=(t,r,o,s)=>{if(!r){var n=1/0;for(u=0;u<e.length;u++){for(var[r,o,s]=e[u],a=!0,c=0;c<r.length;c++)(!1&s||n>=s)&&Object.keys(i.O).every((e=>i.O[e](r[c])))?r.splice(c--,1):(a=!1,s<n&&(n=s));if(a){e.splice(u--,1);var l=o();void 0!==l&&(t=l)}}return t}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[r,o,s]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var s=Object.create(null);i.r(s);var n={};t=t||[null,r({}),r([]),r(r)];for(var a=2&o&&e;"object"==typeof a&&!~t.indexOf(a);a=r(a))Object.getOwnPropertyNames(a).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,i.d(s,n),s},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=9596,(()=>{var e={9596:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var o,s,[n,a,c]=r,l=0;if(n.some((t=>0!==e[t]))){for(o in a)i.o(a,o)&&(i.m[o]=a[o]);if(c)var u=c(i)}for(t&&t(r);l<n.length;l++)s=n[l],i.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return i.O(u)},r=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var n=i.O(void 0,[94],(()=>i(9547)));n=i.O(n),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["product-review-form"]=n})();

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic