1import{e as T,x as I,k as q,f as g,c as l,o as r,a as t,g as w,b as j,n as B,d as Q,t as p,F as k,r as H,i as v,A as E,h as A,a0 as X,a$ as K,W as Y}from"#entry";const ee=`<svg viewBox="0 0 1366 768" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> 2 <path d="M1193.3,415.8h25.1v-56.1h31V391h-24.8v24.8h37.4c6.8,0,12.5-5.5,12.5-12.5v-43.5c0-7-5.7-12.5-12.5-12.5c6.8,0,12.5-5.5,12.5-12.5v-43.5c0-6.8-5.7-12.5-12.5-12.5h-37.4v25.1h24.8v31h-31v-56.1h-25.1V415.8z M1138.2,297.6v74.3l-14.7,44l-24.8-0.2l-45.9-137h24.8l33.6,104.9L1138.2,297.6z M1144.3,278.7v137.2h25.1V278.7H1144.3z M1052.9,296.5l24.8,74.7v44.6h-24.8V296.5z M991.1,303.7h12.3V391h-12.3v24.8h24.8c6.8,0,12.5-5.5,12.5-12.5V291.2c0-6.8-5.7-12.5-12.5-12.5h-24.8V303.7z M959.9,278.7c-6.8,0-12.5,5.7-12.5,12.5v112.1c0,7,5.7,12.5,12.5,12.5h24.8V391h-12.3v-87.3h12.3v-25.1H959.9z M842,415.8h25.1v-56.1h31V391h-24.8v24.8h37.4c6.8,0,12.5-5.5,12.5-12.5v-43.5c0-7-5.7-12.5-12.5-12.5c6.8,0,12.5-5.5,12.5-12.5v-43.5c0-6.8-5.7-12.5-12.5-12.5h-37.4v25.1h24.8v31h-31v-56.1H842V415.8z M700.7,391h45.1v24.8h-45.1V391z M745.7,303.7h-45.1v-25.1h45.1V303.7z M669.7,415.8V278.7h24.8v56.1h38.7v25.1h-38.7v56.1H669.7z M589.4,278.7h-25.1v137.2h25.1V278.7z M620.4,334.7h-24.8v25.1h24.8v56.1h25.1V278.7h-25.1V334.7z M495.3,309.2v106.6h24.8V309.2H495.3z M467.2,278.7v25.1h81.1v-25.1H467.2z M330,309.2v106.6h24.8V309.2H330z M301.9,278.7v25.1H383v-25.1H301.9z M272.6,415.8l-13.4-69.3l12.8-64.9l25.3,134.1H272.6z M242.1,278.7h25.5l-19.8,102.2H261l4.6,23.7h-22.4l-2,11.2h-25.1L242.1,278.7z M160.5,391h45.1v24.8h-45.1V391z M205.6,303.7h-45.1v-25.1h45.1V303.7z M129.5,415.8V278.7h24.8v56.1h38.7v25.1h-38.7v56.1H129.5z M24.2,415.8h25.1v-56.1h31V391H55.4v24.8h37.4c6.8,0,12.5-5.5,12.5-12.5v-43.5c0-7-5.7-12.5-12.5-12.5c6.8,0,12.5-5.5,12.5-12.5v-43.5c0-6.8-5.7-12.5-12.5-12.5H55.4v25.1h24.8v31h-31v-56.1H24.2V415.8z"/> 3 <rect x="22.4" y="278.4" width="28.3" height="194.7"/> 4 <rect x="1316.8" y="196" width="28.3" height="302.3"/> 5 <rect x="22" y="469.9" width="1322.5" height="28.3"/> 6 <polygon points="22,224.3 97.1,196 1344.5,196 1344.5,224.3"/> 7</svg>`,oe=["innerHTML"],te=T({__name:"BtbLogo",props:{height:{default:"2rem"}},setup(s){const f=s,a=g(()=>({height:f.height,maxHeight:f.height}));return(M,h)=>(r(),l("div",{class:"btb-logo text-white",style:v(a.value),innerHTML:A(ee)},null,12,oe))}}),i=s=>`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${s}</svg>`,N=[{name:"Daily Operations",color:"#00FF7B",icon:i('<path d="M9 11l3 3L22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/>'),minimumLevel:10,apps:[{name:"Checklists",url:"https://checklists.beatthebomb.work",icon:i('<path d="M9 11l3 3L22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/>'),color:"#00FF7B",minimumLevel:10},{name:"Scheduling",url:"https://scheduling.beatthebomb.work",icon:i('<rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/>'),color:"#FFA21A",minimumLevel:10},{name:"EOD Reports",url:"https://eod.beatthebomb.work",icon:i('<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/>'),color:"#FF6B00",minimumLevel:30,roles:["manager","director","admin","cto"]},{name:"Inventory",url:"https://inventory.beatthebomb.work",icon:i('<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 1 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/>'),color:"#00FFFF",minimumLevel:30,roles:["manager","director","admin","cto"]},{name:"Intranet",url:"https://intranet.beatthebomb.work",icon:i('<circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>'),color:"#18B9FF",minimumLevel:10,roles:["staff","lead","manager","director","admin","cto"]},{name:"Messaging",url:"https://messaging.beatthebomb.work",icon:i('<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>'),color:"#A855F7",minimumLevel:10},{name:"Tasks",url:"https://tasks.beatthebomb.work",icon:i('<polyline points="9 11 12 14 22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/>'),color:"#F97316",minimumLevel:10}]},{name:"Support & Safety",color:"#F9BF06",icon:i('<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/>
7<line x1="12" y1="17" x2="12.01" y2="17"/>'),minimumLevel:10,apps:[{name:"Incidents",url:"https://incidents.beatthebomb.work",icon:i('<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/>'),color:"#EF4444",minimumLevel:20,roles:["lead","manager","director","admin","cto"]},{name:"Issues",url:"https://issues.beatthebomb.work",icon:i('<circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/>'),color:"#F9BF06",minimumLevel:20,roles:["lead","manager","director","admin","cto"]},{name:"SOPs",url:"https://sops.beatthebomb.work",icon:i('<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><rect x="8" y="2" width="8" height="4" rx="1" ry="1"/><path d="M9 14l2 2 4-4"/>'),color:"#06B6D4",minimumLevel:10},{name:"Monitoring",url:"https://monitoring.beatthebomb.work",icon:i('<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>'),color:"#10B981",minimumLevel:30,roles:["manager","director","admin","cto"]}]},{name:"Growth & Learning",color:"#EE088C",icon:i('<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>'),minimumLevel:10,apps:[{name:"Learning",url:"https://learning.beatthebomb.work",icon:i('<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>'),color:"#EE088C",minimumLevel:10},{name:"Team Rewards",url:"https://team-rewards.beatthebomb.work",icon:i('<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/>'),color:"#FFD700",minimumLevel:10},{name:"BombStars",url:"https://bombstars.beatthebomb.work",icon:i('<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>'),color:"#FF6FD8",minimumLevel:10},{name:"Team Development",url:"https://team-development.beatthebomb.work",icon:i('<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>'),color:"#EE088C",minimumLevel:20,roles:["lead","manager","director","admin","cto"]},{name:"Benefits",url:"https://benefits.beatthebomb.work",icon:i('<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/>'),color:"#EC4899",minimumLevel:10}]},{name:"Business",color:"#18B9FF",icon:i('<line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/>'),minimumLevel:30,apps:[{name:"Event Sales",url:"https://event-sales.beatthebomb.work",icon:i('<path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/><path d="M8 14h.01"/><path d="M12 14h.01"/><path d="M16 14h.01"/>'),color:"#F9BF06",minimumLevel:30,roles:["manager","director","admin","cto"]},{name:"CRM",url:"https://crm.beatthebomb.work",icon:i('<circle cx="12" cy="5" r="3"/><path d="M12 8c-3.5 0-6 2-6 5v1h12v-1c0-3-2.5-5-6-5z"/><circle cx="4" cy="8" r="2.5"/><path d="M4 10.5C1.5 10.5 0 12 0 14v1h5"/><circle cx="20" cy="8" r="2.5"/><path d="M20 10.5c2.5 0 4 1.5 4 3.5v1h-5"/>'),color:"#22C55E",minimumLevel:50,roles:["admin","cto"]},{name:"Vendors",url:"https://vendors.beatthebomb.work",icon:i('<line x1="12" y1="1" x2="12" y2="23"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/>'),color:"#10B981",minimumLevel:50,roles:["admin","cto"]},{name:"Reporting",url:"https://reporting.beatthebomb.work",icon:i('<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 21V9"/>'),color:"#18B9FF",minimumLevel:30,roles:["manager","director","admin","cto"]},{name:"Performance",url:"https://performance.beatthebomb.work",icon:i('<polyline points="23 6 13.5 15.5 8.5 10.5 1 18"/><polyline points="17 6 23 6 23 12"/>'),color:"#22C55E",minimumLevel:30,roles:["manager","director","admin","cto"]},{name:"Leasing",url:"https://leasing.beatthebomb.work",icon:i('<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/>
7<line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="12" y2="17"/><path d="M15 17c.5-.5 1.5-1 2-1s1 .5 1 1-.5 1.5-1 2l-2 2h-1v-1l2-2"/>'),color:"#F59E0B",minimumLevel:30,roles:["manager","director","admin","cto"]},{name:"Surveys",url:"https://surveys.beatthebomb.work",icon:i('<circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/>'),color:"#6366F1",minimumLevel:30,roles:["manager","director","admin","cto"]},{name:"Booking",url:"https://booking.beatthebomb.work",icon:i('<rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/><path d="M8 14h.01"/><path d="M12 14h.01"/>'),color:"#EC4899",minimumLevel:10}]},{name:"Admin",color:"#A855F7",icon:i('<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>'),minimumLevel:50,apps:[{name:"Style",url:"https://style.beatthebomb.work",icon:i('<circle cx="13.5" cy="6.5" r="2.5"/><path d="M17.5 10.5c1.7-1 3.5 0 3.5 0"/><circle cx="8.5" cy="8.5" r="2.5"/><circle cx="17.5" cy="15.5" r="2.5"/><circle cx="6.5" cy="15.5" r="2.5"/><circle cx="12" cy="20" r="2.5"/>'),color:"#A855F7",minimumLevel:50,roles:["admin","cto"]},{name:"SSO Admin",url:"https://sso.beatthebomb.work/dashboard",icon:i('<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>'),color:"#EE088C",minimumLevel:50,roles:["admin","cto"]},{name:"Projects",url:"https://projects.beatthebomb.work",icon:i('<rect x="2" y="3" width="6" height="6" rx="1"/><rect x="16" y="3" width="6" height="6" rx="1"/><rect x="9" y="3" width="6" height="6" rx="1"/><rect x="2" y="15" width="6" height="6" rx="1"/><rect x="9" y="15" width="6" height="6" rx="1"/><rect x="16" y="15" width="6" height="6" rx="1"/>'),color:"#06B6D4",minimumLevel:50,roles:["admin","cto"]}]}],ne=N.flatMap(s=>s.apps),ae={class:"btb-header"},le=["href"],re={class:"btb-header-center"},ie={class:"btb-app-switcher"},se={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"btb-app-name-chevron"},ce={key:0,class:"btb-app-menu"},he={key:0,class:"btb-app-menu-content btb-app-menu-content--grouped"},ue={class:"btb-menu-categories"},me=["onMouseenter","onClick"],pe=["innerHTML"],de={class:"btb-group-count"},ve={class:"btb-menu-apps"},be=["href","onClick"],ge=["innerHTML"],we={key:1,class:"btb-app-menu-item btb-app-current"},ye=["innerHTML"],xe={key:1,class:"btb-app-menu-content"},ke={key:0,class:"btb-app-menu-divider"},fe=["href","onClick"],Me=["innerHTML"],Le={key:0,class:"btb-app-role-tag"},Ce={key:2,class:"btb-app-menu-item btb-app-current"},Be=["innerHTML"],He={key:0,class:"btb-header-user"},Ve={class:"btb-user-name"},ze={key:0,class:"btb-user-roles"},O="btb-app-directory-cache",Fe=T({__name:"BtbAppHeader",props:{appName:{},user:{},roles:{default:()=>[]},navigation:{default:()=>[]},apps:{default:()=>[]},appGroups:{default:()=>[]},appDirectoryUrl:{},showRoles:{type:Boolean,default:!0},homeLink:{default:"/"},maxRoles:{default:5},maxRoleLevel:{default:0},themeCssUrl:{default:"https://style.beatthebomb.work/cdn/themes/active.css"}},emits:["logout","navigate","switchApp"],setup(s,{emit:f}){const a=s,M=f,h=I([]);function C(e){return!e||!Array.isArray(e.groups)?[]:e.groups.map(n=>({name:n.name??"",icon:n.icon,color:n.color,minimumLevel:n.minimumLevel,roles:n.roles,apps:Array.isArray(n.apps)?n.apps.map(o=>({name:o.name??"",url:o.url??"#",icon:o.icon,color:o.color,minimumLevel:o.minimumLevel,roles:o.roles,dividerBefore:o.dividerBefore,roleTag:o.roleTag})):[]}))}async function V(e){try{const n=await fetch(e);if(!n.ok)throw new Error(`HTTP ${n.status}`);const o=await n.json(),b=C(o);try{sessionStorage.setItem(O,JSON.stringify({groups:b,fetchedAt:Date.now()}))}catch{}return b}catch{return[]}}q(async()=>{if(a.themeCssUrl){const e=document.getElementById("btb-live-theme");if(e)e.setAttribute("href",a.themeCssUrl);else{const n=document.createElement("link");
7n.id="btb-live-theme",n.rel="stylesheet",n.href=a.themeCssUrl,document.head.appendChild(n)}}if(a.appGroups&&a.appGroups.length>0){h.value=a.appGroups;return}if(a.appDirectoryUrl){try{const n=sessionStorage.getItem(O);if(n){const o=JSON.parse(n);Array.isArray(o.groups)&&o.groups.length>0&&(h.value=o.groups)}}catch{}const e=await V(a.appDirectoryUrl);e.length>0?h.value=e:h.value.length===0&&(h.value=N);return}h.value=N});const d=I(!1),c=I(null),L=g(()=>a.appName.toLowerCase()),z=g(()=>a.apps.length===0),m=g(()=>a.apps.length?a.apps.filter(e=>e.name.toLowerCase()===L.value?!0:e.minimumLevel!=null&&e.minimumLevel>0?a.maxRoleLevel>=e.minimumLevel:e.roles&&e.roles.length>0?e.roles.some(n=>a.roles.includes(n)):!0):[]),y=e=>e.name.toLowerCase()===L.value?!0:e.minimumLevel!=null&&e.minimumLevel>0?a.maxRoleLevel>=e.minimumLevel:e.roles&&e.roles.length>0?e.roles.some(n=>a.roles.includes(n)):!0,u=e=>e.minimumLevel!=null&&e.minimumLevel>0&&a.maxRoleLevel<e.minimumLevel||e.roles&&e.roles.length>0&&!e.roles.some(n=>a.roles.includes(n))?!1:e.apps.some(n=>y(n)),x=g(()=>h.value.filter(u).map(e=>({...e,apps:e.apps.filter(y)}))),_=g(()=>z.value?x.value.some(e=>e.apps.length>0):m.value.length>0),R=e=>e.name.toLowerCase()===L.value,U=g(()=>a.user&&(a.user.name||a.user.givenName||a.user.email)||""),D=g(()=>{var e;return(e=a.roles)!=null&&e.length?a.roles.slice(0,a.maxRoles):[]}),G=e=>e.replace(/-/g," ").replace(/_/g," ").replace(/\b\w/g,n=>n.toUpperCase()),J=()=>M("logout"),P=e=>{d.value=!1,c.value=null,M("switchApp",e),window.location.href=e.url},W=()=>{d.value=!d.value,d.value&&z.value&&x.value.length>0?c.value=0:d.value||(c.value=null)},Z=()=>{d.value=!1,c.value=null},$=e=>{c.value=e},F=e=>{if(!e)return"rgba(255, 255, 255, 0.12)";const n=e.replace("#",""),o=parseInt(n.substring(0,2),16),b=parseInt(n.substring(2,4),16),S=parseInt(n.substring(4,6),16);return`rgba(${o}, ${b}, ${S}, 0.25)`};return(e,n)=>(r(),l("header",ae,[t("a",{href:s.homeLink,class:"btb-header-logo"},[j(te,{height:"28px"})],8,le),t("div",re,[t("div",ie,[t("button",{type:"button",class:B(["btb-app-name-btn",{active:d.value}]),onClick:W},[Q(p(s.appName)+" ",1),_.value?(r(),l("svg",se,[...n[0]||(n[0]=[t("polyline",{points:"6 9 12 15 18 9"},null,-1)])])):w("",!0)],2),d.value&&_.value?(r(),l("div",ce,[t("div",{class:"btb-app-menu-backdrop",onClick:Z}),z.value?(r(),l("div",he,[t("div",ue,[n[1]||(n[1]=t("div",{class:"btb-app-menu-header"},"Categories",-1)),(r(!0),l(k,null,H(x.value,(o,b)=>(r(),l("button",{key:o.name,type:"button",class:B(["btb-category-btn",{"btb-category-btn--active":c.value===b}]),onMouseenter:S=>$(b),onClick:S=>$(b)},[t("div",{class:"btb-app-icon btb-app-icon--sm",style:v({background:F(o.color)}),innerHTML:o.icon},null,12,pe),t("span",{class:"btb-category-name",style:v({color:c.value===b?o.color||"#fafafa":"#a1a1aa"})},p(o.name),5),t("span",de,p(o.apps.length),1)],42,me))),128))]),t("div",ve,[c.value!=null&&x.value[c.value]?(r(),l(k,{key:0},[t("div",{class:"btb-app-menu-header",style:v({color:x.value[c.value].color||"#52525b"})},p(x.value[c.value].name),5),(r(!0),l(k,null,H(x.value[c.value].apps,o=>(r(),l(k,{key:o.url},[R(o)?(r(),l("div",we,[t("div",{class:"btb-app-icon btb-app-icon--sm",style:v({background:F(o.color)}),innerHTML:o.icon},null,12,ye),t("span",{class:"btb-app-name",style:v({color:o.color||"#fafafa"})},p(o.name),5),n[2]||(n[2]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round",class:"btb-app-current-check"},[t("polyline",{points:"20 6 9 17 4 12"})],-1))])):(r(),l("a",{key:0,href:o.url,class:"btb-app-menu-item",onClick:E(b=>P(o),["prevent"])},[t("div",{class:"btb-app-icon btb-app-icon--sm",style:v({background:F(o.color)}),innerHTML:o.icon},null,12,ge),t("span",{class:"btb-app-name",style:v({color:o.color||"#fafafa"})},p(o.name),5)],8,be))],64))),128))],64)):w("",!0)])])):(r(),l("div",xe,[n[4]||(n[4]=t("div",{class:"btb-app-menu-header"},"Apps",-1)),(r(!0),l(k,null,H(m.value,o=>(r(),l(k,{key:o.url},[o.dividerBefore?(r(),l("div",ke)):w("",!0),R(o)?(r(),l("div",Ce,[t("div",{class:"btb-app-icon",style:v({background:F(o.color)}),innerHTML:o.icon},null,12,Be),t("span",{class:"btb-app-name",style:v({color:o.color||"#fafafa"})},p(o.name),5),n[3]||(n[3]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round",class:"btb-app-current-check"},[t("polyline",{points:"20 6 9 17 4 12"})],-1))])):(r(),l("a",{key:1,href:o.url,class:"btb-app-menu-item",onClick:E(b=>P(o),["prevent"])},[t("div",{class:"btb-app-icon",style:v({background:F(o.color)}),innerHTML:o.icon},null,12,Me),t("span",{class:"btb-app-name",style:v({color:o.color||"#fafafa"})},p(o.name),5),o.roleTag?(r(),l("span",Le,p(o.roleTag),1)):w("",!0)],8,fe))],64))),128))]))])):w("",!0)])]),s.user?(r(),l("div",He,[t("span",Ve,p(U.value),1),s.showRoles&&D.value.length?(r(),l("div",ze,[(r(!0),l(k,null,H(D.value,o=>(r(),l("span",{key:o,class:"btb-role-badge"},p(G(o)),1))),128))])):w("",!0),t("button",{type:"button",class:"btb-logout-btn",t
7itle:"Logout",onClick:J},[...n[5]||(n[5]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),t("polyline",{points:"16 17 21 12 16 7"}),t("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1)])])])):w("",!0)]))}}),Ae={class:"btb-app-navbar"},Ie={class:"btb-navbar-content"},Te={class:"btb-navbar-links"},Se=["href","onClick"],je=["innerHTML"],Ee={class:"btb-navbar-label"},Ne={key:0,class:"btb-location-selector"},_e={key:0,class:"btb-location-name"},Re={key:1,class:"btb-location-placeholder"},De={key:0,class:"btb-location-menu"},Pe={class:"btb-location-menu-content"},$e=["onClick"],Oe={class:"btb-location-option-name"},Ue=T({__name:"BtbAppNavBar",props:{navigation:{default:()=>[]},locations:{default:()=>[]},selectedLocationId:{},showLocationSelector:{type:Boolean,default:!1},accentColor:{default:"#00FF7B"}},emits:["navigate","locationChange"],setup(s,{emit:f}){const a=s,M=f,h=I(!1),C=g(()=>!a.selectedLocationId||!a.locations.length?null:a.locations.find(m=>m.id===a.selectedLocationId)),V=(m,y)=>{M("navigate",m.to)},d=m=>{h.value=!1,M("locationChange",m)},c=()=>{a.locations.length>1&&(h.value=!h.value)},L=()=>{h.value=!1},z=g(()=>a.navigation.filter(m=>m.show===void 0?!0:typeof m.show=="function"?m.show():m.show));return(m,y)=>(r(),l("nav",Ae,[t("div",Ie,[t("div",Te,[(r(!0),l(k,null,H(z.value,u=>(r(),l("a",{key:u.to,href:u.to,class:B(["btb-navbar-link",{"btb-navbar-link-active":u.active}]),onClick:E(x=>V(u),["prevent"])},[u.icon?(r(),l("span",{key:0,class:"btb-navbar-icon",innerHTML:u.icon},null,8,je)):w("",!0),t("span",Ee,p(u.label),1)],10,Se))),128))]),s.showLocationSelector&&s.locations.length>0?(r(),l("div",Ne,[t("button",{type:"button",class:B(["btb-location-btn",{"btb-location-btn-clickable":s.locations.length>1}]),onClick:c},[y[1]||(y[1]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"btb-location-pin"},[t("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),t("circle",{cx:"12",cy:"10",r:"3"})],-1)),C.value?(r(),l("span",_e,p(C.value.name),1)):(r(),l("span",Re,"Select Location")),s.locations.length>1?(r(),l("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:B(["btb-location-chevron",{"btb-chevron-open":h.value}])},[...y[0]||(y[0]=[t("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2)):w("",!0)],2),h.value?(r(),l("div",De,[t("div",{class:"btb-location-menu-backdrop",onClick:L}),t("div",Pe,[y[2]||(y[2]=t("div",{class:"btb-location-menu-header"},"Select Location",-1)),(r(!0),l(k,null,H(s.locations,u=>(r(),l("button",{key:u.id,class:B(["btb-location-option",{"btb-location-option-active":u.id===s.selectedLocationId}]),onClick:x=>d(u.id)},[t("span",{class:"btb-loc-dot",style:v({background:u.color||"#a1a1aa"})},null,4),t("span",Oe,p(u.name),1)],10,$e))),128))])])):w("",!0)])):w("",!0)])]))}}),Ge={class:"min-h-screen bg-background text-white flex flex-col"},Je={style:{paddingTop:"92px"},class:"flex-1"},We={class:"container mx-auto px-4 sm:px-6 lg:px-8 py-6"},Ze='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>',qe='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><line x1="12" y1="18" x2="12" y2="12"/><line x1="9" y1="15" x2="15" y2="15"/></svg>',Qe='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewB
7ox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="15" x2="21" y2="15"/><line x1="9" y1="3" x2="9" y2="21"/><line x1="15" y1="3" x2="15" y2="21"/></svg>',Xe='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 2v6L6 14v4a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-4l-3.5-6V2"/><line x1="8" y1="2" x2="16" y2="2"/><path d="M14 14a2 2 0 1 1-4 0"/></svg>',Ke='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/></svg>',Ye='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>',eo='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.29 1.51 4.04 3 5.5l7 7Z"/></svg>',oo='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="1" x2="12" y2="23"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>',to='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="2" width="16" height="20" rx="2"/><line x1="8" y1="6" x2="16" y2="6"/><line x1="8" y1="10" x2="8" y2="10"/><line x1="12" y1="10" x2="12" y2="10"/><line x1="16" y1="10" x2="16" y2="10"/><line x1="8" y1="14" x2="8" y2="14"/><line x1="12" y1="14" x2="12" y2="14"/><line x1="16" y1="14" x2="16" y2="18"/><line x1="8" y1="18" x2="12" y2="18"/></svg>',no='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>',ao='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"/><line x1="16" y1="8" x2="2" y2="22"/><line x1="17.5" y1="15" x2="9" y2="15"/></svg>',lo='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20M2 12h20"/><circle cx="12" cy="12" r="10"/></svg>',ro='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"/><path d="M13 5v2"/><path d="M13 17v2"/><path d="M13 11v2"/></svg>',io='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><line x1="12" y1="9" x2="12" y2="13"/>
7<line x1="12" y1="17" x2="12.01" y2="17"/></svg>',co=T({__name:"admin",setup(s){const f=X(),{user:a,logout:M}=K(),h=g(()=>a.value?{id:a.value.id||a.value.sub||"",email:a.value.email||"",name:a.value.name||a.value.givenName||"",givenName:a.value.givenName||"",familyName:a.value.familyName||"",picture:a.value.picture||""}:null),C=[{label:"Dashboard",to:"/admin",icon:Ze},{label:"Bookings",to:"/admin/cms/bookings",icon:ro},{label:"Session Prices",to:"/admin/cms/session-prices",icon:oo},{label:"Pricing Formulas",to:"/admin/cms/pricing-formulas",icon:to},{label:"Tier Grid",to:"/admin/cms/tier-grid",icon:Qe},{label:"Product Catalog",to:"/admin/cms/products",icon:no},{label:"Add-On Overrides",to:"/admin/cms/addon-overrides",icon:ao},{label:"Addon Products",to:"/admin/cms/addon-products",icon:lo},{label:"Experiments",to:"/admin/experiments",icon:Xe},{label:"Suggestions",to:"/admin/suggestions",icon:Ke},{label:"Page Copy",to:"/admin/cms/copy",icon:qe},{label:"Error Messages",to:"/admin/cms/error-copy",icon:io},{label:"Error Logs",to:"/admin/cms/error-logs",icon:Ye},{label:"Recovery",to:"/admin/cms/recovery",icon:eo}];function V(){M()}function d(c){f.push(c)}return(c,L)=>(r(),l("div",Ge,[j(A(Fe),{"app-name":"Checkout CMS","current-app":"checkout",user:A(h),apps:A(ne),"max-role-level":100,"home-link":"/admin",onLogout:V,onNavigate:d},null,8,["user","apps"]),j(A(Ue),{navigation:C,"show-location-selector":!1,onNavigate:d}),t("main",Je,[t("div",We,[Y(c.$slots,"default")])]),L[0]||(L[0]=t("footer",{class:"mt-auto border-t border-border/30 py-4 text-center text-xs text-muted-foreground"}," Checkout CMS â Beat The Bomb ",-1))]))}});export{co 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.