import{ar as S,as as L,X as h,cp as U,cq as P,cr as W,j as r,bn as Y,b as H,r as g,W as f,cs as $,ct as I,cu as A,N as p,a as B,cv as D,cw as T,g as F,cx as G,al as E,cy as N,cz as M,cA as V,y as _}from"./index-Csef3-wA.js";import{U as R}from"./UserContact-DR85Omch.js";import{b as Z}from"./styles-XiU4mAxA.js";import{A as X,S as q}from"./SidebarDesktop-CVG28kBG.js";import{D as Q,S as J,L as k,H as K,U as v,a as tt}from"./ListDivider-CEdDWNk5.js";import{I as O}from"./Icon-o1TUwOIX.js";import{S as et}from"./StyledSnackbar-ALh5Ihhg.js";import{_ as st,L as rt}from"./styles-CSDEd7mM.js";import"./contact-nG1w4h1u.js";import"./index-LOMZblid.js";import"./IconButton-DYCVe03c.js";import"./styles-BI9QecvF.js";import"./styles-CBGM6aT5.js";import"./qr-code-styling-DzzIkFxD.js";import"./Box-TxHQja0b.js";import"./Tabs-EQ-ZuI5c.js";import"./Fab-kDY9LTNz.js";import"./styles-BEfJmcoQ.js";import"./index-CFZu730W.js";import"./styles--EnIPtOD.js";import"./Alert-CjpjrjIp.js";import"./Snackbar-CISlEJhk.js";import"./Add-BgR3Rmtz.js";import"./frames-qHk4kRJf.js";var z={exports:{}};(function(u,c){(function(o,t){u.exports=t()})(S,function(){var o="week",t="year";return function(e,s,a){var i=s.prototype;i.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var m=a(this).startOf(t).add(1,t).date(d),l=a(this).endOf(o);if(m.isBefore(l))return 1}var y=a(this).startOf(t).date(d).startOf(o).subtract(1,"millisecond"),j=this.diff(y,o,!0);return j<0?a(this).startOf("week").week():Math.ceil(j)},i.weeks=function(n){return n===void 0&&(n=null),this.week(n)}}})})(z);var it=z.exports;const nt=L(it);var C={exports:{}};(function(u,c){(function(o,t){u.exports=t()})(S,function(){return function(o,t){var e=t.prototype,s=e.format;e.format=function(a){var i=this,n=this.$locale();if(!this.isValid())return s.bind(this)(a);var d=this.$utils(),m=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(l){switch(l){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return n.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return n.ordinal(i.week(),"W");case"w":case"ww":return d.s(i.week(),l==="w"?1:2,"0");case"W":case"WW":return d.s(i.isoWeek(),l==="W"?1:2,"0");case"k":case"kk":return d.s(String(i.$H===0?24:i.$H),l==="k"?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return l}});return s.bind(this)(m)}}})})(C);var at=C.exports;const ot=L(at);h.extend(U);h.extend(nt);h.extend(P);h.extend(ot);const ht={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},dt={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},x=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(` `),w=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(` `),ut=(u,c)=>c?(...o)=>u(...o).locale(c):u;class ct{constructor({locale:c,formats:o}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=ht,this.setLocaleToValue=t=>{const e=this.getCurrentLocaleCode();return e===t.locale()?t:t.locale(e)},this.hasUTCPlugin=()=>typeof h.utc<"u",this.hasTimezonePlugin=()=>typeof h.tz<"u",this.isSame=(t,e,s)=>{const a=this.setTimezone(e,this.getTimezone(t));return t.format(s)===a.format(s)},this.cleanTimezone=t=>{switch(t){case"default":return;case"system":return h.tz.guess();default:return t}},this.createSystemDate=t=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const e=h.tz.guess();return e!=="UTC"?h.tz(t,e):h(t)}return h(t)},this.createUTCDate=t=>{if(!this.hasUTCPlugin())throw new Error(x);return h.utc(t)},this.createTZDate=(t,e)=>{if(!this.hasUTCPlugin())throw new Error(x);if(!this.hasTimezonePlugin())throw new Error(w);const s=t!==void 0&&!t.endsWith("Z");return h(t).tz(this.cleanTimezone(e),s)},this.getLocaleFormats=()=>{const t=h.Ls,e=this.locale||"en";let s=t[e];return s===void 0&&(s=t.en),s.formats},this.adjustOffset=t=>{if(!this.hasTimezonePlugin())return t;const e=this.getTimezone(t);if(e!=="UTC"){const s=t.tz(this.cleanTimezone(e),!0);if(s.$offset===(t.$offset??0))return t;t.$offset=s.$offset}return t},this.date=(t,e="default")=>{if(t===null)return null;let s;return e==="UTC"?s=this.createUTCDate(t):e==="system"||e==="default"&&!this.hasTimezonePlugin()?s=this.createSystemDate(t):s=this.createTZDate(t,e),this.locale===void 0?s:s.locale(this.locale)},this.getInvalidDate=()=>h(new Date("Invalid date")),this.getTimezone=t=>{var e;if(this.hasTimezonePlugin()){const s=(e=t.$x)==null?void 0:e.$timezone;if(s)return s}return this.hasUTCPlugin()&&t.isUTC()?"UTC":"system"},this.setTimezone=(t,e)=>{if(this.getTimezone(t)===e)return t;if(e==="UTC"){if(!this.hasUTCPlugin())throw new Error(x);return t.utc()}if(e==="system")return t.local();if(!this.hasTimezonePlugin()){if(e==="default")return t;throw new Error(w)}return h.tz(t,this.cleanTimezone(e))},this.toJsDate=t=>t.toDate(),this.parse=(t,e)=>t===""?null:this.dayjs(t,e,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=t=>{const e=this.getLocaleFormats(),s=a=>a.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(i,n,d)=>n||d.slice(1));return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(a,i,n)=>{const d=n&&n.toUpperCase();return i||e[n]||s(e[d])})},this.isValid=t=>t==null?!1:t.isValid(),this.format=(t,e)=>this.formatByString(t,this.formats[e]),this.formatByString=(t,e)=>this.dayjs(t).format(e),this.formatNumber=t=>t,this.isEqual=(t,e)=>t===null&&e===null?!0:t===null||e===null?!1:t.toDate().getTime()===e.toDate().getTime(),this.isSameYear=(t,e)=>this.isSame(t,e,"YYYY"),this.isSameMonth=(t,e)=>this.isSame(t,e,"YYYY-MM"),this.isSameDay=(t,e)=>this.isSame(t,e,"YYYY-MM-DD"),this.isSameHour=(t,e)=>t.isSame(e,"hour"),this.isAfter=(t,e)=>t>e,this.isAfterYear=(t,e)=>this.hasUTCPlugin()?!this.isSameYear(t,e)&&t.utc()>e.utc():t.isAfter(e,"year"),this.isAfterDay=(t,e)=>this.hasUTCPlugin()?!this.isSameDay(t,e)&&t.utc()>e.utc():t.isAfter(e,"day"),this.isBefore=(t,e)=>t<e,this.isBeforeYear=(t,e)=>this.hasUTCPlugin()?!this.isSameYear(t,e)&&t.utc()<e.utc():t.isBefore(e,"year"),this.isBeforeDay=(t,e)=>this.hasUTCPlugin()?!this.isSameDay(t,e)&&t.utc()<e.utc():t.isBefore(e,"day"),this.isWithinRange=(t,[e,s])=>t>=e&&t<=s,this.startOfYear=t=>this.adjustOffset(t.startOf("year")),this.startOfMonth=t=>this.adjustOffset(t.startOf("month")),this.startOfWeek=t=>this.adjustOffset(this.setLocaleToValue(t).startOf("week")),this.startOfDay=t=>this.adjustOffset(t.startOf("day")),this.endOfYear=t=>this.adjustOffset(t.endOf("year")),this.endOfMonth=t=>this.adjustOffset(t.endOf("month")),this.endOfWeek=t=>this.adjustOffset(this.setLocaleToValue(t).endOf("week")),this.endOfDay=t=>this.adjustOffset(t.endOf("day")),this.addYears=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"year"):t.add(e,"year")),this.addMonths=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"month"):t.add(e,"month")),this.addWeeks=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"week"):t.add(e,"week")),this.addDays=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"day"):t.add(e,"day")),this.addHours=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"hour"):t.add(e,"hour")),this.addMinutes=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"minute"):t.add(e,"minute")),this.addSeconds=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"second"):t.add(e,"second")),this.getYear=t=>t.year(),this.getMonth=t=>t.month(),this.getDate=t=>t.date(),this.getHours=t=>t.hour(),this.getMinutes=t=>t.minute(),this.getSeconds=t=>t.second(),this.getMilliseconds=t=>t.millisecond(),this.setYear=(t,e)=>this.adjustOffset(t.set("year",e)),this.setMonth=(t,e)=>this.adjustOffset(t.set("month",e)),this.setDate=(t,e)=>this.adjustOffset(t.set("date",e)),this.setHours=(t,e)=>this.adjustOffset(t.set("hour",e)),this.setMinutes=(t,e)=>this.adjustOffset(t.set("minute",e)),this.setSeconds=(t,e)=>this.adjustOffset(t.set("second",e)),this.setMilliseconds=(t,e)=>this.adjustOffset(t.set("millisecond",e)),this.getDaysInMonth=t=>t.daysInMonth(),this.getWeekArray=t=>{const e=this.startOfWeek(this.startOfMonth(t)),s=this.endOfWeek(this.endOfMonth(t));let a=0,i=e;const n=[];for(;i<s;){const d=Math.floor(a/7);n[d]=n[d]||[],n[d].push(i),i=this.addDays(i,1),a+=1}return n},this.getWeekNumber=t=>t.week(),this.getYearRange=([t,e])=>{const s=this.startOfYear(t),a=this.endOfYear(e),i=[];let n=s;for(;this.isBefore(n,a);)i.push(n),n=this.addYears(n,1);return i},this.dayjs=ut(h,c),this.locale=c,this.formats=st({},dt,o),h.extend(W)}getDayOfWeek(c){return c.day()+1}}const lt=({isOpen:u,onClose:c,children:o})=>r.jsx(Y,{mdUp:!0,children:r.jsx(Q,{anchor:"bottom",open:u,onClose:c,onClick:c,children:o})}),{Container:ft,Center:mt,LogoLink:yt,MenuButton:b}=I;function gt(){const u=H(),[c,o]=g.useState(!1),[t,e]=g.useState(!1),s=u.formatMessage({id:"altLogo"}),a=u.formatMessage({id:"titleLogo"});return r.jsxs(Y,{mdUp:!0,children:[r.jsx(ft,{children:r.jsxs(mt,{children:[r.jsx(yt,{to:f.dashboard,title:a,children:r.jsx("img",{src:$,width:"80",height:"auto",alt:s,title:s})}),r.jsxs("div",{children:[r.jsx(b,{className:"settings",onClick:()=>e(!0),title:u.formatMessage({id:"header.menu"}),children:r.jsx(O,{name:"settings",style:{transition:".3s"}})}),r.jsx(b,{onClick:()=>o(!0),title:u.formatMessage({id:"header.menu"}),children:r.jsx(O,{name:"menu_uncollapse"})})]})]})}),r.jsxs(lt,{isOpen:t,onClose:()=>e(!1),children:[r.jsx(J,{}),r.jsx(k,{}),r.jsx(K,{}),r.jsx(k,{}),r.jsx(v,{}),r.jsx(tt,{})]}),r.jsx(X,{anchor:"left",open:c,onClose:()=>o(!1)})]})}function Gt({children:u=null,loading:c=!1}){A();const[o,t]=g.useState(!1),e=p([f.builder,f.bulkBuilder]),s=p([f.templates,f.domains,f.dashboard]),a=p(f.bulkBuilder),i=!e&&!a,{translationsReady:n}=B(y=>({translationsReady:y.user.translationsReady})),d=!c&&n,m=g.useMemo(()=>o?D` html body { overflow-y: auto; padding-right: ${T()}px; background: ${F.gray.light}; } .top-message-wrapper { width: calc(100% + ${T()}px); .MuiAlert-root { padding-right: calc(40px + ${T()}px); } } `:"",[o]),l=g.useMemo(()=>D` body { overflow-y: scroll; } ${m} `,[m]);return g.useEffect(()=>{const y=G();y!==o&&t(y)},[]),r.jsx(Z,{children:r.jsx(rt,{dateAdapter:ct,adapterLocale:h.locale(),children:r.jsxs(r.Fragment,{children:[r.jsx(E,{}),s&&r.jsx(N,{styles:l}),r.jsxs(M.Container,{children:[r.jsx(q,{}),i&&r.jsx(gt,{}),!d&&r.jsx(M.Main,{children:r.jsx(V,{})}),r.jsx(M.Main,{className:_({"is-builder":!!e}),style:d?{}:{display:"none"},children:u}),r.jsx(et,{})]}),r.jsx(R,{})]})})})}export{Gt as default};