1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a10c65-0dc9-0000-e243-88db3ea3c620";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="052d7710-cbaf-5f20-a8fe-2f948ca14967")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85574],{13481:(e,t,n)=>{n.d(t,{A:()=>i});let i=(0,n(67713).Ay)()},16636:(e,t,n)=>{n.d(t,{s:()=>i});function i(e,t,{signal:n,edges:o}={}){let s,r=null,a=null!=o&&o.includes("leading"),l=null==o||o.includes("trailing"),c=()=>{null!==r&&(e.apply(s,r),s=void 0,r=null)},d=null,u=()=>{null!=d&&clearTimeout(d),d=setTimeout(()=>{d=null,l&&c(),y()},t)},y=()=>{null!==d&&(clearTimeout(d),d=null),s=void 0,r=null},p=function(...e){if(n?.aborted)return;s=this,r=e;let t=null==d;u(),a&&t&&c()};return p.schedule=u,p.cancel=y,p.flush=()=>{c()},n?.addEventListener("abort",y,{once:!0}),p}},27266:(e,t,n)=>{n.d(t,{Gk:()=>l,Sh:()=>u,eU:()=>c,ff:()=>a,od:()=>r,w0:()=>d});var i=n(32078),o=n(23787),s=n(42299);async function r(e,t){let n=e?.single?void 0:{allCount:0,customers:[]};return await (0,i.A)("Axios","Customers","getCustomers","Abrufen der Kunden",async()=>{n=(await (0,o.Ay)({title:"Abrufen der Kunden",method:"post",url:s.B9+"/customers",data:e,headers:(0,o._b)({})}))?.data||n},{disableSuccess:!0,disableLoading:t}),n}async function a(e){let t;return await (0,i.A)("Axios","Customers","createCustomer","Erstellen des Kunden",async()=>{t=(await (0,o.Ay)({title:"Erstellen des Kunden",method:"put",url:s.B9+"/customers",data:e,headers:(0,o._b)({})}))?.data}),t}async function l(e){let t;return await (0,i.A)("Axios","Customers","updateCustomer","Bearbeiten des Kunden",async()=>{t=(await (0,o.Ay)({title:"Bearbeiten des Kunden",method:"patch",url:s.B9+"/customers",data:e,headers:(0,o._b)({})}))?.data}),t}async function c(e){let t;return await (0,i.A)("Axios","Customers","changePasswordCustomer","Bearbeiten des Kundenpasswortes",async()=>{t=(await (0,o.Ay)({title:"Bearbeiten des Kundenpasswortes",method:"post",url:s.B9+"/customers/changeCustomerPassword",data:e,headers:(0,o._b)({})}))?.data}),t}async function d(e){return await (0,i.A)("Axios","Customers","deleteCustomer","L\xf6schen des Kunden",async()=>{await (0,o.Ay)({title:"L\xf6schen des Kunden",method:"delete",url:s.B9+"/customers",data:e,headers:(0,o._b)({})})})}let u=async(e,t)=>(await (0,o.Ay)({title:"Einloggen des Kunden",method:"post",url:s.B9+o.n2,data:e,headers:(0,o._b)({customIdProject:t})}))?.data},32078:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(94659),o=n(48711),s=n(23787),r=n(37876),a=n(29911),l=n(16636),c=n(87777),d=n(59688),u=n(97238),y=n(56616),p=n(73094),m=n(92632);function h(e,t,n,i){let o=new Notification(e,t);return o.onclick=function(){i?.(),window?.focus?.(),this?.close?.(),d.oR?.dismiss?.(n)},o}let f={};function A(e,t){let n={description:[t?.secondary,t?.tertiary].filter(e=>!(0,a.A)(e))?.join("\n"),duration:t?.timeout,icon:void 0,id:t?.key,title:t?.primary,classNames:{toast:(0,a.A)(t?.stylingType)?void 0:`styling_${t?.stylingType}`}};return(0,a.A)(n.duration)&&(n.duration="message"===e?3e4:"error"===e?1e4:`${n?.title}${n?.description}`.length>50?6e3:3e3),f?.[n?.id]?.cancel?.(),f[n?.id]=(0,l.s)(()=>{"message"===e&&(!function(e,t,n,i){try{if(!document.hasFocus()){let o={body:t,icon:"/favicon/web-app-manifest-512x512.png",dir:"ltr",requireInteraction:!0};"granted"===Notification.permission?h(e,o,n,i):"denied"!==Notification.permission&&Notification.requestPermission().then(function(t){"granted"===t&&h(e,o,n,i)})}}catch(e){console.error(e)}}(n?.title,n?.description,n?.id,t?.actions?.[0]?.func),n.icon=(0,r.jsx)(p.default,{className:m.U.iconSvg,icon:"solar:bell-bing-bold-duotone"})),d.oR?.[e]?.(n?.title,{...(0,c.c)(n,["title"]),action:!(0,a.A)(t?.actions)&&(0,r.jsx)(y.A,{direction:"row",gap:.5,children:t?.actions?.map(e=>(0,r.jsx)(u.A,{className:m.U.actionButton,href:e?.href,size:"small",sx:{mr:2},target:e?.target,onClick:t=>{t?.preventDefault?.(),e?.func?.(),d.oR?.dismiss?.(n?.id)},children:"Anzeigen"},`${n}_action_${e?.name}`))})}),f[n?.id]=void 0},t?.delay||0),f?.[n?.id]?.(),{cancel:()=>{f?.[n?.id]?.cancel?.(),d.oR?.dismiss(n?.id)},id:n?.id}}async function g(e,t,n,r,a,l){let c=`${e}_${t}_${n}_${(0,i.A)(3)}`,d=l?.disableLoading?{cancel:()=>{}}:A("loading",{delay:l?.delay||500,key:c,primary:r,stylingType:l?.stylingType});try{return await a(c),l?.disableSuccess?d.cancel():A("success",{key:c,primary:r,stylingType:l?.stylingType}),!0}catch(e){return(0,s.tq)(e)||(0,o.F0)(e)&&e?.status===404&&l?.disable404?d.cancel():(console.error(e),A("error",{key:c,primary:r,secondary:e?.response?.data?.error||e?.response?.data?.message||e?.message||JSON.stringify(e),stylingType:l?.stylingType})),!1}}},56616:(e,t,n)=>{n.d(t,{A:()=>I});var i=n(14232),o=n(69241),s=n(87285),r=n(85),a=n(86583),l=n(13481),c=n(91613),d=n(4071),u=n(71136),y=n(78901),p=n(22249),m=n(37876);let h=(0,u.A)(),f=(0,l.A)("div",{name:"MuiStack",slot:"Root"});function A(e){return(0,c.A)({props:e,name:"MuiStack",defaultTheme:h})}let g=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...(0,y.NI)({theme:t},(0,y.kW)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let i=(0,p.LX)(t),o=Object.keys(t.breakpoints.values).reduce((t,n)=>(("object"==typeof e.spacing&&null!=e.spacing[n]||"object"==typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t),{}),r=(0,y.kW)({values:e.direction,base:o}),a=(0,y.kW)({values:e.spacing,base:o});"object"==typeof r&&Object.keys(r).forEach((e,t,n)=>{if(!r[e]){let i=t>0?r[n[t-1]]:"column";r[e]=i}}),n=(0,s.A)(n,(0,y.NI)({theme:t},a,(t,n)=>e.useFlexGap?{gap:(0,p._W)(i,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[n?r[n]:e.direction]}`]:(0,p._W)(i,t)}}))}return(0,y.iZ)(t.breakpoints,n)};var b=n(34401),k=n(96968);let I=function(e={}){let{createStyledComponent:t=f,useThemeProps:n=A,componentName:s="MuiStack"}=e,l=t(g);return i.forwardRef(function(e,t){let c,u=n(e),{component:y="div",direction:p="c
1olumn",spacing:h=0,divider:f,children:A,className:g,useFlexGap:b=!1,...k}=(0,d.A)(u),I=(0,a.A)({root:["root"]},e=>(0,r.Ay)(s,e),{});return(0,m.jsx)(l,{as:y,ownerState:{direction:p,spacing:h,useFlexGap:b},ref:t,className:(0,o.A)(I.root,g),...k,children:f?(c=i.Children.toArray(A).filter(Boolean)).reduce((e,t,n)=>(e.push(t),n<c.length-1&&e.push(i.cloneElement(f,{key:`separator-${n}`})),e),[]):A})})}({createStyledComponent:(0,b.Ay)("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>(0,k.b)({props:e,name:"MuiStack"})})},87104:(e,t,n)=>{n.r(t),n.d(t,{AuthContext:()=>h,AuthFrontendProvider:()=>f});var i,o=n(37876),s=n(29911),r=n(89099),a=n(14232),l=n(27266),c=n(41440),d=n(36799),u=n(19987),y=((i=y||{}).INITIAL="INITIAL",i.LOGIN="LOGIN",i.LOGOUT="LOGOUT",i);let p={isInitialized:!1,isAuthenticated:!1,customer:null},m=(e,t)=>"INITIAL"===t.type?{isInitialized:!0,isAuthenticated:t.payload.isAuthenticated,customer:t.payload.customer}:"LOGIN"===t.type?{...e,isInitialized:!0,isAuthenticated:!0,customer:t.payload.customer}:"LOGOUT"===t.type?{...e,isAuthenticated:!1,project:null,customer:null}:e,h=(0,a.createContext)(null);function f({children:e,project:t}){let[n,i]=(0,a.useReducer)(m,p),{auth:y,initialized:A,onChangeAuth:g}=(0,c.useSettingsContext)(),{query:b,push:k}=(0,r.useRouter)(),I=(0,a.useCallback)(async()=>{try{if(y?.type===d.X.Backend)return void i({type:"INITIAL",payload:{isAuthenticated:!1,customer:null}});let e=y?.idCustomer,n=y?.idGroup,o=y?.idProject,r=y?.token;if((0,s.A)(r)||(0,s.A)(o)||(0,s.A)(e))i({type:"INITIAL",payload:{isAuthenticated:!1,customer:null}});else if((0,u.y)(r)){(0,u.N)({idCustomer:e,idGroup:n,idProject:o,token:r,type:d.X.Frontend},g);let s=await (0,l.Sh)(void 0,t?.id);(0,u.N)({idCustomer:s?.customer?.id,idGroup:n,idProject:t?.id,token:s?.token,type:d.X.Frontend},g),i({type:"LOGIN",payload:{customer:s?.customer}})}else throw i({type:"INITIAL",payload:{isAuthenticated:!1,customer:null}}),Error("Token expired")}catch(e){console.error(e),i({type:"INITIAL",payload:{isAuthenticated:!1,customer:null}})}},[y?.idProject,y?.token,y?.type,g]);(0,a.useEffect)(()=>{A&&I()},[I,A]);let w=(0,a.useCallback)(async(e,n)=>{try{let o=await (0,l.Sh)({username:e,pass:n},t?.id);(0,u.N)({idCustomer:o?.customer?.id,idGroup:o?.customer?.idGroup,idProject:t?.id,token:o?.token,type:d.X.Frontend},g),i({type:"LOGIN",payload:{customer:o?.customer}})}catch(e){throw console.error(e),(0,u.N)(void 0,g),i({type:"LOGOUT"}),e}},[g,t?.id]),v=(0,a.useCallback)(()=>{(0,u.N)(void 0,g),i({type:"LOGOUT"}),k({pathname:"/mein-bereich",query:{"ahd-project-id":(0,s.A)(b["ahd-project-id"])?void 0:b["ahd-project-id"],gtmPreviewKey:(0,s.A)(b.gtmPreviewKey)?void 0:b.gtmPreviewKey}})},[g,k,b]),N=(0,a.useMemo)(()=>({isInitialized:n.isInitialized,isAuthenticated:n.isAuthenticated,customer:n.customer,login:w,logout:v}),[n.isInitialized,n.isAuthenticated,n.customer,w,v]);return(0,o.jsx)(h.Provider,{value:N,children:e})}},87777:(e,t,n)=>{n.d(t,{c:()=>i});function i(e,t){let n={...e};for(let e=0;e<t.length;e++){let i=t[e];delete n[i]}return n}},94659:(e,t,n)=>{n.d(t,{A:()=>s});try{var i="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};i._posthogReleaseId=i._posthogReleaseId||"01a0f7f4-c2fc-0000-45f1-05b4d69a8acf";var o=(new i.Error).stack;o&&(i._posthogChunkIds=i._posthogChunkIds||{},i._posthogChunkIds[o]="345bcbcd-3bae-5b19-b77d-ad6db9a5479d")}catch(e){}function s(e,t){let n="",i=t?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\xa7$%&=?*+#",o=i.length,s=0;for(;s<e;)n+=i.charAt(Math.floor(Math.random()*o)),s+=1;return n}}}]); 2//# chunkId=052d7710-cbaf-5f20-a8fe-2f948ca14967
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.