const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/frontend-components-large.Baptij-h.js","assets/axios-vendor.B9ygI19o.js","assets/vue-vendor.CH68WEXx.js","assets/charts-vendor.DStlN2dP.js","assets/frontend-components-large.B3h_mEes.css","assets/frontend-templates.CXFAUBcN.js"])))=>i.map(i=>d[i]); import{c as W,o as c,w as x,a as d,F as E,r as A,n as S,b as i,t as m,T as V,d as k,e as f,f as H,g as P,h as $,i as D,j as q,k as j,l as C,v,m as z}from"./vue-vendor.CH68WEXx.js";import{a as p}from"./axios-vendor.B9ygI19o.js";const w=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},K={name:"Toast",data(){return{toasts:[]}},methods:{show(e,t="success"){const n=Date.now()+Math.random(),r={id:n,message:e,type:t};this.toasts.push(r),setTimeout(()=>{this.removeToast(n)},5e3)},removeToast(e){const t=this.toasts.findIndex(n=>n.id===e);t>-1&&this.toasts.splice(t,1)},getIcon(e){switch(e){case"success":return"fas fa-check-circle";case"error":return"fas fa-exclamation-circle";case"warning":return"fas fa-exclamation-triangle";case"info":return"fas fa-info-circle";default:return"fas fa-info-circle"}}},mounted(){this.$root.$toast=this}},G={class:"toast-icon"},J={class:"toast-content"},Q={class:"toast-message"},X=["onClick"];function Y(e,t,n,r,s,o){return c(),W(V,{name:"toast",tag:"div",class:"toast-container"},{default:x(()=>[(c(!0),d(E,null,A(s.toasts,a=>(c(),d("div",{key:a.id,class:S(["toast",`toast-${a.type}`])},[i("div",G,[i("i",{class:S(o.getIcon(a.type))},null,2)]),i("div",J,[i("div",Q,m(a.message),1)]),i("button",{onClick:l=>o.removeToast(a.id),class:"toast-close"},[...t[0]||(t[0]=[i("i",{class:"fas fa-times"},null,-1)])],8,X)],2))),128))]),_:1})}const qe=w(K,[["render",Y],["__scopeId","data-v-33119f1b"]]),Z="modulepreload",tt=function(e){return"/"+e},B={},T=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=Promise.allSettled(n.map(u=>{if(u=tt(u),u in B)return;B[u]=!0;const _=u.endsWith(".css"),h=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${h}`))return;const g=document.createElement("link");if(g.rel=_?"stylesheet":Z,_||(g.as="script"),g.crossOrigin="",g.href=u,l&&g.setAttribute("nonce",l),document.head.appendChild(g),_)return new Promise((y,b)=>{g.addEventListener("load",y),g.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return s.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},et={name:"ComponentRouter",components:{ContentComponent:k(()=>T(()=>Promise.resolve().then(()=>bt),void 0)),CategoryComponent:k(()=>T(()=>Promise.resolve().then(()=>Yt),void 0)),EmptyComponent:k(()=>T(()=>Promise.resolve().then(()=>se),void 0)),ContactComponent:k(()=>T(()=>Promise.resolve().then(()=>we),void 0)),UserComponent:k(()=>T(()=>import("./frontend-components-large.Baptij-h.js"),__vite__mapDeps([0,1,2,3,4]))),TemplatesComponent:k(()=>T(()=>Promise.resolve().then(()=>Me),void 0)),SubscriptionsComponent:k(()=>T(()=>Promise.resolve().then(()=>je),void 0))},data(){var r;let e=null,t=null,n=null;try{const s=(r=this.$route)==null?void 0:r.meta;if(s&&s.componentData){e=s.componentData;const o=s.componentData.menuItem;o&&(o.item_type==="article"?(t="ContentComponent",n="com_content"):o.item_type==="category"?(t="CategoryComponent",n="com_categories"):o.item_type==="contact"?(t="ContactComponent",n="com_contact"):o.item_type==="user"?(t="UserComponent",n="com_user"):o.item_type==="empty"?(t="EmptyComponent",n="com_empty"):o.item_type==="templates"?(t="TemplatesComponent",n="com_templates"):o.item_type==="subscriptions"&&(t="SubscriptionsComponent",n="com_subscriptions"))}}catch{}return{currentComponent:t,componentName:n,componentData:e,showNotFound:!1,notFoundTimeout:null,componentsCache:{}}},computed:{effectiveComponentData(){var e;if(this.componentData)return this.componentData;try{const t=(e=this.$route)==null?void 0:e.meta;if(t&&t.componentData)return t.componentData}catch{}return null}},provide(){return{componentData:()=>this.effectiveComponentData}},created(){const e=this.$route.meta;if(e&&e.componentData){this.componentData||(this.componentData=e.componentData);const t=e.componentData.menuItem;t&&!this.currentComponent&&(t.item_type==="article"?(this.currentComponent="ContentComponent",this.componentName="com_content"):t.item_type==="category"?(this.currentComponent="CategoryComponent",this.componentName="com_categories"):t.item_type==="contact"?(this.currentComponent="ContactComponent",this.componentName="com_contact"):t.item_type==="user"?(this.currentComponent="UserComponent",this.componentName="com_user"):t.item_type==="empty"?(this.currentComponent="EmptyComponent",this.componentName="com_empty"):t.item_type==="templates"?(this.currentComponent="TemplatesComponent",this.componentName="com_templates"):t.item_type==="subscriptions"&&(this.currentComponent="SubscriptionsComponent",this.componentName="com_subscriptions")),e.seo||t&&(this.$route.meta={...this.$route.meta,seo:{meta_title:t.meta_title||t.title||"",meta_description:t.meta_description||"",meta_keywords:t.meta_keywords||""}})}},activated(){this.loadComponent()},async mounted(){await this.$nextTick();const e=this.$route.meta;if(e&&e.componentData){if(this.componentData||(this.componentData=e.componentData),!this.currentComponent){const t=e.componentData.menuItem;t&&(t.item_type==="article"?(this.currentComponent="ContentComponent",this.componentName="com_content"):t.item_type==="category"?(this.currentComponent="CategoryComponent",this.componentName="com_categories"):t.item_type==="contact"?(this.currentComponent="ContactComponent",this.componentName="com_contact"):t.item_type==="user"?(this.currentComponent="UserComponent",this.componentName="com_user"):t.item_type==="empty"&&(this.currentComponent="EmptyComponent",this.componentName="com_empty"))}await this.$nextTick()}else await this.loadComponent()},beforeUnmount(){this.notFoundTimeout&&(clearTimeout(this.notFoundTimeout),this.notFoundTimeout=null)},watch:{$route(){this.loadComponent()},currentComponent(e,t){this.notFoundTimeout&&(clearTimeout(this.notFoundTimeout),this.notFoundTimeout=null),e?this.showNotFound=!1:t!=null?this.showNotFound=!1:this.notFoundTimeout=setTimeout(()=>{this.currentComponent||(this.showNotFound=!0)},1e3)}},methods:{triggerSEOTagsUpdate(){this.$root.$emit("update-seo-tags",this.$route),this.$root&&typeof this.$root.updateSEOTags=="function"&&this.$root.updateSEOTags(this.$route)},async loadComponent(){const e=this.$route.path;if(e==="/"||e==="")await this.loadDefaultMenuItem();else{const t=e.split("/").filter(n=>n);if(t.length===0)await this.loadDefaultMenuItem();else if(t[0]==="content"&&t.length>1){const n=t[1];await this.loadArticleByAlias(n)}else await this.findMenuItemByAlias(t[0])}},async loadDefaultMenuItem(){var e;try{const n=(await p.get("/menus")).data.data||[];for(const r of n){const s=await p.get(`/menus/${r.id}`),a=this.flattenMenuItems(((e=s.data.data)==null?void 0:e.items)||[]).find(l=>(l.is_default===1||l.is_default==="1"||l.is_default===!0)&&l.published);if(a){await this.loadContentByMenuItem(a);return}}this.componentName=null,this.currentComponent=null}catch(t){console.error("Error loading default menu item:",t),this.componentName=null,this.currentComponent=null}},async findMenuItemByAlias(e){var t;try{const n=decodeURIComponent(e||""),s=(await p.get("/menus")).data.data||[];for(const o of s){const a=await p.get(`/menus/${o.id}`),u=this.flattenMenuItems(((t=a.data.data)==null?void 0:t.items)||[]).find(_=>_.alias===n&&_.published);if(u){if((u.is_default===1||u.is_default==="1"||u.is_default===!0)&&this.$route.path!=="/"){this.$router.replace("/");return}await this.loadContentByMenuItem(u),this.$nextTick(()=>{this.$root&&this.$root.$options.methods&&this.$root.$options.methods.updateSEOTags&&this.$root.updateSEOTags(this.$route)});return}}this.currentComponent=null,this.componentName=null,this.componentData=null,this.showNotFound=!0,this.$route.meta={seo:null,componentData:null}}catch(n){console.error("Error finding menu item:",n),this.currentComponent=null,this.componentName=null,this.componentData=null,this.showNotFound=!0,this.$route.meta={seo:null,componentData:null}}},async loadContentByMenuItem(e){if(e.item_type==="article"){if(!await this.isComponentEnabled("com_content")){this.currentComponent=null,this.componentData=null,this.showNotFound=!0;return}}else if(e.item_type==="category"){if(!await this.isComponentEnabled("com_categories")){this.currentComponent=null,this.componentData=null,this.showNotFound=!0;return}}else if(e.item_type==="contact"){if(!await this.isComponentEnabled("com_contact")){this.currentComponent=null,this.componentData=null,this.showNotFound=!0;return}}else if(e.item_type==="user"&&!await this.isComponentEnabled("com_user")){this.currentComponent=null,this.componentData=null,this.showNotFound=!0;return}if(e.component_id&&e.component_enabled!==void 0&&e.component_enabled!=1){this.currentComponent=null,this.componentData=null,this.showNotFound=!0;return}if(e.item_type==="external"){if(e.link){window.location.href=e.link;return}this.currentComponent=null,this.componentData=null}else if(e.item_type==="contact")this.componentName="com_contact",this.currentComponent="ContactComponent",this.componentData={menuItem:e},this.$route.meta={...this.$route.meta,componentData:{menuItem:e},seo:{meta_title:e.meta_title||e.title||"Contact",meta_description:e.meta_description||"",meta_keywords:e.meta_keywords||""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()});else if(e.item_type==="user")this.componentName="com_user",this.currentComponent="UserComponent",this.componentData={menuItem:e},this.$route.meta={...this.$route.meta,componentData:{menuItem:e},seo:{meta_title:e.meta_title||e.title||"User Cabinet",meta_description:e.meta_description||"",meta_keywords:e.meta_keywords||""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()});else if(e.item_type==="empty")this.componentName="com_empty",this.currentComponent="EmptyComponent",this.componentData={menuItem:e},this.$route.meta={...this.$route.meta,componentData:{menuItem:e},seo:{meta_title:e.meta_title||e.title||"CMS Site",meta_description:e.meta_description||"",meta_keywords:e.meta_keywords||""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()});else if(e.item_type==="templates")this.componentName="com_templates",this.currentComponent="TemplatesComponent",this.componentData={menuItem:e},this.$route.meta={...this.$route.meta,componentData:{menuItem:e},seo:{meta_title:e.meta_title||e.title||"Templates",meta_description:e.meta_description||"",meta_keywords:e.meta_keywords||""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()});else if(e.item_type==="subscriptions")this.componentName="com_subscriptions",this.currentComponent="SubscriptionsComponent",this.componentData={menuItem:e},this.$route.meta={...this.$route.meta,componentData:{menuItem:e},seo:{meta_title:e.meta_title||e.title||"Subscriptions",meta_description:e.meta_description||"",meta_keywords:e.meta_keywords||""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()});else if(e.item_type==="article"&&e.article_id)this.componentName="com_content",this.currentComponent="ContentComponent",await this.loadArticleById(e.article_id,e);else if(e.item_type==="category"&&e.category_id)this.componentName="com_categories",this.currentComponent="CategoryComponent",await this.loadCategoryById(e.category_id,e);else{this.$route.meta={...this.$route.meta,componentData:{menuItem:e},seo:{meta_title:e.meta_title||e.title||"CMS Site",meta_description:e.meta_description||"",meta_keywords:e.meta_keywords||""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()});const t=e.component_name;t&&await this.loadComponentByType(t,e.alias)}},flattenMenuItems(e){const t=[];return e.forEach(n=>{t.push(n),n.children&&t.push(...this.flattenMenuItems(n.children))}),t},async loadComponentByType(e,t){switch(e){case"com_content":this.currentComponent="ContentComponent",await this.loadArticleByAlias(t);break;case"com_categories":this.currentComponent="CategoryComponent",await this.loadCategoryByAlias(t);break;default:this.currentComponent=null}},async loadArticleById(e,t=null){try{const n=await p.get(`/articles/${e}`);if(n.data.success&&n.data.data){const r=n.data.data;r.published?(t&&(r.show_title=t.show_title!==void 0?t.show_title:1,r.meta_title=t.meta_title||null,r.meta_description=t.meta_description||null,r.meta_keywords=t.meta_keywords||null),this.componentData={componentData:r,menuItem:t},t?(this.$route.meta={...this.$route.meta,componentData:{componentData:r,menuItem:t},seo:{meta_title:t.meta_title||r.title,meta_description:t.meta_description||r.introtext||"",meta_keywords:t.meta_keywords||""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()})):this.$route.meta={...this.$route.meta,componentData:{componentData:r},seo:{meta_title:r.title,meta_description:r.introtext||"",meta_keywords:""}}):(console.warn("loadArticleById: Article is not published:",e),this.componentData=null)}else console.warn("loadArticleById: Article not found or failed:",e),this.componentData=null}catch(n){console.error("loadArticleById: Error loading article by ID:",n),this.componentData=null}},async loadArticleByAlias(e){try{const t=decodeURIComponent(e||""),s=((await p.get("/articles?published=1")).data.data||[]).find(o=>o.alias===t&&o.published);s?(this.currentComponent="ContentComponent",this.componentName="com_content",this.componentData={componentData:s},this.$route.meta={...this.$route.meta,componentData:{componentData:s},seo:{meta_title:s.title||"",meta_description:s.introtext||"",meta_keywords:""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()})):(this.currentComponent=null,this.componentName=null,this.componentData=null,this.showNotFound=!0)}catch(t){console.error("Error loading article by alias:",t),this.currentComponent=null,this.componentName=null,this.componentData=null,this.showNotFound=!0}},async loadCategoryById(e,t=null){try{const n=await p.get(`/categories/${e}`);if(n.data.success&&n.data.data){const r=n.data.data;this.componentData={componentData:r,menuItem:t},t?(this.$route.meta={...this.$route.meta,componentData:{componentData:r,menuItem:t},seo:{meta_title:t.meta_title||r.title,meta_description:t.meta_description||r.description||"",meta_keywords:t.meta_keywords||""}},this.$nextTick(()=>{this.triggerSEOTagsUpdate()})):this.$route.meta={...this.$route.meta,componentData:{componentData:r},seo:{meta_title:r.title,meta_description:r.description||"",meta_keywords:""}}}}catch(n){console.error("Error loading category by ID:",n),this.componentData=null}},async loadCategoryByAlias(e){try{const t=decodeURIComponent(e||""),s=((await p.get("/categories?published=1")).data.data||[]).find(o=>o.alias===t&&o.published);this.componentData=s}catch(t){console.error("Error loading category by alias:",t),this.componentData=null}},async isComponentEnabled(e){if(this.componentsCache[e]!==void 0)return this.componentsCache[e];try{const r=((await p.get("/components")).data.data||[]).find(o=>o.name===e),s=r?r.enabled===1||r.enabled===!0:!0;return this.componentsCache[e]=s,s}catch(t){return console.error("Error checking component status:",t),this.componentsCache[e]=!0,!0}}},provide(){return{componentData:this}}},ot={class:"component-router"},nt={key:1,class:"component-not-found"};function st(e,t,n,r,s,o){return c(),d("div",ot,[s.currentComponent?(c(),W(H(s.currentComponent),{key:0,"component-data":o.effectiveComponentData},null,8,["component-data"])):s.showNotFound?(c(),d("div",nt,[...t[0]||(t[0]=[i("h1",null,"דף לא נמצא",-1),i("p",null,"הרכיב לא נמצא או לא זמין.",-1)])])):f("",!0)])}const rt=w(et,[["render",st],["__scopeId","data-v-6a780a2c"]]),ze=Object.freeze(Object.defineProperty({__proto__:null,default:rt},Symbol.toStringTag,{value:"Module"})),it={name:"ContentComponent",components:{Module:k(()=>T(()=>import("./frontend-templates.CXFAUBcN.js").then(e=>e.M),__vite__mapDeps([5,1,2,3])))},props:{componentData:{type:Object,default:null}},data(){return{article:null,isLoading:!0,showNotFound:!1,notFoundTimeout:null,modulesCache:{},modulesLoaded:!1,recaptchaSiteKey:"6LfBxA0pAAAAANJoH_iWyyDRmoQrihebgvP75IcG",inlineRecaptchaWidgets:new Map,csrfToken:null}},created(){if(this.componentData){const e=this.componentData.componentData||this.componentData;e&&e.id&&(this.article=e,this.isLoading=!1,this.showNotFound=!1)}},async mounted(){var e;if((e=this.$el)==null||e.addEventListener("click",this.handleInternalLinkClick),!(this.article&&this.article.id)){if(this.showNotFound=!1,await this.$nextTick(),this.componentData){const t=this.componentData.componentData||this.componentData;if(t&&t.id){this.article=t,this.isLoading=!1,this.showNotFound=!1;return}}this.isLoading=!0,this.showNotFound=!1,await this.ensureCsrfToken(),this.setupInlineDonationForms()}},beforeUnmount(){var e;this.notFoundTimeout&&(clearTimeout(this.notFoundTimeout),this.notFoundTimeout=null),(e=this.$el)==null||e.removeEventListener("click",this.handleInternalLinkClick),this.inlineRecaptchaWidgets.clear()},watch:{$route(){},componentData:{handler(e,t){if(this.notFoundTimeout&&(clearTimeout(this.notFoundTimeout),this.notFoundTimeout=null),!e){this.article=null,this.isLoading=!0,this.showNotFound=!1;return}const n=e.componentData||e;n&&n.id?(this.article=n,this.isLoading=!1,this.showNotFound=!1,this.loadModulesFromContent()):(this.article=null,this.isLoading=!0,this.showNotFound=!1)},immediate:!0,deep:!0},article:{handler(e){e&&e.fulltext&&this.loadModulesFromContent(),this.$nextTick(()=>{this.setupInlineDonationForms()})},immediate:!0}},computed:{showTitle(){var t;const e=(t=this.componentData)==null?void 0:t.menuItem;return e&&e.show_title!==void 0?e.show_title===1||e.show_title===!0:this.article&&this.article.show_title!==void 0?this.article.show_title===1||this.article.show_title===!0:!0},displayTitle(){var t;const e=(t=this.componentData)==null?void 0:t.menuItem;return e&&e.title?e.title:this.article?this.article.title:""},processedIntrotext(){return!this.article||!this.article.introtext?"":this.processContent(this.article.introtext)},fulltextParts(){if(!this.article||!this.article.fulltext)return[];const e=[],t=this.article.fulltext,n=/\{\{moduleid\s+(\d+)\}\}/gi;let r=0,s;for(;(s=n.exec(t))!==null;){if(s.index>r){const l=t.substring(r,s.index);l.trim()&&e.push({type:"html",content:this.processContent(l)})}const o=parseInt(s[1]),a=this.modulesCache[o];a&&e.push({type:"module",module:a}),r=s.index+s[0].length}if(r{if(typeof window>"u"){e();return}if(window.grecaptcha&&window.grecaptcha.render){e();return}const n=document.getElementById("recaptcha-v2-script");if(n){n.addEventListener("load",()=>e(),{once:!0}),n.addEventListener("error",()=>t(new Error("reCAPTCHA load failed")),{once:!0});return}const r=document.createElement("script");r.id="recaptcha-v2-script",r.src="https://www.google.com/recaptcha/api.js",r.async=!0,r.defer=!0,r.onload=()=>e(),r.onerror=()=>t(new Error("reCAPTCHA load failed")),document.head.appendChild(r)})},async setupInlineDonationForms(){if(typeof window>"u")return;const e=this.$el;if(!e)return;const t=e.querySelectorAll('form[onsubmit*="showSuccessMessage"], form[data-inline-contact="1"]');t.length&&(await this.loadRecaptchaScript().catch(n=>{console.error("Error loading reCAPTCHA script:",n)}),t.forEach((n,r)=>{var _;if(n.dataset.inlineContactInitialized==="1")return;n.dataset.inlineContactInitialized="1",n.dataset.inlineContact="1",n.removeAttribute("onsubmit");const s=document.createElement("div");s.className="inline-recaptcha-wrap flex justify-center my-2";const o=document.createElement("div");o.id=`inline-recaptcha-${r}-${Date.now()}`,s.appendChild(o);const a=n.querySelector('button[type="submit"]');a&&a.parentElement?(_=a.parentElement.parentElement)==null||_.insertBefore(s,a.parentElement):n.appendChild(s);let l="",u=null;window.grecaptcha&&window.grecaptcha.render&&window.grecaptcha.ready(()=>{u=window.grecaptcha.render(o,{sitekey:this.recaptchaSiteKey,callback:h=>{l=h||""},"expired-callback":()=>{l=""}}),this.inlineRecaptchaWidgets.set(n,{widgetId:u,getToken:()=>l,setToken:h=>{l=h}})}),n.addEventListener("submit",async h=>{h.preventDefault(),await this.submitInlineDonationForm(n)})}))},async submitInlineDonationForm(e){var u,_,h,g,y,b,F,N,L,M,R,O;const t=e.querySelector('button[type="submit"]'),n=e.querySelector("#home-inline-msg"),r=e.querySelector('input[type="text"]'),s=e.querySelector('input[type="tel"]'),o=this.inlineRecaptchaWidgets.get(e),a=((u=o==null?void 0:o.getToken)==null?void 0:u.call(o))||"";if(!((_=r==null?void 0:r.value)!=null&&_.trim())||!((h=s==null?void 0:s.value)!=null&&h.trim())){(g=this.$root.$toast)==null||g.show("אנא מלאו את כל השדות הנדרשים","error");return}if(!a){(y=this.$root.$toast)==null||y.show("אנא אשרו שאינכם רובוט","error");return}if(await this.ensureCsrfToken(),!this.csrfToken){(b=this.$root.$toast)==null||b.show("שגיאה באימות הטופס. נסו שוב.","error");return}const l=t?t.innerHTML:"";t&&(t.disabled=!0,t.innerHTML=` שילחו פנייה `);try{const I={fullName:r.value.trim(),phone:s.value.trim(),email:"inline-form@computer.org.il",city:"לא צוין",street:"",message:"פנייה מהטופס המקוצר בעמוד הבית",subject:"donation",recaptchaToken:a,csrf_token:this.csrfToken},U=await p.post("/contact",I,{headers:{"X-CSRF-Token":this.csrfToken}});(F=U.data)!=null&&F.success?(r.value="",s.value="",n&&n.classList.remove("hidden"),window.grecaptcha&&(o==null?void 0:o.widgetId)!==null&&(o==null?void 0:o.widgetId)!==void 0&&(window.grecaptcha.reset(o.widgetId),o.setToken(""))):(L=this.$root.$toast)==null||L.show(((N=U.data)==null?void 0:N.message)||"אירעה שגיאה בשליחת הטופס. אנא נסו שוב.","error")}catch(I){console.error("Error submitting inline donation form:",I),(O=this.$root.$toast)==null||O.show(((R=(M=I.response)==null?void 0:M.data)==null?void 0:R.message)||"אירעה שגיאה בשליחת הטופס. אנא נסו שוב.","error")}finally{t&&(t.disabled=!1,t.innerHTML=l)}},async loadArticle(){var n;this.notFoundTimeout&&(clearTimeout(this.notFoundTimeout),this.notFoundTimeout=null),this.isLoading=!0,this.showNotFound=!1,this.article=null;const e=(n=this.componentData)==null?void 0:n.componentData;if(e&&e.id){this.article=e,this.isLoading=!1,this.showNotFound=!1,this.loadModulesFromContent();return}let t=this.$route.params.alias;if(!t){const r=this.$route.path.split("/").filter(s=>s);r.length>0&&r[0]==="content"&&r.length>1||r.length>0&&r[0]==="article"&&r.length>1?t=r[1]:r.length>0&&(t=r[r.length-1])}if(!t||t==="/"){this.article=null,this.isLoading=!1,this.showNotFound=!1;return}try{const s=(await p.get("/articles?published=1")).data.data||[];this.article=s.find(o=>o.alias===t&&o.published),this.article?(this.isLoading=!1,this.showNotFound=!1,this.loadModulesFromContent()):(this.isLoading=!1,this.notFoundTimeout=setTimeout(()=>{!this.article&&!this.isLoading&&(this.showNotFound=!0)},1e3))}catch(r){console.error("Error loading article:",r),this.article=null,this.isLoading=!1,this.notFoundTimeout=setTimeout(()=>{!this.article&&!this.isLoading&&(this.showNotFound=!0)},1e3)}},getImageUrl(e){if(!e)return"";const t=String(e).trim();return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("//")||t.startsWith("data:")||t.startsWith("blob:")||t.startsWith("#")||t.startsWith("/")?t:t.startsWith("media/")?`/${t}`:t.startsWith("./")?`/media/${t.slice(2)}`:`/media/${t}`},processContent(e){return e?e.replace(/]*?)src=["']([^"']+)["']([^>]*?)>/gi,(n,r,s,o)=>{const a=this.getImageUrl(s);return``}):""},async loadModulesFromContent(){if(!this.article||!this.article.fulltext)return;const e=/\{\{moduleid\s+(\d+)\}\}/gi,t=[];let n;for(;(n=e.exec(this.article.fulltext))!==null;){const r=parseInt(n[1]);t.includes(r)||t.push(r)}t.length>0&&await this.loadModules(t)},async loadModules(e){try{const t=e.filter(s=>!this.modulesCache[s]);if(t.length===0){this.modulesLoaded=!0;return}const r=(await p.get("/modules?published=1")).data.data||[];t.forEach(s=>{const o=r.find(a=>a.id===s&&a.published);o&&(this.modulesCache[s]=o)}),this.modulesLoaded=!0}catch(t){console.error("Error loading modules:",t),this.modulesLoaded=!0}}}},at={class:"content-component"},lt={key:0,class:"article"},ct={key:0},dt={key:1,class:"article-image"},ut=["src","alt"],mt=["innerHTML"],ht={key:3,class:"article-content"},pt=["innerHTML"],ft={key:1,class:"inline-module"},_t={key:1,class:"article-not-found"};function gt(e,t,n,r,s,o){const a=P("Module");return c(),d("div",at,[s.article?(c(),d("div",lt,[o.showTitle?(c(),d("h1",ct,m(o.displayTitle),1)):f("",!0),s.article.featured_image?(c(),d("div",dt,[i("img",{src:o.getImageUrl(s.article.featured_image),alt:s.article.title},null,8,ut)])):f("",!0),s.article.introtext?(c(),d("div",{key:2,class:"article-intro",innerHTML:o.processedIntrotext},null,8,mt)):f("",!0),s.article.fulltext?(c(),d("div",ht,[(c(!0),d(E,null,A(o.fulltextParts,(l,u)=>(c(),d(E,{key:u},[l.type==="html"?(c(),d("div",{key:0,innerHTML:l.content},null,8,pt)):l.type==="module"?(c(),d("div",ft,[$(a,{module:l.module},null,8,["module"])])):f("",!0)],64))),128))])):f("",!0)])):s.showNotFound?(c(),d("div",_t,[...t[0]||(t[0]=[i("h2",null,"מאמר לא נמצא",-1),i("p",null,"המאמר המבוקש לא קיים או נמחק.",-1)])])):f("",!0)])}const yt=w(it,[["render",gt]]),bt=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"})),wt={name:"CategoryComponent",props:{componentData:{type:Object,default:null}},computed:{menuItem(){var e;return((e=this.componentData)==null?void 0:e.menuItem)||null},featuredArticle(){return this.articles.length>0?this.articles[0]:null},gridArticles(){return this.articles.slice(1)}},data(){return{category:null,articles:[]}},created(){if(this.componentData){const e=this.componentData.componentData||this.componentData;e&&e.id&&(this.category=e,e.articles?this.articles=e.articles:this.loadArticles())}},async mounted(){this.category||await this.loadCategory()},watch:{$route(){this.loadCategory()},componentData:{handler(e){if(e){const t=e.componentData||e;t&&t.id&&(this.category=t,this.loadArticles())}},immediate:!0,deep:!0}},methods:{async loadCategory(){if(this.componentData){const t=this.componentData.componentData||this.componentData;if(t&&t.id){this.category=t,await this.loadArticles();return}}const e=this.$route.params.alias||this.$route.path.split("/").pop();try{const n=(await p.get("/categories?published=1")).data.data||[];this.category=n.find(r=>r.alias===e),this.category&&await this.loadArticles()}catch(t){console.error("Error loading category:",t)}},async loadArticles(){if(!(!this.category||!this.category.id))try{const e=await p.get(`/articles?category_id=${this.category.id}&published=1`);this.articles=e.data.data||[]}catch(e){console.error("Error loading articles:",e)}},getArticleLink(e){return!e||!e.alias?"#":`/content/${e.alias}`},getImageUrl(e){return e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("/media/")||e.startsWith("media/")?e.startsWith("/")?e:`/${e}`:e.startsWith("/")?e:`/media/${e}`:null},getDescription(e){if(e.introtext){const t=document.createElement("div");return t.innerHTML=e.introtext,t.textContent||t.innerText||""}if(e.fulltext){const t=document.createElement("div");t.innerHTML=e.fulltext;const n=t.textContent||t.innerText||"";return n.substring(0,150)+(n.length>150?"...":"")}return""},formatDate(e){if(!e)return"";const t=new Date(e),n=["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],r=t.getDate(),s=n[t.getMonth()],o=t.getFullYear(),a=s.substring(0,3);return`${r} ${a}', ${o}`},getReadTime(e){if(!e)return 0;const t=document.createElement("div");t.innerHTML=e;const n=(t.textContent||t.innerText||"").split(/\s+/).length;return Math.max(1,Math.ceil(n/200))}}},Ct={class:"category-component"},kt={key:0,class:"category-menu-title"},Tt={key:1,class:"category-articles"},vt={key:0,class:"featured-article"},Dt={class:"featured-article-image-wrapper"},xt=["src","alt"],$t={key:1,class:"featured-article-image-placeholder"},It={class:"featured-article-content"},Et={class:"featured-article-meta"},St={class:"featured-article-date"},At={class:"featured-article-read-time"},Ft={key:0,class:"featured-article-category-tag"},Nt={class:"featured-article-title"},Lt={class:"featured-article-description"},Mt={class:"featured-article-author"},Rt={key:1,class:"articles-grid"},Ot={class:"article-card-image-wrapper"},Ut=["src","alt"],Bt={key:1,class:"article-card-image-placeholder"},Wt={key:2,class:"article-card-category-tag"},Pt={class:"article-card-content"},jt={class:"article-card-meta"},Vt={class:"article-card-date"},Ht={class:"article-card-read-time"},qt={class:"article-card-title"},zt={class:"article-card-description"},Kt={class:"article-card-footer"},Gt={class:"article-card-author"},Jt={key:2,class:"no-articles"};function Qt(e,t,n,r,s,o){const a=P("router-link");return c(),d("div",Ct,[o.menuItem&&o.menuItem.title?(c(),d("div",kt,[i("h1",null,m(o.menuItem.title),1)])):f("",!0),s.articles.length?(c(),d("div",Tt,[o.featuredArticle?(c(),d("div",vt,[i("div",Dt,[o.getImageUrl(o.featuredArticle.featured_image)?(c(),d("img",{key:0,src:o.getImageUrl(o.featuredArticle.featured_image),alt:o.featuredArticle.title,class:"featured-article-image"},null,8,xt)):(c(),d("div",$t,[...t[0]||(t[0]=[i("i",{class:"fas fa-image"},null,-1)])])),t[1]||(t[1]=i("div",{class:"featured-article-badge"},"פוסט מומלץ",-1))]),i("div",It,[i("div",Et,[i("span",St,m(o.formatDate(o.featuredArticle.created_at)),1),i("span",At,m(o.getReadTime(o.featuredArticle.fulltext))+" דק' קריאה",1)]),s.category?(c(),d("div",Ft,m(s.category.title),1)):f("",!0),i("h2",Nt,[$(a,{to:o.getArticleLink(o.featuredArticle)},{default:x(()=>[D(m(o.featuredArticle.title),1)]),_:1},8,["to"])]),i("p",Lt,m(o.getDescription(o.featuredArticle)),1),i("div",Mt,[t[2]||(t[2]=i("i",{class:"fas fa-user-circle featured-article-author-icon"},null,-1)),i("span",null,"מאת "+m(o.featuredArticle.author||"מערכת"),1)])])])):f("",!0),o.gridArticles.length>0?(c(),d("div",Rt,[(c(!0),d(E,null,A(o.gridArticles,l=>(c(),d("article",{key:l.id,class:"article-card"},[i("div",Ot,[$(a,{to:o.getArticleLink(l)},{default:x(()=>[o.getImageUrl(l.featured_image)?(c(),d("img",{key:0,src:o.getImageUrl(l.featured_image),alt:l.title,class:"article-card-image"},null,8,Ut)):(c(),d("div",Bt,[...t[3]||(t[3]=[i("i",{class:"fas fa-image"},null,-1)])])),s.category?(c(),d("div",Wt,m(s.category.title),1)):f("",!0)]),_:2},1032,["to"])]),i("div",Pt,[i("div",jt,[i("span",Vt,m(o.formatDate(l.created_at)),1),i("span",Ht,m(o.getReadTime(l.fulltext))+" דק' קריאה",1)]),i("h3",qt,[$(a,{to:o.getArticleLink(l)},{default:x(()=>[D(m(l.title),1)]),_:2},1032,["to"])]),i("p",zt,m(o.getDescription(l)),1),i("div",Kt,[$(a,{to:o.getArticleLink(l),class:"article-card-read-more"},{default:x(()=>[...t[4]||(t[4]=[D(" קרא עוד ← ",-1)])]),_:1},8,["to"]),i("span",Gt,m(l.author||"מערכת"),1)])])]))),128))])):f("",!0)])):(c(),d("div",Jt,[...t[5]||(t[5]=[i("p",null,"אין מאמרים בקטגוריה זו עדיין.",-1)])]))])}const Xt=w(wt,[["render",Qt],["__scopeId","data-v-b85c1ecb"]]),Yt=Object.freeze(Object.defineProperty({__proto__:null,default:Xt},Symbol.toStringTag,{value:"Module"})),Zt={name:"EmptyComponent",props:{componentData:{type:Object,default:null}},computed:{menuItem(){return this.componentData?this.componentData.menuItem||this.componentData:null},displayTitle(){return this.menuItem&&this.menuItem.title||""},showTitle(){return this.menuItem&&this.menuItem.show_title!==void 0?this.menuItem.show_title===1||this.menuItem.show_title===!0:!0}}},te={class:"empty-component"},ee={key:0};function oe(e,t,n,r,s,o){return c(),d("div",te,[o.showTitle?(c(),d("h1",ee,m(o.displayTitle),1)):f("",!0)])}const ne=w(Zt,[["render",oe],["__scopeId","data-v-216dac74"]]),se=Object.freeze(Object.defineProperty({__proto__:null,default:ne},Symbol.toStringTag,{value:"Module"})),re={name:"ContactComponent",props:{componentData:{type:Object,default:null}},data(){return{formData:{firstName:"",lastName:"",phone:"",email:"",city:"",street:"",message:""},isSubmitting:!1,isSubmitted:!1,csrfToken:null,recaptchaSiteKey:"6LfBxA0pAAAAANJoH_iWyyDRmoQrihebgvP75IcG",recaptchaToken:"",recaptchaWidgetId:null}},async mounted(){var e;try{const t=await p.get("/auth/csrf-token");t.data&&t.data.success&&(this.csrfToken=t.data.csrf_token)}catch(t){console.error("Error fetching CSRF token:",t)}this.recaptchaSiteKey=((e=this.componentData)==null?void 0:e.recaptchaSiteKey)||this.recaptchaSiteKey,await this.initRecaptcha()},methods:{loadRecaptchaScript(){return new Promise((e,t)=>{if(typeof window>"u"){e();return}if(window.grecaptcha&&window.grecaptcha.render){e();return}const n=document.getElementById("recaptcha-v2-script");if(n){n.addEventListener("load",()=>e(),{once:!0}),n.addEventListener("error",()=>t(new Error("reCAPTCHA load failed")),{once:!0});return}const r=document.createElement("script");r.id="recaptcha-v2-script",r.src="https://www.google.com/recaptcha/api.js?render=explicit",r.async=!0,r.defer=!0,r.onload=()=>e(),r.onerror=()=>t(new Error("reCAPTCHA load failed")),document.head.appendChild(r)})},async initRecaptcha(){try{if(await this.loadRecaptchaScript(),!window.grecaptcha||!this.$refs.recaptchaContainer)return;window.grecaptcha.ready(()=>{!this.$refs.recaptchaContainer||this.recaptchaWidgetId!==null||(this.recaptchaWidgetId=window.grecaptcha.render(this.$refs.recaptchaContainer,{sitekey:this.recaptchaSiteKey,callback:e=>{this.recaptchaToken=e||""},"expired-callback":()=>{this.recaptchaToken=""}}))})}catch(e){console.error("Error initializing reCAPTCHA:",e)}},async submitForm(){var e,t,n,r,s,o,a,l,u,_;if(!this.isSubmitting){if(!this.recaptchaToken){(e=this.$root.$toast)==null||e.show("אנא אשרו שאינכם רובוט","error");return}if(!this.csrfToken)try{const h=await p.get("/auth/csrf-token");h.data&&h.data.success&&(this.csrfToken=h.data.csrf_token)}catch(h){console.error("Error fetching CSRF token:",h)}this.isSubmitting=!0;try{const g={fullName:`${this.formData.firstName} ${this.formData.lastName}`.trim(),phone:this.formData.phone.trim(),email:this.formData.email.trim(),city:this.formData.city.trim(),street:(this.formData.street||"").trim(),message:this.formData.message.trim(),subject:"donation",recaptchaToken:this.recaptchaToken,csrf_token:this.csrfToken},y=await p.post("/contact",g,{headers:{"X-CSRF-Token":this.csrfToken}});if(y.data&&y.data.success){this.isSubmitted=!0,this.formData={firstName:"",lastName:"",phone:"",email:"",city:"",street:"",message:""},this.recaptchaToken="",window.grecaptcha&&this.recaptchaWidgetId!==null&&window.grecaptcha.reset(this.recaptchaWidgetId);try{const b=await p.get("/auth/csrf-token");b.data&&b.data.success&&(this.csrfToken=b.data.csrf_token)}catch(b){console.error("Error refreshing CSRF token:",b)}}else{const b=((t=y.data)==null?void 0:t.message)||"אירעה שגיאה בשליחת הטופס. אנא נסו שוב.";(n=this.$root.$toast)==null||n.show(b,"error")}}catch(h){console.error("Error submitting form:",h);const g=((s=(r=h.response)==null?void 0:r.data)==null?void 0:s.message)||"אירעה שגיאה בשליחת הטופס. אנא נסו שוב.";if((o=this.$root.$toast)==null||o.show(g,"error"),((a=h.response)==null?void 0:a.status)===403&&((_=(u=(l=h.response)==null?void 0:l.data)==null?void 0:u.message)!=null&&_.includes("CSRF")))try{const y=await p.get("/auth/csrf-token");y.data&&y.data.success&&(this.csrfToken=y.data.csrf_token)}catch(y){console.error("Error refreshing CSRF token:",y)}window.grecaptcha&&this.recaptchaWidgetId!==null&&(this.recaptchaToken="",window.grecaptcha.reset(this.recaptchaWidgetId))}finally{this.isSubmitting=!1}}}}},ie={id:"contact",class:"bg-brand-lightgray py-16 md:py-24 border-t border-brand-border",dir:"rtl"},ae={class:"max-w-[900px] mx-auto px-4 md:px-8"},le={class:"bg-white shadow-tnc-card border-t-8 border-brand-green overflow-hidden"},ce={class:"p-8 md:p-12 lg:p-16"},de={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ue={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},me={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},he={class:"flex justify-center"},pe={ref:"recaptchaContainer"},fe=["disabled"],_e={key:0,class:"inline-block w-5 h-5 ml-2 animate-spin text-white align-middle",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ge={id:"main-contact-msg",class:"mt-4 p-4 bg-[#E8F5E9] border border-[#c8e6c9] text-brand-green font-bold text-center"};function ye(e,t,n,r,s,o){return c(),d("div",ie,[i("div",ae,[i("div",le,[t[19]||(t[19]=i("div",{class:"p-8 md:p-12 text-center border-b border-brand-border bg-[#FAFAFA]"},[i("h2",{class:"tnc-heading text-3xl md:text-5xl text-brand-dark mb-4"}," יצירת קשר לתרומה "),i("p",{class:"text-lg text-brand-gray max-w-xl mx-auto leading-relaxed"}," כל תרומה של ציוד מחשוב היא עולם ומלואו עבור הקהילה שלנו. מלאו את הפרטים ונחזור אליכם בהקדם לתיאום האיסוף. ")],-1)),i("div",ce,[i("form",{class:"space-y-6",onSubmit:t[7]||(t[7]=j((...a)=>o.submitForm&&o.submitForm(...a),["prevent"]))},[i("div",de,[i("div",null,[t[8]||(t[8]=i("label",{class:"block text-sm font-bold text-brand-dark mb-2"},"שם פרטי *",-1)),C(i("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>s.formData.firstName=a),type:"text",required:"",class:"w-full px-4 py-3 border border-gray-300 focus:border-brand-blue focus:outline-none transition-colors",placeholder:"שם פרטי / איש קשר בחברה"},null,512),[[v,s.formData.firstName]])]),i("div",null,[t[9]||(t[9]=i("label",{class:"block text-sm font-bold text-brand-dark mb-2"},"שם משפחה *",-1)),C(i("input",{"onUpdate:modelValue":t[1]||(t[1]=a=>s.formData.lastName=a),type:"text",required:"",class:"w-full px-4 py-3 border border-gray-300 focus:border-brand-blue focus:outline-none transition-colors",placeholder:"שם משפחה"},null,512),[[v,s.formData.lastName]])])]),i("div",ue,[i("div",null,[t[10]||(t[10]=i("label",{class:"block text-sm font-bold text-brand-dark mb-2"},"טלפון נייד זמין *",-1)),C(i("input",{"onUpdate:modelValue":t[2]||(t[2]=a=>s.formData.phone=a),type:"tel",required:"",class:"w-full px-4 py-3 border border-gray-300 focus:border-brand-blue focus:outline-none transition-colors text-right",dir:"rtl",placeholder:"050-0000000"},null,512),[[v,s.formData.phone]])]),i("div",null,[t[11]||(t[11]=i("label",{class:"block text-sm font-bold text-brand-dark mb-2"},"דואר אלקטרוני *",-1)),C(i("input",{"onUpdate:modelValue":t[3]||(t[3]=a=>s.formData.email=a),type:"email",required:"",class:"w-full px-4 py-3 border border-gray-300 focus:border-brand-blue focus:outline-none transition-colors text-left",dir:"ltr",placeholder:"email@example.com"},null,512),[[v,s.formData.email]])])]),i("div",me,[i("div",null,[t[12]||(t[12]=i("label",{class:"block text-sm font-bold text-brand-dark mb-2"},"עיר / יישוב *",-1)),C(i("input",{"onUpdate:modelValue":t[4]||(t[4]=a=>s.formData.city=a),type:"text",required:"",class:"w-full px-4 py-3 border border-gray-300 focus:border-brand-blue focus:outline-none transition-colors",placeholder:"מאיפה אתם בארץ?"},null,512),[[v,s.formData.city]])]),i("div",null,[t[13]||(t[13]=i("label",{class:"block text-sm font-bold text-brand-dark mb-2"},"רחוב",-1)),C(i("input",{"onUpdate:modelValue":t[5]||(t[5]=a=>s.formData.street=a),type:"text",class:"w-full px-4 py-3 border border-gray-300 focus:border-brand-blue focus:outline-none transition-colors",placeholder:"לצורך תיאום (לא חובה)"},null,512),[[v,s.formData.street]])])]),i("div",null,[t[14]||(t[14]=i("label",{class:"block text-sm font-bold text-brand-dark mb-2"},"פרטי הציוד המיועד לתרומה *",-1)),C(i("textarea",{"onUpdate:modelValue":t[6]||(t[6]=a=>s.formData.message=a),required:"",rows:"5",class:"w-full px-4 py-3 border border-gray-300 focus:border-brand-blue focus:outline-none transition-colors resize-none",placeholder:"ספרו לנו מה תרצו למסור (לפטופ, מחשבים נייחים, כמות מוערכת)..."},null,512),[[v,s.formData.message]])]),i("div",he,[i("div",pe,null,512)]),i("button",{type:"submit",class:"w-full bg-brand-blue hover:bg-blue-800 text-white font-bold text-lg py-4 transition-colors uppercase tracking-wide disabled:opacity-60 disabled:cursor-not-allowed",disabled:s.isSubmitting||!s.recaptchaToken},[s.isSubmitting?(c(),d("svg",_e,[...t[15]||(t[15]=[i("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),i("path",{class:"opacity-90",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):f("",!0),t[16]||(t[16]=D(" שלח פנייה לעמותה ",-1))],8,fe),C(i("div",ge,[...t[17]||(t[17]=[i("i",{class:"fa-solid fa-circle-check"},null,-1),D(" תודה רבה! פנייתך לתרומת המחשבים התקבלה. ",-1)])],512),[[z,s.isSubmitted]])],32),t[18]||(t[18]=q('
רחוב משכית 22, הרצליה פיתוח
',1))])])])])}const be=w(re,[["render",ye]]),we=Object.freeze(Object.defineProperty({__proto__:null,default:be},Symbol.toStringTag,{value:"Module"})),Ce={name:"ConfirmModal",props:{show:{type:Boolean,default:!1},title:{type:String,default:"אישור פעולה"},message:{type:String,required:!0},confirmText:{type:String,default:"אישור"}},emits:["confirm","cancel"],methods:{handleConfirm(){this.$emit("confirm")},handleCancel(){this.$emit("cancel")}}},ke={class:"modal-container"},Te={class:"modal-header"},ve={class:"modal-body"},De={class:"modal-footer"};function xe(e,t,n,r,s,o){return n.show?(c(),d("div",{key:0,class:"modal-overlay",onClick:t[3]||(t[3]=j((...a)=>o.handleCancel&&o.handleCancel(...a),["self"]))},[i("div",ke,[i("div",Te,[i("h3",null,m(n.title),1),i("button",{onClick:t[0]||(t[0]=(...a)=>o.handleCancel&&o.handleCancel(...a)),class:"modal-close"},[...t[4]||(t[4]=[i("i",{class:"fas fa-times"},null,-1)])])]),i("div",ve,[i("p",null,m(n.message),1)]),i("div",De,[i("button",{onClick:t[1]||(t[1]=(...a)=>o.handleCancel&&o.handleCancel(...a)),class:"btn-secondary"}," ביטול "),i("button",{onClick:t[2]||(t[2]=(...a)=>o.handleConfirm&&o.handleConfirm(...a)),class:"btn-danger"},[t[5]||(t[5]=i("i",{class:"fas fa-sign-out-alt"},null,-1)),D(" "+m(n.confirmText),1)])])])])):f("",!0)}const Ke=w(Ce,[["render",xe],["__scopeId","data-v-2e847fa0"]]),$e={name:"ToggleButton",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],methods:{toggle(){this.$emit("update:modelValue",!this.modelValue)}}};function Ie(e,t,n,r,s,o){return c(),d("div",{class:S(["toggle-button",{active:n.modelValue}]),onClick:t[0]||(t[0]=(...a)=>o.toggle&&o.toggle(...a))},[...t[1]||(t[1]=[i("div",{class:"toggle-slider"},null,-1)])],2)}const Ge=w($e,[["render",Ie],["__scopeId","data-v-1e94f3bb"]]),Ee={name:"TemplatesComponent",props:{componentData:{type:Object,default:null}},computed:{menuItem(){return this.componentData?this.componentData.menuItem||this.componentData:null},displayTitle(){return this.menuItem&&this.menuItem.title||"תבניות"},showTitle(){return this.menuItem&&this.menuItem.show_title!==void 0?this.menuItem.show_title===1||this.menuItem.show_title===!0:!0},subtitle(){var e;return((e=this.menuItem)==null?void 0:e.introtext)||""}}},Se={class:"templates-component"},Ae={key:0},Fe={key:1,class:"templates-component__sub"};function Ne(e,t,n,r,s,o){return c(),d("div",Se,[o.showTitle?(c(),d("h1",Ae,m(o.displayTitle),1)):f("",!0),o.subtitle?(c(),d("p",Fe,m(o.subtitle),1)):f("",!0)])}const Le=w(Ee,[["render",Ne],["__scopeId","data-v-28343fd2"]]),Me=Object.freeze(Object.defineProperty({__proto__:null,default:Le},Symbol.toStringTag,{value:"Module"})),Re={name:"SubscriptionsComponent",props:{componentData:{type:Object,default:null}},computed:{menuItem(){return this.componentData?this.componentData.menuItem||this.componentData:null},displayTitle(){return this.menuItem&&this.menuItem.title||"מנויים"},showTitle(){return this.menuItem&&this.menuItem.show_title!==void 0?this.menuItem.show_title===1||this.menuItem.show_title===!0:!0},subtitle(){var e;return((e=this.menuItem)==null?void 0:e.introtext)||""}}},Oe={class:"subscriptions-component"},Ue={key:0},Be={key:1,class:"subscriptions-component__sub"};function We(e,t,n,r,s,o){return c(),d("div",Oe,[o.showTitle?(c(),d("h1",Ue,m(o.displayTitle),1)):f("",!0),o.subtitle?(c(),d("p",Be,m(o.subtitle),1)):f("",!0)])}const Pe=w(Re,[["render",We],["__scopeId","data-v-097a92df"]]),je=Object.freeze(Object.defineProperty({__proto__:null,default:Pe},Symbol.toStringTag,{value:"Module"}));export{Ke as C,Ge as T,w as _,T as a,qe as b,ze as c};