1import{r as u,P as f,am as $,u as W,cF as K,j as s,H as z,T as C,aE as M,n as k,bu as G,cK as V}from"./index-CHRcH5og.js";/* empty css */import{L as Y}from"./LayoutCms.z1kbZXdU.js";import B from"./NotFound.6DWaH3K9.js";import"./_cms.BWy3drAn.js";import"./PageHeaderMeta.DmGxthvs.js";import"./Breadcrumb.B59o6JfF.js";import"./home-breadcrumb-icon.aoDjGNuc.js";/* empty css *//* empty css *//* empty css */import"./swiper-react.CwRNlWGg.js";import"./schema.PnXjrxE0.js";var X=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function T(){return T=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T.apply(this,arguments)}function Z(e,a){if(e==null)return{};var r={},n=Object.keys(e),t,p;for(p=0;p<n.length;p++)t=n[p],!(a.indexOf(t)>=0)&&(r[t]=e[t]);return r}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,P(e,a)}function P(e,a){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},P(e,a)}var I=(function(e){J(a,e);function a(){var n;return n=e.call(this)||this,n.handleExpired=n.handleExpired.bind(A(n)),n.handleErrored=n.handleErrored.bind(A(n)),n.handleChange=n.handleChange.bind(A(n)),n.handleRecaptchaRef=n.handleRecaptchaRef.bind(A(n)),n}var r=a.prototype;return r.getCaptchaFunction=function(t){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[t]:this.props.grecaptcha[t]:null},r.getValue=function(){var t=this.getCaptchaFunction("getResponse");return t&&this._widgetId!==void 0?t(this._widgetId):null},r.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},r.execute=function(){var t=this.getCaptchaFunction("execute");if(t&&this._widgetId!==void 0)return t(this._widgetId);this._executeRequested=!0},r.executeAsync=function(){var t=this;return new Promise(function(p,i){t.executionResolve=p,t.executionReject=i,t.execute()})},r.reset=function(){var t=this.getCaptchaFunction("reset");t&&this._widgetId!==void 0&&t(this._widgetId)},r.forceReset=function(){var t=this.getCaptchaFunction("reset");t&&t()},r.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},r.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},r.handleChange=function(t){this.props.onChange&&this.props.onChange(t),this.executionResolve&&(this.executionResolve(t),delete this.executionReject,delete this.executionResolve)},r.explicitRender=function(){var t=this.getCaptchaFunction("render");if(t&&this._widgetId===void 0){var p=document.createElement("div");this._widgetId=t(p,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(p)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},r.componentDidMount=function(){this.explicitRender()},r.componentDidUpdate=function(){this.explicitRender()},r.handleRecaptchaRef=function(t){this.captcha=t},r.render=function(){var t=this.props;t.sitekey,t.onChange,t.theme,t.type,t.tabindex,t.onExpired,t.onErrored,t.size,t.stoken,t.grecaptcha,t.badge,t.hl,t.isolated;
1var p=Z(t,X);return u.createElement("div",T({},p,{ref:this.handleRecaptchaRef}))},a})(u.Component);I.displayName="ReCAPTCHA";I.propTypes={sitekey:f.string.isRequired,onChange:f.func,grecaptcha:f.object,theme:f.oneOf(["dark","light"]),type:f.oneOf(["image","audio"]),tabindex:f.number,onExpired:f.func,onErrored:f.func,size:f.oneOf(["compact","normal","invisible"]),stoken:f.string,hl:f.string,badge:f.oneOf(["bottomright","bottomleft","inline"]),isolated:f.bool};I.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};function D(){return D=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}function Q(e,a){if(e==null)return{};var r={},n=Object.keys(e),t,p;for(p=0;p<n.length;p++)t=n[p],!(a.indexOf(t)>=0)&&(r[t]=e[t]);return r}function ee(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}var _={},te=0;function re(e,a){return a=a||{},function(n){var t=n.displayName||n.name||"Component",p=(function(v){ee(m,v);function m(w,c){var o;return o=v.call(this,w,c)||this,o.state={},o.__scriptURL="",o}var x=m.prototype;return x.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+te++),this.__scriptLoaderID},x.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},x.asyncScriptLoaderHandleLoad=function(c){var o=this;this.setState(c,function(){return o.props.asyncScriptOnLoad&&o.props.asyncScriptOnLoad(o.state)})},x.asyncScriptLoaderTriggerOnScriptLoaded=function(){var c=_[this.__scriptURL];if(!c||!c.loaded)throw new Error("Script is not loaded.");for(var o in c.observers)c.observers[o](c);delete window[a.callbackName]},x.componentDidMount=function(){var c=this,o=this.setupScriptURL(),h=this.asyncScriptLoaderGetScriptLoaderID(),g=a,E=g.globalName,R=g.callbackName,L=g.scriptId;if(E&&typeof window[E]<"u"&&(_[o]={loaded:!0,observers:{}}),_[o]){var b=_[o];if(b&&(b.loaded||b.errored)){this.asyncScriptLoaderHandleLoad(b);return}b.observers[h]=function(l){return c.asyncScriptLoaderHandleLoad(l)};return}var O={};O[h]=function(l){return c.asyncScriptLoaderHandleLoad(l)},_[o]={loaded:!1,observers:O};var y=document.createElement("script");y.src=o,y.async=!0;for(var S in a.attributes)y.setAttribute(S,a.attributes[S]);L&&(y.id=L);var d=function(j){if(_[o]){var q=_[o],N=q.observers;for(var F in N)j(N[F])&&delete N[F]}};R&&typeof window<"u"&&(window[R]=function(){return c.asyncScriptLoaderTriggerOnScriptLoaded()}),y.onload=function(){var l=_[o];l&&(l.loaded=!0,d(function(j){return R?!1:(j(l),!0)}))},y.onerror=function(){var l=_[o];l&&(l.errored=!0,d(function(j){return j(l),!0}))},document.body.appendChild(y)},x.componentWillUnmount=function(){var c=this.__scriptURL;if(a.removeOnUnmount===!0)for(var o=document.getElementsByTagName("script"),h=0;h<o.length;h+=1)o[h].src.indexOf(c)>-1&&o[h].parentNode&&o[h].parentNode.removeChild(o[h]);var g=_[c];g&&(delete g.observers[this.asyncScriptLoaderGetScriptLoaderID()],a.removeOnUnmount===!0&&delete _[c])},x.render=function(){var c=a.globalName,o=this.props;o.asyncScriptOnLoad;var h=o.forwardedRef,g=Q(o,["asyncScriptOnLoad","forwardedRef"]);return c&&typeof window<"u"&&(g[c]=typeof window[c]<"u"?window[c]:void 0),g.ref=h,u.createElement(n,g)},m})(u.Component),i=u.forwardRef(function(v,m){return u.createElement(p,D({},v,{forwardedRef:m}))});return i.displayName="AsyncScriptLoader("+t+")",i.propTypes={asyncScriptOnLoad:f.func},$(i,n)}}var H="onloadcallback",ne="grecaptcha";function U(){return typeof window<"u"&&window.recaptchaOptions||{}}function ie(){var e=U(),a=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+a+"/recaptcha/enterprise.js?onload="+H+"&render=explicit":"https://"+a+"/recaptcha/api.js?onload="+H+"&render=explicit"}const ae=re(ie,{callbackName:H,globalName:ne,attributes:U().nonce?{nonce:U().nonce}:{}})(I),oe="6LeL-lYtAAAAACHPHpptgNBTKLXrsjPD3aaTmT7T",se="6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI",ce=e=>typeof e=="string"&&/^(www\.)?metaixmio\.gr$/i.test(e)?oe:se,de="ypanaxorisi-politiki-epistrofon",le={fn:"",ln:"",eml:"",uid:"",products:"",reason:""},pe=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),je=()=>{const{t:e}=W(),{isLoading:a,data:r,error:n}=K(de),t=u.useRef(null),p=u.useMemo(()=>ce(typeof window<"u"?window.location.hostname:""),[]),[i,v]=u.useState(le),[m,x
1]=u.useState({}),[w,c]=u.useState(!1),[o,h]=u.useState(!1),[g,E]=u.useState(!1),[R,L]=u.useState(null),b=u.useMemo(()=>{if(r)return{sh:!!r.sh,sm:!!r.sm,sf:!!r.sf,sf1:!!r.sf1,sf2:!!r.sf2,sf3:!!r.sf3,sf4:!!r.sf4,ss:!!r.ss,sb:!!r.sbh}},[r]),O=d=>{d.preventDefault();const l={};if((!i.fn||i.fn.trim()==="")&&(l.fn=e("withdrawal_required_field")),(!i.ln||i.ln.trim()==="")&&(l.ln=e("withdrawal_required_field")),!i.eml||i.eml.trim()===""?l.eml=e("withdrawal_required_field"):pe(i.eml.trim())||(l.eml=e("withdrawal_invalid_email")),(!i.uid||i.uid.trim()==="")&&(l.uid=e("withdrawal_required_field")),Object.keys(l).length!==0){x(l),k(e("withdrawal_failure_required"));return}if(x({}),G==="production"&&!R){k(e("withdrawal_recaptcha_required"));return}c(!0)},y=()=>{h(!0),V({fn:i.fn.trim(),ln:i.ln.trim(),eml:i.eml.trim(),uid:i.uid.trim(),products:i.products.trim(),reason:i.reason.trim(),recaptcha:R}).then(()=>{c(!1),E(!0)}).catch(d=>{var l;(l=t.current)==null||l.reset(),L(null),c(!1),k(typeof d=="string"&&d.length>0?d:e("withdrawal_failure_message"))}).finally(()=>h(!1))};if(a)return s.jsx(s.Fragment,{});if(n)return s.jsx(B,{});const S=[{label:e("withdrawal_first_name"),value:i.fn.trim()},{label:e("withdrawal_last_name"),value:i.ln.trim()},{label:e("withdrawal_email"),value:i.eml.trim()},{label:e("withdrawal_order_uid"),value:i.uid.trim()},{label:e("withdrawal_products_label"),value:i.products.trim()},{label:e("withdrawal_reason_label"),value:i.reason.trim()}].filter(d=>d.value!=="");return s.jsx(Y,{navigationLinks:b,activeLink:r.eurl,pageTitle:(r==null?void 0:r.tl)||e("withdrawal_title"),page:r,children:s.jsxs("div",{id:"withdrawal-page",children:[s.jsx("h1",{className:"content-page-title",children:(r==null?void 0:r.h1)||(r==null?void 0:r.tl)||e("withdrawal_title")}),s.jsx(z,{className:"cms-content html-container",html:r==null?void 0:r.bd}),s.jsx("div",{className:"form-container",children:g?s.jsx("p",{className:"final-message",children:e("withdrawal_success_message")}):s.jsxs(s.Fragment,{children:[s.jsx("form",{onSubmit:O,noValidate:!0,style:w?{display:"none"}:void 0,children:s.jsxs("div",{className:"inputs",children:[s.jsx(C,{type:"text",value:i.fn,onChange:d=>v({...i,fn:d.target.value}),placeholder:`*${e("withdrawal_first_name")}`,errorMsg:m.fn,maxLength:100}),s.jsx(C,{type:"text",value:i.ln,onChange:d=>v({...i,ln:d.target.value}),placeholder:`*${e("withdrawal_last_name")}`,errorMsg:m.ln,maxLength:100}),s.jsx(C,{type:"email",value:i.eml,onChange:d=>v({...i,eml:d.target.value}),placeholder:`*${e("withdrawal_email")}`,errorMsg:m.eml,maxLength:255}),s.jsx(C,{type:"text",value:i.uid,onChange:d=>v({...i,uid:d.target.value}),placeholder:`*${e("withdrawal_order_uid")}`,errorMsg:m.uid,maxLength:50}),s.jsx(M,{value:i.products,onChange:d=>v({...i,products:d.target.value}),placeholder:e("withdrawal_products_placeholder"),errorMsg:m.products,maxLength:2e3}),s.jsx(M,{value:i.reason,onChange:d=>v({...i,reason:d.target.value}),placeholder:e("withdrawal_reason_placeholder"),errorMsg:m.reason,maxLength:2e3}),s.jsx(ae,{ref:t,sitekey:p,onChange:L,onExpired:()=>L(null)}),s.jsx("button",{type:"submit",children:e("withdrawal_continue")})]})}),w&&s.jsxs("div",{className:"withdrawal-review",children:[s.jsx("p",{className:"review-intro",children:e("withdrawal_review_intro")}),s.jsx("dl",{className:"review-list",children:S.map(d=>s.jsxs("div",{className:"review-row",children:[s.jsx("dt",{children:d.label}),s.jsx("dd",{children:d.value})]},d.label))}),s.jsxs("div",{className:"review-actions",children:[s.jsx("button",{type:"button",className:"edit",disabled:o,onClick:()=>c(!1),children:e("withdrawal_edit")}),s.jsx("button",{type:"button",className:"confirm",disabled:o,onClick:y,children:e("withdrawal_confirm_submit")})]})]})]})})]})})};export{je as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.