HEX
Server: Apache
System: Linux webm014.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: circuix (152771)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/circuix/adrRc/wp-content/plugins/woocommerce/assets/client/admin/chunks/edit-product-page.js
(self.webpackChunk_wcAdmin_webpackJsonp=self.webpackChunk_wcAdmin_webpackJsonp||[]).push([[3307],{75080:function(e,t,r){"use strict";var a=r(69307),n=r(70444);const o=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"}));t.Z=o},92382:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return B}});var a=r(69307),n=r(65736),o=r(67221),i=r(14599),c=r(9818),l=r(86020),s=r(85597),m=r(1361),u=r(36279),d=r(5267),p=r(98817),_=r(62907),v=r(70444),E=(0,a.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(v.Path,{d:"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z"})),g=r(75080),w=r(83849),h=r.n(w);function f(e){let{actionLabel:t,actionHref:r,prevHref:o,prevLabel:i,nextHref:c,nextLabel:s,className:m,...u}=e;const p={className:"posts-navigation__prev","aria-label":null!=i?i:(0,n.__)("Previous post","woocommerce"),children:(0,a.createElement)(_.Z,{icon:E,size:24,fill:"currentColor"})},v={className:"posts-navigation__next","aria-label":null!=s?s:(0,n.__)("Next post","woocommerce"),children:(0,a.createElement)(_.Z,{icon:g.Z,size:24,fill:"currentColor"})};return(0,a.createElement)("nav",(0,d.Z)({},u,{className:h()(m,"posts-navigation")}),o?(0,a.createElement)(l.Link,(0,d.Z)({},p,{type:"wc-admin",href:o})):(0,a.createElement)("div",(0,d.Z)({},p,{tabIndex:-1,role:"button","aria-disabled":"true"})),(0,a.createElement)(l.Link,{className:"posts-navigation__action",type:"wc-admin",href:r},t),c?(0,a.createElement)(l.Link,(0,d.Z)({},v,{type:"wc-admin",href:c})):(0,a.createElement)("div",(0,d.Z)({},v,{tabIndex:-1,role:"button","aria-disabled":"true"})))}var b=r(39152),P=r(73085),N=r(45473),I=r(4981),x=r(55609),k=r(59989),R=r(28599),C=r(61422),y=r.n(C);function S(e){let{id:t,label:r,value:o,className:i,onChange:c,...s}=e;const m=null!=t?t:y()();function u(e){"function"==typeof c&&c(e)}return(0,a.createElement)("div",(0,d.Z)({},s,{className:h()("woocommerce-single-image-field",i)}),(0,a.createElement)("label",{htmlFor:m,className:"components-base-control__label woocommerce-single-image-field__label"},r),o?(0,a.createElement)("div",{id:m,className:"woocommerce-single-image-field__gallery",tabIndex:-1,role:"region"},(0,a.createElement)(l.ImageGallery,{onReplace:e=>{let{media:t}=e;return u(t)},onRemove:()=>u(void 0)},(0,a.createElement)(l.ImageGalleryItem,{key:o.id,id:String(o.id),alt:o.alt,src:o.url}))):(0,a.createElement)("div",{id:m,className:"woocommerce-single-image-field__drop-zone",tabIndex:-1,role:"region"},(0,a.createElement)(l.MediaUploader,{onError:()=>null,onSelect:e=>u(e),onUpload:e=>{let[t]=e;return u(t)},onFileUploadChange:e=>{let[t]=e;return u(t)},label:(0,n.__)("Drag image here or click to upload","woocommerce"),buttonText:(0,n.__)("Choose image","woocommerce")})))}function T(e){if(e)return{id:e.id,url:e.src,alt:e.alt,title:e.name}}const A=()=>{const{getCheckboxControlProps:e,getInputProps:t,values:r,setValue:o}=(0,l.useFormContext)(),[i,c]=(0,a.useState)((0,I.rawHandler)({HTML:r.description})),s=t("image");return(0,a.createElement)(R.N,{title:(0,n.__)("Variant details","woocommerce"),description:(0,n.__)("This info will be displayed on the product page, category pages, social media, and search results.","woocommerce")},(0,a.createElement)(x.Card,null,(0,a.createElement)(x.CardBody,null,(0,a.createElement)(x.CheckboxControl,(0,d.Z)({label:(0,a.createElement)(a.Fragment,null,(0,n.__)("Visible to customers","woocommerce"),(0,a.createElement)(l.__experimentalTooltip,{text:(0,n.__)("When enabled, customers will be able to select and purchase this variation from the product page.","woocommerce")}))},e("status",(0,k.HP)("status")),{checked:"publish"===r.status,onChange:()=>o("status","publish"!==r.status?"publish":"private")})),(0,a.createElement)(l.__experimentalRichTextEditor,{label:(0,n.__)("Description","woocommerce"),blocks:i,onChange:e=>{c(e),i.length&&o("description",(0,I.serialize)(e))},placeholder:(0,n.__)("Describe this product. What makes it unique? What are its most important features?","woocommerce")}),(0,a.createElement)(x.BaseControl,{id:"product-variation-image"},(0,a.createElement)(S,{label:(0,n.__)("Image","woocommerce"),value:T(s.value),onChange:e=>o("image",function(e){if(e)return{id:e.id,src:e.url,alt:e.alt,name:e.title}}(e))})))))};var F=r(8573),V=r(48701),L=r(91920);const H=()=>{const{productId:e,variationId:t}=(0,s.UO)(),{isDirty:r,isValidForm:i,values:m}=(0,l.useFormContext)(),{updateProductVariation:u}=(0,c.useDispatch)(o.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME),{createNotice:d}=(0,c.useDispatch)("core/notices"),[p,_]=(0,a.useState)(!1);(0,V.Z)(r,F.$);const v=async()=>{_(!0),u({id:t,product_id:e,context:"edit"},{...m,manage_stock:"parent"===m.manage_stock||null==m?void 0:m.manage_stock}).then((()=>{d("success",`🎉‎ ${(0,n.__)("Product variation successfully updated.","woocommerce")}`)})).catch((()=>{d("error",(0,n.__)("Failed to updated product variation.","woocommerce"))})).finally((()=>{_(!1)}))};return(0,a.createElement)(L.Nw,null,(()=>(0,a.createElement)("div",{className:"woocommerce-product-form-actions is-variation"},(0,a.createElement)(x.Button,{href:m.permalink+"?preview=true",disabled:!i||!m.permalink,target:"_blank",className:"woocommerce-product-form-actions__preview"},(0,n.__)("Preview","woocommerce")),(0,a.createElement)(x.ButtonGroup,{className:"woocommerce-product-form-actions__publish-button-group"},(0,a.createElement)(x.Button,{onClick:v,variant:"primary",isBusy:p,disabled:!i||!r},(0,n.__)("Save","woocommerce"))))))};(0,p.registerPlugin)("product-variation-action-buttons-header-item",{render:H,icon:"admin-generic"});var O=r(35723);const Z=()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(O.t,null),(0,a.createElement)(H,null));var M=r(10431),D=r(9046);const U=e=>{let{product:t,productVariation:r}=e;const o=(0,a.useRef)(),i=(0,a.useRef)(null),c=function(e){var t;let{product:r,productVariation:a}=e;const{variations:n}=r,o=null!=n?n:[],i=o.indexOf(null!==(t=a.id)&&void 0!==t?t:-1),c=i>0,l=i<o.length-1,s=c?o[i-1]:void 0,m=l?o[i+1]:void 0,u=(0,M.getPersistedQuery)();return{actionHref:(0,M.getNewPath)(u,`/product/${r.id}`,{}),prevHref:s?(0,M.getNewPath)(u,`/product/${r.id}/variation/${s}`,{}):void 0,nextHref:m?(0,M.getNewPath)(u,`/product/${r.id}/variation/${m}`,{}):void 0}}({product:t,productVariation:r});return(0,a.useEffect)((()=>{var e;r&&o.current!==r.id&&(null===(e=i.current)||void 0===e||e.resetForm(r),o.current=r.id)}),[r]),(0,a.createElement)(l.SlotContextProvider,null,(0,a.createElement)(l.Form,{initialValues:r,errors:{},ref:i},(0,a.createElement)(Z,null),(0,a.createElement)(u.a,{key:r.id},(0,a.createElement)(P.w,{name:"general",title:"General"},(0,a.createElement)(A,null)),(0,a.createElement)(P.w,{name:"pricing",title:"Pricing"},(0,a.createElement)(N.t,null)),(0,a.createElement)(P.w,{name:"inventory",title:"Inventory"},(0,a.createElement)(l.__experimentalWooProductSectionItem.Slot,{location:D.PF})),(0,a.createElement)(P.w,{name:"shipping",title:"Shipping"},(0,a.createElement)(l.__experimentalWooProductSectionItem.Slot,{location:D.cw,fillProps:{product:t}}))),(0,a.createElement)(b.H,null),(0,a.createElement)("div",{className:"product-variation-form__navigation"},(0,a.createElement)(f,(0,d.Z)({},c,{actionLabel:(0,n.__)("Return to main product","woocommerce"),prevLabel:(0,n.__)("Previous product variation","woocommerce"),nextLabel:(0,n.__)("Next product variation","woocommerce")}))),(0,a.createElement)(p.PluginArea,{scope:"woocommerce-product-editor"})))};r(45809);var B=()=>{var e,t;const{productId:r,variationId:d}=(0,s.UO)(),p=!!d,_=(0,a.useRef)(),v=(0,a.useRef)(null),{product:E,isLoading:g,isPendingAction:w,productVariation:h}=(0,c.useSelect)((e=>{const{getProduct:t,hasFinishedResolution:a,isPending:n,getPermalinkParts:i}=e(o.PRODUCTS_STORE_NAME),{hasFinishedResolution:c}=e(o.EXPERIMENTAL_PRODUCT_FORM_STORE_NAME),{getProductVariation:l,hasFinishedResolution:s}=e(o.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME);if(r){const e=t(parseInt(r,10),void 0);return{product:i(parseInt(r,10))&&e?e:void 0,productVariation:p&&l({id:parseInt(d,10),product_id:parseInt(r,10)}),isLoading:!(a("getProduct",[parseInt(r,10)])&&a("getPermalinkParts",[parseInt(r,10)])&&p&&s("getProductVariation",[parseInt(d,10)])&&c("getProductForm")),isPendingAction:n("createProduct")||n("deleteProduct",parseInt(r,10))||n("updateProduct",parseInt(r,10))}}return{isLoading:!1,isPendingAction:!1}}));(0,a.useEffect)((()=>{_.current&&E&&_.current.id!==E.id&&v.current&&v.current.resetForm(E),_.current=E}),[E]),(0,a.useEffect)((()=>{(0,i.recordEvent)("view_new_product_management_experience")}),[]);const f=(null===(e=_.current)||void 0===e?void 0:e.id)===(null==E?void 0:E.id)&&"trash"!==(null===(t=_.current)||void 0===t?void 0:t.status)&&"trash"===(null==E?void 0:E.status);return(0,a.createElement)("div",{className:"woocommerce-edit-product"},g&&!E?(0,a.createElement)("div",{className:"woocommerce-edit-product__spinner"},(0,a.createElement)(l.Spinner,null)):null,E&&"trash"===E.status&&!w&&!f&&(0,a.createElement)(u.a,null,(0,a.createElement)("div",{className:"woocommerce-edit-product__error"},(0,n.__)("You cannot edit this item because it is in the Trash. Please restore it and try again.","woocommerce"))),window.wcAdminFeatures["product-variation-management"]&&h&&E&&(0,a.createElement)(U,{product:E,productVariation:h}),!p&&E&&("trash"!==E.status||f)&&(0,a.createElement)(m.H,{formRef:v,product:E}))}},61422:function(e,t,r){var a=r(99835),n=0;e.exports=function(e){var t=++n;return a(e)+t}}}]);