1import{_ as ke,o as p,c as C,a as o,b as $,m as B,w as M,aq as Ie,d as Z,F as W,r as ae,e as v,B as ie,ar as re,as as Vr,k as I,t as ne,at as pe,n as he,l as H,i as xe,au as ni,av as Pe,aw as Ir,ax as Se,ay as Er,az as $r,aA as Lr,D as Or,j as Es,aB as li,G as oe,aC as Ur,p as Rr,a7 as _e,f as se,aD as $s,aE as oi,a9 as le,al as ue,aF as Br,K as Ls,P as Os,aG as Rs,I as ui,aH as ci,V as Ms,aI as js,U as Fs,W as ge,h as be,a4 as me,a3 as ye,aJ as di,aK as mi,aL as fi,aM as vi,q as hi,aN as Hs,a8 as we,aO as Us,ak as Ar,aP as Bs,C as pi,aj as zs,aQ as Ve,aR as gi,N as Gs,H as _i,J as bi,aS as yi,u as xi,y as zr,aT as Si,aU as Ci}from"./index-CxAbz3jj.js";import{_ as wi}from"./DashboardHeader-D53r_psn.js";import{_ as Gr}from"./Galerie-DvZJbamw.js";import{I as fe}from"./IconPlus-DToaKFkn.js";import{_ as Nr,a as Ti,u as qi,b as ki,c as Pi,U as Ai,d as Di,A as Kr}from"./AddStandardServiceCatalog-CTZzjEj-.js";import{P as de,_ as Vi,M as Ii}from"./MapProfile-iwk_AdRu.js";import{I as Ei}from"./IconChevronLeft-Bx7uYFQe.js";import{u as Mr}from"./tradeLicense-qXROwwkf.js";import{u as $i}from"./review-DnyLoDNm.js";import{B as Li,a as Oi}from"./BadgeOffline-BVChLcj_.js";import{I as Ee}from"./IconTrash-eIKTZlsc.js";import{I as Ri}from"./ic_chevron_down-D3GcNYUl.js";import{I as Mi}from"./IconPlay-DKFkBcYI.js";import{I as ji,T as Fi}from"./TimePicker-DN7AQ7v0.js";import{B as Hi}from"./BadgeHighlightUntil-BF6UiI2k.js";import{E as Wr}from"./EmptyGallery-CoSx3IGj.js";import{_ as Ui}from"./WarningPopup-DFK12lnY.js";import{u as $e,a as ve}from"./vee-validate.esm-AJWZxxS8.js";import{V as Bi,_ as zi}from"./DIYArticleEditor-BInTvoQZ.js";import{I as Gi}from"./ImageUploadGallery-mX6i1iqW.js";import{T as Ns}from"./TextareaEditor-usVahM50.js";import{v as Dr}from"./htmlText-BNPplO8k.js";import{I as Ni}from"./ImageUpload-GRdxOAdb.js";import{_ as Ks}from"./IconSearchGrey-DEhYD1hT.js";import{I as Ki,a as Wi}from"./IconChevronUpDark-Cj_1gxwm.js";import{I as Ws}from"./IconCircleInfo-CfuyOnVD.js";import{u as Js}from"./categories-IzuIKDya.js";import{I as Ji}from"./empty_todos-Cp-ALGz9.js";import{_ as Zi}from"./ProfileCompleteSuccessPopup-CFuE9KDM.js";import"./BadgeHipe.vue_vue_type_script_setup_true_lang-D2SnMe5k.js";import"./Badge-DzqewcaA.js";import"./BadgePremium.vue_vue_type_script_setup_true_lang-BV08xfXu.js";import"./ShareButton-CrE4_gmr.js";import"./useOverflowing-DqADTsCB.js";import"./Pagination-BCxE5aLh.js";import"./CostInput-C6Pjz8S3.js";import"./PopupSuccess-B4loWL8a.js";import"./SearchInput-QbtuDwRb.js";import"./addressForm-CYPkW_SF.js";import"./IconCheckCircleFilled-DSImTxUH.js";import"./BadgeFilter-Cgt3JGx7.js";import"./resource-tPbLBW6G.js";import"./resourceService-9V9v9ARe.js";import"./IconVideo-Cc6fNCVA.js";import"./IconImage-N6nI1O0S.js";import"./ic_trash-CXFOr3_X.js";import"./categories-dB4Fystu.js";const Qi={},Yi={width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xi(r,t){return p(),C("svg",Yi,t[0]||(t[0]=[o("path",{d:"M5 10H11M5 14H11M13 19H3C1.89543 19 1 18.1046 1 17V3C1 1.89543 1.89543 1 3 1H8.58579C8.851 1 9.10536 1.10536 9.29289 1.29289L14.7071 6.70711C14.8946 6.89464 15 7.149 15 7.41421V17C15 18.1046 14.1046 19 13 19Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const en=ke(Qi,[["render",Xi]]),tn={key:0},rn="no_application",an={__name:"ProfileTradeLicense",props:{tradeLicenseFiles:{type:Array,default:()=>[]},tradeLicenseRequests:{type:Array,default:()=>[]},showHint:{type:Boolean,default:!1}},emits:["addTradeLicense"],setup(r,{emit:t}){const e=t,a=r,s=$(()=>a.tradeLicenseFiles??[]),i=$(()=>a.tradeLicenseRequests??[]),n=$(()=>s.value.length>0||i.value.length>0);return(u,m)=>(p(),B(de,{title:"Gewerbenachweis"},{tooltip:M(()=>[v(Vr,{html:`Wenn Du auf Grund Deiner Tätigkeit keinen Gewerbeschein benötigst, akzeptiert anyhelpnow auch folgende Unterlagen als Nachweis:<br><br> 2 - Handelsregisterauszug<br> 3 - Schreiben über Zuteilung der Steuernummer durch das Finanzamt<br> 4 - Bestätigung d. Steuerberaters über selbstständige Auskünfte<br> 5 - Bescheid der IHK, Künstlersozialkasse oder BG<br> 6 - Bestätigung des Finanzamts über aktuelle Freiberuflichkeit<br> 7 - Approbationsurkunde`})]),action:M(()=>[v(re,{disabled:s.value.length>10,icon:fe,onClick:m[0]||(m[0]=c=>e("addTradeLicense"))},null,8,["disabled"])]),default:M(()=>[s.value.length>10?(p(),B(Ie,{key:0,text:"Du kannst max. 10 Dokumente hochladen",variant:"warning"})):Z("",!0),s.value.length>0&&r.showHint?(p(),B(Ie,{key:1,text:"Hinweis: Deine Services sind erst nach Upload & Prüfung Deines Gewerbescheins sichtbar.",variant:"danger"})):Z("",!0),o("div",null,[n.value?(p(),C("div",tn,[(p(!0),C(W,null,ae(s.value,(c,l)=>(p(),C("div",{key:c.id??c.download_url??c.name??l,class:"py-1"},[v(ie,{href:c.download_url,label:c.name,external:"",variant:"ghost"},{leading:M(()=>[v(en,{class:"w-3.5"})]),_:2},1032,["href","label"])]))),128)),(p(!0),C(W,null,ae(i.value,c=>(p(),B(Nr,{key:"tradeLicenseRequest-"+(c.id??c.sign_url??c.signed_pdf_url),action:c.signed_pdf_url||c.sign_url,currentStatus:c.signed_pdf_url?"application_success":"application_draft",class:"mt-3"},null,8,["action","currentStatus"]))),128))])):(p(),B(Nr,{key:1,currentStatus:rn}))])]),_:1}))}},sn={class:"pb-6 pt-1"},nn={class:"flex justify-between items-start min-w-full"},ln={class:"flex flex-wrap"},on={class:"headline text-md md:text-lg flex-1 pr-3 w-min sm:w-max"},un={class:"flex flex-wrap gap-2"},cn={class:"flex gap-2"},dn={class:"py-4"},mn={class:"flex flex-col"},fn={class:"flex justify-between md:items-center"},vn={class:"text-sm font-medium text-headline"}
7,hn={key:0,class:"pl-1",textContent:"Online"},pn={key:1,class:"pl-1",textContent:"Vor Ort"},Jr=3,gn={__name:"ProfileCategoryServiceCardEdit",props:{categoryServices:{type:Object,default:()=>({name:"",experience:"",services:[]})}},emits:["deleteCategory","editCategory"],setup(r,{emit:t}){const e=r,a=t,s=$(()=>e.categoryServices?.services??[]),i=$(()=>s.value.length),n=$(()=>s.value.some(y=>y?.service?.type==="ONLINE")),u=$(()=>s.value.some(y=>y?.service?.type==="IN_PERSON")),m=$(()=>{const y=new Map;for(const w of s.value){const q=w?.service?.name??"";y.set(q,(y.get(q)??0)+1)}const k=new Set;for(const[w,q]of y.entries())q>1&&k.add(w);return k}),c=I(!1),l=$(()=>{const y=c.value?i.value:Jr;return s.value.slice(0,y)}),h=$(()=>i.value>Jr),f=y=>(y??"").toString().toLowerCase(),b=y=>!!y?.reason&&f(y?.status)==="rejected",D=()=>{c.value=!c.value};return(y,k)=>(p(),C("div",sn,[o("div",nn,[o("div",ln,[o("h4",on,ne(r.categoryServices?.name),1),o("div",un,[n.value?(p(),B(Li,{key:0})):Z("",!0),u.value?(p(),B(Oi,{key:1})):Z("",!0)])]),o("div",cn,[v(re,{icon:pe,onClick:k[0]||(k[0]=w=>a("editCategory",r.categoryServices))}),v(re,{icon:Ee,onClick:k[1]||(k[1]=w=>a("deleteCategory",r.categoryServices))})])]),o("div",dn,[(p(!0),C(W,null,ae(l.value,(w,q)=>(p(),C("div",{key:w?.id??`categoryServices-${q}`,class:he([q!==l.value.length-1?"border-b":"","pb-[11px] pt-2"])},[o("div",mn,[o("div",fn,[o("p",vn,[o("span",null,ne(w.service.name),1),m.value.has(w.service.name)&&w.service.type==="ONLINE"?(p(),C("span",hn)):Z("",!0),m.value.has(w.service.name)&&w.service.type==="IN_PERSON"?(p(),C("span",pn)):Z("",!0)]),v(Ti,{id:w.id,status:f(w.status)},null,8,["id","status"])]),b(w)?(p(),B(Ie,{key:0,text:"Die Freigabe Deines Services wurde abgelehnt. Der Grund dafür ist: "+w.reason.text,variant:"danger"},null,8,["text"])):Z("",!0)])],2))),128)),h.value?(p(),B(ie,{key:0,label:c.value?"Zeige weniger":"Zeige mehr",variant:"ghost",onClick:k[2]||(k[2]=w=>D())},{trailing:M(()=>[v(H(Ri),{class:he([c.value?"rotate-180":"","hw-4"])},null,8,["class"])]),_:1},8,["label"])):Z("",!0)])]))}},_n={width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},bn=["fill"],yn={__name:"IconIncreaseVisibility",props:{currentColor:{type:Boolean,default:!1}},setup(r){return(t,e)=>(p(),C("svg",_n,[o("path",{d:"M12 7.94141C11.4477 7.94141 11 7.49369 11 6.94141C11 6.38912 11.4477 5.94141 12 5.94141H17C17.5523 5.94141 18 6.38912 18 6.94141V11.9414C18 12.4937 17.5523 12.9414 17 12.9414C16.4477 12.9414 16 12.4937 16 11.9414V9.35562L11.7071 13.6485C11.3166 14.039 10.6834 14.039 10.2929 13.6485L8 11.3556L3.70711 15.6485C3.31658 16.039 2.68342 16.039 2.29289 15.6485C1.90237 15.258 1.90237 14.6248 2.29289 14.2343L7.2929 9.2343C7.68342 8.84378 8.31659 8.84378 8.70711 9.2343L11 11.5272L14.5858 7.94141H12Z",fill:r.currentColor?"currentColor":"#002F6A"},null,8,bn)]))}},xn={class:"flex flex-col gap-4"},Sn={class:"flex gap-4 justify-between items-start"},Cn=["innerHTML"],wn={class:"flex flex-col gap-y-2 mb-4"},Tn={class:"flex gap-4 justify-between items-center"},qn={class:"flex gap-4 justify-between items-start"},kn=["innerHTML"],Pn={class:"split-row"},An={class:"flex gap-3 mt-4 relative items-center"},Dn={class:"flex gap-2 items-center"},Vn={class:"flex-none ml-auto pt-1"},In={class:"split-row"},En={class:"text-sm tracking-wide"},$n={key:0,class:"rounded-lg overflow-hidden relative"},Ln=["src"],On={__name:"Profile",emits:["manage","openCalendarSettings","openHighlightPopup"],setup(r,{emit:t}){const e=t,a=xe(),s=ni(),i=Pe(),n=Ir(),u=Se(),m=Er(),c=Mr(),l=$i(),h=$r(),f=Lr(),b=Or(),D=Es(),y=li(),k=I(!1),w=I(0);oe(()=>{i.index(),n.getTradeLicenseFiles(),u.fetch(),m.fetch(),c.index()});const q=$(()=>f.result),j=$(()=>a.user),A=$(()=>j.value?.additional_information?.city),O=$(()=>j.value?.additional_information?.postal_code),E=$(()=>{const Q=Number(j.value?.additional_information?.lat),L=Number(j.value?.additional_information?.lng);return{lat:Number.isFinite(Q)?Q:51.5317158,lng:Number.isFinite(L)?L:9.9049169}}),V=$(()=>!!b.result?.hide_detailed_address),U=$(()=>i.result||{}),N=$(()=>!!U.value?.self_title),z=$(()=>!!U.value?.self_description),R=$(()=>Ur.sanitize(z.value?U.value.self_description_cleaned:"Erstelle deine Selbstbeschreibung.")),P=I(!1),x=$(()=>i.result?.video_url??null),S=I(null);function _(){S.value&&(P.value?(S.value.pause(),P.value=!1):(S.value.play(),P.value=!0))}$(()=>l.reviewItems.length?l.reviewItems.slice(0,2):[]);const d=$(()=>h.list),g=$(()=>u.userServices||[]),T=$(()=>u.categoriesWithServicesAll||[]),K=$(()=>(u.categoriesWithServicesAll||[]).map(Q=>Q.id)),Y=$(()=>m.result||null),J=$(()=>Ur.sanitize(Y.value?.text?Y.value.text_cleaned:"Beschreibe hier, was du anbietest, um mehr Kunden zu finden.")),He=$(()=>T.value.every(Q=>Q.services.every(L=>L.status==="Approved"))),Ue=$(()=>n.tradeLicenseFiles||[]),Be=$(()=>c.result||[]),Ae=$(()=>`${window.location.origin}/lp/${a.user?.id??""}`);function te(Q,L){e("manage",Q,L)}const ze=Rr();function Ge(){a.user?.is_premium?ze.push("/settings/landing-page/edit"):y.toggleCheckoutPopup()}function De(Q){w.value=Q,k.value=!0}function Ne(){k.value=!1}function Ke(){k.value=!1}function X(Q){b.toggleHideDetailedAddress(Q).then(()=>{a.refresh(),b.index()})}return(Q,L)=>(p(),C(W,null,[o("div",xn,[v(de,{highlightIcon:yn},{highlight:M(()=>[L[13]||(L[13]=o("p",{class:"text-sm mb-2"}," Steigere deine Chancen, gefunden zu werden! Dein Profil wird für 7 Tage in den Top-Positionen der Suchergebnisse angezeigt. ",-1)),j.value.highlighted?(p(),B(Hi,{key:0,date:j.value.highlight.highlight_until},null,8,["date"])):(p(),B(ie,{key:1,ghostInline:"",label:"Sichtbarkeit erhöhen",variant:"ghost",onClick:L[0]||(L[0]=F=>Q.$emit("openHighlightPopup"))}))]),_:1}),v(de,{title:N.value?U.value.self_title:"Füge einen Titel hinzu."},{action:M(()=>[v(re,{icon:N.value?pe:fe,onClick:L[1]||(L[1]=F=>te("title"))},null,8,["icon"])]),default:M(()=>[o("div",Sn,[o("p",{class:"text-base",innerHTML:R.value},null,8,Cn),v(re,{icon:z.value?pe:fe,onClick:L[2]||(L[2]=F=>te("description"))},null,8,["icon"])])]),_:1},8,["title"]),v(an,{showHint:!He.value,tradeLicenseFiles:Ue.value,tradeLicenseRequests:Be.value,onAddTradeLicense:L[3]||(L[3]=F=>te("add_trade_license"))},null,8,["showHint","tradeLicenseFiles","tradeLicenseRequests"]),o("div",wn,[o("div",Tn,[L[14]||(L[14]=o("h3",{class:"headline text-lg"}," Angebotsübersicht ",-1)),v(re,{icon:fe,onClick:L[4]||(L[4]=F=>te("add_category_offer",K.value))})]),o("div",qn,[o("p",{class:"text-base wysiwyg-markdown no-break-word whitespace-pre-wrap",innerHTML:J.value}
7,null,8,kn),v(re,{icon:Y.value?pe:fe,onClick:L[5]||(L[5]=F=>te("skill_description"))},null,8,["icon"])]),g.value.length===0?(p(),B(Wr,{key:0,variant:"noOffers"})):Z("",!0)]),(p(!0),C(W,null,ae(T.value,(F,G)=>(p(),B(gn,{key:"editCategoryService"+G,categoryServices:F,onDeleteCategory:ee=>te("delete_category",F),onEditCategory:ee=>te("edit_category_offer",F)},null,8,["categoryServices","onDeleteCategory","onEditCategory"]))),128)),o("div",Pn,[v(de,{class:"flex-1 md:min-w-80",title:"Verfügbarkeit"},{action:M(()=>[v(re,{icon:pe,onClick:L[6]||(L[6]=F=>te("edit_availability"))})]),default:M(()=>[v(Vi,{availability:q.value},null,8,["availability"])]),_:1}),v(de,{class:"flex-1 min-w-60",title:"Standort"},{action:M(()=>[v(re,{icon:pe,onClick:L[7]||(L[7]=F=>te("location"))})]),default:M(()=>[v(Ii,{city:A.value,position:E.value,"postal-code":O.value,showPin:!0},null,8,["city","position","postal-code"]),o("div",An,[o("div",Dn,[v(_e,{class:"md:text-md!"},{default:M(()=>L[15]||(L[15]=[se("Meine Adresse verbergen",-1)])),_:1,__:[15]}),v(Vr,{text:"Wenn du diese Funktion aktivierst, werden Teile deiner Adresse (StraÃe und Hausnummer) in deinem öffentlichen Profil nicht angezeigt."})]),o("div",Vn,[v($s,{"model-value":V.value,name:"highlighted","onUpdate:modelValue":X},null,8,["model-value"])])])]),_:1})]),v(Gr,{class:"sm:hidden",editable:"",isMobile:"",onImagePopup:De,onUpdate:L[8]||(L[8]=F=>te("gallery"))}),v(Gr,{class:"hidden sm:flex",editable:"",onImagePopup:De,onUpdate:L[9]||(L[9]=F=>te("gallery"))}),o("div",In,[v(de,{highlightIcon:oi,class:"flex-1",title:"Kalender"},{highlight:M(()=>[o("p",En,[H(s).calendars.length>0?(p(),C(W,{key:0},[se(" Dein Kalender ist verbunden. Verwalte deine Buchungen direkt über den Kalender. ")],64)):H(a).isCalendarPremium?(p(),C(W,{key:1},[se(" Verbinde deinen Kalender, um Buchungen über anyhelpnow zu verwalten. ")],64)):(p(),C(W,{key:2},[se(" Der Kalender ist ein Premium-Feature. Aktiviere Kalender Premium, um Buchungen über anyhelpnow zu verwalten. ")],64))]),v(ie,{ghostInline:"",label:H(s).calendars.length>0?"Kalender öffnen":H(a).isCalendarPremium?"Kalender verbinden":"Kalender Premium aktivieren",variant:"ghost",onClick:L[10]||(L[10]=F=>e("openCalendarSettings"))},null,8,["label"])]),_:1}),le(v(de,{class:"flex-1",title:"Videobeschreibung"},{action:M(()=>[U.value?.video_url?(p(),B(re,{key:0,icon:Ee,onClick:L[11]||(L[11]=F=>te("delete_video"))})):(p(),B(re,{key:1,icon:fe,onClick:L[12]||(L[12]=F=>te("video"))}))]),default:M(()=>[x.value?(p(),C("div",$n,[o("video",{ref_key:"descriptionVideo",ref:S,class:"w-auto min-w-full min-h-full"},[o("source",{src:x.value+"#t=0.1",type:"video/mp4"},null,8,Ln)],512),o("div",{class:he([P.value?"":"bg-black/20","absolute inset-0 flex justify-center items-center"]),onClick:_},[le(v(re,{icon:Mi},null,512),[[ue,!P.value]])],2)])):(p(),B(Wr,{key:1,variant:"video"}))]),_:1},512),[[ue,U.value?.video_url]])]),v(de,{class:"flex-1",title:"Persönliche Landingpage"},{action:M(()=>[H(a).isPremium?(p(),B(re,{key:0,icon:pe,onClick:Ge})):Z("",!0)]),highlight:M(()=>[H(a).isPremium?(p(),C(W,{key:0},[L[16]||(L[16]=o("p",{class:"text-sm mb-1"}," Gewinne neue Kunden mit deiner eigenen Landingpage. Präsentiere dich und dein Angebot übersichtlich, professionell und persönlich â alles an einem Ort ",-1)),H(D).isLandingPagePublished?(p(),B(ie,{key:0,href:Ae.value,label:Ae.value,external:"",ghostInline:"",variant:"ghost"},{leading:M(()=>[v(ji,{class:"hw-5"})]),_:1},8,["href","label"])):Z("",!0)],64)):(p(),C(W,{key:1},[L[17]||(L[17]=o("p",{class:"text-sm mb-1"}," Um deinen Kundenstamm zu erweitern, nutze eine eigene personalisierte Seite, auf der umfassende Informationen über dich und dein Angebot bereitgestellt werden. ",-1)),v(ie,{label:"Jetzt Premium Partner werden",onClick:H(y).toggleCheckoutPopup,ghostInline:"",variant:"ghost"},null,8,["onClick"])],64))]),_:1})]),v(Ei,{activeImage:w.value,images:d.value,open:k.value,onClose:Ne,onConfirm:Ke},null,8,["activeImage","images","open"])],64))}},Rn="/assets/illustration-highlight-DzboLOKM.svg",Mn={class:"flex flex-col md:flex-row gap-6 items-center text-center md:text-left px-4 pt-4 md:pt-8 pb-8 grow md:grow-0"},jn={class:"flex-none"},Fn=["src"],Hn={class:"flex gap-4 justify-center md:justify-stretch items-center mt-2"},Un={key:0,class:"bg-primary text-xs text-white px-2 py-0.5 rounded-sm w-fit"},Bn="Hebe die Sichtbarkeit Deines Profils in der Suche für 7 Tage hervor. De
7in Profil wird nicht nur farblich markiert, sondern auch in den Top-Positionen der Suchergebnisliste angezeigt. Die Hervorhebung wird nach 7 Tagen automatisch deaktiviert, kann aber jederzeit erneut aktiviert werden.",zn="Erhöhe Deine Chancen, gefunden zu werden",Gn={__name:"ProfileHighlightCheckoutPopup",props:{open:{type:Boolean,default:!1},highlighted:{type:Boolean,default:!1},standardServiceHighlightDate:{type:String,default:null}},emits:["close","success"],setup(r,{emit:t}){const e="https://anyhelpnow.com",a=I(!1),s=I(),i=I(),n=qi();oe(async()=>{n.getWebsiteServicePrices(["HighlightUserRegular","HighlightUserDiscount"]).then(h=>{h.forEach(f=>{f?.type==="HighlightUserRegular"&&(s.value=Br(f.value)),f?.type==="HighlightUserDiscount"&&(f.value>0&&(a.value=!0),i.value=Br(f.value))})})});const u=xe(),m=ki(),c=()=>{m.redirectToHighlightPackagePaymentPage(u?.user?.id,window.location.origin+"/settings?msg=user-highlighting-enabled",null)},l=()=>{window.open(e+"/highlight","_blank")};return(h,f)=>(p(),B(Ls,{open:r.open,"action-title":"Jetzt buchen",title:"Erhöhe Deine Sichtbarkeit",onClose:f[0]||(f[0]=b=>h.$emit("close")),onConfirm:c},{default:M(()=>[o("div",Mn,[o("div",jn,[o("img",{src:H(Rn),alt:"",class:"w-full h-full"},null,8,Fn)]),o("div",null,[o("h3",{class:"headline mb-2"},ne(zn)),o("p",{class:"text-xs sm:text-sm"},ne(Bn)),v(ie,{label:"Mehr erfahren",variant:"link",onClick:l}),o("div",Hn,[o("div",{class:he([{"line-through":a.value},"font-medium text-lg text-headline"])},ne(s.value)+" ⬠",3),a.value?(p(),C("div",Un,[se(ne(i.value)+" ⬠",1),f[1]||(f[1]=o("span",{class:"font-light"},"heute",-1))])):Z("",!0)])])])]),_:1},8,["open"]))}},Nn={class:"bg-white flex flex-col rounded-[20px]"},Kn={class:"flex px-4 pb-5 pt-4 justify-start items-center"},Wn={class:"pb-10 px-8"},Jn={class:"mb-8 flex justify-center"},Zn={class:"flex pb-8 flex justify-center"},Qn={__name:"ProfileHighlightCheckoutSuccessPopup",props:{open:{type:Boolean,default:!1}},emits:["close"],setup(r,{emit:t}){const e=Rr(),a=Os(),s=t,i=()=>{const{msg:n,...u}=a.query;e.replace({path:a.path,query:u}),s("close")};return(n,u)=>(p(),B(H(js),{open:r.open,class:"fixed z-50 inset-0 bg-backdrop backdrop-blur-md flex items-center justify-center overflow-y-auto"},{default:M(()=>[v(H(Rs),{class:"mx-4 absolute inset-auto top-6 w-auto max-w-[592px] max-h-full top-auto bottom-auto"},{default:M(()=>[o("div",Nn,[o("div",Kn,[v(ui,{onClick:i,class:"w-6 h-6 cursor-pointer ml-auto"})]),o("div",Wn,[o("div",Jn,[v(ci,{class:"w-12 h-12 text-secondary"})]),v(H(Ms),{as:"h6",class:"text-2xl font-medium text-headline text-center mb-3"},{default:M(()=>u[0]||(u[0]=[se(" Glückwunsch! Dein Profil ist nun in gehighlightet! ",-1)])),_:1,__:[0]}),u[1]||(u[1]=o("p",{class:"text-center text-xs md:text-base tracking-wide pt-2"}," Sei gespannt auf erhöhte Aufmerksamkeit und mehr Anfragen. Die Hervorhebung wird automatisch nach 7 Tagen deaktiviert, Du kannst sie jedoch jederzeit erneut aktivieren. ",-1))]),o("div",Zn,[v(ie,{onClick:i,label:"Zum Profil",class:"text-sm md:text-base bg-green w-auto! h-11 md:h-12"})])])]),_:1})]),_:1},8,["open"]))}},Yn={class:"flex flex-col gap-y-6"},Xn={class:"flex flex-col gap-y-2"},Zr=40,el={__name:"EditHeadline",props:{selfDescription:{type:Object,default:()=>({})}},emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=Pe(),s=e,i=r,n=Fs({title:ge().nullable().matches(/^[^>;!@$%^={}"]*$/,"Der Titel darf keine der folgenden Zeichen enthalten: >, ;, !, @, $, %, ^, =, {, }.").max(40)}),{handleSubmit:u,resetForm:m}=$e({validationSchema:n}),{errorMessage:c,value:l}=ve("title"),h=$(()=>Zr-(l.value||"").length);m(),be(()=>i.selfDescription?.self_title,b=>{l.value=b??""},{immediate:!0});const f=u(async b=>{const D={...i.selfDescription||{},self_title:b.title??""};delete D.video_url,delete D.video,delete D.id,await a.update(D),s("closeEdit")});return t({saveChanges:f}),(b,D)=>(p(),C("div",Yn,[D[1]||(D[1]=o("div",{class:"flex flex-col gap-y-2"},[o("p",{class:"text-headline text-lg font-medium"},"Dein Titel"),o("p",{class:"text-sm tracking-wide"}," Füge hier einen Titel für Dein Profil hinzu, um mehr potentielle Kunden anzusprechen. ")],-1)),o("div",Xn,[v(ye,{modelValue:H(l),"onUpdate:modelValue":D[0]||(D[0]=y=>me(l)?l.value=y:null),errorMessage:H(c)&&"",maxlength:Zr},null,8,["modelValue","errorMessage"]),v(di,{charactersLeft:h.value,errorMessage:H(c)},null,8,["charactersLeft","errorMessage"])])]))}},tl=/^[\sa-zA-ZÃäöüÃÃÃ-]*$/,rl=/^\d{5}$/,al=Fs({street:ge().nullable().required("Bitte gib eine gültige StraÃe ein"),house_number:ge().nullable().required("Bitte gib eine gültige Hausnummer ein"),postal_code:ge().nullable().required("Bitte gib eine gültige Postleitzahl ein").matches(rl,"Postleitzahl ist nicht gültig"),radius:mi().transform(r=>isNaN(r)?void 0:r).nullable().required("Bitte gib einen gültigen Umkreis ein").min(1,"Umkreis muss mindestens 1 km betragen"),city:ge().nullable().required("Zu dieser Postleitzahl konnte kein Ort gefunden werden.").matches(tl,"Stadt ist nicht gültig")}),sl={class:"flex flex-col gap-y-4 md:gap-y-6"},il={class:"grid grid-cols-1 md:grid-cols-3 gap-y-4 md:flex-row md:gap-x-8"},nl={class:"mt-4"},ll={__name:"EditLocation",props:{additionalInfo:{type:Object,default:()=>{}}},emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=e,s=Or(),i=xe(),n=r;I([{value:1,label:"Deutschland"}]),I({value:1,label:"Deutschland"});const{handleSubmit:u,resetForm:m}=$e({validationSchema:al}),c=I(""),l=I(!1),h=I(""),f=I("");oe(async()=>{await m(),y.value=n.additionalInfo.street,q.value=n.additionalInfo.house_number,O.value=n.additionalInfo.postal_code,c.value=n.additionalInfo.postal_code,U.value=n.additionalInfo.city,z.value=n.additionalInfo.radius});const b=I(!0),{errorMessage:D,value:y}=ve("street"),k=I(!0),{errorMessage:w,value:q}=ve("house_number"),j=I(!0),{errorMessage:A,value:O}=ve("postal_code"),E=I(!0),{errorMessage:V,value:U}=ve("city"),N=I(!0),{value:z,errorMessage:R}=ve("radius"),P=_=>typeof _!="string"?!1:!isNaN(_)&&!isNaN(parseFloat(_));be(O,_=>{if(O.value&&O.value.length==5&&P(O.value)&&O.value!=c.value){l.value=!0;const{onResult:d}=fi(vi,{postalCode:O.value},{fetchPolicy:"no-cache"});d(g=>{c.value=O.value;let T=g.data.getCityAndLocationFromPostalCode;U.value=T.city,h.value=T.lat,f.value=T.lng,l.value=!1})}});const x=()=>{u(_=>{S().then(()=>{a("closeEdit")})}).call()},S=u(_=>{s.update({..._,radius:z.value.toString(),lat:h.value,lng:f.value}).then(()=>{i.refresh()})});return t({saveChanges:x}),(_,d)=>(p(),C("div",sl,[d[17]||(d[17]=o("div",{class:"flex flex-col gap-y-4 md:flex-row md:gap-x-8 md:items-end"},[o("p",{class:"text-sm md:flex-1"}," Wir respektieren Deine Privatsphäre. Deinen Kunden werden nur Deine Stadt und Dein Land angezeigt. ")],-1)),v(ye,{modelValue:H(y),"onUpdate:modelValue":d[
70]||(d[0]=g=>me(y)?y.value=g:null),errorMessage:b.value?H(D):null,label:"StraÃe",required:"",onFocus:d[1]||(d[1]=g=>b.value=!1),onFocusout:d[2]||(d[2]=g=>b.value=!0)},null,8,["modelValue","errorMessage"]),o("div",il,[o("div",null,[v(ye,{modelValue:H(q),"onUpdate:modelValue":d[3]||(d[3]=g=>me(q)?q.value=g:null),errorMessage:k.value?H(w):null,class:"md:flex-1",label:"Hausnummer",required:"",onFocus:d[4]||(d[4]=g=>k.value=!1),onFocusout:d[5]||(d[5]=g=>k.value=!0)},null,8,["modelValue","errorMessage"])]),o("div",null,[v(ye,{modelValue:H(O),"onUpdate:modelValue":d[6]||(d[6]=g=>me(O)?O.value=g:null),errorMessage:j.value?H(A):null,class:"md:flex-1",label:"Postleitzahl",required:"",onFocus:d[7]||(d[7]=g=>j.value=!1),onFocusout:d[8]||(d[8]=g=>j.value=!0)},null,8,["modelValue","errorMessage"])]),o("div",null,[v(ye,{modelValue:H(U),"onUpdate:modelValue":d[9]||(d[9]=g=>me(U)?U.value=g:null),errorMessage:E.value?H(V):null,class:"md:flex-1",label:"Stadt",required:"",onFocus:d[10]||(d[10]=g=>E.value=!1),onFocusout:d[11]||(d[11]=g=>E.value=!0)},null,8,["modelValue","errorMessage"])])]),o("div",nl,[d[15]||(d[15]=o("h3",{class:"headline text-base"}," Umkreis in dem Du tätig sein möchtest ",-1)),d[16]||(d[16]=o("p",{class:"text-sm mt-1 mb-3"}," In welchem Umkreis möchtest Du Deine Vor-Ort-Services anbieten? Deine Online-Services sind von dieser Einstellung nicht betroffen ",-1)),v(ye,{modelValue:H(z),"onUpdate:modelValue":d[12]||(d[12]=g=>me(z)?z.value=g:null),errorMessage:N.value?H(R):null,label:"Umkreis in Kilometer",min:"0",type:"number",onFocus:d[13]||(d[13]=g=>N.value=!1),onFocusout:d[14]||(d[14]=g=>N.value=!0)},null,8,["modelValue","errorMessage"])])]))}},ol={__name:"AddVideoIntroduction",props:{selfDescription:{type:Object,default:()=>{}}},emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=e,s=Pe(),i=r,n=I(null);return oe(()=>{i.selfDescription&&i.selfDescription.video_url&&(n.value=i.selfDescription.video_url)}),t({saveChanges:()=>{let m={...i.selfDescription,video:n.value};delete m.id,delete m.video_url,s.update(m).then(()=>{s.index(),a("closeEdit")})}}),(m,c)=>(p(),B(Bi,{filled:"",modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=l=>n.value=l)},null,8,["modelValue"]))}},ul={__name:"PhotoGalleryUpload",emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=e,s=$r(),i=I([]);return oe(()=>{s.index().then(()=>{i.value=s.list})}),t({saveChanges:async()=>{const u=i.value.map(m=>{const c={};return m?.id&&(c.id=parseInt(m.id?.toString())),m?.uuid&&(c.uuid=m.uuid),c});await s.update(u),await s.index(),a("closeEdit")}}),(u,m)=>(p(),C("div",null,[v(Gi,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=c=>i.value=c),maxItems:10,"allow-pdf":!0},null,8,["modelValue"])]))}},cl={class:"flex flex-col"},dl={class:"mt-5 w-full flex flex-col gap-y-2 items-end"},We=5e3,Qr=100,ml={__name:"EditOverview",props:{selfDescription:{type:Object,default:()=>{}}},emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=Pe(),s=e,i=r,n={description:ge().nullable().test("minVisibleLength",`Deine Beschreibung ist zu kurz. Sie sollte mindestens ${Qr} Zeichen lang sein. `,f=>f==null||Dr(f)>=Qr).test("maxVisibleLength",`darf höchstens ${We} Zeichen lang sein`,f=>Dr(f)<=We)},{handleSubmit:u,resetForm:m}=$e({validationSchema:n}),{errorMessage:c,value:l}=ve("description");oe(async()=>{await m(),i.selfDescription&&(l.value=i.selfDescription.self_description)});const h=u(()=>{let f=i.selfDescription;return f||(f={self_title:"",self_description:""}),f.self_description=l.value,delete f.video_url,delete f.video,delete f.id,a.update(f).then(()=>{s("closeEdit")})});return t({saveChanges:h}),(f,b)=>(p(),C("div",cl,[b[1]||(b[1]=hi('<p class="text-sm text-headline font-medium tracking-wide"> Beschreibe hier, über welche Erfahrungen und Fähigkeiten Du verfügst, die Deine Kunden benötigen könnten. </p><ul class="ml-5 list-disc mt-2 gap-y-2"><li class="text-sm text-primary tracking-wide"> Beschreibe Deine Stärken und Fähigkeiten </li><li class="text-sm text-primary tracking-wide"> Erzähle etwas über Deine Projekte und Deine Ausbildung </li><li class="text-sm text-primary tracking-wide"> Halte Deine Beschreibung kurz und fehlerfrei </li></ul>',2)),o("div",dl,[v(Ns,{modelValue:H(l),"onUpdate:modelValue":b[0]||(b[0]=D=>me(l)?l.value=D:null),class:"w-full",height:"211px","with-link":"",placeholder:"Gib Deinen Text ein....","with-letter-counter"
7:"",max:We,"letter-counter-props":{class:"font-normal"},"error-message-prop":H(c)},null,8,["modelValue","error-message-prop"])])]))}},fl={class:"text-sm tracking-wide"},vl={class:"font-medium text-headline"},hl={__name:"DeleteServiceOffer",props:{categoryServices:{type:[String,Number,Boolean,Object,Array],default:null}},emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=e,s=Se(),i=r;return t({saveChanges:()=>{s.deleteUserServiceCategory(i.categoryServices.id).then(()=>{s.fetch().then(()=>{a("closeEdit")})})}}),(u,m)=>(p(),C("div",null,[o("p",fl,[m[0]||(m[0]=o("span",null,"Bist Du sicher, dass Du die gesamte Kategorie ",-1)),o("span",vl,ne(r.categoryServices.name),1),m[1]||(m[1]=o("span",null," in Deinem Profil entfernen möchtest?",-1))])]))}},pl={};function gl(r,t){return p(),C("div",null,t[0]||(t[0]=[o("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M12.75 24.3333L11.5 29.3333L9.83333 31H23.1667L21.5 29.3333L20.25 24.3333M1.5 17.6667H31.5M4.83333 24.3333H28.1667C30.0076 24.3333 31.5 22.8409 31.5 21V4.33333C31.5 2.49238 30.0076 1 28.1667 1H4.83333C2.99238 1 1.5 2.49238 1.5 4.33333V21C1.5 22.8409 2.99238 24.3333 4.83333 24.3333Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))}const _l=ke(pl,[["render",gl]]),bl={};function yl(r,t){return p(),C("div",null,t[0]||(t[0]=[o("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M9.83333 19.3333V24.3333M16.5 19.3333V24.3333M23.1667 19.3333V24.3333M1.5 31H31.5M1.5 12.6667H31.5M1.5 7.66667L16.5 1L31.5 7.66667M3.16667 12.6667H29.8333V31H3.16667V12.6667Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))}const xl=ke(bl,[["render",yl]]),Sl={},Cl={width:"26",height:"32",viewBox:"0 0 26 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wl(r,t){return p(),C("svg",Cl,t[0]||(t[0]=[o("path",{d:"M8.00016 16H18.0002M8.00016 22.6667H18.0002M21.3335 31H4.66683C2.82588 31 1.3335 29.5076 1.3335 27.6667V4.33333C1.3335 2.49238 2.82588 1 4.66683 1H13.9765C14.4185 1 14.8424 1.17559 15.155 1.48816L24.1787 10.5118C24.4912 10.8244 24.6668 11.2483 24.6668 11.6904V27.6667C24.6668 29.5076 23.1744 31 21.3335 31Z",stroke:"#557091","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Tl=ke(Sl,[["render",wl]]),ql={class:"flex gap-[1.5rem] 3xs:flex-col md:flex-row items-stretch"},kl={class:"col-span-2 md:col-span-1 cursor-pointer flex justify-center rounded-[12px] bg-feta hover:bg-secondary/10 border border-secondary/20 hover:border-secondary/50 w-full h-full min-h-[150px]"},Pl={class:"col-span-2 md:col-span-1 flex justify-center rounded-[12px] border-headline/10 hover:border-headline/40 border bg-primary/5 hover:bg-primary/10 w-full h-full min-h-[150px]"},Al=["disabled"],Dl={class:"col-span-2 md:col-span-1 flex justify-center rounded-[12px] bg-gold/[.12] hover:bg-gold/20 border border-gold/20 hover:border-gold/50 w-full min-h-[150px]"},Vl={class:"flex flex-col justify-center items-center p-4 space-y-[13px] w-full h-full cursor-pointer disabled:cursor-not-allowed"},Il={class:"mt-5"},El={__name:"AddTradeLicensePopup",emits:["selectTradeLicenseFile"],setup(r,{expose:t,emit:e}){const a=Mr(),i=Hs().company?.small_buisness,n=$(()=>a.result||[]),u=e;return t({saveChanges:()=>{}}),(c,l)=>{const h=we("router-link");return p(),C("div",null,[o("div",ql,[o("div",kl,[o("button",{onClick:l[0]||(l[0]=f=>u("selectTradeLicenseFile")),class:"flex flex-col justify-center items-center w-full h-full p-8 space-y-[25px]"},[v(_l,{class:""}),l[1]||(l[1]=o("p",{class:"font-medium text-headline text-base md:text-[18px] md:leading-[26px]"}," Vom lokalen Gerät hochladen ",-1))])]),o("div",Pl,[v(h,{to:n.value.length>=5?"#":"/trade-license/request"},{default:M(()=>[o("button",{disabled:n.value.length>=5,class:"flex flex-col justify-center items-center w-full h-full cursor-pointer disabled:cursor-not-allowed p-8 space-y-[25px]"},[v(xl,{class:""}),l[2]||(l[2]=o("p",{class:"font-medium text-headline text-base md:text-[18px] md:leading-[26px]"}," Gewerbeschein beantragen ",-1))],8,Al)]),_:1},8,["to"])]),le(o("div",Dl,[v(h,{to:"/tax-form/request"},{default:M(()=>[o("button",Vl,[v(Tl,{class:""}),l[3]||(l[3]=o("p",{class:"font-medium text-headline text-base md:text-[18px] md:leading-[26px]"}," Zuteilung der Steuernummer beantragen ",-1))])]),_:1}
7)],512),[[ue,H(i)]])]),le(o("p",Il," Du hast die maximale Anzahl von Anträgen für einen Gewerbeschein erreicht. ",512),[[ue,n.value.length>=5]])])}}},$l={__name:"SelectTradeLicensePopup",emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=Ir(),s=Se(),i=I(),n=I(),u=e;a.getTradeLicenseFiles();const m=$(()=>a.tradeLicenseFiles.length),c=h=>{n.value=!1,h&&Object.keys(h).length+m.value>10&&(n.value="Es dürfen maximal 10 Gewerbescheine hochgeladen werden.")};return t({saveChanges:()=>{c(i.value),!n.value&&a.uploadTradeLicenseFiles(i.value).then(()=>{a.getTradeLicenseFiles(),s.fetch().then(()=>{u("closeEdit")})})}}),(h,f)=>(p(),C("div",null,[v(Ni,{previewHeadline:"Hochgeladene Datei",allowPdf:"",modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=b=>i.value=b),maxErrorMessage:n.value,previewContainerClasses:"md:flex! flex-wrap "},null,8,["modelValue","maxErrorMessage"])]))}},Ll={class:"flex flex-col max-w-full lg:max-h-[746px] lg:max-w-[800px]"},Ol={class:"pt-4 pb-3"},Rl={class:"relative mb-2"},Ml={class:"max-h-[30vh] lg:max-h-[300px] mr-1 overflow-y-auto"},jl=["onClick"],Fl={key:0,class:"inline-flex px-2 py-0.5 bg-gray-200 text-gray-700 text-sm rounded"},Hl={class:"grow-0 shrink-0 flex items-center"},Ul={class:"inline-flex space-x-0.5 items-center"},Bl={id:"servicesErrorMessage",class:"flex flex-col gap-y-2 w-full mt-6"},zl={key:0},Gl={class:"flex flex-wrap gap-x-5 gap-y-3 -mr-5"},Nl={key:1,class:"inline-flex space-x-0.5"},Kl={__name:"ProfileSelectService",props:{selectedCategories:{type:Array,default:()=>[]}},emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=Se(),s=Js(),i=xe(),n=r,u=e,m=I(""),c=I(!1),l=I(!1),h=I([]),f=I(!1),b=I(["1 - 2 Jahre","3 - 5 Jahre","mehr als 5 Jahre"]),D=I(!1),y=I([]),k=_=>JSON.parse(JSON.stringify(_)),w=_=>k(_??[]).filter(g=>!n.selectedCategories.includes(g.id)).map(g=>({id:g.id,name:g.name,experience:g.experience??"",experienceError:null,services:(g.services??[]).map(T=>({id:T.id,name:T.name,type:T.type}))})),q=$(()=>!!i?.user?.is_broker),j=$(()=>{const _=(m.value||"").trim().toLowerCase(),d=(h.value??[]).filter(g=>!n.selectedCategories.includes(g.id));return _?d.filter(g=>{const T=(g.name||"").toLowerCase().includes(_),K=(g.services||[]).some(Y=>(Y.name||"").toLowerCase().includes(_));return T||K}):d}),A=_=>!!j.value.find(d=>d.id===_.id),O=_=>{const d=(m.value||"").trim().toLowerCase();return d?(_.name||"").toLowerCase().includes(d):!0},E=_=>(_.services||[]).filter(d=>O(d)).length;oe(async()=>{try{await Promise.all([a.fetch(),s.index()])}catch{}y.value=w(a.categoriesWithServices),V()}),be(()=>a.categoriesWithServices,_=>{Array.isArray(_)&&_.length&&!y.value.length&&(y.value=w(_),V())},{deep:!0}),be(()=>s.list,()=>{h.value.length||V()},{deep:!0});const V=()=>{const _=(s.list??[]).filter(g=>!n.selectedCategories.includes(g.id)),d=new Map;for(const g of y.value)d.set(g.id,new Set(g.services?.map(T=>T.id)??[]));h.value=_.map(g=>{const T=d.get(g.id)??new Set,K=(g.services??[]).filter(J=>(J.helper&&i.isHelper||J.professional&&!i.isHelper)??!1).map(J=>({...k(J),selected:T.has(J.id)}
7)),Y=y.value.find(J=>J.id===g.id);return{...k(g),services:K,selected:K.some(J=>J.selected),showServices:!1,experience:Y?.experience||""}}).filter(g=>g.services&&g.services.length)},U=(_,d)=>{_.selected&&(h.value[d].showServices=!0),h.value[d].services.forEach((g,T)=>{O(g)&&(h.value[d].services[T].selected=_.selected)}),z()},N=(_,d,g)=>{const T=h.value[g];T.selected=T.services.some(K=>K.selected),z()},z=()=>{const _=h.value.filter(d=>d.selected).map(d=>({...d,services:d.services.filter(g=>g.selected)}));R(_)},R=_=>{y.value=_.map(d=>({id:d.id,name:d.name,services:d.services.map(g=>({id:g.id,name:g.name,type:g.type})),experience:d.experience||"",experienceError:null})),D.value=!1},P=(_,d)=>{y.value[_].experience=d,D.value&&x()},x=()=>{let _=!1;y.value=y.value.map(d=>d.experience?{...d,experienceError:null}:(_=!0,{...d,experienceError:"Error"})),D.value=_};return t({saveChanges:async()=>{if(x(),D.value)return;f.value=!0;const _=y.value.map(d=>({id:d.id,experience:d.experience,services:d.services.map(g=>g.id)}));try{await a.add(_),await a.fetch(),u("closeEdit")}catch{f.value=!1}}}),(_,d)=>(p(),C("div",Ll,[c.value?(p(),B(Pi,{key:0,open:c.value,type:"Service",onClose:d[0]||(d[0]=g=>c.value=!1),onConfirm:d[1]||(d[1]=g=>{c.value=!1,l.value=!0})},null,8,["open"])):Z("",!0),v(Ai,{open:l.value,onClose:d[2]||(d[2]=g=>l.value=!1)},null,8,["open"]),o("div",null,[v(Ie,{text:"Bitte überprüfe, ob Dein Gewerbeschein im Profil auch für die neu hinzugefügten Services gültig ist oder lade einen neuen Gewerbeschein hoch."}),o("div",Ol,[v(_e,{error:D.value,required:""},{default:M(()=>d[5]||(d[5]=[se(" 1. Wähle die Services aus ",-1)])),_:1,__:[5]},8,["error"])]),o("div",Rl,[v(Ks,{class:"absolute top-2 left-3"}),le(o("input",{"onUpdate:modelValue":d[3]||(d[3]=g=>m.value=g),class:"text-sm w-full text-headline tracking-wide pl-10 pr-3 py-2 border border-light-grey rounded-md placeholder:text-light-grey focus:ring-0 focus:outline-hidden focus:border-primary/30 invalid:border-error invalid:focus:border-error",placeholder:"Schnelle Suche nach einem Service",type:"text"},null,512),[[Us,m.value]])])]),o("div",Ml,[(p(!0),C(W,null,ae(h.value,(g,T)=>le((p(),C("div",{key:`service-category-${g.id}`},[o("div",{class:he([h.value[T].selected?"bg-light-green-5":"","py-3 flex justify-between items-center"])},[v(Ar,{modelValue:h.value[T].selected,"onUpdate:modelValue":K=>h.value[T].selected=K,label:g.name,onChange:K=>U(g,T)},null,8,["modelValue","onUpdate:modelValue","label","onChange"]),le(o("span",{class:"mr-[18px] cursor-pointer",onClick:K=>h.value[T].showServices=!h.value[T].showServices},[h.value[T].showServices||m.value&&m.value.length?(p(),B(Ki,{key:0})):(p(),B(Wi,{key:1}))],8,jl),[[ue,!m.value.length||E(g)>0]])],2),(p(!0),C(W,null,ae(g.services,(K,Y)=>le((p(),C("div",{key:`service-${K.id}`,class:he([h.value[T].services[Y].selected?"bg-light-green-5":"","py-2 ml-8"])},[v(Ar,{modelValue:h.value[T].services[Y].selected,"onUpdate:modelValue":J=>h.value[T].services[Y].selected=J,label:K.name+" "+(K.type==="IN_PERSON"?"(Vor Ort)":"(Online)"),onChange:J=>N(K,Y,T)},null,8,["modelValue","onUpdate:modelValue","label","onChange"]),K.is_broker_available&&q.value?(p(),C("span",Fl,[d[6]||(d[6]=o("span",{class:"grow pr-1"},"Provisionsgeschäft möglich",-1)),o("span",Hl,[v(Bs,{class:"w-4 h-4"})])])):Z("",!0)],2)),[[ue,(h.value[T].showServices||m.value&&m.value.length)&&A(g)&&O(K)]])),128))])),[[ue,A(g)]])),128))]),d[10]||(d[10]=o("div",{class:"border-b pt-6 mb-2 h-px"},null,-1)),o("div",Ul,[d[7]||(d[7]=o("p",{class:"text-xs"},"Deine Services nicht gefunden?",-1)),v(ie,{label:"Neuen Service hinzufügen",variant:"link",size:"xs",onClick:d[4]||(d[4]=pi(g=>c.value=!0,["prevent"]))})]),o("div",Bl,[v(_e,{error:D.value,required:""},{default:M(()=>d[8]||(d[8]=[se(" 2. Wähle Deine Erfahrung aus ",-1)])),_:1,__:[8]},8,["error"]),y.value.length?(p(),C("div",zl,[(p(!0),C(W,null,ae(y.value,(g,T)=>(p(),C("div",{key:`selected-category-${g.id}`,class:"my-2"},[v(_e,{error:y.value[T].experienceError,class:"text-sm! font-medium!"},{default:M(()=>[se(ne(g.name),1)]),_:2},1032,["error"]),o("div",Gl,[(p(!0),C(W,null,ae(b.value,(K,Y)=>(p(),B(zs,{key:`option-${T}-${Y}`,modelValue:y.value[T].experience,"onUpdate:modelValue":J=>
7y.value[T].experience=J,label:K,onClick:J=>P(T,K)},null,8,["modelValue","onUpdate:modelValue","label","onClick"]))),128))])]))),128))])):(p(),C("div",Nl,[v(Ws,{class:"w-4 h-4 text-primary mr-1"}),d[9]||(d[9]=o("p",{class:"text-xs"}," Sobald Du Services ausgewählt hast, kannst Du hier Deine Erfahrung für einzelne Kategorien eingeben. ",-1))]))])]))}},Wl={class:"flex flex-col max-w-full lg:max-h-[746px] lg:max-w-[800px]"},Jl={class:"pb-3"},Zl={class:"relative mb-2"},Ql={class:"max-h-[30vh] lg:max-h-[300px] mr-1 overflow-y-auto"},Yl={class:"py-3 flex justify-between items-center"},Xl=["for"],eo={class:"text-headline text-base font-medium ml-3"},to={key:0,class:"inline-flex px-2 py-0.5 bg-gray-200 text-gray-700 text-sm rounded"},ro={class:"grow-0 shrink-0 flex items-center"},ao={id:"servicesErrorMessage",class:"flex flex-col gap-y-2 w-full mt-6"},so={key:0},io={class:"flex flex-wrap gap-x-5 gap-y-3 -mr-5"},no={key:1,class:"inline-flex space-x-0.5"},lo={__name:"ProfileEditCategoryServices",props:{categoryServices:{type:Object,default:()=>({id:null,name:"",services:[]})}},emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=Se(),s=Js(),i=xe(),n=r,u=e,m=I(""),c=I([]),l=I(!1),h=I(["1 - 2 Jahre","3 - 5 Jahre","mehr als 5 Jahre"]),f=I(!1),b=I([]),D=P=>JSON.parse(JSON.stringify(P)),y=P=>D(P??[]).map(S=>({id:S.id,name:S.name,experience:S.experience??"",experienceError:null,services:(S.services??[]).map(_=>({id:_.id,name:_.name,type:_.type}))})),k=$(()=>!!i?.user?.is_broker),w=$(()=>{const P=(c.value??[]).filter(S=>S.id===n.categoryServices.id),x=(m.value||"").trim().toLowerCase();return x?P.map(S=>({...S,services:S.services.filter(_=>(_.name||"").toLowerCase().includes(x))})).filter(S=>S.services.length>0):P}),q=P=>!!w.value.find(x=>x.id===P.id),j=P=>{const x=(m.value||"").trim().toLowerCase();return x?(P.name||"").toLowerCase().includes(x):!0};oe(async()=>{try{await Promise.all([a.fetch(),s.index()])}catch{}b.value=y(a.categoriesWithServices),A()}),be(()=>a.categoriesWithServices,P=>{Array.isArray(P)&&P.length&&!b.value.length&&(b.value=y(P),A())},{deep:!0}),be(()=>s.list,()=>{c.value.length||A()},{deep:!0});const A=()=>{const P=(s.list??[]).filter(S=>S.id===n.categoryServices.id),x=new Map;for(const S of b.value)x.set(S.id,new Set(S.services?.map(_=>_.id)??[]));c.value=P.map(S=>{const _=x.get(S.id)??new Set,d=(S.services??[]).filter(T=>(T.helper&&i.isHelper||T.professional&&!i.isHelper)??!1).map(T=>({...D(T),selected:_.has(T.id)})),g=b.value.find(T=>T.id===S.id);return{...D(S),services:d,selected:d.some(T=>T.selected),showServices:!0,experience:g?.experience||""}}).filter(S=>S.services&&S.services.length)},O=P=>c.value.findIndex(x=>x.id===P),E=(P,x,S)=>{const _=c.value[S];_.selected=_.services.some(d=>d.selected),V()},V=()=>{const P=c.value.filter(x=>x.selected).map(x=>({...x,services:x.services.filter(S=>S.selected)}));U(P)},U=P=>{b.value=P.map(x=>({id:x.id,name:x.name,services:x.services.map(S=>({id:S.id,name:S.name,type:S.type})),experience:x.experience||"",experienceError:null})),f.value=!1},N=(P,x)=>{b.value[P].experience=x,f.value&&z()},z=()=>{let P=!1;b.value=b.value.map(x=>x.experience?{...x,experienceError:null}:(P=!0,{...x,experienceError:"Error"})),f.value=P};return t({saveChanges:async()=>{if(z(),f.value)return;l.value=!0;const P=b.value.map(x=>({id:x.id,experience:x.experience,services:x.services.map(S=>S.id)}));try{P.length===0?await a.deleteUserServiceCategory(n.categoryServices.id):await a.add(P),await a.fetch(),u("closeEdit")}catch{l.value=!1}}}),(P,x)=>(p(),C("div",Wl,[o("div",null,[o("div",Jl,[v(_e,{error:f.value,required:""},{default:M(()=>x[1]||(x[1]=[se(" 1. Wähle die Services aus ",-1)])),_:1,__:[1]},8,["error"])]),o("div",Zl,[v(Ks,{class:"absolute top-2 left-3 hidden"}),le(o("input",{"onUpdate:modelValue":x[0]||(x[0]=S=>m.value=S),class:"text-sm w-full hidden text-headline tracking-wide pl-10 pr-3 py-2 border border-light-grey rounded-md placeholder:text-light-grey focus:ring-0 focus:outline-hidden focus:border-primary/30 invalid:border-error invalid:focus:border-error",placeholder:"Schnelle Suche nach einem Service",type:"text"},null,512),[[Us,m.value]])])]),o("div",Ql,[(p(!0),C(W,null,ae(c.value,S=>le((p(),C("div",{key:`service-category-${S.id}`},[o("div",Yl,[o("label",{for:`service-category-${S.id}`,class:"w-full"},[o("span",eo,ne(S.name),1)],8,Xl)]),(p(!0),C(W,null,ae(S.services,(_,d)=>le((p(),C("div",{key:`service-${_.id}`,class:"py-2 ml-8 flex items-start"},[v(Ar,{modelValue:S.services[d].selected,"onUpdate:modelValue":g=>S.services[d].selected=g,label:_.name+" "+(_.type==="IN_PERSON"?"(Vor Ort)":"(Online)"),onChange:g=>E(_,d,O(S.id))},null,8,["modelValue","onUpdate:modelValue","label","onChange"]),_.is_broker_available&&k.value?(p(),C("span",to,[x[2]||(x[2]=o("span",{class:"grow pr-1"},"Provisionsgeschäft möglich",-1)),o("span",ro,[v(Bs,{class:"w-4 h-4"})])])):Z("",!0)])),[[ue,S.showServices&&q(S)&&j(_)]])),128))])),[[ue,q(S)]])),128))]),x[5]||(x[5]=o("div",{class:"border-b pt-6 mb-2 h-px"},null,-1)),o("div",ao,[v(_e,{error:f.value,required:""},{default:M(()=>x[3]||(x[3]=[se(" 2. Wähle Deine Erfahrung aus ",-1)])),_:1,__:[3]},8,["error"]),b.value.length?(p(),C("div",so,[(p(!0),C(W,null,ae(b.value,(S,_)=>le((p(),C("div",{key:`selected-category-${S.id}`,class:"my-2"},[v(_e,{error:b.value[_].experienceError,class:"text-sm! font-medium!"},{default:M(()=>[se(ne(S.name),1)]),_:2},1032,["error"]),o("div",io,[(p(!0),C(W,null,ae(h.value,(d,g)=>(p(),B(zs,{key:`option-${_}-${g}`,modelValue:b.value[_].experience,"onUpdate:modelValue":T=>
7b.value[_].experience=T,label:d,onClick:T=>N(_,d)},null,8,["modelValue","onUpdate:modelValue","label","onClick"]))),128))])])),[[ue,q(S)]])),128))])):(p(),C("div",no,[v(Ws,{class:"w-4 h-4 text-primary mr-1"}),x[4]||(x[4]=o("p",{class:"text-xs"}," Sobald Du Services ausgewählt hast, kannst Du hier Deine Erfahrung für einzelne Kategorien eingeben. ",-1))]))])]))}};var Je,Yr;function oo(){if(Yr)return Je;Yr=1;function r(){this.__data__=[],this.size=0}return Je=r,Je}var Ze,Xr;function Zs(){if(Xr)return Ze;Xr=1;function r(t,e){return t===e||t!==t&&e!==e}return Ze=r,Ze}var Qe,ea;function Le(){if(ea)return Qe;ea=1;var r=Zs();function t(e,a){for(var s=e.length;s--;)if(r(e[s][0],a))return s;return-1}return Qe=t,Qe}var Ye,ta;function uo(){if(ta)return Ye;ta=1;var r=Le(),t=Array.prototype,e=t.splice;function a(s){var i=this.__data__,n=r(i,s);if(n<0)return!1;var u=i.length-1;return n==u?i.pop():e.call(i,n,1),--this.size,!0}return Ye=a,Ye}var Xe,ra;function co(){if(ra)return Xe;ra=1;var r=Le();function t(e){var a=this.__data__,s=r(a,e);return s<0?void 0:a[s][1]}return Xe=t,Xe}var et,aa;function mo(){if(aa)return et;aa=1;var r=Le();function t(e){return r(this.__data__,e)>-1}return et=t,et}var tt,sa;function fo(){if(sa)return tt;sa=1;var r=Le();function t(e,a){var s=this.__data__,i=r(s,e);return i<0?(++this.size,s.push([e,a])):s[i][1]=a,this}return tt=t,tt}var rt,ia;function Oe(){if(ia)return rt;ia=1;var r=oo(),t=uo(),e=co(),a=mo(),s=fo();function i(n){var u=-1,m=n==null?0:n.length;for(this.clear();++u<m;){var c=n[u];this.set(c[0],c[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=e,i.prototype.has=a,i.prototype.set=s,rt=i,rt}var at,na;function vo(){if(na)return at;na=1;var r=Oe();function t(){this.__data__=new r,this.size=0}return at=t,at}var st,la;function ho(){if(la)return st;la=1;function r(t){var e=this.__data__,a=e.delete(t);return this.size=e.size,a}return st=r,st}var it,oa;function po(){if(oa)return it;oa=1;function r(t){return this.__data__.get(t)}return it=r,it}var nt,ua;function go(){if(ua)return nt;ua=1;function r(t){return this.__data__.has(t)}return nt=r,nt}var lt,ca;function Qs(){if(ca)return lt;ca=1;var r=typeof Ve=="object"&&Ve&&Ve.Object===Object&&Ve;return lt=r,lt}var ot,da;function ce(){if(da)return ot;da=1;var r=Qs(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=r||t||Function("return this")();return ot=e,ot}var ut,ma;function jr(){if(ma)return ut;ma=1;var r=ce(),t=r.Symbol;return ut=t,ut}var ct,fa;function _o(){if(fa)return ct;fa=1;var r=jr(),t=Object.prototype,e=t.hasOwnProperty,a=t.toString,s=r?r.toStringTag:void 0;function i(n){var u=e.call(n,s),m=n[s];try{n[s]=void 0;var c=!0}catch{}var l=a.call(n);return c&&(u?n[s]=m:delete n[s]),l}return ct=i,ct}var dt,va;function bo(){if(va)return dt;va=1;var r=Object.prototype,t=r.toString;function e(a){return t.call(a)}return dt=e,dt}var mt,ha;function Re(){if(ha)return mt;ha=1;var r=jr(),t=_o(),e=bo(),a="[object Null]",s="[object Undefined]",i=r?r.toStringTag:void 0;function n(u){return u==null?u===void 0?s:a:i&&i in Object(u)?t(u):e(u)}return mt=n,mt}var ft,pa;function Ys(){if(pa)return ft;pa=1;function r(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}return ft=r,ft}var vt,ga;function Xs(){if(ga)return vt;ga=1;var r=Re(),t=Ys(),e="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",i="[object Proxy]";function n(u){if(!t(u))return!1;var m=r(u);return m==a||m==s||m==e||m==i}return vt=n,vt}var ht,_a;function yo(){if(_a)return ht;_a=1;var r=ce(),t=r["__core-js_shared__"];return ht=t,ht}var pt,ba;function xo(){if(ba)return pt;ba=1;var r=yo(),t=(function(){var a=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function e(a){return!!t&&t in a}return pt=e,pt}var gt,ya;function ei(){if(ya)return gt;ya=1;var r=Function.prototype,t=r.toString;function e(a){if(a!=null){try{return t.call(a)}catch{}try{return a+""}catch{}}return""}return gt=e,gt}var _t,xa;function So(){if(xa)return _t;xa=1;var r=Xs(),t=xo(),e=Ys(),a=ei(),s=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,n=Function.prototype,u=Object.prototype,m=n.toString,c=u.hasOwnProperty,l=RegExp("^"+m.call(c).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(f){if(!e(f)||t(f))return!1;var b=r(f)?l:i;return b.test(a(f))}return _t=h,_t}var bt,Sa;function Co(){if(Sa)return bt;Sa=1;function r(t,e){return t?.[e]}return bt=r,bt}var yt,Ca;
vendor: 5,354 bytes, line 7
7function Ce(){if(Ca)return yt;Ca=1;var r=So(),t=Co();function e(a,s){var i=t(a,s);return r(i)?i:void 0}return yt=e,yt}var xt,wa;function Fr(){if(wa)return xt;wa=1;var r=Ce(),t=ce(),e=r(t,"Map");return xt=e,xt}var St,Ta;function Me(){if(Ta)return St;Ta=1;var r=Ce(),t=r(Object,"create");return St=t,St}var Ct,qa;function wo(){if(qa)return Ct;qa=1;var r=Me();function t(){this.__data__=r?r(null):{},this.size=0}return Ct=t,Ct}var wt,ka;function To(){if(ka)return wt;ka=1;function r(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}return wt=r,wt}var Tt,Pa;function qo(){if(Pa)return Tt;Pa=1;var r=Me(),t="__lodash_hash_undefined__",e=Object.prototype,a=e.hasOwnProperty;function s(i){var n=this.__data__;if(r){var u=n[i];return u===t?void 0:u}return a.call(n,i)?n[i]:void 0}return Tt=s,Tt}var qt,Aa;function ko(){if(Aa)return qt;Aa=1;var r=Me(),t=Object.prototype,e=t.hasOwnProperty;function a(s){var i=this.__data__;return r?i[s]!==void 0:e.call(i,s)}return qt=a,qt}var kt,Da;function Po(){if(Da)return kt;Da=1;var r=Me(),t="__lodash_hash_undefined__";function e(a,s){var i=this.__data__;return this.size+=this.has(a)?0:1,i[a]=r&&s===void 0?t:s,this}return kt=e,kt}var Pt,Va;function Ao(){if(Va)return Pt;Va=1;var r=wo(),t=To(),e=qo(),a=ko(),s=Po();function i(n){var u=-1,m=n==null?0:n.length;for(this.clear();++u<m;){var c=n[u];this.set(c[0],c[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=e,i.prototype.has=a,i.prototype.set=s,Pt=i,Pt}var At,Ia;function Do(){if(Ia)return At;Ia=1;var r=Ao(),t=Oe(),e=Fr();function a(){this.size=0,this.__data__={hash:new r,map:new(e||t),string:new r}}return At=a,At}var Dt,Ea;function Vo(){if(Ea)return Dt;Ea=1;function r(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}return Dt=r,Dt}var Vt,$a;function je(){if($a)return Vt;$a=1;var r=Vo();function t(e,a){var s=e.__data__;return r(a)?s[typeof a=="string"?"string":"hash"]:s.map}return Vt=t,Vt}var It,La;function Io(){if(La)return It;La=1;var r=je();function t(e){var a=r(this,e).delete(e);return this.size-=a?1:0,a}return It=t,It}var Et,Oa;function Eo(){if(Oa)return Et;Oa=1;var r=je();function t(e){return r(this,e).get(e)}return Et=t,Et}var $t,Ra;function $o(){if(Ra)return $t;Ra=1;var r=je();function t(e){return r(this,e).has(e)}return $t=t,$t}var Lt,Ma;function Lo(){if(Ma)return Lt;Ma=1;var r=je();function t(e,a){var s=r(this,e),i=s.size;return s.set(e,a),this.size+=s.size==i?0:1,this}return Lt=t,Lt}var Ot,ja;function ti(){if(ja)return Ot;ja=1;var r=Do(),t=Io(),e=Eo(),a=$o(),s=Lo();function i(n){var u=-1,m=n==null?0:n.length;for(this.clear();++u<m;){var c=n[u];this.set(c[0],c[1])}}return i.prototype.clear=r,i.prototype.delete=t,i.prototype.get=e,i.prototype.has=a,i.prototype.set=s,Ot=i,Ot}var Rt,Fa;function Oo(){if(Fa)return Rt;Fa=1;var r=Oe(),t=Fr(),e=ti(),a=200;function s(i,n){var u=this.__data__;if(u instanceof r){var m=u.__data__;if(!t||m.length<a-1)return m.push([i,n]),this.size=++u.size,this;u=this.__data__=new e(m)}return u.set(i,n),this.size=u.size,this}return Rt=s,Rt}var Mt,Ha;function Ro(){if(Ha)return Mt;Ha=1;var r=Oe(),t=vo(),e=ho(),a=po(),s=go(),i=Oo();function n(u){var m=this.__data__=new r(u);this.size=m.size}return n.prototype.clear=t,n.prototype.delete=e,n.prototype.get=a,n.prototype.has=s,n.prototype.set=i,Mt=n,Mt}var jt,Ua;function Mo(){if(Ua)return jt;Ua=1;var r="__lodash_hash_undefined__";function t(e){return this.__data__.set(e,r),this}return jt=t,jt}var Ft,Ba;function jo(){if(Ba)return Ft;Ba=1;function r(t){return this.__data__.has(t)}return Ft=r,Ft}var Ht,za;function Fo(){if(za)return Ht;za=1;var r=ti(),t=Mo(),e=jo();function a(s){var i=-1,n=s==null?0:s.length;for(this.__data__=new r;++i<n;)this.add(s[i])}return a.prototype.add=a.prototype.push=t,a.prototype.has=e,Ht=a,Ht}var Ut,Ga;function Ho(){if(Ga)return Ut;Ga=1;function r(t,e){for(var a=-1,s=t==null?0:t.length;++a<s;)if(e(t[a],a,t))return!0;return!1}return Ut=r,Ut}var Bt,Na;function Uo(){if(Na)return Bt;Na=1;function r(t,e){return t.has(e)}return Bt=r,Bt}var zt,Ka;function ri(){if(Ka)return zt;Ka=1;var r=Fo(),t=Ho(),e=Uo(),a=1,s=2;function i(n,u,m,c,l,h){var f=m&a,b=n.length,D=u.length;if(b!=D&&!(f&&D>b))return!1;var y=h.get(n),k=h.get(u);if(y&&k)return y==u&&k==n;var w=-1,q=!0,j=m&s?new r:void 0;for(h.set(n,u),h.set(u,n);++w<b;){var A=n[w],O=u[w];if(c)var E=f?c(O,A,w,u,n,h):c(A,O,w,n,u,h);if(E!==void 0){if(E)continue;q=!1;break}if(j){if(!t(u,function(V,U){if(!e(j,U)&&(A===V||l(A,V,m,c,h)))return j.push(U)})){q=!1;break}}else if(!(A===O||l(A,O,m,c,h))){q=!1;break}}return h.delete(n),h.delete(u),q}return zt=i,zt}var Gt,Wa;function Bo(){if(Wa)return Gt;Wa=1;var r=ce(),t=r.Uint8Array;return Gt=t,Gt}var Nt,Ja;function zo(){if(Ja)return Nt;Ja=1;function r(t){var e=-1,a=Array(t.size);return t.forEach(function(s,i){a[++e]=[i,s]}),a}return Nt=r,Nt}var Kt,Za;function Go(){if(Za)return Kt;Za=1;function r(t){var e=-1,a=Array(t.size);return t.forEach(function(s){a[++e]=s}),a}return Kt=r,Kt}var Wt,Qa;function No(){if(Qa)return Wt;Qa=1;var r=jr(),t=Bo(),e=Zs(),a=ri(),s=zo(),i=Go(),n=1,u=2,m="[object Boolean]",c="[object Date]",l="[object Error]",h="[object Map]",f="[object Number]",b="[object RegExp]",D="[object Set]",y="[object String]",k="[object Symbol]",w="[object ArrayBuffer]",q="[object DataView]",j=r?r.prototype:void 0,A=j?j.valueOf
vendor: 4,451 bytes, line 7
7:void 0;function O(E,V,U,N,z,R,P){switch(U){case q:if(E.byteLength!=V.byteLength||E.byteOffset!=V.byteOffset)return!1;E=E.buffer,V=V.buffer;case w:return!(E.byteLength!=V.byteLength||!R(new t(E),new t(V)));case m:case c:case f:return e(+E,+V);case l:return E.name==V.name&&E.message==V.message;case b:case y:return E==V+"";case h:var x=s;case D:var S=N&n;if(x||(x=i),E.size!=V.size&&!S)return!1;var _=P.get(E);if(_)return _==V;N|=u,P.set(E,V);var d=a(x(E),x(V),N,z,R,P);return P.delete(E),d;case k:if(A)return A.call(E)==A.call(V)}return!1}return Wt=O,Wt}var Jt,Ya;function Ko(){if(Ya)return Jt;Ya=1;function r(t,e){for(var a=-1,s=e.length,i=t.length;++a<s;)t[i+a]=e[a];return t}return Jt=r,Jt}var Zt,Xa;function Hr(){if(Xa)return Zt;Xa=1;var r=Array.isArray;return Zt=r,Zt}var Qt,es;function Wo(){if(es)return Qt;es=1;var r=Ko(),t=Hr();function e(a,s,i){var n=s(a);return t(a)?n:r(n,i(a))}return Qt=e,Qt}var Yt,ts;function Jo(){if(ts)return Yt;ts=1;function r(t,e){for(var a=-1,s=t==null?0:t.length,i=0,n=[];++a<s;){var u=t[a];e(u,a,t)&&(n[i++]=u)}return n}return Yt=r,Yt}var Xt,rs;function Zo(){if(rs)return Xt;rs=1;function r(){return[]}return Xt=r,Xt}var er,as;function Qo(){if(as)return er;as=1;var r=Jo(),t=Zo(),e=Object.prototype,a=e.propertyIsEnumerable,s=Object.getOwnPropertySymbols,i=s?function(n){return n==null?[]:(n=Object(n),r(s(n),function(u){return a.call(n,u)}))}:t;return er=i,er}var tr,ss;function Yo(){if(ss)return tr;ss=1;function r(t,e){for(var a=-1,s=Array(t);++a<t;)s[a]=e(a);return s}return tr=r,tr}var rr,is;function Fe(){if(is)return rr;is=1;function r(t){return t!=null&&typeof t=="object"}return rr=r,rr}var ar,ns;function Xo(){if(ns)return ar;ns=1;var r=Re(),t=Fe(),e="[object Arguments]";function a(s){return t(s)&&r(s)==e}return ar=a,ar}var sr,ls;function eu(){if(ls)return sr;ls=1;var r=Xo(),t=Fe(),e=Object.prototype,a=e.hasOwnProperty,s=e.propertyIsEnumerable,i=r((function(){return arguments})())?r:function(n){return t(n)&&a.call(n,"callee")&&!s.call(n,"callee")};return sr=i,sr}var Te={exports:{}},ir,os;function tu(){if(os)return ir;os=1;function r(){return!1}return ir=r,ir}Te.exports;var us;function ai(){return us||(us=1,(function(r,t){var e=ce(),a=tu(),s=t&&!t.nodeType&&t,i=s&&!0&&r&&!r.nodeType&&r,n=i&&i.exports===s,u=n?e.Buffer:void 0,m=u?u.isBuffer:void 0,c=m||a;r.exports=c})(Te,Te.exports)),Te.exports}var nr,cs;function ru(){if(cs)return nr;cs=1;var r=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function e(a,s){var i=typeof a;return s=s??r,!!s&&(i=="number"||i!="symbol"&&t.test(a))&&a>-1&&a%1==0&&a<s}return nr=e,nr}var lr,ds;function si(){if(ds)return lr;ds=1;var r=9007199254740991;function t(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=r}return lr=t,lr}var or,ms;function au(){if(ms)return or;ms=1;var r=Re(),t=si(),e=Fe(),a="[object Arguments]",s="[object Array]",i="[object Boolean]",n="[object Date]",u="[object Error]",m="[object Function]",c="[object Map]",l="[object Number]",h="[object Object]",f="[object RegExp]",b="[object Set]",D="[object String]",y="[object WeakMap]",k="[object ArrayBuffer]",w="[object DataView]",q="[object Float32Array]",j="[object Float64Array]",A="[object Int8Array]",O="[object Int16Array]",E="[object Int32Array]",V="[object Uint8Array]",U="[object Uint8ClampedArray]",N="[object Uint16Array]",z="[object Uint32Array]",R={};R[q]=R[j]=R[A]=R[O]=R[E]=R[V]=R[U]=R[N]=R[z]=!0,R[a]=R[s]=R[k]=R[i]=R[w]=R[n]=R[u]=R[m]=R[c]=R[l]=R[h]=R[f]=R[b]=R[D]=R[y]=!1;function P(x){return e(x)&&t(x.length)&&!!R[r(x)]}return or=P,or}var ur,fs;function su(){if(fs)return ur;fs=1;function r(t){return function(e){return t(e)}}return ur=r,ur}var qe={exports:{}};qe.exports;var vs;function iu(){return vs||(vs=1,(function(r,t){var e=Qs(),a=t&&!t.nodeType&&t,s=a&&!0&&r&&!r.nodeType&&r,i=s&&s.exports===a,n=i&&e.process,u=(function(){try{var m=s&&s.require&&s.require("util").types;return m||n&&n.binding&&n.binding("util")}catch{}})();r.exports=u})(qe,qe.exports)),qe.exports}var cr,hs;function ii(){if(hs)return cr;hs=1;var r=au(),t=su(),e=iu(),a=e&&e.isTypedArray,s=a?t(a):r;return cr=s,cr}var dr,ps;function nu(){if(ps)return dr;ps=1;var r=Yo(),t=eu(),e=Hr(),a=ai(),s=ru(),i=ii(),n=Object.prototype,u=n.hasOwnProperty;function m(c,l){var h=e(c),f=!h&&t(c),b=!h&&!f&&a(c),D=!h&&!f&&!b&&i(c),y=h||f||b||D,k=y?r(c.length,String):[],w=k.length;for(var q in c)(l||u.call(c,q))&&!(y&&(q=="length"||b&&(q=="offset"||q=="parent")||D&&(q=="buffer"||q=="byteLength"||q=="byteOffset")||s(q,w
vendor: 3,165 bytes, line 7
7)))&&k.push(q);return k}return dr=m,dr}var mr,gs;function lu(){if(gs)return mr;gs=1;var r=Object.prototype;function t(e){var a=e&&e.constructor,s=typeof a=="function"&&a.prototype||r;return e===s}return mr=t,mr}var fr,_s;function ou(){if(_s)return fr;_s=1;function r(t,e){return function(a){return t(e(a))}}return fr=r,fr}var vr,bs;function uu(){if(bs)return vr;bs=1;var r=ou(),t=r(Object.keys,Object);return vr=t,vr}var hr,ys;function cu(){if(ys)return hr;ys=1;var r=lu(),t=uu(),e=Object.prototype,a=e.hasOwnProperty;function s(i){if(!r(i))return t(i);var n=[];for(var u in Object(i))a.call(i,u)&&u!="constructor"&&n.push(u);return n}return hr=s,hr}var pr,xs;function du(){if(xs)return pr;xs=1;var r=Xs(),t=si();function e(a){return a!=null&&t(a.length)&&!r(a)}return pr=e,pr}var gr,Ss;function mu(){if(Ss)return gr;Ss=1;var r=nu(),t=cu(),e=du();function a(s){return e(s)?r(s):t(s)}return gr=a,gr}var _r,Cs;function fu(){if(Cs)return _r;Cs=1;var r=Wo(),t=Qo(),e=mu();function a(s){return r(s,e,t)}return _r=a,_r}var br,ws;function vu(){if(ws)return br;ws=1;var r=fu(),t=1,e=Object.prototype,a=e.hasOwnProperty;function s(i,n,u,m,c,l){var h=u&t,f=r(i),b=f.length,D=r(n),y=D.length;if(b!=y&&!h)return!1;for(var k=b;k--;){var w=f[k];if(!(h?w in n:a.call(n,w)))return!1}var q=l.get(i),j=l.get(n);if(q&&j)return q==n&&j==i;var A=!0;l.set(i,n),l.set(n,i);for(var O=h;++k<b;){w=f[k];var E=i[w],V=n[w];if(m)var U=h?m(V,E,w,n,i,l):m(E,V,w,i,n,l);if(!(U===void 0?E===V||c(E,V,u,m,l):U)){A=!1;break}O||(O=w=="constructor")}if(A&&!O){var N=i.constructor,z=n.constructor;N!=z&&"constructor"in i&&"constructor"in n&&!(typeof N=="function"&&N instanceof N&&typeof z=="function"&&z instanceof z)&&(A=!1)}return l.delete(i),l.delete(n),A}return br=s,br}var yr,Ts;function hu(){if(Ts)return yr;Ts=1;var r=Ce(),t=ce(),e=r(t,"DataView");return yr=e,yr}var xr,qs;function pu(){if(qs)return xr;qs=1;var r=Ce(),t=ce(),e=r(t,"Promise");return xr=e,xr}var Sr,ks;function gu(){if(ks)return Sr;ks=1;var r=Ce(),t=ce(),e=r(t,"Set");return Sr=e,Sr}var Cr,Ps;function _u(){if(Ps)return Cr;Ps=1;var r=Ce(),t=ce(),e=r(t,"WeakMap");return Cr=e,Cr}var wr,As;function bu(){if(As)return wr;As=1;var r=hu(),t=Fr(),e=pu(),a=gu(),s=_u(),i=Re(),n=ei(),u="[object Map]",m="[object Object]",c="[object Promise]",l="[object Set]",h="[object WeakMap]",f="[object DataView]",b=n(r),D=n(t),y=n(e),k=n(a),w=n(s),q=i;return(r&&q(new r(new ArrayBuffer(1)))!=f||t&&q(new t)!=u||e&&q(e.resolve())!=c||a&&q(new a)!=l||s&&q(new s)!=h)&&(q=function(j){var A=i(j),O=A==m?j.constructor:void 0,E=O?n(O):"";if(E)switch(E){case b:return f;case D:return u;case y:return c;case k:return l;case w:return h}return A}),wr=q,wr}var Tr,Ds;function yu(){if(Ds)return Tr;Ds=1;var r=Ro(),t=ri(),e=No(),a=vu(),s=bu(),i=Hr(),n=ai(),u=ii(),m=1,c="[object Arguments]",l="[object Array]",h="[object Object]",f=Object.prototype,b=f.hasOwnProperty;function D(y,k,w,q,j,A){var O=i(y),E=i(k),V=O?l:s(y),U=E?l:s(k);V=V==c?h:V,U=U==c?h:U;var N=V==h,z=U==h,R=V==U;if(R&&n(y)){if(!n(k))return!1;O=!0,N=!1}if(R&&!N)return A||(A=new r),O||u(y)?t(y,k,w,q,j,A):e(y,k,V,w,q,j,A);if(!(w&m)){var P=N&&b.call(y,"__wrapped__"),x=z&&b.call(k,"__wrapped__");
7if(P||x){var S=P?y.value():y,_=x?k.value():k;return A||(A=new r),j(S,_,w,q,A)}}return R?(A||(A=new r),a(y,k,w,q,j,A)):!1}return Tr=D,Tr}var qr,Vs;function xu(){if(Vs)return qr;Vs=1;var r=yu(),t=Fe();function e(a,s,i,n,u){return a===s?!0:a==null||s==null||!t(a)&&!t(s)?a!==a&&s!==s:r(a,s,i,n,e,u)}return qr=e,qr}var kr,Is;function Su(){if(Is)return kr;Is=1;var r=xu();function t(e,a){return r(e,a)}return kr=t,kr}var Cu=Su();const wu=gi(Cu),Tu={data(){return{demo:null,weekdays:[{day:"Montag",available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},{day:"Dienstag",available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},{day:"Mittwoch",available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},{day:"Donnerstag",available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},{day:"Freitag",available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},{day:"Samstag",available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},{day:"Sonntag",available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}}],presets:[{label:"Wochentags, 9-17 Uhr",config:{Montag:{available:!0,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Dienstag:{available:!0,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Mittwoch:{available:!0,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Donnerstag:{available:!0,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Freitag:{available:!0,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Samstag:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Sonntag:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}}}},{label:"Wochentags, 7-12 / 14-18 Uhr",config:{Montag:{available:!0,extraTimeSlot:!0,time:{from:{hours:7,minutes:0},to:{hours:12,minutes:0}},extraTime:{from:{hours:14,minutes:0},to:{hours:18,minutes:0}}},Dienstag:{available:!0,extraTimeSlot:!0,time:{from:{hours:7,minutes:0},to:{hours:12,minutes:0}},extraTime:{from:{hours:14,minutes:0},to:{hours:18,minutes:0}}},Mittwoch:{available:!0,extraTimeSlot:!0,time:{from:{hours:7,minutes:0},to:{hours:12,minutes:0}},extraTime:{from:{hours:14,minutes:0},to:{hours:18,minutes:0}}},Donnerstag:{available:!0,extraTimeSlot:!0,time:{from:{hours:7,minutes:0},to:{hours:12,minutes:0}},extraTime:{from:{hours:14,minutes:0},to:{hours:18,minutes:0}}},Freitag:{available:!0,extraTimeSlot:!0,time:{from:{hours:7,minutes:0},to:{hours:12,minutes:0}},extraTime:{from:{hours:14,minutes:0},to:{hours:18,minutes:0}}},Samstag:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Sonntag:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}}}},{label:"Jeden Tag, 16-22 Uhr",config:{Montag:{available:!0,extraTimeSlot:!1,time:{from:{hours:16,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Dienstag:{available:!0,extraTimeSlot:!1,time:{from:{hours:16,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Mittwoch:{available:!0,extraTimeSlot:!1,time:{from:{hours:16,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Donnerstag:{available:!0,extraTimeSlot:!1,time:{from:{hours:16,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Freitag:{available:!0,extraTimeSlot:!1,time:{from:{hours:16,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Samstag:{available:!0,extraTimeSlot:!1,time:{from:{hours:16,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Sonntag:{available:!0,extraTimeSlot:!1,time:{from:{hours:16,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}}}},{label:"Wochenende, 8-22 Uhr",config:{Montag:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Dienstag:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Mittwoch:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Donnerstag:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Freitag:{available:!1,extraTimeSlot:!1,time:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Samstag:{available:!0,extraTimeSlot:!1,time:{from:{hours:8,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Sonntag:{available:!0,extraTimeSlot:!1,time:{from:{hours:8,minutes:0},to:{hours:22,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}}}}]}},computed:{IconTrash(){return Ee},IconPlus(){return fe},activeConfigs(){const r={...this.modelValue,fullyAvailable:!1};return t=>wu({...t,fullyAvailable:!1},r)}},methods:{onToggleFullyAvailable(r){this.$emit("update:modelValue",{fullyAvailable:r})},onSetPrefilled(r){this.$emit("update:modelValue",{...r,fullyAvailable:!1})}},watch:{weekdays:{handler(){this.$emit("update:modelValue",{weekdays:this.weekdays})},deep:!0}},props:{modelValue:{type:Object,default:()=>({fullyAvailable:!1})},defaultValues:{type:Object,default:()=>({fullyAvailable:!1})}},components:{CircleButton:re,Tooltip:Vr,Button:ie,TimePicker:Fi,ToggleButton:$s,IconPlus:fe,IconTrash:Ee},emits:["update:modelValue"]},qu={class:"flex flex-col gap-y-2 w-full"},ku={class:"headline flex items-center gap-2"},Pu={class:"tag-wrapper sm:flex-wrap scrollbar-hide"},Au=["onClick"],Du={class:"inline-flex items-center gap-x-3 md:gap-x-4"},Vu={class:"font-medium"},Iu={key:0,class:"flex items-center gap-x-3.5 md:gap-x-3 pb-2"},Eu={key:1,class:"flex items-center gap-x-3"};function $u(r,t,e,a,s,i){const n=we("Tooltip"),u=we("ToggleButton"),m=we("TimePicker"),c=we("CircleButton");return p(),C("div",qu,[o("h2",ku,[t[1]||(t[1]=se(" Vordefinierte Verfügbarkeiten ",-1)),v(n,{text:"Du kannst die Eingaben unten individuell anpassen."})]),o("div",Pu,[o("button",{class:he([{active:e.modelValue&&e.modelValue.fullyAvailable},"tag flex-none sm:flex-1 sm:basis-1/4"]),onClick:t[0]||(t[0]=l=>i.onToggleFullyAvailable(!0))},"24/7 ",2),(p(!0),C(W,null,ae(s.presets,l=>(p(),C("button",{class:he([{active:e.modelValue&&i.activeConfigs(l.config)},"tag flex-none sm:flex-1 sm:basis-1/4"]),onClick:h=>i.onSetPrefilled(l.config)},ne(l.label),11,Au))),256))]),t[4]||(t[4]=o("div",{class:"w-full my-2 border-t"},null,-1)),(p(!0),C(W,null,ae(s.weekdays,(l,h)=>(p(),C("div",{key:h,class:"flex flex-col gap-y-3"},[o("div",Du,[o("p",Vu,ne(l.day),1),!e.modelValue||e.modelValue.fullyAvailable?(p(),B(u,{key:0,checked:e.modelValue&&!e.modelValue[l.day]||e.modelValue.fullyAvailable||e.modelValue&&e.modelValue[l.day]==null?!0:e.modelValue?e.modelValue[l.day]?.available:!1,disabled:!0,onInput:f=>r.$emit("update:modelValue",{...e.modelValue,[l.day]:{...e.modelValue[l.day],available:f.target.checked}})},null,8,["checked","onInput"])):(p(),B(u,{key:1,checked:e.modelValue[l.day]?.available,label:!e.modelValue||e.modelValue.fullyAvailable||e.modelValue[l.day]?.available?"Verfügbar":"Nicht verfügbar",onInput:f=>r.$emit("update:modelValue",{...e.modelValue,[l.day]:{...e.modelValue[l.day],available:f.target.checked}})},null,8,["checked","label","onInput"]))]),e.modelValue&&!e.modelValue.fullyAvailable&&e.modelValue[l.day]?.available?(p(),C("div",Iu,[v(m,{isDisabled:!e.modelValue[l.day]?.available,modelValue:e.modelValue[l.day]?.time?.from,"onUpdate:modelValue":f=>r.$emit("update:modelValue",{...e.modelValue,[l.day]:{...e.modelValue[l.day],time:{...e.modelValue[l.day]?.time,from:f}}})},null,8,["isDisabled","modelValue","onUpdate:modelValue"]),t[2]||(t[2]=o("small",{class:"text-sm"},"bis",-1)),v(m,{isDisabled:!e.modelValue[l.day]?.available,modelValue:e.modelValue[l.day]?.time?.to,"onUpdate:modelValue":f=>r.$emit("update:modelValue",{...e.modelValue,[l.day]:{...e.modelValue[l.day],time:{...e.modelValue[l.day]?.time,to:f}}})},null,8,["isDisabled","modelValue","onUpdate:modelValue"]),v(c,{disabled:!e.modelValue[l.day]?.available||e.modelValue[l.day]?.extraTimeSlot,icon:i.IconPlus,onClick:f=>r.$emit("update:modelValue",{...e.modelValue,[l.day]:{...e.modelValue[l.day],extraTimeSlot:!0}})},null,8,["disabled","icon","onClick"])])):Z("",!0),e.modelValue&&!e.modelValue.fullyAvailable&&e.modelValue[l.day]?.extraTimeSlot&&e.modelValue[l.day]?.available?(p(),C("div",Eu,[v(m,{isDisabled:!e.modelValue[l.day]?.available,modelValue:e.modelValue[l.day]?.extraTime?.from,"onUpdate:modelValue":f=>r.$emit("update:modelValue",{...e.modelValue,[l.day]:{...e.modelValue[l.day],extraTime:{...e.modelValue[l.day]?.extraTime,from:f}}})},null,8,["isDisabled","modelValue","onUpdate:modelValue"]),t[3]||(t[3]=o("p",{class:"text-sm text-headline tracking-wide"},"BIS",-1)),v(m,{isDisabled:!e.modelValue[l.day]?.available,modelValue:e.modelValue[l.day]?.extraTime?.to,"onUpdate:modelValue":f=>r.$emit("update:modelValue",{...e.modelValue,[l.day]:{...e.modelValue[l.day],extraTime:{...e.modelValue[l.day]?.extraTime,to:f}}})},null,8,["isDisabled","modelValue","onUpdate:modelValue"]),v(c,{icon:i.IconTrash,variant:"danger",onClick:f=>r.$emit("update:modelValue",{...e.modelValue,[l.day]:{...e.modelValue[l.day],extraTime:null,extraTimeSlot:!1}})},null,8,["icon","onClick"])])):Z("",!0)]))),128))])}const Lu=ke(Tu,[["render",$u],["__scopeId","data-v-b08f9eed"]]),Ou={__name:"EditAvailability",emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=e,s={Montag:{available:!1,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Dienstag:{available:!1,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Mittwoch:{available:!1,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Donnerstag:{available:!1,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Freitag:{available:!1,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Samstag:{available:!1,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}},Sonntag:{available:!1,extraTimeSlot:!1,time:{from:{hours:9,minutes:0},to:{hours:17,minutes:0}},extraTime:{from:{hours:0,minutes:0},to:{hours:0,minutes:0}}}},i=Lr();i.fetch();const n=$(()=>i.result),u=I({...s,fullyAvailable:!1});return oe(()=>{n.value&&(u.value=Object.keys(s).reduce((c,l)=>{const h=n.value[l];if(h){const f=h.time,b=h.extraTime;c[l]={available:!!h?.available,extraTimeSlot:!!h?.extraTimeSlot,time:{from:f&&f.from?f.from:s[l].time.from,to:f&&f.to?f.to:s[l].time.to},extraTime:{from:b&&b.from?b.from:s[l].extraTime.from,to:b&&b.to?b.to:s[l].extraTime.to}}}else c[l]=s[l];return c},{fullyAvailable:!!n.value.fullyAvailable}))}),t({saveChanges:()=>{let c=u.value;for(const l in c)Object.hasOwnProperty.call(c,l)&&c[l]&&(delete c[l].style,delete c[l].styleExtraTime);i.update(c).then(()=>{i.fetch().then(()=>{a("closeEdit")})})}}),(c,l)=>(p(),C("div",null,[v(Lu,{modelValue:u.value,"onUpdate:modelValue":l[0]||(l[0]=h=>u.value=h),defaultValues:s},null,8,["modelValue"])]))}},Ru={flex:"","flex-col":""},Mu={class:"mt-5 w-full flex flex-col gap-y-2 items-end"},Pr=5e3,ju={__name:"ProfileEditOfferDescription",props:{skillDescription:{type:String,default:""}},emits:["closeEdit"],setup(r,{expose:t,emit:e}){const a=Er(),s=e,i=r,n={description:ge().nullable().test("maxVisibleLength",`darf höchstens ${Pr} Zeichen lang sein`,f=>Dr(f)<=Pr)},{handleSubmit:u,resetForm:m}=$e({validationSchema:n}),{errorMessage:c,value:l}=ve("description");oe(async()=>{await m(),i.skillDescription&&(l.value=i.skillDescription)});const h=u(()=>{a.update(l.value).then(()=>{a.fetch().then(()=>{s("closeEdit")})})});return t({saveChanges:h}),(f,b)=>(p(),C("div",Ru,[b[1]||(b[1]=o("p",{class:"text-sm text-headline font-medium tracking-wide"}," Beschreibe hier, was Du anbieten möchtest. ",-1)),b[2]||(b[2]=o("ul",{class:"ml-5 list-disc mt-2 gap-y-2"},[o("li",{class:"text-sm text-primary tracking-wide"}," Erzähle etwas über Deine Projekte "),o("li",{class:"text-sm text-primary tracking-wide"}," Halte Deine Beschreibung kurz und fehlerfrei ")],-1)),o("div",Mu,[v(Ns,{modelValue:H(l),"onUpdate:modelValue":b[0]||(b[0]=D=>me(l)?l.value=D:null),"error-message-prop":H(c),"letter-counter-props":{class:"font-normal"},max:Pr,class:"w-full",height:"211px",placeholder:"Gib Deinen Text ein....","with-letter-counter"
7:""},null,8,["modelValue","error-message-prop"])])]))}},Fu={class:"flex justify-end items-center"},Hu={class:"flex flex-col gap-4 text-center px-4 my-4"},Uu=["src"],Bu={__name:"ProfileCompleteWarningPopup",props:{open:{type:Boolean,default:!1}},emits:["close","confirm"],setup(r){return(t,e)=>(p(),B(H(js),{open:r.open,class:"fixed inset-0 bg-backdrop backdrop-blur-md flex justify-center md:items-center overflow-y-auto z-50",onClose:()=>{}},{default:M(()=>[v(H(Rs),{class:"w-full max-w-150 mx-auto max-h-full h-fit px-4 md:px-0 md:static md:inset-auto top-6 absolute inset-0 md:top-auto md:bottom-auto"},{default:M(()=>[v(Gs,{variant:"overlay"},{default:M(()=>[o("div",Fu,[v(_i,{onClick:e[0]||(e[0]=a=>t.$emit("close"))})]),o("div",Hu,[o("img",{alt:"Vervollständige Deine Daten",src:H(Ji),class:"w-1/2 max-w-56 mx-auto"},null,8,Uu),v(H(Ms),{class:"headline text-lg"},{default:M(()=>e[2]||(e[2]=[se(" Vervollständige Deine Daten! ",-1)])),_:1,__:[2]}),v(H(bi),{class:"text-center inline-block"},{default:M(()=>e[3]||(e[3]=[o("p",null," Um Deinen Account vollständig nutzen zu können, ergänze bitte zunächst ein paar Daten in Deinem Profil. ",-1)])),_:1,__:[3]}),v(ie,{label:"Jetzt vervollständigen",onClick:e[1]||(e[1]=a=>t.$emit("confirm"))})])]),_:1})]),_:1})]),_:1},8,["open"]))}},Mc={__name:"ProfileView",setup(r){const t=Os(),e=Rr(),a=xe();yi();const s=Di(),i=Or(),n=Pe(),u=$r(),m=Se(),c=Lr(),l=Er(),h=Mr(),f=xi(),b=Hs(),D=Es(),y=Ir(),k=I(!1),w=I(null),q=I(null),j=I(!1),A=I({open:!1,title:void 0,action:void 0,actionTitle:void 0,actionDissmissTitle:void 0,actionEmit:void 0,formComponent:()=>null}),O=I(!1),E=I(!1),V=I(!1),U=I(!1),N=$(()=>a.isProvider),z=$(()=>a.user),R=$(()=>s.list),P=$(()=>n.loading),x=$(()=>u.list);$(()=>a.user?.diy_articles_count??0);const S=()=>e.push({name:"calendar-settings"}),_=()=>e.replace({query:null}),d={edit_availability:()=>X("edit_availability"),edit_self_title:()=>X("title"),edit_trade_license:()=>X("add_trade_license"),edit_self_desc:()=>X("description"),edit_gallery:()=>X("gallery"),edit_skill:()=>X("skill_description"),edit_standard_services:()=>X("add_service"),edit_self_video:()=>X("video"),edit_location:()=>X("location"),edit_category_offer:()=>X("add_category_offer"),edit_calendar:async()=>{await S()},profile_complete:F=>{F==="warning"?E.value=!0:F==="success"&&(O.value=!0)}};async function g(){const F=t.query;if(!(!F||Object.keys(F).length===0)){for(const G of Object.keys(F))if(G in d){await d[G](F[G]),await _();break}F?.msg==="user-highlighting-completed"&&z.value?.highlighted&&(j.value=!0),F?.standard_service_highlight_package_purchased==="1"&&(document.getElementById("service-packet-tab")?.click(),await _())}}oe(async()=>{await Promise.all([s.index(),n.index(),i.index(),y.getTradeLicenseFiles(),m.fetch(),c.fetch(),l.fetch(),h.index(),f.index(),D.index()]),a.user?.id&&await b.index(a.user.id),await g()}),be(()=>t.query,async()=>{await g()});function T(){A.value.open=!1,q.value=null,n.index(),u.index(),a.refresh(),i.index()}function K(){A.value.popupWithWarningClose?k.value=!0:T()}function Y(){k.value=!1}function J(){k.value=!1,setTimeout(()=>T(),100)}function He(){w.value?.saveChanges?.()}function Ue(){T(),X("select_trade_license")}function Be(){}const Ae=F=>{const G=i.value?.photo_url,ee=G&&F===G?null:F;i.update({photo:ee}).then(()=>{i.index(),a.user.additional_information=i.result,T()})};function te(F){q.value=F,X("avatar")}function ze(){V.value=!0}function Ge(){V.value=!1}function De(){V.value=!1}function Ne(){e.push("/settings/DIY-videos")}function Ke(F,G){const ee=b.company??null;return{location:{title:"Füge Deinen Standort hinzu",formComponent:()=>ll,props:{additionalInfo:i.result}},title:{title:"Füge einen Titel hinzu",formComponent:()=>el,props:{selfDescription:n.result}},description:{title:"Erstelle Deine Selbstbeschreibung",formComponent:()=>ml,props:{selfDescription:n.result}},gallery:{title:"Füge Deine Bildergalerie hinzu",formComponent:()=>ul,props:{images:x.value}},add_category_offer:{title:"Ein neues Serviceangebot hinzufügen",formComponent:()=>Kl,props:{selectedCategories:G}},edit_category_offer:{title:"Services bearbeiten",formComponent:()=>lo,props:{categoryServices:G}},delete_category:{action:"delete",title:"Löschen der Kategorie",actionTitle:"Löschen",formComponent:()=>hl,props:{categoryServices:G}},video:{title:"Füge eine Videobeschreibung hinzu",isLoading:P.value,formComponent:()=>ol,props:{selfDescription:n.result}},delete_video:{action:"delete",actionTitle:"Löschen",title:"Videovorstellung löschen",description:"Bist Du Dir sicher, ein so tolles und kreatives Video zu löschen?",deleteVideo:!0},edit_availability:{title:"Vollständiger Kalender",formComponent:()=>Ou,props:{services:R.value.slice(0,2)}},add_trade_license:{title:"Gewerbeschein/Nachweis der Selbstständigkeit hinzufügen",formComponent:()=>El,hideButtons:!0},select_trade_license:{title:"Gewerbeschein/Nachweis der Selbstständigkeit hinzufügen",formComponent:()=>$l},skill_description:{title:"Angebotsbeschreibung hinzufügen",formComponent:()=>ju,props:{skillDescription:l.result?.text}},add_service:{title:"Servicepaket hinzufügen",formComponent:()=>Kr,props:{company:ee}},edit_service:{title:"Servicepaket bearbeiten",formComponent:()=>Kr,props:{standardServiceId:parseInt(G,10),company:ee,type:"edit"}},premium_offer:{hideButtons:!0,hideTitle:!0,formComponent:()=>Ci}}[F]??null}function X(F,G){const ee=Ke(F,G);ee&&(A.value={...ee,open:!0,popupWithWarningClose:!!ee.popupWithWarningClose})}const Q=F=>{switch(F){case"showProfileCompleteSuccessPopup":O.value=!1;return;case"showProfileCompleteWarningPopup":E.value=!1;return;default:return}},L=async()=>{E.value=!1,await e.push({path:"/"})};return(F,G)=>(p(),C(W,null,[v(Gs,{variant:"page"},{default:M(()=>[v(wi,{isProvider:N.value,profile:z.value,"is-editable":"",providerView:"",onEditLocation:G[0]||(G[0]=ee=>X("location"))},{btn:M(()=>[z.value.mandatory_data_for_provider_completed_at?(p(),B(ie,{key:0,to:{name:"service-provider-detail",params:{id:z.value.id},query:{preview:1}},label:"Ãffentliches Profil","router-link":"",variant:"outline"},null,8,["to"])):Z("",!0)]),_:1},8,["isProvider","profile"]),v(On,{onManage:X,onOpenHighlightPopup:ze,onOpenCalendarSettings:G[1]||(G[1]=ee=>S())})]),_:1}),v(Ls,zr({ref:"popUpRef",title:"Füge ein Foto hinzu"},A.value,{onClose:K,onConfirm:He,onDeleteVideo:Be,onSaveImg:Ae,onSelectImg:te}),{default:M(()=>[(p(),B(Si(A.value.formComponent?.()),zr({ref_key:"dynamicRef",ref:w},A.value.props,{onCloseEdit:T,onSelectTradeLicenseFile:Ue}),null,16))]),_:1}
7,16),v(Ui,{open:k.value,actionDissmissTitle:"Abbrechen",headline:"Bist Du sicher, dass Du abbrechen möchtest?",onClose:Y,onConfirm:J},null,8,["open"]),v(Gn,{open:V.value,onClose:Ge,onSuccess:De},null,8,["open"]),v(Qn,{open:j.value,onClose:G[2]||(G[2]=ee=>j.value=!1)},null,8,["open"]),U.value?(p(),B(zi,{key:0,onClose:G[3]||(G[3]=ee=>U.value=!1),onCreated:Ne})):Z("",!0),v(Bu,{open:E.value,onClose:G[4]||(G[4]=ee=>Q("showProfileCompleteWarningPopup")),onConfirm:L},null,8,["open"]),v(Zi,{open:O.value,onClose:G[5]||(G[5]=ee=>Q("showProfileCompleteSuccessPopup"))},null,8,["open"])],64))}};export{Mc as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.