diff --git a/public/build/assets/app-DyUnC4b0.js b/public/build/assets/app-BvRzPRXt.js similarity index 93% rename from public/build/assets/app-DyUnC4b0.js rename to public/build/assets/app-BvRzPRXt.js index 514b846a1..f40bcf3d9 100644 --- a/public/build/assets/app-DyUnC4b0.js +++ b/public/build/assets/app-BvRzPRXt.js @@ -64,7 +64,7 @@ __p += '`),At&&(Re+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Re+`return __p -}`;var gt=Lv(function(){return Rt(R,Je+"return "+Re).apply(n,K)});if(gt.source=Re,bf(gt))throw gt;return gt}function hA(i){return Nt(i).toLowerCase()}function pA(i){return Nt(i).toUpperCase()}function mA(i,l,d){if(i=Nt(i),i&&(d||l===n))return jm(i);if(!i||!(l=Pr(l)))return i;var g=as(i),w=as(l),R=qm(g,w),K=Wm(g,w)+1;return hi(g,R,K).join("")}function gA(i,l,d){if(i=Nt(i),i&&(d||l===n))return i.slice(0,zm(i)+1);if(!i||!(l=Pr(l)))return i;var g=as(i),w=Wm(g,as(l))+1;return hi(g,0,w).join("")}function vA(i,l,d){if(i=Nt(i),i&&(d||l===n))return i.replace(_d,"");if(!i||!(l=Pr(l)))return i;var g=as(i),w=qm(g,as(l));return hi(g,w).join("")}function yA(i,l){var d=F,g=ie;if(tn(l)){var w="separator"in l?l.separator:w;d="length"in l?mt(l.length):d,g="omission"in l?Pr(l.omission):g}i=Nt(i);var R=i.length;if(Ma(i)){var K=as(i);R=K.length}if(d>=R)return i;var X=d-Ra(g);if(X<1)return g;var oe=K?hi(K,0,X).join(""):i.slice(0,X);if(w===n)return oe+g;if(K&&(X+=oe.length-X),wf(w)){if(i.slice(X).search(w)){var Ee,Oe=oe;for(w.global||(w=Nd(w.source,Nt(dm.exec(w))+"g")),w.lastIndex=0;Ee=w.exec(Oe);)var Re=Ee.index;oe=oe.slice(0,Re===n?X:Re)}}else if(i.indexOf(Pr(w),X)!=X){var qe=oe.lastIndexOf(w);qe>-1&&(oe=oe.slice(0,qe))}return oe+g}function _A(i){return i=Nt(i),i&&pr.test(i)?i.replace(We,Kx):i}var bA=Fa(function(i,l,d){return i+(d?" ":"")+l.toUpperCase()}),Sf=Ig("toUpperCase");function Pv(i,l,d){return i=Nt(i),l=d?n:l,l===n?jx(i)?Zx(i):Lx(i):i.match(l)||[]}var Lv=yt(function(i,l){try{return Rr(i,n,l)}catch(d){return bf(d)?d:new ot(d)}}),wA=$s(function(i,l){return Yr(l,function(d){d=Ss(d),Vs(i,d,yf(i[d],i))}),i});function xA(i){var l=i==null?0:i.length,d=tt();return i=l?Xt(i,function(g){if(typeof g[1]!="function")throw new zr(o);return[d(g[0]),g[1]]}):[],yt(function(g){for(var w=-1;++wY)return[];var d=Pe,g=Kn(i,Pe);l=tt(l),i-=Pe;for(var w=Pd(g,l);++d0||l<0)?new xt(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),l!==n&&(l=mt(l),d=l<0?d.dropRight(-l):d.take(l-i)),d)},xt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},xt.prototype.toArray=function(){return this.take(Pe)},xs(xt.prototype,function(i,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),g=/^(?:head|last)$/.test(l),w=C[g?"take"+(l=="last"?"Right":""):l],R=g||/^find/.test(l);w&&(C.prototype[l]=function(){var K=this.__wrapped__,X=g?[1]:arguments,oe=K instanceof xt,Ee=X[0],Oe=oe||ct(K),Re=function(bt){var At=w.apply(C,li([bt],X));return g&&qe?At[0]:At};Oe&&d&&typeof Ee=="function"&&Ee.length!=1&&(oe=Oe=!1);var qe=this.__chain__,Je=!!this.__actions__.length,nt=R&&!qe,gt=oe&&!Je;if(!R&&Oe){K=gt?K:new xt(this);var rt=i.apply(K,X);return rt.__actions__.push({func:xu,args:[Re],thisArg:n}),new Kr(rt,qe)}return nt&>?i.apply(this,X):(rt=this.thru(Re),nt?g?rt.value()[0]:rt.value():rt)})}),Yr(["pop","push","shift","sort","splice","unshift"],function(i){var l=Ko[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",g=/^(?:pop|shift)$/.test(i);C.prototype[i]=function(){var w=arguments;if(g&&!this.__chain__){var R=this.value();return l.apply(ct(R)?R:[],w)}return this[d](function(K){return l.apply(ct(K)?K:[],w)})}}),xs(xt.prototype,function(i,l){var d=C[l];if(d){var g=d.name+"";$t.call(Ia,g)||(Ia[g]=[]),Ia[g].push({name:l,func:d})}}),Ia[mu(n,H).name]=[{name:"wrapper",func:n}],xt.prototype.clone=_k,xt.prototype.reverse=bk,xt.prototype.value=wk,C.prototype.at=JT,C.prototype.chain=ZT,C.prototype.commit=XT,C.prototype.next=QT,C.prototype.plant=t2,C.prototype.reverse=n2,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=r2,C.prototype.first=C.prototype.head,Ml&&(C.prototype[Ml]=e2),C},Da=Xx();Wi?((Wi.exports=Da)._=Da,Td._=Da):jn._=Da}).call(F1)})(Oc,Oc.exports);var hL=Oc.exports;const Bn=fL(hL);function pL(e,t){switch(e.replace("_","-")){case"af":case"af-ZA":case"bn":case"bn-BD":case"bn-IN":case"bg":case"bg-BG":case"ca":case"ca-AD":case"ca-ES":case"ca-FR":case"ca-IT":case"da":case"da-DK":case"de":case"de-AT":case"de-BE":case"de-CH":case"de-DE":case"de-LI":case"de-LU":case"el":case"el-CY":case"el-GR":case"en":case"en-AG":case"en-AU":case"en-BW":case"en-CA":case"en-DK":case"en-GB":case"en-HK":case"en-IE":case"en-IN":case"en-NG":case"en-NZ":case"en-PH":case"en-SG":case"en-US":case"en-ZA":case"en-ZM":case"en-ZW":case"eo":case"eo-US":case"es":case"es-AR":case"es-BO":case"es-CL":case"es-CO":case"es-CR":case"es-CU":case"es-DO":case"es-EC":case"es-ES":case"es-GT":case"es-HN":case"es-MX":case"es-NI":case"es-PA":case"es-PE":case"es-PR":case"es-PY":case"es-SV":case"es-US":case"es-UY":case"es-VE":case"et":case"et-EE":case"eu":case"eu-ES":case"eu-FR":case"fa":case"fa-IR":case"fi":case"fi-FI":case"fo":case"fo-FO":case"fur":case"fur-IT":case"fy":case"fy-DE":case"fy-NL":case"gl":case"gl-ES":case"gu":case"gu-IN":case"ha":case"ha-NG":case"he":case"he-IL":case"hu":case"hu-HU":case"is":case"is-IS":case"it":case"it-CH":case"it-IT":case"ku":case"ku-TR":case"lb":case"lb-LU":case"ml":case"ml-IN":case"mn":case"mn-MN":case"mr":case"mr-IN":case"nah":case"nb":case"nb-NO":case"ne":case"ne-NP":case"nl":case"nl-AW":case"nl-BE":case"nl-NL":case"nn":case"nn-NO":case"no":case"om":case"om-ET":case"om-KE":case"or":case"or-IN":case"pa":case"pa-IN":case"pa-PK":case"pap":case"pap-AN":case"pap-AW":case"pap-CW":case"ps":case"ps-AF":case"pt":case"pt-BR":case"pt-PT":case"so":case"so-DJ":case"so-ET":case"so-KE":case"so-SO":case"sq":case"sq-AL":case"sq-MK":case"sv":case"sv-FI":case"sv-SE":case"sw":case"sw-KE":case"sw-TZ":case"ta":case"ta-IN":case"ta-LK":case"te":case"te-IN":case"tk":case"tk-TM":case"ur":case"ur-IN":case"ur-PK":case"zu":case"zu-ZA":return t===1?0:1;case"am":case"am-ET":case"bh":case"fil":case"fil-PH":case"fr":case"fr-BE":case"fr-CA":case"fr-CH":case"fr-FR":case"fr-LU":case"gun":case"hi":case"hi-IN":case"hy":case"hy-AM":case"ln":case"ln-CD":case"mg":case"mg-MG":case"nso":case"nso-ZA":case"ti":case"ti-ER":case"ti-ET":case"wa":case"wa-BE":case"xbr":return t===0||t===1?0:1;case"be":case"be-BY":case"bs":case"bs-BA":case"hr":case"hr-HR":case"ru":case"ru-RU":case"ru-UA":case"sr":case"sr-ME":case"sr-RS":case"uk":case"uk-UA":return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2;case"cs":case"cs-CZ":case"sk":case"sk-SK":return t==1?0:t>=2&&t<=4?1:2;case"ga":case"ga-IE":return t==1?0:t==2?1:2;case"lt":case"lt-LT":return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2;case"sl":case"sl-SI":return t%100==1?0:t%100==2?1:t%100==3||t%100==4?2:3;case"mk":case"mk-MK":return t%10==1?0:1;case"mt":case"mt-MT":return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3;case"lv":case"lv-LV":return t==0?0:t%10==1&&t%100!=11?1:2;case"pl":case"pl-PL":return t==1?0:t%10>=2&&t%10<=4&&(t%100<12||t%100>14)?1:2;case"cy":case"cy-GB":return t==1?0:t==2?1:t==8||t==11?2:3;case"ro":case"ro-RO":return t==1?0:t==0||t%100>0&&t%100<20?1:2;case"ar":case"ar-AE":case"ar-BH":case"ar-DZ":case"ar-EG":case"ar-IN":case"ar-IQ":case"ar-JO":case"ar-KW":case"ar-LB":case"ar-LY":case"ar-MA":case"ar-OM":case"ar-QA":case"ar-SA":case"ar-SD":case"ar-SS":case"ar-SY":case"ar-TN":case"ar-YE":return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11&&t%100<=99?4:5;default:return 0}}function mL(e,t,n){let r=e.split("|");const s=gL(r,t);if(s!==null)return s.trim();r=yL(r);const a=pL(n,t);return r.length===1||!r[a]?r[0]:r[a]}function gL(e,t){for(const n of e){let r=vL(n,t);if(r!==null)return r}return null}function vL(e,t){const n=e.match(/^[\{\[]([^\[\]\{\}]*)[\}\]]([\s\S]*)/)||[];if(n.length!==3)return null;const r=n[1],s=n[2];if(r.includes(",")){let[a,o]=r.split(",");if(o==="*"&&t>=parseFloat(a))return s;if(a==="*"&&t<=parseFloat(o))return s;if(t>=parseFloat(a)&&t<=parseFloat(o))return s}return parseFloat(r)===t?s:null}function yL(e){return e.map(t=>t.replace(/^[\{\[]([^\[\]\{\}]*)[\}\]]/,""))}const Kf=(e,t,n={})=>{try{return e(t)}catch{return n}},Gf=async(e,t={})=>{try{return(await e).default||t}catch{return t}},_L={};function r0(e){return e||bL()||wL()}function bL(){return typeof process<"u"}function wL(){return typeof _L<"u"}const Za=typeof window>"u";let Wa=null;const ju={lang:!Za&&document.documentElement.lang?document.documentElement.lang.replace("-","_"):null,fallbackLang:"en",fallbackMissingTranslations:!1,resolve:e=>new Promise(t=>t({default:{}})),onLoad:e=>{}};pe(()=>wr.getSharedInstance().getCurrentLanguage().value);const xL={shared:!0};function Le(e,t={}){return wr.getSharedInstance().trans(e,t)}const kL={install(e,t={}){t={...xL,...t};const n=t.shared?wr.getSharedInstance(t,!0):new wr(t);e.config.globalProperties.$t=(r,s)=>n.trans(r,s),e.config.globalProperties.$tChoice=(r,s,a)=>n.transChoice(r,s,a),e.provide("i18n",n)}};class wr{constructor(t={}){this.currentLanguage=fe(ju.lang||ju.fallbackLang),this.activeMessages=Hr({}),this.fallbackMessages=Hr({}),this.reset=()=>{wr.loaded=[],this.options=ju;for(const[n]of Object.entries(this.activeMessages))this.activeMessages[n]=null;this===Wa&&(Wa=null)},this.options={...ju,...t},this.options.fallbackMissingTranslations?this.loadFallbackLanguage():this.load()}setOptions(t={},n=!1){return this.options={...this.options,...t},n&&this.load(),this}load(){this[Za?"loadLanguage":"loadLanguageAsync"](this.getActiveLanguage())}loadFallbackLanguage(){if(!Za){this.resolveLangAsync(this.options.resolve,this.options.fallbackLang).then(({default:n})=>{this.applyFallbackLanguage(this.options.fallbackLang,n),this.load()});return}const{default:t}=this.resolveLang(this.options.resolve,this.options.fallbackLang);this.applyFallbackLanguage(this.options.fallbackLang,t),this.loadLanguage(this.getActiveLanguage())}loadLanguage(t,n=!1){const r=wr.loaded.find(a=>a.lang===t);if(r){this.setLanguage(r);return}const{default:s}=this.resolveLang(this.options.resolve,t);this.applyLanguage(t,s,n,this.loadLanguage)}loadLanguageAsync(t,n=!1,r=!1){var a;r||((a=this.abortController)==null||a.abort(),this.abortController=new AbortController);const s=wr.loaded.find(o=>o.lang===t);return s?Promise.resolve(this.setLanguage(s)):new Promise((o,u)=>{this.abortController.signal.addEventListener("abort",()=>{o()}),this.resolveLangAsync(this.options.resolve,t).then(({default:c})=>{o(this.applyLanguage(t,c,n,this.loadLanguageAsync))})})}resolveLang(t,n,r={}){return Object.keys(r).length||(r=Kf(t,n)),r0(Za)?{default:{...r,...Kf(t,`php_${n}`)}}:{default:r}}async resolveLangAsync(t,n){let r=Kf(t,n);if(!(r instanceof Promise))return this.resolveLang(t,n,r);if(r0(Za)){const s=await Gf(t(`php_${n}`)),a=await Gf(r);return new Promise(o=>o({default:{...s,...a}}))}return new Promise(async s=>s({default:await Gf(r)}))}applyLanguage(t,n,r=!1,s){if(Object.keys(n).length<1){if(/[-_]/g.test(t)&&!r)return s.call(this,t.replace(/[-_]/g,o=>o==="-"?"_":"-"),!0,!0);if(t!==this.options.fallbackLang)return s.call(this,this.options.fallbackLang,!1,!0)}const a={lang:t,messages:n};return this.addLoadedLang(a),this.setLanguage(a)}applyFallbackLanguage(t,n){for(const[r,s]of Object.entries(n))this.fallbackMessages[r]=s;this.addLoadedLang({lang:this.options.fallbackLang,messages:n})}addLoadedLang(t){const n=wr.loaded.findIndex(r=>r.lang===t.lang);if(n!==-1){wr.loaded[n]=t;return}wr.loaded.push(t)}setLanguage({lang:t,messages:n}){Za||document.documentElement.setAttribute("lang",t.replace("_","-")),this.options.lang=t,this.currentLanguage.value=t;for(const[r,s]of Object.entries(n))this.activeMessages[r]=s;for(const[r,s]of Object.entries(this.fallbackMessages))(!this.isValid(n[r])||this.activeMessages[r]===r)&&(this.activeMessages[r]=s);for(const[r]of Object.entries(this.activeMessages))!this.isValid(n[r])&&!this.isValid(this.fallbackMessages[r])&&(this.activeMessages[r]=null);return this.options.onLoad(t),t}getActiveLanguage(){return this.options.lang||this.options.fallbackLang}getCurrentLanguage(){return pe(()=>this.currentLanguage.value)}isLoaded(t){return t??(t=this.getActiveLanguage()),wr.loaded.some(n=>n.lang.replace(/[-_]/g,"-")===t.replace(/[-_]/g,"-"))}trans(t,n={}){return this.wTrans(t,n).value}wTrans(t,n={}){return hb(()=>{let r=this.findTranslation(t);this.isValid(r)||(r=this.findTranslation(t.replace(/\//g,"."))),this.activeMessages[t]=this.isValid(r)?r:t}),pe(()=>this.makeReplacements(this.activeMessages[t],n))}transChoice(t,n,r={}){return this.wTransChoice(t,n,r).value}wTransChoice(t,n,r={}){const s=this.wTrans(t,r);return r.count=n.toString(),pe(()=>this.makeReplacements(mL(s.value,n,this.options.lang),r))}findTranslation(t){if(this.isValid(this.activeMessages[t]))return this.activeMessages[t];if(this.activeMessages[`${t}.0`]!==void 0){const r=Object.entries(this.activeMessages).filter(s=>s[0].startsWith(`${t}.`)).map(s=>s[1]);return Hr(r)}return this.activeMessages[t]}makeReplacements(t,n){const r=s=>s.charAt(0).toUpperCase()+s.slice(1);return Object.entries(n||[]).sort((s,a)=>s[0].length>=a[0].length?-1:1).forEach(([s,a])=>{a=a.toString(),t=(t||"").replace(new RegExp(`:${s}`,"g"),a).replace(new RegExp(`:${s.toUpperCase()}`,"g"),a.toUpperCase()).replace(new RegExp(`:${r(s)}`,"g"),r(a))}),t}isValid(t){return t!=null}static getSharedInstance(t,n=!1){return(Wa==null?void 0:Wa.setOptions(t,n))||(Wa=new wr(t))}}wr.loaded=[];function Hi(){const e=H=>{const V={};return H==null||H.forEach(x=>{V[x.id]=x.name}),V},t=pe(()=>[Le("event.activity-overview"),Le("event.who-is-the-activity-for"),Le("event.organiser")]),n=pe(()=>[{id:"coding-camp",name:Le("event.coding-camp")},{id:"summer-camp",name:Le("event.summer-camp")},{id:"weekend-course",name:Le("event.weekend-course")},{id:"evening-course",name:Le("event.evening-course")},{id:"careerday",name:Le("event.career-day")},{id:"university-visit",name:Le("event.university-visit")},{id:"coding-home",name:Le("event.coding-at-home")},{id:"code-week-challenge",name:Le("event.code-week-challenge")},{id:"competition",name:Le("event.competition")},{id:"other",name:Le("event.other-group-work-seminars-workshops")}]),r=pe(()=>e(n.value)),s=pe(()=>[{id:"open-online",name:Le("event.activitytype.open-online")},{id:"invite-online",name:Le("event.activitytype.invite-online")},{id:"open-in-person",name:Le("event.activitytype.open-in-person")},{id:"invite-in-person",name:Le("event.activitytype.invite-in-person")},{id:"other",name:Le("event.organizertype.other")}]),a=pe(()=>e(s.value)),o=pe(()=>({daily:Le("event.daily"),weekly:Le("event.weekly"),monthly:Le("event.monthly")})),u=pe(()=>[{id:"0-1",name:Le("event.0-1-hours")},{id:"1-2",name:Le("event.1-2-hours")},{id:"2-4",name:Le("event.2-4-hours")},{id:"over-4",name:Le("event.longer-than-4-hours")}]),c=pe(()=>e(u.value)),h=pe(()=>[{id:"consecutive",name:Le("event.consecutive-learning-over-multiple-sessions")},{id:"individual",name:Le("event.recurring-individual")}]),f=pe(()=>e(h.value)),p=pe(()=>[{id:"under-5",name:Le("event.under-5-early-learners")},{id:"6-9",name:Le("event.6-9-primary")},{id:"10-12",name:Le("event.10-12-upper-primary")},{id:"13-15",name:Le("event.13-15-lower-secondary")},{id:"16-18",name:Le("event.16-18-upper-secondary")},{id:"19-25",name:Le("event.19-25-young-adults")},{id:"over-25",name:Le("event.over-25-adults")}]),m=pe(()=>e(p.value)),y=pe(()=>[{id:"school",name:Le("event.organizertype.school")},{id:"library",name:Le("event.organizertype.library")},{id:"non profit",name:Le("event.organizertype.non-profit")},{id:"private business",name:Le("event.organizertype.private-business")},{id:"other",name:Le("event.organizertype.other")}]),_=pe(()=>e(y.value)),b=pe(()=>[{id:"robotics-drones-smart-devices",name:Le("event.theme.robotics-drones-smart-devices")},{id:"cybersecurity-data",name:Le("event.theme.cybersecurity-data")},{id:"web-app-software-development",name:Le("event.theme.web-app-software-development")},{id:"visual-block-programming",name:Le("event.theme.visual-block-programming")},{id:"unplugged-playful-activities",name:Le("event.theme.unplugged-playful-activities")},{id:"art-creative-coding",name:Le("event.theme.art-creative-coding")},{id:"game-design",name:Le("event.theme.game-design")},{id:"internet-of-things-wearables",name:Le("event.theme.internet-of-things-wearables")},{id:"ar-vr-3d-technologies",name:Le("event.theme.ar-vr-3d-technologies")},{id:"digital-careers-learning-pathways",name:Le("event.theme.digital-careers-learning-pathways")},{id:"digital-literacy-soft-skills",name:Le("event.theme.digital-literacy-soft-skills")},{id:"ai-generative-ai",name:Le("event.theme.ai-generative-ai")},{id:"awareness-inspiration",name:Le("event.theme.awareness-inspiration")},{id:"promoting-diversity-inclusion",name:Le("event.theme.promoting-diversity-inclusion")},{id:"other-theme",name:Le("event.theme.other-theme")}]),A=pe(()=>e(b.value));return{stepTitles:t,activityFormatOptions:n,activityFormatOptionsMap:r,activityTypeOptions:s,activityTypeOptionsMap:a,recurringFrequentlyMap:o,durationOptions:u,durationOptionsMap:c,recurringTypeOptions:h,recurringTypeOptionsMap:f,ageOptions:p,ageOptionsMap:m,organizerTypeOptions:y,organizerTypeOptionsMap:_,themeOptions:b,themeOptionsMap:A}}const vt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},SL={props:{contentClass:{type:String},position:{type:String,default:"top",validator:e=>["top","right","bottom","left"].includes(e)}},setup(e){const t=fe(!1),n=pe(()=>{switch(e.position){case"top":return"bottom-full pb-2 left-1/2 -translate-x-1/2";case"right":return"left-full pl-2 top-1/2 -translate-y-1/2";case"bottom":return"top-full pt-2 left-1/2 -translate-x-1/2";case"left":return"right-full pr-2 top-1/2 -translate-y-1/2";default:return""}}),r=pe(()=>{switch(e.position){case"top":return"absolute left-1/2 bottom-0 -translate-x-1/2 translate-y-2 border-8 border-transparent border-t-gray-800";case"right":return"absolute top-1/2 left-0 -translate-y-1/2 -translate-x-2 border-8 border-transparent border-r-gray-800";case"bottom":return"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-2 border-8 border-transparent border-b-gray-800";case"left":return"absolute top-1/2 right-0 -translate-y-1/2 translate-x-2 border-8 border-transparent border-l-gray-800";default:return""}});return{show:t,positionClass:n,arrowClass:r}}},TL={class:"w-full px-3 py-2 rounded-lg bg-gray-800 text-white text-sm"};function CL(e,t,n,r,s,a){return k(),P("div",{class:"relative inline-block",onMouseenter:t[0]||(t[0]=o=>r.show=!0),onMouseleave:t[1]||(t[1]=o=>r.show=!1)},[Ne(e.$slots,"trigger",{},void 0,!0),r.show?(k(),P("div",{key:0,class:Be(["absolute z-10 break-words",r.positionClass,n.contentClass]),role:"tooltip"},[v("div",TL,[Ne(e.$slots,"content",{},void 0,!0)]),v("div",{class:Be(["tooltip-arrow",r.arrowClass])},null,2)],2)):ae("",!0)],32)}const $1=vt(SL,[["render",CL],["__scopeId","data-v-ad76dce9"]]),AL={props:{horizontalBreakpoint:String,horizontal:Boolean,label:String,name:String,names:Array,errors:Object},components:{Tooltip:$1},setup(e,{slots:t}){const n=pe(()=>{const r=[],s=[];return e.name&&s.push(e.name),e.names&&s.push(...e.names),s.forEach(a=>{var o,u;(o=e.errors)!=null&&o[a]&&r.push(...(u=e.errors)==null?void 0:u[a])}),Bn.uniq(r)});return{slots:t,errorList:n}}},EL=["for"],OL={key:0,class:"flex item-start gap-3 text-error-200 font-semibold mt-2.5 empty:hidden"},ML={class:"leading-5"};function RL(e,t,n,r,s,a){var u;const o=at("Tooltip");return k(),P("div",{class:Be(["flex items-start flex-col gap-x-3 gap-y-2",[n.horizontalBreakpoint==="md"&&"md:gap-10 md:flex-row"]])},[v("label",{for:`id_${n.name||((u=n.names)==null?void 0:u[0])||""}`,class:Be(["flex items-center font-normal text-xl flex-1 text-slate-500 'w-full",[n.horizontalBreakpoint==="md"&&"md:min-h-[48px] md:w-1/3"]])},[v("span",null,[ft(se(n.label)+" ",1),r.slots.tooltip?(k(),it(o,{key:0,class:"ml-1 translate-y-1",contentClass:"w-64"},{trigger:Te(()=>t[0]||(t[0]=[v("img",{class:"text-dark-blue w-6 h-6",src:"/images/icon_question.svg"},null,-1)])),content:Te(()=>[Ne(e.$slots,"tooltip")]),_:3})):ae("",!0)])],10,EL),v("div",{class:Be(["h-full w-full",[n.horizontalBreakpoint==="md"&&"md:w-2/3"]])},[Ne(e.$slots,"default"),r.errorList.length?(k(),P("div",OL,[t[1]||(t[1]=v("img",{src:"/images/icon_error.svg"},null,-1)),(k(!0),P(Ve,null,Qe(r.errorList,c=>(k(),P("div",ML,se(c),1))),256))])):ae("",!0),Ne(e.$slots,"end")],2)],2)}const od=vt(AL,[["render",RL]]);function Jf(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function DL(e){return(...t)=>!e(...t)}function PL(e,t){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(t.trim())!==-1}function LL(e){return e.filter(t=>!t.$isLabel)}function Zf(e,t){return n=>n.reduce((r,s)=>s[e]&&s[e].length?(r.push({$groupLabel:s[t],$isLabel:!0}),r.concat(s[e])):r,[])}const s0=(...e)=>t=>e.reduce((n,r)=>r(n),t);var IL={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return Jf(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,t,this.label):this.filterOptions(n,t,this.label,this.customLabel):n=this.groupValues?Zf(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(DL(this.isSelected)):n,this.taggable&&t.length&&!this.isExistingOption(t)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:e}):n.unshift({isTag:!0,label:e})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(t=>this.customLabel(t,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,t,n){return s0(this.filterGroups(t,n,this.groupValues,this.groupLabel,this.customLabel),Zf(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return s0(Zf(this.groupValues,this.groupLabel),LL)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(Jf(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return Jf(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(t)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(t==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){t!=="Tab"&&this.removeElement(e);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const n=this.trackBy?t[this.groupValues].map(s=>s[this.trackBy]):t[this.groupValues],r=this.internalValue.filter(s=>n.indexOf(this.trackBy?s[this.trackBy]:s)===-1);this.$emit("update:modelValue",r)}else{const n=t[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.max&&n.splice(this.max-this.internalValue.length),this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(t=>this.isSelected(t)||this.isOptionDisabled(t))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom;t>this.maxHeight||t>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))},filterOptions(e,t,n,r){return t?e.filter(s=>PL(r(s,n),t)).sort((s,a)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(s,a):r(s,n).length-r(a,n).length):e},filterGroups(e,t,n,r,s){return a=>a.map(o=>{if(!o[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const u=this.filterOptions(o[n],e,t,s);return u.length?{[r]:o[r],[n]:u}:[]})}}},NL={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},Ta={name:"vue-multiselect",mixins:[IL,NL],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}}};const VL=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],FL={ref:"tags",class:"multiselect__tags"},$L={class:"multiselect__tags-wrap"},BL=["textContent"],HL=["onKeypress","onMousedown"],UL=["textContent"],jL={class:"multiselect__spinner"},qL=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],WL=["id","aria-multiselectable"],YL={key:0},zL={class:"multiselect__option"},KL=["aria-selected","id","role"],GL=["onClick","onMouseenter","data-select","data-selected","data-deselect"],JL=["data-select","data-deselect","onMouseenter","onMousedown"],ZL={class:"multiselect__option"},XL={class:"multiselect__option"};function QL(e,t,n,r,s,a){return k(),P("div",{tabindex:e.searchable?-1:n.tabindex,class:Be([{"multiselect--active":e.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"]),onFocus:t[14]||(t[14]=o=>e.activate()),onBlur:t[15]||(t[15]=o=>e.searchable?!1:e.deactivate()),onKeydown:[t[16]||(t[16]=$n(Et(o=>e.pointerForward(),["self","prevent"]),["down"])),t[17]||(t[17]=$n(Et(o=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[18]||(t[18]=$n(Et(o=>e.addPointerElement(o),["stop","self"]),["enter","tab"])),onKeyup:t[19]||(t[19]=$n(o=>e.deactivate(),["esc"])),role:"combobox","aria-expanded":e.isOpen,"aria-owns":"listbox-"+e.id,"aria-activedescendant":e.isOpen&&e.pointer!==null?e.id+"-"+e.pointer:null},[Ne(e.$slots,"caret",{toggle:e.toggle},()=>[v("div",{onMousedown:t[0]||(t[0]=Et(o=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),Ne(e.$slots,"clear",{search:e.search}),v("div",FL,[Ne(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:a.visibleValues,isOpen:e.isOpen},()=>[Dn(v("div",$L,[(k(!0),P(Ve,null,Qe(a.visibleValues,(o,u)=>Ne(e.$slots,"tag",{option:o,search:e.search,remove:e.removeElement},()=>[(k(),P("span",{class:"multiselect__tag",key:u,onMousedown:t[1]||(t[1]=Et(()=>{},["prevent"]))},[v("span",{textContent:se(e.getOptionLabel(o))},null,8,BL),v("i",{tabindex:"1",onKeypress:$n(Et(c=>e.removeElement(o),["prevent"]),["enter"]),onMousedown:Et(c=>e.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,HL)],32))])),256))],512),[[Fr,a.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>n.limit?Ne(e.$slots,"limit",{key:0},()=>[v("strong",{class:"multiselect__strong",textContent:se(n.limitText(e.internalValue.length-n.limit))},null,8,UL)]):ae("v-if",!0)]),he(vs,{name:"multiselect__loading"},{default:Te(()=>[Ne(e.$slots,"loading",{},()=>[Dn(v("div",jL,null,512),[[Fr,n.loading]])])]),_:3}),e.searchable?(k(),P("input",{key:0,ref:"search",name:n.name,id:e.id,type:"text",autocomplete:"off",spellcheck:n.spellcheck,placeholder:e.placeholder,required:a.isRequired,style:bn(a.inputStyle),value:e.search,disabled:n.disabled,tabindex:n.tabindex,"aria-label":n.name+"-searchbox",onInput:t[2]||(t[2]=o=>e.updateSearch(o.target.value)),onFocus:t[3]||(t[3]=Et(o=>e.activate(),["prevent"])),onBlur:t[4]||(t[4]=Et(o=>e.deactivate(),["prevent"])),onKeyup:t[5]||(t[5]=$n(o=>e.deactivate(),["esc"])),onKeydown:[t[6]||(t[6]=$n(Et(o=>e.pointerForward(),["prevent"]),["down"])),t[7]||(t[7]=$n(Et(o=>e.pointerBackward(),["prevent"]),["up"])),t[9]||(t[9]=$n(Et(o=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[8]||(t[8]=$n(Et(o=>e.addPointerElement(o),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,qL)):ae("v-if",!0),a.isSingleLabelVisible?(k(),P("span",{key:1,class:"multiselect__single",onMousedown:t[10]||(t[10]=Et((...o)=>e.toggle&&e.toggle(...o),["prevent"]))},[Ne(e.$slots,"singleLabel",{option:a.singleValue},()=>[ft(se(e.currentOptionLabel),1)])],32)):ae("v-if",!0),a.isPlaceholderVisible?(k(),P("span",{key:2,class:"multiselect__placeholder",onMousedown:t[11]||(t[11]=Et((...o)=>e.toggle&&e.toggle(...o),["prevent"]))},[Ne(e.$slots,"placeholder",{},()=>[ft(se(e.placeholder),1)])],32)):ae("v-if",!0)],512),he(vs,{name:"multiselect",persisted:""},{default:Te(()=>[Dn(v("div",{class:"multiselect__content-wrapper",onFocus:t[12]||(t[12]=(...o)=>e.activate&&e.activate(...o)),tabindex:"-1",onMousedown:t[13]||(t[13]=Et(()=>{},["prevent"])),style:bn({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[v("ul",{class:"multiselect__content",style:bn(a.contentStyle),role:"listbox",id:"listbox-"+e.id,"aria-multiselectable":e.multiple},[Ne(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(k(),P("li",YL,[v("span",zL,[Ne(e.$slots,"maxElements",{},()=>[ft("Maximum of "+se(e.max)+" options selected. First remove a selected option to select another.",1)])])])):ae("v-if",!0),!e.max||e.internalValue.length(k(),P("li",{class:"multiselect__element",key:u,"aria-selected":e.isSelected(o),id:e.id+"-"+u,role:o&&(o.$isLabel||o.$isDisabled)?null:"option"},[o&&(o.$isLabel||o.$isDisabled)?ae("v-if",!0):(k(),P("span",{key:0,class:Be([e.optionHighlight(u,o),"multiselect__option"]),onClick:Et(c=>e.select(o),["stop"]),onMouseenter:Et(c=>e.pointerSet(u),["self"]),"data-select":o&&o.isTag?e.tagPlaceholder:a.selectLabelText,"data-selected":a.selectedLabelText,"data-deselect":a.deselectLabelText},[Ne(e.$slots,"option",{option:o,search:e.search,index:u},()=>[v("span",null,se(e.getOptionLabel(o)),1)])],42,GL)),o&&(o.$isLabel||o.$isDisabled)?(k(),P("span",{key:1,"data-select":e.groupSelect&&a.selectGroupLabelText,"data-deselect":e.groupSelect&&a.deselectGroupLabelText,class:Be([e.groupHighlight(u,o),"multiselect__option"]),onMouseenter:Et(c=>e.groupSelect&&e.pointerSet(u),["self"]),onMousedown:Et(c=>e.selectGroup(o),["prevent"])},[Ne(e.$slots,"option",{option:o,search:e.search,index:u},()=>[v("span",null,se(e.getOptionLabel(o)),1)])],42,JL)):ae("v-if",!0)],8,KL))),128)):ae("v-if",!0),Dn(v("li",null,[v("span",ZL,[Ne(e.$slots,"noResult",{search:e.search},()=>[t[20]||(t[20]=ft("No elements found. Consider changing the search query."))])])],512),[[Fr,n.showNoResults&&e.filteredOptions.length===0&&e.search&&!n.loading]]),Dn(v("li",null,[v("span",XL,[Ne(e.$slots,"noOptions",{},()=>[t[21]||(t[21]=ft("List is empty."))])])],512),[[Fr,n.showNoOptions&&(e.options.length===0||a.hasOptionGroup===!0&&e.filteredOptions.length===0)&&!e.search&&!n.loading]]),Ne(e.$slots,"afterList")],12,WL)],36),[[Fr,e.isOpen]])]),_:3})],42,VL)}Ta.render=QL;const eI={props:{multiple:Boolean,returnObject:Boolean,allowEmpty:{type:Boolean,default:!0},modelValue:[Array,String],deselectLabel:String,options:Array,idName:{type:String,default:"id"},labelField:{type:String,default:"name"},theme:{type:String,default:"new"},largeText:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1}},components:{Multiselect:Ta},emits:["update:modelValue","onChange"],setup(e,{emit:t}){const n=fe(),r=a=>{if(e.multiple){const o=e.returnObject?a:a.map(u=>u[e.idName]);t("update:modelValue",o),t("onChange",o)}else{const o=e.returnObject?a:a[e.idName];t("update:modelValue",o),t("onChange",o)}},s=a=>{var o,u;return e.multiple?n.value?(o=n.value)==null?void 0:o.some(c=>String(c[e.idName])===String(a[e.idName])):!1:String((u=n.value)==null?void 0:u[e.idName])===String(a[e.idName])};return Wt([()=>e.multiple,()=>e.returnObject,()=>e.options,()=>e.modelValue],()=>{var a,o;e.returnObject?n.value=e.modelValue:e.multiple?Array.isArray(e.modelValue)&&(n.value=(a=e.modelValue)==null?void 0:a.map(u=>e.options.find(c=>c[e.idName]===u))):n.value=(o=e.options)==null?void 0:o.find(u=>u[e.idName]===e.modelValue)},{immediate:!0}),{selectedValues:n,isSelectedOption:s,onUpdateModalValue:r}}},tI={class:"flex justify-between items-center cursor-pointer"},nI={class:"whitespace-normal leading-6"},rI=["for"],sI={key:0,class:"h-4 w-4 text-[#05603A]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},iI={class:"flex gap-2.5 items-center rounded-full bg-dark-blue text-white px-4 py-2"},aI={class:"font-semibold leading-4"},lI=["onClick"],oI={class:"flex gap-4 items-center cursor-pointer"},uI={class:"whitespace-normal leading-6"},cI={key:0,class:"h-5 w-5 text-slate-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},dI=["onMousedown"];function fI(e,t,n,r,s,a){const o=at("multiselect");return k(),it(o,{class:Be(["multi-select",[n.multiple&&"multiple",n.theme==="new"&&"new-theme large-text",n.largeText&&"large-text"]]),modelValue:r.selectedValues,"onUpdate:modelValue":[t[0]||(t[0]=u=>r.selectedValues=u),r.onUpdateModalValue],"track-by":n.idName,label:n.labelField,multiple:n.multiple,"preselect-first":!1,"close-on-select":!n.multiple,"clear-on-select":!n.multiple,"preserve-search":!0,searchable:n.searchable,"allow-empty":n.allowEmpty,"deselect-label":n.deselectLabel,options:n.options},Hn({tag:Te(({option:u,remove:c})=>[v("span",iI,[v("span",aI,se(u.name),1),v("span",{onClick:h=>c(u)},t[2]||(t[2]=[v("img",{src:"/images/close-white.svg"},null,-1)]),8,lI)])]),caret:Te(({toggle:u})=>[v("div",{class:"cursor-pointer absolute top-1/2 right-4 -translate-y-1/2",onMousedown:Et(u,["prevent"])},t[4]||(t[4]=[v("img",{src:"/images/select-arrow.svg"},null,-1)]),40,dI)]),noResult:Te(()=>[t[5]||(t[5]=v("div",{class:"text-gray-400 text-center"},"No elements found",-1))]),_:2},[n.multiple&&n.theme==="new"?{name:"option",fn:Te(({option:u})=>[v("div",tI,[v("span",nI,se(u[n.labelField]),1),v("div",{class:Be(["flex-shrink-0 h-6 w-6 border-2 bg-white flex items-center justify-center cursor-pointer rounded",[r.isSelectedOption(u)?"border-[#05603A]":"border-dark-blue-200"]]),for:e.id},[r.isSelectedOption(u)?(k(),P("svg",sI,t[1]||(t[1]=[v("path",{d:"M5 13l4 4L19 7"},null,-1)]))):ae("",!0)],10,rI)])]),key:"0"}:void 0,n.multiple?void 0:{name:"option",fn:Te(({option:u})=>[v("div",oI,[v("span",uI,se(u[n.labelField]),1),v("div",null,[r.isSelectedOption(u)?(k(),P("svg",cI,t[3]||(t[3]=[v("path",{d:"M5 13l4 4L19 7"},null,-1)]))):ae("",!0)])])]),key:"1"}]),1032,["class","modelValue","track-by","label","multiple","close-on-select","clear-on-select","searchable","allow-empty","deselect-label","options","onUpdate:modelValue"])}const Fo=vt(eI,[["render",fI]]),hI={props:{modelValue:[String,Number],name:String,min:Number,max:Number,type:{type:String,default:"text"}},emits:["update:modelValue","onChange","onBlur"],setup(e,{emit:t}){const n=fe(e.modelValue);return Wt(()=>e.modelValue,()=>{n.value=e.modelValue}),{localValue:n,onChange:a=>{let o=a.target.value;e.type==="number"&&(o=o&&Number(o),e.min!==void 0&&e.min!==null&&(o=Math.max(o,e.min)),e.max!==void 0&&e.max!==null&&(o=Math.min(o,e.max))),Un(()=>{t("update:modelValue",o),t("onChange",o)})},onBlur:()=>{t("onBlur")}}}},pI=["id","type","min","max","name"];function mI(e,t,n,r,s,a){return Dn((k(),P("input",{class:"w-full border-2 border-solid border-dark-blue-200 rounded-full h-12 px-6 text-xl text-slate-600",id:`id_${n.name}`,type:n.type,min:n.min,max:n.max,name:n.name,"onUpdate:modelValue":t[0]||(t[0]=o=>r.localValue=o),onInput:t[1]||(t[1]=(...o)=>r.onChange&&r.onChange(...o)),onBlur:t[2]||(t[2]=(...o)=>r.onBlur&&r.onBlur(...o))},null,40,pI)),[[Sp,r.localValue]])}const ud=vt(hI,[["render",mI]]),gI={props:{modelValue:String,name:String,label:String,value:String},emits:["update:modelValue"],setup(e,{emit:t}){return{onChange:r=>{t("update:modelValue",r.target.value)}}}},vI={class:"flex items-center gap-2 cursor-pointer"},yI=["id","name","value","checked"],_I=["for"],bI={class:"cursor-pointer text-xl text-slate-500"};function wI(e,t,n,r,s,a){return k(),P("label",vI,[v("input",{class:"peer hidden",type:"radio",id:`${n.name}-${n.value}`,name:n.name,value:n.value,checked:n.modelValue===n.value,onChange:t[0]||(t[0]=(...o)=>r.onChange&&r.onChange(...o))},null,40,yI),v("div",{class:"h-8 w-8 rounded-full border-2 bg-white border-dark-blue-200 flex items-center justify-center cursor-pointer peer-checked:before:content-[''] peer-checked:before:block peer-checked:before:w-3 peer-checked:before:h-3 peer-checked:before:rounded-full peer-checked:before:bg-slate-600",for:`${n.name}-${n.value}`},null,8,_I),v("span",bI,se(n.label),1)])}const Wp=vt(gI,[["render",wI]]),xI={props:{modelValue:String,name:String,placeholder:String,height:{type:Number,default:400}},emits:["update:modelValue","onChange"],setup(e,{emit:t}){const n=a=>{t("update:modelValue",a),t("onChange",a)},r=()=>{const a="/js/tinymce/tinymce.min.js";return new Promise((o,u)=>{if(document.querySelector(`script[src="${a}"]`))return o();const c=document.createElement("script");c.src=a,c.onload=()=>o(),c.onerror=()=>u(new Error(`Failed to load script ${a}`)),document.head.appendChild(c)})},s=async()=>{try{await r()}catch(a){console.log("Can't load tinymce scrip:",a)}tinymce.init({selector:`#id_${e.name}`,height:e.height,width:"100%",setup:a=>{a.on("init",()=>{a.setContent(e.modelValue||"")}),a.on("change input",()=>{const o=a.getContent();a.save(),n(o)})}})};return Ft(()=>{s()}),{}}},kI={class:"custom-tinymce"},SI=["id","name","placeholder"];function TI(e,t,n,r,s,a){return k(),P("div",kI,[v("textarea",{class:"hidden",cols:"40",id:`id_${n.name}`,name:n.name,placeholder:n.placeholder,rows:"10"},null,8,SI)])}const CI=vt(xI,[["render",TI]]),AI={props:{errors:Object,formValues:Object,themes:Array,location:Object,countries:Array},components:{FieldWrapper:od,SelectField:Fo,InputField:ud,RadioField:Wp,TinymceField:CI},setup(e){const{activityFormatOptions:t,activityTypeOptions:n,durationOptions:r,recurringTypeOptions:s}=Hi(),a=pe(()=>!["open-online","invite-online"].includes(e.formValues.activity_type)&&e.formValues.locationDirty===!0&&e.formValues.locationSelected===!1);return{activityFormatOptions:t,activityTypeOptions:n,durationOptions:r,recurringTypeOptions:s,showSelectHint:a,handleLocationTyping:h=>{e.formValues.location=h??"",e.formValues.locationDirty=!0,e.formValues.locationSelected=!1},handleLocationClear:()=>{e.formValues.location="",e.formValues.locationDirty=!0,e.formValues.locationSelected=!1},handleLocationChange:({location:h,geoposition:f,country_iso:p})=>{e.formValues.location=h||"",e.formValues.geoposition=f,e.formValues.country_iso=p,e.formValues.locationSelected=!0,e.formValues.locationDirty=!0}}}},EI={class:"flex flex-col gap-4 w-full"},OI={class:"flex gap-4 p-4 mt-2.5 w-full rounded-2xl border bg-dark-blue-50 border-dark-blue-100"},MI={class:"text-xl text-slate-500"},RI={key:0,class:"text-sm text-slate-500 mt-2"},DI={class:"w-full md:w-1/2"},PI={class:"w-full flex px-3 justify-between items-center text-gray-700 whitespace-nowrap rounded-3xl border-2 border-dark-blue-200 h-[50px] bg-white"},LI={class:"flex items-center gap-8 min-h-[48px]"},II={key:0,class:"p-4 mt-4 w-full rounded-2xl border bg-dark-blue-50 border-dark-blue-100"},NI={class:"block mb-2 text-xl font-semibold text-slate-500"},VI={class:"flex flex-wrap gap-8 items-center"},FI={class:"block mt-6 mb-2 text-xl font-semibold text-slate-500"};function $I(e,t,n,r,s,a){const o=at("InputField"),u=at("FieldWrapper"),c=at("SelectField"),h=at("autocomplete-geo"),f=at("date-time"),p=at("RadioField"),m=at("TinymceField");return k(),P("div",EI,[he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.title.label")}*`,name:"title",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.title,"onUpdate:modelValue":t[0]||(t[0]=y=>n.formValues.title=y),required:"",name:"title",placeholder:e.$t("event.title.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.specify-the-format-of-the-activity"),name:"activity_format",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.activity_format,"onUpdate:modelValue":t[1]||(t[1]=y=>n.formValues.activity_format=y),multiple:"",name:"activity_format",options:r.activityFormatOptions,placeholder:e.$t("event.select-option")},null,8,["modelValue","options","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.activitytype.label")}*`,name:"activity_type",errors:n.errors},{end:Te(()=>[v("div",OI,[t[14]||(t[14]=v("img",{class:"flex-shrink-0 mt-1 w-6 h-6",src:"/images/icon_info.svg"},null,-1)),v("span",MI,se(e.$t("event.if-no-clear-information-provide-estimate")),1)])]),default:Te(()=>[he(c,{modelValue:n.formValues.activity_type,"onUpdate:modelValue":t[2]||(t[2]=y=>n.formValues.activity_type=y),required:"",name:"activity_type",options:r.activityTypeOptions},null,8,["modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.address.label")} ${["open-online","invite-online"].includes(n.formValues.activity_type)?"(optional)":"*"}`,name:"location",errors:n.errors},{end:Te(()=>[r.showSelectHint?(k(),P("div",RI,se(e.$t("event.please-select-address-from-dropdown")),1)):ae("",!0)]),default:Te(()=>[he(h,{class:"custom-geo-input",name:"location",placeholder:e.$t("event.address.placeholder"),location:n.formValues.location,value:n.formValues.location,geoposition:n.formValues.geoposition,onOnChange:r.handleLocationChange,onInput:r.handleLocationTyping,onClear:r.handleLocationClear},null,8,["placeholder","location","value","geoposition","onOnChange","onInput","onClear"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.activity-duration"),name:"duration",errors:n.errors},{default:Te(()=>[v("div",DI,[he(c,{modelValue:n.formValues.duration,"onUpdate:modelValue":t[3]||(t[3]=y=>n.formValues.duration=y),required:"",name:"duration",options:r.durationOptions,placeholder:e.$t("event.select-option")},null,8,["modelValue","options","placeholder"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.date"),names:["start_date","end_date"],errors:n.errors},{default:Te(()=>[v("div",PI,[he(f,{name:"start_date",placeholder:e.$t("event.start.label"),flow:["calendar","time"],value:n.formValues.start_date,onOnChange:t[4]||(t[4]=y=>n.formValues.start_date=y)},null,8,["placeholder","value"]),t[15]||(t[15]=v("span",null,"-",-1)),he(f,{name:"end_date",placeholder:e.$t("event.end.label"),flow:["calendar","time"],value:n.formValues.end_date,onOnChange:t[5]||(t[5]=y=>n.formValues.end_date=y)},null,8,["placeholder","value"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.is-it-a-recurring-event"),name:"is_recurring_event_local",errors:n.errors},{default:Te(()=>[v("div",LI,[he(p,{modelValue:n.formValues.is_recurring_event_local,"onUpdate:modelValue":t[6]||(t[6]=y=>n.formValues.is_recurring_event_local=y),name:"is_recurring_event_local",value:"true",label:e.$t("event.true")},null,8,["modelValue","label"]),he(p,{modelValue:n.formValues.is_recurring_event_local,"onUpdate:modelValue":t[7]||(t[7]=y=>n.formValues.is_recurring_event_local=y),name:"is_recurring_event_local",value:"false",label:e.$t("event.false")},null,8,["modelValue","label"])]),n.formValues.is_recurring_event_local==="true"?(k(),P("div",II,[v("label",NI,se(e.$t("event.how-frequently")),1),v("div",VI,[he(p,{modelValue:n.formValues.recurring_event,"onUpdate:modelValue":t[8]||(t[8]=y=>n.formValues.recurring_event=y),name:"recurring_event",value:"daily",label:e.$t("event.daily")},null,8,["modelValue","label"]),he(p,{modelValue:n.formValues.recurring_event,"onUpdate:modelValue":t[9]||(t[9]=y=>n.formValues.recurring_event=y),name:"recurring_event",value:"weekly",label:e.$t("event.weekly")},null,8,["modelValue","label"]),he(p,{modelValue:n.formValues.recurring_event,"onUpdate:modelValue":t[10]||(t[10]=y=>n.formValues.recurring_event=y),name:"recurring_event",value:"monthly",label:e.$t("event.monthly")},null,8,["modelValue","label"])]),v("label",FI,se(e.$t("event.what-type-of-recurring-activity")),1),he(c,{modelValue:n.formValues.recurring_type,"onUpdate:modelValue":t[11]||(t[11]=y=>n.formValues.recurring_type=y),name:"recurring_type",options:r.recurringTypeOptions},null,8,["modelValue","options"])])):ae("",!0)]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.theme-title"),name:"theme",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.theme,"onUpdate:modelValue":t[12]||(t[12]=y=>n.formValues.theme=y),multiple:"",required:"",name:"theme",placeholder:e.$t("event.select-theme"),options:n.themes},null,8,["modelValue","placeholder","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.activity-description"),name:"description",errors:n.errors},{default:Te(()=>[he(m,{modelValue:n.formValues.description,"onUpdate:modelValue":t[13]||(t[13]=y=>n.formValues.description=y),name:"description"},null,8,["modelValue"])]),_:1},8,["label","errors"])])}const BI=vt(AI,[["render",$I]]);function HI(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(s){s(n)}),(r=e.get("*"))&&r.slice().map(function(s){s(t,n)})}}}const ei=HI(),UI={props:{message:{type:Object,default:null}},setup(e){const t=fe(""),n=fe(!1),r=fe(""),s=u=>{u&&(t.value=u.message,r.value=u.level.charAt(0).toUpperCase()+u.level.slice(1),n.value=!0,a())},a=()=>{setTimeout(()=>{n.value=!1},3e3)},o=pe(()=>({success:r.value.toLowerCase()==="success",error:r.value.toLowerCase()==="error"}));return Ft(()=>{e.message&&s(e.message),ei.on("flash",s)}),ii(()=>{ei.off("flash",s)}),{body:t,show:n,level:r,flashClass:o}}},jI={key:0,class:"codeweek-flash-message",role:"alert"},qI={class:"level"},WI={class:"body"};function YI(e,t,n,r,s,a){return r.show?(k(),P("div",jI,[v("div",{class:Be(["content",r.flashClass])},[v("div",qI,se(r.level)+"!",1),v("div",WI,se(r.body),1)],2)])):ae("",!0)}const cd=vt(UI,[["render",YI],["__scopeId","data-v-09461b5c"]]),zI={components:{Flash:cd},props:{name:{type:String,default:"picture"},picture:{type:String,default:""}},emits:["onChange"],setup(e,{emit:t}){const n=fe(null),r=fe(e.picture||""),s=fe(""),a=()=>{var p;return(p=n.value)==null?void 0:p.click()},o=()=>{},u=()=>{},c=p=>{const[m]=p.dataTransfer.files;m&&f(m)},h=p=>{const[m]=p.target.files;m&&f(m)};function f(p){const m=new FormData;m.append("picture",p),Tt.post("/api/events/picture",m).then(y=>{s.value="",r.value=y.data.path,ei.emit("flash",{message:"Picture uploaded!",level:"success"}),t("onChange",y.data)}).catch(y=>{var b,A,H,V;const _=((V=(H=(A=(b=y.response)==null?void 0:b.data)==null?void 0:A.errors)==null?void 0:H.picture)==null?void 0:V[0])||"Image is too large. Maximum is 1Mb";s.value=_,ei.emit("flash",{message:_,level:"error"})})}return{fileInput:n,pictureClone:r,error:s,onTriggerFileInput:a,onDragOver:o,onDragLeave:u,onDrop:c,onFileChange:h}}},KI=["src"],GI={class:"text-xl text-slate-500"},JI={class:"text-xs text-slate-500"},ZI={key:0,class:"flex gap-3 mt-2.5 font-semibold item-start text-error-200"},XI={class:"leading-5"},QI={class:"flex gap-2.5 mt-4 w-full"},eN={class:"mt-1 text-xs text-slate-500"},tN={class:"pl-4 my-4 list-disc"},nN={class:"text-xs text-slate-500"};function rN(e,t,n,r,s,a){const o=at("Flash");return k(),P("div",null,[v("div",{class:"flex flex-col justify-center items-center gap-2 border-[3px] border-dashed border-dark-blue-200 w-full rounded-2xl py-12 px-8 cursor-pointer",onClick:t[1]||(t[1]=(...u)=>r.onTriggerFileInput&&r.onTriggerFileInput(...u)),onDragover:t[2]||(t[2]=Et((...u)=>r.onDragOver&&r.onDragOver(...u),["prevent"])),onDragleave:t[3]||(t[3]=(...u)=>r.onDragLeave&&r.onDragLeave(...u)),onDrop:t[4]||(t[4]=Et((...u)=>r.onDrop&&r.onDrop(...u),["prevent"]))},[v("div",{class:Be(["mb-4",[!r.pictureClone&&"hidden"]])},[v("img",{src:r.pictureClone,class:"mr-1"},null,8,KI)],2),v("div",{class:Be([!!r.pictureClone&&"hidden"])},t[5]||(t[5]=[v("img",{class:"w-16 h-16",src:"/images/icon_image.svg"},null,-1)]),2),v("span",GI,se(e.$t("event.drop-your-image-here-or-upload")),1),v("span",JI,se(e.$t("event.max-size-1mb-image-formats-jpg-png")),1),v("input",{class:"hidden",type:"file",ref:"fileInput",onChange:t[0]||(t[0]=(...u)=>r.onFileChange&&r.onFileChange(...u))},null,544)],32),r.error?(k(),P("div",ZI,[t[6]||(t[6]=v("img",{src:"/images/icon_error.svg"},null,-1)),v("div",XI,se(r.error),1)])):ae("",!0),v("div",QI,[t[7]||(t[7]=v("img",{class:"flex-shrink-0 w-6 h-6",src:"/images/icon_info.svg"},null,-1)),v("div",eN,[ft(se(e.$t("event.by-submitting-images-through-this-form-you-confirm-that"))+" ",1),v("ul",tN,[v("li",null,se(e.$t("event.you-have-obtained-all-necessary-permissions")),1),v("li",null,se(e.$t("event.you-will-not-submit-any-images-with-faces-directly-visible-or-identifiable"))+" "+se(e.$t("event.if-this-is-the-case-ensure-faces-are-blurred"))+" "+se(e.$t("event.submissions-that-do-not-comply-will-not-be-accepted")),1),v("li",null,se(e.$t("event.you-understand-and-agree-images-will-be-shared")),1)])])]),v("div",nN,se(e.$t("event.info-max-size-1mb")),1),he(o)])}const B1=vt(zI,[["render",rN]]),sN={props:{errors:Object,formValues:Object,audiences:Array,leadingTeachers:Array},components:{FieldWrapper:od,SelectField:Fo,InputField:ud,RadioField:Wp,ImageField:B1},setup(e){const{ageOptions:t}=Hi();return{leadingTeacherOptions:pe(()=>e.leadingTeachers.map(a=>({id:a,name:a}))),ageOptions:t,onPictureChange:a=>{e.formValues.picture=a.imageName,e.formValues.pictureUrl=a.path},handleCorrectCount:a=>{const o=Number(e.formValues.participants_count||"0");Number(e.formValues[a]||"0")>o&&(e.formValues[a]=o)}}}},iN={class:"flex flex-col gap-4 w-full"},aN={class:"flex flex-col gap-4 p-4 mt-2.5 w-full rounded-2xl border bg-dark-blue-50 border-dark-blue-100"},lN={class:"flex gap-2 p-2 mb-2 w-full bg-gray-100 rounded"},oN={class:"text-xl text-slate-500"},uN={class:"block mb-2 text-xl font-semibold text-slate-500"},cN={class:"grid grid-cols-1 gap-x-4 gap-y-4 md:grid-cols-2 md:gap-x-8"},dN={class:"flex items-center gap-8 min-h-[48px] h-full"},fN={class:"flex items-center gap-8 min-h-[48px] h-full"},hN={href:"/codeweek4all",target:"_blank"};function pN(e,t,n,r,s,a){const o=at("SelectField"),u=at("FieldWrapper"),c=at("InputField"),h=at("RadioField"),f=at("ImageField");return k(),P("div",iN,[he(u,{horizontalBreakpoint:"md",label:e.$t("event.audiences"),name:"audience",errors:n.errors},{default:Te(()=>[he(o,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.audience,"onUpdate:modelValue":t[0]||(t[0]=p=>n.formValues.audience=p),multiple:"",name:"audience",options:n.audiences},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.number-of-participants"),name:"participants_count",errors:n.errors},{end:Te(()=>[v("div",aN,[v("div",lN,[t[15]||(t[15]=v("img",{class:"flex-shrink-0 mt-1 w-6 h-6",src:"/images/icon_info.svg"},null,-1)),v("span",oN,se(e.$t("event.if-no-clear-information-provide-estimate")),1)]),v("label",uN,se(e.$t("event.of-this-number-how-many-are")),1),v("div",cN,[he(u,{label:e.$t("event.males"),name:"males_count",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.males_count,"onUpdate:modelValue":t[2]||(t[2]=p=>n.formValues.males_count=p),type:"number",min:0,name:"males_count",placeholder:e.$t("event.enter-number"),onOnBlur:t[3]||(t[3]=p=>r.handleCorrectCount("event.males_count"))},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{label:e.$t("event.females"),name:"females_count",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.females_count,"onUpdate:modelValue":t[4]||(t[4]=p=>n.formValues.females_count=p),type:"number",min:0,name:"females_count",placeholder:e.$t("event.enter-number"),onOnBlur:t[5]||(t[5]=p=>r.handleCorrectCount("event.females_count"))},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{label:e.$t("event.other-gender"),name:"other_count",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.other_count,"onUpdate:modelValue":t[6]||(t[6]=p=>n.formValues.other_count=p),type:"number",min:0,name:"other_count",placeholder:e.$t("event.enter-number"),onOnBlur:t[7]||(t[7]=p=>r.handleCorrectCount("event.other_count"))},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"])])])]),default:Te(()=>[he(c,{modelValue:n.formValues.participants_count,"onUpdate:modelValue":t[1]||(t[1]=p=>n.formValues.participants_count=p),type:"number",min:0,required:"",name:"participants_count",placeholder:e.$t("event.enter-number")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.age"),name:"ages",errors:n.errors},{default:Te(()=>[he(o,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.ages,"onUpdate:modelValue":t[8]||(t[8]=p=>n.formValues.ages=p),multiple:"",name:"ages",options:r.ageOptions},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("is-this-an-extracurricular-activity"),name:"is_extracurricular_event",errors:n.errors},{default:Te(()=>[v("div",dN,[he(h,{modelValue:n.formValues.is_extracurricular_event,"onUpdate:modelValue":t[9]||(t[9]=p=>n.formValues.is_extracurricular_event=p),name:"is_extracurricular_event",value:"true",label:e.$t("event.yes")},null,8,["modelValue","label"]),he(h,{modelValue:n.formValues.is_extracurricular_event,"onUpdate:modelValue":t[10]||(t[10]=p=>n.formValues.is_extracurricular_event=p),name:"is_extracurricular_event",value:"false",label:e.$t("event.no")},null,8,["modelValue","label"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.is-this-an-activity-within-the-standard-school-curriculum"),name:"is_standard_school_curriculum",errors:n.errors},{default:Te(()=>[v("div",fN,[he(h,{modelValue:n.formValues.is_standard_school_curriculum,"onUpdate:modelValue":t[11]||(t[11]=p=>n.formValues.is_standard_school_curriculum=p),name:"is_standard_school_curriculum",value:"true",label:e.$t("event.yes")},null,8,["modelValue","label"]),he(h,{modelValue:n.formValues.is_standard_school_curriculum,"onUpdate:modelValue":t[12]||(t[12]=p=>n.formValues.is_standard_school_curriculum=p),name:"is_standard_school_curriculum",value:"false",label:e.$t("event.no")},null,8,["modelValue","label"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.code-week-4-all-code-optional"),name:"codeweek_for_all_participation_code",errors:n.errors},{tooltip:Te(()=>[ft(se(e.$t("event.codeweek_for_all_participation_code.explanation"))+" ",1),v("a",hN,se(e.$t("event.codeweek_for_all_participation_code.link")),1),t[16]||(t[16]=ft(". "))]),default:Te(()=>[he(c,{modelValue:n.formValues.codeweek_for_all_participation_code,"onUpdate:modelValue":t[13]||(t[13]=p=>n.formValues.codeweek_for_all_participation_code=p),name:"codeweek_for_all_participation_code"},null,8,["modelValue"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.leading-teachers-optional"),name:"leading_teacher_tag",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.leading_teacher_tag,"onUpdate:modelValue":t[14]||(t[14]=p=>n.formValues.leading_teacher_tag=p),name:"leading_teacher_tag",options:r.leadingTeacherOptions},null,8,["modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.image-optional"),name:"picture",errors:n.errors},{default:Te(()=>[he(f,{name:"picture",picture:n.formValues.pictureUrl,image:n.formValues.picture,onOnChange:r.onPictureChange},null,8,["picture","image","onOnChange"])]),_:1},8,["label","errors"])])}const mN=vt(sN,[["render",pN]]),gN={props:{errors:Object,formValues:Object,languages:Object,countries:Array},components:{FieldWrapper:od,SelectField:Fo,InputField:ud,RadioField:Wp,ImageField:B1},setup(e,{emit:t}){const{organizerTypeOptions:n}=Hi(),r=pe(()=>Object.entries(e.languages).map(([s,a])=>({id:s,name:a})));return{organizerTypeOptions:n,languageOptions:r}}},vN={class:"flex flex-col gap-4 w-full"},yN={class:"flex items-center gap-8 min-h-[48px] h-full"},_N={class:"flex gap-2.5 mt-4 w-full"},bN={class:"mt-1 text-xs text-slate-400"};function wN(e,t,n,r,s,a){const o=at("InputField"),u=at("FieldWrapper"),c=at("SelectField"),h=at("RadioField");return k(),P("div",vN,[he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.organizer.label")}*`,name:"organizer",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.organizer,"onUpdate:modelValue":t[0]||(t[0]=f=>n.formValues.organizer=f),required:"",name:"organizer",placeholder:e.$t("event.organizer.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.organizertype.label")}*`,name:"organizer_type",errors:n.errors},{default:Te(()=>[he(c,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.organizer_type,"onUpdate:modelValue":t[1]||(t[1]=f=>n.formValues.organizer_type=f),required:"",name:"organizer_type",options:r.organizerTypeOptions},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("resources.Languages")} (optional)`,name:"language",errors:n.errors},{default:Te(()=>[he(c,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.language,"onUpdate:modelValue":t[2]||(t[2]=f=>n.formValues.language=f),name:"language",searchable:"",multiple:"",options:r.languageOptions},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.country")}*`,name:"country_iso",errors:n.errors},{default:Te(()=>[he(c,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.country_iso,"onUpdate:modelValue":t[3]||(t[3]=f=>n.formValues.country_iso=f),"id-name":"iso",searchable:"",required:"",name:"country_iso",options:n.countries},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.are-you-using-any-code-week-resources-in-this-activity"),name:"is_use_resource",errors:n.errors},{default:Te(()=>[v("div",yN,[he(h,{modelValue:n.formValues.is_use_resource,"onUpdate:modelValue":t[4]||(t[4]=f=>n.formValues.is_use_resource=f),name:"is_use_resource",value:"true",label:e.$t("event.yes")},null,8,["modelValue","label"]),he(h,{modelValue:n.formValues.is_use_resource,"onUpdate:modelValue":t[5]||(t[5]=f=>n.formValues.is_use_resource=f),name:"is_use_resource",value:"false",label:e.$t("event.no")},null,8,["modelValue","label"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.website.label")} ${["open-online","invite-online"].includes(n.formValues.activity_type)?"*":"(optional)"}`,name:"event_url",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.event_url,"onUpdate:modelValue":t[6]||(t[6]=f=>n.formValues.event_url=f),name:"event_url",placeholder:e.$t("event.website.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.public.label")} (optional)`,name:"contact_person",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.contact_person,"onUpdate:modelValue":t[7]||(t[7]=f=>n.formValues.contact_person=f),type:"email",name:"contact_person",placeholder:e.$t("event.public.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.contact.label")}*`,name:"user_email",errors:n.errors},{end:Te(()=>[v("div",_N,[t[9]||(t[9]=v("img",{class:"flex-shrink-0 w-6 h-6",src:"/images/icon_info.svg"},null,-1)),v("div",bN,se(e.$t("event.contact.explanation")),1)])]),default:Te(()=>[he(o,{modelValue:n.formValues.user_email,"onUpdate:modelValue":t[8]||(t[8]=f=>n.formValues.user_email=f),required:"",type:"email",name:"user_email",placeholder:e.$t("event.contact.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"])])}const xN=vt(gN,[["render",wN]]),kN={props:{formValues:Object,themes:Array,audiences:Array,leadingTeachers:Array,languages:Object,countries:Array},setup(e){const{activityFormatOptionsMap:t,activityTypeOptionsMap:n,recurringFrequentlyMap:r,durationOptionsMap:s,recurringTypeOptionsMap:a,ageOptionsMap:o,organizerTypeOptionsMap:u}=Hi();return{stepDataList:pe(()=>{var Me,He,je;const{title:h,activity_format:f,activity_type:p,location:m,duration:y,start_date:_,end_date:b,is_recurring_event_local:A,recurring_event:H,recurring_type:V,theme:x,description:E,audience:B,participants_count:U,males_count:$,females_count:M,other_count:S,ages:F,is_extracurricular_event:ie,is_standard_school_curriculum:ee,codeweek_for_all_participation_code:de,leading_teacher_tag:te,pictureUrl:N,picture:J,organizer:D,organizer_type:Y,language:me,country_iso:Ae,is_use_resource:Pe,event_url:q,contact_person:re,user_email:O}=e.formValues||{},ne=(f||[]).map(Ue=>t.value[Ue]),_e=n.value[p],j=s.value[y],Ie=_?new Date(_).toISOString().slice(0,10):"",Xe=b?new Date(b).toISOString().slice(0,10):"",we=A==="true",et=a.value[V],z=(x||[]).map(Ue=>e.themes.find(({id:Ge})=>Ge===Ue)).filter(Ue=>Ue).map(Ue=>Ue.name),T=[{label:Le("event.title.label"),value:h},{label:Le("event.specify-the-format-of-the-activity"),value:ne.join(", ")},{label:Le("event.activitytype.label"),value:_e},{label:Le("event.address.label"),value:m},{label:Le("event.activity-duration"),value:j},{label:Le("event.date"),value:`${Ie} - ${Xe}`},{label:Le("event.is-it-a-recurring-event"),value:Le(we?"event.yes":"event.no")},{label:Le("event.how-frequently"),value:we?r.value[H]:""},{label:Le("event.what-type-of-recurring-activity"),value:et},{label:Le("event.theme-title"),value:z.join(", ")},{label:Le("event.activity-description"),htmlValue:E}],I=(B||[]).map(Ue=>e.audiences.find(({id:Ge})=>Ge===Ue)).filter(Ue=>Ue).map(Ue=>Ue.name),G=[U||0,[`${$||0} ${Le("event.males")}`,`${M||0} ${Le("event.females")}`,`${S||0} ${Le("event.other-gender")}`].join(", ")].join(" - "),Q=(F||[]).map(Ue=>o.value[Ue]),ge=[{label:Le("event.audience_title"),value:I==null?void 0:I.join(", ")},{label:Le("event.number-of-participants"),value:G},{label:Le("event.age"),value:Q==null?void 0:Q.join(", ")},{label:Le("event.is-this-an-extracurricular-activity"),value:Le(ie==="true"?"event.yes":"event.no")},{label:Le("event.is-this-an-activity-within-the-standard-school-curriculum"),value:Le(ee==="true"?"event.yes":"event.no")},{label:Le("event.code-week-4-all-code-optional"),value:de},{label:Le("community.titles.2"),value:te},{label:Le("event.image"),imageUrl:N,imageName:(He=(Me=J==null?void 0:J.split("/"))==null?void 0:Me.reverse())==null?void 0:He[0]}],W=u.value[Y],ce=me==null?void 0:me.map(Ue=>{var Ge;return(Ge=e.languages)==null?void 0:Ge[Ue]}).filter(Boolean),ye=(je=e.countries.find(({iso:Ue})=>Ue===Ae))==null?void 0:je.name,ke=[{label:Le("event.organizer.label"),value:D},{label:Le("event.organizertype.label"),value:W},{label:Le("resources.Languages"),value:ce==null?void 0:ce.join(", ")},{label:Le("event.country"),value:ye},{label:Le("event.are-you-using-any-code-week-resources-in-this-activity"),value:Le(Pe==="true"?"event.yes":"event.no")},{label:Le("event.website.label"),value:q},{label:Le("event.public.label"),value:re},{label:Le("event.contact.label"),value:O}],Ce=({value:Ue,htmlValue:Ge,imageUrl:pt})=>!Bn.isNil(Ue)&&!Bn.isEmpty(Ue)||!Bn.isEmpty(Ge)||!Bn.isEmpty(pt);return[{title:Le("event.confirmation_step.activity_overview"),list:T.filter(Ce)},{title:Le("event.confirmation_step.who_is_the_activity_for"),list:ge.filter(Ce)},{title:Le("event.confirmation_step.organiser"),list:ke.filter(Ce)}]}),trans:Le}}},SN={class:"flex flex-col gap-12 w-full"},TN={class:"flex flex-col gap-6"},CN={class:"text-dark-blue text-2xl md:text-[30px] leading-[44px] font-medium font-['Montserrat'] text-center"},AN={class:"flex flex-col gap-1"},EN={class:"flex gap-10 items-center px-4 py-2 text-[16px] md:text-xl text-slate-500 bg-white"},ON={class:"flex-shrink-0 w-32 md:w-60"},MN=["innerHTML"],RN={key:1},DN={class:"mb-2"},PN=["src"],LN={key:2,class:"flex-grow w-full"};function IN(e,t,n,r,s,a){return k(),P("div",SN,[(k(!0),P(Ve,null,Qe(r.stepDataList,({title:o,list:u})=>(k(),P("div",TN,[v("h2",CN,se(o),1),v("div",AN,[(k(!0),P(Ve,null,Qe(u,({label:c,value:h,htmlValue:f,imageUrl:p,imageName:m})=>(k(),P("div",EN,[v("div",ON,se(c),1),f?(k(),P("div",{key:0,innerHTML:f,class:"flex-grow w-full space-y-2 [&_p]:py-0"},null,8,MN)):ae("",!0),p?(k(),P("div",RN,[v("div",DN,se(r.trans("event.image-attached")),1),v("img",{class:"mb-2 max-h-80",src:p},null,8,PN),v("div",null,se(m),1)])):ae("",!0),h?(k(),P("div",LN,se(h||""),1)):ae("",!0)]))),256))])]))),256))])}const NN=vt(kN,[["render",IN]]),VN={props:{modelValue:String,name:String,label:String,value:String},emits:["update:modelValue"],setup(e,{emit:t}){return{onChange:r=>{t("update:modelValue",r.target.checked)}}}},FN={class:"flex items-center gap-2 cursor-pointer"},$N=["id","name","checked"],BN=["for"],HN={key:0,class:"h-5 w-5 text-slate-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},UN={class:"cursor-pointer text-xl text-slate-500"};function jN(e,t,n,r,s,a){return k(),P("label",FN,[v("input",{class:"peer hidden",type:"checkbox",id:n.name,name:n.name,checked:n.modelValue,onChange:t[0]||(t[0]=(...o)=>r.onChange&&r.onChange(...o))},null,40,$N),v("div",{class:"flex-shrink-0 h-8 w-8 border-2 bg-white flex items-center justify-center cursor-pointer border-dark-blue-200 rounded-lg",for:e.id},[n.modelValue?(k(),P("svg",HN,t[1]||(t[1]=[v("path",{d:"M5 13l4 4L19 7"},null,-1)]))):ae("",!0)],8,BN),v("span",UN,[ft(se(n.label)+" ",1),Ne(e.$slots,"default")])])}const qN=vt(VN,[["render",jN]]),WN={props:{token:{type:String,default:""},event:{type:Object,default:()=>({})},selectedValues:{type:Object,default:()=>({})},locale:{type:String,default:""},user:{type:Object,default:()=>({})},themes:{type:Array,default:()=>[]},audiences:{type:Array,default:()=>[]},leadingTeachers:{type:Array,default:()=>[]},languages:{type:Object,default:()=>({})},countries:{type:Array,default:()=>[]},location:{type:Object,default:()=>({})},privacyLink:{type:String,default:""}},components:{FormStep1:BI,FormStep2:mN,FormStep3:xN,AddConfirmation:NN,CheckboxField:qN},setup(e,{emit:t}){var x,E,B,U,$;const{stepTitles:n}=Hi(),r=fe(null),s=fe(null),a=fe(1),o=fe({}),u=fe(!1),c=fe({activity_type:"open-in-person",location:((x=e.location)==null?void 0:x.location)||"",geoposition:((B=(E=e.location)==null?void 0:E.geoposition)==null?void 0:B.split(","))||[],is_recurring_event_local:"false",recurring_event:"daily",is_extracurricular_event:"false",is_standard_school_curriculum:"false",organizer:((U=e.location)==null?void 0:U.name)||"",organizer_type:(($=e==null?void 0:e.location)==null?void 0:$.organizer_type)||"",language:e.locale?[e.locale]:[],country_iso:e.location.country_iso||"",is_use_resource:"false",privacy:!1}),h=fe(Bn.clone(c.value)),f=pe(()=>{const M=Bn.cloneDeep(h.value),S=["title","activity_type","duration","is_recurring_event_local","start_date","end_date","theme","description"];return["open-online","invite-online"].includes(M.activity_type)||S.push("location"),S.every(F=>!Bn.isEmpty(M[F]))}),p=pe(()=>{const M=Bn.cloneDeep(h.value),S=["audience","ages","is_extracurricular_event"];return!!M.participants_count&&S.every(F=>!Bn.isEmpty(M[F]))}),m=pe(()=>{const M=Bn.cloneDeep(h.value),S=["organizer","organizer_type","country_iso","user_email"];return["open-online","invite-online"].includes(M.activity_type)&&S.push("event_url"),M.privacy?S.every(F=>!Bn.isEmpty(M[F])):!1}),y=pe(()=>a.value===1&&!f.value||a.value===2&&!p.value||a.value===3&&!m.value),_=M=>{a.value=Math.max(Math.min(M,4),1)},b=()=>{var F,ie,ee,de;const M=((F=e==null?void 0:e.event)==null?void 0:F.id)||((ie=r.value)==null?void 0:ie.id),S=((ee=e==null?void 0:e.event)==null?void 0:ee.slug)||((de=r.value)==null?void 0:de.slug);window.location.href=`/view/${M}/${S}`},A=()=>window.location.href="/events",H=()=>window.location.reload(),V=async()=>{var F,ie,ee,de,te,N,J;o.value={};const M=h.value,S={_token:e.token,_method:Bn.isNil(e.event.id)?void 0:"PATCH",title:M.title,activity_format:(F=M.activity_format)==null?void 0:F.join(","),activity_type:M.activity_type,location:M.location,geoposition:((ie=M.geoposition)==null?void 0:ie.join(","))||[],duration:M.duration,start_date:M.start_date,end_date:M.end_date,theme:(ee=M.theme)==null?void 0:ee.join(","),description:M.description,audience:(de=M.audience)==null?void 0:de.join(","),participants_count:M.participants_count,males_count:M.males_count,females_count:M.females_count,other_count:M.other_count,ages:(te=M.ages)==null?void 0:te.join(","),is_extracurricular_event:M.is_extracurricular_event==="true",is_standard_school_curriculum:M.is_standard_school_curriculum==="true",codeweek_for_all_participation_code:M.codeweek_for_all_participation_code,leading_teacher_tag:M.leading_teacher_tag,picture:M.picture,organizer:M.organizer,organizer_type:M.organizer_type,language:M.language,country_iso:M.country_iso,is_use_resource:M.is_use_resource==="true",event_url:M.event_url,contact_person:M.contact_person,user_email:M.user_email,privacy:M.privacy===!0?"on":void 0};M.is_recurring_event_local==="true"&&(S.recurring_event=M.recurring_event,S.recurring_type=M.recurring_type);try{if(!Bn.isNil(e.event.id))await Tt.post(`/events/${e.event.id}`,S);else{const{data:D}=await Tt.post("/events",S);r.value=D.event}_(4)}catch(D){o.value=(J=(N=D.response)==null?void 0:N.data)==null?void 0:J.errors,a.value=1}};return Wt(()=>e.event,()=>{var ie,ee,de,te;if(!e.event.id)return;const M=N=>{var J,D;return((D=(J=N==null?void 0:N.split(","))==null?void 0:J.filter(Y=>!!Y))==null?void 0:D.map(Y=>Number(Y)))||[]},S=e.event,F=S.geoposition||((ie=e.location)==null?void 0:ie.geoposition);h.value={...h.value,title:S.title,activity_format:S.activity_format,activity_type:S.activity_type||"open-in-person",location:S.location||((ee=e.location)==null?void 0:ee.location),geoposition:F==null?void 0:F.split(","),duration:S.duration,start_date:S.start_date,end_date:S.end_date,recurring_event:S.recurring_event||"daily",recurring_type:S.recurring_type,theme:M(e.selectedValues.themes),description:S.description,audience:M(e.selectedValues.audiences),participants_count:S.participants_count,males_count:S.males_count,females_count:S.females_count,other_count:S.other_count,ages:S.ages,is_extracurricular_event:String(!!S.is_extracurricular_event),is_standard_school_curriculum:String(!!S.is_standard_school_curriculum),codeweek_for_all_participation_code:S.codeweek_for_all_participation_code,leading_teacher_tag:S.leading_teacher_tag,picture:S.picture,pictureUrl:e.selectedValues.picture,organizer:S.organizer||((de=e.location)==null?void 0:de.name),organizer_type:S.organizer_type||((te=e==null?void 0:e.location)==null?void 0:te.organizer_type),language:S.languages||[e.locale],country_iso:S.country_iso||e.location.country_iso,is_use_resource:String(!!S.is_use_resource),event_url:S.event_url,contact_person:S.contact_person,user_email:S.user_email},S.recurring_event&&(h.value.is_recurring_event_local="true")},{immediate:!0}),Wt(()=>a.value,()=>{if(a.value===4){const M=document.getElementById("add-event-hero-section");M&&(M.style.display="none"),window.scrollTo({top:0})}else if(s.value){const M=s.value.getBoundingClientRect().top;window.scrollTo({top:M+window.pageYOffset-40})}}),Ft(()=>{const M=new IntersectionObserver(([F])=>{u.value=F.isIntersecting}),S=document.getElementById("page-footer");S&&M.observe(S)}),{containerRef:s,step:a,stepTitles:n,errors:o,formValues:h,handleGoToActivity:b,handleGoMapPage:A,handleReloadPage:H,handleMoveStep:_,handleSubmit:V,disableNextbutton:y,validStep1:f,validStep2:p,validStep3:m,pageFooterVisible:u}}},YN={key:0,class:"flex relative justify-center py-10 codeweek-container-lg"},zN={class:"flex gap-12"},KN=["onClick"],GN={class:"flex-1"},JN={class:"text-slate-500 font-normal text-base leading-[22px] p-0 text-center"},ZN={key:0,class:"absolute top-6 left-[calc(100%+1.5rem)] -translate-x-1/2 w-[calc(100%-1rem)] md:w-[calc(100%-0.75rem)] h-[2px] bg-[#CCF0F9]"},XN={key:1,class:"flex relative justify-center px-4 py-10 codeweek-container-lg md:px-10 md:py-20"},QN={class:"flex flex-col justify-center items-center text-center gap-4 max-w-[660px]"},e4={class:"text-dark-blue text-[22px] md:text-4xl font-semibold font-[Montserrat]"},t4={key:0,class:"flex flex-col gap-4 text-[16px] text-center"},n4={ref:"containerRef",class:"relative w-full"},r4={class:"relative pt-20 pb-16 codeweek-container-lg md:pt-32 md:pb-20"},s4={class:"flex justify-center"},i4={class:"flex flex-col max-w-[852px] w-full"},a4={key:0,class:"text-dark-blue text-2xl md:text-4xl leading-[44px] font-medium font-['Montserrat'] mb-10 text-center"},l4=["href"],o4={class:"flex flex-wrap gap-y-2 gap-x-4 justify-between mt-10 min-h-12"},u4={key:0},c4={key:1},d4=["disabled"],f4={key:0},h4={key:1},p4={key:1},m4={key:2};function g4(e,t,n,r,s,a){var p;const o=at("FormStep1"),u=at("FormStep2"),c=at("FormStep3"),h=at("CheckboxField"),f=at("AddConfirmation");return k(),P(Ve,null,[r.step<4?(k(),P("div",YN,[v("div",zN,[(k(!0),P(Ve,null,Qe(r.stepTitles,(m,y)=>(k(),P("div",{class:Be(["flex relative flex-col flex-1 gap-2 items-center md:w-52",[y===0&&"cursor-pointer",y+1===2&&r.validStep1&&"cursor-pointer",y+1===3&&r.validStep2&&"cursor-pointer"]]),onClick:()=>{y+1===2&&!r.validStep1||y+1===3&&!r.validStep2||r.handleMoveStep(y+1)}},[v("div",{class:Be(["w-12 h-12 rounded-full flex justify-center items-center text-['#20262C'] font-semibold text-2xl",[r.step===y+1?"bg-light-blue-300":"bg-light-blue-100"]])},se(y+1),3),v("div",GN,[v("p",JN,se(e.$t(`event.${m}`)),1)]),yr.formValues.privacy=m),name:"privacy"},{default:Te(()=>[v("div",null,[v("span",null,se(e.$t("event.privacy")),1),v("a",{class:"ml-1 !inline cookweek-link",href:n.privacyLink,target:"_blank"},se(e.$t("event.privacy-policy-terms")),9,l4)])]),_:1},8,["modelValue"])],2),v("div",{class:Be([r.step!==4&&"hidden"])},[he(f,{formValues:r.formValues,themes:n.themes,location:n.location,audiences:n.audiences,leadingTeachers:n.leadingTeachers,languages:n.languages,countries:n.countries},null,8,["formValues","themes","location","audiences","leadingTeachers","languages","countries"])],2),v("div",o4,[r.step>1?(k(),P("button",{key:0,class:"flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2.5 px-6 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] max-sm:w-full sm:min-w-[224px]",type:"button",onClick:t[1]||(t[1]=()=>{r.step===4?r.handleGoToActivity():r.handleMoveStep(r.step-1)})},[r.step===4?(k(),P("span",u4,se(e.$t("event.view-activity")),1)):(k(),P("span",c4,se(e.$t("event.previous-step")),1))])):ae("",!0),t[4]||(t[4]=v("div",{class:"hidden md:block"},null,-1)),v("div",{id:"footer-scroll-activity",class:Be(["flex justify-center max-sm:w-full sm:min-w-[224px]",[r.step<4&&!r.pageFooterVisible?"md:!translate-y-0 max-md:fixed max-md:bottom-0 max-md:left-0 max-md:border-t-2 max-md:border-primary max-md:py-4 max-md:px-[44px] max-md:w-full max-md:bg-white max-md:z-[99]":"!translate-y-0"]])},[v("button",{class:Be(["text-nowrap flex justify-center items-center duration-300 rounded-full py-2.5 px-6 font-semibold text-lg max-sm:w-full sm:min-w-[224px]",[r.disableNextbutton?"cursor-not-allowed bg-gray-200 text-gray-400":"bg-primary hover:bg-hover-orange text-[#20262C]"]]),type:"button",disabled:r.disableNextbutton,onClick:t[2]||(t[2]=()=>{var m;r.step===4?(m=n.event)!=null&&m.id?r.handleGoMapPage():r.handleReloadPage():r.step===3&&r.validStep3?r.handleSubmit():r.step===2&&r.validStep2?r.handleMoveStep(3):r.step===1&&r.validStep1&&r.handleMoveStep(2)})},[r.step===4?(k(),P(Ve,{key:0},[(p=n.event)!=null&&p.id?(k(),P("span",f4,se(e.$t("event.back-to-map-page")),1)):(k(),P("span",h4,se(e.$t("event.add-another-activity")),1))],64)):r.step===3?(k(),P("span",p4,se(e.$t("event.submit")),1)):(k(),P("span",m4,se(e.$t("event.next-step")),1))],10,d4)],2)])])])])],512)],64)}const v4=vt(WN,[["render",g4]]),y4={props:{property:Object,type:String},data(){return{label:this.type?this.$t("resources.resources."+this.type+"."+this.property.name):this.property.name}}},_4={class:"bg-light-blue-100 py-1 px-4 text-sm font-semibold text-slate-500 rounded-full whitespace-nowrap"};function b4(e,t,n,r,s,a){return k(),P("span",_4,se(s.label),1)}const H1=vt(y4,[["render",b4]]),w4={components:{ResourcePill:H1},props:{resource:Object},data(){return{descriptionHeight:"auto",needShowMore:!0,showMore:!1}},methods:{computeDescriptionHeight(){const e=this.$refs.descriptionContainerRef,t=this.$refs.descriptionRef,n=e.clientHeight,r=Math.floor(n/22);t.style.height="auto",this.descriptionHeight="auto",this.needShowMore=t.offsetHeight>n,t.offsetHeight>n?(t.style.height=`${r*22}px`,this.descriptionHeight=`${r*22}px`):this.showMore=!1},onToggleShowMore(){const e=this.$refs.descriptionRef;this.showMore=!this.showMore,this.showMore?e.style.height="auto":e.style.height=this.descriptionHeight}},mounted:function(){this.computeDescriptionHeight()}},x4={class:"relative flex flex-col bg-white rounded-lg overflow-hidden"},k4={class:"flex-shrink-0"},S4=["src"],T4={class:"flex gap-2 flex-wrap mb-2"},C4={class:"text-dark-blue font-semibold font-['Montserrat'] leading-6"},A4={key:0,class:"text-slate-500 text-[16px] leading-[22px]"},E4={ref:"descriptionRef",class:"relative flex-grow text-slate-500 overflow-hidden",style:{height:"auto"}},O4={class:"flex-shrink-0"},M4=["href"];function R4(e,t,n,r,s,a){var u,c,h,f;const o=at("resource-pill");return k(),P("div",x4,[v("div",k4,[v("img",{src:n.resource.thumbnail},null,8,S4)]),v("div",{class:Be(["flex-grow flex flex-col gap-2 px-6 py-4 h-fit",{"max-h-[450px]":s.needShowMore&&!s.showMore}])},[v("div",T4,[(k(!0),P(Ve,null,Qe(n.resource.types,p=>(k(),it(o,{property:p,type:"types"},null,8,["property"]))),256))]),v("div",C4,se(n.resource.name),1),(c=(u=n.resource.languages)==null?void 0:u[0])!=null&&c.name?(k(),P("div",A4," Language: "+se(((f=(h=n.resource.languages)==null?void 0:h[0])==null?void 0:f.name)||""),1)):ae("",!0),v("div",{ref:"descriptionContainerRef",class:Be(["flex-grow text-[16px] leading-[22px] h-full",{"overflow-hidden":s.needShowMore&&!s.showMore}])},[v("div",E4,[ft(se(n.resource.description)+" ",1),s.needShowMore?(k(),P("div",{key:0,class:Be(["flex justify-end bottom-0 right-0 bg-white pl-0.5 text-dark-blue",{absolute:!s.showMore,"w-full":s.showMore}])},[v("button",{onClick:t[0]||(t[0]=(...p)=>a.onToggleShowMore&&a.onToggleShowMore(...p))},se(s.showMore?"Show less":"... Show more"),1)],2)):ae("",!0)],512)],2),v("div",O4,[t[2]||(t[2]=v("div",{class:"h-[56px]"},null,-1)),v("a",{class:"absolute left-6 right-6 bottom-4 flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-3 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group",href:n.resource.source,target:"_blank"},[v("span",null,se(e.$t("myevents.view_lesson")),1),t[1]||(t[1]=v("div",{class:"flex gap-2 w-4 overflow-hidden"},[v("img",{src:"/images/arrow-right-icon.svg",class:"min-w-4 duration-500 transform -translate-x-6 group-hover:translate-x-0"}),v("img",{src:"/images/arrow-right-icon.svg",class:"min-w-4 duration-500 transform -translate-x-6 group-hover:translate-x-0"})],-1))],8,M4)])],2)])}const U1=vt(w4,[["render",R4]]),D4={props:["pagination","offset"],methods:{isCurrentPage(e){return this.pagination.current_page===e},changePage(e){e<1||e>this.pagination.last_page||(this.pagination.current_page=e,this.$emit("paginate",e))}},computed:{pages(){let e=[],t=this.pagination.current_page-Math.floor(this.offset/2);t<1&&(t=1);let n=t+this.offset-1;for(n>this.pagination.last_page&&(n=this.pagination.last_page);t<=n;)e.push(t),t++;return e}}},P4={role:"navigation","aria-label":"pagination"},L4={class:"flex flex-wrap items-center justify-center gap-2 py-12 m-0 font-['Blinker']"},I4=["disabled"],N4={class:"flex items-center gap-1 whitespace-nowrap"},V4=["onClick"],F4={key:1,class:"flex justify-center items-center w-12 h-12 text-xl rounded font-normal text-[#333E48] duration-300"},$4=["disabled"];function B4(e,t,n,r,s,a){return k(),P("nav",P4,[v("ul",L4,[v("li",null,[v("a",{class:"block p-4 duration-300 rounded-full cursor-pointer bg-yellow hover:bg-primary",onClick:t[0]||(t[0]=Et(o=>a.changePage(n.pagination.current_page-1),["prevent"])),disabled:n.pagination.current_page<=1},t[2]||(t[2]=[v("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[v("path",{d:"M25.8335 16H7.16683",stroke:"black","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"}),v("path",{d:"M16.5 6.66663L7.16667 16L16.5 25.3333",stroke:"black","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),8,I4)]),(k(!0),P(Ve,null,Qe(a.pages,o=>(k(),P("li",N4,[n.pagination.current_page!=o?(k(),P("a",{key:0,class:"flex justify-center items-center w-12 h-12 text-xl hover:bg-[#1C4DA1]/10 rounded font-bold text-[#1C4DA1] underline duration-300 cursor-pointer",onClick:Et(u=>a.changePage(o),["prevent"])},se(o),9,V4)):(k(),P("a",F4,se(o),1))]))),256)),v("li",null,[v("a",{class:"block p-4 duration-300 rounded-full cursor-pointer bg-yellow hover:bg-primary",onClick:t[1]||(t[1]=Et(o=>a.changePage(n.pagination.current_page+1),["prevent"])),disabled:n.pagination.current_page>=n.pagination.last_page},t[3]||(t[3]=[v("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[v("path",{d:"M7.16699 16H25.8337",stroke:"black","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"}),v("path",{d:"M16.5 6.66663L25.8333 16L16.5 25.3333",stroke:"black","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),8,$4)])])])}const dd=vt(D4,[["render",B4]]);var H4={exports:{}};/*! +}`;var gt=Lv(function(){return Rt(R,Je+"return "+Re).apply(n,K)});if(gt.source=Re,bf(gt))throw gt;return gt}function hA(i){return Nt(i).toLowerCase()}function pA(i){return Nt(i).toUpperCase()}function mA(i,l,d){if(i=Nt(i),i&&(d||l===n))return jm(i);if(!i||!(l=Pr(l)))return i;var g=as(i),w=as(l),R=qm(g,w),K=Wm(g,w)+1;return hi(g,R,K).join("")}function gA(i,l,d){if(i=Nt(i),i&&(d||l===n))return i.slice(0,zm(i)+1);if(!i||!(l=Pr(l)))return i;var g=as(i),w=Wm(g,as(l))+1;return hi(g,0,w).join("")}function vA(i,l,d){if(i=Nt(i),i&&(d||l===n))return i.replace(_d,"");if(!i||!(l=Pr(l)))return i;var g=as(i),w=qm(g,as(l));return hi(g,w).join("")}function yA(i,l){var d=F,g=ie;if(tn(l)){var w="separator"in l?l.separator:w;d="length"in l?mt(l.length):d,g="omission"in l?Pr(l.omission):g}i=Nt(i);var R=i.length;if(Ma(i)){var K=as(i);R=K.length}if(d>=R)return i;var X=d-Ra(g);if(X<1)return g;var oe=K?hi(K,0,X).join(""):i.slice(0,X);if(w===n)return oe+g;if(K&&(X+=oe.length-X),wf(w)){if(i.slice(X).search(w)){var Ee,Oe=oe;for(w.global||(w=Nd(w.source,Nt(dm.exec(w))+"g")),w.lastIndex=0;Ee=w.exec(Oe);)var Re=Ee.index;oe=oe.slice(0,Re===n?X:Re)}}else if(i.indexOf(Pr(w),X)!=X){var qe=oe.lastIndexOf(w);qe>-1&&(oe=oe.slice(0,qe))}return oe+g}function _A(i){return i=Nt(i),i&&pr.test(i)?i.replace(We,Kx):i}var bA=Fa(function(i,l,d){return i+(d?" ":"")+l.toUpperCase()}),Sf=Ig("toUpperCase");function Pv(i,l,d){return i=Nt(i),l=d?n:l,l===n?jx(i)?Zx(i):Lx(i):i.match(l)||[]}var Lv=yt(function(i,l){try{return Rr(i,n,l)}catch(d){return bf(d)?d:new ot(d)}}),wA=$s(function(i,l){return Yr(l,function(d){d=Ss(d),Vs(i,d,yf(i[d],i))}),i});function xA(i){var l=i==null?0:i.length,d=tt();return i=l?Xt(i,function(g){if(typeof g[1]!="function")throw new zr(o);return[d(g[0]),g[1]]}):[],yt(function(g){for(var w=-1;++wY)return[];var d=Pe,g=Kn(i,Pe);l=tt(l),i-=Pe;for(var w=Pd(g,l);++d0||l<0)?new xt(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),l!==n&&(l=mt(l),d=l<0?d.dropRight(-l):d.take(l-i)),d)},xt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},xt.prototype.toArray=function(){return this.take(Pe)},xs(xt.prototype,function(i,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),g=/^(?:head|last)$/.test(l),w=C[g?"take"+(l=="last"?"Right":""):l],R=g||/^find/.test(l);w&&(C.prototype[l]=function(){var K=this.__wrapped__,X=g?[1]:arguments,oe=K instanceof xt,Ee=X[0],Oe=oe||ct(K),Re=function(bt){var At=w.apply(C,li([bt],X));return g&&qe?At[0]:At};Oe&&d&&typeof Ee=="function"&&Ee.length!=1&&(oe=Oe=!1);var qe=this.__chain__,Je=!!this.__actions__.length,nt=R&&!qe,gt=oe&&!Je;if(!R&&Oe){K=gt?K:new xt(this);var rt=i.apply(K,X);return rt.__actions__.push({func:xu,args:[Re],thisArg:n}),new Kr(rt,qe)}return nt&>?i.apply(this,X):(rt=this.thru(Re),nt?g?rt.value()[0]:rt.value():rt)})}),Yr(["pop","push","shift","sort","splice","unshift"],function(i){var l=Ko[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",g=/^(?:pop|shift)$/.test(i);C.prototype[i]=function(){var w=arguments;if(g&&!this.__chain__){var R=this.value();return l.apply(ct(R)?R:[],w)}return this[d](function(K){return l.apply(ct(K)?K:[],w)})}}),xs(xt.prototype,function(i,l){var d=C[l];if(d){var g=d.name+"";$t.call(Ia,g)||(Ia[g]=[]),Ia[g].push({name:l,func:d})}}),Ia[mu(n,H).name]=[{name:"wrapper",func:n}],xt.prototype.clone=_k,xt.prototype.reverse=bk,xt.prototype.value=wk,C.prototype.at=JT,C.prototype.chain=ZT,C.prototype.commit=XT,C.prototype.next=QT,C.prototype.plant=t2,C.prototype.reverse=n2,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=r2,C.prototype.first=C.prototype.head,Ml&&(C.prototype[Ml]=e2),C},Da=Xx();Wi?((Wi.exports=Da)._=Da,Td._=Da):jn._=Da}).call(F1)})(Oc,Oc.exports);var hL=Oc.exports;const Bn=fL(hL);function pL(e,t){switch(e.replace("_","-")){case"af":case"af-ZA":case"bn":case"bn-BD":case"bn-IN":case"bg":case"bg-BG":case"ca":case"ca-AD":case"ca-ES":case"ca-FR":case"ca-IT":case"da":case"da-DK":case"de":case"de-AT":case"de-BE":case"de-CH":case"de-DE":case"de-LI":case"de-LU":case"el":case"el-CY":case"el-GR":case"en":case"en-AG":case"en-AU":case"en-BW":case"en-CA":case"en-DK":case"en-GB":case"en-HK":case"en-IE":case"en-IN":case"en-NG":case"en-NZ":case"en-PH":case"en-SG":case"en-US":case"en-ZA":case"en-ZM":case"en-ZW":case"eo":case"eo-US":case"es":case"es-AR":case"es-BO":case"es-CL":case"es-CO":case"es-CR":case"es-CU":case"es-DO":case"es-EC":case"es-ES":case"es-GT":case"es-HN":case"es-MX":case"es-NI":case"es-PA":case"es-PE":case"es-PR":case"es-PY":case"es-SV":case"es-US":case"es-UY":case"es-VE":case"et":case"et-EE":case"eu":case"eu-ES":case"eu-FR":case"fa":case"fa-IR":case"fi":case"fi-FI":case"fo":case"fo-FO":case"fur":case"fur-IT":case"fy":case"fy-DE":case"fy-NL":case"gl":case"gl-ES":case"gu":case"gu-IN":case"ha":case"ha-NG":case"he":case"he-IL":case"hu":case"hu-HU":case"is":case"is-IS":case"it":case"it-CH":case"it-IT":case"ku":case"ku-TR":case"lb":case"lb-LU":case"ml":case"ml-IN":case"mn":case"mn-MN":case"mr":case"mr-IN":case"nah":case"nb":case"nb-NO":case"ne":case"ne-NP":case"nl":case"nl-AW":case"nl-BE":case"nl-NL":case"nn":case"nn-NO":case"no":case"om":case"om-ET":case"om-KE":case"or":case"or-IN":case"pa":case"pa-IN":case"pa-PK":case"pap":case"pap-AN":case"pap-AW":case"pap-CW":case"ps":case"ps-AF":case"pt":case"pt-BR":case"pt-PT":case"so":case"so-DJ":case"so-ET":case"so-KE":case"so-SO":case"sq":case"sq-AL":case"sq-MK":case"sv":case"sv-FI":case"sv-SE":case"sw":case"sw-KE":case"sw-TZ":case"ta":case"ta-IN":case"ta-LK":case"te":case"te-IN":case"tk":case"tk-TM":case"ur":case"ur-IN":case"ur-PK":case"zu":case"zu-ZA":return t===1?0:1;case"am":case"am-ET":case"bh":case"fil":case"fil-PH":case"fr":case"fr-BE":case"fr-CA":case"fr-CH":case"fr-FR":case"fr-LU":case"gun":case"hi":case"hi-IN":case"hy":case"hy-AM":case"ln":case"ln-CD":case"mg":case"mg-MG":case"nso":case"nso-ZA":case"ti":case"ti-ER":case"ti-ET":case"wa":case"wa-BE":case"xbr":return t===0||t===1?0:1;case"be":case"be-BY":case"bs":case"bs-BA":case"hr":case"hr-HR":case"ru":case"ru-RU":case"ru-UA":case"sr":case"sr-ME":case"sr-RS":case"uk":case"uk-UA":return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2;case"cs":case"cs-CZ":case"sk":case"sk-SK":return t==1?0:t>=2&&t<=4?1:2;case"ga":case"ga-IE":return t==1?0:t==2?1:2;case"lt":case"lt-LT":return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2;case"sl":case"sl-SI":return t%100==1?0:t%100==2?1:t%100==3||t%100==4?2:3;case"mk":case"mk-MK":return t%10==1?0:1;case"mt":case"mt-MT":return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3;case"lv":case"lv-LV":return t==0?0:t%10==1&&t%100!=11?1:2;case"pl":case"pl-PL":return t==1?0:t%10>=2&&t%10<=4&&(t%100<12||t%100>14)?1:2;case"cy":case"cy-GB":return t==1?0:t==2?1:t==8||t==11?2:3;case"ro":case"ro-RO":return t==1?0:t==0||t%100>0&&t%100<20?1:2;case"ar":case"ar-AE":case"ar-BH":case"ar-DZ":case"ar-EG":case"ar-IN":case"ar-IQ":case"ar-JO":case"ar-KW":case"ar-LB":case"ar-LY":case"ar-MA":case"ar-OM":case"ar-QA":case"ar-SA":case"ar-SD":case"ar-SS":case"ar-SY":case"ar-TN":case"ar-YE":return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11&&t%100<=99?4:5;default:return 0}}function mL(e,t,n){let r=e.split("|");const s=gL(r,t);if(s!==null)return s.trim();r=yL(r);const a=pL(n,t);return r.length===1||!r[a]?r[0]:r[a]}function gL(e,t){for(const n of e){let r=vL(n,t);if(r!==null)return r}return null}function vL(e,t){const n=e.match(/^[\{\[]([^\[\]\{\}]*)[\}\]]([\s\S]*)/)||[];if(n.length!==3)return null;const r=n[1],s=n[2];if(r.includes(",")){let[a,o]=r.split(",");if(o==="*"&&t>=parseFloat(a))return s;if(a==="*"&&t<=parseFloat(o))return s;if(t>=parseFloat(a)&&t<=parseFloat(o))return s}return parseFloat(r)===t?s:null}function yL(e){return e.map(t=>t.replace(/^[\{\[]([^\[\]\{\}]*)[\}\]]/,""))}const Kf=(e,t,n={})=>{try{return e(t)}catch{return n}},Gf=async(e,t={})=>{try{return(await e).default||t}catch{return t}},_L={};function r0(e){return e||bL()||wL()}function bL(){return typeof process<"u"}function wL(){return typeof _L<"u"}const Za=typeof window>"u";let Wa=null;const ju={lang:!Za&&document.documentElement.lang?document.documentElement.lang.replace("-","_"):null,fallbackLang:"en",fallbackMissingTranslations:!1,resolve:e=>new Promise(t=>t({default:{}})),onLoad:e=>{}};pe(()=>wr.getSharedInstance().getCurrentLanguage().value);const xL={shared:!0};function Le(e,t={}){return wr.getSharedInstance().trans(e,t)}const kL={install(e,t={}){t={...xL,...t};const n=t.shared?wr.getSharedInstance(t,!0):new wr(t);e.config.globalProperties.$t=(r,s)=>n.trans(r,s),e.config.globalProperties.$tChoice=(r,s,a)=>n.transChoice(r,s,a),e.provide("i18n",n)}};class wr{constructor(t={}){this.currentLanguage=fe(ju.lang||ju.fallbackLang),this.activeMessages=Hr({}),this.fallbackMessages=Hr({}),this.reset=()=>{wr.loaded=[],this.options=ju;for(const[n]of Object.entries(this.activeMessages))this.activeMessages[n]=null;this===Wa&&(Wa=null)},this.options={...ju,...t},this.options.fallbackMissingTranslations?this.loadFallbackLanguage():this.load()}setOptions(t={},n=!1){return this.options={...this.options,...t},n&&this.load(),this}load(){this[Za?"loadLanguage":"loadLanguageAsync"](this.getActiveLanguage())}loadFallbackLanguage(){if(!Za){this.resolveLangAsync(this.options.resolve,this.options.fallbackLang).then(({default:n})=>{this.applyFallbackLanguage(this.options.fallbackLang,n),this.load()});return}const{default:t}=this.resolveLang(this.options.resolve,this.options.fallbackLang);this.applyFallbackLanguage(this.options.fallbackLang,t),this.loadLanguage(this.getActiveLanguage())}loadLanguage(t,n=!1){const r=wr.loaded.find(a=>a.lang===t);if(r){this.setLanguage(r);return}const{default:s}=this.resolveLang(this.options.resolve,t);this.applyLanguage(t,s,n,this.loadLanguage)}loadLanguageAsync(t,n=!1,r=!1){var a;r||((a=this.abortController)==null||a.abort(),this.abortController=new AbortController);const s=wr.loaded.find(o=>o.lang===t);return s?Promise.resolve(this.setLanguage(s)):new Promise((o,u)=>{this.abortController.signal.addEventListener("abort",()=>{o()}),this.resolveLangAsync(this.options.resolve,t).then(({default:c})=>{o(this.applyLanguage(t,c,n,this.loadLanguageAsync))})})}resolveLang(t,n,r={}){return Object.keys(r).length||(r=Kf(t,n)),r0(Za)?{default:{...r,...Kf(t,`php_${n}`)}}:{default:r}}async resolveLangAsync(t,n){let r=Kf(t,n);if(!(r instanceof Promise))return this.resolveLang(t,n,r);if(r0(Za)){const s=await Gf(t(`php_${n}`)),a=await Gf(r);return new Promise(o=>o({default:{...s,...a}}))}return new Promise(async s=>s({default:await Gf(r)}))}applyLanguage(t,n,r=!1,s){if(Object.keys(n).length<1){if(/[-_]/g.test(t)&&!r)return s.call(this,t.replace(/[-_]/g,o=>o==="-"?"_":"-"),!0,!0);if(t!==this.options.fallbackLang)return s.call(this,this.options.fallbackLang,!1,!0)}const a={lang:t,messages:n};return this.addLoadedLang(a),this.setLanguage(a)}applyFallbackLanguage(t,n){for(const[r,s]of Object.entries(n))this.fallbackMessages[r]=s;this.addLoadedLang({lang:this.options.fallbackLang,messages:n})}addLoadedLang(t){const n=wr.loaded.findIndex(r=>r.lang===t.lang);if(n!==-1){wr.loaded[n]=t;return}wr.loaded.push(t)}setLanguage({lang:t,messages:n}){Za||document.documentElement.setAttribute("lang",t.replace("_","-")),this.options.lang=t,this.currentLanguage.value=t;for(const[r,s]of Object.entries(n))this.activeMessages[r]=s;for(const[r,s]of Object.entries(this.fallbackMessages))(!this.isValid(n[r])||this.activeMessages[r]===r)&&(this.activeMessages[r]=s);for(const[r]of Object.entries(this.activeMessages))!this.isValid(n[r])&&!this.isValid(this.fallbackMessages[r])&&(this.activeMessages[r]=null);return this.options.onLoad(t),t}getActiveLanguage(){return this.options.lang||this.options.fallbackLang}getCurrentLanguage(){return pe(()=>this.currentLanguage.value)}isLoaded(t){return t??(t=this.getActiveLanguage()),wr.loaded.some(n=>n.lang.replace(/[-_]/g,"-")===t.replace(/[-_]/g,"-"))}trans(t,n={}){return this.wTrans(t,n).value}wTrans(t,n={}){return hb(()=>{let r=this.findTranslation(t);this.isValid(r)||(r=this.findTranslation(t.replace(/\//g,"."))),this.activeMessages[t]=this.isValid(r)?r:t}),pe(()=>this.makeReplacements(this.activeMessages[t],n))}transChoice(t,n,r={}){return this.wTransChoice(t,n,r).value}wTransChoice(t,n,r={}){const s=this.wTrans(t,r);return r.count=n.toString(),pe(()=>this.makeReplacements(mL(s.value,n,this.options.lang),r))}findTranslation(t){if(this.isValid(this.activeMessages[t]))return this.activeMessages[t];if(this.activeMessages[`${t}.0`]!==void 0){const r=Object.entries(this.activeMessages).filter(s=>s[0].startsWith(`${t}.`)).map(s=>s[1]);return Hr(r)}return this.activeMessages[t]}makeReplacements(t,n){const r=s=>s.charAt(0).toUpperCase()+s.slice(1);return Object.entries(n||[]).sort((s,a)=>s[0].length>=a[0].length?-1:1).forEach(([s,a])=>{a=a.toString(),t=(t||"").replace(new RegExp(`:${s}`,"g"),a).replace(new RegExp(`:${s.toUpperCase()}`,"g"),a.toUpperCase()).replace(new RegExp(`:${r(s)}`,"g"),r(a))}),t}isValid(t){return t!=null}static getSharedInstance(t,n=!1){return(Wa==null?void 0:Wa.setOptions(t,n))||(Wa=new wr(t))}}wr.loaded=[];function Hi(){const e=H=>{const V={};return H==null||H.forEach(x=>{V[x.id]=x.name}),V},t=pe(()=>[Le("event.activity-overview"),Le("event.who-is-the-activity-for"),Le("event.organiser")]),n=pe(()=>[{id:"coding-camp",name:Le("event.coding-camp")},{id:"summer-camp",name:Le("event.summer-camp")},{id:"weekend-course",name:Le("event.weekend-course")},{id:"evening-course",name:Le("event.evening-course")},{id:"careerday",name:Le("event.career-day")},{id:"university-visit",name:Le("event.university-visit")},{id:"coding-home",name:Le("event.coding-at-home")},{id:"code-week-challenge",name:Le("event.code-week-challenge")},{id:"competition",name:Le("event.competition")},{id:"other",name:Le("event.other-group-work-seminars-workshops")}]),r=pe(()=>e(n.value)),s=pe(()=>[{id:"open-online",name:Le("event.activitytype.open-online")},{id:"invite-online",name:Le("event.activitytype.invite-online")},{id:"open-in-person",name:Le("event.activitytype.open-in-person")},{id:"invite-in-person",name:Le("event.activitytype.invite-in-person")},{id:"other",name:Le("event.organizertype.other")}]),a=pe(()=>e(s.value)),o=pe(()=>({daily:Le("event.daily"),weekly:Le("event.weekly"),monthly:Le("event.monthly")})),u=pe(()=>[{id:"0-1",name:Le("event.0-1-hours")},{id:"1-2",name:Le("event.1-2-hours")},{id:"2-4",name:Le("event.2-4-hours")},{id:"over-4",name:Le("event.longer-than-4-hours")}]),c=pe(()=>e(u.value)),h=pe(()=>[{id:"consecutive",name:Le("event.consecutive-learning-over-multiple-sessions")},{id:"individual",name:Le("event.recurring-individual")}]),f=pe(()=>e(h.value)),p=pe(()=>[{id:"under-5",name:Le("event.under-5-early-learners")},{id:"6-9",name:Le("event.6-9-primary")},{id:"10-12",name:Le("event.10-12-upper-primary")},{id:"13-15",name:Le("event.13-15-lower-secondary")},{id:"16-18",name:Le("event.16-18-upper-secondary")},{id:"19-25",name:Le("event.19-25-young-adults")},{id:"over-25",name:Le("event.over-25-adults")}]),m=pe(()=>e(p.value)),y=pe(()=>[{id:"school",name:Le("event.organizertype.school")},{id:"library",name:Le("event.organizertype.library")},{id:"non profit",name:Le("event.organizertype.non-profit")},{id:"private business",name:Le("event.organizertype.private-business")},{id:"other",name:Le("event.organizertype.other")}]),_=pe(()=>e(y.value)),b=pe(()=>[{id:"robotics-drones-smart-devices",name:Le("event.theme.robotics-drones-smart-devices")},{id:"cybersecurity-data",name:Le("event.theme.cybersecurity-data")},{id:"web-app-software-development",name:Le("event.theme.web-app-software-development")},{id:"visual-block-programming",name:Le("event.theme.visual-block-programming")},{id:"unplugged-playful-activities",name:Le("event.theme.unplugged-playful-activities")},{id:"art-creative-coding",name:Le("event.theme.art-creative-coding")},{id:"game-design",name:Le("event.theme.game-design")},{id:"internet-of-things-wearables",name:Le("event.theme.internet-of-things-wearables")},{id:"ar-vr-3d-technologies",name:Le("event.theme.ar-vr-3d-technologies")},{id:"digital-careers-learning-pathways",name:Le("event.theme.digital-careers-learning-pathways")},{id:"digital-literacy-soft-skills",name:Le("event.theme.digital-literacy-soft-skills")},{id:"ai-generative-ai",name:Le("event.theme.ai-generative-ai")},{id:"awareness-inspiration",name:Le("event.theme.awareness-inspiration")},{id:"promoting-diversity-inclusion",name:Le("event.theme.promoting-diversity-inclusion")},{id:"other-theme",name:Le("event.theme.other-theme")}]),A=pe(()=>e(b.value));return{stepTitles:t,activityFormatOptions:n,activityFormatOptionsMap:r,activityTypeOptions:s,activityTypeOptionsMap:a,recurringFrequentlyMap:o,durationOptions:u,durationOptionsMap:c,recurringTypeOptions:h,recurringTypeOptionsMap:f,ageOptions:p,ageOptionsMap:m,organizerTypeOptions:y,organizerTypeOptionsMap:_,themeOptions:b,themeOptionsMap:A}}const vt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},SL={props:{contentClass:{type:String},position:{type:String,default:"top",validator:e=>["top","right","bottom","left"].includes(e)}},setup(e){const t=fe(!1),n=pe(()=>{switch(e.position){case"top":return"bottom-full pb-2 left-1/2 -translate-x-1/2";case"right":return"left-full pl-2 top-1/2 -translate-y-1/2";case"bottom":return"top-full pt-2 left-1/2 -translate-x-1/2";case"left":return"right-full pr-2 top-1/2 -translate-y-1/2";default:return""}}),r=pe(()=>{switch(e.position){case"top":return"absolute left-1/2 bottom-0 -translate-x-1/2 translate-y-2 border-8 border-transparent border-t-gray-800";case"right":return"absolute top-1/2 left-0 -translate-y-1/2 -translate-x-2 border-8 border-transparent border-r-gray-800";case"bottom":return"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-2 border-8 border-transparent border-b-gray-800";case"left":return"absolute top-1/2 right-0 -translate-y-1/2 translate-x-2 border-8 border-transparent border-l-gray-800";default:return""}});return{show:t,positionClass:n,arrowClass:r}}},TL={class:"w-full px-3 py-2 rounded-lg bg-gray-800 text-white text-sm"};function CL(e,t,n,r,s,a){return k(),P("div",{class:"relative inline-block",onMouseenter:t[0]||(t[0]=o=>r.show=!0),onMouseleave:t[1]||(t[1]=o=>r.show=!1)},[Ne(e.$slots,"trigger",{},void 0,!0),r.show?(k(),P("div",{key:0,class:Be(["absolute z-10 break-words",r.positionClass,n.contentClass]),role:"tooltip"},[v("div",TL,[Ne(e.$slots,"content",{},void 0,!0)]),v("div",{class:Be(["tooltip-arrow",r.arrowClass])},null,2)],2)):ae("",!0)],32)}const $1=vt(SL,[["render",CL],["__scopeId","data-v-ad76dce9"]]),AL={props:{horizontalBreakpoint:String,horizontal:Boolean,label:String,name:String,names:Array,errors:Object},components:{Tooltip:$1},setup(e,{slots:t}){const n=pe(()=>{const r=[],s=[];return e.name&&s.push(e.name),e.names&&s.push(...e.names),s.forEach(a=>{var o,u;(o=e.errors)!=null&&o[a]&&r.push(...(u=e.errors)==null?void 0:u[a])}),Bn.uniq(r)});return{slots:t,errorList:n}}},EL=["for"],OL={key:0,class:"flex item-start gap-3 text-error-200 font-semibold mt-2.5 empty:hidden"},ML={class:"leading-5"};function RL(e,t,n,r,s,a){var u;const o=at("Tooltip");return k(),P("div",{class:Be(["flex items-start flex-col gap-x-3 gap-y-2",[n.horizontalBreakpoint==="md"&&"md:gap-10 md:flex-row"]])},[v("label",{for:`id_${n.name||((u=n.names)==null?void 0:u[0])||""}`,class:Be(["flex items-center font-normal text-xl flex-1 text-slate-500 'w-full",[n.horizontalBreakpoint==="md"&&"md:min-h-[48px] md:w-1/3"]])},[v("span",null,[ft(se(n.label)+" ",1),r.slots.tooltip?(k(),it(o,{key:0,class:"ml-1 translate-y-1",contentClass:"w-64"},{trigger:Te(()=>t[0]||(t[0]=[v("img",{class:"text-dark-blue w-6 h-6",src:"/images/icon_question.svg"},null,-1)])),content:Te(()=>[Ne(e.$slots,"tooltip")]),_:3})):ae("",!0)])],10,EL),v("div",{class:Be(["h-full w-full",[n.horizontalBreakpoint==="md"&&"md:w-2/3"]])},[Ne(e.$slots,"default"),r.errorList.length?(k(),P("div",OL,[t[1]||(t[1]=v("img",{src:"/images/icon_error.svg"},null,-1)),(k(!0),P(Ve,null,Qe(r.errorList,c=>(k(),P("div",ML,se(c),1))),256))])):ae("",!0),Ne(e.$slots,"end")],2)],2)}const od=vt(AL,[["render",RL]]);function Jf(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function DL(e){return(...t)=>!e(...t)}function PL(e,t){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(t.trim())!==-1}function LL(e){return e.filter(t=>!t.$isLabel)}function Zf(e,t){return n=>n.reduce((r,s)=>s[e]&&s[e].length?(r.push({$groupLabel:s[t],$isLabel:!0}),r.concat(s[e])):r,[])}const s0=(...e)=>t=>e.reduce((n,r)=>r(n),t);var IL={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return Jf(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let n=this.options.concat();return this.internalSearch?n=this.groupValues?this.filterAndFlat(n,t,this.label):this.filterOptions(n,t,this.label,this.customLabel):n=this.groupValues?Zf(this.groupValues,this.groupLabel)(n):n,n=this.hideSelected?n.filter(DL(this.isSelected)):n,this.taggable&&t.length&&!this.isExistingOption(t)&&(this.tagPosition==="bottom"?n.push({isTag:!0,label:e}):n.unshift({isTag:!0,label:e})),n.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(t=>this.customLabel(t,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,t,n){return s0(this.filterGroups(t,n,this.groupValues,this.groupLabel,this.customLabel),Zf(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return s0(Zf(this.groupValues,this.groupLabel),LL)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(Jf(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return Jf(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(t)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(t==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){t!=="Tab"&&this.removeElement(e);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const n=this.trackBy?t[this.groupValues].map(s=>s[this.trackBy]):t[this.groupValues],r=this.internalValue.filter(s=>n.indexOf(this.trackBy?s[this.trackBy]:s)===-1);this.$emit("update:modelValue",r)}else{const n=t[this.groupValues].filter(r=>!(this.isOptionDisabled(r)||this.isSelected(r)));this.max&&n.splice(this.max-this.internalValue.length),this.$emit("select",n,this.id),this.$emit("update:modelValue",this.internalValue.concat(n))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(t=>this.isSelected(t)||this.isOptionDisabled(t))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const n=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom;t>this.maxHeight||t>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))},filterOptions(e,t,n,r){return t?e.filter(s=>PL(r(s,n),t)).sort((s,a)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(s,a):r(s,n).length-r(a,n).length):e},filterGroups(e,t,n,r,s){return a=>a.map(o=>{if(!o[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const u=this.filterOptions(o[n],e,t,s);return u.length?{[r]:o[r],[n]:u}:[]})}}},NL={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const n=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);return n&&!this.wholeGroupDisabled(n)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(n)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},Ta={name:"vue-multiselect",mixins:[IL,NL],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}}};const VL=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],FL={ref:"tags",class:"multiselect__tags"},$L={class:"multiselect__tags-wrap"},BL=["textContent"],HL=["onKeypress","onMousedown"],UL=["textContent"],jL={class:"multiselect__spinner"},qL=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],WL=["id","aria-multiselectable"],YL={key:0},zL={class:"multiselect__option"},KL=["aria-selected","id","role"],GL=["onClick","onMouseenter","data-select","data-selected","data-deselect"],JL=["data-select","data-deselect","onMouseenter","onMousedown"],ZL={class:"multiselect__option"},XL={class:"multiselect__option"};function QL(e,t,n,r,s,a){return k(),P("div",{tabindex:e.searchable?-1:n.tabindex,class:Be([{"multiselect--active":e.isOpen,"multiselect--disabled":n.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"]),onFocus:t[14]||(t[14]=o=>e.activate()),onBlur:t[15]||(t[15]=o=>e.searchable?!1:e.deactivate()),onKeydown:[t[16]||(t[16]=$n(Et(o=>e.pointerForward(),["self","prevent"]),["down"])),t[17]||(t[17]=$n(Et(o=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[18]||(t[18]=$n(Et(o=>e.addPointerElement(o),["stop","self"]),["enter","tab"])),onKeyup:t[19]||(t[19]=$n(o=>e.deactivate(),["esc"])),role:"combobox","aria-expanded":e.isOpen,"aria-owns":"listbox-"+e.id,"aria-activedescendant":e.isOpen&&e.pointer!==null?e.id+"-"+e.pointer:null},[Ne(e.$slots,"caret",{toggle:e.toggle},()=>[v("div",{onMousedown:t[0]||(t[0]=Et(o=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),Ne(e.$slots,"clear",{search:e.search}),v("div",FL,[Ne(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:a.visibleValues,isOpen:e.isOpen},()=>[Dn(v("div",$L,[(k(!0),P(Ve,null,Qe(a.visibleValues,(o,u)=>Ne(e.$slots,"tag",{option:o,search:e.search,remove:e.removeElement},()=>[(k(),P("span",{class:"multiselect__tag",key:u,onMousedown:t[1]||(t[1]=Et(()=>{},["prevent"]))},[v("span",{textContent:se(e.getOptionLabel(o))},null,8,BL),v("i",{tabindex:"1",onKeypress:$n(Et(c=>e.removeElement(o),["prevent"]),["enter"]),onMousedown:Et(c=>e.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,HL)],32))])),256))],512),[[Fr,a.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>n.limit?Ne(e.$slots,"limit",{key:0},()=>[v("strong",{class:"multiselect__strong",textContent:se(n.limitText(e.internalValue.length-n.limit))},null,8,UL)]):ae("v-if",!0)]),he(vs,{name:"multiselect__loading"},{default:Te(()=>[Ne(e.$slots,"loading",{},()=>[Dn(v("div",jL,null,512),[[Fr,n.loading]])])]),_:3}),e.searchable?(k(),P("input",{key:0,ref:"search",name:n.name,id:e.id,type:"text",autocomplete:"off",spellcheck:n.spellcheck,placeholder:e.placeholder,required:a.isRequired,style:bn(a.inputStyle),value:e.search,disabled:n.disabled,tabindex:n.tabindex,"aria-label":n.name+"-searchbox",onInput:t[2]||(t[2]=o=>e.updateSearch(o.target.value)),onFocus:t[3]||(t[3]=Et(o=>e.activate(),["prevent"])),onBlur:t[4]||(t[4]=Et(o=>e.deactivate(),["prevent"])),onKeyup:t[5]||(t[5]=$n(o=>e.deactivate(),["esc"])),onKeydown:[t[6]||(t[6]=$n(Et(o=>e.pointerForward(),["prevent"]),["down"])),t[7]||(t[7]=$n(Et(o=>e.pointerBackward(),["prevent"]),["up"])),t[9]||(t[9]=$n(Et(o=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[8]||(t[8]=$n(Et(o=>e.addPointerElement(o),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,qL)):ae("v-if",!0),a.isSingleLabelVisible?(k(),P("span",{key:1,class:"multiselect__single",onMousedown:t[10]||(t[10]=Et((...o)=>e.toggle&&e.toggle(...o),["prevent"]))},[Ne(e.$slots,"singleLabel",{option:a.singleValue},()=>[ft(se(e.currentOptionLabel),1)])],32)):ae("v-if",!0),a.isPlaceholderVisible?(k(),P("span",{key:2,class:"multiselect__placeholder",onMousedown:t[11]||(t[11]=Et((...o)=>e.toggle&&e.toggle(...o),["prevent"]))},[Ne(e.$slots,"placeholder",{},()=>[ft(se(e.placeholder),1)])],32)):ae("v-if",!0)],512),he(vs,{name:"multiselect",persisted:""},{default:Te(()=>[Dn(v("div",{class:"multiselect__content-wrapper",onFocus:t[12]||(t[12]=(...o)=>e.activate&&e.activate(...o)),tabindex:"-1",onMousedown:t[13]||(t[13]=Et(()=>{},["prevent"])),style:bn({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[v("ul",{class:"multiselect__content",style:bn(a.contentStyle),role:"listbox",id:"listbox-"+e.id,"aria-multiselectable":e.multiple},[Ne(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(k(),P("li",YL,[v("span",zL,[Ne(e.$slots,"maxElements",{},()=>[ft("Maximum of "+se(e.max)+" options selected. First remove a selected option to select another.",1)])])])):ae("v-if",!0),!e.max||e.internalValue.length(k(),P("li",{class:"multiselect__element",key:u,"aria-selected":e.isSelected(o),id:e.id+"-"+u,role:o&&(o.$isLabel||o.$isDisabled)?null:"option"},[o&&(o.$isLabel||o.$isDisabled)?ae("v-if",!0):(k(),P("span",{key:0,class:Be([e.optionHighlight(u,o),"multiselect__option"]),onClick:Et(c=>e.select(o),["stop"]),onMouseenter:Et(c=>e.pointerSet(u),["self"]),"data-select":o&&o.isTag?e.tagPlaceholder:a.selectLabelText,"data-selected":a.selectedLabelText,"data-deselect":a.deselectLabelText},[Ne(e.$slots,"option",{option:o,search:e.search,index:u},()=>[v("span",null,se(e.getOptionLabel(o)),1)])],42,GL)),o&&(o.$isLabel||o.$isDisabled)?(k(),P("span",{key:1,"data-select":e.groupSelect&&a.selectGroupLabelText,"data-deselect":e.groupSelect&&a.deselectGroupLabelText,class:Be([e.groupHighlight(u,o),"multiselect__option"]),onMouseenter:Et(c=>e.groupSelect&&e.pointerSet(u),["self"]),onMousedown:Et(c=>e.selectGroup(o),["prevent"])},[Ne(e.$slots,"option",{option:o,search:e.search,index:u},()=>[v("span",null,se(e.getOptionLabel(o)),1)])],42,JL)):ae("v-if",!0)],8,KL))),128)):ae("v-if",!0),Dn(v("li",null,[v("span",ZL,[Ne(e.$slots,"noResult",{search:e.search},()=>[t[20]||(t[20]=ft("No elements found. Consider changing the search query."))])])],512),[[Fr,n.showNoResults&&e.filteredOptions.length===0&&e.search&&!n.loading]]),Dn(v("li",null,[v("span",XL,[Ne(e.$slots,"noOptions",{},()=>[t[21]||(t[21]=ft("List is empty."))])])],512),[[Fr,n.showNoOptions&&(e.options.length===0||a.hasOptionGroup===!0&&e.filteredOptions.length===0)&&!e.search&&!n.loading]]),Ne(e.$slots,"afterList")],12,WL)],36),[[Fr,e.isOpen]])]),_:3})],42,VL)}Ta.render=QL;const eI={props:{multiple:Boolean,returnObject:Boolean,allowEmpty:{type:Boolean,default:!0},modelValue:[Array,String],deselectLabel:String,options:Array,idName:{type:String,default:"id"},labelField:{type:String,default:"name"},theme:{type:String,default:"new"},largeText:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1}},components:{Multiselect:Ta},emits:["update:modelValue","onChange"],setup(e,{emit:t}){const n=fe(),r=a=>{if(e.multiple){const o=e.returnObject?a:a.map(u=>u[e.idName]);t("update:modelValue",o),t("onChange",o)}else{const o=e.returnObject?a:a[e.idName];t("update:modelValue",o),t("onChange",o)}},s=a=>{var o,u;return e.multiple?n.value?(o=n.value)==null?void 0:o.some(c=>String(c[e.idName])===String(a[e.idName])):!1:String((u=n.value)==null?void 0:u[e.idName])===String(a[e.idName])};return Wt([()=>e.multiple,()=>e.returnObject,()=>e.options,()=>e.modelValue],()=>{var a,o;e.returnObject?n.value=e.modelValue:e.multiple?Array.isArray(e.modelValue)&&(n.value=(a=e.modelValue)==null?void 0:a.map(u=>e.options.find(c=>c[e.idName]===u))):n.value=(o=e.options)==null?void 0:o.find(u=>u[e.idName]===e.modelValue)},{immediate:!0}),{selectedValues:n,isSelectedOption:s,onUpdateModalValue:r}}},tI={class:"flex justify-between items-center cursor-pointer"},nI={class:"whitespace-normal leading-6"},rI=["for"],sI={key:0,class:"h-4 w-4 text-[#05603A]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},iI={class:"flex gap-2.5 items-center rounded-full bg-dark-blue text-white px-4 py-2"},aI={class:"font-semibold leading-4"},lI=["onClick"],oI={class:"flex gap-4 items-center cursor-pointer"},uI={class:"whitespace-normal leading-6"},cI={key:0,class:"h-5 w-5 text-slate-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},dI=["onMousedown"];function fI(e,t,n,r,s,a){const o=at("multiselect");return k(),it(o,{class:Be(["multi-select",[n.multiple&&"multiple",n.theme==="new"&&"new-theme large-text",n.largeText&&"large-text"]]),modelValue:r.selectedValues,"onUpdate:modelValue":[t[0]||(t[0]=u=>r.selectedValues=u),r.onUpdateModalValue],"track-by":n.idName,label:n.labelField,multiple:n.multiple,"preselect-first":!1,"close-on-select":!n.multiple,"clear-on-select":!n.multiple,"preserve-search":!0,searchable:n.searchable,"allow-empty":n.allowEmpty,"deselect-label":n.deselectLabel,options:n.options},Hn({tag:Te(({option:u,remove:c})=>[v("span",iI,[v("span",aI,se(u.name),1),v("span",{onClick:h=>c(u)},t[2]||(t[2]=[v("img",{src:"/images/close-white.svg"},null,-1)]),8,lI)])]),caret:Te(({toggle:u})=>[v("div",{class:"cursor-pointer absolute top-1/2 right-4 -translate-y-1/2",onMousedown:Et(u,["prevent"])},t[4]||(t[4]=[v("img",{src:"/images/select-arrow.svg"},null,-1)]),40,dI)]),noResult:Te(()=>[t[5]||(t[5]=v("div",{class:"text-gray-400 text-center"},"No elements found",-1))]),_:2},[n.multiple&&n.theme==="new"?{name:"option",fn:Te(({option:u})=>[v("div",tI,[v("span",nI,se(u[n.labelField]),1),v("div",{class:Be(["flex-shrink-0 h-6 w-6 border-2 bg-white flex items-center justify-center cursor-pointer rounded",[r.isSelectedOption(u)?"border-[#05603A]":"border-dark-blue-200"]]),for:e.id},[r.isSelectedOption(u)?(k(),P("svg",sI,t[1]||(t[1]=[v("path",{d:"M5 13l4 4L19 7"},null,-1)]))):ae("",!0)],10,rI)])]),key:"0"}:void 0,n.multiple?void 0:{name:"option",fn:Te(({option:u})=>[v("div",oI,[v("span",uI,se(u[n.labelField]),1),v("div",null,[r.isSelectedOption(u)?(k(),P("svg",cI,t[3]||(t[3]=[v("path",{d:"M5 13l4 4L19 7"},null,-1)]))):ae("",!0)])])]),key:"1"}]),1032,["class","modelValue","track-by","label","multiple","close-on-select","clear-on-select","searchable","allow-empty","deselect-label","options","onUpdate:modelValue"])}const Fo=vt(eI,[["render",fI]]),hI={props:{modelValue:[String,Number],name:String,min:Number,max:Number,type:{type:String,default:"text"}},emits:["update:modelValue","onChange","onBlur"],setup(e,{emit:t}){const n=fe(e.modelValue);return Wt(()=>e.modelValue,()=>{n.value=e.modelValue}),{localValue:n,onChange:a=>{let o=a.target.value;e.type==="number"&&(o=o&&Number(o),e.min!==void 0&&e.min!==null&&(o=Math.max(o,e.min)),e.max!==void 0&&e.max!==null&&(o=Math.min(o,e.max))),Un(()=>{t("update:modelValue",o),t("onChange",o)})},onBlur:()=>{t("onBlur")}}}},pI=["id","type","min","max","name"];function mI(e,t,n,r,s,a){return Dn((k(),P("input",{class:"w-full border-2 border-solid border-dark-blue-200 rounded-full h-12 px-6 text-xl text-slate-600",id:`id_${n.name}`,type:n.type,min:n.min,max:n.max,name:n.name,"onUpdate:modelValue":t[0]||(t[0]=o=>r.localValue=o),onInput:t[1]||(t[1]=(...o)=>r.onChange&&r.onChange(...o)),onBlur:t[2]||(t[2]=(...o)=>r.onBlur&&r.onBlur(...o))},null,40,pI)),[[Sp,r.localValue]])}const ud=vt(hI,[["render",mI]]),gI={props:{modelValue:String,name:String,label:String,value:String},emits:["update:modelValue"],setup(e,{emit:t}){return{onChange:r=>{t("update:modelValue",r.target.value)}}}},vI={class:"flex items-center gap-2 cursor-pointer"},yI=["id","name","value","checked"],_I=["for"],bI={class:"cursor-pointer text-xl text-slate-500"};function wI(e,t,n,r,s,a){return k(),P("label",vI,[v("input",{class:"peer hidden",type:"radio",id:`${n.name}-${n.value}`,name:n.name,value:n.value,checked:n.modelValue===n.value,onChange:t[0]||(t[0]=(...o)=>r.onChange&&r.onChange(...o))},null,40,yI),v("div",{class:"h-8 w-8 rounded-full border-2 bg-white border-dark-blue-200 flex items-center justify-center cursor-pointer peer-checked:before:content-[''] peer-checked:before:block peer-checked:before:w-3 peer-checked:before:h-3 peer-checked:before:rounded-full peer-checked:before:bg-slate-600",for:`${n.name}-${n.value}`},null,8,_I),v("span",bI,se(n.label),1)])}const Wp=vt(gI,[["render",wI]]),xI={props:{modelValue:String,name:String,placeholder:String,height:{type:Number,default:400}},emits:["update:modelValue","onChange"],setup(e,{emit:t}){const n=a=>{t("update:modelValue",a),t("onChange",a)},r=()=>{const a="/js/tinymce/tinymce.min.js";return new Promise((o,u)=>{if(document.querySelector(`script[src="${a}"]`))return o();const c=document.createElement("script");c.src=a,c.onload=()=>o(),c.onerror=()=>u(new Error(`Failed to load script ${a}`)),document.head.appendChild(c)})},s=async()=>{try{await r()}catch(a){console.log("Can't load tinymce scrip:",a)}tinymce.init({selector:`#id_${e.name}`,height:e.height,width:"100%",setup:a=>{a.on("init",()=>{a.setContent(e.modelValue||"")}),a.on("change input",()=>{const o=a.getContent();a.save(),n(o)})}})};return Ft(()=>{s()}),{}}},kI={class:"custom-tinymce"},SI=["id","name","placeholder"];function TI(e,t,n,r,s,a){return k(),P("div",kI,[v("textarea",{class:"hidden",cols:"40",id:`id_${n.name}`,name:n.name,placeholder:n.placeholder,rows:"10"},null,8,SI)])}const CI=vt(xI,[["render",TI]]),AI={props:{errors:Object,formValues:Object,themes:Array,location:Object,countries:Array},components:{FieldWrapper:od,SelectField:Fo,InputField:ud,RadioField:Wp,TinymceField:CI},setup(e){const{activityFormatOptions:t,activityTypeOptions:n,durationOptions:r,recurringTypeOptions:s}=Hi(),a=pe(()=>!["open-online","invite-online"].includes(e.formValues.activity_type)&&e.formValues.locationDirty===!0&&e.formValues.locationSelected===!1);return{activityFormatOptions:t,activityTypeOptions:n,durationOptions:r,recurringTypeOptions:s,showSelectHint:a,handleLocationTyping:h=>{e.formValues.location="",e.formValues.locationDirty=!0,e.formValues.locationSelected=!1},handleLocationClear:()=>{e.formValues.location="",e.formValues.locationDirty=!0,e.formValues.locationSelected=!1},handleLocationChange:({location:h,geoposition:f,country_iso:p})=>{e.formValues.location=h||"",e.formValues.geoposition=f,e.formValues.country_iso=p,e.formValues.locationSelected=!0,e.formValues.locationDirty=!0}}}},EI={class:"flex flex-col gap-4 w-full"},OI={class:"flex gap-4 p-4 mt-2.5 w-full rounded-2xl border bg-dark-blue-50 border-dark-blue-100"},MI={class:"text-xl text-slate-500"},RI={key:0,class:"text-sm text-slate-500 mt-2"},DI={class:"w-full md:w-1/2"},PI={class:"w-full flex px-3 justify-between items-center text-gray-700 whitespace-nowrap rounded-3xl border-2 border-dark-blue-200 h-[50px] bg-white"},LI={class:"flex items-center gap-8 min-h-[48px]"},II={key:0,class:"p-4 mt-4 w-full rounded-2xl border bg-dark-blue-50 border-dark-blue-100"},NI={class:"block mb-2 text-xl font-semibold text-slate-500"},VI={class:"flex flex-wrap gap-8 items-center"},FI={class:"block mt-6 mb-2 text-xl font-semibold text-slate-500"};function $I(e,t,n,r,s,a){const o=at("InputField"),u=at("FieldWrapper"),c=at("SelectField"),h=at("autocomplete-geo"),f=at("date-time"),p=at("RadioField"),m=at("TinymceField");return k(),P("div",EI,[he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.title.label")}*`,name:"title",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.title,"onUpdate:modelValue":t[0]||(t[0]=y=>n.formValues.title=y),required:"",name:"title",placeholder:e.$t("event.title.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.specify-the-format-of-the-activity"),name:"activity_format",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.activity_format,"onUpdate:modelValue":t[1]||(t[1]=y=>n.formValues.activity_format=y),multiple:"",name:"activity_format",options:r.activityFormatOptions,placeholder:e.$t("event.select-option")},null,8,["modelValue","options","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.activitytype.label")}*`,name:"activity_type",errors:n.errors},{end:Te(()=>[v("div",OI,[t[14]||(t[14]=v("img",{class:"flex-shrink-0 mt-1 w-6 h-6",src:"/images/icon_info.svg"},null,-1)),v("span",MI,se(e.$t("event.if-no-clear-information-provide-estimate")),1)])]),default:Te(()=>[he(c,{modelValue:n.formValues.activity_type,"onUpdate:modelValue":t[2]||(t[2]=y=>n.formValues.activity_type=y),required:"",name:"activity_type",options:r.activityTypeOptions},null,8,["modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.address.label")} ${["open-online","invite-online"].includes(n.formValues.activity_type)?"(optional)":"*"}`,name:"location",errors:n.errors},{end:Te(()=>[r.showSelectHint?(k(),P("div",RI,se(e.$t("event.please-select-address-from-dropdown")),1)):ae("",!0)]),default:Te(()=>[he(h,{class:"custom-geo-input",name:"location",placeholder:e.$t("event.address.placeholder"),location:n.formValues.location,value:n.formValues.location,geoposition:n.formValues.geoposition,onOnChange:r.handleLocationChange,onInput:r.handleLocationTyping,onClear:r.handleLocationClear},null,8,["placeholder","location","value","geoposition","onOnChange","onInput","onClear"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.activity-duration"),name:"duration",errors:n.errors},{default:Te(()=>[v("div",DI,[he(c,{modelValue:n.formValues.duration,"onUpdate:modelValue":t[3]||(t[3]=y=>n.formValues.duration=y),required:"",name:"duration",options:r.durationOptions,placeholder:e.$t("event.select-option")},null,8,["modelValue","options","placeholder"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.date"),names:["start_date","end_date"],errors:n.errors},{default:Te(()=>[v("div",PI,[he(f,{name:"start_date",placeholder:e.$t("event.start.label"),flow:["calendar","time"],value:n.formValues.start_date,onOnChange:t[4]||(t[4]=y=>n.formValues.start_date=y)},null,8,["placeholder","value"]),t[15]||(t[15]=v("span",null,"-",-1)),he(f,{name:"end_date",placeholder:e.$t("event.end.label"),flow:["calendar","time"],value:n.formValues.end_date,onOnChange:t[5]||(t[5]=y=>n.formValues.end_date=y)},null,8,["placeholder","value"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.is-it-a-recurring-event"),name:"is_recurring_event_local",errors:n.errors},{default:Te(()=>[v("div",LI,[he(p,{modelValue:n.formValues.is_recurring_event_local,"onUpdate:modelValue":t[6]||(t[6]=y=>n.formValues.is_recurring_event_local=y),name:"is_recurring_event_local",value:"true",label:e.$t("event.true")},null,8,["modelValue","label"]),he(p,{modelValue:n.formValues.is_recurring_event_local,"onUpdate:modelValue":t[7]||(t[7]=y=>n.formValues.is_recurring_event_local=y),name:"is_recurring_event_local",value:"false",label:e.$t("event.false")},null,8,["modelValue","label"])]),n.formValues.is_recurring_event_local==="true"?(k(),P("div",II,[v("label",NI,se(e.$t("event.how-frequently")),1),v("div",VI,[he(p,{modelValue:n.formValues.recurring_event,"onUpdate:modelValue":t[8]||(t[8]=y=>n.formValues.recurring_event=y),name:"recurring_event",value:"daily",label:e.$t("event.daily")},null,8,["modelValue","label"]),he(p,{modelValue:n.formValues.recurring_event,"onUpdate:modelValue":t[9]||(t[9]=y=>n.formValues.recurring_event=y),name:"recurring_event",value:"weekly",label:e.$t("event.weekly")},null,8,["modelValue","label"]),he(p,{modelValue:n.formValues.recurring_event,"onUpdate:modelValue":t[10]||(t[10]=y=>n.formValues.recurring_event=y),name:"recurring_event",value:"monthly",label:e.$t("event.monthly")},null,8,["modelValue","label"])]),v("label",FI,se(e.$t("event.what-type-of-recurring-activity")),1),he(c,{modelValue:n.formValues.recurring_type,"onUpdate:modelValue":t[11]||(t[11]=y=>n.formValues.recurring_type=y),name:"recurring_type",options:r.recurringTypeOptions},null,8,["modelValue","options"])])):ae("",!0)]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.theme-title"),name:"theme",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.theme,"onUpdate:modelValue":t[12]||(t[12]=y=>n.formValues.theme=y),multiple:"",required:"",name:"theme",placeholder:e.$t("event.select-theme"),options:n.themes},null,8,["modelValue","placeholder","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.activity-description"),name:"description",errors:n.errors},{default:Te(()=>[he(m,{modelValue:n.formValues.description,"onUpdate:modelValue":t[13]||(t[13]=y=>n.formValues.description=y),name:"description"},null,8,["modelValue"])]),_:1},8,["label","errors"])])}const BI=vt(AI,[["render",$I]]);function HI(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(s){s(n)}),(r=e.get("*"))&&r.slice().map(function(s){s(t,n)})}}}const ei=HI(),UI={props:{message:{type:Object,default:null}},setup(e){const t=fe(""),n=fe(!1),r=fe(""),s=u=>{u&&(t.value=u.message,r.value=u.level.charAt(0).toUpperCase()+u.level.slice(1),n.value=!0,a())},a=()=>{setTimeout(()=>{n.value=!1},3e3)},o=pe(()=>({success:r.value.toLowerCase()==="success",error:r.value.toLowerCase()==="error"}));return Ft(()=>{e.message&&s(e.message),ei.on("flash",s)}),ii(()=>{ei.off("flash",s)}),{body:t,show:n,level:r,flashClass:o}}},jI={key:0,class:"codeweek-flash-message",role:"alert"},qI={class:"level"},WI={class:"body"};function YI(e,t,n,r,s,a){return r.show?(k(),P("div",jI,[v("div",{class:Be(["content",r.flashClass])},[v("div",qI,se(r.level)+"!",1),v("div",WI,se(r.body),1)],2)])):ae("",!0)}const cd=vt(UI,[["render",YI],["__scopeId","data-v-09461b5c"]]),zI={components:{Flash:cd},props:{name:{type:String,default:"picture"},picture:{type:String,default:""}},emits:["onChange"],setup(e,{emit:t}){const n=fe(null),r=fe(e.picture||""),s=fe(""),a=()=>{var p;return(p=n.value)==null?void 0:p.click()},o=()=>{},u=()=>{},c=p=>{const[m]=p.dataTransfer.files;m&&f(m)},h=p=>{const[m]=p.target.files;m&&f(m)};function f(p){const m=new FormData;m.append("picture",p),Tt.post("/api/events/picture",m).then(y=>{s.value="",r.value=y.data.path,ei.emit("flash",{message:"Picture uploaded!",level:"success"}),t("onChange",y.data)}).catch(y=>{var b,A,H,V;const _=((V=(H=(A=(b=y.response)==null?void 0:b.data)==null?void 0:A.errors)==null?void 0:H.picture)==null?void 0:V[0])||"Image is too large. Maximum is 1Mb";s.value=_,ei.emit("flash",{message:_,level:"error"})})}return{fileInput:n,pictureClone:r,error:s,onTriggerFileInput:a,onDragOver:o,onDragLeave:u,onDrop:c,onFileChange:h}}},KI=["src"],GI={class:"text-xl text-slate-500"},JI={class:"text-xs text-slate-500"},ZI={key:0,class:"flex gap-3 mt-2.5 font-semibold item-start text-error-200"},XI={class:"leading-5"},QI={class:"flex gap-2.5 mt-4 w-full"},eN={class:"mt-1 text-xs text-slate-500"},tN={class:"pl-4 my-4 list-disc"},nN={class:"text-xs text-slate-500"};function rN(e,t,n,r,s,a){const o=at("Flash");return k(),P("div",null,[v("div",{class:"flex flex-col justify-center items-center gap-2 border-[3px] border-dashed border-dark-blue-200 w-full rounded-2xl py-12 px-8 cursor-pointer",onClick:t[1]||(t[1]=(...u)=>r.onTriggerFileInput&&r.onTriggerFileInput(...u)),onDragover:t[2]||(t[2]=Et((...u)=>r.onDragOver&&r.onDragOver(...u),["prevent"])),onDragleave:t[3]||(t[3]=(...u)=>r.onDragLeave&&r.onDragLeave(...u)),onDrop:t[4]||(t[4]=Et((...u)=>r.onDrop&&r.onDrop(...u),["prevent"]))},[v("div",{class:Be(["mb-4",[!r.pictureClone&&"hidden"]])},[v("img",{src:r.pictureClone,class:"mr-1"},null,8,KI)],2),v("div",{class:Be([!!r.pictureClone&&"hidden"])},t[5]||(t[5]=[v("img",{class:"w-16 h-16",src:"/images/icon_image.svg"},null,-1)]),2),v("span",GI,se(e.$t("event.drop-your-image-here-or-upload")),1),v("span",JI,se(e.$t("event.max-size-1mb-image-formats-jpg-png")),1),v("input",{class:"hidden",type:"file",ref:"fileInput",onChange:t[0]||(t[0]=(...u)=>r.onFileChange&&r.onFileChange(...u))},null,544)],32),r.error?(k(),P("div",ZI,[t[6]||(t[6]=v("img",{src:"/images/icon_error.svg"},null,-1)),v("div",XI,se(r.error),1)])):ae("",!0),v("div",QI,[t[7]||(t[7]=v("img",{class:"flex-shrink-0 w-6 h-6",src:"/images/icon_info.svg"},null,-1)),v("div",eN,[ft(se(e.$t("event.by-submitting-images-through-this-form-you-confirm-that"))+" ",1),v("ul",tN,[v("li",null,se(e.$t("event.you-have-obtained-all-necessary-permissions")),1),v("li",null,se(e.$t("event.you-will-not-submit-any-images-with-faces-directly-visible-or-identifiable"))+" "+se(e.$t("event.if-this-is-the-case-ensure-faces-are-blurred"))+" "+se(e.$t("event.submissions-that-do-not-comply-will-not-be-accepted")),1),v("li",null,se(e.$t("event.you-understand-and-agree-images-will-be-shared")),1)])])]),v("div",nN,se(e.$t("event.info-max-size-1mb")),1),he(o)])}const B1=vt(zI,[["render",rN]]),sN={props:{errors:Object,formValues:Object,audiences:Array,leadingTeachers:Array},components:{FieldWrapper:od,SelectField:Fo,InputField:ud,RadioField:Wp,ImageField:B1},setup(e){const{ageOptions:t}=Hi();return{leadingTeacherOptions:pe(()=>e.leadingTeachers.map(a=>({id:a,name:a}))),ageOptions:t,onPictureChange:a=>{e.formValues.picture=a.imageName,e.formValues.pictureUrl=a.path},handleCorrectCount:a=>{const o=Number(e.formValues.participants_count||"0");Number(e.formValues[a]||"0")>o&&(e.formValues[a]=o)}}}},iN={class:"flex flex-col gap-4 w-full"},aN={class:"flex flex-col gap-4 p-4 mt-2.5 w-full rounded-2xl border bg-dark-blue-50 border-dark-blue-100"},lN={class:"flex gap-2 p-2 mb-2 w-full bg-gray-100 rounded"},oN={class:"text-xl text-slate-500"},uN={class:"block mb-2 text-xl font-semibold text-slate-500"},cN={class:"grid grid-cols-1 gap-x-4 gap-y-4 md:grid-cols-2 md:gap-x-8"},dN={class:"flex items-center gap-8 min-h-[48px] h-full"},fN={class:"flex items-center gap-8 min-h-[48px] h-full"},hN={href:"/codeweek4all",target:"_blank"};function pN(e,t,n,r,s,a){const o=at("SelectField"),u=at("FieldWrapper"),c=at("InputField"),h=at("RadioField"),f=at("ImageField");return k(),P("div",iN,[he(u,{horizontalBreakpoint:"md",label:e.$t("event.audiences"),name:"audience",errors:n.errors},{default:Te(()=>[he(o,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.audience,"onUpdate:modelValue":t[0]||(t[0]=p=>n.formValues.audience=p),multiple:"",name:"audience",options:n.audiences},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.number-of-participants"),name:"participants_count",errors:n.errors},{end:Te(()=>[v("div",aN,[v("div",lN,[t[15]||(t[15]=v("img",{class:"flex-shrink-0 mt-1 w-6 h-6",src:"/images/icon_info.svg"},null,-1)),v("span",oN,se(e.$t("event.if-no-clear-information-provide-estimate")),1)]),v("label",uN,se(e.$t("event.of-this-number-how-many-are")),1),v("div",cN,[he(u,{label:e.$t("event.males"),name:"males_count",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.males_count,"onUpdate:modelValue":t[2]||(t[2]=p=>n.formValues.males_count=p),type:"number",min:0,name:"males_count",placeholder:e.$t("event.enter-number"),onOnBlur:t[3]||(t[3]=p=>r.handleCorrectCount("event.males_count"))},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{label:e.$t("event.females"),name:"females_count",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.females_count,"onUpdate:modelValue":t[4]||(t[4]=p=>n.formValues.females_count=p),type:"number",min:0,name:"females_count",placeholder:e.$t("event.enter-number"),onOnBlur:t[5]||(t[5]=p=>r.handleCorrectCount("event.females_count"))},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{label:e.$t("event.other-gender"),name:"other_count",errors:n.errors},{default:Te(()=>[he(c,{modelValue:n.formValues.other_count,"onUpdate:modelValue":t[6]||(t[6]=p=>n.formValues.other_count=p),type:"number",min:0,name:"other_count",placeholder:e.$t("event.enter-number"),onOnBlur:t[7]||(t[7]=p=>r.handleCorrectCount("event.other_count"))},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"])])])]),default:Te(()=>[he(c,{modelValue:n.formValues.participants_count,"onUpdate:modelValue":t[1]||(t[1]=p=>n.formValues.participants_count=p),type:"number",min:0,required:"",name:"participants_count",placeholder:e.$t("event.enter-number")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.age"),name:"ages",errors:n.errors},{default:Te(()=>[he(o,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.ages,"onUpdate:modelValue":t[8]||(t[8]=p=>n.formValues.ages=p),multiple:"",name:"ages",options:r.ageOptions},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("is-this-an-extracurricular-activity"),name:"is_extracurricular_event",errors:n.errors},{default:Te(()=>[v("div",dN,[he(h,{modelValue:n.formValues.is_extracurricular_event,"onUpdate:modelValue":t[9]||(t[9]=p=>n.formValues.is_extracurricular_event=p),name:"is_extracurricular_event",value:"true",label:e.$t("event.yes")},null,8,["modelValue","label"]),he(h,{modelValue:n.formValues.is_extracurricular_event,"onUpdate:modelValue":t[10]||(t[10]=p=>n.formValues.is_extracurricular_event=p),name:"is_extracurricular_event",value:"false",label:e.$t("event.no")},null,8,["modelValue","label"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.is-this-an-activity-within-the-standard-school-curriculum"),name:"is_standard_school_curriculum",errors:n.errors},{default:Te(()=>[v("div",fN,[he(h,{modelValue:n.formValues.is_standard_school_curriculum,"onUpdate:modelValue":t[11]||(t[11]=p=>n.formValues.is_standard_school_curriculum=p),name:"is_standard_school_curriculum",value:"true",label:e.$t("event.yes")},null,8,["modelValue","label"]),he(h,{modelValue:n.formValues.is_standard_school_curriculum,"onUpdate:modelValue":t[12]||(t[12]=p=>n.formValues.is_standard_school_curriculum=p),name:"is_standard_school_curriculum",value:"false",label:e.$t("event.no")},null,8,["modelValue","label"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.code-week-4-all-code-optional"),name:"codeweek_for_all_participation_code",errors:n.errors},{tooltip:Te(()=>[ft(se(e.$t("event.codeweek_for_all_participation_code.explanation"))+" ",1),v("a",hN,se(e.$t("event.codeweek_for_all_participation_code.link")),1),t[16]||(t[16]=ft(". "))]),default:Te(()=>[he(c,{modelValue:n.formValues.codeweek_for_all_participation_code,"onUpdate:modelValue":t[13]||(t[13]=p=>n.formValues.codeweek_for_all_participation_code=p),name:"codeweek_for_all_participation_code"},null,8,["modelValue"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.leading-teachers-optional"),name:"leading_teacher_tag",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.leading_teacher_tag,"onUpdate:modelValue":t[14]||(t[14]=p=>n.formValues.leading_teacher_tag=p),name:"leading_teacher_tag",options:r.leadingTeacherOptions},null,8,["modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.image-optional"),name:"picture",errors:n.errors},{default:Te(()=>[he(f,{name:"picture",picture:n.formValues.pictureUrl,image:n.formValues.picture,onOnChange:r.onPictureChange},null,8,["picture","image","onOnChange"])]),_:1},8,["label","errors"])])}const mN=vt(sN,[["render",pN]]),gN={props:{errors:Object,formValues:Object,languages:Object,countries:Array},components:{FieldWrapper:od,SelectField:Fo,InputField:ud,RadioField:Wp,ImageField:B1},setup(e,{emit:t}){const{organizerTypeOptions:n}=Hi(),r=pe(()=>Object.entries(e.languages).map(([s,a])=>({id:s,name:a})));return{organizerTypeOptions:n,languageOptions:r}}},vN={class:"flex flex-col gap-4 w-full"},yN={class:"flex items-center gap-8 min-h-[48px] h-full"},_N={class:"flex gap-2.5 mt-4 w-full"},bN={class:"mt-1 text-xs text-slate-400"};function wN(e,t,n,r,s,a){const o=at("InputField"),u=at("FieldWrapper"),c=at("SelectField"),h=at("RadioField");return k(),P("div",vN,[he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.organizer.label")}*`,name:"organizer",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.organizer,"onUpdate:modelValue":t[0]||(t[0]=f=>n.formValues.organizer=f),required:"",name:"organizer",placeholder:e.$t("event.organizer.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.organizertype.label")}*`,name:"organizer_type",errors:n.errors},{default:Te(()=>[he(c,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.organizer_type,"onUpdate:modelValue":t[1]||(t[1]=f=>n.formValues.organizer_type=f),required:"",name:"organizer_type",options:r.organizerTypeOptions},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("resources.Languages")} (optional)`,name:"language",errors:n.errors},{default:Te(()=>[he(c,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.language,"onUpdate:modelValue":t[2]||(t[2]=f=>n.formValues.language=f),name:"language",searchable:"",multiple:"",options:r.languageOptions},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.country")}*`,name:"country_iso",errors:n.errors},{default:Te(()=>[he(c,{placeholder:e.$t("event.select-option"),modelValue:n.formValues.country_iso,"onUpdate:modelValue":t[3]||(t[3]=f=>n.formValues.country_iso=f),"id-name":"iso",searchable:"",required:"",name:"country_iso",options:n.countries},null,8,["placeholder","modelValue","options"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:e.$t("event.are-you-using-any-code-week-resources-in-this-activity"),name:"is_use_resource",errors:n.errors},{default:Te(()=>[v("div",yN,[he(h,{modelValue:n.formValues.is_use_resource,"onUpdate:modelValue":t[4]||(t[4]=f=>n.formValues.is_use_resource=f),name:"is_use_resource",value:"true",label:e.$t("event.yes")},null,8,["modelValue","label"]),he(h,{modelValue:n.formValues.is_use_resource,"onUpdate:modelValue":t[5]||(t[5]=f=>n.formValues.is_use_resource=f),name:"is_use_resource",value:"false",label:e.$t("event.no")},null,8,["modelValue","label"])])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.website.label")} ${["open-online","invite-online"].includes(n.formValues.activity_type)?"*":"(optional)"}`,name:"event_url",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.event_url,"onUpdate:modelValue":t[6]||(t[6]=f=>n.formValues.event_url=f),name:"event_url",placeholder:e.$t("event.website.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.public.label")} (optional)`,name:"contact_person",errors:n.errors},{default:Te(()=>[he(o,{modelValue:n.formValues.contact_person,"onUpdate:modelValue":t[7]||(t[7]=f=>n.formValues.contact_person=f),type:"email",name:"contact_person",placeholder:e.$t("event.public.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"]),he(u,{horizontalBreakpoint:"md",label:`${e.$t("event.contact.label")}*`,name:"user_email",errors:n.errors},{end:Te(()=>[v("div",_N,[t[9]||(t[9]=v("img",{class:"flex-shrink-0 w-6 h-6",src:"/images/icon_info.svg"},null,-1)),v("div",bN,se(e.$t("event.contact.explanation")),1)])]),default:Te(()=>[he(o,{modelValue:n.formValues.user_email,"onUpdate:modelValue":t[8]||(t[8]=f=>n.formValues.user_email=f),required:"",type:"email",name:"user_email",placeholder:e.$t("event.contact.placeholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label","errors"])])}const xN=vt(gN,[["render",wN]]),kN={props:{formValues:Object,themes:Array,audiences:Array,leadingTeachers:Array,languages:Object,countries:Array},setup(e){const{activityFormatOptionsMap:t,activityTypeOptionsMap:n,recurringFrequentlyMap:r,durationOptionsMap:s,recurringTypeOptionsMap:a,ageOptionsMap:o,organizerTypeOptionsMap:u}=Hi();return{stepDataList:pe(()=>{var Me,He,je;const{title:h,activity_format:f,activity_type:p,location:m,duration:y,start_date:_,end_date:b,is_recurring_event_local:A,recurring_event:H,recurring_type:V,theme:x,description:E,audience:B,participants_count:U,males_count:$,females_count:M,other_count:S,ages:F,is_extracurricular_event:ie,is_standard_school_curriculum:ee,codeweek_for_all_participation_code:de,leading_teacher_tag:te,pictureUrl:N,picture:J,organizer:D,organizer_type:Y,language:me,country_iso:Ae,is_use_resource:Pe,event_url:q,contact_person:re,user_email:O}=e.formValues||{},ne=(f||[]).map(Ue=>t.value[Ue]),_e=n.value[p],j=s.value[y],Ie=_?new Date(_).toISOString().slice(0,10):"",Xe=b?new Date(b).toISOString().slice(0,10):"",we=A==="true",et=a.value[V],z=(x||[]).map(Ue=>e.themes.find(({id:Ge})=>Ge===Ue)).filter(Ue=>Ue).map(Ue=>Ue.name),T=[{label:Le("event.title.label"),value:h},{label:Le("event.specify-the-format-of-the-activity"),value:ne.join(", ")},{label:Le("event.activitytype.label"),value:_e},{label:Le("event.address.label"),value:m},{label:Le("event.activity-duration"),value:j},{label:Le("event.date"),value:`${Ie} - ${Xe}`},{label:Le("event.is-it-a-recurring-event"),value:Le(we?"event.yes":"event.no")},{label:Le("event.how-frequently"),value:we?r.value[H]:""},{label:Le("event.what-type-of-recurring-activity"),value:et},{label:Le("event.theme-title"),value:z.join(", ")},{label:Le("event.activity-description"),htmlValue:E}],I=(B||[]).map(Ue=>e.audiences.find(({id:Ge})=>Ge===Ue)).filter(Ue=>Ue).map(Ue=>Ue.name),G=[U||0,[`${$||0} ${Le("event.males")}`,`${M||0} ${Le("event.females")}`,`${S||0} ${Le("event.other-gender")}`].join(", ")].join(" - "),Q=(F||[]).map(Ue=>o.value[Ue]),ge=[{label:Le("event.audience_title"),value:I==null?void 0:I.join(", ")},{label:Le("event.number-of-participants"),value:G},{label:Le("event.age"),value:Q==null?void 0:Q.join(", ")},{label:Le("event.is-this-an-extracurricular-activity"),value:Le(ie==="true"?"event.yes":"event.no")},{label:Le("event.is-this-an-activity-within-the-standard-school-curriculum"),value:Le(ee==="true"?"event.yes":"event.no")},{label:Le("event.code-week-4-all-code-optional"),value:de},{label:Le("community.titles.2"),value:te},{label:Le("event.image"),imageUrl:N,imageName:(He=(Me=J==null?void 0:J.split("/"))==null?void 0:Me.reverse())==null?void 0:He[0]}],W=u.value[Y],ce=me==null?void 0:me.map(Ue=>{var Ge;return(Ge=e.languages)==null?void 0:Ge[Ue]}).filter(Boolean),ye=(je=e.countries.find(({iso:Ue})=>Ue===Ae))==null?void 0:je.name,ke=[{label:Le("event.organizer.label"),value:D},{label:Le("event.organizertype.label"),value:W},{label:Le("resources.Languages"),value:ce==null?void 0:ce.join(", ")},{label:Le("event.country"),value:ye},{label:Le("event.are-you-using-any-code-week-resources-in-this-activity"),value:Le(Pe==="true"?"event.yes":"event.no")},{label:Le("event.website.label"),value:q},{label:Le("event.public.label"),value:re},{label:Le("event.contact.label"),value:O}],Ce=({value:Ue,htmlValue:Ge,imageUrl:pt})=>!Bn.isNil(Ue)&&!Bn.isEmpty(Ue)||!Bn.isEmpty(Ge)||!Bn.isEmpty(pt);return[{title:Le("event.confirmation_step.activity_overview"),list:T.filter(Ce)},{title:Le("event.confirmation_step.who_is_the_activity_for"),list:ge.filter(Ce)},{title:Le("event.confirmation_step.organiser"),list:ke.filter(Ce)}]}),trans:Le}}},SN={class:"flex flex-col gap-12 w-full"},TN={class:"flex flex-col gap-6"},CN={class:"text-dark-blue text-2xl md:text-[30px] leading-[44px] font-medium font-['Montserrat'] text-center"},AN={class:"flex flex-col gap-1"},EN={class:"flex gap-10 items-center px-4 py-2 text-[16px] md:text-xl text-slate-500 bg-white"},ON={class:"flex-shrink-0 w-32 md:w-60"},MN=["innerHTML"],RN={key:1},DN={class:"mb-2"},PN=["src"],LN={key:2,class:"flex-grow w-full"};function IN(e,t,n,r,s,a){return k(),P("div",SN,[(k(!0),P(Ve,null,Qe(r.stepDataList,({title:o,list:u})=>(k(),P("div",TN,[v("h2",CN,se(o),1),v("div",AN,[(k(!0),P(Ve,null,Qe(u,({label:c,value:h,htmlValue:f,imageUrl:p,imageName:m})=>(k(),P("div",EN,[v("div",ON,se(c),1),f?(k(),P("div",{key:0,innerHTML:f,class:"flex-grow w-full space-y-2 [&_p]:py-0"},null,8,MN)):ae("",!0),p?(k(),P("div",RN,[v("div",DN,se(r.trans("event.image-attached")),1),v("img",{class:"mb-2 max-h-80",src:p},null,8,PN),v("div",null,se(m),1)])):ae("",!0),h?(k(),P("div",LN,se(h||""),1)):ae("",!0)]))),256))])]))),256))])}const NN=vt(kN,[["render",IN]]),VN={props:{modelValue:String,name:String,label:String,value:String},emits:["update:modelValue"],setup(e,{emit:t}){return{onChange:r=>{t("update:modelValue",r.target.checked)}}}},FN={class:"flex items-center gap-2 cursor-pointer"},$N=["id","name","checked"],BN=["for"],HN={key:0,class:"h-5 w-5 text-slate-600",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},UN={class:"cursor-pointer text-xl text-slate-500"};function jN(e,t,n,r,s,a){return k(),P("label",FN,[v("input",{class:"peer hidden",type:"checkbox",id:n.name,name:n.name,checked:n.modelValue,onChange:t[0]||(t[0]=(...o)=>r.onChange&&r.onChange(...o))},null,40,$N),v("div",{class:"flex-shrink-0 h-8 w-8 border-2 bg-white flex items-center justify-center cursor-pointer border-dark-blue-200 rounded-lg",for:e.id},[n.modelValue?(k(),P("svg",HN,t[1]||(t[1]=[v("path",{d:"M5 13l4 4L19 7"},null,-1)]))):ae("",!0)],8,BN),v("span",UN,[ft(se(n.label)+" ",1),Ne(e.$slots,"default")])])}const qN=vt(VN,[["render",jN]]),WN={props:{token:{type:String,default:""},event:{type:Object,default:()=>({})},selectedValues:{type:Object,default:()=>({})},locale:{type:String,default:""},user:{type:Object,default:()=>({})},themes:{type:Array,default:()=>[]},audiences:{type:Array,default:()=>[]},leadingTeachers:{type:Array,default:()=>[]},languages:{type:Object,default:()=>({})},countries:{type:Array,default:()=>[]},location:{type:Object,default:()=>({})},privacyLink:{type:String,default:""}},components:{FormStep1:BI,FormStep2:mN,FormStep3:xN,AddConfirmation:NN,CheckboxField:qN},setup(e,{emit:t}){var x,E,B,U,$;const{stepTitles:n}=Hi(),r=fe(null),s=fe(null),a=fe(1),o=fe({}),u=fe(!1),c=fe({activity_type:"open-in-person",location:((x=e.location)==null?void 0:x.location)||"",geoposition:((B=(E=e.location)==null?void 0:E.geoposition)==null?void 0:B.split(","))||[],is_recurring_event_local:"false",recurring_event:"daily",is_extracurricular_event:"false",is_standard_school_curriculum:"false",organizer:((U=e.location)==null?void 0:U.name)||"",organizer_type:(($=e==null?void 0:e.location)==null?void 0:$.organizer_type)||"",language:e.locale?[e.locale]:[],country_iso:e.location.country_iso||"",is_use_resource:"false",privacy:!1}),h=fe(Bn.clone(c.value)),f=pe(()=>{const M=Bn.cloneDeep(h.value),S=["title","activity_type","duration","is_recurring_event_local","start_date","end_date","theme","description"];return["open-online","invite-online"].includes(M.activity_type)||S.push("location"),S.every(F=>!Bn.isEmpty(M[F]))}),p=pe(()=>{const M=Bn.cloneDeep(h.value),S=["audience","ages","is_extracurricular_event"];return!!M.participants_count&&S.every(F=>!Bn.isEmpty(M[F]))}),m=pe(()=>{const M=Bn.cloneDeep(h.value),S=["organizer","organizer_type","country_iso","user_email"];return["open-online","invite-online"].includes(M.activity_type)&&S.push("event_url"),M.privacy?S.every(F=>!Bn.isEmpty(M[F])):!1}),y=pe(()=>a.value===1&&!f.value||a.value===2&&!p.value||a.value===3&&!m.value),_=M=>{a.value=Math.max(Math.min(M,4),1)},b=()=>{var F,ie,ee,de;const M=((F=e==null?void 0:e.event)==null?void 0:F.id)||((ie=r.value)==null?void 0:ie.id),S=((ee=e==null?void 0:e.event)==null?void 0:ee.slug)||((de=r.value)==null?void 0:de.slug);window.location.href=`/view/${M}/${S}`},A=()=>window.location.href="/events",H=()=>window.location.reload(),V=async()=>{var F,ie,ee,de,te,N,J;o.value={};const M=h.value,S={_token:e.token,_method:Bn.isNil(e.event.id)?void 0:"PATCH",title:M.title,activity_format:(F=M.activity_format)==null?void 0:F.join(","),activity_type:M.activity_type,location:M.location,geoposition:((ie=M.geoposition)==null?void 0:ie.join(","))||[],duration:M.duration,start_date:M.start_date,end_date:M.end_date,theme:(ee=M.theme)==null?void 0:ee.join(","),description:M.description,audience:(de=M.audience)==null?void 0:de.join(","),participants_count:M.participants_count,males_count:M.males_count,females_count:M.females_count,other_count:M.other_count,ages:(te=M.ages)==null?void 0:te.join(","),is_extracurricular_event:M.is_extracurricular_event==="true",is_standard_school_curriculum:M.is_standard_school_curriculum==="true",codeweek_for_all_participation_code:M.codeweek_for_all_participation_code,leading_teacher_tag:M.leading_teacher_tag,picture:M.picture,organizer:M.organizer,organizer_type:M.organizer_type,language:M.language,country_iso:M.country_iso,is_use_resource:M.is_use_resource==="true",event_url:M.event_url,contact_person:M.contact_person,user_email:M.user_email,privacy:M.privacy===!0?"on":void 0};M.is_recurring_event_local==="true"&&(S.recurring_event=M.recurring_event,S.recurring_type=M.recurring_type);try{if(!Bn.isNil(e.event.id))await Tt.post(`/events/${e.event.id}`,S);else{const{data:D}=await Tt.post("/events",S);r.value=D.event}_(4)}catch(D){o.value=(J=(N=D.response)==null?void 0:N.data)==null?void 0:J.errors,a.value=1}};return Wt(()=>e.event,()=>{var ie,ee,de,te;if(!e.event.id)return;const M=N=>{var J,D;return((D=(J=N==null?void 0:N.split(","))==null?void 0:J.filter(Y=>!!Y))==null?void 0:D.map(Y=>Number(Y)))||[]},S=e.event,F=S.geoposition||((ie=e.location)==null?void 0:ie.geoposition);h.value={...h.value,title:S.title,activity_format:S.activity_format,activity_type:S.activity_type||"open-in-person",location:S.location||((ee=e.location)==null?void 0:ee.location),geoposition:F==null?void 0:F.split(","),duration:S.duration,start_date:S.start_date,end_date:S.end_date,recurring_event:S.recurring_event||"daily",recurring_type:S.recurring_type,theme:M(e.selectedValues.themes),description:S.description,audience:M(e.selectedValues.audiences),participants_count:S.participants_count,males_count:S.males_count,females_count:S.females_count,other_count:S.other_count,ages:S.ages,is_extracurricular_event:String(!!S.is_extracurricular_event),is_standard_school_curriculum:String(!!S.is_standard_school_curriculum),codeweek_for_all_participation_code:S.codeweek_for_all_participation_code,leading_teacher_tag:S.leading_teacher_tag,picture:S.picture,pictureUrl:e.selectedValues.picture,organizer:S.organizer||((de=e.location)==null?void 0:de.name),organizer_type:S.organizer_type||((te=e==null?void 0:e.location)==null?void 0:te.organizer_type),language:S.languages||[e.locale],country_iso:S.country_iso||e.location.country_iso,is_use_resource:String(!!S.is_use_resource),event_url:S.event_url,contact_person:S.contact_person,user_email:S.user_email},S.recurring_event&&(h.value.is_recurring_event_local="true")},{immediate:!0}),Wt(()=>a.value,()=>{if(a.value===4){const M=document.getElementById("add-event-hero-section");M&&(M.style.display="none"),window.scrollTo({top:0})}else if(s.value){const M=s.value.getBoundingClientRect().top;window.scrollTo({top:M+window.pageYOffset-40})}}),Ft(()=>{const M=new IntersectionObserver(([F])=>{u.value=F.isIntersecting}),S=document.getElementById("page-footer");S&&M.observe(S)}),{containerRef:s,step:a,stepTitles:n,errors:o,formValues:h,handleGoToActivity:b,handleGoMapPage:A,handleReloadPage:H,handleMoveStep:_,handleSubmit:V,disableNextbutton:y,validStep1:f,validStep2:p,validStep3:m,pageFooterVisible:u}}},YN={key:0,class:"flex relative justify-center py-10 codeweek-container-lg"},zN={class:"flex gap-12"},KN=["onClick"],GN={class:"flex-1"},JN={class:"text-slate-500 font-normal text-base leading-[22px] p-0 text-center"},ZN={key:0,class:"absolute top-6 left-[calc(100%+1.5rem)] -translate-x-1/2 w-[calc(100%-1rem)] md:w-[calc(100%-0.75rem)] h-[2px] bg-[#CCF0F9]"},XN={key:1,class:"flex relative justify-center px-4 py-10 codeweek-container-lg md:px-10 md:py-20"},QN={class:"flex flex-col justify-center items-center text-center gap-4 max-w-[660px]"},e4={class:"text-dark-blue text-[22px] md:text-4xl font-semibold font-[Montserrat]"},t4={key:0,class:"flex flex-col gap-4 text-[16px] text-center"},n4={ref:"containerRef",class:"relative w-full"},r4={class:"relative pt-20 pb-16 codeweek-container-lg md:pt-32 md:pb-20"},s4={class:"flex justify-center"},i4={class:"flex flex-col max-w-[852px] w-full"},a4={key:0,class:"text-dark-blue text-2xl md:text-4xl leading-[44px] font-medium font-['Montserrat'] mb-10 text-center"},l4=["href"],o4={class:"flex flex-wrap gap-y-2 gap-x-4 justify-between mt-10 min-h-12"},u4={key:0},c4={key:1},d4=["disabled"],f4={key:0},h4={key:1},p4={key:1},m4={key:2};function g4(e,t,n,r,s,a){var p;const o=at("FormStep1"),u=at("FormStep2"),c=at("FormStep3"),h=at("CheckboxField"),f=at("AddConfirmation");return k(),P(Ve,null,[r.step<4?(k(),P("div",YN,[v("div",zN,[(k(!0),P(Ve,null,Qe(r.stepTitles,(m,y)=>(k(),P("div",{class:Be(["flex relative flex-col flex-1 gap-2 items-center md:w-52",[y===0&&"cursor-pointer",y+1===2&&r.validStep1&&"cursor-pointer",y+1===3&&r.validStep2&&"cursor-pointer"]]),onClick:()=>{y+1===2&&!r.validStep1||y+1===3&&!r.validStep2||r.handleMoveStep(y+1)}},[v("div",{class:Be(["w-12 h-12 rounded-full flex justify-center items-center text-['#20262C'] font-semibold text-2xl",[r.step===y+1?"bg-light-blue-300":"bg-light-blue-100"]])},se(y+1),3),v("div",GN,[v("p",JN,se(e.$t(`event.${m}`)),1)]),yr.formValues.privacy=m),name:"privacy"},{default:Te(()=>[v("div",null,[v("span",null,se(e.$t("event.privacy")),1),v("a",{class:"ml-1 !inline cookweek-link",href:n.privacyLink,target:"_blank"},se(e.$t("event.privacy-policy-terms")),9,l4)])]),_:1},8,["modelValue"])],2),v("div",{class:Be([r.step!==4&&"hidden"])},[he(f,{formValues:r.formValues,themes:n.themes,location:n.location,audiences:n.audiences,leadingTeachers:n.leadingTeachers,languages:n.languages,countries:n.countries},null,8,["formValues","themes","location","audiences","leadingTeachers","languages","countries"])],2),v("div",o4,[r.step>1?(k(),P("button",{key:0,class:"flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-2.5 px-6 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] max-sm:w-full sm:min-w-[224px]",type:"button",onClick:t[1]||(t[1]=()=>{r.step===4?r.handleGoToActivity():r.handleMoveStep(r.step-1)})},[r.step===4?(k(),P("span",u4,se(e.$t("event.view-activity")),1)):(k(),P("span",c4,se(e.$t("event.previous-step")),1))])):ae("",!0),t[4]||(t[4]=v("div",{class:"hidden md:block"},null,-1)),v("div",{id:"footer-scroll-activity",class:Be(["flex justify-center max-sm:w-full sm:min-w-[224px]",[r.step<4&&!r.pageFooterVisible?"md:!translate-y-0 max-md:fixed max-md:bottom-0 max-md:left-0 max-md:border-t-2 max-md:border-primary max-md:py-4 max-md:px-[44px] max-md:w-full max-md:bg-white max-md:z-[99]":"!translate-y-0"]])},[v("button",{class:Be(["text-nowrap flex justify-center items-center duration-300 rounded-full py-2.5 px-6 font-semibold text-lg max-sm:w-full sm:min-w-[224px]",[r.disableNextbutton?"cursor-not-allowed bg-gray-200 text-gray-400":"bg-primary hover:bg-hover-orange text-[#20262C]"]]),type:"button",disabled:r.disableNextbutton,onClick:t[2]||(t[2]=()=>{var m;r.step===4?(m=n.event)!=null&&m.id?r.handleGoMapPage():r.handleReloadPage():r.step===3&&r.validStep3?r.handleSubmit():r.step===2&&r.validStep2?r.handleMoveStep(3):r.step===1&&r.validStep1&&r.handleMoveStep(2)})},[r.step===4?(k(),P(Ve,{key:0},[(p=n.event)!=null&&p.id?(k(),P("span",f4,se(e.$t("event.back-to-map-page")),1)):(k(),P("span",h4,se(e.$t("event.add-another-activity")),1))],64)):r.step===3?(k(),P("span",p4,se(e.$t("event.submit")),1)):(k(),P("span",m4,se(e.$t("event.next-step")),1))],10,d4)],2)])])])])],512)],64)}const v4=vt(WN,[["render",g4]]),y4={props:{property:Object,type:String},data(){return{label:this.type?this.$t("resources.resources."+this.type+"."+this.property.name):this.property.name}}},_4={class:"bg-light-blue-100 py-1 px-4 text-sm font-semibold text-slate-500 rounded-full whitespace-nowrap"};function b4(e,t,n,r,s,a){return k(),P("span",_4,se(s.label),1)}const H1=vt(y4,[["render",b4]]),w4={components:{ResourcePill:H1},props:{resource:Object},data(){return{descriptionHeight:"auto",needShowMore:!0,showMore:!1}},methods:{computeDescriptionHeight(){const e=this.$refs.descriptionContainerRef,t=this.$refs.descriptionRef,n=e.clientHeight,r=Math.floor(n/22);t.style.height="auto",this.descriptionHeight="auto",this.needShowMore=t.offsetHeight>n,t.offsetHeight>n?(t.style.height=`${r*22}px`,this.descriptionHeight=`${r*22}px`):this.showMore=!1},onToggleShowMore(){const e=this.$refs.descriptionRef;this.showMore=!this.showMore,this.showMore?e.style.height="auto":e.style.height=this.descriptionHeight}},mounted:function(){this.computeDescriptionHeight()}},x4={class:"relative flex flex-col bg-white rounded-lg overflow-hidden"},k4={class:"flex-shrink-0"},S4=["src"],T4={class:"flex gap-2 flex-wrap mb-2"},C4={class:"text-dark-blue font-semibold font-['Montserrat'] leading-6"},A4={key:0,class:"text-slate-500 text-[16px] leading-[22px]"},E4={ref:"descriptionRef",class:"relative flex-grow text-slate-500 overflow-hidden",style:{height:"auto"}},O4={class:"flex-shrink-0"},M4=["href"];function R4(e,t,n,r,s,a){var u,c,h,f;const o=at("resource-pill");return k(),P("div",x4,[v("div",k4,[v("img",{src:n.resource.thumbnail},null,8,S4)]),v("div",{class:Be(["flex-grow flex flex-col gap-2 px-6 py-4 h-fit",{"max-h-[450px]":s.needShowMore&&!s.showMore}])},[v("div",T4,[(k(!0),P(Ve,null,Qe(n.resource.types,p=>(k(),it(o,{property:p,type:"types"},null,8,["property"]))),256))]),v("div",C4,se(n.resource.name),1),(c=(u=n.resource.languages)==null?void 0:u[0])!=null&&c.name?(k(),P("div",A4," Language: "+se(((f=(h=n.resource.languages)==null?void 0:h[0])==null?void 0:f.name)||""),1)):ae("",!0),v("div",{ref:"descriptionContainerRef",class:Be(["flex-grow text-[16px] leading-[22px] h-full",{"overflow-hidden":s.needShowMore&&!s.showMore}])},[v("div",E4,[ft(se(n.resource.description)+" ",1),s.needShowMore?(k(),P("div",{key:0,class:Be(["flex justify-end bottom-0 right-0 bg-white pl-0.5 text-dark-blue",{absolute:!s.showMore,"w-full":s.showMore}])},[v("button",{onClick:t[0]||(t[0]=(...p)=>a.onToggleShowMore&&a.onToggleShowMore(...p))},se(s.showMore?"Show less":"... Show more"),1)],2)):ae("",!0)],512)],2),v("div",O4,[t[2]||(t[2]=v("div",{class:"h-[56px]"},null,-1)),v("a",{class:"absolute left-6 right-6 bottom-4 flex justify-center items-center gap-2 text-[#1C4DA1] border-solid border-2 border-[#1C4DA1] rounded-full py-3 px-8 font-semibold text-lg transition-all duration-300 hover:bg-[#E8EDF6] group",href:n.resource.source,target:"_blank"},[v("span",null,se(e.$t("myevents.view_lesson")),1),t[1]||(t[1]=v("div",{class:"flex gap-2 w-4 overflow-hidden"},[v("img",{src:"/images/arrow-right-icon.svg",class:"min-w-4 duration-500 transform -translate-x-6 group-hover:translate-x-0"}),v("img",{src:"/images/arrow-right-icon.svg",class:"min-w-4 duration-500 transform -translate-x-6 group-hover:translate-x-0"})],-1))],8,M4)])],2)])}const U1=vt(w4,[["render",R4]]),D4={props:["pagination","offset"],methods:{isCurrentPage(e){return this.pagination.current_page===e},changePage(e){e<1||e>this.pagination.last_page||(this.pagination.current_page=e,this.$emit("paginate",e))}},computed:{pages(){let e=[],t=this.pagination.current_page-Math.floor(this.offset/2);t<1&&(t=1);let n=t+this.offset-1;for(n>this.pagination.last_page&&(n=this.pagination.last_page);t<=n;)e.push(t),t++;return e}}},P4={role:"navigation","aria-label":"pagination"},L4={class:"flex flex-wrap items-center justify-center gap-2 py-12 m-0 font-['Blinker']"},I4=["disabled"],N4={class:"flex items-center gap-1 whitespace-nowrap"},V4=["onClick"],F4={key:1,class:"flex justify-center items-center w-12 h-12 text-xl rounded font-normal text-[#333E48] duration-300"},$4=["disabled"];function B4(e,t,n,r,s,a){return k(),P("nav",P4,[v("ul",L4,[v("li",null,[v("a",{class:"block p-4 duration-300 rounded-full cursor-pointer bg-yellow hover:bg-primary",onClick:t[0]||(t[0]=Et(o=>a.changePage(n.pagination.current_page-1),["prevent"])),disabled:n.pagination.current_page<=1},t[2]||(t[2]=[v("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[v("path",{d:"M25.8335 16H7.16683",stroke:"black","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"}),v("path",{d:"M16.5 6.66663L7.16667 16L16.5 25.3333",stroke:"black","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),8,I4)]),(k(!0),P(Ve,null,Qe(a.pages,o=>(k(),P("li",N4,[n.pagination.current_page!=o?(k(),P("a",{key:0,class:"flex justify-center items-center w-12 h-12 text-xl hover:bg-[#1C4DA1]/10 rounded font-bold text-[#1C4DA1] underline duration-300 cursor-pointer",onClick:Et(u=>a.changePage(o),["prevent"])},se(o),9,V4)):(k(),P("a",F4,se(o),1))]))),256)),v("li",null,[v("a",{class:"block p-4 duration-300 rounded-full cursor-pointer bg-yellow hover:bg-primary",onClick:t[1]||(t[1]=Et(o=>a.changePage(n.pagination.current_page+1),["prevent"])),disabled:n.pagination.current_page>=n.pagination.last_page},t[3]||(t[3]=[v("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[v("path",{d:"M7.16699 16H25.8337",stroke:"black","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"}),v("path",{d:"M16.5 6.66663L25.8333 16L16.5 25.3333",stroke:"black","stroke-width":"2.66667","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]),8,$4)])])])}const dd=vt(D4,[["render",B4]]);var H4={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * diff --git a/public/build/manifest.json b/public/build/manifest.json index f4e0c07b1..67d81744f 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -10,7 +10,7 @@ "isEntry": true }, "resources/js/app.js": { - "file": "assets/app-DyUnC4b0.js", + "file": "assets/app-BvRzPRXt.js", "name": "app", "src": "resources/js/app.js", "isEntry": true, diff --git a/resources/js/components/activity-form/FormStep1.vue b/resources/js/components/activity-form/FormStep1.vue index 270584085..c51d43d1e 100644 --- a/resources/js/components/activity-form/FormStep1.vue +++ b/resources/js/components/activity-form/FormStep1.vue @@ -135,8 +135,9 @@ export default { return !isOnline && props.formValues.locationDirty === true && props.formValues.locationSelected === false; }); - const handleLocationTyping = (text) => { - props.formValues.location = text ?? ''; + const handleLocationTyping = (_text) => { + // Typing = need update location + props.formValues.location = ''; props.formValues.locationDirty = true; props.formValues.locationSelected = false; };