Uname:Linux webm009.cluster131.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

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.152
Web Server : Apache
System : Linux webm009.cluster131.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 : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/ipprint/wp-content/plugins/power-coupons/admin/assets/build/url-coupon/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/plugins/power-coupons/admin/assets/build/url-coupon/index.js
(()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.React,n=window.wp.components,t=window.wp.element,r=window.wp.apiFetch;var a=e.n(r);const l=window.wp.i18n,u=window.powerCouponsUrlCoupon||{};function c({text:e}){const n=(0,t.useRef)(null),[r,a]=(0,t.useState)(!1),[l,u]=(0,t.useState)({top:0,left:0}),c=()=>{if(!n.current)return;const e=n.current.getBoundingClientRect();u({top:e.bottom+8,left:e.left+e.width/2}),a(!0)},p=()=>a(!1);return(0,t.useEffect)(()=>{if(r)return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[r]),(0,o.createElement)("span",{ref:n,className:"power-coupons-url-coupon__tip",tabIndex:0,role:"img","aria-label":e,onMouseEnter:c,onMouseLeave:p,onFocus:c,onBlur:p},r&&(0,o.createElement)("span",{className:"power-coupons-url-coupon__tip-bubble",role:"tooltip",style:{top:l.top,left:l.left}},e))}function p({label:e,htmlFor:n,tip:t,className:r="",children:a}){return(0,o.createElement)("div",{className:"power-coupons-url-coupon__row"+(r?` ${r}`:"")},n?(0,o.createElement)("label",{className:"power-coupons-url-coupon__row-label",htmlFor:n},e):(0,o.createElement)("span",{className:"power-coupons-url-coupon__row-label"},e),(0,o.createElement)("div",{className:"power-coupons-url-coupon__row-control"},a,t&&(0,o.createElement)(c,{text:t})))}function s({label:e,value:t,tip:r,copied:a,rowKey:u,onCopy:p,placeholder:s,disabled:i=!1}){const m=`power-coupons-url-coupon-${u}`;return(0,o.createElement)("div",{className:"power-coupons-url-coupon__field"},(0,o.createElement)("label",{className:"power-coupons-url-coupon__label",htmlFor:m},e,r&&(0,o.createElement)(c,{text:r})),(0,o.createElement)("div",{className:"power-coupons-url-coupon__url-row"},(0,o.createElement)("input",{id:m,type:"text",className:"power-coupons-url-coupon__url-input",value:t,placeholder:s,readOnly:!0,onFocus:e=>e.target.select()}),(0,o.createElement)(n.Button,{variant:"secondary",onClick:()=>p(t,u),disabled:i||!t},a===u?(0,l.__)("Copied!","power-coupons"):(0,l.__)("Copy","power-coupons"))))}const i=document.getElementById("power_coupons_url_coupon_panel");i&&(0,t.createRoot)(i).render((0,o.createElement)(function(){var e,r;const[i,m]=(0,t.useState)("yes"===u.enabled),[d,_]=(0,t.useState)(String(null!==(e=u.expiryDays)&&void 0!==e?e:0)),[w,b]=(0,t.useState)(String(null!==(r=u.maxUses)&&void 0!==r?r:0)),[h,E]=(0,t.useState)(u.redirect||""),[y,v]=(0,t.useState)("yes"===u.oneTime),[g,f]=(0,t.useState)(""),[N,k]=(0,t.useState)(""),[C,x]=(0,t.useState)(!1),[S,L]=(0,t.useState)(""),R=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{R.current&&clearTimeout(R.current)},[]);const F=!!u.isPublished,U=u.url||"",B=void 0===u.featureEnabled||!!u.featureEnabled,O=u.settingsUrl||"",P=(e,o)=>{(function(e){if(!e)return Promise.resolve(!1);const o=()=>{try{const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="fixed",o.style.top="-9999px",o.style.opacity="0",document.body.appendChild(o),o.focus(),o.select();const n=document.execCommand("copy");return document.body.removeChild(o),n}catch(e){return!1}};return navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).then(()=>!0).catch(()=>o()):Promise.resolve(o())})(e).then(e=>{e&&(L(o),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>L(""),1500))})},M=e=>e.replace(/[^0-9]/g,"");return(0,o.createElement)("div",{className:"power-coupons-url-coupon"+(B?"":" power-coupons-url-coupon--feature-off")},(0,o.createElement)("input",{type:"hidden",name:"_power_coupon_url_enabled",value:i?"yes":"no"}),(0,o.createElement)("input",{type:"hidden",name:"_power_coupon_url_expiry_days",value:d||"0"}),(0,o.createElement)("input",{type:"hidden",name:"_power_coupon_url_max_uses",value:w||"0"}),(0,o.createElement)("input",{type:"hidden",name:"_power_coupon_url_redirect",value:h}),(0,o.createElement)("input",{type:"hidden",name:"_power_coupon_url_one_time",value:y?"yes":"no"}),!B&&(0,o.createElement)("div",{className:"power-coupons-url-coupon__feature-notice",role:"alert"},(0,o.createElement)("span",{className:"power-coupons-url-coupon__feature-notice-icon","aria-hidden":"true"},"⚠"),(0,o.createElement)("div",{className:"power-coupons-url-coupon__feature-notice-body"},(0,o.createElement)("strong",null,(0,l.__)("URL Coupons are turned off globally.","power-coupons")),(0,o.createElement)("p",null,(0,l.__)("Links won't apply until you enable the feature in Settings → URL Coupons.","power-coupons")),O&&(0,o.createElement)("a",{className:"power-coupons-url-coupon__feature-notice-link",href:O},(0,l.__)("Go to settings →","power-coupons")))),(0,o.createElement)("div",{className:"power-coupons-url-coupon__header"},(0,o.createElement)("div",{className:"power-coupons-url-coupon__header__title"},(0,o.createElement)("strong",null,(0,l.__)("Enable URL Coupon","power-coupons")),(0,o.createElement)("p",null,(0,l.__)("Allow this coupon to be applied automatically when a customer visits its shareable link.","power-coupons"))),(0,o.createElement)(n.ToggleControl,{label:null,checked:i,onChange:m,disabled:!B,className:"power-coupons-url-coupon__header__control",__nextHasNoMarginBottom:!0})),i&&(0,o.createElement)("div",{className:"power-coupons-url-coupon__body"},(0,o.createElement)("hr",{className:"power-coupons-url-coupon__separator"}),(0,o.createElement)(p,{label:(0,l.__)("Link expires after (days)","power-coupons"),htmlFor:"power-coupons-url-coupon-expiry",tip:(0,l.__)("Number of days the link stays valid after the coupon is first enabled. 0 = never expires.","power-coupons")},(0,o.createElement)("input",{id:"power-coupons-url-coupon-expiry",type:"number",min:"0",step:"1",className:"power-coupons-url-coupon__input",value:d,disabled:!B,onChange:e=>_(M(e.target.value))})),(0,o.createElement)(p,{label:(0,l.__)("Max uses via URL","power-coupons"),htmlFor:"power-coupons-url-coupon-maxuses",tip:(0,l.__)("Maximum number of times the reusable link may apply this coupon. 0 = unlimited.","power-coupons")},(0,o.createElement)("input",{id:"power-coupons-url-coupon-maxuses",type:"number",min:"0",step:"1",className:"power-coupons-url-coupon__input",value:w,disabled:!B,onChange:e=>b(M(e.target.value))})),(0,o.createElement)(p,{label:(0,l.__)("Redirect / deep-link URL","power-coupons"),htmlFor:"power-coupons-url-coupon-redirect",tip:(0,l.__)("Optional. Send the customer to this URL (e.g. a product page) after applying, instead of the cart/checkout. Must be on this site.","power-coupons")},(0,o.createElement)("input",{id:"power-coupons-url-coupon-redirect",type:"text",className:"power-coupons-url-coupon__input",value:h,disabled:!B,onChange:e=>E(e.target.value)})),(0,o.createElement)(p,{label:(0,l.__)("One-time-use links","power-coupons"),className:"power-coupons-url-coupon__row--checkbox"},(0,o.createElement)(n.CheckboxControl,{label:(0,l.__)("Enable generation of unique, single-use links (one per customer/campaign).","power-coupons"),checked:y,onChange:v,disabled:!B,__nextHasNoMarginBottom:!0})),!F&&(0,o.createElement)("p",{className:"power-coupons-url-coupon__notice"},(0,l.__)("Publish the coupon to generate its shareable URL.","power-coupons")),F&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)(s,{label:(0,l.__)("Coupon URL","power-coupons"),value:U,rowKey:"url",copied:S,onCopy:P,disabled:!B,tip:(0,l.__)('Share this link in emails or ads. When the customer clicks it, the coupon is applied automatically (only while "Enable URL Coupon" is on).',"power-coupons")}),y&&(0,o.createElement)("div",{className:"power-coupons-url-coupon__field"},(0,o.createElement)("label",{className:"power-coupons-url-coupon__label",htmlFor:"power-coupons-url-coupon-token"},(0,l.__)("One-time link","power-coupons"),(0,o.createElement)(c,{text:(0,l.__)("Each generated link works only once. Generate a new one per customer or campaign.","power-coupons")})),(0,o.createElement)("div",{className:"power-coupons-url-coupon__url-row"},(0,o.createElement)("input",{id:"power-coupons-url-coupon-token",type:"text",className:"power-coupons-url-coupon__url-input",value:g,placeholder:(0,l.__)("Click generate to create a single-use link","power-coupons"),readOnly:!0,onFocus:e=>e.target.select()}),(0,o.createElement)(n.Button,{variant:"secondary",onClick:()=>P(g,"token"),disabled:!B||!g},"token"===S?(0,l.__)("Copied!","power-coupons"):(0,l.__)("Copy","power-coupons")),(0,o.createElement)(n.Button,{variant:"primary",onClick:()=>{x(!0),k("");const e=new window.FormData;e.append("action","power_coupons_generate_url_token"),e.append("nonce",u.generateNonce||""),e.append("coupon_id",u.couponId||0),a()({url:u.ajaxurl,method:"POST",body:e}).then(e=>{e&&e.success&&e.data&&e.data.url?f(e.data.url):k(e&&e.data&&e.data.message?e.data.message:(0,l.__)("Could not generate a link. Please try again.","power-coupons"))}).catch(()=>{k((0,l.__)("Could not generate a link. Please try again.","power-coupons"))}).finally(()=>{x(!1)})},isBusy:C,disabled:!B||C},(0,l.__)("Generate Unique Link","power-coupons"))),N&&(0,o.createElement)(n.Notice,{status:"error",isDismissible:!1,className:"power-coupons-url-coupon__token-error"},N)))))},null))})();

Youez - 2016 - github.com/yon3zu
LinuXploit